typedef struct jumpnrun_tile_position {
int16_t x;
int8_t y;
-} jumpnrun_tile_position;
+} __attribute__((packed)) jumpnrun_tile_position;
typedef struct jumpnrun_tile_type {
uint8_t lethal_sides;
typedef struct jumpnrun_tile {
jumpnrun_tile_position pos;
uint8_t type;
-} jumpnrun_tile;
+} __attribute__((packed)) jumpnrun_tile;
typedef struct jumpnrun_tile_range {
uint16_t first;
#endif
+void usbmode(void) {
+ badge_framebuffer fb = { { { 0 } } };
+
+ badge_framebuffer_render_text(&fb, 23, 30, "USB-Modus");
+/*
+ badge_framebuffer_render_number(&fb, 23, 50, sizeof(jumpnrun_tile));
+ badge_framebuffer_render_number(&fb, 33, 50, sizeof(jumpnrun_item));
+ badge_framebuffer_render_number(&fb, 48, 50, sizeof(jumpnrun_enemy));
+*/
+ badge_framebuffer_flush(&fb);
+ usbMSCInit();
+ for(;;);
+}
+
/**************************************************************************/
/*!
Main program entry point. After reset, normal code execution will
f_mount(0, &fs);
if(badge_input_raw() & BADGE_EVENT_KEY_DOWN) {
- badge_framebuffer fb = { { { 0 } } };
-
- fb.data[0][0] = badge_framebuffer_render_text(&fb, 23, 30, "USB-Modus");
- badge_framebuffer_flush(&fb);
- usbMSCInit();
- for(;;);
+ usbmode();
}
badge_event_start();