13 static map_t maps
[] = {
14 DEFINE_MAP(0, 9, 63, map_map01
),
17 static void do_input(void) {
18 u16 value1
= JOY_readJoypad(JOY_1
);
19 u16 value2
= JOY_readJoypad(JOY_2
);
20 plr_controls(th_player
[0], value1
);
21 plr_controls(th_player
[1], value2
);
24 static inline void update_scroll(void) {
25 for (u16 i
= 0; i
< num_players
; ++i
) {
26 VDP_setHorizontalScroll(g_cam
[i
].planeidx
, -g_cam
[i
].x
);
27 VDP_setVerticalScroll(g_cam
[i
].planeidx
, g_cam
[i
].y
);
31 #pragma GCC diagnostic ignored "-Wmain"
33 int main(u16 hard_reset
) {
39 VDP_setScreenWidth320();
40 VDP_setPaletteColors(0, (u16
*)palette_black
, 64);
51 th_player
[0] = thing_spawn(TH_PLAYER
, 40, 480, -1, &g_things
[0]);
52 th_player
[1] = thing_spawn(TH_PLAYER
, 40, 480, -1, &g_things
[0]);
54 g_cam
[0].flags
= g_cam
[1].flags
= 1;
77 SYS_doVBlankProcess();