very nice peice of work Fromafar, now i can begin to look at the multiplayerbugs
Announcement
Collapse
No announcement yet.
PROJECT: Altered source files
Collapse
X
-
MSVC .NET compatibility update part 3.
Removed some more non-standard language constructs.
ai\diplomacy\diplomat.cpp
ai\diplomacy\diplomattypes.h
gs\gameobj\terrainutil.cpp
gs\slic\sliccmd.cpp
gs\slic\slicengine.cpp
gs\slic\slicif.cpp
gs\utillity\mapfile.cpp
ui\aui_ctp2\c3_listbox.cpp
ui\aui_ctp2\ctp2_listbox.cpp
ui\aui_utils\vidplay.h
ui\interface\creditsscreen.cpp
ui\interface\trademanager.cpp
[Edit: file link removed. Included in the 2004.09.13 source collection.]Last edited by Fromafar; September 15, 2004, 17:13.
Comment
-
MSVC .NET compatibility update part 4.
Resolved ambiguous fabs, floor, and sqrt calls.
ai\citymanagement\governor.cpp
ai\strategy\agents\ctpagent.cpp
ai\strategy\goals\ctpgoal.cpp
gfx\tilesys\tiledraw.cpp
gs\gameobj\armydata.cpp
gs\slic\slicfunc.cpp
gs\world\wldgen.cpp
ui\aui_utils\textutils.cpp
Starting to get impatient, kaan?
Part 5 will address the ceil, MIN, and MAX problems. Maybe tomorrow.
[Edit: file link removed. Included in the 2004.09.13 source collection.]Last edited by Fromafar; September 15, 2004, 17:14.
Comment
-
13. Then, there was the deprecated std::_MAX macro. To take care of that, just replaced it with max whereever used. As well, the std::_MIN call was replaced with min. The affected files were: ui\aui_common\aui_control.cpp and ui\aui_ctp2\Original\radarmap.cpp. Note that min and max are windows-specific macros, however. It would be better to use std::min and std::max instead, but for those calls not to clash with the macros, one would need to #define NOMINMAX before #including. I was too lazy to search for that include, however, so I just used the macros. That got the problem count down to 45 errors and 17 warnings. (Note that I am not rebuilding the things that have already been built successfully, so the low warning count isn't really indicative of anything.)
Maybe we should do as vovan suggest and define NOMINMAX in the right place and use the functional std::min and std::max
Comment
-
MSVC .NET compatibility update part 5.
Resolved ambiguous ceil calls, and tried to standardise min and max calls.
ai\diplomacy\agreementmatrix.cpp
ctp\c3.h
ctp\ctp2_utils\c3cmdline.cpp
gfx\tilesys\maputils.cpp
gfx\tilesys\TileHighlight.cpp
gs\gameobj\ArmyData.cpp
gs\gameobj\CityData.cpp
gs\gameobj\Happy.cpp
gs\gameobj\UnitData.cpp
gs\world\Cell.cpp
gs\world\wldgen.cpp
robot\aibackdoor\dynarr.h
robot\pathing\unitastar.cpp
ui\aui_common\aui_control.cpp
ui\aui_common\aui_music.cpp
ui\aui_ctp2\radarmap.cpp
ui\aui_ctp2\thumbnailmap.cpp
Notes:
This is the final and most dangerous part of the update - and the most likely one not to work.
In ctp\c3.h, I have set the NOMINMAX define to suppress the macros, and have added template versions of std::min and std::max, which MSVC 6 did not have. MSVC .NET is supposed to have those, but I am unable to verify this, because I don't have a .NET compiler. If it does not work with MSVC .NET, try updating the _MSC_VER test value from 1300 to 1400.
[Edit: file link removed. Included in the 2004.09.13 source collection.]Last edited by Fromafar; September 15, 2004, 17:15.
Comment
-
dsp update 1
- added custom build targets for (.cdb|.l|.y) files
=> e.g. Release build does not need prior debug build - removed hardcoded directx .lib and include references
=> dxsdk switching via tools->options->directories possible, no more copy orgies - removed hardcoded dxmedia .lib and include references
=> dxmedia sdk switching via tools->options->directories possible, no more copy orgies - added nodefaultlib for libcmt/libcmtd.lib (probably worth for xp/2k)
Configuration note: If you haven't added the Direct Media SDK and DirectX SDK to your paths in tools->options->directories, do so now.
For libraries, make sure at top path are in that order:
DXMedia\lib
DXSDK\lib
... (any further system libs)
For headers, this order is a must, beginning from top:
DXMedia\classes\base
DXMedia\include
DXSDK\include
... (any further system headers)
Where- DXMedia is your Direct Media SDK installation path (e.g. C:\DXMedia)
- DXSDK is your DirectX SDK installation path (e.g. C:\DX90SDK).
Though for now, you still cannot use DirectShow Base Classes of DXSDK instead of the outdated onces of DXMedia SDK.Attached Files
Comment
- added custom build targets for (.cdb|.l|.y) files
-
DXMedia requirement removed
ok, finally last part of the edited .dsp files (includes changes of previous post).
ctp2_code/ctp/civctp.dsp
ctp2_code/mapgen/plasma1.dsp
ctp2_code/mapgen/fault.dsp
ctp2_code/mapgen/Crater.dsp
ctp2_code/mapgen/Plasma2.dsp
ctp2_code/mapgen/geometric.dsp
ctp2_code/gs/dbgen/dbgen.dsp
ctp2_code/gs/world/wldgen.cpp
ctp2_code/os/
ctp2_code/os/linux/
ctp2_code/os/win32/
ctp2_code/os/autoconf/
ctp2_code/os/common/
ctp2_code/os/include/
ctp2_code/os/include/ctp2_config.h
ctp2_code/os/include/config_win32.h
changes:
- added generation of lex.sc.c (forgot that for Win32 Release)
- finally dxmedia is not needed, if you use DirectX SDK >8.x like beginning of this post
- added ctp2_code/os for os specific/dependent code
- stub headers os/include/*.h (unused yet and pretty empty )
ctp2_code/ui/interface/NationalManagementDialog.cpp
ctp2_code/ui/aui_ctp2/ctp2_listbox.cpp
I merged back changes by Lui2 as described here
Thanks Fromafar for starting with CityData.cpp
PS: i did not alter civctp_j.dsp yet; need to install a unicode capable editor with dos line conversions or use a hex editor for that...
Comment
-
Activision patch reimplementation: always display the newest message.
User interface option: display the newest message at the top.
Code:
gs\database\profiledb.cpp
gs\database\profiledb.h
ui\aui_common\aui_listbox.cpp
ui\aui_common\aui_listbox.h
ui\interface\controlpanelwindow.cpp
Data:
<language>\gamedata\ldl_str.txt: placeholders added for the new option string.
[Edit: file link removed. Included in the 2004.09.13 source collection.]Last edited by Fromafar; September 15, 2004, 17:15.
Comment
-
'armytext' command enhancement
Add the target coords (X,Y) to the armytext (text with the army goal that is available on the screen when using the playtest command 'armytext'
ctp2_code\ai\strategy\goals\CTPGoals.cpp
ctp2_code\ai\strategy\goals\CTPGoals.hAttached Files
Comment
-
2004.08.15
..\ctp2_code\ai\diplomacy\sstateevent.cpp
..\ctp2_data\default\aidata\personalities.txt
..\ctp2_data\default\aidata\Goals.txt
..\ctp2_data\default\aidata\strategies.txt
..\ctp2_code\gs\newdb\PersonalityRecord.cpp
..\ctp2_code\gs\newdb\PersonalityRecord.h
..\ctp2_code\gs\newdb\PersonalityRecord.stamp
..\ctp2_code\gs\newdb\personality.cdb
Changes by Martin Gühmann:
Exposed the strategies used by the players to the personalities.txt.
Fixed advice strings for some personalities.
Added new strategy, so that when the AI hit the city limit conquest and founding of cities is stopped.
Added new AI goals so that the AI can also advertise, incite uprisings, poison cities, sue, sell indulgences and faith healing. In addition the settling goals are now executed more often so that the AI fills available land with cities quickly. And land destroed due to pollution is fixed now quicklier, this fix is taken from kaan's Fixmod.
Note all the old personalities.txt's are incompatible with this version of the PersonalitiesDB, but this PersonalitiesDB is much more flexible then the old one.
-MartinAttached FilesCiv2 military advisor: "No complaints, Sir!"
Comment
-
Bug fixes: [list=1][*]Prevent assigning the same civilisation twice at the start of the game.[*]Recycle the civilisation (index) when a civilisation gets killed. This may prevent a game crash that would occur when a new - revolting - civilisation is created and all civilisation indices had been used in the past.[/list=1]
gs\gameobj\civilisation.cpp
gs\gameobj\civilisationpool.cpp
gs\gameobj\civisationpool.h
Note: The solution for problem 1 is incomplete. When the human player selects an index (color) larger than 1, the human player civilisation may be the one that gets reassigned. Modifications in gameinit.cpp to prevent this are still under test, and will follow later.
OT: Request for calvitix
When changing files, please do not change the formatting in parts of the code where you have not made any functional changes. This just makes comparing/merging a published file with local changes under test take more time.
BTW, your personal preference - a compact horizontal brace-matching style for single statement blocks - is not really a standard style. So, the next person modifiying these parts will most likely convert it to K&R or vertical brace-matching style again. Just a waste of time, IMO.
[Edit: file link removed. Included in the 2004.09.13 source collection.]Last edited by Fromafar; September 15, 2004, 17:17.
Comment
-
Originally posted by Fromafar
OT: Request for calvitix
When changing files, please do not change the formatting in parts of the code where you have not made any functional changes. This just makes comparing/merging a published file with local changes under test take more time.
BTW, your personal preference - a compact horizontal brace-matching style for single statement blocks - is not really a standard style. So, the next person modifiying these parts will most likely convert it to K&R or vertical brace-matching style again. Just a waste of time, IMO.
Comment
Comment