From cba053bbcf78ccdd853ceb3aa7897b1ad8e53b12 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 11 Feb 2013 17:16:54 +0000 Subject: [PATCH] CON myosx*: move masking orientation with user-bits-mask to G_DrawTileGeneric(). git-svn-id: https://svn.eduke32.com/eduke32@3479 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 10 +++++++--- polymer/eduke32/source/game.h | 2 ++ polymer/eduke32/source/gameexec.c | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 63daa0f38..bf829a427 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -695,18 +695,21 @@ int32_t A_CheckInventorySprite(spritetype *s) } } -static void G_DrawTileGeneric(int32_t x, int32_t y, int32_t zoom, int32_t tilenum, +// MYOS* CON commands. NOTE: external linkage for Lunatic. +void G_DrawTileGeneric(int32_t x, int32_t y, int32_t zoom, int32_t tilenum, int32_t shade, int32_t orientation, int32_t p) { int32_t a = 0; + orientation &= (ROTATESPRITE_MAX-1); + if (orientation&4) a = 1024; - rotatesprite_win((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16), - zoom,a,tilenum,shade,p,2|orientation); + rotatesprite_win(x<<16, y<<16, zoom,a,tilenum,shade,p,2|orientation); } +#if !defined LUNATIC void G_DrawTile(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation) { DukePlayer_t *ps = g_player[screenpeek].ps; @@ -732,6 +735,7 @@ void G_DrawTilePalSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, in { G_DrawTileGeneric(x,y,32768, tilenum,shade,orientation, p); } +#endif #define POLYMOSTTRANS (1) #define POLYMOSTTRANS2 (1|32) diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index 18da54108..ce82462e3 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -297,10 +297,12 @@ void G_DrawFrags(void); void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, int32_t smoothratio); void G_DrawRooms(int32_t snum,int32_t smoothratio); void G_DrawTXDigiNumZ(int32_t starttile,int32_t x,int32_t y,int32_t n,int32_t s,int32_t pal,int32_t cs,int32_t x1,int32_t y1,int32_t x2,int32_t y2,int32_t z); +#if !defined LUNATIC void G_DrawTile(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation); void G_DrawTilePal(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation,int32_t p); void G_DrawTilePalSmall(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation,int32_t p); void G_DrawTileSmall(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation); +#endif void G_FadePalette(int32_t r,int32_t g,int32_t b,int32_t e); void G_GameExit(const char *t) ATTRIBUTE((noreturn)); void G_GameQuit(void); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index b50dc2159..6a419bd90 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2057,8 +2057,6 @@ nullquote: int32_t x=Gv_GetVarX(*insptr++), y=Gv_GetVarX(*insptr++), tilenum=Gv_GetVarX(*insptr++); int32_t shade=Gv_GetVarX(*insptr++), orientation=Gv_GetVarX(*insptr++); - orientation &= (ROTATESPRITE_MAX-1); - switch (tw) { case CON_MYOS: