 |
|
Fromafar
|
|
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 on 16-09-2004 at 02:13
|
|
|  |
 |
|
kaan
|
|
Aarhus
Mar 2001 time: 05:31
|
|
I get 22 errors from the .NET files you made Fromafar.
its the std::MAX and std::MIN and std::_MAX and std::_MIN calls that is the problem.
|
|
|  |
 |
|
Fromafar
|
|
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 on 16-09-2004 at 02:14
|
|
|  |
 |
|
kaan
|
|
Aarhus
Mar 2001 time: 05:31
|
|
quote: 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.) |
vovan wrote this and i replaced with min and max instead and it worked just fine on .NET but i dont know if it will work anywhere else.
Maybe we should do as vovan suggest and define NOMINMAX in the right place and use the functional std::min and std::max
|
|
|  |
 |
|  |
 |
|
Fromafar
|
|
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 on 16-09-2004 at 02:15
|
|
|  |
 |
|
ctplinuxfan
|
|
- 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.
Attachment: 2004.08.07.incr.dsp.zip
This has been downloaded 4 time(s).
|
|
|  |
 |
|
Fromafar
|
|
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 on 16-09-2004 at 02:15
|
|
|  |
 |
|
Fromafar
|
|
Bug fix for a reported crash with Cradle.
gs\slic\stringhash.h
[Edit: file link removed. Included in the 2004.09.13 source collection.]
Last edited by Fromafar on 16-09-2004 at 02:16
|
|
|  |
 |
|
calvitix
|
|
Strasbourg (North-Est France)
Jun 2003 time: 05:31
|
|
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.h
Attachment: 2004.08.13.incr.armytext_cmd.zip
This has been downloaded 6 time(s).
|
|
|  |
 |
|
Fromafar
|
|
Bug fixes:
- 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.
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 on 16-09-2004 at 02:17
|
|
|  |
 |
|
calvitix
|
|
Strasbourg (North-Est France)
Jun 2003 time: 05:31
|
|
quote: 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. |
hi, sorry for the inconvenient, I use CbuilderX as IDE, and it automatically format the code with my preferences... I'll desactivate the option for next post.
|
|
|  |
 |
|
Fromafar
|
|
Bug fix: make sure that the human player will get the selected civilisation.
gs\utility\gameinit.cpp
Notes:Tested for most SP start possibilities. Not tested for MP. The code for an editor start has not been changed (still using player 1). I could not fully test it for the Alexander scenario, because it crashes (in a DPRINTF statement ) in InitSStateEvent upon game start. Could you have a look at that one, Martin? I suspect the crash is caused by the 2004.08.15 personality changes.
[Edit: file link removed. Included in the 2004.09.13 source collection.]
Last edited by Fromafar on 16-09-2004 at 02:18
|
|
|  |
 |
|
Fromafar
|
|
I am not sure I completely understand your last sentence.
I like the idea of backward compatibility - in the sense of being able to accept unchanged Mod and Scenario files. This will save us the hassle of having to update the scenarios, and will most likely result in a larger number of people that are willing to help with playtesting.
OTOH, I like the flexible format. However, it is not that flexible yet. You can not really leave out any strategy line from personalities.txt. You will not get an error when parsing the file, but the handling in the code makes it crash without any message. All statements in SStateEvent.cpp of the form
code: diplomat.GetPersonality()->GetSomeStrategyPtr()->DoSomething()
will crash, because GetSomeStrategyPtr() returns NULL when the SomeStrategy line is missing in personalities.txt.
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:31
|
|
quote: Originally posted by Fromafar
Not accepting the unchanged Mod files will result in the Mod maker being forced to make changes without any noticable effect, as long as he has no use for the new features. Something like having to insert a MAX_MATCH_LIST_CYCLES 6 line somewhere in the middle of some file , just to make it run. I think it is more likely that this will force Mod players into not using the playtest release. |
There is a difference between just making it run and making it use of all the benefits, without updating you have very high costs for trade routes (well so far I didn't look into it how the final solution should look like), you might miss a lot of strings like in GoodMod, and that forces players to not use the playtest build as well.
quote: Originally posted by Fromafar
I thought that the idea of not requiring the lines in the strategies.txt was a deliberate design by you. In this way you make it easier for Mod makers if they only need a few strategies. When a line is missing, I had expected the default strategy - if available in the file - or the original Activision hardcoded strategy to be used. Of course, this will make the executable larger, but I think it is worth it. Don't let my nitpicking confuse you . I think the new features will be useful. |
I was happy once I saw the new code much shorter then the old one, and I considered how to make the backward compatibility. The problem is if you have just have set half of the strategies and change the priorities, then these priorities doesn't match with the hard encoded ones. Maybe I could make it like this. If no DefaultStrategy is set then the game falls back to STRATEGY_DEFAULT, and if the other strategy structures are missing, nothing happens.
Another approach would be to make the game to use the original code if a struct is missing. But in this case I would only offer the defence and the nuclear startegies as blocks respective. And what should I do with the NuclearStrikeStrategy, currently this is the only struct you can leave out, if it is there you have the same behaviour like with (Discovery: Military || Discovery: Scientist) &&
Trustworthiness: Chaotic && Alignment: Evil. But if it is missing there is no nuclear launch startegies.
quote: Originally posted by Fromafar
Oh, and just to nitpick some more: what is the meaning of the # line at the top of the text files? |
It means the same like // line.
-Martin
|
|
|  |
 |
|
Fromafar
|
|
Bug fix: repaired the garbled text display from the previous post.
ui\netshell\ns_listbox.h
ui\netshell\ns_customlistbox.cpp
Updated the list box data handling to match the .NET compatibility changes.
[Edit: file link removed. Included in the 2004.09.13 source collection.]
Last edited by Fromafar on 16-09-2004 at 02:18
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:31
|
|
2004.08.28
Graphics part:
..\ctp2_data\default\pictures\CM2_*.tga
Update the age membership of the buildings and advances in the Great Libary.
..\ctp2_data\default\pictures\Classic.tga
..\ctp2_data\default\pictures\Future.tga
..\ctp2_data\default\pictures\Industri.tga
..\ctp2_data\default\pictures\Info.tga
..\ctp2_data\default\pictures\Renaiss.tga
Blank age backgrounds.
..\ctp2_data\default\pictures\RomanStyle.tga
..\ctp2_data\default\pictures\ArabianStyle.tga
..\ctp2_data\default\pictures\AsianStyle.tga
..\ctp2_data\default\pictures\AmericanStyle.tga
..\ctp2_data\default\pictures\CastleStyle.tga
..\ctp2_data\default\pictures\EgyptainStyle.tga
..\ctp2_data\default\pictures\PalaceStyle.tga
New city style icons for the scenario editor.
..\ctp2_data\default\gamedata\sprites\gc*.spr
From sprite 000-020: New sprites to complete the set of new modern sprites of CityMod2 to a set of 8 sprites per city style.
From sprite 097-187: Sprites by Harlan Thompson (American and Castle style and Industrial Age), PinkFriend (Palace style) and Martin Gühmann (Egyptain style and new Modern style).
From sprite 188-219: Sprites from CTP1 (Genetic style, Diamond style, Underwater style and space style)
Text file part:
..\ctp2_data\default\gamedata\Advance.txt
..\ctp2_data\default\gamedata\age.txt
..\ctp2_data\default\gamedata\agecitystyle.txt
..\ctp2_data\default\gamedata\citystyle.txt
..\ctp2_data\default\gamedata\civilisation.txt
..\ctp2_data\default\gamedata\uniticon.txt
..\ctp2_data\default\gamedata\script.slc
New city styles, ages and civilisation have been added to these files. Now there are 45 civs in the game. The following civs have been added:
Arabian
Austrian
Nubian
Byzantine
Celtic
Babylonian
Carthaginian
Swedish
Aztec
The following civs have been removed:
Korean
Nigerian
Welsh
Cuban
Nicaraguan
Irish
However the according strings are still in the civ_str.txts maybe with an interface update we can readd them.
Language text file part:
..\ctp2_data\XXXXXX\gamedata\GreatLibary.txt
..\ctp2_data\XXXXXX\gamedata\gl_str.txt
..\ctp2_data\XXXXXX\gamedata\civ_str.txt
..\ctp2_data\XXXXXX\gamedata\info_str.txt
..\ctp2_data\XXXXXX\gamedata\str_loc.txt
Where XXXXXX stands for English, French, German, Italian or Spanish. However there is no str_loc.txt in the English version, therefore this file is not included in the English folder, for French and Spanish version I have only the Great_Libary.txt and the info_str.txt the other files are missing and are also needed in modified form to run the game.
New age concept descriptions were added to the Great_Libary.txt, age concept, age and city style names were added to the gl_str.txt. New age entering messages were added to info_str.txt. New localized grammar was added to the German str_loc.txt, placeholders for localized grammar were added to the Italian version of that file.
In addition all the other localized text files except sceen.txt for English, German and Italian were added for later use. However French and Spanish files are missing.
Source files
..\ctp2_code\gs\newdb\*.stamp
Updated stamps for database record files.
..\ctp2_code\gs\newdb\citystyle.cdb
..\ctp2_code\gs\newdb\AgeCityStyleRecord.h
..\ctp2_code\gs\newdb\AgeCityStyleRecord.cpp
..\ctp2_code\gs\newdb\CityStyleRecord.h
..\ctp2_code\gs\newdb\CityStyleRecord.cpp
Updated file for new flags in the AgeCityStyleDB to expose city walls and force field tile set indices to the text files.
..\ctp2_code\gs\dbgen\MemberClass.cpp
..\ctp2_code\gs\newdb\RecourceRecord.cpp
..\ctp2_code\gs\newdb\TerrainRecord.cpp
Updated dbgen to allow flags of substructures to have default values. The record files are updated due to this change.
..\ctp2_code\gfx\spritesys\SpriteGroupList.h
..\ctp2_code\gfx\spritesys\SpriteList.h
Increased the sprite limit from 200 to 500 per sprite type.
..\ctp2_code\gfx\spritesys\UnitActor.cpp
Exposed city walls and force field graphics to the AgeCityStyleDB, fixed the sea city sprite bug concerning force fields, however city walls and force field graphics aren't positioned correctly on the screen, if for each graphic an idifidual correction factor is needed then this should be exposed to AgeCityStyeleDB as well, in form of x and y coordinates.
..\ctp2_code\ui\interface\greatlibary.cpp
Doubled the maximum entry size. To remove game entry assert in German version.
..\ctp2_code\ui\interface\scenarioeditor.cpp
Added icons and tooltips to the city style buttons on the city tab of the scenario editor.
..\ctp2_code\ui\interface\agesscreen.cpp
Start and end ages names are now taken from the gl_str.txt instead of the *.ldl files. This makes the game more flexible when ages are added or removed.
..\ctp2_code\ui\netshell\gameselectwindow.cpp
When a new multiplayer game is started, default values are now taken from the profile. These values are for world size, shape, world type wet/dry, warm/cold, ocean/land, island/continent, homo/deverse and goodcout. The end age is now set to the last age in the database instead to the age with the DB index 4.
Edit: Link removed, this is now part of the latest all pack.
-Martin
Last edited by Martin Gühmann on 28-12-2004 at 02:39
|
|
|  |
 |
|
Maquiladora
|
|
quote: The following civs have been removed: |
Did we have a poll on this?
|
|
|  |
 |
|
calvitix
|
|
Strasbourg (North-Est France)
Jun 2003 time: 05:31
|
|
ctp2_code\gs\gameobj\ArmyData.cpp
ctp2_code\gs\gameobj\ArmyData.h
Added a method to check if the army can transport troops (used for the escort transport)
ctp2_code\ai\ctpai.cpp
ctp2_code\ai\ctpai.h
Added a method to move out of the city the transports
Changed the frequence for road and tile improvement building (every turn instead of every 5 turns)
Changed the explore goal resolution (2 tiles instead of 5 tiles)
new explore goals are generated every turns (instead of when all the previous goals are accomplished)
ctp2_code\ai\goals\goal.cpp
Add a condition to IsSatisfied method : when army size for the goal is equal to k_max_army_size
ctp2_code\ai\strategy\goals\ctpgoal.cpp
ctp2_code\ai\strategy\goals\ctpgoal.h
Added an Ungroup condition that can be associated to goals (as it exists RallyFirst)
and Ungroup methods
Changed the task forces for goals (based on objectif's threat)
Added a Debug Log (activated with k_dbg_scheduler_all) to see the goal priority computing
(raw priority, plus value of each modifier)
Added an SUB_TASK_TYPE attribute (used for armytext display)
--updated : only one file is needed : Goal.cdb (other two are automatically generated)
ctp2_code\gs\newdb\Goal.cdb
ctp2_code\gs\newdb\GoalRecord.cpp
ctp2_code\gs\newdb\GoalRecord.h
Added Ungroup token to interpret the goal.txt file
ctp2_data\default\aidata\goals.txt
Added UngroupFirst token to several Goals (Explore, Defend, ...)
ctp2_data\default\aidata\strategies.txt
Changed ratio forces to promote group formations
Lower army garrison to avoid full cities
ctp2_code\ai\strategy\scheduler\plan.cpp
ctp2_code\ai\strategy\scheduler\plan.h
ctp2_code\ai\strategy\scheduler\scheduler.cpp
Changed the > and < operator (to change the Sort method see Sort_Matches)
Added a method that will determine if the plan can be reevaluated (ie the agent can be rollbacked
and eventually be used for another goal)
ctp2_code\ai\strategy\squads\squad_strength.cpp
Changed the > operator (used by Goal::IsSatisfied method)
the Original method only test attack or defense param.
New methode take the sum of all strength (attack, defense, ranged,...)
Attachment: 2004.08.30.incr.armymovement_beta1.zip
This has been downloaded 7 time(s).
Last edited by calvitix on 31-08-2004 at 23:29
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:31. Apolyton Time is 00:31. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|