~colbyhub/pocket_dust

af0f572c226f8af9b6ad1986a05a3363287c300d — colbyhub 3 months ago 75e6d6c
Add play/pause functionality

Now we can control time itself. The implementation of this is not super
clean but there's not much time left on the clock.

Implements: https://todo.sr.ht/~colbyhub/pocket_dust-issues/15
8 files changed, 105 insertions(+), 71 deletions(-)

M assets/menu.aseprite
M assets/menu.png
A assets/play.aseprite
A assets/play.png
M src/main.c
M src/menu.c
A src/play.c
A src/play.h
M assets/menu.aseprite => assets/menu.aseprite +0 -0
M assets/menu.png => assets/menu.png +0 -0
A assets/play.aseprite => assets/play.aseprite +0 -0
A assets/play.png => assets/play.png +0 -0
M src/main.c => src/main.c +91 -70
@@ 3,6 3,7 @@

#include "wasm4.h"
#include "menu.h"
#include "play.h"

#define CANVAS_WIDTH 160
#define CANVAS_HEIGHT 120


@@ 31,6 32,8 @@ typedef struct v2 {
  unsigned char y;
} v2;

bool paused = false;

typedef uint16_t particle_t;

static particle_t particles[CANVAS_HEIGHT][CANVAS_WIDTH]; // y,x


@@ 92,14 95,16 @@ uint8_t get_particle_age(particle_t *particle) {
particle_t* update_spout(uint8_t x, uint8_t y) {
  particle_t *particle = get_particle(x, y);
  set_particle_color(particle, 2);
  if (paused == false) {
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID) {
      if ((rand() % 100) < 20) {
        particle_t *particle = get_particle(x, y + 1);
        set_particle_material_id(particle, MATERIAL_WATER_ID);
        set_particle_color(particle, 2);
      }
    } 
  }

  if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID) {
    if ((rand() % 100) < 20) {
      particle_t *particle = get_particle(x, y + 1);
      set_particle_material_id(particle, MATERIAL_WATER_ID);
      set_particle_color(particle, 2);
    }
  } 

  return particle;
}


@@ 107,48 112,51 @@ particle_t* update_spout(uint8_t x, uint8_t y) {
particle_t* update_torch(uint8_t x, uint8_t y) {
  particle_t *particle = get_particle(x, y);

  if ((rand() % 100) < 30) {
    set_particle_color(particle, 1);
  } else {
    set_particle_color(particle, 3);
  }

  if (get_particle_material_id(get_particle(x, y - 1)) == MATERIAL_AIR_ID) {
  if (get_particle_color(particle) == 0 || paused == false){
    if ((rand() % 100) < 30) {
      particle_t *particle = get_particle(x, y - 1);
      set_particle_material_id(particle, MATERIAL_FIRE_ID);
      set_particle_color(particle, 1);
    } else {
      set_particle_color(particle, 3);
      set_particle_age(particle, 0);
    }
  } 

  if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID) {
    if ((rand() % 100) < 30) {
      particle_t *particle = get_particle(x, y + 1);
      set_particle_material_id(particle, MATERIAL_FIRE_ID);
      set_particle_color(particle, 3);
      set_particle_age(particle, 0);
    }
  } 
    if (get_particle_material_id(get_particle(x, y - 1)) == MATERIAL_AIR_ID) {
      if ((rand() % 100) < 30) {
        particle_t *particle = get_particle(x, y - 1);
        set_particle_material_id(particle, MATERIAL_FIRE_ID);
        set_particle_color(particle, 3);
        set_particle_age(particle, 0);
      }
    } 

  if (get_particle_material_id(get_particle(x - 1, y)) == MATERIAL_AIR_ID) {
    if ((rand() % 100) < 30) {
      particle_t *particle = get_particle(x - 1, y);
      set_particle_material_id(particle, MATERIAL_FIRE_ID);
      set_particle_color(particle, 3);
      set_particle_age(particle, 0);
    }
  } 
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID) {
      if ((rand() % 100) < 30) {
        particle_t *particle = get_particle(x, y + 1);
        set_particle_material_id(particle, MATERIAL_FIRE_ID);
        set_particle_color(particle, 3);
        set_particle_age(particle, 0);
      }
    } 

  if (get_particle_material_id(get_particle(x + 1, y)) == MATERIAL_AIR_ID) {
    if ((rand() % 100) < 30) {
      particle_t *particle = get_particle(x + 1, y);
      set_particle_material_id(particle, MATERIAL_FIRE_ID);
      set_particle_color(particle, 3);
      set_particle_age(particle, 0);
    if (get_particle_material_id(get_particle(x - 1, y)) == MATERIAL_AIR_ID) {
      if ((rand() % 100) < 30) {
        particle_t *particle = get_particle(x - 1, y);
        set_particle_material_id(particle, MATERIAL_FIRE_ID);
        set_particle_color(particle, 3);
        set_particle_age(particle, 0);
      }
    } 

    if (get_particle_material_id(get_particle(x + 1, y)) == MATERIAL_AIR_ID) {
      if ((rand() % 100) < 30) {
        particle_t *particle = get_particle(x + 1, y);
        set_particle_material_id(particle, MATERIAL_FIRE_ID);
        set_particle_color(particle, 3);
        set_particle_age(particle, 0);
      }
    }
  }


  return particle;
}



@@ 157,22 165,25 @@ particle_t* update_lava(uint8_t x, uint8_t y) {
  particle_t *particle = get_particle(x, y);
  v2 new_position = {.x = x, .y = y};

  if ((rand() % 100) < 30) {
    set_particle_color(particle, 1);
  } else {
    set_particle_color(particle, 3);
  }
  if (get_particle_color(particle) == 0 || paused == false){
    if ((rand() % 100) < 30) {
      set_particle_color(particle, 1);
    } else {
      set_particle_color(particle, 3);
    }

  if (get_particle_age(particle) == 15) {
    if ((rand() % 100) < 5) {
      set_particle_material_id(particle, MATERIAL_AIR_ID);
      set_particle_color(particle, 0);
      set_particle_age(particle, 0);
      return particle;
    if (get_particle_age(particle) == 15) {
      if ((rand() % 100) < 5) {
        set_particle_material_id(particle, MATERIAL_AIR_ID);
        set_particle_color(particle, 0);
        set_particle_age(particle, 0);
        return particle;
      }
    }
  }

  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT) {

  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT && paused == false) {
    // Ignite the sand
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_SAND_ID) {
      if ((rand() % 100) < 70) {


@@ 280,26 291,28 @@ particle_t* update_fire(uint8_t x, uint8_t y) {
  v2 new_position = {.x = x, .y = y};
  set_particle_color(particle, 3);

  if (get_particle_age(particle) < 2) {
    set_particle_color(particle, 1);
  } else {
    if (get_particle_age(particle) < 10 && (rand() % 100) < 30) {
  if (paused == false) {
    if (get_particle_age(particle) < 2) {
      set_particle_color(particle, 1);
    } else if ((rand() % 100) < 20) {
      set_particle_color(particle, 0);
    } else {
      set_particle_color(particle,3);
      if (get_particle_age(particle) < 10 && (rand() % 100) < 30) {
        set_particle_color(particle, 1);
      } else if ((rand() % 100) < 20) {
        set_particle_color(particle, 0);
      } else {
        set_particle_color(particle,3);
      }
    }
  }

  if (get_particle_age(particle) == 15) {
    set_particle_material_id(particle, MATERIAL_AIR_ID);
    set_particle_color(particle, 0);
    set_particle_age(particle, 0);
    return particle;
    if (get_particle_age(particle) == 15) {
      set_particle_material_id(particle, MATERIAL_AIR_ID);
      set_particle_color(particle, 0);
      set_particle_age(particle, 0);
      return particle;
    }
  }

  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT - 1) {
  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT - 1 && paused == false) {
    if (get_particle_material_id(get_particle(x, y - 1)) == MATERIAL_SAND_ID) {
      particle_t *sand_particle = get_particle(x, y - 1);
      set_particle_material_id(sand_particle, MATERIAL_FIRE_ID);


@@ 353,7 366,7 @@ particle_t* update_water(uint8_t x, uint8_t y) {
  v2 new_position = {.x = x, .y = y};
  set_particle_color(particle, 2);

  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT) {
  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT && paused == false) {
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID &&
        get_particle_material_id(get_particle(x - 1, y + 1)) != MATERIAL_WATER_ID &&
        get_particle_material_id(get_particle(x + 1, y - 1)) != MATERIAL_WATER_ID &&


@@ 429,7 442,7 @@ particle_t* update_sand(uint8_t x, uint8_t y) {
  v2 new_position = {.x = x, .y = y};
  set_particle_color(particle, 1);

  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT - 1) {
  if (get_particle_updated(particle) == false && y < CANVAS_HEIGHT - 1 && paused == false) {
    if (get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_AIR_ID || 
        get_particle_material_id(get_particle(x, y + 1)) == MATERIAL_WATER_ID) {
      new_position.y = y + 1;


@@ 568,7 581,8 @@ void update(void) {
              set_particle_material_id(particle, MATERIAL_AIR_ID); 
          } else if (get_particle_material_id(particle) == MATERIAL_AIR_ID) {
            if (pen_size > 1 && *selected_id != MATERIAL_GLASS_ID){
              if((rand() % 100) < 40) {
              // Don't scatter the particles if the game is paused
              if(paused || ((rand() % 100) < 40)) {
                set_particle_material_id(particle, *selected_id); 
              }
            } else {


@@ 586,7 600,11 @@ void update(void) {

  // Draw menu sprite
  *DRAW_COLORS = 0x4321;
  blit(menu, 0, 120, MENU_WIDTH, MENU_HEIGHT, MENU_FLAGS);
  blit(menu, 0, CANVAS_HEIGHT, MENU_WIDTH, MENU_HEIGHT, MENU_FLAGS);
  // Draw play sprite
  if (paused) {
    blit(play, 120, CANVAS_HEIGHT + 19, PLAY_WIDTH, PLAY_HEIGHT, PLAY_FLAGS);
  }
  
  // Attempt to pick new material type
  if (*MOUSE_X < 160 && *MOUSE_X >= 0 && *MOUSE_Y > CANVAS_HEIGHT && mouse_this_frame){


@@ 608,6 626,9 @@ void update(void) {
    } else if (menu_item == 14) {
      // Reset canvas
      clear_particles();
    } else if (menu_item == 15) {
      // Toggle paused/play state
      paused = paused ? false : true;
    } else if (menu_item == 16) {
      // Cycle through pen sizes
      if (++pen_size > 4) {

M src/menu.c => src/menu.c +1 -1
@@ 1,3 1,3 @@
#include <stdint.h>

const uint8_t menu[1600] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x50,0x10,0x01,0x50,0x15,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x40,0x15,0x00,0x40,0x40,0x54,0x00,0x00,0x00,0x04,0x04,0x44,0x04,0x04,0x40,0x44,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x0a,0xa0,0xa8,0x0a,0x80,0x2a,0x80,0x00,0x10,0x10,0x41,0x01,0x10,0x41,0x01,0x00,0x00,0x00,0x11,0x51,0x10,0x11,0x45,0x15,0x11,0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x20,0x22,0x08,0x20,0x20,0x80,0x00,0x00,0x14,0x00,0x41,0x01,0x11,0x01,0x01,0x00,0x00,0x00,0x11,0x55,0x10,0x11,0x45,0x05,0x50,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xa0,0x20,0x82,0x08,0x28,0x00,0xa8,0x00,0x00,0x01,0x41,0x55,0x04,0x11,0x04,0x01,0x00,0x00,0x00,0x45,0x04,0x40,0x40,0x05,0x50,0x55,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x8a,0x0a,0xa8,0x02,0x82,0x00,0x00,0x00,0x40,0x41,0x01,0x04,0x14,0x04,0x14,0x00,0x00,0x00,0x45,0x44,0x54,0x45,0x44,0x54,0x45,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x82,0x08,0x08,0x80,0x88,0x00,0x00,0x00,0x15,0x04,0x04,0x10,0x10,0x11,0x40,0x00,0x00,0x00,0x10,0x14,0x01,0x11,0x11,0x01,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x82,0x02,0x20,0x20,0x2a,0x0a,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x41,0x54,0x40,0x40,0x54,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x08,0x2a,0x2a,0xa0,0xaa,0x0a,0xa0,0x00,0x00,0x3c,0xf0,0x30,0x0c,0xf0,0xf0,0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x0a,0xa0,0xa8,0x02,0xa8,0xaa,0x80,0x00,0x82,0x20,0x82,0x02,0x02,0x00,0x20,0x20,0x00,0x00,0x03,0x03,0x0c,0x30,0x33,0x0c,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x20,0x02,0x02,0x08,0x00,0x08,0x00,0x00,0x88,0x20,0x82,0x02,0x02,0xa0,0x20,0x80,0x00,0x00,0x01,0x03,0x0c,0x30,0xc3,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x08,0x2a,0x02,0x80,0x0a,0x80,0x08,0x00,0x00,0x88,0x82,0xaa,0x08,0x08,0x00,0x8a,0x00,0x00,0x00,0x0c,0x0c,0x10,0x4f,0x04,0x00,0xcf,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa0,0x80,0x00,0x28,0x20,0x00,0x20,0x00,0x00,0xa2,0x82,0x02,0x08,0x20,0x00,0x82,0x00,0x00,0x00,0x04,0x0c,0x30,0xc1,0x0c,0x10,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x22,0x00,0x08,0x08,0x80,0x00,0x20,0x00,0x00,0x82,0x08,0x08,0x20,0x2a,0x82,0x02,0x00,0x00,0x00,0x10,0x01,0x01,0x01,0x01,0x41,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x22,0xa8,0x02,0xa0,0xaa,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x30,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x08,0x80,0x22,0x00,0x20,0x08,0x22,0x8a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0xc3,0x03,0x0c,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x80,0x82,0x08,0x20,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xc0,0xc3,0x0c,0x0f,0xc0,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x82,0x08,0x20,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x03,0x0c,0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0x02,0x82,0x22,0x08,0x20,0x82,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x03,0x0c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x82,0x00,0x08,0x20,0x82,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x0c,0x30,0x30,0xff,0x00,0x00,0x00,0x00,0x00,0x22,0x08,0x00,0x02,0x00,0x20,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0xf4,0x10,0xc3,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x02,0xa8,0x20,0x20,0x00,0x00,0x00,0x00,0x10,0x01,0x0c,0xc3,0x0c,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x08,0x00,0x88,0x20,0x00,0x00,0x00,0x00,0x30,0x03,0x04,0xc3,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x0a,0x80,0x88,0x80,0x00,0x00,0x00,0x00,0x40,0x0f,0x7c,0x44,0x3f,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa8,0x20,0x02,0x08,0x80,0x00,0x00,0x00,0x00,0xc0,0x04,0x0c,0xcc,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x02,0x0a,0x00,0x00,0x00,0x00,0x00,0xdd,0x30,0x30,0xd0,0xc0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xaa,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
const uint8_t menu[1600] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x50,0x10,0x01,0x50,0x15,0x01,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x40,0x15,0x00,0x40,0x40,0x54,0x00,0x00,0x00,0x04,0x04,0x44,0x04,0x04,0x40,0x44,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x02,0xa0,0xa8,0x0a,0x80,0x2a,0x80,0x00,0x10,0x10,0x41,0x01,0x10,0x41,0x01,0x00,0x00,0x00,0x11,0x51,0x10,0x11,0x45,0x15,0x11,0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x41,0x01,0x11,0x01,0x01,0x00,0x00,0x00,0x11,0x55,0x10,0x11,0x45,0x05,0x50,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xa0,0x20,0x80,0x08,0x28,0x00,0xa8,0x00,0x00,0x01,0x41,0x55,0x04,0x11,0x04,0x01,0x00,0x00,0x00,0x45,0x04,0x40,0x40,0x05,0x50,0x55,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x02,0xa8,0x02,0x82,0x00,0x00,0x00,0x40,0x41,0x01,0x04,0x14,0x04,0x14,0x00,0x00,0x00,0x45,0x44,0x54,0x45,0x44,0x54,0x45,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x82,0x08,0x08,0x80,0x88,0x00,0x00,0x00,0x15,0x04,0x04,0x10,0x10,0x11,0x40,0x00,0x00,0x00,0x10,0x14,0x01,0x11,0x11,0x01,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x82,0x02,0x20,0x20,0x2a,0x0a,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x41,0x54,0x40,0x40,0x54,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x08,0x2a,0x2a,0xa0,0xaa,0x0a,0xa0,0x00,0x00,0x3c,0xf0,0x30,0x0c,0xf0,0xf0,0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x0f,0xf0,0xfc,0x03,0xfc,0xff,0xc0,0x00,0x82,0x20,0x82,0x02,0x02,0x00,0x20,0x20,0x00,0x00,0x03,0x03,0x0c,0x30,0x33,0x0c,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x30,0x03,0x03,0x0c,0x00,0x0c,0x00,0x00,0x88,0x20,0x82,0x02,0x02,0xa0,0x20,0x80,0x00,0x00,0x01,0x03,0x0c,0x30,0xc3,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0c,0x3f,0x03,0xc0,0x0f,0xc0,0x0c,0x00,0x00,0x88,0x82,0xaa,0x08,0x08,0x00,0x8a,0x00,0x00,0x00,0x0c,0x0c,0x10,0x4f,0x04,0x00,0xcf,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0xf0,0xc0,0x00,0x3c,0x30,0x00,0x30,0x00,0x00,0xa2,0x82,0x02,0x08,0x20,0x00,0x82,0x00,0x00,0x00,0x04,0x0c,0x30,0xc1,0x0c,0x10,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x33,0x00,0x0c,0x0c,0xc0,0x00,0x30,0x00,0x00,0x82,0x08,0x08,0x20,0x2a,0x82,0x02,0x00,0x00,0x00,0x10,0x01,0x01,0x01,0x01,0x41,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x33,0xfc,0x03,0xf0,0xff,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x30,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x08,0x80,0x22,0x00,0x20,0x08,0x22,0x8a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x01,0x50,0x10,0x41,0x50,0x05,0x50,0x00,0x0c,0x00,0xc3,0x03,0x0c,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x80,0x82,0x08,0x20,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x04,0x10,0x41,0x04,0x04,0x10,0x00,0x00,0x0f,0xc0,0xc3,0x0c,0x0f,0xc0,0x00,0x00,0x00,0x00,0x28,0x00,0x80,0x82,0x08,0x20,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x04,0x10,0x41,0x05,0x00,0x15,0x00,0x00,0x30,0x03,0x0c,0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0x02,0x82,0x22,0x08,0x20,0x82,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x54,0x15,0x51,0x04,0x00,0x50,0x40,0x00,0x00,0x30,0x03,0x0c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x82,0x00,0x08,0x20,0x82,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x11,0x04,0x10,0x11,0x00,0x00,0x00,0xc0,0x0c,0x30,0x30,0xff,0x00,0x00,0x00,0x00,0x00,0x22,0x08,0x00,0x02,0x00,0x20,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x40,0x40,0x50,0x05,0x41,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0xf4,0x10,0xc3,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x02,0xa8,0x20,0x20,0x00,0x00,0x00,0x00,0x10,0x01,0x0c,0xc3,0x0c,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x08,0x00,0x88,0x20,0x00,0x00,0x00,0x00,0x30,0x03,0x04,0xc3,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x0a,0x80,0x88,0x80,0x00,0x00,0x00,0x00,0x40,0x0f,0x7c,0x44,0x3f,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xa8,0x20,0x02,0x08,0x80,0x00,0x00,0x00,0x00,0xc0,0x04,0x0c,0xcc,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x02,0x0a,0x00,0x00,0x00,0x00,0x00,0xdd,0x30,0x30,0xd0,0xc0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xaa,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };

A src/play.c => src/play.c +3 -0
@@ 0,0 1,3 @@
#include <stdint.h>

const uint8_t play[45] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe1,0x07,0x44,0x00,0x01,0x12,0x09,0x48,0x00,0x01,0x12,0x09,0x30,0x00,0x02,0xe4,0x1f,0x20,0x00,0x02,0x04,0x11,0x20,0x00,0x04,0x07,0xa2,0x40,0x00 };

A src/play.h => src/play.h +10 -0
@@ 0,0 1,10 @@
#ifndef PLAY_H
#define PLAY_H

#define PLAY_WIDTH 40
#define PLAY_HEIGHT 9
#define PLAY_FLAGS BLIT_1BPP

extern const uint8_t play[45];

#endif // !PLAY_H