Commit Graph

43 Commits

Author SHA1 Message Date
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
d8b8128abb Adds AsFloatArray to CMatrix3D.
This was SVN commit r26834.
2022-04-27 19:53:42 +00:00
4de89c3db1 Moves texture management to CDeviceCommandContext, adds quality options.
Comments By: nwtour, Stan
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4488
This was SVN commit r26365.
2022-02-13 19:30:28 +00:00
15c40861b4 Separates terrain alphamap combining and uploading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4419
This was SVN commit r26184.
2022-01-07 14:33:54 +00:00
87b5c233c5 Splits CRenderer part about scene to CSceneRenderer.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4412
This was SVN commit r26165.
2022-01-04 13:29:01 +00:00
e4455a8e8f Speedups terrain painting tab in Atlas by asynchronous texture loading.
Tested By: Silier, Stan
Differential Revision: https://code.wildfiregames.com/D4405
This was SVN commit r26142.
2021-12-30 16:24:07 +00:00
92cf0c784c Removes Handle from ShaderProgram to use more high-level objects.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4403
This was SVN commit r26138.
2021-12-29 07:07:08 +00:00
3591220361 Removes redundant ogl usage to process data on CPU combining terrain alpha map.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4399
This was SVN commit r26129.
2021-12-28 06:41:06 +00:00
60a422b668 Moves water textures and terrain alpha composite map to GL texture class following 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4394
This was SVN commit r26120.
2021-12-27 08:14:47 +00:00
f59f637cbb Cleanups TerrainTextureEntry a little, removes commented member from 88ab3f0f5b.
This was SVN commit r26118.
2021-12-26 20:39:13 +00:00
b03b560e71 Adds std namespace to shared_ptr usages in graphics.
This was SVN commit r25525.
2021-05-22 19:21:33 +00:00
cdd75deafb XMB Improvements, parse JS into XMB, make strings more efficient.
XMB format is bumped to 4, invalidating all cached files. The
differences are:
 - element/attribute names are stored after the elements themselves, and
not before. This allows writing XMB data in one pass instead of two.
 - names themselves becomes offsets (instead of arbitrary integers),
making getting the string from the int name much more efficient.

XMBFile is renamed to XMBData to clarify that it does not, in fact,
refer to a file on disk.

XMBData::GetElementString is also changed to return a const char*, thus
not creating an std::string. A string_view version is added where
convenient.

The XML->XMB and JS->XMB conversion functions and the corresponding
storage are moved to `ps/XMB`, since that format doesn't particularly
relate to XML. CXeromyces becomes lighter and more focused as a result.
The XML->XMB conversion also benefits from the above streamlining.

Note that in a few cases, string_view gets printed to CLogger via
data(), which is generally not legal, but we know that the strings are
null-terminated here. Our libfmt (version 4) doesn't support
string_view, that would be v5.

Differential Revision: https://code.wildfiregames.com/D3909
This was SVN commit r25375.
2021-05-04 13:02:34 +00:00
dd0b56c8aa Replace DISCARD macro with ignore_result template.
Fixes eb7940b418.
As reported by Vladislav, there is possibly confusion on what exactly is
being ignored when there are multiple statements after DISCARD. Explicit
wrapping avoids that.

Differential Revision: https://code.wildfiregames.com/D3206
This was SVN commit r24397.
2020-12-15 09:03:44 +00:00
369c2e8801 Further header & precompiled cleanup, fix no-PCH builds.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.

Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.

Thanks Stan for the testing.

Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
2020-12-09 14:39:14 +00:00
eb7940b418 Silence warnings about unused result.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.

Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
2020-11-26 13:58:59 +00:00
604ec667f3 Removes possible copying of CStr in CTerrainTextureEntry and adds const where possible.
The copy returning was introduced in 7577d224a6.

This was SVN commit r23363.
2020-01-10 22:36:22 +00:00
cc67d54aeb Fix compiler warnings on VS 2015, refs #3439, refs #5069.
Patch By: Stan
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1262
This was SVN commit r21480.
2018-03-10 09:58:53 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
8bfe16cac8 Use in-place construction.
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
a18fbd12ec XML validation. Based on patch by historic_bruno. Refs #245.
This was SVN commit r16733.
2015-06-07 21:56:52 +00:00
b1c4e29ac8 Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029.
NOTE: requires update-workspaces and may require correction of some
modded actors/scenarios

This was SVN commit r16438.
2015-03-15 23:59:48 +00:00
568c415d0a Convert wchar_t*/wstring arguments to UTF-8 strings in CLogger messages.
This was SVN commit r16188.
2015-01-22 20:37:38 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
38a8e2e0d6 Automatically convert most path.string().c_str() to path.string8()
Done with:

  ag -l 'LOG.*string\(\).c_str\(\)' source | xargs perl -pi -e'1 while
s/(LOG.*string)\(\)\.c_str\(\)/${1}8()/g'

This was SVN commit r16186.
2015-01-22 20:35:17 +00:00
e9a33b71ae Manually fix the less trivial CLogger format strings.
This was SVN commit r16184.
2015-01-22 20:32:06 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
a5639631ee Texture system refactoring and cleanup, fixes #2455, patch by IronNerd.
This was SVN commit r14835.
2014-03-13 02:37:05 +00:00
f5be596ee8 Fixes use of invalid pointer from temporary string (caused some invalid read warnings in Valgrind)
This was SVN commit r13237.
2013-03-07 03:54:41 +00:00
d18b9dd2dc Check if the renderer is initialised. Fixes crash in replay mode.
This was SVN commit r12948.
2012-12-06 19:23:31 +00:00
88ab3f0f5b Terrain/decal materials (includes triplanar/normal/specular/emissive mapping); custom alphamaps
This was SVN commit r12306.
2012-08-07 18:21:16 +00:00
41e3bad341 More build fixes for FreeBSD.
Adds BSD sysdep.
Adds support for MAKE variable, overriding make command in our build
scripts.
Fixes more files not ending with newline.

This was SVN commit r10994.
2012-01-31 00:06:56 +00:00
7f679a7975 # Support separate rotation and scaling for each terrain texture
This was SVN commit r10952.
2012-01-22 18:20:33 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
64a02932e3 refactor headers: path_util -> path, native_path -> os_path, remove where unnecessary
This was SVN commit r9108.
2011-03-23 14:43:35 +00:00
dcd192cb60 refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of
strings/paths; allows safe+easy join via operator/ and convenient
case-insensitive comparison via operator==, avoids NativePathFromString,
similar to boost::filesystem)
- NativePath -> OsPath
- add hash and To/FromJSVal for Path
- add TS_ASSERT_PATH_EQUALS
- replace _wfopen_s with sys_OpenFile
- remove obsolete SortFiles/Directories

This was SVN commit r9107.
2011-03-23 13:36:20 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
bf3d5c75f0 Be more robust to broken terrain property files.
This was SVN commit r8888.
2011-02-05 13:13:57 +00:00
03c75100ab # Fix terrain blending logic.
Add terrain priority rendering mode in Atlas.
Fix terrain painting in Atlas to be less profligate with priority
values.
Support hotloading of blend textures.
Clean up some trivial things.

This was SVN commit r8872.
2011-01-29 16:31:48 +00:00
fd68a95bad Fix map reader to load all necessary simulation data even when graphics are disabled
This was SVN commit r8118.
2010-09-17 17:43:12 +00:00
67a94572ec # Add new texture loading system with automatic compression.
Replace almost all texture uses with calls to the new system.
Add some anistropic filtering to terrain textures.
Let Atlas load terrain texture previews partly-asynchronously by
polling.
Fix inefficient texture colour determination for minimap.
Remove unused global g_TerrainModified.
Change GUI texcoord computation to be less efficient but to cope with
dynamic texture changes.
Fix GUI renderer effects leaving bogus colour state.

This was SVN commit r8099.
2010-09-10 21:02:10 +00:00
6c7830df3f Rename CTextureManager and CTextureEntry since they are only for terrain textures
This was SVN commit r8076.
2010-09-04 21:26:52 +00:00