mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix up a couple of functions to adhere better to unwritten code formatting standards. Should be zero functional changes in terms of what the functions actually do.
git-svn-id: https://svn.eduke32.com/eduke32@3983 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a97c8c1bfd
commit
c34410b7ed
3 changed files with 47 additions and 57 deletions
|
@ -4268,15 +4268,12 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, i
|
|||
static void G_OROR_DupeSprites(void)
|
||||
{
|
||||
// dupe the sprites touching the portal to the other sector
|
||||
|
||||
if (ror_sprite != -1)
|
||||
{
|
||||
// viewing from bottom
|
||||
int32_t k;
|
||||
spritetype *sp = &sprite[ror_sprite];
|
||||
|
||||
// viewing from bottom
|
||||
if (drawing_ror == 1)
|
||||
{
|
||||
int32_t k;
|
||||
if ((unsigned) ror_sprite >= MAXSPRITES || drawing_ror != 1)
|
||||
return;
|
||||
|
||||
for (k = headspritesect[sp->sectnum]; k != -1; k = nextspritesect[k])
|
||||
{
|
||||
|
@ -4295,17 +4292,13 @@ static void G_OROR_DupeSprites(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
static void G_ReadGLFrame(void)
|
||||
{
|
||||
// Save OpenGL screenshot with Duke3D palette
|
||||
// NOTE: maybe need to move this to the engine...
|
||||
begindrawing();
|
||||
{
|
||||
palette_t *const frame = (palette_t *const)Bcalloc(xdim*ydim, 4);
|
||||
palette_t *const frame = (palette_t *const) Bcalloc(xdim * ydim, sizeof(palette_t));
|
||||
char *const pic = (char *) waloff[TILE_SAVESHOT];
|
||||
|
||||
int32_t x, y;
|
||||
|
@ -4315,10 +4308,12 @@ static void G_ReadGLFrame(void)
|
|||
if (!frame)
|
||||
{
|
||||
Bmemset(pic, 0, 320 * 200);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
begindrawing();
|
||||
bglReadPixels(0, 0, xdim, ydim, GL_RGBA, GL_UNSIGNED_BYTE, frame);
|
||||
enddrawing();
|
||||
|
||||
for (y = 0; y < 200; y++)
|
||||
{
|
||||
|
@ -4333,9 +4328,6 @@ static void G_ReadGLFrame(void)
|
|||
|
||||
Bfree(frame);
|
||||
}
|
||||
}
|
||||
enddrawing();
|
||||
}
|
||||
#endif
|
||||
|
||||
void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||
|
|
|
@ -105,15 +105,15 @@ void VM_ScriptInfo(void)
|
|||
|
||||
static void VM_KillIt(int32_t iActor, int32_t iPlayer)
|
||||
{
|
||||
if (iActor >= 0)
|
||||
{
|
||||
if ((unsigned) iActor >= MAXSPRITES)
|
||||
return;
|
||||
|
||||
// if player was set to squish, first stop that...
|
||||
if (iPlayer >= 0 && g_player[iPlayer].ps->actorsqu == iActor)
|
||||
g_player[iPlayer].ps->actorsqu = -1;
|
||||
|
||||
A_DeleteSprite(iActor);
|
||||
}
|
||||
}
|
||||
|
||||
// May recurse, e.g. through EVENT_XXX -> ... -> EVENT_KILLIT
|
||||
int32_t VM_OnEvent(int32_t iEventID, int32_t iActor, int32_t iPlayer, int32_t lDist, int32_t iReturn)
|
||||
|
|
|
@ -4230,9 +4230,7 @@ void P_UpdatePosWhenViewingCam(DukePlayer_t *p)
|
|||
{
|
||||
int32_t i = p->newowner;
|
||||
|
||||
p->pos.x = SX;
|
||||
p->pos.y = SY;
|
||||
p->pos.z = SZ;
|
||||
Bmemcpy(&p->pos.x, &sprite[i].x, sizeof(vec3_t));
|
||||
p->ang = SA;
|
||||
p->vel.x = p->vel.y = sprite[p->i].xvel = 0;
|
||||
p->look_ang = 0;
|
||||
|
|
Loading…
Reference in a new issue