diff --git a/bible.txt b/bible.txt index 49601fc..c0c5d0b 100644 --- a/bible.txt +++ b/bible.txt @@ -3,7 +3,13 @@ ######### - 100 (overheat) - - connect/transfer (???) + - connect/transfer (big fist) + +######### +# STORY # +######### + + - 18.5 nitori ############ @@ -44,10 +50,8 @@ # ASSET NEEDS # ############### - - tate sprite for nitori.... - - think connect/transfer - - bigger shot and robot sprite? - - 2 songs min needed + - big fist sprite for tate + - 2 songs minimum needed - start - stage - extra songs ordered by priority diff --git a/res/bg/ceil1.png b/res/bg/ceil1.png new file mode 100644 index 0000000..cefbd20 Binary files /dev/null and b/res/bg/ceil1.png differ diff --git a/res/bg/1_1.png b/res/bg/floor1.png similarity index 67% rename from res/bg/1_1.png rename to res/bg/floor1.png index 40de2b0..ab49ba9 100644 Binary files a/res/bg/1_1.png and b/res/bg/floor1.png differ diff --git a/res/bg/wall1.png b/res/bg/wall1.png new file mode 100644 index 0000000..a61d2c2 Binary files /dev/null and b/res/bg/wall1.png differ diff --git a/res/resources.res b/res/resources.res index 4b91ac9..f9f2218 100644 --- a/res/resources.res +++ b/res/resources.res @@ -1,9 +1,8 @@ IMAGE font "font.png" BEST NONE -IMAGE tile1_1 "tiles/1_1.png" FAST -IMAGE tile1_2 "tiles/1_2.png" FAST - -IMAGE bg1_1 "bg/1_1.png" FAST +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 diff --git a/res/tiles/1_1.png b/res/tiles/1_1.png deleted file mode 100644 index f7ea718..0000000 Binary files a/res/tiles/1_1.png and /dev/null differ diff --git a/res/tiles/1_2.png b/res/tiles/1_2.png deleted file mode 100644 index 5896b2c..0000000 Binary files a/res/tiles/1_2.png and /dev/null differ diff --git a/src/background.h b/src/background.h index 8280db8..4a0a765 100644 --- a/src/background.h +++ b/src/background.h @@ -5,15 +5,22 @@ #define BG_W GAME_W_T + 8 #define BG_H WIN_H_T -#define BG_SIZE 64 - // draw static void drawBg(){ for(u16 x = 0; x < BG_W; x++) for(u16 y = 0; y < BG_H; y++){ if(x % 8 == 0 && y % 8 == 0){ - VDP_drawImageEx(BG_B, &bg1_1, TILE_ATTR_FULL(PAL2, 0, 0, 0, BG_I), x, y, 0, DMA); + VDP_drawImageEx(BG_B, &bgWall1, TILE_ATTR_FULL(PAL2, 0, 0, 0, BG_I), x, y, 0, DMA); + } + } +} + +static void drawFg(){ + for(u16 x = 0; x < BG_W; x++){ + if(x % 4 == 0){ + VDP_drawImageEx(BG_A, &bgCeil1, TILE_ATTR_FULL(PAL2, 0, 0, 0, BG_I + 64), x, 0, 0, DMA); + VDP_drawImageEx(BG_A, &bgFloor1, TILE_ATTR_FULL(PAL2, 0, 0, 0, BG_I + 64 + 12), x, 21, 0, DMA); } } } @@ -25,25 +32,28 @@ static void drawBg(){ #define BG_SPEED FIX16(1) #define BG_SPEED_NORM FIX16(0.707) +#define BG_SIZE 64 + #define BG_SIZE_F FIX16(BG_SIZE) + Vect2D_f16 bgPos; static void scrollBg(){ - VDP_setHorizontalScroll(BG_B, fix16ToInt(bgPos.x)); - VDP_setVerticalScroll(BG_B, fix16ToInt(bgPos.y)); bgPos.x = fix16Sub(bgPos.x, BG_SPEED); // bgPos.y = fix16Add(bgPos.y, BG_SPEED_NORM); if(bgPos.x <= -BG_SIZE_F) bgPos.x = fix16Add(bgPos.x, BG_SIZE_F); if(bgPos.y >= BG_SIZE_F) bgPos.y = fix16Sub(bgPos.y, BG_SIZE_F); } - // loop void loadBg(){ drawBg(); + drawFg(); } void updateBg(){ + VDP_setHorizontalScroll(BG_B, fix16ToInt(bgPos.x)); + VDP_setVerticalScroll(BG_B, fix16ToInt(bgPos.y)); scrollBg(); } \ No newline at end of file diff --git a/src/global.h b/src/global.h index 5fc4b7f..e7fe089 100644 --- a/src/global.h +++ b/src/global.h @@ -22,4 +22,5 @@ s16 clock; -u32 score; \ No newline at end of file +u32 score, + highScore; \ No newline at end of file diff --git a/src/main.c b/src/main.c index 38c5d99..4e65260 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,6 @@ #include "global.h" #include "controls.h" #include "background.h" -#include "tiles.h" #include "player.h" #include "chrome.h" @@ -17,21 +16,19 @@ static void loadInternals(){ JOY_setEventHandler(&updateControls); SPR_init(127, 0, 0); VDP_setScreenWidth256(); - VDP_setPalette(PAL1, tile1_1.palette -> data); - VDP_setPalette(PAL2, bg1_1.palette -> data); + VDP_setPalette(PAL1, font.palette -> data); + VDP_setPalette(PAL2, bgWall1.palette -> data); VDP_loadFont(font.tileset, DMA); VDP_setTextPalette(1); } static void loadGame(){ loadBg(); - loadTiles(); loadPlayer(); loadChrome(); } static void updateGame(){ - updateTiles(); updatePlayer(); updateBg(); updateChrome();