Commit Graph

304 Commits

Author SHA1 Message Date
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
f39f279132 Add AI script code to provide a cleaner API around the engine interface.
Handle AIProxy entirely through scripts.
Support structured clones of script values.
Improve performance.
Support multiple script contexts sharing a runtime.
Use a separate context per AI player.

This was SVN commit r8866.
2011-01-15 23:35:20 +00:00
1201956b93 Additional cleaning up of logging: removed LOG_CATEGORY macro definitions.
This was SVN commit r8792.
2010-12-05 08:50:33 +00:00
bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00
818ea52c3b Delete obsolete non-working i18n code
This was SVN commit r8527.
2010-11-03 17:52:07 +00:00
c0a7a36f7a Use JSFastNative API in more places, for improved compatibility with future SpiderMonkey versions.
Remove some unnecessary script-exposed functions, and move some more
into the Engine namespace.

This was SVN commit r8428.
2010-10-21 19:54:59 +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
0ebe3486b6 Add setTurnLength() function for hacky fixing of network lag.
This was SVN commit r7936.
2010-08-13 16:42:53 +00:00
6c7b82130c # Redesigned the camera control system.
Add shift+wheel (and Q/E, and ctrl+arrows, and ctrl+WASD) to rotate the
camera.
Restrict the rotation and zoom to narrow ranges. (Constraints can be
disabled in the dev overlay).
Smooth the movement and rotation.
Fix some stupid whitespace.
Fix some const correctness.

This was SVN commit r7930.
2010-08-13 13:26:29 +00:00
7eebe05485 fixes+improvements from work:
timer: cleanup, remove duplication
topology: fix incorrect param order
tsc: ensure MSRs are available before accessing
msr: add prefix to make clear that registers are nehalem-specific

This was SVN commit r7892.
2010-08-10 17:03:17 +00:00
b292a32505 Add JS memory usage to profiler.
Add dumpHeaps() console function for debugging JS memory usage.
Increase default JS heap size.
Make call-time profile table appear first when toggling.
Remove some unused script functions.

This was SVN commit r7842.
2010-08-02 19:23:58 +00:00
8286218cad Delete lots of obsolete unused script-interface code.
Delete unused code from various other places.

This was SVN commit r7839.
2010-08-01 20:56:34 +00:00
9674c3c0fe Remove ScriptingHost initialisation code (share with ScriptInterface instead).
Fix GUI scripts to avoid strict warnings.
Rejig GUI/SpiderMonkey interface to use less custom code, and to work
with JSOPTION_VAROBJFIX.
Add event name to GUI event handler function names (visible in the
profiler).

This was SVN commit r7769.
2010-07-19 23:01:58 +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
c5d204c7ff Enable latest JS language features.
Load GUI scripts as UTF-8.

This was SVN commit r7650.
2010-06-30 21:23:41 +00:00
dfb10c8209 # Various networking code cleanups.
Don't flush network queue after every message.
Desingletonify CGameAttributes to allow testing.
Make network server/client basically testable.
Add very basic tests for network server/client.
Fix FsmActionCtx memory leak.
Split CNetHost into a separate file.
Convert CNetHost, CNetSession to a more conventional coding style.
Delete CNetLogger, since it's a lot of complexity and is barely used and
is redundant with CLogger.
Other minor simplifications.

This was SVN commit r7623.
2010-06-07 22:19:05 +00:00
2c160e5bd8 Delete script scheduler, since it causes GC crashes and isn't used for anything important and could be implemented in pure JS instead.
This was SVN commit r7622.
2010-06-07 18:41:03 +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
a78e6dbe26 # Delete a lot of obsolete networking code.
Remove the -sim1 flag since it no longer works.

This was SVN commit r7554.
2010-05-20 17:58:37 +00:00
c684c211a2 # Basic experimental multiplayer integration with new simulation system.
Add new turn manager that should be more correct and potentially more
efficient.
Remove evil CNetServer/CNetClient multiple inheritance of CTurnManager.
Add multiplayer autostart.
Various minor cleanups.

This was SVN commit r7551.
2010-05-20 00:59:01 +00:00
1ebebc4338 Avoid -Wnon-virtual-dtor warnings
This was SVN commit r7416.
2010-03-31 08:36:46 +00:00
23a702c335 # OS X build fixes.
spidermonkey-tip script fix.
GCC 4.2 compatibility.
Remove redundant code in extern_libs.lua

This was SVN commit r7371.
2010-03-20 16:26:25 +00:00
e7e8b8dbc3 Fix spidermonkey-tip to build on Windows. Add precompiled binaries.
This was SVN commit r7365.
2010-03-19 20:28:22 +00:00
31febafb05 Compatibility with non-threadsafe SpiderMonkey
This was SVN commit r7364.
2010-03-19 19:54:00 +00:00
d1f53b9654 Allow GUI scripts to save some data across hotloads
This was SVN commit r7334.
2010-02-28 21:28:09 +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
00409b9583 # Support latest version of SpiderMonkey
Add --with-spidermonkey-tip option to Premake

This was SVN commit r7230.
2009-12-28 16:45:42 +00:00
0765207641 Fix ScriptingHost with threadsafe debug JS builds
This was SVN commit r7228.
2009-12-28 14:50:20 +00:00
f0d9806b3f # Restructured GUI implementation
CGUI now represents a single 'page'. CGUIManager maintains multiple
pages and switches between them.
Split the XML files into pregame, loading, session and messagebox pages.
Added hotloading of GUI pages.
Minor GUI cleanups.
(Merge from hg 81862d33780c)

This was SVN commit r7214.
2009-12-03 20:17:22 +00:00
2ef4e7353e self-test and x64 fixes:
- headerless: distinguish between allocation granularity and min size
(hopefully fixes test failure on x64)
- test_wdbg_sym: disable printf spew
- hpet: use workaround when x64 MOVD isn't available due to processor or
compiler
- JSConversions: VC2005 x64 apparently distinguishes ssize_t from long
int (as it does with size_t)

This was SVN commit r7179.
2009-11-07 12:26:40 +00:00
f432d9d18b fix dehydra warnings (some of which were dangerous pass-user-string-as-format-string vulnerabilities)
This was SVN commit r7177.
2009-11-07 09:32:19 +00:00
3334c83ce0 Fix build and tests on Linux
This was SVN commit r7174.
2009-11-06 18:35:32 +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
77d2c67ada misc. string fixes
convert remaining %s to %hs or %ls
use WPRINTF_ARGS on unicode printf functions
fix: __func__ can't be widened via preprocessor (-> revert to char*)
convert remaining external_[directory|file_string to string()
Util: don't mix fwprintf and fprintf
Formation: fix dangling pointer (storing result of c_str())

This was SVN commit r7164.
2009-11-04 15:29:28 +00:00
da3030cfe6 more unicode/string cleanup:
- swprintf -> swprintf_s
- use secure_crt's _wfopen_s instead of conversion+fopen
- centralize all MBS <-> WCS conversion in new wchar.cpp (requires
workspace rebuild)
- remove no longer needed os_path
- remove unnecessary fs::wpath / VfsPath constructor casts
- fixed buffer size parameters -> ARRAY_SIZE

This was SVN commit r7162.
2009-11-03 22:27:25 +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
6b619cfb38 remove obsolete NO_GUI that's just cluttering up the code
This was SVN commit r7086.
2009-08-08 10:04:43 +00:00
c93db6d057 Fix some GCC warnings
This was SVN commit r7067.
2009-08-02 19:52:31 +00:00
008d894dd7 Fix some GCC warnings
This was SVN commit r7048.
2009-07-28 16:59:19 +00:00
f5f1d47aed Fix some GCC -Wextra warnings
This was SVN commit r7043.
2009-07-27 18:32:59 +00:00
cd0554c6bc Fix Linux build warnings
This was SVN commit r7034.
2009-07-25 20:35:48 +00:00
af7f2a2300 Add includes of ScriptableComplex.inl to fix link errors in release config
This was SVN commit r6988.
2009-07-14 15:11:05 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
1e3cd00c72 Set svn:eol-style=native
This was SVN commit r6816.
2009-04-11 17:00:39 +00:00
548db2d06e Pyrogenesis.cpp: add svn_revision to log
ScriptGlue.cpp: add svn_revision to build information in main menu

Interact.cpp: fix: do not add anglebias when computed via atan2
NetMessage.cpp: fix typo

This was SVN commit r6713.
2009-02-28 16:42:46 +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
2624069993 replace most BIT macros with a Bit() template for better 64-bit safety
test_bits: add tests for all routines in bits.h
hpet: add safety check
unit.h, bits.h, DOMEvent.h: change T(~0) to ~T(0) (required when T is
64-bit)

This was SVN commit r6335.
2008-09-06 21:15:53 +00:00
09f97a3422 Some fixes for OS X:
- Find enet properly
- Type conversion of size_t's in JS

This was SVN commit r6324.
2008-08-11 04:18:10 +00:00