1
1
forked from 0ad/0ad
Commit Graph

2434 Commits

Author SHA1 Message Date
673624d4ad Updates to techs: Added m_inProgress variable and fixed up some JS interface functions that were returning JS_TRUE/JS_FALSE rather than JSVAL_TRUE/JSVAL_FALSE.
This was SVN commit r4146.
2006-07-19 05:26:52 +00:00
8eae620b11 # More work on technologies.
Techs will now apply to units created after they are researched.

This was SVN commit r4143.
2006-07-18 23:59:48 +00:00
b70e16cf2a Removed traits.health.curr from CEntityTemplate (this is a per-entity property, and putting it in the template caused units to revert to 0 health when they changed templates; that hadn't been happening in the past due to the m_inherited bug).
This was SVN commit r4141.
2006-07-18 16:52:53 +00:00
845b606763 # Updates to the tech system, and bug fixes.
Techs: Made a separate list of technologies for every player, rather
than array fields in CTechnology. This also involved changing the
tech-related JS functions.

Bugs:
- PS_MAX_PLAYERS should be 8 (the way it's used for array sizes, etc
indicates that it's the maximum possible number of players ever, but it
used to be 6 while the game had 8 players).
- When you changed a CJSSharedProperty that was inherited, m_Inherited
was set to false, so it was no longer inherited by subsequent entities
you created. They got initialized to garbage values as a result.

This was SVN commit r4138.
2006-07-18 04:17:46 +00:00
e1f06f4667 # Updates to health/stamina bar rendering code, and optimizations in CJSObject.
(Replaced CStrW parameters with const CStrW& in CJSObject and
CSynchedJSObject).

This was SVN commit r4136.
2006-07-17 22:18:37 +00:00
f0ec100d1a Bug fix to construction (units weren't being given the building to convert to due to some hasty refactoring in an earlier commit). Also increased shadow Z bias to 0.02 since there still seemed to be cases when it was very visible.
This was SVN commit r4125.
2006-07-17 00:59:32 +00:00
29ea79f5eb # CSimulation init optimization
* ScriptableComplex.h: big bang (several hundred ms) for little buck:
made all CStrW params const CStrW& instead. this should *always* be done
as a matter of principle, unless the string actually needs to be
modified (in which case compiler will tell you)

* adts: slight improvement to hash table perf: change expansion
threshold to 50% full, and implement quadratic probing (as suggested by
matei)

This was SVN commit r4122.
2006-07-16 23:03:26 +00:00
4630745625 # Updates to the entity bar display system by Andrew.
Bars and rank icons now scale with zoom level. I've left in the old
render functions for now, but they can be removed later.

This was SVN commit r4120.
2006-07-16 19:32:48 +00:00
4a259aa439 # add cppdoc, refactor EntityManager
entitymanager: remove duplication, move refcnt && !destroyed check into
helper function in preparation for caching result of that calculation
scriptglue: improved timer calibration

This was SVN commit r4113.
2006-07-14 14:00:00 +00:00
85959bb073 Fixed a crash that happened for me in release mode when pressing the shift key. In Hotkey.cpp:594, there was a line like
if( !unified[(*itKey)-UNIFIED_SHIFT] ) accept = false;

This was causing an index out of bounds when the key at *itKey was
AND'ed with the HOTKEY_NEGATION_MASK and thus became greater than 65536
and way out of bounds of the array. For now I added a check that *itKey
< HOTKEY_NEGATION_MASK, but maybe this is not the intended usage.

This was SVN commit r4111.
2006-07-14 00:14:44 +00:00
3f91cbe3c1 # Brightened default ambient lighting
This was SVN commit r4109.
2006-07-13 22:41:49 +00:00
3954604890 compensation for timer overhead (measurements now more precise; timer undershoots by 0.5us per start/stop session)
This was SVN commit r4099.
2006-07-13 21:04:06 +00:00
ed7b4b5fca # simple profiler/timer for JS scripts
cheezy but low-overhead. call startXTimer(i) and stopXTimer(i), where i
can be 0..9 for now. results are displayed via debug_out at end of
program run.

This was SVN commit r4095.
2006-07-13 20:09:20 +00:00
ac71eefbff Removed and #include for JSI_Entity.h.
This was SVN commit r4094.
2006-07-13 19:27:02 +00:00
b701269b0b # cleanup
replace it->member with variable=it->member for easier debugging. also
skip the AddProperty redundancy check in release mode instead of only
final builds

This was SVN commit r4093.
2006-07-13 19:12:50 +00:00
a56ec5bdcd Some cleanup - renamed CBaseEntity to CEntityTemplate, and removed JSInterface_BaseEntity.h and JSInterface_Entity.h (which were unused).
This was SVN commit r4091.
2006-07-13 03:29:33 +00:00
eb467745b3 Fixed a small bug - CEntity::m_extant was not initialized to true.
This was SVN commit r4089.
2006-07-13 00:16:11 +00:00
d2e8804ce0 Removed old attribute table code since it's no longer used.
This was SVN commit r4087.
2006-07-12 22:50:09 +00:00
c3879b182d # CSimulation cleanup and optimization.
- Modified CJSSharedProperty so it can be inherited. It now acts as our
"static property" class with a pointer-to-member field. It did much of
this before but it wasn't used much because of the way XML properties
were loaded.
- Modified CEntity and CBaseEntity so that virtually all properties are
now CJSSharedProperty's added with AddClassProperty in ScriptingInit.
- Removed m_run SEntityAction field, replacing its fields with separate
variables, so we can have proper pointer-to-members for them.
- Modified CTechnology to use CJSComplex::Get/SetProperty so that
attributes no longer need to be "registered" for use in techs.

This was SVN commit r4086.
2006-07-12 22:24:25 +00:00
bd3a188cf9 m_sectorValues should be per-entity, not a property of BaseEntity.
This was SVN commit r4084.
2006-07-12 19:31:27 +00:00
ca4a4613f1 # CSimulation optimization+cleanup (2)
made many (*)of the bools in CEntity into a bitfield (flags). this saves
a lot of space inside CEntity.
* only those that are not specified in XML and/or accessed via JS

This was SVN commit r4082.
2006-07-12 16:18:31 +00:00
397a350e45 svn:ignore auto-generated test .cpp files.
Territories: Fixed memory leaks.
Atlas: New section-toolbar. Fixed colour of brush grid. Moved open/save
into File menu. Added 3D-ish lighting control. Added 'busy'
notifications.

This was SVN commit r4079.
2006-07-12 14:49:10 +00:00
e4ed1d52b9 # CSimulation cleanup and optimization (1)
moved some fields (e.g. size of health bar) out of CEntity and into
BaseEntity so they can be shared between entities (instead of duplicated
in each).

TODO: is it ok to remove AddProperty for those properties in CEntity?
(BaseEntity is still adding them)

This was SVN commit r4078.
2006-07-12 14:36:59 +00:00
1034a980fe Added code for placement of socketted buildings.
This was SVN commit r4073.
2006-07-09 23:12:37 +00:00
eaf12ae666 #fix to isnan() bug
big thanks to philip for seeing the problem! :D
cause: not popping FPU stack. didn't happen on my athlonXP presumably
due to different FPU usage (possibly in drivers): pushing 8 values could
clear the stack and mask overflow. the cause was not due to compiler
(and FLD/FSTP param passing) because Philip uses VC2005 as well, but saw
the crash (on P4 CPU)

fixes #130

This was SVN commit r4072.
2006-07-09 00:24:21 +00:00
7926b3d93c # Some groundwork for territories.
Entities with traits.is_territory_centre == true will act as territory
centres, and territory areas are calculated and displayed on the
minimap. It remains to display these areas in the game view and to make
Civ Centres "socketable" so you can build them on Settlements to claim
them.

This was SVN commit r4070.
2006-07-08 22:40:01 +00:00
f3b3e0be6e # big refactor of error display code. fixes crash in release-mode selftest
* debug_write_crashlog and debug_dump_stack are now responsible for
detecting reentrancy (reported via new ERR_REENTERED error code).
* export debug_error_message_build to allow unit test of stack dumper
* split+clean up debug_display_error to allow this.
* error_description_r now returns buf for convenience
* ia32: fix typo causing disassembly to fail
* wdbg_sym: bugfix causing incorrect debug_walk_stack return value.
prevent recursive locking, provide locked version of
debug_resolve_symbol. add skip_this_frame for convenience.

refs #130

This was SVN commit r4067.
2006-07-07 01:22:23 +00:00
dd6679b0b8 # fixes to string_s selftest
snd_mgr: fix cppdoc comments (got shredded by IDE autofmt)
string_s: disable WARN_IF_PTR_LEN (too many false positives)
test_string_s: add missing debug_skip_next_err (fixes complaints on
VC2003)

refs #130

This was SVN commit r4066.
2006-07-06 15:52:59 +00:00
pyrolink
a95c72d0c1 Upgraded console (text wrap, help text), cinematic stuff
This was SVN commit r4065.
2006-07-06 03:17:44 +00:00
a0e92ee51c # small fixes
ia32: fix overly zealous error return in ia32_get_call_target
sysdep: more correct definition of fpclassify() (takes into account
argument size)

This was SVN commit r4055.
2006-07-02 20:03:05 +00:00
1f663eaf14 (fix: didn't see compiler error message, oops.)
This was SVN commit r4049.
2006-06-29 22:59:10 +00:00
600adac871 # housekeeping and bugfix in Loader queue
remove old instrumentation, fix warnings, add measured timing results
Loader: bugfix: no more memory leak whenever callback returns a warning
code. this was a loophole in the callback return value docs.

This was SVN commit r4048.
2006-06-29 22:52:50 +00:00
5586f29c5f # housekeeping
remove no longer needed timers and debug_printfs.
delete JSInterface_*Entity.cpp files because they are empty and cause
linker warnings.

This was SVN commit r4043.
2006-06-26 12:47:23 +00:00
aeed96dafa # improvements to build system for asm files
split ia32_asm code up into memcpy, color
premake: add (windows-only so far) support for NASM include paths -
required when using %include. see rationale in vs.c
refs #124

This was SVN commit r4039.
2006-06-25 20:58:03 +00:00
77faccb6cb # small fixes.
add translate_free (avoids mem leak in translate API)
debug: when skipping errors but an unexpected one is raised, trigger a
warning.
test_archive_builder: properly clean up archive; decrease number of
files to speed things up.

This was SVN commit r4035.
2006-06-25 15:35:28 +00:00
3b753a4df8 # add cppdoc
refs #122

This was SVN commit r4034.
2006-06-25 15:31:58 +00:00
45af5f0d4f # final self-test fixes; integration complete.
reinstate and fix archive_builder and compression tests.
file: add dir_delete
wdbg_sym: stack trace check is now silent.
Win32Gui: fix indentation

closes #117

This was SVN commit r4022.
2006-06-24 13:41:42 +00:00
7e3265899c # fix errors in self-tests and the code they test. all now run through.
(archive_builder and compression tests are disabled ATM)

also fixed some compile warnings inside cxxtest.

refs #117

This was SVN commit r4021.
2006-06-24 10:44:08 +00:00
7cb82ada2f # lots of housekeeping/fixes
premake: document extra_params
ogl: remove EXT_ symbols, use glext instead
adts: move cache into separate file (also remove old cache impl)
move SDL files in sysdep/win to libraries/SDL
ScopeTimerAccrue: change #ifdef spaghetti into templated policy class
app_hooks, define VOID_FUNC to FUNC(.., (void) )
look at stalk walk code; any reason not to work on Win64?
replace ERR_TEX_CODEC_CANNOT_HANDLE with INFO_* - not an error. also
ERR_SYM_SUPPRESS_OUTPUT ERR_SYM_SINGLE_SYMBOL_LIMIT
wdbg_sym: only import RtlCaptureContext once (not every walk_stack)
add sys_last_error (!GetLastError on win32); converts to text in
display_error, also show sys_last_error and errno
app_hooks: move i18n impl out (belongs in pyrogenesis)
fixes to string_s test.

refs #124

This was SVN commit r4020.
2006-06-23 17:41:55 +00:00
980689e054 Hopefully closes #126 again
This was SVN commit r4016.
2006-06-23 01:06:21 +00:00
04e36e4bef Hopefully closes #126
This was SVN commit r4015.
2006-06-23 01:00:20 +00:00
2b0e5d0b42 # Added parameters to control water murkiness.
This was SVN commit r4013.
2006-06-22 21:11:18 +00:00
8f50fe1ff8 # work on self-tests
add ignore-next-error feature, use it in string_s
refs #117

This was SVN commit r4011.
2006-06-22 19:12:10 +00:00
aeac009990 #merge (2)
path_util: add cppdoc
string_s: fix self test
wsock: fix initialization (no longer requires NLSO ctor, which doesn't
work)

This was SVN commit r4010.
2006-06-22 18:49:23 +00:00
ee4c7965dd # merge all local changes; moving over to new SVN server
* app_hooks: add display_error; can be used by atlas to override our
dialog box
* lots of small fixes (mostly pertaining to headers)
* debug: clean up display_error, protect from reentrancy, fix a few edge
cases (e.g. error message from dtor -> exit pressed -> suppress all
subsequent errors)
* delay_load: add warning: NLSO ctors are unreliable since we're
compiling into static lib

This was SVN commit r4009.
2006-06-22 18:26:08 +00:00
92b9c07f95 Restoring SVN repository:
Greek basket texture

# New Greek vases

# housekeeping
documentation fix: trailing / in directory names is mandatory

# Atlas: Sky texture selection; save with maps

Atlas code tidying: Slightly nicer syntax for defining command handlers,
and some explanation of how it works

Automated build.

This was SVN commit r4008.
2006-06-21 22:37:31 +00:00
823c93ce47 # bugfixes (string, pthread, screenshot writing)
- CStr : early out if empty, don't deref iterator (crashes in VC8)
- init VFS In archive_builder test
- wpthread: avoid race condition when creating threads. cleanup; replace
debug_warn with error codes
- Util: file_buf_free wasn't specifying FB_FROM_HEAP ->
http://www.wildfiregames.com/forum/index.php?showtopic=10085

This was SVN commit r4006.
2006-06-11 17:16:24 +00:00
039f26f0c3 Fixed editor brokenness.
# More useful environment (water, lighting) editing
(now saved into the map files).
Fixed no-PCH a bit.

This was SVN commit r4002.
2006-06-11 07:03:59 +00:00
77c59070c1 # Various gameplay updates.
- Added per-player resource pool and modified the GUI and entity scripts
to work with it.
- Modified unit creation functions so the unit is always assigned a
player before firing its initialize event, so that this event can deduct
population, etc from the right player.
- Fixed various small bugs, like a unit not cancelling all of its queued
items when it dies, or buildings not costing anything.

This was SVN commit r3998.
2006-06-10 03:05:16 +00:00
8d06d8601b A few organization changes:
- Removed "Base" from the Technology and Formation class names (it
doesn't make sense because these don't use inheritance).
- Modified the tech methods a little so a player ID is passed to
applyEffects, not getTechnology.

Also added a game startup script which will eventually set up player
resource pools and give them their civ techs.

This was SVN commit r3996.
2006-06-09 23:07:11 +00:00