Initial Commit
This commit is contained in:
17
z_gbdk_playground_original/big_sprite_animation/Makefile
Normal file
17
z_gbdk_playground_original/big_sprite_animation/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
AS = lcc -c
|
||||
CC = lcc -Wa-l -Wl-m
|
||||
|
||||
BIN = big_sprite_animation.gb
|
||||
OBJS = big_sprite_animation.o cards.o
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
%.s: %.ms
|
||||
maccer -o $@ $<
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
$(CC) -o $(BIN) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(BIN) $(OBJS) *~
|
||||
|
@@ -0,0 +1,6 @@
|
||||
# Big Sprite Animation
|
||||
|
||||

|
||||
|
||||
Renders a big 16x16 animated sprite of 2 frames using a delay of 500.
|
||||
|
@@ -0,0 +1,21 @@
|
||||
#include <gb/gb.h>
|
||||
#include "cards.c"
|
||||
|
||||
void main() {
|
||||
SPRITES_8x16;
|
||||
set_sprite_data(0, 8, cards);
|
||||
set_sprite_tile(0, 0);
|
||||
move_sprite(0, 75, 75);
|
||||
set_sprite_tile(1, 2);
|
||||
move_sprite(1, 75 + 8, 75);
|
||||
SHOW_SPRITES;
|
||||
|
||||
while(1) {
|
||||
set_sprite_tile(0, 4);
|
||||
set_sprite_tile(1, 6);
|
||||
delay(500);
|
||||
set_sprite_tile(0, 0);
|
||||
set_sprite_tile(1, 2);
|
||||
delay(500);
|
||||
}
|
||||
}
|
46
z_gbdk_playground_original/big_sprite_animation/cards.c
Normal file
46
z_gbdk_playground_original/big_sprite_animation/cards.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
|
||||
CARDS.C
|
||||
|
||||
Tile Source File.
|
||||
|
||||
Info:
|
||||
Form : All tiles as one unit.
|
||||
Format : Gameboy 4 color.
|
||||
Compression : None.
|
||||
Counter : None.
|
||||
Tile size : 16 x 16
|
||||
Tiles : 0 to 1
|
||||
|
||||
Palette colors : None.
|
||||
SGB Palette : None.
|
||||
CGB Palette : None.
|
||||
|
||||
Convert to metatiles : No.
|
||||
|
||||
This file was generated by GBTD v2.2
|
||||
|
||||
*/
|
||||
|
||||
/* Start of tile array. */
|
||||
unsigned char cards[] =
|
||||
{
|
||||
0xFF,0xFF,0x80,0x80,0x80,0x80,0x81,0x81,
|
||||
0x83,0x83,0x87,0x87,0x81,0x81,0x81,0x81,
|
||||
0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
|
||||
0x83,0x83,0x87,0x87,0x80,0x80,0xFF,0xFF,
|
||||
0xFF,0xFF,0x01,0x01,0xC1,0xC1,0xC1,0xC1,
|
||||
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
|
||||
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,
|
||||
0xE1,0xE1,0xF1,0xF1,0x01,0x01,0xFF,0xFF,
|
||||
0xFF,0xFF,0x80,0x80,0x83,0x83,0x87,0x87,
|
||||
0x8E,0x8E,0x8C,0x8C,0x80,0x80,0x80,0x80,
|
||||
0x80,0x80,0x80,0x80,0x81,0x81,0x83,0x83,
|
||||
0x87,0x87,0x8F,0x8F,0x80,0x80,0xFF,0xFF,
|
||||
0xFF,0xFF,0x01,0x01,0xC1,0xC1,0xE1,0xE1,
|
||||
0x71,0x71,0x31,0x31,0x31,0x31,0x31,0x31,
|
||||
0x71,0x71,0xE1,0xE1,0xC1,0xC1,0x81,0x81,
|
||||
0xF1,0xF1,0xF1,0xF1,0x01,0x01,0xFF,0xFF
|
||||
};
|
||||
|
||||
/* End of CARDS.C */
|
BIN
z_gbdk_playground_original/big_sprite_animation/cards.gbr
Normal file
BIN
z_gbdk_playground_original/big_sprite_animation/cards.gbr
Normal file
Binary file not shown.
31
z_gbdk_playground_original/big_sprite_animation/cards.h
Normal file
31
z_gbdk_playground_original/big_sprite_animation/cards.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
|
||||
CARDS.H
|
||||
|
||||
Include File.
|
||||
|
||||
Info:
|
||||
Form : All tiles as one unit.
|
||||
Format : Gameboy 4 color.
|
||||
Compression : None.
|
||||
Counter : None.
|
||||
Tile size : 16 x 16
|
||||
Tiles : 0 to 1
|
||||
|
||||
Palette colors : None.
|
||||
SGB Palette : None.
|
||||
CGB Palette : None.
|
||||
|
||||
Convert to metatiles : No.
|
||||
|
||||
This file was generated by GBTD v2.2
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* Bank of tiles. */
|
||||
#define cardsBank 0
|
||||
/* Start of tile array. */
|
||||
extern unsigned char cards[];
|
||||
|
||||
/* End of CARDS.H */
|
BIN
z_gbdk_playground_original/big_sprite_animation/screenshot.gif
Normal file
BIN
z_gbdk_playground_original/big_sprite_animation/screenshot.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user