Dennis Schridde
26c42e1698
Tiny note about endian_xxword -> SDL_SwapXXXX
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1633 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 22:37:13 +00:00
Giel van Schijndel
d3374c5d99
* Update MSVC project file
...
Patch by vs2k5
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1631 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 20:31:01 +00:00
Giel van Schijndel
48f37b22d9
* Fix wrong interpretation of number of games (only the first byte of the 32bit long unsigned integer was used)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1630 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:52:29 +00:00
Giel van Schijndel
0a590a79af
* Use network byte-order (big-endian) for size of game list as response to "list" command
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1629 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:19:22 +00:00
Giel van Schijndel
7b025ea3e1
* Make our lobby protocol code endian safe (response of a "list" command now always is preceded by a 32bit long, unsigned, little endian integer)
...
* Remove parameter `BOOL async` of NETfindGame since it wasn't used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1628 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 17:31:12 +00:00
Giel van Schijndel
1697d6a9e8
* Update POTFILES.in to deal with removal of netaudio_stub.c (r1625)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1627 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 13:28:28 +00:00
Giel van Schijndel
70c07901ae
* Remove unused spectator functions: NETspectate and NETisSpectator
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1626 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:36:46 +00:00
Giel van Schijndel
a2d13bc53c
* remove lib/netplay/netaudio_stub.c (only had empty functions)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1625 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:33:44 +00:00
Giel van Schijndel
1689bd9dc9
* Remove unused function NEThashFile
...
(This function was only used to generate a hash from the compiled Warzone executable, this hash was then used as a security value across the network. This method won't work when using different compilers, OSes, etc.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 10:57:08 +00:00
Dennis Schridde
10128153aa
- Comment,s comments, comments
...
- Move wzFPSmanager over to main.c, so the delay can be dealt with directly in the mainloop instead of the detour through frameUpdate
- Adding the functions directly to main.c is probably not the wisest idea, but may be fixed later
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1623 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 23:41:29 +00:00
Dennis Schridde
f5439cfa16
- More cleanup
...
- Split the mainloop into several (run) subfunctions
- start/stop functions for (de)initialization. This replaces the !Restart part
- removed necessity of several variables
- This is the last step before the event based mainloop
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1622 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 21:47:06 +00:00
Dennis Schridde
50ea035570
More cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1621 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 20:39:57 +00:00
Dennis Schridde
1b66305fd3
Revert r1619, because it broke campaign
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1620 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 17:58:10 +00:00
Dennis Schridde
22a7dd9dce
Event based mainloop. WARNING: Is not yet fully finished and may have some flaws. Comments are appreciated.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1619 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 17:52:31 +00:00
Dennis Schridde
03e7785ada
Remove unused function.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1618 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 16:10:20 +00:00
Dennis Schridde
956ec975da
Type safety.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 16:04:27 +00:00
Dennis Schridde
7c7911c92f
- Fix gameloop exit, broken in r1615
...
- Split input event handling
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1616 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 15:54:35 +00:00
Dennis Schridde
165ed5ccda
Cleanup, no change in behaviour.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1615 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 14:13:40 +00:00
Giel van Schijndel
dd03ace476
* replace macros WORLD_COORD and MAP_COORD with inlines world_coord and map_coord respectively (compiler checked, so adds type safety)
...
* Add some debug messages for the cases where map_Height receives negative SDWORDs passed as if they are UDWORDs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1614 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 13:38:07 +00:00
Giel van Schijndel
d9a360b693
* use WORLD_COORD instead of "<< TILE_SHIFT"
...
* fix coding style (i.e. replaced four spaces for one '\t')
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1613 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 13:19:01 +00:00
Dennis Schridde
006657de3e
Found another delay...
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1612 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 12:33:29 +00:00
Roman C
bd6d26e6c1
- put back checks for off-map build coordinates
...
- removed asserts for off-map coords which were making the game completely unplayable (crashes wz after 3 mins of play in mp)
NOTE: if someone will decide to remove the checks please fix the problems caused by the removal to make sure the game is still playable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1611 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 12:32:12 +00:00
Dennis Schridde
ad57a3e0f4
Tiny translation update
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1610 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 09:25:01 +00:00
Dennis Schridde
981d56f328
active.state is a bitflag, so this should work even on Windows and still ignore the annoying focus switch on mouse-over.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1609 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 08:20:33 +00:00
Dennis Schridde
f8bd53fc62
Per folder filters for MSVC project. Patch by vs2k5.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1608 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 08:07:12 +00:00
Dennis Schridde
a07d282350
Ignore SDL_APPMOUSEFOCUS on Linux, since it mostly happens accidentialy, while on Windows this is the only possibility to gain focus
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1607 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-10 17:55:05 +00:00
Roman C
2eebd4f424
- prevent AI scripts from building a truck for human players at startup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1606 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-10 13:28:59 +00:00
Giel van Schijndel
2e3b51d45a
* We now also respond properly to loss of focus on Windows
...
* When receiving an SDL_ACTIVEEVENT also check for SDL_APPMOUSEFOCUS, but don't loose focus because of it, only gain focus when receiving this
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1605 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-10 10:24:56 +00:00
Giel van Schijndel
bc9cc26f3d
* Call SDL_Delay(1) when out of focus (to explicitly yield our CPU time to prevent hogging the CPU)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1604 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-10 09:34:17 +00:00
Giel van Schijndel
b8a986228b
* Warzone seems to hang when loosing focus (gets stuck into an infinite loop somewhere) on Windows
...
* Fix this by ignoring focus loss on Windows
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1603 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-10 08:21:42 +00:00
Dennis Schridde
f347fa4fa8
Config option: debugmode (aka --cheat)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1602 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-09 05:31:51 +00:00
Dennis Schridde
0cfa9f6467
- Some more housekeeping.
...
- Warzone reacts on loss of focus again!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1601 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 20:24:34 +00:00
Ari Johnson
1ab3eccc21
Updates to Xcode project and associated README.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1600 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 20:02:52 +00:00
Ari Johnson
ad582834c2
Added a hack to permit compilation on Mac OS X despite NSIG not being
...
defined in <sys/signal.h> for _POSIX_C_SOURCE or _ANSI_SOURCE.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1599 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 20:02:18 +00:00
Dennis Schridde
80e69b6c02
Removed nasty "goto init", which was never used anyway. (reInit was always FALSE.)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1598 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 19:31:44 +00:00
Dennis Schridde
a46b8492e8
"Video_mode no longer valid", thus removed.
...
Turned gamemode #defines into an enum.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1597 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 19:27:45 +00:00
Dennis Schridde
a8d55255c2
Clarify the cheat mode message.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1596 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-07 18:58:26 +00:00
Per Inge Mathisen
b7e9c15c93
Some residual cleanup, including fixing an erronous static
...
assignment in the sound code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1595 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 20:20:45 +00:00
Giel van Schijndel
58f873acf4
* Check source pointer for a value of NULL rather than another pointer (in the save droid) which we don't use (should cause no difference in execution due to the above memcpy call)
...
Thanks to Hylke/The_Noid for reporting this.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1594 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 18:06:51 +00:00
Dennis Schridde
52349eb6cc
Another try to workaround systems which usualy disable their POSIX extensions. AC_USE_SYSTEM_EXTENSIONS might have worked as well, but is not present before AC 2.61.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1593 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 17:51:04 +00:00
Dennis Schridde
d6add14f37
Workaround broken MacOSX POSIX headers
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1592 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 16:53:53 +00:00
Dennis Schridde
7ee7276d89
Hacky fix for wrong POSIX checks. Now all non-Windows systems are treated as POSIX systems and required to support the Single UNIX specs Version 2.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1591 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 16:26:09 +00:00
Roman C
90008ff9a6
- fix a bug preventing skirmish AI from researching (only affects non-vtol research branch)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1590 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 13:46:24 +00:00
Roman C
600e947bab
- added two additional chat commands which can be recognized by AI
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1589 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 12:03:18 +00:00
Roman C
846669c8c1
Skirmish/multiplayer AI update:
...
- alternative VTOL technology branch: on larger maps AI will sometimes use VTOLs for attacking instead of land units
- AI will rebuild destroyed walls
- AI won't use all the trucks to build a single structure anymore
- faster structure upgrades
- more effective truck production when low on trucks
- faster cyborg production
- AI now builds cyborg mechanics
- AI is even faster on startup
- AI will use more cyborgs for for defending
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1588 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-05 16:01:34 +00:00
Roman C
3776835a01
- added additional multi-weapon templates for multiplayer/skirmish games
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1587 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-05 15:45:39 +00:00
Roman C
cd13ad64a8
- when trying to build on a certain location AI will now first consider location passed from scripts and only then it will check tiles nearby
...
- implemented pickStructLocationB() scripting function to find a suitable location with a desired number of blocked neighboring tiles nearby
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1586 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-05 15:38:04 +00:00
Roman C
8fb6fd5b3c
- increase number of allowed script instruction until the interpreter recognizes an infinite loop
...
- increase total number of scripts object variables to handle larger AI scripts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1585 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-05 15:28:21 +00:00
Roman C
9bd29a1511
-cyborg propulsion must be enabled on startup of multiplayer/smirmish games
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1584 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-04 16:43:15 +00:00
Dennis Schridde
362343969c
We dont depend on zlib...
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1583 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-02 16:13:20 +00:00