mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r12347) -Feature(ette): Increase house animation frame number from 32 to 128.
This commit is contained in:
parent
8f556828f0
commit
08f0179916
|
@ -646,6 +646,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
|
<li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
|
||||||
|
<li>m3 bit 5 : bit 6 of current animation frame (see m6)</li>
|
||||||
<li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
|
<li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
|
||||||
<li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
|
<li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
|
||||||
<li>m5 : see m3 bit 7</li>
|
<li>m5 : see m3 bit 7</li>
|
||||||
|
@ -653,8 +654,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>If <a href="#newhouses">newhouses</a> is activated
|
<li>If <a href="#newhouses">newhouses</a> is activated
|
||||||
<ul>
|
<ul>
|
||||||
<li>bits 7..3 : Current animation frame</li>
|
<li>bits 7..2 : Current animation frame (bits 5..0); bit 6 in m3</li>
|
||||||
<li>bit 2 : free</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Standard behaviour
|
<li>Standard behaviour
|
||||||
|
|
|
@ -170,10 +170,10 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">XXXX XXXX</td>
|
<td class="bits">XXXX XXXX</td>
|
||||||
<td class="bits">XXXX XXXX</td>
|
<td class="bits">XXXX XXXX</td>
|
||||||
<td class="bits">XXXX XXXX XXXX XXXX</td>
|
<td class="bits">XXXX XXXX XXXX XXXX</td>
|
||||||
<td class="bits">XX<span class="free">O</span><span class="option">~ ~~</span>XX</td>
|
<td class="bits">XXX<span class="option">~ ~~</span>XX</td>
|
||||||
<td class="bits">XXXX XXXX</td>
|
<td class="bits">XXXX XXXX</td>
|
||||||
<td class="bits">XXX<span class="abuse">X XXXX</span></td>
|
<td class="bits">XXX<span class="abuse">X XXXX</span></td>
|
||||||
<td class="bits"><span class="abuse">XXXX X</span>XXX</td>
|
<td class="bits"><span class="abuse">XXXX XX</span>XX</td>
|
||||||
<td class="bits">XXXX <span class="abuse">XXXX</span></td>
|
<td class="bits">XXXX <span class="abuse">XXXX</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -2431,6 +2431,15 @@ bool AfterLoadGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CheckSavegameVersion(91)) {
|
||||||
|
/* Increase HouseAnimationFrame from 5 to 7 bits */
|
||||||
|
for (TileIndex t = 0; t < map_size; t++) {
|
||||||
|
if (IsTileType(t, MP_HOUSE) && GetHouseType(t) >= NEW_HOUSE_OFFSET) {
|
||||||
|
SetHouseAnimationFrame(t, GB(_m[t].m6, 3, 5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return InitializeWindowsAndCaches();
|
return InitializeWindowsAndCaches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
|
|
||||||
extern const uint16 SAVEGAME_VERSION = 90;
|
extern const uint16 SAVEGAME_VERSION = 91;
|
||||||
uint16 _sl_version; ///< the major savegame version identifier
|
uint16 _sl_version; ///< the major savegame version identifier
|
||||||
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
|
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ static inline void SetLiftPosition(TileIndex t, byte pos)
|
||||||
static inline byte GetHouseAnimationFrame(TileIndex t)
|
static inline byte GetHouseAnimationFrame(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_HOUSE));
|
assert(IsTileType(t, MP_HOUSE));
|
||||||
return GB(_m[t].m6, 3, 5);
|
return GB(_m[t].m6, 2, 6) | (GB(_m[t].m3, 5, 1) << 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -157,7 +157,8 @@ static inline byte GetHouseAnimationFrame(TileIndex t)
|
||||||
static inline void SetHouseAnimationFrame(TileIndex t, byte frame)
|
static inline void SetHouseAnimationFrame(TileIndex t, byte frame)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_HOUSE));
|
assert(IsTileType(t, MP_HOUSE));
|
||||||
SB(_m[t].m6, 3, 5, frame);
|
SB(_m[t].m6, 2, 6, GB(frame, 0, 6));
|
||||||
|
SB(_m[t].m3, 5, 1, GB(frame, 6, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue