Gcc Warnings
fixed a lot of gcc warnings while also extending the warnings flags
removed unused variables
fixed use of unitialized variables at a few places (e.g. graphic.cpp - j isn't initialized)
- Use MUI2 instead MUI
- Use only register 0 instead R0
- Use relative instruction jumps instead label jumps
- Do not allow start installer twice
- Do not allow uninstall Stratagus if some Stratagus games are installed (e.g. Wargus) (force with param /P in UninstallPrevious section)
- Check for installed games in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Stratagus\Games
Moved version information from src/include/stratagus.h to src/include/version.h
Added Lua function GetStratagusVersion() which return Stratagus Version (C Macro VERSION)
Added Lua function GetStratagusHomepage() which return Stratagus Homepage (C Macro HOMEPAGE)
Added VersionInfo to Windows Resource file for stratagus.exe
Fixed VersionInfo in Windows NSIS Installer
Added support for playlist music in menu too (before only supported in running game)
patch to compile and run stratagus using VC2008 - ID: 2895148
Issue 2. unit.h: undefine NOUSER for VC2008
Fixes compiler error under VC2008.
Changes the code to undefine macro NOUSER in unit.h before including windows.h, otherwise clipboard related functions and structures will be undefined. Also removes duplicated and confusing windows.h includes in util.cpp.
Issue 4. unit_draw.cpp: memset caused access violation
Fixes acess violation when loading Wargus scripts at startup with stratagus RELEASE build.
Function DecorationCclRegister() in unit_draw.cpp use memset to re-initialize C++ object, which breaks internal data structures of STL vector. However, this access violation will only occur when compiled with VC2008 RELEASE profile.
Using vector's clear() method to re-initialize DecoSprite, replacing memset,
Issue 5. minimap.cpp: fix minimap
Fixes minimap showing wrong terrain when playing a game in Wargus.
Two different semantic are used inconsistently to calculate minimap index in minimap.cpp, One is mx + my, the onther is mx + my * Map.Info.MapWidth. This inconsistency causes cause minimap to show wrong terrain.
Changes the code in minimap.cpp to use the first semantic consistently.
Issue 7. loadcamp.cpp: Cleaning Order
Fixes access violation on exiting the game or close the game window directly in DEBUG build.
Because stratagus.exe try to do a clean exit when compiled with DEBUG profile, which frees a bunch of allocated resources in loadcamp.cpp CleanModules(). But the order seems problematic, causing memory access violation when exits.
It seems that CleanUnitTypes() and CleanPlayers() must be called after CleanUnits(), since UnitType and Players structures are used when cleaning units.
Issue 8. mainloop.cpp: Parallel drawing
Fixes keyboard and mouse issue in a Wargus game: user can't issue any command with keyboard or mouse after the game is started.
Parallel drawing seems not working under Windows. When run stratagus under a dual-core processor, keyboard and mouse click event cannot be received by GameLogicLoop.
Changes the code in mainloop.cpp to use only 1 cpu under WIN32.
Allow setting the address when binding the sockets - ID: 1682872
On a box with several network interface it might be desirable to bind only on a specific address.
This patch add a new command line option (-I) to do that.
Configurable Fog of War color - ID: 1580841
Adds a configuration option,
SetFogOfWarColor(red,green,blue) and document it in
doc/scripts.
Applies to SVN code as of 2006-10-19.
- Link with library libosso, call osso_initialize
- Call every 50s osso_display_blanking_pause for keeping backlight alive
- Do not create WM icon, on Maemo is not supported