Commit Graph

22 Commits

Author SHA1 Message Date
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
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
ec69bccb2c # Tidied up some code.
- Made some classes not be singletons, since there's no reason why they
should be.
 - Made them non-global too (because globals have unclear lifetimes, and
make it harder to test things, etc). They're now owned by CGameView and
CWorld, and mostly accessed via g_Game or arguments (vaguely trying to
avoid the graphics code calling into the game code).
 - Moved CGameView implementation into pimpl, so the header file isn't
so heavy.
 - Changed a few pointers into references, to indicate that they're
never NULL.

This was SVN commit r4756.
2007-01-08 01:56:46 +00:00
13f2e3ca0c Tried compiling with ICC9 on Linux, which raised various issues:
* Fixed some bugs with incorrect macro usage (SDL_BYTE_ORDER vs
SDL_BYTEORDER, {MSC,GCC}_VER vs {MSC,GCC}_VERSION, OS_WIN/OS_UNIX in
projects where they're not defined).
 * Removed some redundant declarations of g_Console.
 * Removed some unnecessary semicolons.
 * Removed some unused variables.
 * Added throw specification to operator new.

This was SVN commit r4698.
2006-12-16 01:01:15 +00:00
75f2f9fd5f Avoid some warnings on GCC
This was SVN commit r4623.
2006-11-07 13:28:03 +00:00
3195893d1c # MacOS X compat (part 1)
- u_anim_name disambiguation
- fix implementation of finite (use our fpclassify instead of compiler's
routine)
- รค -> ae
- workaround for MAP_ANONYMOUS
- fix GLint in ogl.cpp
- add include for SIZE_MAX in string_s
- avoid PIC clobbered error and speed up rdtsc a bit
- add include for stat

This was SVN commit r4170.
2006-07-26 14:04:52 +00:00
37c87a6579 # housekeeping
add new JSUtil, automatically included via SpiderMonkey.h.
move JS_ASSERT there and rename JSU_ASSERT.
move scriptglue's REQUIRE_PARAMS there and rename to JSU_*
replace if(argc < x) bail() code with those macros.

This was SVN commit r4169.
2006-07-26 13:10:13 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
f45c44ca09 Rotated various things (terrain texture UVs, default light and camera angles) by 45 degrees.
Map XML: Store camera position. Stopped using DTDs (because they make it
too hard to change the XML structure without breaking all the old XML
files).
Game.h: Include fewer files, to make compilation sometimes faster.
World: Changed some things to not be singletons, since they were
(ab)used as CWorld members.

This was SVN commit r3670.
2006-03-21 20:55:45 +00:00
36fa5ec2bf * clean up CLightEnv a bit
* add CLightEnv::m_TerrainShadowTransparency
* shadows will let a fraction of diffuse light through
* added JS LightEnv objects, so the lighting environment can be changed
  from the console
* new element TerrainShadowTransparency supported in the scenario .xml
format,
  changed cantabrian_generated with an example

This was SVN commit r3513.
2006-02-15 00:45:16 +00:00
52a8793450 Atlas: Bits of tool-related code.
Game: Large screenshots (with ctrl+alt+F2).

This was SVN commit r2994.
2005-10-24 01:53:03 +00:00
b8c2f424e7 glDrawRangeElements -> glDrawRangeElementsEXT (fixes compilation error; EXT/ARB/etc extensions need to be used for everything not in GL1.1)
Reinserted mu-like symbol.
Fixed some minor warnings.

This was SVN commit r2838.
2005-10-03 16:04:55 +00:00
2790981eae CVSROOT: doesn't seem particularly useful now
ObjectBase: removed support for old actor format
Various: reduced sometimes-unnecessary header inclusions
Atlas: slightly nicer tool and message systems

This was SVN commit r2816.
2005-09-30 00:59:42 +00:00
52ebd6ba11 scripting-interface improvements
- strict param count checks
- use ScriptingHost::RunMemScript instead of copy+pasted code
- replace duplicated parameter access code with macros

StringBuffer: use pointer instead of reference to allow
compiler-generated copy ctor
singleton: fix whitespace

This was SVN commit r2586.
2005-08-09 16:02:15 +00:00
ec6b78b252 rename assert2 debug_assert; use instead of all plain assert(), since there are no longer any issues (e.g. can't use while handling an exception)
This was SVN commit r2447.
2005-06-28 04:06:25 +00:00
7054957514 Minimap: Corrected orientation. Also cleaned up a bit, and fixed some inefficiencies.
Camera: Corrected code that wasn't doing what it looked like it was
doing, and was crashing JS "new Camera".

This was SVN commit r2302.
2005-05-13 01:15:53 +00:00
MarkT
3c99f0f2eb Minor JavaScript updates
This was SVN commit r2073.
2005-03-28 22:13:47 +00:00
MarkT
2ab625720b Fairly major XML/entprop changes; some more minor stuff that fell out as a consequence.
This was SVN commit r1220.
2004-10-07 19:23:35 +00:00
4a7757dac6 VC2k5 fix: avoided ambiguous parameter naming
This was SVN commit r1185.
2004-09-21 22:11:33 +00:00
1768ccded3 Miscellaneous GCC fixes
This was SVN commit r948.
2004-08-09 16:44:08 +00:00
MarkT
2b396ccb57 Minor improvements to some simulation code.
This was SVN commit r887.
2004-08-02 23:14:54 +00:00