Skip to content

Instantly share code, notes, and snippets.

@frosch123
Last active October 24, 2021 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frosch123/889b6478a6d5d7b10f89d9b014845331 to your computer and use it in GitHub Desktop.
Save frosch123/889b6478a6d5d7b10f89d9b014845331 to your computer and use it in GitHub Desktop.
Public stuff
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 32)
// Escapes: 2+ 2- 2< 2> 2u< 2u> 2/ 2% 2u/ 2u% 2* 2& 2| 2^ 2sto = 2s 2rst = 2r 2psto 2ror = 2rot 2cmp 2ucmp 2<< 2u>> 2>>
// Escapes: 71 70 7= 7! 7< 7> 7G 7g 7gG 7GG 7gg 7c 7C
// Escapes: D= = DR D+ = DF D- = DC Du* = DM D* = DnF Du<< = DnC D<< = DO D& D| Du/ D/ Du% D%
// Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags
0 * 4 \d19
1 * 54 14 "C" "INFO"
"B" "VRSN" \w4 \dx00000000
"B" "MINV" \w4 \dx00000000
"B" "NPAR" \w1 00
"B" "PALS" \w1 "A"
"B" "BLTR" \w1 "8"
00
00
2 * 52 08 08 "NML\37" "NML regression test" 00 "A test newgrf testing NML" 00
// param[127] = param[17]
3 * 9 0D 7F \D= 11 FE \dx0000FFFF
4 * 7 06
7F 04 FF \wx0014
FF
// Name: @return_action_0
5 * 34 02 00 FF 89
43 38 \dx0000000F
\2* 1A 20 \dx00000010
\2+ 1A 20 \dx00000000 // param[127]
\2+ 43 1C \dx0000000F
\b0
\wx8000 // Return computed value
// param[126] = param[17]
6 * 9 0D 7E \D= 11 FE \dx0000FFFF
7 * 7 06
7E 04 FF \wx0014
FF
// Name: @return_action_1
8 * 34 02 00 FE 89
43 3C \dx0000000F
\2* 1A 20 \dx00000010
\2+ 1A 20 \dx00000000 // param[126]
\2+ 43 18 \dx0000000F
\b0
\wx8000 // Return computed value
// Name: color_conditional
9 * 23 02 00 FE 89
C8 01 \dx00000001
\b1
\wx00FF \dx00000001 \dx00000001 // 1 .. 1: return (((var[0x43, 24, 15] * 16) + base_sprite_2cc) + var[0x43, 28, 15])
\wx00FE // default: return (((var[0x43, 28, 15] * 16) + base_sprite_2cc) + var[0x43, 24, 15])
// param[127] = param[17]
10 * 9 0D 7F \D= 11 FE \dx0000FFFF
11 * 7 06
7F 04 FF \wx0014
FF
// Name: @return_action_0
12 * 34 02 00 FF 89
43 3C \dx0000000F
\2* 1A 20 \dx00000010
\2+ 1A 20 \dx00000000 // param[127]
\2+ 43 18 \dx0000000F
\b0
\wx8000 // Return computed value
// Name: color_override
13 * 23 02 00 FF 8A
C6 00 \dx0000FFFF
\b1
\wx00FE \dx00000BB8 \dx00000BB8 // 3000 .. 3000: color_conditional;
\wx00FF // default: return (((var[0x43, 28, 15] * 16) + base_sprite_2cc) + var[0x43, 24, 15])
14 * 9 00 00 \b1 01 FF \wx0064
1E 40
15 * 6 01 00 \b1 FF \wx0000
// Name: @CB_FAILED_REAL00
16 * 9 02 00 FE \b1 \b1
\w0
\w0
// Name: @CB_FAILED00
17 * 23 02 00 FE 89
0C 00 \dx0000FFFF
\b1
\wx8000 \dx00000000 \dx00000000 // graphics callback -> return 0
\wx00FE // Non-graphics callback, return graphics result
// Name: @action3_0
18 * 23 02 00 FE 89
0C 00 \dx0000FFFF
\b1
\wx00FF \dx0000002D \dx0000002D // color_override;
\wx00FE // @CB_FAILED00;
19 * 9 03 00 01 FF \wx0064 \b0
\wx00FE // @action3_0;
grf {
grfid: "NML\37";
name: string(STR_REGRESSION_NAME);
desc: string(STR_REGRESSION_DESC);
version: 0;
min_compatible_version: 0;
}
switch (FEAT_TRAINS, SELF, color_conditional, vehicle_is_flipped) {
1: return base_sprite_2cc + 16 * company_colour1 + company_colour2;
return base_sprite_2cc + 16 * company_colour2 + company_colour1;
}
switch (FEAT_TRAINS, SELF, color_unconditonal, 0) {
return base_sprite_2cc + 16 * company_colour2 + company_colour1;
}
switch (FEAT_TRAINS, PARENT, color_override, vehicle_type_id) {
3000: return color_conditional;
return color_unconditonal;
}
item(FEAT_TRAINS, colored_train, 100) {
graphics {
colour_mapping: color_override;
}
}
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment