Add Polymer support to rotatesprite, which hooks up highpal amongst other things.

git-svn-id: https://svn.eduke32.com/eduke32@1812 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2011-02-28 03:56:37 +00:00
parent 12748c894f
commit 423263330c
4 changed files with 26 additions and 18 deletions

View file

@ -289,7 +289,8 @@ void polymer_loadboard(void);
void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, int16_t daang, int32_t dahoriz, int16_t dacursectnum);
void polymer_drawmasks(void);
void polymer_editorpick(void);
void polymer_rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, char dapalnum, int32_t dastat, int32_t cx1, int32_t cy1, int32_t cx2, int32_t cy2);
void polymer_inb4rotatesprite(int16_t tilenum, char pal, int8_t shade);
void polymer_postrotatesprite(void);
void polymer_drawmaskwall(int32_t damaskwallcnt);
void polymer_drawsprite(int32_t snum);
void polymer_setanimatesprites(animatespritesptr animatesprites, int32_t x, int32_t y, int32_t a, int32_t smoothratio);

View file

@ -5149,9 +5149,6 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
//============================================================================= //POLYMOST BEGINS
#ifdef POLYMOST
if (rendmode >= 3 && qsetmode == 200) { polymost_dorotatesprite(sx,sy,z,a,picnum,dashade,dapalnum,dastat,cx1,cy1,cx2,cy2,uniqid); return; }
# ifdef POLYMER
if (rendmode == 4 && qsetmode == 200) { polymer_rotatesprite(sx,sy,z,a,picnum,dashade,dapalnum,dastat,cx1,cy1,cx2,cy2); return; }
#endif
#endif
//============================================================================= //POLYMOST ENDS

View file

@ -585,6 +585,8 @@ _prprograminfo prprograms[1 << PR_BIT_COUNT];
int32_t overridematerial;
int32_t globaloldoverridematerial;
int32_t rotatespritematerialbits;
// RENDER TARGETS
_prrt *prrts;
@ -1199,21 +1201,18 @@ void polymer_editorpick(void)
searchit = 0;
}
void polymer_rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade,
char dapalnum, int32_t dastat, int32_t cx1, int32_t cy1, int32_t cx2, int32_t cy2)
void polymer_inb4rotatesprite(int16_t tilenum, char pal, int8_t shade)
{
UNREFERENCED_PARAMETER(sx);
UNREFERENCED_PARAMETER(sy);
UNREFERENCED_PARAMETER(z);
UNREFERENCED_PARAMETER(a);
UNREFERENCED_PARAMETER(picnum);
UNREFERENCED_PARAMETER(dashade);
UNREFERENCED_PARAMETER(dapalnum);
UNREFERENCED_PARAMETER(dastat);
UNREFERENCED_PARAMETER(cx1);
UNREFERENCED_PARAMETER(cy1);
UNREFERENCED_PARAMETER(cx2);
UNREFERENCED_PARAMETER(cy2);
_prmaterial rotatespritematerial;
polymer_getbuildmaterial(&rotatespritematerial, tilenum, pal, shade, 4);
rotatespritematerialbits = polymer_bindmaterial(rotatespritematerial, NULL, 0);
}
void polymer_postrotatesprite(void)
{
polymer_unbindmaterial(rotatespritematerialbits);
}
void polymer_drawmaskwall(int32_t damaskwallcnt)

View file

@ -5454,6 +5454,12 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
bglDisable(GL_DEPTH_TEST);
bglDisable(GL_ALPHA_TEST);
bglEnable(GL_TEXTURE_2D);
# ifdef POLYMER
if (rendmode >= 4) {
polymer_inb4rotatesprite(picnum, dapalnum, dashade);
}
# endif
}
#endif
@ -5607,6 +5613,11 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
#ifdef USE_OPENGL
if (rendmode >= 3)
{
# ifdef POLYMER
if (rendmode >= 4) {
polymer_postrotatesprite();
}
# endif
bglMatrixMode(GL_PROJECTION); bglPopMatrix();
bglMatrixMode(GL_MODELVIEW); bglPopMatrix();
}