mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
generally transplanted FA2sp image handling logic, but still WIP
TODO: Fix palette background issue. Fix voxel handling .
This commit is contained in:
parent
981059c2b4
commit
800cd951b6
17 changed files with 1058 additions and 1163 deletions
|
@ -3453,7 +3453,7 @@ void CMapData::UpdateBuildingInfo(const CString* lpUnitType)
|
|||
CIniFile& ini = GetIniFile();
|
||||
|
||||
if (!lpUnitType) {
|
||||
memset(buildinginfo, 0, 0x0F00 * sizeof(BUILDING_INFO));
|
||||
memset(buildinginfo, 0, buildingInfoCapacity * sizeof(BUILDING_INFO));
|
||||
|
||||
for (auto const& [seq, id] : rules.GetSection("BuildingTypes")) {
|
||||
auto const& type = id;
|
||||
|
@ -3464,7 +3464,7 @@ void CMapData::UpdateBuildingInfo(const CString* lpUnitType)
|
|||
|
||||
int n = Map->GetUnitTypeID(type);
|
||||
|
||||
if (n >= 0 && n < 0x0F00) {
|
||||
if (n >= 0 && n < buildingInfoCapacity) {
|
||||
buildinginfo[n].w = foundation.Width;
|
||||
buildinginfo[n].h = foundation.Height;
|
||||
|
||||
|
@ -3525,7 +3525,7 @@ void CMapData::UpdateBuildingInfo(const CString* lpUnitType)
|
|||
|
||||
int n = Map->GetUnitTypeID(type);
|
||||
|
||||
if (n >= 0 && n < 0x0F00) {
|
||||
if (n >= 0 && n < buildingInfoCapacity) {
|
||||
buildinginfo[n].w = foundation.Width;
|
||||
buildinginfo[n].h = foundation.Height;
|
||||
buildinginfo[n].bSnow = TRUE;
|
||||
|
@ -3560,7 +3560,7 @@ void CMapData::UpdateBuildingInfo(const CString* lpUnitType)
|
|||
|
||||
int n = Map->GetUnitTypeID(type);
|
||||
|
||||
if (n >= 0 && n < 0x0F00) {
|
||||
if (n >= 0 && n < buildingInfoCapacity) {
|
||||
buildinginfo[n].w = foundation.Width;
|
||||
buildinginfo[n].h = foundation.Height;
|
||||
CString lpPicFile = GetUnitPictureFilename(type, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue