You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When that level is loaded, it will print the following warnings to log:
INFO : SCENO001.INI:30: Invalid or occupied position for 'Soldier': '9' (-7x-16/9) after parsing Harkonnen,Soldier,256,9,64,Hunt!
INFO : SCENO001.INI:46: Invalid or occupied position for 'Soldier': '3261' (45x34/3261) after parsing Harkonnen,Soldier,256,3261,64,Hunt!
The first warning line here corresponds to line
ID038=Harkonnen,Soldier,256,9,64,Hunt
above.
Here pos equals 9, which seems to be a bit-packed XY coordinate, with X coordinate being the lower 6 bits, and Y coordinate being the rest of the upper bits, as parsed here:
So this unit has coordinates X: 9, Y: 0. However then there is this logicalOffsetX_ and logicalOffsetY_ that are subtracted from the XY coordinates. In this case this offset value is 16, resulting in final XY coordinates of X: -7, Y: -16, hence attempting to place the soldier out of the screen.
Not at all sure which part here would be the wrong computation.
Git pointed changes around this all the way back to 317a19d where this logic was last adjusted.
Based on that, I thought to try to change this code to
thinking that maybe logicalOffsetX_ and logicalOffsetY_ should apply only when logicalSizeX_ is being used, but that clearly did not work and caused many more units to fall off the screen, and caused much more issues.
MapScale is equal to 1 on first Ordos level, which results in this block being active:
Nothing catches my eye here to figure what could be wrong. In addition to those two units not being possible to be placed in the level, it does look like something is off there also in the units that do get placed in the level, as hinted by this one enemy trooper being placed right at the very left edge of the screen, which felt like a bit odd placement:
The text was updated successfully, but these errors were encountered:
it does look like something is off there also in the units that do get placed in the level, as hinted by this one enemy trooper being placed right at the very left edge of the screen, which felt like a bit odd placement:
Hmm no, it does seem that the trooper is right there at the edge of the screen in original Dune 2 also:
That makes me wonder maybe the original game asset files did have quirks like this. (did the original game use these .INI based description files?)
Ordos campaign mission 1 has the following .INI description:
When that level is loaded, it will print the following warnings to log:
The first warning line here corresponds to line
above.
Here
pos
equals9
, which seems to be a bit-packed XY coordinate, with X coordinate being the lower 6 bits, and Y coordinate being the rest of the upper bits, as parsed here:dunelegacy/include/INIMap/INIMap.h
Lines 87 to 92 in 568c317
So this unit has coordinates X: 9, Y: 0. However then there is this
logicalOffsetX_
andlogicalOffsetY_
that are subtracted from the XY coordinates. In this case this offset value is16
, resulting in final XY coordinates of X: -7, Y: -16, hence attempting to place the soldier out of the screen.Not at all sure which part here would be the wrong computation.
Git pointed changes around this all the way back to 317a19d where this logic was last adjusted.
Based on that, I thought to try to change this code to
thinking that maybe
logicalOffsetX_
andlogicalOffsetY_
should apply only whenlogicalSizeX_
is being used, but that clearly did not work and caused many more units to fall off the screen, and caused much more issues.MapScale
is equal to 1 on first Ordos level, which results in this block being active:dunelegacy/src/INIMap/INIMapEditorLoader.cpp
Lines 90 to 95 in 568c317
Nothing catches my eye here to figure what could be wrong. In addition to those two units not being possible to be placed in the level, it does look like something is off there also in the units that do get placed in the level, as hinted by this one enemy trooper being placed right at the very left edge of the screen, which felt like a bit odd placement:
The text was updated successfully, but these errors were encountered: