From 51db2d3f2cfddfb1c94de1085d130c817bcd953f Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Sun, 2 Apr 2006 01:52:44 +0000 Subject: Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9418 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/r_main.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'apps/plugins/doom/r_main.c') diff --git a/apps/plugins/doom/r_main.c b/apps/plugins/doom/r_main.c index f79097a969..5afb85b3ce 100644 --- a/apps/plugins/doom/r_main.c +++ b/apps/plugins/doom/r_main.c @@ -61,6 +61,8 @@ int centerx IBSS_ATTR; int centery IBSS_ATTR; fixed_t centerxfrac, centeryfrac; fixed_t projection; +// proff 11/06/98: Added for high-res +fixed_t projectiony; fixed_t viewx, viewy, viewz; angle_t viewangle; fixed_t viewcos, viewsin; @@ -333,10 +335,17 @@ void R_ExecuteSetViewSize (void) scaledviewwidth = SCREENWIDTH; viewheight = SCREENHEIGHT; } + // proff 09/24/98: Added for high-res + else if (setblocks == 10) + { + scaledviewwidth = SCREENWIDTH; + viewheight = SCREENHEIGHT-ST_SCALED_HEIGHT; + } else { - scaledviewwidth = setblocks*32; - viewheight = (setblocks*168/10)&~7; + // proff 08/17/98: Changed for high-res + scaledviewwidth = setblocks*SCREENWIDTH/10; + viewheight = (setblocks*(SCREENHEIGHT-ST_SCALED_HEIGHT)/10) & ~7; } viewwidth = scaledviewwidth; @@ -346,14 +355,19 @@ void R_ExecuteSetViewSize (void) centerxfrac = centerx<>= LIGHTSCALESHIFT)/DISTMAP; + int t, level = startmap - j*320/viewwidth/DISTMAP; if (level < 0) level = 0; @@ -410,12 +422,14 @@ void R_Init (void) // CPhipps - R_DrawColumn isn't constant anymore, so must // initialise in code colfunc = R_DrawColumn; // current column draw function - if (SCREENWIDTH<320) - I_Error("R_Init: Screenwidth(%d) < 320",SCREENWIDTH); +// if (SCREENWIDTH<320) +// I_Error("R_Init: Screenwidth(%d) < 320",SCREENWIDTH); #if 1 + printf("\nR_LoadTrigTables: "); R_LoadTrigTables(); #endif + printf("\nR_InitData: "); R_InitData(); R_SetViewSize(screenblocks); -- cgit v1.2.3