Skip to content

Commit

Permalink
Preparing for video, set bordercolor changes to 1s and other minors
Browse files Browse the repository at this point in the history
  • Loading branch information
YouDirk committed Nov 7, 2020
1 parent fb907d5 commit 466e7ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Input.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Input_init(Input_device_t devices)
memset(&Input.joy_port1, 0x00, sizeof(Input_joystick_t));
*/

/* set data direction of port A and port B */
/* set data direction of CIA1 port A and port B */
CIA1.ddra = CIA_DDR_RONLY_ALL;
CIA1.ddrb = CIA_DDR_RONLY_ALL;
}

void __fastcall__
Input_release(void)
{
/* restore data direction of port A and port B */
/* restore data direction of CIA1 port A and port B */
CIA1.ddrb = CIA1_DDRB_DEFAULT;
CIA1.ddra = CIA1_DDRA_DEFAULT;
}
Expand Down
14 changes: 5 additions & 9 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,34 @@ main(void)
* polling stuff between engine ticks
*/

/* should be the last poll, to reduce input delay */
if (Input_poll() & Input_joy_port2_mask) {
DEBUG_NOTE("input break");
break;
}

/*
* ********************************************************* */
} while (!Engine_tick_poll());

/* ***************************************************************
* time critical ticking stuff (input delay)
*/

/* first in time critical section */
Input_tick();

Graphix.buffer.scroll_x += Input.joy_port2.x_pace >> 5;
Graphix.buffer.scroll_y += Input.joy_port2.y_pace >> 5;

/*
* *********************************************************** */

/* *** render, what we´ve done *** */
Graphix_buffer_swap();

/* ***************************************************************
* low priority ticking stuff
*/

if (Engine.tick_count % ENGINE_MS2TICKS(500) == 0) {
if (Engine.tick_count % ENGINE_MS2TICKS(1000) == 0) {
++Graphix.buffer.bordercolor;
}

Input_tick();

/*
* *********************************************************** */
} while (!Input.joy_port2.button1_pressed);
Expand Down

0 comments on commit 466e7ec

Please sign in to comment.