1
0
forked from 0ad/0ad
Commit Graph

188 Commits

Author SHA1 Message Date
c7f647ae73 Don't bother initialising shadow map textures with data that will never be used.
Add some profiling in the shadow rendering code.

This was SVN commit r8934.
2011-02-18 23:41:27 +00:00
4f724056d5 Remove some unused bits from CRenderer
This was SVN commit r8927.
2011-02-16 22:40:15 +00:00
fe21c5e023 # Rewrite fog-of-war rendering.
Disable shadows when only 2 TMUs available.
Clean up some other rendering code.

This was SVN commit r8882.
2011-02-03 01:12:24 +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
19dbbb816d Changed all references from old CLogger API to use the new API. Removed old API. Fixes #247
This was SVN commit r8791.
2010-12-05 08:41:55 +00:00
3407983e98 remove no-longer needed (and non-reentrant) MICROLOG as per today's meeting
This was SVN commit r8542.
2010-11-06 19:11:40 +00:00
7ea522a484 # Add on-screen health bars
This was SVN commit r8241.
2010-10-02 12:41:29 +00:00
6d82bfaabf Disable some profiler calls that are frequent enough to significantly affect performance
This was SVN commit r8171.
2010-09-24 21:33:07 +00:00
000b7250a2 Use slightly higher quality texture compression in archive-builder mode
This was SVN commit r8148.
2010-09-20 16:34:09 +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
2529ae2a7b Fix #543 (Replace skybox with black background), based on patch from Jayschwa
This was SVN commit r8018.
2010-08-21 22:43:35 +00:00
d2cf6ceb88 less global variables: make most uses of g_VFS explicit (required for another app that has two VFSes), g_yres is no longer required by cursor module
This was SVN commit r7686.
2010-07-04 10:15:53 +00:00
1c0536bf08 # Refactored the networking code, and redesigned the game setup screen.
Major updates to most network classes.
Simplify CNetServer so it doesn't duplicate any client behaviour; all
players now run CNetClient.
Remove most player/slot management from networking code.
Wait for all players to finish loading before starting the simulation.
Remove CGameAttributes; attributes are now just a JS object.
Remove CPlayer; they are now just simulation entities.
Handle player colours via simulation system.
Add a default map for Atlas, so it always has something to load.
Move network documentation to Doxygen.
Remove lots of now-unused code.

This was SVN commit r7653.
2010-06-30 21:41:04 +00:00
48b83a413c Added access to shadows property back to console
:renderer.shadows = booleanValue <-- should work again

This was SVN commit r7629.
2010-06-19 22:07:27 +00:00
0f611042b1 # Support alt+enter to toggle fullscreen mode. Make game window resizable.
Refactor the video mode setting logic to cope better with dynamic
changes.

This was SVN commit r7606.
2010-06-03 19:07:59 +00:00
828400d82e # Support floating units in new simulation system.
Fix rendering of underwater lines.
Fix rendering of unit selection outlines in Atlas.
Remove some obsolete hotkeys.

This was SVN commit r7589.
2010-05-27 23:23:53 +00:00
56bb858802 # Delete a lot of obsolete simulation code.
This was SVN commit r7555.
2010-05-20 18:09:23 +00:00
58e79bfdbe Force fancywater off if fragment shader extensions are not supported. See #270
This was SVN commit r7385.
2010-03-21 14:18:15 +00:00
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
9662666403 more string drudgery
- sprintf, snprintf -> sprintf_s (ensures 0-termination of result)
- use %s instead of %hs with sprintf_s to avoid GCC warnings
- convert h_mgr's to_string to unicode

This was SVN commit r7170.
2009-11-06 10:59:10 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
cd6a926c14 Fix #293 (Lots of printf format string errors), based on patch from Cygal
This was SVN commit r7113.
2009-08-14 18:42:39 +00:00
4a4269824b Add more vararg error-checking annotation
This was SVN commit r7073.
2009-08-04 16:08:41 +00:00
cd0554c6bc Fix Linux build warnings
This was SVN commit r7034.
2009-07-25 20:35:48 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
b51353ae0b Use NONCOPYABLE macro, to avoid ICC warnings
This was SVN commit r6589.
2009-01-03 18:40:28 +00:00
5228800b73 # Fixed Linux build
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.

This was SVN commit r6574.
2009-01-02 21:19:41 +00:00
becab2d479 fix: alpha map texture wasn't initialized, which caused crash if multiplayer -> host -> continue -> cancel
thanks to anton for noticing and reporting the problem :)

also: fix hardcoded paths in rmgen to point to mods/public

This was SVN commit r6429.
2008-10-18 17:58:04 +00:00
40a7da782e warning fixes
GameSetup.cpp: add support for new internal/public mod layout

This was SVN commit r6393.
2008-09-18 11:31:12 +00:00
0f9294ce17 Fixed some strict aliasing warnings
This was SVN commit r6252.
2008-07-19 00:36:42 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
af6694262a cleanup:
remove ONCE(ScriptingInit) constructs, replace with direct call from
GameSetup
revised GameSetup's InitScripting (organize into groups)
JSCollection: remove #define of two concrete collection types (made
typedef, moved to their respective entity.h and player.h)

This was SVN commit r5871.
2008-04-06 14:03:23 +00:00
9269be9ee3 remove mmgr and macros that redefine malloc/new/free
(see http://www.wildfiregames.com/forum/index.php?showtopic=11450&hl= )

clean up debug module
. no longer include platform-dependent header (-> less rebuilds)
. DISPLAY_ERROR -> DEBUG_DISPLAY_ERROR
. parts of config.h that don't affect all files moved to config.2 (->
fewer full rebuilds)
. remove creaky symbol cache (no longer needed for mmgr)
. remove TLS thread naming stuff (can use debugger's thread window
instead; no need for platform independence there)

wdbg: remove thread suspension and breakpoint APIs (not needed)

acpi: fix: u64 -> uintptr_t

wutil: fix WinScopedLock, use that instead of direct lock() functions

misc:
. get rid of SAFE_STRCPY, replace with strcpy_s
. remove _getcwd (shouldn't be used)

This was SVN commit r5563.
2008-01-19 11:33:11 +00:00
5529977ecd fix: CLogger's ELogMethod is now inside the class and does not use names that are vulnerable to macro destruction (fixes a conflict with Windows system header's #define ERROR)
This was SVN commit r5532.
2007-12-29 16:22:23 +00:00
8667ea74c8 fixes and improvements
- directoryPosix: replace most methods with boost filesystem (but not
all: the latter cannot efficiently enumerate files AND query their
size/mtime)
- AllocatorChecker: better name for member functions
- file: move the File class here
- trace: bugfix
- io: move UnalignedWriter to write_buffer.cpp (basically the same
thing)
- vfs: remove unnecessary "vfs" warts from variable names
- vfs_tree: VfsFile now stores single Name/Size/MTime fields instead of
the FileInfo record (less clunky)
- vfs_path: use boost filesystem's version of the basename/extension
functions
- lf_alloc: remove (no longer necessary, won't be finished - not worth
the trouble)
- path_util: remove path_foreach_component (replaced by better path
traversal logic) and PathPackage (obsoleted by fs::path)

! resource loading code now receives VfsPath as its filename. there is
also OsPath (native absolute path) and Path (relative to binaries/data)

- tex is now independent of file loading code; it just en/decodes
in-memory buffers
- wdll_ver: clean up, use smart pointer to simplify bailout code
- wsdl: remove nonexistent failure path from calc_gamma (cruised by here
because SDL_SetGamme is failing once after a cold boot at work)
- wsnd: simplify OpenAL DLL search, use boost::filesystem
- wutil: Wow64 redirection is now packaged in a (RAII) class

This was SVN commit r5525.
2007-12-22 18:15:52 +00:00
e2eb5b2610 part4: adapt codebase to changes in lib/
mostly straightforward except for CVSFile / Filesystem. moved the former
into the newly created latter component. removed VFSUtil entirely (that
functionality is available from lib/file/file_system_util.h)

Xeromyces.cpp: simplify buffer handling since smart pointers are now in
play. also use WriteBuffer instead of membuffer.

This was SVN commit r5519.
2007-12-20 20:21:45 +00:00
0636b65228 mem: update comment
renderer, WaterManager: remove unnecessary header

This was SVN commit r5450.
2007-11-10 18:45:17 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
73683b6109 # SwEng
. the massive renaming undertaking: camelCase functions -> PascalCase.
. add some cppdoc.
. minor additional renaming improvements: e.g. GetIsClosed -> IsClosed
. in entity code, replace constructs like "pvec = new vector; return
pvec; use *pvec; delete pvec" with a simple stack variable passed as
output parameter (avoid unnecessary dynamic allocs)
. timer: simpler handling of raw ticks vs normal timer (less #if)

This was SVN commit r5017.
2007-05-02 12:07:08 +00:00
49f7f31298 Undid map changes.
Used default camera settings more consistently.

This was SVN commit r4892.
2007-02-10 19:37:33 +00:00
44be62092c # Fixed rendering of transparent objects.
Made transparency ordering give consistent results if two transparent
models are in the same position.
Removed transparency material from tree trunks, so they won't suffer
from transparency-ordering issues.

This was SVN commit r4889.
2007-02-10 18:26:57 +00:00
5e3e78ca78 # Fixed some graphical and scenario editor issues.
Atlas: Changed video format to 640x480 and losslessly compressed. Added
most-recently-used files list. Stopped switching sidebar when selecting
tools, since it was getting annoying. Added Slow playback mode. Fixed
crash when resetting sim while projectiles exist.
Renderer: Added JS-accessible renderer.shadowMapSize to override the
size of shadow maps.
ShadowMap: Changed default depth texture bits to 24, since that seems to
go faster (see #180).
PolygonSortModelRenderer: Made more similar to other renderers, so that
the renderer.sortAllTransparent=true mode works better.
Projectile: Fixed update, so it interpolates smoothly.
Entgraph: Fixed promotion detection.

This was SVN commit r4876.
2007-02-09 17:04:55 +00:00
8d0a7170f6 # Slightly tidied up string code.
CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
2007-02-01 14:46:14 +00:00
27b6ffe2d6 # housekeeping
sorry, update-workspaces + rebuild is necessary (moved boost/utility
into PCH)

- ps/ : committed additional documentation on behalf of Joe.
- lib/ : HAVE_C99 - replace with specific e.g. HAVE_NPRINTF; intended to
help with MacOSX compat (by no longer requiring us to lie about
STDC_VERSION)
- NO_COPY_CTOR -> boost::noncopyable

This was SVN commit r4825.
2007-02-01 01:34:17 +00:00
173c56140c # Fixed skeletal animation algorithm.
* Skinning is done in a way that works when there's more than one bone
influencing a vertex.
 * PMDs now store vertexes in world-space instead of bind-space. (The
loader converts the old-version PMDs so they still work.)
 * Moved SkinPoint, SkinNormal into CModelDef so it could use them when
loading the old PMDs.
 * Made the FastNormals approach non-optional, so the inverse-transpose
bone matrices could be removed. Changed the explanation of why it's a
valid approach.
 * Quaternion: Made GetInverse assume that the quaternions have unit
length (which they do when they're representing 3D rotations).
 * lib: Added support for DDS files that aren't a multiple of 4x4 (most
useful for 1x1, 2x2, etc that are still powers of two).
 * Actor Viewer: Added white terrain texture to the minimal test mod, so
shadows are visible. Changed default so walk/run animations don't move
the unit along the ground.
 * Removed some redundant repetition in doc comments.
 * Removed some unnecessary #includes.

This was SVN commit r4696.
2006-12-15 16:09:30 +00:00
cbafd43eea # Changed handling of command-line arguments.
* Added CmdLineArgs, which does the parsing then lets various pieces of
code check for whatever arguments they want.
 * Made Atlas exit out of main() cleanly, instead of calling exit()
itself.
 * Disabled the global exception-catching in unit tests, via a
entry_noSEH, so it doesn't make debugging harder.
 * Added nice printing of CStr in unit test failure messages, and added
comparison of vector vs constant array.

This was SVN commit r4688.
2006-12-09 14:39:52 +00:00
6ed4ad6519 Added a hotkey to toggle rendering of territory outlines. (Currently "T").
This was SVN commit r4675.
2006-12-05 02:08:52 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00