diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2006-04-02 01:52:44 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2006-04-02 01:52:44 +0000 |
commit | 51db2d3f2cfddfb1c94de1085d130c817bcd953f (patch) | |
tree | a8452577070b7febf0ec640d2a065cd7e2c89847 /apps/plugins/doom/r_plane.c | |
parent | e61b079c26e5eaa12f403da6964ac20282df248e (diff) | |
download | rockbox-51db2d3f2cfddfb1c94de1085d130c817bcd953f.tar.gz rockbox-51db2d3f2cfddfb1c94de1085d130c817bcd953f.zip |
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
Diffstat (limited to 'apps/plugins/doom/r_plane.c')
-rw-r--r-- | apps/plugins/doom/r_plane.c | 20 |
1 files changed, 14 insertions, 6 deletions
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) | |||
128 | unsigned index; | 128 | unsigned index; |
129 | 129 | ||
130 | #ifdef RANGECHECK | 130 | #ifdef RANGECHECK |
131 | |||
131 | if (x2 < x1 || x1<0 || x2>=viewwidth || (unsigned)y>(unsigned)viewheight) | 132 | if (x2 < x1 || x1<0 || x2>=viewwidth || (unsigned)y>(unsigned)viewheight) |
132 | I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y); | 133 | I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y); |
133 | #endif | 134 | #endif |
@@ -295,10 +296,13 @@ visplane_t *R_CheckPlane(visplane_t *pl, int start, int stop) | |||
295 | for (x=intrl ; x <= intrh && pl->top[x] == 0xffff; x++) | 296 | for (x=intrl ; x <= intrh && pl->top[x] == 0xffff; x++) |
296 | ; | 297 | ; |
297 | 298 | ||
298 | if (x > intrh) { /* Can use existing plane; extend range */ | 299 | if (x > intrh) |
299 | pl->minx = unionl; pl->maxx = unionh; | 300 | { /* Can use existing plane; extend range */ |
301 | pl->minx = unionl; | ||
302 | pl->maxx = unionh; | ||
300 | return pl; | 303 | return pl; |
301 | } else /* Cannot use existing plane; create a new one */ | 304 | } |
305 | else /* Cannot use existing plane; create a new one */ | ||
302 | return R_DupPlane(pl,start,stop); | 306 | return R_DupPlane(pl,start,stop); |
303 | } | 307 | } |
304 | 308 | ||
@@ -323,8 +327,10 @@ static void R_MakeSpans(int x, int t1, int b1, int t2, int b2) | |||
323 | static void R_DoDrawPlane(visplane_t *pl) | 327 | static void R_DoDrawPlane(visplane_t *pl) |
324 | { | 328 | { |
325 | register int x; | 329 | register int x; |
326 | if (pl->minx <= pl->maxx) { | 330 | if (pl->minx <= pl->maxx) |
327 | if (pl->picnum == skyflatnum || pl->picnum & PL_SKYFLAT) { // sky flat | 331 | { |
332 | if (pl->picnum == skyflatnum || pl->picnum & PL_SKYFLAT) | ||
333 | { // sky flat | ||
328 | int texture; | 334 | int texture; |
329 | angle_t an, flip; | 335 | angle_t an, flip; |
330 | 336 | ||
@@ -390,7 +396,9 @@ static void R_DoDrawPlane(visplane_t *pl) | |||
390 | ANGLETOSKYSHIFT); | 396 | ANGLETOSKYSHIFT); |
391 | colfunc(); | 397 | colfunc(); |
392 | } | 398 | } |
393 | } else { // regular flat | 399 | } |
400 | else | ||
401 | { // regular flat | ||
394 | 402 | ||
395 | int stop, light; | 403 | int stop, light; |
396 | 404 | ||