bit of ui work before going to work. i do not want to go to work
This commit is contained in:
parent
97eea78879
commit
01cb5d622c
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB |
BIN
res/font.png
BIN
res/font.png
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.6 KiB |
|
@ -4,8 +4,4 @@ IMAGE bgWall1 "bg/wall1.png" FAST
|
||||||
IMAGE bgCeil1 "bg/ceil1.png" FAST
|
IMAGE bgCeil1 "bg/ceil1.png" FAST
|
||||||
IMAGE bgFloor1 "bg/floor1.png" FAST
|
IMAGE bgFloor1 "bg/floor1.png" FAST
|
||||||
|
|
||||||
IMAGE frame1 "chrome/frame1.png" FAST
|
|
||||||
IMAGE frame2 "chrome/frame2.png" FAST
|
|
||||||
IMAGE frame3 "chrome/frame3.png" FAST
|
|
||||||
|
|
||||||
SPRITE nitori "player/nitori.png" 4 4 FAST
|
SPRITE nitori "player/nitori.png" 4 4 FAST
|
50
src/chrome.h
50
src/chrome.h
|
@ -1,31 +1,17 @@
|
||||||
// chrome
|
// chrome
|
||||||
|
|
||||||
#define CHROME_I 32
|
|
||||||
|
|
||||||
static void loadChromeI(){
|
|
||||||
VDP_loadTileSet(frame1.tileset, CHROME_I, DMA);
|
|
||||||
VDP_loadTileSet(frame2.tileset, CHROME_I + 1, DMA);
|
|
||||||
VDP_loadTileSet(frame3.tileset, CHROME_I + 2, DMA);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawFrame(){
|
|
||||||
VDP_fillTileMapRect(BG_A, TILE_ATTR_FULL(PAL1, 0, 0, 0, CHROME_I), 0, 0, WIN_W_T, GAME_Y_T - 1);
|
|
||||||
VDP_fillTileMapRect(BG_A, TILE_ATTR_FULL(PAL1, 0, 0, 0, CHROME_I + 1), 0, GAME_Y_T - 1, WIN_W_T, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// score
|
// score
|
||||||
|
|
||||||
#define SCORE_X 3
|
#define SCORE_X 4
|
||||||
#define SCORE_Y 2
|
#define SCORE_Y 2
|
||||||
#define SCORE_LENGTH 6
|
#define SCORE_LENGTH 8
|
||||||
|
|
||||||
u32 lastScore;
|
u32 lastScore;
|
||||||
char scoreStr[SCORE_LENGTH];
|
char scoreStr[SCORE_LENGTH];
|
||||||
|
|
||||||
static void loadScore(){
|
static void loadScore(){
|
||||||
VDP_drawText("hi", 1, 1);
|
VDP_drawText("hi", 1, 1);
|
||||||
VDP_drawText("000000", SCORE_X, 1);
|
VDP_drawText("00000000", SCORE_X, 1);
|
||||||
VDP_drawText("sc", 1, 2);
|
VDP_drawText("sc", 1, 2);
|
||||||
intToStr(score, scoreStr, SCORE_LENGTH);
|
intToStr(score, scoreStr, SCORE_LENGTH);
|
||||||
VDP_drawText(scoreStr, SCORE_X, SCORE_Y);
|
VDP_drawText(scoreStr, SCORE_X, SCORE_Y);
|
||||||
|
@ -41,34 +27,34 @@ static void updateScore(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// lives
|
// round
|
||||||
|
|
||||||
#define LIVES_Y 4
|
#define ROUND_X 29
|
||||||
|
#define ROUND_Y 1
|
||||||
|
|
||||||
static void loadLives(){
|
static void loadRound(){
|
||||||
VDP_drawText("ENERGY 69", 1, LIVES_Y);
|
VDP_drawText("round", ROUND_X - 6, ROUND_Y);
|
||||||
|
VDP_drawText("01", ROUND_X, ROUND_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// dialogue
|
// heat
|
||||||
|
|
||||||
#define DIALOGUE_Y 24
|
#define HEAT_X 28
|
||||||
|
#define HEAT_Y 2
|
||||||
|
|
||||||
static void loadDialogue(){
|
static void loadHeat(){
|
||||||
VDP_drawText("FLANDRE", 1, DIALOGUE_Y);
|
VDP_drawText("heat", HEAT_X - 5, HEAT_Y);
|
||||||
VDP_drawText("\"Are you morbid?", 1, DIALOGUE_Y + 1);
|
VDP_drawText("100", HEAT_X, HEAT_Y);
|
||||||
VDP_drawText("Are you morbid?\"", 1, DIALOGUE_Y + 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// loop
|
// loop
|
||||||
|
|
||||||
void loadChrome(){
|
void loadChrome(){
|
||||||
// loadChromeI();
|
loadScore();
|
||||||
// drawFrame();
|
loadRound();
|
||||||
// loadScore();
|
loadHeat();
|
||||||
// loadLives();
|
|
||||||
// loadDialogue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateChrome(){
|
void updateChrome(){
|
||||||
|
|
|
@ -40,8 +40,8 @@ static void checkPlayerBounds(){
|
||||||
|
|
||||||
// movement
|
// movement
|
||||||
|
|
||||||
#define PLAYER_SPEED FIX16(2)
|
#define PLAYER_SPEED FIX16(2.25)
|
||||||
#define PLAYER_SPEED_NORM FIX16(2 * 0.707)
|
#define PLAYER_SPEED_NORM FIX16(2.25 * 0.707)
|
||||||
|
|
||||||
s16 playerFrame;
|
s16 playerFrame;
|
||||||
|
|
||||||
|
|
Reference in New Issue