1
0
forked from 0ad/0ad
Commit Graph

86 Commits

Author SHA1 Message Date
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
a7484933e7 wchar.h -> utf8.h (see previous change)
This was SVN commit r7341.
2010-03-01 14:55:34 +00:00
4d891117c5 Refactor the NetMessageType system to work in unity builds and remove BLOCK_SIZE macro that caused conflicts and wasn't really used anyway.
This was SVN commit r7327.
2010-02-17 23:38:50 +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
ff15c522fe implement changes suggested by Philip:
- add self-test
- allow decoding UTF8 values beyond BMP (and replace them later)
- quietly replace invalid bytes

This was SVN commit r7187.
2009-11-09 20:53:48 +00:00
450da0aaf7 rename [w]string_to_[w]string UTF8
add safer/more portable/less dependent on locale implementation of
wchar_t <-> UTF8

This was SVN commit r7185.
2009-11-09 14:52:51 +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
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
e257bef5da Fix even more 64-bit warnings
This was SVN commit r7152.
2009-10-05 16:15:51 +00:00
6f9eaf769c Fix some more 64-bit warnings
This was SVN commit r7151.
2009-10-05 15:33:38 +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
4a4269824b Add more vararg error-checking annotation
This was SVN commit r7073.
2009-08-04 16:08:41 +00:00
ebac85ee81 # hopefully support non-admin accounts and unwritable directories by moving output folders to home/appdata
the old behavior (using directories under binaries/) can be kept by
passing -writableRoot on the command line.
the first game load will be slower than usual due to re-creation of
cached XMBs.

This was SVN commit r7065.
2009-08-02 11:07:42 +00:00
c8cfd8b40b # groundwork for separated data/cache etc. directories (XDG)
remove path.cpp (it was based on the premise that all data files lie
below binaries/data)

This was SVN commit r7063.
2009-08-01 19:37:38 +00:00
cdfb58a62f Fix some more GCC warnings
This was SVN commit r7045.
2009-07-28 09:27:56 +00:00
df36e937f0 Patch from #258: [FreeBSD compat] add some missing includes
This was SVN commit r7001.
2009-07-16 16:53:55 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
5bd6cc0f02 Fix some no-newline-at-end-of-file warnings
This was SVN commit r6819.
2009-04-13 17:45:43 +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
dax
40cfae7f81 NMT_REMOVE_MESSAGE network message added so that an entity can be removed during a multiplayer game (compilation error fix)
This was SVN commit r6543.
2008-12-21 19:56:50 +00:00
dax
fe645d8fc9 NMT_REMOVE_MESSAGE network message added so that an entity can be removed during a multiplayer game
This was SVN commit r6542.
2008-12-20 18:09:16 +00:00
aea2368300 fixes to stack trace code under x64 (from work):
- displaying symbol values requires stack pointer, not frame pointer
- update debug_IsPointerBogus
- skip-n-frames code changed to skip-all-frames-up-to-func (more
reliable in the face of inlining)

debug.cpp: cleanup

This was SVN commit r6410.
2008-09-27 10:05:11 +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
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
a3b7e8c08c needed unicode at work:
debug: reinstate wchar_t version of debug_printf
  file, waio: add hack to allow creating File_Posix with unicode path
wposix: no longer include some rarely-used stuff to avoid conflict with
3rd party libraries
precompiled: bring boost::bind into global namespace (present in TR1)

dir_watch: needed directory watching with unicode paths and larger
buffers at work, so I completely overhauled and documented this

timer: add ToSeconds

SocketBase: fix to ensure correct match despite ::bind's conflict with
boost::bind

This was SVN commit r6319.
2008-08-09 19:22:13 +00:00
98dd1a1bb4 Refactored "generic" order to just call it "contact action", and added support for intercepting targets if performing a contact action while moving.
This was SVN commit r6290.
2008-07-29 08:22:56 +00:00
0e8b7c5bc7 Removed some long commented out code.. no point keeping it there since it's in SVN.
This was SVN commit r6289.
2008-07-29 07:01:23 +00:00
75a9b2f357 Made stance-setting work with multiplayer.
This was SVN commit r6274.
2008-07-24 05:25:14 +00:00
5fcd1601a1 Fixed multi-line comment warning
This was SVN commit r6247.
2008-07-18 23:52:29 +00:00
0cbb38bfd9 Fixed 3+ player games. The problem was the FinalizeSlots method in GameAttributes, which confused player and slot IDs by deleting nonexistent slots/players from the array. Since this doesn't seem particularly useful (and is even undesirable for scenarios where some players *want* to be the last slot and to leave others empty), I commented it out rather than having the code incur the extra complexity of supporting renumberings.
This was SVN commit r6228.
2008-07-14 06:40:05 +00:00
9025056ffd Made rally point setting net-safe.
This was SVN commit r6225.
2008-07-13 17:37:45 +00:00
e4966f6f1b Added running support to GENERIC orders through a field that can be sent across the network (previous implementation used to be by setting properties on the entity itself).
This was SVN commit r6223.
2008-07-13 06:24:50 +00:00
f6ac13c15a Networking fixes - it now more or less works over ENet!
This was SVN commit r6216.
2008-07-12 19:08:38 +00:00
3c411dd174 large batch of Dehydra static code analysis fixes
(mostly passing arguments by const reference and checking LibError
return codes)

This was SVN commit r6214.
2008-07-12 10:45:11 +00:00
2109f4eb0e Merged in Dacian's network changes.
This was SVN commit r6187.
2008-07-03 06:29:22 +00:00
a3696c0b91 premake: detect processor architecture from script
lib/sysdep: clean up by moving OS and cpu-arch folders into "os" and
"arch" folders

This was SVN commit r6162.
2008-06-30 17:34:18 +00:00
d790210c11 Fixes for ENet compilation
This was SVN commit r6146.
2008-06-28 20:19:13 +00:00
6e893a2050 Some uint/size_t compile fixes
This was SVN commit r6114.
2008-06-26 07:25:50 +00:00
10237a66c7 GCC/Linux build fixes
This was SVN commit r6107.
2008-06-25 23:01:13 +00:00
8529e2b14f dacian's network files were not yet completely in SVN. added the remaining files, removed obsolete ones
This was SVN commit r6105.
2008-06-25 20:34:23 +00:00
b0a6d6dca8 committing the current status of dacian's new network code on matei's request
also includes sound support.

GameSetup: ensure all ScriptingInit are called; moved simulation
ScriptingInits and init/shutdown to SimulationScriptInit.cpp (reduces
#includes)

This was SVN commit r6028.
2008-06-16 18:19:35 +00:00
04127c7af3 fixes/improvements to lib code from work
- topology.cpp: modify interface due to thread-safety issue. caller is
now responsible for ensuring the first _Detect call isn't reentered;
everything else is safe.
- fix thread-safety issue in wnuma; use winit mechanism to ensure it's
ready before use
- VFS now takes a cacheSize parameter (required for being able to
disable read-only file caches for the image loader at work)
- allow dynarray that isn't actually holding memory
- debug_stl: VC9 fix (disable this code except on the exact STL version
on which it was tested)
- zlib, lib_api: changes to macro used to toggle between static and
dynamic linking
- add boost filesystem header in external_libraries
- amd64: cpu_ topology functions are now provided by x86_x64
- cpu: remove cpu_ClockFrequency (dangerous, may be tempting to use
during WHRT init which would cause a crash). use x86_x64_ClockFrequency
or os_cpu_ClockFrequency instead.
- werrno: cope with newer boost versions
- wmman: follow SUSv3 in rejecting zero-length mappings

This was SVN commit r5954.
2008-05-13 19:43:02 +00:00
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
7d82d87ce8 [requires workspace rebuild due to added directory]
replace ONCE with direct calls to ScriptingInit in simulation/network
code as well.
note: GameSetup is now responsible for calling ServerSession's init
instead of Server doing it

added simulation/scripting with a module that takes care of all
scripting init (reduces CCD)

This was SVN commit r5883.
2008-04-13 14:50:11 +00:00
af6694262a cleanup:
remove ONCE(ScriptingInit) constructs, replace with direct call from
GameSetup
revised GameSetup's InitScripting (organize into groups)
JSCollection: remove #define of two concrete collection types (made
typedef, moved to their respective entity.h and player.h)

This was SVN commit r5871.
2008-04-06 14:03:23 +00:00