From 2dc6f66dcadf9df69bcc7820100f9e4b4362e7a3 Mon Sep 17 00:00:00 2001 From: hnt_ts Date: Sat, 2 Aug 2008 13:00:41 +0000 Subject: [PATCH] Added a DEF command: animtilerange . Note: it must be used with dummytiles. git-svn-id: https://svn.eduke32.com/eduke32@928 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/defs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/polymer/build/src/defs.c b/polymer/build/src/defs.c index 2a08147f7..a3fdf4bd7 100644 --- a/polymer/build/src/defs.c +++ b/polymer/build/src/defs.c @@ -70,6 +70,7 @@ enum T_LOADGRP, T_DUMMYTILE,T_DUMMYTILERANGE, T_SETUPTILE,T_SETUPTILERANGE, + T_ANIMTILERANGE, T_CACHESIZE, T_MUSIC,T_ID,T_SOUND, T_REDPAL,T_BLUEPAL,T_BROWNPAL,T_GREYPAL,T_GREENPAL,T_SPECPAL @@ -123,6 +124,7 @@ static tokenlist basetokens[] = { "dummytilerange", T_DUMMYTILERANGE }, { "setuptile", T_SETUPTILE }, { "setuptilerange", T_SETUPTILERANGE }, + { "animtilerange", T_ANIMTILERANGE }, { "cachesize", T_CACHESIZE }, }; @@ -565,6 +567,26 @@ static int defsparser(scriptfile *script) } break; } + case T_ANIMTILERANGE: + { + int tile1, tile2, spd, type, i; + + if (scriptfile_getsymbol(script,&tile1)) break; + if (tile1 >= MAXTILES)break; + if (scriptfile_getsymbol(script,&tile2)) break; + if (tile2 >= MAXTILES)break; + if (scriptfile_getsymbol(script,&spd)) break; + if (scriptfile_getsymbol(script,&type)) break; + if (tile2 < tile1) + { + initprintf("Warning: backwards tile range on line %s:%d\n", script->filename, scriptfile_getlinum(script,cmdtokptr)); + i = tile2; + tile2 = tile1; + tile1 = i; + } + picanm[tile1]=(spd<<24)+(type<<6)+tile2-tile1; + break; + } case T_DUMMYTILE: { int tile, xsiz, ysiz, j;