From f8e113ce03a28268281a685a54276a4f9c1bddd8 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 7 Dec 2006 23:56:35 +0000 Subject: [PATCH] Pitch and roll control for maphacks git-svn-id: https://svn.eduke32.com/eduke32@390 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/engine.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index 6d198e114..5a08f9d90 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -7208,6 +7208,8 @@ long loadmaphack(char *filename) { "nomd2anim", 3 }, { "nomd3anim", 3 }, { "nomdanim", 3 }, + { "pitch", 4 }, + { "roll", 5 }, { NULL, -1 } }; @@ -7271,6 +7273,34 @@ long loadmaphack(char *filename) } spriteext[whichsprite].flags |= SPREXT_NOMDANIM; break; + case 4: // pitch + { + int pitch; + if (scriptfile_getnumber(script, &pitch)) break; + + if (whichsprite < 0) { + // no sprite directive preceeding + initprintf("Ignoring pitch directive because of absent/invalid sprite number on line %s:%d\n", + script->filename, scriptfile_getlinum(script,cmdtokptr)); + break; + } + spriteext[whichsprite].pitch = (short)pitch; + } + case 5: // roll + { + int roll; + if (scriptfile_getnumber(script, &roll)) break; + + if (whichsprite < 0) { + // no sprite directive preceeding + initprintf("Ignoring roll directive because of absent/invalid sprite number on line %s:%d\n", + script->filename, scriptfile_getlinum(script,cmdtokptr)); + break; + } + spriteext[whichsprite].roll = (short)roll; + } + break; + default: // unrecognised token break;