Merge branch 'save_ext' into signal_tunnels_bridges

This commit is contained in:
Jonathan G Rennison
2016-12-28 15:06:08 +00:00
137 changed files with 2728 additions and 2037 deletions

View File

@@ -118,35 +118,36 @@ enum StringControlCode {
* It uses a "stack" of bytes and reads from there.
*/
SCC_NEWGRF_FIRST,
SCC_NEWGRF_PRINT_DWORD_SIGNED = SCC_NEWGRF_FIRST, ///< Read 4 bytes from the stack
SCC_NEWGRF_PRINT_WORD_SIGNED, ///< Read 2 bytes from the stack as signed value
SCC_NEWGRF_PRINT_BYTE_SIGNED, ///< Read 1 byte from the stack as signed value
SCC_NEWGRF_PRINT_WORD_UNSIGNED, ///< Read 2 bytes from the stack as unsigned value
SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< Read 4 bytes from the stack as currency
SCC_NEWGRF_PRINT_WORD_STRING_ID, ///< Read 2 bytes from the stack as String ID
SCC_NEWGRF_PRINT_WORD_DATE_LONG, ///< Read 2 bytes from the stack as base 1920 date
SCC_NEWGRF_PRINT_WORD_DATE_SHORT, ///< Read 2 bytes from the stack as base 1920 date
SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed
SCC_NEWGRF_PRINT_WORD_VOLUME_LONG, ///< Read 2 bytes from the stack as long signed volume
SCC_NEWGRF_PRINT_WORD_WEIGHT_LONG, ///< Read 2 bytes from the stack as long unsigned weight
SCC_NEWGRF_PRINT_WORD_STATION_NAME, ///< Read 2 bytes from the stack as station name
SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< Read 8 bytes from the stack as currency
SCC_NEWGRF_PRINT_BYTE_HEX, ///< Read 1 byte from the stack and print it as hex
SCC_NEWGRF_PRINT_WORD_HEX, ///< Read 2 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_DWORD_HEX, ///< Read 4 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_QWORD_HEX, ///< Read 8 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_DWORD_DATE_LONG, ///< Read 4 bytes from the stack as base 0 date
SCC_NEWGRF_PRINT_DWORD_DATE_SHORT, ///< Read 4 bytes from the stack as base 0 date
SCC_NEWGRF_PRINT_WORD_POWER, ///< Read 2 bytes from the stack as unsigned power
SCC_NEWGRF_PRINT_WORD_VOLUME_SHORT, ///< Read 2 bytes from the stack as short signed volume
SCC_NEWGRF_PRINT_WORD_WEIGHT_SHORT, ///< Read 2 bytes from the stack as short unsigned weight
SCC_NEWGRF_PRINT_WORD_CARGO_LONG, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PRINT_WORD_CARGO_SHORT, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PRINT_WORD_CARGO_TINY, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PUSH_WORD, ///< Pushes 2 bytes onto the stack
SCC_NEWGRF_UNPRINT, ///< "Unprints" the given number of bytes from the string
SCC_NEWGRF_DISCARD_WORD, ///< Discard the next two bytes
SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< Rotate the top 4 words of the stack (W4 W1 W2 W3)
SCC_NEWGRF_PRINT_DWORD_SIGNED = SCC_NEWGRF_FIRST, ///< 7B: Read 4 bytes from the stack
SCC_NEWGRF_PRINT_WORD_SIGNED, ///< 7C: Read 2 bytes from the stack as signed value
SCC_NEWGRF_PRINT_BYTE_SIGNED, ///< 7D: Read 1 byte from the stack as signed value
SCC_NEWGRF_PRINT_WORD_UNSIGNED, ///< 7E: Read 2 bytes from the stack as unsigned value
SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< 8F: Read 4 bytes from the stack as currency
SCC_NEWGRF_PRINT_WORD_STRING_ID, ///< 81: Read 2 bytes from the stack as String ID
SCC_NEWGRF_PRINT_WORD_DATE_LONG, ///< 82: Read 2 bytes from the stack as base 1920 date
SCC_NEWGRF_PRINT_WORD_DATE_SHORT, ///< 83: Read 2 bytes from the stack as base 1920 date
SCC_NEWGRF_PRINT_WORD_SPEED, ///< 84: Read 2 bytes from the stack as signed speed
SCC_NEWGRF_PRINT_WORD_VOLUME_LONG, ///< 87: Read 2 bytes from the stack as long signed volume
SCC_NEWGRF_PRINT_WORD_WEIGHT_LONG, ///< 9A 0D: Read 2 bytes from the stack as long unsigned weight
SCC_NEWGRF_PRINT_WORD_STATION_NAME, ///< 9A 0C: Read 2 bytes from the stack as station name
SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< 9A 01: Read 8 bytes from the stack as currency
SCC_NEWGRF_PRINT_BYTE_HEX, ///< 9A 06: Read 1 byte from the stack and print it as hex
SCC_NEWGRF_PRINT_WORD_HEX, ///< 9A 07: Read 2 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_DWORD_HEX, ///< 9A 08: Read 4 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_QWORD_HEX, ///< 9A 0B: Read 8 bytes from the stack and print it as hex
SCC_NEWGRF_PRINT_DWORD_DATE_LONG, ///< 9A 16: Read 4 bytes from the stack as base 0 date
SCC_NEWGRF_PRINT_DWORD_DATE_SHORT, ///< 9A 17: Read 4 bytes from the stack as base 0 date
SCC_NEWGRF_PRINT_WORD_POWER, ///< 9A 18: Read 2 bytes from the stack as unsigned power
SCC_NEWGRF_PRINT_WORD_VOLUME_SHORT, ///< 9A 19: Read 2 bytes from the stack as short signed volume
SCC_NEWGRF_PRINT_WORD_WEIGHT_SHORT, ///< 9A 1A: Read 2 bytes from the stack as short unsigned weight
SCC_NEWGRF_PRINT_WORD_CARGO_LONG, ///< 9A 1B: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PRINT_WORD_CARGO_SHORT, ///< 9A 1C: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PRINT_WORD_CARGO_TINY, ///< 9A 1D: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
SCC_NEWGRF_PRINT_WORD_CARGO_NAME, ///< 9A 1E: Read 2 bytes from the stack as cargo name
SCC_NEWGRF_PUSH_WORD, ///< 9A 03: Pushes 2 bytes onto the stack
SCC_NEWGRF_UNPRINT, ///< 9A 04: "Unprints" the given number of bytes from the string
SCC_NEWGRF_DISCARD_WORD, ///< 85: Discard the next two bytes
SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< 86: Rotate the top 4 words of the stack (W4 W1 W2 W3)
SCC_NEWGRF_LAST = SCC_NEWGRF_ROTATE_TOP_4_WORDS,
SCC_NEWGRF_STRINL, ///< Inline another string at the current position, StringID is encoded in the string

View File

@@ -331,7 +331,7 @@ static const uint ELRAIL_ELEVATION = 10;
/** Wires that a draw one level higher than the north corner. */
static const uint ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT;
static const SortableSpriteStruct CatenarySpriteData[] = {
static const SortableSpriteStruct RailCatenarySpriteData[] = {
/* X direction
* Flat tiles:
* Wires */
@@ -392,14 +392,14 @@ static const SortableSpriteStruct CatenarySpriteData[] = {
{ WSO_EW_E, 15, 8, 3, 3, 1, ELRAIL_ELEVATION } //!33: LOWER trackbit wire, pylon on both ends
};
static const SortableSpriteStruct CatenarySpriteData_Depot[] = {
static const SortableSpriteStruct RailCatenarySpriteData_Depot[] = {
{ WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE depot exit
{ WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE depot exit
{ WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW depot exit
{ WSO_ENTRANCE_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW depot exit
};
static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = {
static const SortableSpriteStruct RailCatenarySpriteData_Tunnel[] = {
{ WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE tunnel exit
{ WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE tunnel exit
{ WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW tunnel exit
@@ -419,7 +419,7 @@ static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = {
* <li>Position of the Pylon relative to the track</li>
* <li>Position of the Pylon inside the tile</li></ol>
*/
enum CatenarySprite {
enum RailCatenarySprite {
WIRE_X_FLAT_SW,
WIRE_X_FLAT_NE,
WIRE_X_FLAT_BOTH,
@@ -471,7 +471,7 @@ enum CatenarySprite {
* c) the second
* d) both
* PCP exists.*/
static const CatenarySprite Wires[5][TRACK_END][4] = {
static const RailCatenarySprite Wires[5][TRACK_END][4] = {
{ // Tileh == 0
{INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH},
{INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH},