From 98416384b9905c0edddd57ad764b34862fe5aed7 Mon Sep 17 00:00:00 2001 From: Trevor Boddy Date: Tue, 16 Aug 2022 19:16:38 -0400 Subject: [PATCH] work on environment obstacles. break time --- res/fg/rock1.png | Bin 4640 -> 4896 bytes res/fg/rock1b.png | Bin 0 -> 4614 bytes res/fg/rock1l.png | Bin 0 -> 5003 bytes res/fg/rock1r.png | Bin 0 -> 5024 bytes res/fg/rock1t.png | Bin 4863 -> 4905 bytes res/resources.res | 4 ++++ src/background.h | 1 - src/chrome.h | 16 ++++++++-------- src/foreground.h | 48 +++++++++++++++++++++++++++++++++++++--------- src/player.h | 7 +++++-- 10 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 res/fg/rock1b.png create mode 100644 res/fg/rock1l.png create mode 100644 res/fg/rock1r.png diff --git a/res/fg/rock1.png b/res/fg/rock1.png index ceb0bac632eebc6900a58cd02ba7f5f5dec7ed88..e9bc8104e8399fc60c0c42352a637447417e2cf5 100644 GIT binary patch delta 541 zcmZ3WvOsMEJ2w;Cw#}T}lbF~otc)$J3`{1^=T(8TkMmk6o0z1S86+Ae>Y7_58|s=Q zrFgX(l%JNFlWMC}9OUk# z;OXjYW@u?UjA-OZP;r8XSt1Vx2er!~ml4zu98YtMBapl?G7P|zcR}!DKyf2v9e#ta^zG+Td9Dnrm zP?I%NLZsJR`@JD(eudMOn|@BYd+Z}!j@T?;d8{l{ZDES;%u{=}uia=m`*ne)bOUcTlWlsMkw&i^=b9d$RxS5_(XTTOmU*WFAMIYD@$z%Q zyvKGLpY3ZF7JUEw!E%b%zApj)4nKLx`ft_;@#0@KwQWjroD4wV>FVdQ&MBb@0GR{l A>Hq)$ delta 400 zcmV;B0dM}GCZHs+2MYoPxU&fhk^%%bIx#krq75VjH##vklg$k{lLZhalPeCNv-1w9 z0h4MGS%1{r0K@D2Ptgz-#8GFaW~>3bic;( zr2%)JsGZ1zMul7Djmw278olf^!cyB++OxAGc<*x`l0q#2Td!R5+3+km z<|d7y2tdyq3)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20!r+5-_4&~}HgxwNBPIj#jb#Kfb*T}wq0}V? z&}q;g(~Lhz;onQaceP$FbWrJE@Zvj+&v6oXk$H4IXE5D=gL#NQbDvN4{A=fFWRL+G zYT!)=ht_~$=yWoSf~L}7>S!zmhezXacpAvoKXV@BDT;ta{p9ICbN+{RstcLzOb2hR z2{T)>8*dhsV;-p<91q<6F18thABu!Fn;PhmR4+T!)m``ikra8=SIW8?IsR3# z(7Iut*+Yp}?7|6Qk#cHWOyouE@P(CblA01(Vy%knAL#@a+_4NEt_2R*cQ`z>%MRRa zuQtRp^kPaRkVfn|Cxd7Kwh|641%|u)_c6H{^QF;!S=+3mJqBjsbu49?|jSzW`h-JXZh! literal 0 HcmV?d00001 diff --git a/res/fg/rock1r.png b/res/fg/rock1r.png new file mode 100644 index 0000000000000000000000000000000000000000..31e93bc1147b77097bb8e939bade6d3cc0d42e00 GIT binary patch literal 5024 zcmb_f2{=^i|39=4$x=xa)8M9M%wmk0VaV9C{+KS6$}DFXW-~LkDN<6Fb`qsfWb0;& zlvd$N(PEcf390Oo?SHiW?(_fMd;j)fe82|v} zY^=?lp|b*XprjW;|Hwl!Aaq*nX=-l@0C}fmXQ)d6K*pA3X67Vxwj#r9EX;6d0uG13 z=%N9@I`Wc>C&i^-nKaoxMz)OzjkV=Dua<^6lcPf^tSd@qfs`XEO4|k_G9E@;fgfJI zc9rkLmx`zJ;8EeGd6N=B(mFkzIyg$Ze7kCJLGL{S-bBv534-UPPl>_CfTc&S`GxQ- z3C8x-BN2dx5l&ZqW56OA3hdCL&~5Pu*~qa|l0fJ5@X#PM`&n{vXEkRV0C1ZYAML`= z9CTV!^+pEJS`J)`E^8(OsR{r_uo|-jz{miDsiFi)KpOydtE;V%5A~J+48gOGiva&u zT9cAMk&eq|$!%AGZNF5liUeM)0Nl=BT@?-FdH_0AXCj0WxfcPCvnkJF0gq2W=%r1{ zj7176fX5XDSr-ZE3E<&rD~lmOT2Dgfcx+DKD_8doH7)=!l+TEMdp4G`guCH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oQXJb!nww|)gDm9gJmWwPnq9}fHe;Y4iL;Zsrj)S|OOoi@I zJCHLsV)&-o>WZDF!>;M@n;{uS!S2+@!^ZNmK1Y9DbIFuy_eIQ&1m-9mu? literal 0 HcmV?d00001 diff --git a/res/fg/rock1t.png b/res/fg/rock1t.png index f9039fa6f67730733a4a31cd74e653db751fdda7..4273738f589a77362b9835b52e614d0b4f58f843 100644 GIT binary patch delta 527 zcmeybx>9We2RGx9&79nmnAk0>j4iAT4JR++Re`h5@>(jJS{RudSQzRWB%3Dbnpmcp z>Lwbcndus(C7LBAr5GofnVL=3_*dl3$#WUts0w>>N;(pO%@EYO7QnFR7|XlVx2rDwSLI^P3EqD&3smx8-QM<8UfzhGoNr;);b1_nkOPZ!4!i{94B2m1~g z@VMN6u;7XZ_y7NMGlaDgH?^ziZV>t*q-`vBdve&LVwrsp?sL9W&Qdtrv*AWDL-)Fb z{M3(=JmzNRKM?!1Ep5~PRI_}ZfU2XsEL$Wh@)I}jw2=fJN394>bgL{^Y3jxqLCQ zvLg3!^UsAWZW4>WD)MuiXt3>^6H)wf>EgGn57>Z_L}`JVzVr9c=e@IcD{fzC*kKi{o_xK6OO|oH gbzJ$H#(n?A>+`)!moDwvD98W=p00i_>zopr0Ll8xqyPW_ delta 486 zcmZ3f_Fr`a2RGyF&79nmnApv&49%?!OeQblRe`h5@>(jJm?axoB&O*aq$V5anj|G9 z>n2&6n(L+|85kIvC#EEs7$#2E z$$zOgSh9UpqltgZ(K@ybFGSy{>dxZ}D!rOuW#p9daz;q<+)Ds8E75xnCMVvg2%0fS;O?}5%!63%5C+R|$!xo9`W&0$Gy5_9T z^hsUdqJHsELvZI$j#{6~7b7bxav!(cz(c%{u+zV}@e^G9Z%_R^)HmRqtJfWXt$&t;ucLK6URSjh 3) bgPosXF[y] = fix16Sub(bgPosXF[y], BG_SPEED); if(bgPosXF[y] <= -BG_SIZE_F) bgPosXF[y] = fix16Add(bgPosXF[y], BG_SIZE_F); diff --git a/src/chrome.h b/src/chrome.h index 5a75965..8d8674e 100644 --- a/src/chrome.h +++ b/src/chrome.h @@ -19,7 +19,7 @@ u32 lastScore; char scoreStr[SCORE_LENGTH]; static void loadScore(){ - VDP_drawText("hi", 1, 1); + VDP_drawText("HI", 1, 1); VDP_drawText("00000000", SCORE_X, 1); VDP_drawText("sc", 1, 2); intToStr(score, scoreStr, SCORE_LENGTH); @@ -36,14 +36,14 @@ static void updateScore(){ } -// round +// zone -#define ROUND_X 29 -#define ROUND_Y 1 +#define ZONE_X 28 +#define ZONE_Y 1 -static void loadRound(){ - VDP_drawText("round", ROUND_X - 6, ROUND_Y); - VDP_drawText("01", ROUND_X, ROUND_Y); +static void loadZone(){ + VDP_drawText("ZONE", ZONE_X - 5, ZONE_Y); + VDP_drawText("001", ZONE_X, ZONE_Y); } @@ -63,7 +63,7 @@ static void loadHeat(){ void loadChrome(){ loadFrame(); loadScore(); - loadRound(); + loadZone(); loadHeat(); } diff --git a/src/foreground.h b/src/foreground.h index 90ce7e6..f274653 100644 --- a/src/foreground.h +++ b/src/foreground.h @@ -1,6 +1,14 @@ // foreground #define FG_I 576 +#define FG_W GAME_W_T + 30 +#define OBSTACLE_COUNT 8 + +struct obstacle { + bool active; + Vect2D_f16 pos; +} +struct obstacle obstacles[OBSTACLE_COUNT]; // draw @@ -9,7 +17,7 @@ #define FLOOR_Y 24 static void drawFg(){ - for(u16 x = 0; x < BG_W; x++){ + for(u16 x = 0; x < FG_W; x++){ if(x % 4 == 0){ VDP_drawImageEx(BG_B, &rock1t, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I), x, CEIL_Y, 0, DMA); VDP_drawImageEx(BG_B, &rock1, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I + 16), x, FLOOR_Y, 0, DMA); @@ -17,22 +25,44 @@ static void drawFg(){ } } +// obstacle + +#define OBS_FLOOR_Y FLOOR_Y - 4 +s16 fgPos; +s16 obsX; + +static void spawnObstacle(){ + obsX = 32; + VDP_drawImageEx(BG_B, &rock1l, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I + 32), obsX, OBS_FLOOR_Y, 0, DMA); + VDP_drawImageEx(BG_B, &rock1, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I + 32 + 16), obsX + 2, OBS_FLOOR_Y, 0, DMA); + VDP_drawImageEx(BG_B, &rock1r, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I + 32 + 16 + 16), obsX + 2 + 4, OBS_FLOOR_Y, 0, DMA); + VDP_drawImageEx(BG_B, &rock1b, TILE_ATTR_FULL(PAL2, 1, 0, 0, FG_I + 32 + 16 + 16 + 16), obsX + 2, OBS_FLOOR_Y + 4, 0, DMA); +} + // update #define FG_SPEED FIX16(2) -#define BG_SPEED_NORM FIX16(2 * 0.707) +#define FG_SPEED_NORM FIX16(2 * 0.707) #define FG_SIZE 32 +#define FG_LIMIT FIX16(-40 * 8) -#define FG_SIZE_F FIX16(FG_SIZE) +#define FG_SIZE_F 40 + +s16 fgPosX[WIN_H_T]; +fix16 fgPosXF[WIN_H_T]; -Vect2D_f16 fgPos; static void scrollFg(){ - fgPos.x = fix16Sub(fgPos.x, FG_SPEED); - if(fgPos.x <= -FG_SIZE_F) fgPos.x = fix16Add(fgPos.x, FG_SIZE_F); - if(fgPos.y >= FG_SIZE_F) fgPos.y = fix16Sub(fgPos.y, FG_SIZE_F); + for(u8 y = 0; y < WIN_H_T; y++){ + if(y > 2){ + fgPosXF[y] = fix16Sub(fgPosXF[y], FG_SPEED); + if(fgPosXF[y] <= FG_LIMIT) fgPosXF[y] = 0; + fgPosX[y] = fix16ToInt(fgPosXF[y]); + if(y == 3) fgPos = fgPosX[y]; + } + } } @@ -40,10 +70,10 @@ static void scrollFg(){ void loadFg(){ drawFg(); + spawnObstacle(); } void updateFg(){ - // VDP_setHorizontalScroll(BG_B, fix16ToInt(fgPos.x)); - // VDP_setVerticalScroll(BG_B, fix16ToInt(fgPos.y)); + VDP_setHorizontalScrollTile(BG_B, 0, fgPosX, WIN_H_T, DMA); scrollFg(); } \ No newline at end of file diff --git a/src/player.h b/src/player.h index 09ac1b9..943baa0 100644 --- a/src/player.h +++ b/src/player.h @@ -35,11 +35,14 @@ static void spawnPlayer(){ #define PLAYER_LIMIT_Y FIX16(16) #define PLAYER_LIMIT_H FIX16(GAME_H - 16) +#define PLAYER_LIMIT_Y_HORI FIX16(72) +#define PLAYER_LIMIT_H_HORI FIX16(GAME_H - 32 - 16) + static void checkPlayerBounds(){ if(player.pos.x < PLAYER_LIMIT_X) player.pos.x = PLAYER_LIMIT_X; else if(player.pos.x > PLAYER_LIMIT_W) player.pos.x = PLAYER_LIMIT_W; - if(player.pos.y < PLAYER_LIMIT_Y) player.pos.y = PLAYER_LIMIT_Y; - else if(player.pos.y > PLAYER_LIMIT_H) player.pos.y = PLAYER_LIMIT_H; + if(player.pos.y < PLAYER_LIMIT_Y_HORI) player.pos.y = PLAYER_LIMIT_Y_HORI; + else if(player.pos.y > PLAYER_LIMIT_H_HORI) player.pos.y = PLAYER_LIMIT_H_HORI; } // movement