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_plane.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'apps/plugins/doom/r_plane.c') diff --git a/apps/plugins/doom/r_plane.c b/apps/plugins/doom/r_plane.c index 60d37f876b..1ea1dd9193 100644 --- a/apps/plugins/doom/r_plane.c +++ b/apps/plugins/doom/r_plane.c @@ -128,6 +128,7 @@ static void R_MapPlane(int y, int x1, int x2) unsigned index; #ifdef RANGECHECK + if (x2 < x1 || x1<0 || x2>=viewwidth || (unsigned)y>(unsigned)viewheight) I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y); #endif @@ -295,10 +296,13 @@ visplane_t *R_CheckPlane(visplane_t *pl, int start, int stop) for (x=intrl ; x <= intrh && pl->top[x] == 0xffff; x++) ; - if (x > intrh) { /* Can use existing plane; extend range */ - pl->minx = unionl; pl->maxx = unionh; + if (x > intrh) + { /* Can use existing plane; extend range */ + pl->minx = unionl; + pl->maxx = unionh; return pl; - } else /* Cannot use existing plane; create a new one */ + } + else /* Cannot use existing plane; create a new one */ return R_DupPlane(pl,start,stop); } @@ -323,8 +327,10 @@ static void R_MakeSpans(int x, int t1, int b1, int t2, int b2) static void R_DoDrawPlane(visplane_t *pl) { register int x; - if (pl->minx <= pl->maxx) { - if (pl->picnum == skyflatnum || pl->picnum & PL_SKYFLAT) { // sky flat + if (pl->minx <= pl->maxx) + { + if (pl->picnum == skyflatnum || pl->picnum & PL_SKYFLAT) + { // sky flat int texture; angle_t an, flip; @@ -390,7 +396,9 @@ static void R_DoDrawPlane(visplane_t *pl) ANGLETOSKYSHIFT); colfunc(); } - } else { // regular flat + } + else + { // regular flat int stop, light; -- cgit v1.2.3