Commit Graph

3586 Commits

Author SHA1 Message Date
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
2261231ffa # Housekeeping.
Jan and I implemented a number of changes:

- Converted SClassSet to vector.
- Refactored get/set ClassSet from string into methods in CClassSet.
- Turned pass-by-value string params in getCollisionObject, CEntity
constructor and CEntityManager into pointers.
- Simplified processChooseMovement.
- Merged CalculateRun and CalculateHealth into a single, simpler
CalculateRegen + helper functions.
- Changed the way regen works so the rates read in the XML act as rates
(before, they were the number of seconds until the entity will be fully
regenned, which is a bit counterintuitive).

This was SVN commit r4167.
2006-07-24 01:33:26 +00:00
1ce5ab6e0c Modified entity XML's so regen and decay rates are actual rates rather than "time to full health".
This was SVN commit r4166.
2006-07-24 01:29:02 +00:00
b82451a4ff Two new techs, to demonstrate negative bonuses. These are the infantry spearman speed and armour techs for Hellenes.
This was SVN commit r4165.
2006-07-23 17:26:37 +00:00
c19dbd1360 Removed UTF-8 BOM
This was SVN commit r4164.
2006-07-22 17:51:37 +00:00
03349d7d0c More tech work:
- Added the ability to specify modifiers as percentages, by typing for
example "<value>10%</value>".
- Changed the way required techs work so you need any of them rather
than all (which is how Andrew originally had it, I think, except I
changed it to all because techs with 0 prereqs counted as unresearchable
and I thought there was a logic error).
- Techs will now correctly declare themselves unavailable if a pair tech
is in progress of being researched.

This was SVN commit r4162.
2006-07-21 22:57:38 +00:00
b8456f0702 # Added 4 sample techs.
Also modified the entity script to allow for gathering fractional
resources, and modified the GUI to round resources to the nearest
integer. This is necessary since techs will likely push resource
gathering amounts to fractional numbers.

This was SVN commit r4161.
2006-07-21 22:54:01 +00:00
cddd4cab14 # Orchards, Fields, Plots, Corrals
# New farm terrain textures

Added, Damian's sounds
Updated the test map

This was SVN commit r4160.
2006-07-21 06:36:39 +00:00
90bfaf9c99 # housekeeping + bugfix in file trace recorder
entity.cpp: fix indenting (was using space instead of tab)
replace all instance of & operator=( with NO_COPY_CTOR
trace: fix bug reported by michael: if trace file is huge, indices would
keep on being recorded but data was cut off after a certain limit,
leading to invalid pointers (into garbage data)

This was SVN commit r4158.
2006-07-21 01:11:23 +00:00
7831f3cbe4 # Better handling of entity ownership changes.
Entities will now leave all their auras and cancel all their productions
when they change ownership, which will be useful when we have
convertible buildings.

This was SVN commit r4156.
2006-07-21 00:05:56 +00:00
5970bc03e7 Removed some debug output.
This was SVN commit r4155.
2006-07-20 22:46:13 +00:00
2f68e8d547 # Updates to techs.
- Added name and player JS properties for use in scripts.
- Remoed IsJSFirst since it doesn't make much sense for techs that also
apply to newly created units.

This was SVN commit r4154.
2006-07-20 22:43:06 +00:00
278d52bc2b A small fix to make techs get researched properly when you click their button.
This was SVN commit r4153.
2006-07-20 22:42:01 +00:00
c817566222 # housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo
boy.

please always perform this optimization (actually standard idiom) when
writing the code - it takes little work, tells the next guy that the
string won't be modified, and makes a large performance difference.

(* where possible.. a few require other changes and will follow later)

This was SVN commit r4151.
2006-07-20 14:37:58 +00:00
3baa2d04b5 # Preliminary work on technology research UI
Still early days, but implemented the first few of Matei's tech
features.

This was SVN commit r4150.
2006-07-20 10:27:36 +00:00
996285604b This was SVN commit r4149. 2006-07-20 08:53:10 +00:00
Aeros
30b4a1936e This was SVN commit r4148. 2006-07-20 04:48:59 +00:00
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
35fa0c35e8 Script work for techs (start/cancel/finish production handlers) as well as more sensible values for real_example.xml.
This was SVN commit r4145.
2006-07-19 05:25:57 +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
e374ecc342 Increased SettlementAura radius so it looks nicer on maps where scenario designers have placed settlements by hand. Eventually we should decrease it back to 0.1 when Atlas supports socketted placement.
Also, modified game startup script to use the new tech functions.

This was SVN commit r4139.
2006-07-18 04:23:35 +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
1828443b02 # Fixed a unit rank upgrade bug.
Units were not able to gain more than 1 rank, even when they started at
Basic.

Also XML values for new bar rendering (changed the meaning of height to
not include the border).

This was SVN commit r4137.
2006-07-17 22:20:12 +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
624cbebeb1 This was SVN commit r4135. 2006-07-17 20:00:41 +00:00
46c7c3745c This was SVN commit r4134. 2006-07-17 20:00:31 +00:00
bca4320512 This was SVN commit r4133. 2006-07-17 19:49:04 +00:00
ac72176851 This was SVN commit r4132. 2006-07-17 19:43:45 +00:00
5636a40e34 This was SVN commit r4131. 2006-07-17 19:40:36 +00:00
ef03e7aee8 #New stone mine
This was SVN commit r4130.
2006-07-17 19:40:23 +00:00
8fdfb383aa This was SVN commit r4129. 2006-07-17 19:21:38 +00:00
dd895c95e3 Fixed a bug with resource updates, and made script profiling code be commented out by default in case it interferes with people (it shouldn't have taken too much time, but who knows).
This was SVN commit r4128.
2006-07-17 02:38:43 +00:00
9b98a19506 # Faster GUI resource counter updates.
These seemed to be eating up 100 MS per frame! I've made the GUI
remember old resource values and only refresh counters when they change,
but this is still really bad performance, because in a real game we'll
have resource values changing every second. We need to find a much
better way to lay out those resource counter elements.

This was SVN commit r4127.
2006-07-17 02:27:55 +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
80813383c5 Some optimizations to entityInit and entityInitQuasi, as well as bug fixes (GUI code assuming traits.promotion!=null and trying to convert null/undefined to title case).
This was SVN commit r4124.
2006-07-17 00:58:37 +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
491a9910e3 Data changes for new entity bar rendering code. (All the bar info is now in one attribute, rather than having separate info for health bars, stamina bars and ranks).
This was SVN commit r4121.
2006-07-16 19:33:33 +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
a833ef0770 Optimized entityInitQuasi to reduce number of CJSComplex property accesses, and fixed a bug in performGather.
This was SVN commit r4119.
2006-07-15 21:17:02 +00:00
8edaf70b1a # Roman Helmets, retextured and actorized
This was SVN commit r4118.
2006-07-15 03:59:59 +00:00
6af0cba958 This was SVN commit r4117. 2006-07-14 22:28:56 +00:00
3608c1da4a #Roman Hastatus Basic, Advanced, and Elite textures completed. Also fixed the rome_isw_e entity with the correct parental properties.
This was SVN commit r4116.
2006-07-14 22:28:17 +00:00
3914fa16ed This was SVN commit r4115. 2006-07-14 22:26:29 +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
08f363bb45 This was SVN commit r4108. 2006-07-13 22:10:23 +00:00
e202373983 #New curved Roman Scutum shield. Looks awesome!
This was SVN commit r4107.
2006-07-13 21:51:57 +00:00