align all campaign features #4775
Comments
Forgon uploaded file patch file created with |
Forgon uploaded file |
Forgon uploaded file |
Forgon uploaded file AWK script that aligns features of all files named 'feat.bjo' inside the current working directory |
Berserk Cyborg commented Sub3-x is most likely the remains of a nonexistent mission and can be removed. It might have been an early version of 3-b judging by the placement of Project droids and walls. |
Forgon edited the issue description |
Forgon commented Replying to Warzone2100/old-trac-import#4775 (comment:1):
Thank you for investigating this. |
Forgon2100 <forgon2100@...> changed status from |
Forgon2100 <forgon2100@...> changed owner from `` to |
Forgon2100 <forgon2100@...> changed resolution from `` to |
Forgon2100 <forgon2100@...> committed [185] In Warzone2100/warzone2100@185b9be:
|
resolution_fixed
type_patch (an actual patch, not a request for one)
| by ForgonFeatures should be aligned, which means that their x and y coordinates are positioned at a corner or the center of a tile. Otherwise, warnings are printed (see './src/feature.cpp:208'). For example, starting campaign mission Alpha 1 lead to the following 5 warnings:
These features are now aligned, as are all other campaign features. This slightly changes the appearance of a few campaign maps (compare [raw-attachment:alpha1_feature_alignment_old.png] with [raw-attachment:alpha1_feature_alignment_new.png]).
The positions of campaign features are stored in binary files named "feat.bjo", of which the following were modified:
To correct feature positions in these files, I wrote an AWK script, which is attached.
The format of 'feat.bjo' files is documented in './src/game.cpp'. The bulk of its content is defined by the data structures OBJECT_SAVE_V19 or OBJECT_SAVE_V20 (see './src/game.cpp:224'). Their field "inFire" is of type "int32_t", but read as unsigned value in './tools/map/mapload.cpp:235' and './tools/map/mapload.cpp:369'. Should this be fixed?
I also noticed two other oddities, which may require further investigation:
Issue migrated from trac:4775 at 2022-04-16 13:05:24 -0700
The text was updated successfully, but these errors were encountered: