Commit Graph

304 Commits

Author SHA1 Message Date
4b6a19cdfb better error reporter, use consistent exceptions if init fails, add notes which functions are currently unused
This was SVN commit r2515.
2005-07-22 18:41:49 +00:00
533eb66ea7 add dox
This was SVN commit r2513.
2005-07-22 03:56:11 +00:00
f715e6c226 ScriptableComplex.h: ScriptingHost already includes SpiderMonkey.h
scriptglue: additional refactoring
scriptinghost: remove useless GC function
SpiderMonkey.h: more dox

This was SVN commit r2497.
2005-07-20 04:53:58 +00:00
67777bd159 cursor: remove old Win32 implementation
main: add new variable for clarity

scriptglue: massive refactor. added docs, rearranged into groups,
eliminate forward decls, consistent param checking, some progress on
consistent naming and formatting.

This was SVN commit r2492.
2005-07-20 00:57:17 +00:00
2ea40a23a3 VS2005 compatibility fixes and warning adjustments:
Updated DLLs.
Added DirectX headers/libraries, since they're not in the platform SDK.
Fixed invalid STL iterator usage.
Disabled STL in stack trace, since it breaks.
Added comments for some reported warnings.
Corrected some apparent off-by-one errors.
Defined strlen_s to strnlen.
Probably broke pre-beta2 versions of VC2005.

This was SVN commit r2454.
2005-07-02 21:42:55 +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
f3951fbfae all JS-dependent code now includes scripting/SpiderMonkey.h instead of <js*.h> directly - see rationale in that header.
singleton: removed unnecessary headers

This was SVN commit r2425.
2005-06-22 02:23:46 +00:00
b657a1cbca Added CStr and some other things to precompiled.h, to reduce build times.
Altered CStr/UniDoubler's macros, to avoid polluting/conflicting/etc.
Fixed headers in non-PCH builds.
Used the _d version of vorbisfile*.lib in Debug builds.

This was SVN commit r2366.
2005-06-01 20:12:45 +00:00
0331883a86 Temporary fix for mouse input. Improved performance in player-colour model renderer. Also improved performance in lighting, at least in unoptimised builds.
This was SVN commit r2328.
2005-05-20 17:09:47 +00:00
d0f7cb015c - Linux/GCC (as usual :P)
- Ported lockless code to gcc inline assembly
- A few new net messages (gather, attack, add waypoint)
- Support for new messages in network->entity order converter
- Implemented rudimentary JS interface for Interaction
- issueCommand JS API, connected to the network
- Removed Interaction stuff now replaced by JS
- And something in there should probably break VS builds :P

This was SVN commit r2316.
2005-05-18 05:32:09 +00:00
fd4eb91e93 debug_out -> debug_printf; MICROLOG moved to ps/Pyrogenesis.h
This was SVN commit r2285.
2005-05-11 18:56:30 +00:00
MarkT
86dc351205 Projectile code and updates to some actors that can use it (celt_ijv and hele_iar)
This was SVN commit r2266.
2005-05-10 07:13:25 +00:00
5037da70d0 Fixed memory leak, I think.
This was SVN commit r2261.
2005-05-09 04:52:55 +00:00
MarkT
c8cd52578a Put the extra animation event in the struct def, also adding Jan's VFS script wrapper.
This was SVN commit r2218.
2005-05-03 04:27:07 +00:00
MarkT
db168702df Jason's animation events. Also reworked entity-types system.
This was SVN commit r2209.
2005-05-01 19:09:13 +00:00
MarkT
899cf87b41 This was SVN commit r2159. 2005-04-22 19:14:50 +00:00
MarkT
bcabe3aa53 Script integration work - valueOf() is no longer required most of the time; also property-change watches and enumeration over entities (but not yet other native objects), rudimentary beginnings of a global events system, and adjusted the status orb to update only on changes.
This was SVN commit r2157.
2005-04-22 07:12:55 +00:00
MarkT
2120576bc7 Gathering and unit training (engine-side); also other minor improvements
This was SVN commit r2132.
2005-04-15 04:23:33 +00:00
0eb78450c0 Maybe fixed GUI event-handler function things. Other minor changes and fixes.
This was SVN commit r2096.
2005-03-30 22:33:10 +00:00
MarkT
bb7a22f32a First draft of a GPG3-style profiler (including tracing into scripts, after a fashion)
This was SVN commit r2090.
2005-03-30 16:14:19 +00:00
22dd4dd67b Entities: Removed Tag attribute; it is taken from the filename instead. Made entity XML files be loaded on demand. Probably stopped crash when maps contain non-existent entities. Fixed a few bugs in entity definitions.
Maps: Stored non-entity objects in XML instead of PMP, for easier manual
editing. Updated existing maps to newest format, so that they can still
work. Added undocumented _rewriteMaps() JS function. Also renamed _mem
to vmem, and reclassified its undocumentedness as unintentional, since
it's reasonably useful.
Loader: added NonprogressiveLoad function, for ScEd/_rewriteMaps/etc
which don't care about progressiveness.
main.cpp: re-enabled vfs_display, since it doesn't crash now
Vector3D: stopped warning

This was SVN commit r2078.
2005-03-29 20:50:04 +00:00
MarkT
3c99f0f2eb Minor JavaScript updates
This was SVN commit r2073.
2005-03-28 22:13:47 +00:00
79da4bf050 On-demand loading of actors (sort of)
This was SVN commit r2017.
2005-03-19 11:55:27 +00:00
7bcc12373b - Created JSMap
- Changed player colour JS interface: setColour(...) instead of a colour
property
- Introduced a network log and replaced most network LOG() calls with
NET_LOG()
- Moved to a slot-based system for Pre-Game and extended a lot of the JS
APIs to networking stuff
- A bit of cleanup in the low-level network code (Unix parts)
- Clients now keep track of all other connected clients on the server
(And exposes this info to JS)
- Split out GameAttributes to its own file
- Removed unused class AttributeMap
- Changed CJSObject to use T* pointers in JS_SetPrivate (needed to make
ToScript work with multiple inheritance)

This was SVN commit r1929.
2005-02-21 17:13:31 +00:00
880634b598 Small changes to ScEd, to remove some hacky bits and to make it not crash with player-colours
This was SVN commit r1899.
2005-02-04 23:16:42 +00:00
aca9ce6c3c MiniMap GCC and crash bug fix as well as some miscellany
This was SVN commit r1896.
2005-02-02 17:03:37 +00:00
bcf89936c1 Fixed a few memory leaks as well as the CPlayer/SColour crash-on-exit bug
This was SVN commit r1756.
2005-01-23 01:36:47 +00:00
ae38aee3d2 Revamped CNetClient/CNetServer JS Interface and new CGameAttributes
implementation (moving towards a merger of CGameAttribs into CGame).

This was SVN commit r1746.
2005-01-19 22:32:25 +00:00
MarkT
1b961ec163 This was SVN commit r1737. 2005-01-18 10:52:22 +00:00
MarkT
25fdbfd931 Fixes for two pathfinding bugs (neither of which were actually pathfinding bugs), added player objects (details in TM)
This was SVN commit r1733.
2005-01-18 00:46:18 +00:00
2077698156 New JavaScript interface for the network client, plus some linux/gcc/misc fixes
This was SVN commit r1730.
2005-01-17 04:52:02 +00:00
551bef482a Prevented crash when loading non-existent maps
This was SVN commit r1721.
2005-01-15 17:20:51 +00:00
75c714b8df Made ScEd compile more pleasantly
This was SVN commit r1700.
2005-01-10 22:13:18 +00:00
f7e82dbc16 add ps/Errors.h and/or lib/types.h headers (shouldn't rely on precompiled.h to pull those in).
also prepended ps/ to make location clear.

This was SVN commit r1652.
2005-01-07 00:47:44 +00:00
cff12c4127 Extremely important whitespace fix
This was SVN commit r1623.
2005-01-03 20:34:38 +00:00
28c7a682b8 Fixed annoying crash when SpiderMonkey's GC ran.
Minor tooltip updates.

This was SVN commit r1542.
2004-12-21 18:41:58 +00:00
659a9ea57a Initial (incomplete) tooltip code
This was SVN commit r1540.
2004-12-21 13:37:24 +00:00
46f5c61179 Linux/GCC/glibc Compat
This was SVN commit r1532.
2004-12-18 23:30:28 +00:00
MarkT
da4c42ef58 Fix for misinterpretation of data types in XML
This was SVN commit r1512.
2004-12-16 09:41:41 +00:00
32854fc162 JS scripts are now loaded via VFS, as per "JS optimization" email from stu.
This was SVN commit r1502.
2004-12-15 14:23:27 +00:00
bc0c59b084 as per "JS Optimisation?" email from stu, updated to use VFS.
This was SVN commit r1500.
2004-12-14 17:58:37 +00:00
6d7d049d89 Attempted to minimise dependencies between header files (to make compilation minorly faster)
This was SVN commit r1490.
2004-12-12 19:43:55 +00:00
8d20cfefdb remove cout << "initialized"
This was SVN commit r1463.
2004-12-07 01:08:56 +00:00
4d83cba7e6 add required precompiled header include
This was SVN commit r1431.
2004-12-01 06:52:39 +00:00
MarkT
f930bf1df4 Added semi-intelligent text parser for XMLs - so that numeric properties on entities are no longer stored as strings instead.
This was SVN commit r1409.
2004-11-27 20:02:51 +00:00
30ad195c0b Linux/GCC Compat
This was SVN commit r1393.
2004-11-23 23:56:10 +00:00
cda100e72d fix warning: cast -1 to uint
This was SVN commit r1353.
2004-11-18 20:56:45 +00:00
df2e7f1b08 fix warning: add typecast to JSVAL_NULL
This was SVN commit r1352.
2004-11-18 20:56:13 +00:00
MarkT
d30e10042f Minor changes to sound-script interface.
This was SVN commit r1332.
2004-11-15 22:30:01 +00:00
MarkT
793794649f Combat code, some scripting, broken network, and fixed some bugs.
This was SVN commit r1301.
2004-11-11 07:09:32 +00:00
3136791492 Linux/GCC Compat(tm)
This was SVN commit r1284.
2004-11-07 21:30:47 +00:00
MarkT
d33d2e4450 Added some support for user profiles
This was SVN commit r1270.
2004-10-23 14:39:28 +00:00
6b084c3173 Fixes to comply with VC2005.
This was SVN commit r1229.
2004-10-07 22:03:12 +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
9c2fb5a466 stomped on vc2k5 warning (size_t -> uint)
This was SVN commit r1191.
2004-09-22 18:14:00 +00:00
df1b502bbd Linux Compat and some updated PARANOIA code
This was SVN commit r1189.
2004-09-22 15:20:58 +00:00
eb2989176e startGame() shouldn't crash and burn if the game's already been started
This was SVN commit r1181.
2004-09-21 16:10:46 +00:00
777f06143d - A lot of small network fixes
- Connecting client(s) to a server and giving orders to a shared set of
entities now works - Yeah!
- Removed thread sync from CNetServer

This was SVN commit r1180.
2004-09-21 14:40:43 +00:00
3a3a5b6c34 Added getFPS(), so the GUI can draw the FPS counter. Also added getLanguageID(), so it knows what language it's using
This was SVN commit r1122.
2004-09-05 11:28:59 +00:00
3ef7b1b67b Corrected JS_AddRoot usage (it wants a JSObject**/JSString**/jsval*/etc)
This was SVN commit r1116.
2004-09-04 14:43:23 +00:00
348505ee14 Added g_ScriptingHost.[GS]etObjectProperty_Double, as a randomly useful function
This was SVN commit r1110.
2004-09-03 14:10:48 +00:00
03ae01c44a Replaced all CStr16 with CStrW, because its name was too confusing
This was SVN commit r1109.
2004-09-03 14:08:12 +00:00
8a19257cd4 Fixed conversion of non-NULL-terminated strings
This was SVN commit r1096.
2004-09-01 19:49:23 +00:00
3b91514dbe buildTime() function, as a temporary version identifier for distributed builds
This was SVN commit r1084.
2004-08-30 11:20:59 +00:00
9fa5e3b57a Better Unicode support in the console
This was SVN commit r1038.
2004-08-24 11:07:50 +00:00
0e55379b36 Initial i18n integration
This was SVN commit r1029.
2004-08-21 11:45:01 +00:00
35baf71fe8 Define XP_* globally, for anything that uses SpiderMonkey directly
This was SVN commit r1025.
2004-08-20 14:02:53 +00:00
4d9c7684df w00t! first batch of actual network support!
This was SVN commit r1006.
2004-08-16 15:19:17 +00:00
9cd4cab693 A few log categories
This was SVN commit r994.
2004-08-15 20:57:31 +00:00
cc9ae228f9 _mem() JS function, for extremely basic VRAM usage information
This was SVN commit r987.
2004-08-14 11:21:29 +00:00
b2afef529c Introducing: The Pre-Game State. The game instance is not created on program load as before, but can be started by JS functions.
This was SVN commit r912.
2004-08-05 13:07:51 +00:00
MarkT
2b396ccb57 Minor improvements to some simulation code.
This was SVN commit r887.
2004-08-02 23:14:54 +00:00
09f47d6820 Core Classes Reorganization:
- g_Terrain and g_Camera totally eradicated as globals, is now m_Terrain
of CWorld and m_Camera of CGameView
- terrainMain.cpp is almost completely empty with functionality moved
into the relevant core classes
- Miscellaneous global functions moved into Core Classes (mostly
GameView)

This was SVN commit r865.
2004-07-31 15:57:18 +00:00
fe061f4f11 Added JS setCursor(name)
This was SVN commit r857.
2004-07-31 12:45:30 +00:00
a9c197f549 Linux/GCC Compat
This was SVN commit r821.
2004-07-27 20:59:03 +00:00
fe1bee706b Fixed loads of /W4 warnings, because it's easier than doing anything useful. Added some asserts to check potentially dangerous assumptions, implemented a few missing bits of code, adjusted some comments, etc.
This was SVN commit r814.
2004-07-24 14:04:40 +00:00
MarkT
befae8627d Changed hotkey handling for groups and bookmarks; small pathfinding fixes.
This was SVN commit r809.
2004-07-23 10:56:52 +00:00
MarkT
6d8b9e33ef Minor additions: Added hotkeys to GUI buttons, camera bookmarking (not sure if this system will stay), shoring up some JS error checking, moved a bunch of constants into the config file and added a new rotation mode.
This was SVN commit r804.
2004-07-22 16:18:12 +00:00
MarkT
194fdf9b4b Unit selection and ordering, setTimeout, scheduler, fixed timestep code, various fixes and reinforcement of the JS<->Native code.
This was SVN commit r783.
2004-07-20 19:30:35 +00:00
82575127d4 Now calls JS_ShutDown (yay, undocumented functions...) to fix a couple of memory leaks
This was SVN commit r774.
2004-07-18 18:42:45 +00:00
56e41b3003 Yet more fun with errors
This was SVN commit r771.
2004-07-18 11:51:15 +00:00
1e40ed1543 More attempted error handling
This was SVN commit r769.
2004-07-17 17:09:33 +00:00
8684287360 Linux fixes
This was SVN commit r763.
2004-07-15 19:59:27 +00:00
e01f4a540d New JS function: crash(). Generates an access violation.
This was SVN commit r762.
2004-07-15 19:31:09 +00:00
82de48832e MICROLOG function for high-speed logging of everything that happened just before a crash
This was SVN commit r761.
2004-07-15 19:29:56 +00:00
ec63db7967 Make XMB files store line numbers, so XML inline scripts can be debugged easily
This was SVN commit r723.
2004-07-12 15:50:12 +00:00
ca5b760310 Linux/GCC: Changed a whole bunch of wide character format strings... In VC++,
the wide printf functions default %s to be a wide string. GCC defaults
it to
a narrow string. Everything I could find uses %ls or %hs as appropriate
now.

This was SVN commit r715.
2004-07-11 22:30:08 +00:00
c1e55c3824 Linux/GCC Compat: new js headers require XP_UNIX defined
This was SVN commit r713.
2004-07-11 20:28:46 +00:00
cf9d8b9797 GUI/scripting updates
This was SVN commit r706.
2004-07-11 16:22:35 +00:00
4c1ef2df21 gcc warning fixes
This was SVN commit r701.
2004-07-11 12:37:52 +00:00
fcb85a5968 Added exit() JS function
This was SVN commit r673.
2004-07-09 12:44:12 +00:00
af9c336b43 JS GUI interface
This was SVN commit r666.
2004-07-08 15:23:47 +00:00
765477e1a8 no message
This was SVN commit r650.
2004-07-08 12:53:10 +00:00
c866494fdc Allow getGlobal() from JS code
This was SVN commit r645.
2004-07-07 18:27:25 +00:00
eb530b7d94 Use the correct JS lib for Debug/Release.
Errors are now also reported through debug_out to reduce the chance of
missing them.

This was SVN commit r640.
2004-07-07 10:52:45 +00:00
3109d4361a - Get/SetGlobal() added
- Made CreateCustomObject call the constructor (JS_NewObject =>
JS_ConstructObject)
- Made the JS error reporter work even before the console has been
constructed

This was SVN commit r620.
2004-07-04 15:35:04 +00:00
32b6627645 Miscellaneous gcc fixes
This was SVN commit r541.
2004-06-18 18:56:10 +00:00
48d94cd86a Altered to work with the Unicode console
This was SVN commit r522.
2004-06-16 15:43:34 +00:00
MarkT
e4fe4ed602 JS Interface to entities. It even partially works now.
This was SVN commit r469.
2004-06-10 22:24:03 +00:00
797f660ef0 take two.. the typedefs should match now - hopefully on both VC++ and GCC
This was SVN commit r466.
2004-06-09 22:47:02 +00:00
609d519d3d GCC/linux compat (required extern qualifier, int/JSInt32 conversion)
This was SVN commit r447.
2004-06-09 14:02:40 +00:00
c7a84e84be added precompiled.h everywhere
This was SVN commit r392.
2004-06-03 18:38:14 +00:00
1eaadd38aa ran everything though mark's newline stomper.
This was SVN commit r322.
2004-05-30 00:46:58 +00:00
Alan
8de401a3ee Adding scripting interface code
This was SVN commit r281.
2004-05-28 13:07:54 +00:00