add mike character

This commit is contained in:
Akbar Rahman 2022-06-12 22:45:35 +01:00
parent b02543c848
commit 9239a34256
Signed by: alvierahman90
GPG Key ID: 20609519444A1269
5 changed files with 172 additions and 5 deletions

View File

@ -16,3 +16,10 @@ make all
```
the gameboy rom will be output to `obj/untitled2dshooter.gb`
## credits
### art
a cool guy named louie - drew mike

View File

@ -70,5 +70,141 @@ Sprite sprites_info[] = {
.ibl = { .x = 7, .y = 1},
.ibr = { .x = 1, .y = 1},
}
},
{
.frames_since_last_dash = 0,
.frames_since_last_jump = 0,
.name = "dodgy_hat_guy",
.has_diag_sprites = 0,
.bitmap_index = SI_LEFT,
.has_joypad = 0,
.pos = { .x = 0, .y = 0},
.vel = { .x = 0, .y = 0},
.acc = { .x = 0, .y = 0},
.bitmap_indexes[SI_UP] = 14, .bitmap_prop[SI_UP] = 0,
.collision_offset[SI_UP] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN] = 15, .bitmap_prop[SI_DOWN] = 0,
.collision_offset[SI_DOWN] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_LEFT] = 14, .bitmap_prop[SI_LEFT] = 0,
.collision_offset[SI_LEFT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_RIGHT] = 14, .bitmap_prop[SI_RIGHT] = S_FLIPX,
.collision_offset[SI_RIGHT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_UP_RIGHT] = 14, .bitmap_prop[SI_UP_RIGHT] = 0,
.collision_offset[SI_UP_RIGHT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_UP_LEFT] = 14, .bitmap_prop[SI_UP_LEFT] = S_FLIPX,
.collision_offset[SI_UP_LEFT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN_LEFT] = 15, .bitmap_prop[SI_DOWN_LEFT] = 0,
.collision_offset[SI_DOWN_LEFT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN_RIGHT] = 15, .bitmap_prop[SI_DOWN_RIGHT] = S_FLIPX,
.collision_offset[SI_DOWN_RIGHT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
}
},
{
.frames_since_last_dash = 0,
.frames_since_last_jump = 0,
.name = "mike",
.has_diag_sprites = 0,
.bitmap_index = SI_LEFT,
.has_joypad = 0,
.pos = { .x = 0, .y = 0},
.vel = { .x = 0, .y = 0},
.acc = { .x = 0, .y = 0},
.bitmap_indexes[SI_UP] = 25, .bitmap_prop[SI_UP] = 0,
.collision_offset[SI_UP] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN] = 22, .bitmap_prop[SI_DOWN] = 0,
.collision_offset[SI_DOWN] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_LEFT] = 21, .bitmap_prop[SI_LEFT] = 0,
.collision_offset[SI_LEFT] = {
.itl = { .x = 8, .y = 5},
.itr = { .x = 1, .y = 5},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_RIGHT] = 21, .bitmap_prop[SI_RIGHT] = S_FLIPX,
.collision_offset[SI_RIGHT] = {
.itl = { .x = 8, .y = 5},
.itr = { .x = 1, .y = 5},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_UP_RIGHT] = 23, .bitmap_prop[SI_UP_RIGHT] = 0,
.collision_offset[SI_UP_RIGHT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_UP_LEFT] = 23, .bitmap_prop[SI_UP_LEFT] = S_FLIPX,
.collision_offset[SI_UP_LEFT] = {
.itl = { .x = 8, .y = 8},
.itr = { .x = 1, .y = 8},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN_LEFT] = 24, .bitmap_prop[SI_DOWN_LEFT] = S_FLIPX,
.collision_offset[SI_DOWN_LEFT] = {
.itl = { .x = 8, .y = 7},
.itr = { .x = 1, .y = 7},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
},
.bitmap_indexes[SI_DOWN_RIGHT] = 24, .bitmap_prop[SI_DOWN_RIGHT] = 0,
.collision_offset[SI_DOWN_RIGHT] = {
.itl = { .x = 8, .y = 7},
.itr = { .x = 1, .y = 7},
.ibl = { .x = 8, .y = 1},
.ibr = { .x = 1, .y = 1},
}
}
};

View File

@ -10,7 +10,7 @@
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 13
Tiles : 0 to 25
Palette colors : None.
SGB Palette : None.
@ -52,7 +52,31 @@ unsigned char sprites[] =
0x00,0x02,0x00,0x07,0x02,0x00,0x02,0x00,
0x02,0x00,0x00,0x02,0x00,0x07,0x00,0x05,
0x00,0x03,0x02,0x01,0x04,0x00,0x08,0x00,
0x00,0x30,0x00,0x50,0x00,0x20,0x00,0x00
0x00,0x30,0x00,0x50,0x00,0x20,0x00,0x00,
0x38,0x38,0x7C,0x7C,0x7C,0x44,0x38,0x00,
0x18,0x00,0x18,0x18,0xBD,0xBD,0xBD,0xBD,
0x38,0x38,0x7C,0x7C,0x7C,0x44,0x39,0x01,
0x99,0x81,0x98,0x98,0x3C,0x3C,0x3C,0x3C,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,
0x25,0xFE,0x18,0xE7,0x7E,0xFF,0x00,0xDB,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,
0x38,0xEE,0x52,0xAD,0x7C,0xFF,0x01,0xD7,
0x00,0x38,0x10,0x6E,0x2C,0x77,0x22,0xDD,
0x7E,0xFF,0x12,0xC9,0x18,0xE7,0x00,0x7E,
0x00,0x38,0x10,0x6C,0x3C,0xC6,0x60,0xBF,
0x0E,0xFF,0x78,0xF3,0x00,0xDE,0x00,0x70,
0x00,0x00,0x30,0x4C,0x70,0x9E,0x06,0xFB,
0x7C,0xF3,0x0E,0x5F,0x00,0x7B,0x00,0x1E,
0x00,0x7E,0x18,0xE7,0x36,0xED,0x02,0xFD,
0x7E,0xFF,0x08,0x53,0x10,0x6E,0x00,0x38
};
/* End of SPRITES.C */

View File

@ -10,7 +10,7 @@
Compression : None.
Counter : None.
Tile size : 8 x 8
Tiles : 0 to 13
Tiles : 0 to 25
Palette colors : None.
SGB Palette : None.

View File

@ -19,7 +19,7 @@ void init_gfx()
// Load Background tiles and then map
set_bkg_data(0, 23, tiles);
set_bkg_tiles(0, 0, map.width, map.height, map.data);
set_sprite_data(0, 14, sprites);
set_sprite_data(0, 26, sprites);
// Turn the background map on to make it visible
SHOW_BKG;
@ -34,7 +34,7 @@ void main(void)
struct Sprites screen_sprites[NO_SCREEN_SPRITES];
memcpy(&(screen_sprites[0]), &(sprites_info[0]), sizeof(Sprite));
memcpy(&(screen_sprites[0]), &(sprites_info[2]), sizeof(Sprite));
memcpy(&(screen_sprites[1]), &(sprites_info[0]), sizeof(Sprite));
screen_sprites[0].has_joypad = 1;
screen_sprites[1].bitmap_index = SI_UP;