mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
misc. cleanup:
- remove 'imageSize' global which was always yres*bytesperline and only used once - some clearbuf() -> Bmemset() because I find the latter easier to read - remove some clearbufs to 0 of some global arrays on init git-svn-id: https://svn.eduke32.com/eduke32@2023 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9fd471a56a
commit
701c69fecc
4 changed files with 6 additions and 13 deletions
|
@ -31,7 +31,7 @@ extern int32_t startwin_idle(void *);
|
|||
// video
|
||||
extern int32_t r_usenewaspect, newaspect_enable;
|
||||
extern uint32_t r_screenxy;
|
||||
extern int32_t xres, yres, bpp, fullscreen, bytesperline, imageSize;
|
||||
extern int32_t xres, yres, bpp, fullscreen, bytesperline;
|
||||
extern intptr_t frameplace;
|
||||
extern char offscreenrendering;
|
||||
|
||||
|
|
|
@ -7655,12 +7655,13 @@ int32_t initengine(void)
|
|||
searchit = 0; searchstat = -1;
|
||||
|
||||
for (i=0; i<MAXPALOOKUPS; i++) palookup[i] = NULL;
|
||||
|
||||
/*
|
||||
clearbuf(&waloff[0],(int32_t)MAXTILES,0L);
|
||||
|
||||
clearbuf(&show2dsector[0],(int32_t)((MAXSECTORS+3)>>5),0L);
|
||||
clearbuf(&show2dsprite[0],(int32_t)((MAXSPRITES+3)>>5),0L);
|
||||
clearbuf(&show2dwall[0],(int32_t)((MAXWALLS+3)>>5),0L);
|
||||
*/
|
||||
// automapping = 0;
|
||||
|
||||
totalclock = 0;
|
||||
|
@ -7971,7 +7972,7 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
|||
|
||||
while ((numbunches > 0) && (numhits > 0))
|
||||
{
|
||||
clearbuf(&tempbuf[0],(int32_t)((numbunches+3)>>2),0L);
|
||||
Bmemset(tempbuf, 0, numbunches);
|
||||
tempbuf[0] = 1;
|
||||
|
||||
closest = 0; //Almost works, but not quite :(
|
||||
|
@ -13242,8 +13243,7 @@ void clearallviews(int32_t dacol)
|
|||
#endif
|
||||
|
||||
begindrawing(); //{{{
|
||||
//clearbufbyte((void*)frameplace,imageSize,0L);
|
||||
Bmemset((void *)frameplace,dacol,imageSize);
|
||||
Bmemset((void *)frameplace,dacol,bytesperline*yres);
|
||||
enddrawing(); //}}}
|
||||
//nextpage();
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ char quitevent=0, appactive=1, novideo=0;
|
|||
|
||||
// video
|
||||
static SDL_Surface *sdl_surface;
|
||||
int32_t xres=-1, yres=-1, bpp=0, fullscreen=0, bytesperline, imageSize;
|
||||
int32_t xres=-1, yres=-1, bpp=0, fullscreen=0, bytesperline;
|
||||
intptr_t frameplace=0;
|
||||
int32_t lockcount=0;
|
||||
char modechange=1;
|
||||
|
@ -1266,7 +1266,6 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
bpp = c;
|
||||
fullscreen = fs;
|
||||
//bytesperline = sdl_surface->pitch;
|
||||
//imageSize = bytesperline*yres;
|
||||
numpages = c>8?2:1;
|
||||
frameplace = 0;
|
||||
lockcount = 0;
|
||||
|
@ -1320,7 +1319,6 @@ void begindrawing(void)
|
|||
if (offscreenrendering) return;
|
||||
frameplace = 0;
|
||||
bytesperline = 0;
|
||||
imageSize = 0;
|
||||
modechange = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -1337,7 +1335,6 @@ void begindrawing(void)
|
|||
if (sdl_surface->pitch != bytesperline || modechange)
|
||||
{
|
||||
bytesperline = sdl_surface->pitch;
|
||||
imageSize = bytesperline*yres;
|
||||
setvlinebpl(bytesperline);
|
||||
|
||||
j = 0;
|
||||
|
|
|
@ -111,7 +111,6 @@ int32_t yres=-1;
|
|||
int32_t fullscreen=0;
|
||||
int32_t bpp=0;
|
||||
int32_t bytesperline=0;
|
||||
int32_t imageSize=0;
|
||||
int32_t lockcount=0;
|
||||
int32_t glcolourdepth=32;
|
||||
int32_t vsync=0;
|
||||
|
@ -1935,7 +1934,6 @@ void begindrawing(void)
|
|||
if (offscreenrendering) return;
|
||||
frameplace = 0;
|
||||
bytesperline = 0;
|
||||
imageSize = 0;
|
||||
modechange = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -1960,7 +1958,6 @@ void begindrawing(void)
|
|||
bytesperline = xres|1;
|
||||
}
|
||||
|
||||
imageSize = bytesperline*yres;
|
||||
setvlinebpl(bytesperline);
|
||||
|
||||
{
|
||||
|
@ -3230,7 +3227,6 @@ static BOOL CreateAppWindow(int32_t modenum)
|
|||
|
||||
// bytesperline is set when framebuffer is locked
|
||||
//bytesperline = width;
|
||||
//imageSize = bytesperline*yres;
|
||||
|
||||
modechange = 1;
|
||||
OSD_ResizeDisplay(xres,yres);
|
||||
|
|
Loading…
Reference in a new issue