# HG changeset patch # User peter1138 # Date 1127422694 0 # Node ID b475b9d30a268a47bb4fc2fe89b5384893a0c588 # Parent e618726432a4545d1a31afe14910e15fc17d25f7 (svn r2971) - Newgrf: Support loading VarAction2 parameter for variables 0x60-0x7F. This parameter isn't used yet. diff -r e618726432a4 -r b475b9d30a26 newgrf.c --- a/newgrf.c Thu Sep 22 20:35:20 2005 +0000 +++ b/newgrf.c Thu Sep 22 20:58:14 2005 +0000 @@ -1268,6 +1268,9 @@ dg->var_scope = numloaded == 0x82 ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF; dg->variable = grf_load_byte(&buf); + /* Variables 0x60 - 0x7F include an extra parameter */ + if (IS_BYTE_INSIDE(dg->variable, 0x60, 0x80)) + dg->parameter = grf_load_byte(&buf); dg->shift_num = grf_load_byte(&buf); dg->and_mask = grf_load_byte(&buf); diff -r e618726432a4 -r b475b9d30a26 sprite.h --- a/sprite.h Thu Sep 22 20:35:20 2005 +0000 +++ b/sprite.h Thu Sep 22 20:58:14 2005 +0000 @@ -70,6 +70,7 @@ // Take this variable: VarSpriteGroupScope var_scope; byte variable; + byte parameter; ///< Used for variables between 0x60 and 0x7F inclusive. // Do this with it: byte shift_num;