Skip to content

Commit

Permalink
POV tidying up.
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoparadox committed Dec 6, 2021
1 parent e8d3da4 commit 03a0f41
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 2 additions & 3 deletions Makefile.win16
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ DEFINES_WIN16 := \
$(DEFINES_DSEKAI) \
$(DEFINES_DEPTH) \
-DPLATFORM_WIN16 \
-DPLATFORM_WIN \
-DNO_ENGINE_POV \
-DUSE_SOFTWARE_TEXT \
-DSCREEN_W=320 \
-DSCREEN_H=200 \
-DSCREEN_W=160 \
-DSCREEN_H=160 \
-DSCREEN_SCALE=2

INCLUDES_WIN16 := \
Expand Down
5 changes: 2 additions & 3 deletions Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ DEFINES_WIN32 := \
$(DEFINES_DSEKAI) \
$(DEFINES_DEPTH) \
-DPLATFORM_WIN32 \
-DPLATFORM_WIN \
-DUSE_SOFTWARE_TEXT \
-DSCREEN_W=320 \
-DSCREEN_H=200 \
-DSCREEN_W=160 \
-DSCREEN_H=160 \
-DSCREEN_SCALE=2

INCLUDES_WIN32 := \
Expand Down
12 changes: 9 additions & 3 deletions src/pov.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#include "dsekai.h"

#include <math.h>

const double gc_pov_dir_x[4] = {
/* SOUTH */
0.0,
Expand Down Expand Up @@ -125,8 +127,10 @@ int16_t pov_input( char in_char, struct DSEKAI_STATE* state ) {
&(state->player),
mobile_get_facing( &(state->player), state ),
&(state->map) );
#ifdef POV_DEBUG_INC
gstate->inc++;
debug_printf( 3, "inc: %d", gstate->inc );
#endif /* POV_DEBUG_INC */
break;
}

Expand Down Expand Up @@ -269,7 +273,11 @@ void pov_draw_wall_x(
(ray->wall_side && 0 != ray->dir_y)
) {
/* We're drawing a wall orthoganal to the viewer. */
tex_pos -= (2000 + gstate->inc) / (line_px_height);
tex_pos -= (2000
#ifdef POV_DEBUG_INC
+ gstate->inc
#endif /* POV_DEBUG_INC */
) / (line_px_height);
}

/* debug_printf( 3, "XXX" ); */
Expand Down Expand Up @@ -343,11 +351,9 @@ void pov_draw( struct DSEKAI_STATE* state ) {

gstate = (struct POV_STATE*)memory_lock( state->engine_state_handle );

/*
if( !(gstate->dirty) ) {
goto cleanup;
}
*/

memory_zero_ptr( gstate->minimap, TILEMAP_TH * TILEMAP_TW );

Expand Down

0 comments on commit 03a0f41

Please sign in to comment.