bit of ui work before going to work. i do not want to go to work

This commit is contained in:
t. boddy 2022-08-16 10:51:04 -04:00
parent 97eea78879
commit 01cb5d622c
7 changed files with 20 additions and 38 deletions

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -4,8 +4,4 @@ IMAGE bgWall1 "bg/wall1.png" FAST
IMAGE bgCeil1 "bg/ceil1.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

View File

@ -1,31 +1,17 @@
// 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
#define SCORE_X 3
#define SCORE_X 4
#define SCORE_Y 2
#define SCORE_LENGTH 6
#define SCORE_LENGTH 8
u32 lastScore;
char scoreStr[SCORE_LENGTH];
static void loadScore(){
VDP_drawText("hi", 1, 1);
VDP_drawText("000000", SCORE_X, 1);
VDP_drawText("00000000", SCORE_X, 1);
VDP_drawText("sc", 1, 2);
intToStr(score, scoreStr, SCORE_LENGTH);
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(){
VDP_drawText("ENERGY 69", 1, LIVES_Y);
static void loadRound(){
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(){
VDP_drawText("FLANDRE", 1, DIALOGUE_Y);
VDP_drawText("\"Are you morbid?", 1, DIALOGUE_Y + 1);
VDP_drawText("Are you morbid?\"", 1, DIALOGUE_Y + 2);
static void loadHeat(){
VDP_drawText("heat", HEAT_X - 5, HEAT_Y);
VDP_drawText("100", HEAT_X, HEAT_Y);
}
// loop
void loadChrome(){
// loadChromeI();
// drawFrame();
// loadScore();
// loadLives();
// loadDialogue();
loadScore();
loadRound();
loadHeat();
}
void updateChrome(){

View File

@ -40,8 +40,8 @@ static void checkPlayerBounds(){
// movement
#define PLAYER_SPEED FIX16(2)
#define PLAYER_SPEED_NORM FIX16(2 * 0.707)
#define PLAYER_SPEED FIX16(2.25)
#define PLAYER_SPEED_NORM FIX16(2.25 * 0.707)
s16 playerFrame;