From 67c7a316a4125acacbff633ea9bba34998817d19 Mon Sep 17 00:00:00 2001 From: jordism Date: Fri, 14 Jun 2019 23:16:05 +0200 Subject: [PATCH 1/4] add lives --- .DS_Store | Bin 8196 -> 0 bytes Makefile | 1 + build/binaries.lst | 1 + 3 files changed, 2 insertions(+) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index cfbe1c91afaf60d235ed608c16f345420f35abae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMU2GLa6rS%=VApQxwgN2|=v}D%hz%55ehO*5v=u>0sJ74+s^#9hTUgod*1LOe z3$>)g_!ITP_?KWbXw(-?j8W7lNHl8H2Y+G{LN!Jceei`xG@7VqX7)BMP#zl+c9NNI z_MAC0d(M8dle5bhLvzmD$XF#~OrgqAFQ(=ih3k2}s>DJ`5h2K)F*7~n52hV2ebv}V z5Je!0Koo%}0#O8_2;3MEpfj5nWrlNKYNIxaKoo(SG6MYlU{K|l3~@}Ncy&-CQUF4p z0*FF=$^(Rr5n?jLF^R&I=9Jk3LQ{k(2BbOZ4L+PO8RD2kY0exVk)Tb|O@!TL~yH<9}@ZK)lHNBx`FXx)Rn5R7z z93@*-RTZ^QuN)cK)KFJr+_|N0w8j|OvZc1hsIS{RI;toYt2Q?7K0I*z#K18|2gY2du15Se>ku4yx}gs93gQ)w&J!4NWcM zrFvQUtqV2nAUz8=u={N*yMM?wgQGnuKV!M3?H=jM+rFK4tWGyIV3lE5RfSdMl6bs3 zm$o0y*}-wWT2aQ!^|Df}DsHIyhf1$Wce2+r`HZH}#H-@BDas)(Z^>HJO0l*ke!Hrt zlundZXt}gJ_r0|$9`E7u9j0lS#MSEL$af-8)ycIoVAT>B zQ+0maEN83PRytlfSwHjGDfSFI!_KmE>^%FL{lI=^zp+c~GW&=9%l-p{igGN(A}mG% z23DdPwP?ULY{xxl$9?EPCwh=Z1{V5p3;}W&!Z1$a2|S6X@HC#sD|i*J;dQ)?4{#PA z;bVM(Z*dV5_z^$hcU;1s_)Feotia~Ig`1X$zX_*oSYmVd!7X0j}{r*U#B5e4@oxdiD7q!NrDC!#N1wp>f>CpucgGwlw2 zJ|~_cMz2_zNa&n#@^bZ>gr(chRr2U>vus_&k#4sNvMAkSFbuHGT9!=PZ zUD$&*?8O0e;~);9muPwfHXagG%?qlY!lQT$j}u{^#dCN8FXAPfA-cYSH}MwU#d~;P z5ceF;;}d*}&+s|E!3F#xsX0m6HhEoW@hkPFP&VI@bsf(=Lec`s3qvEE%?Qkqi&gUc z|L&Q;|Ig+vMQcS7h$1k{5kOIEM{6@JI@9Zz=h_C ./build/union_left.asm png2udg ./build/door.png -a > ./build/door.asm png2udg ./build/ghostpill.png -a > ./build/ghostpill.asm + png2udg ./build/vidas.png -a > ./build/vidas.asm png2sp1sprite ./build/prota_sprites.png -b -i sprite_protar -f 16 -s rodata_user > ./build/prota.asm png2sp1sprite ./build/prota_dead.png -b -i sprite_protar_dead -f 16 -s rodata_user > ./build/prota_dead.asm png2sp1sprite ./build/red_ghost.png -b -i red_ghost -f 16 -s rodata_user > ./build/red_ghost.asm diff --git a/build/binaries.lst b/build/binaries.lst index 388a870..7923f35 100644 --- a/build/binaries.lst +++ b/build/binaries.lst @@ -21,3 +21,4 @@ union_left union_right door letterboxes +vidas From ed880f08ac5a4abdef47a2b17840ba9e01fa031a Mon Sep 17 00:00:00 2001 From: jordism Date: Fri, 14 Jun 2019 23:16:15 +0200 Subject: [PATCH 2/4] add lives --- build/vidas.png | Bin 0 -> 2835 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 build/vidas.png diff --git a/build/vidas.png b/build/vidas.png new file mode 100755 index 0000000000000000000000000000000000000000..844096b957c749badc405c14bda1b9d09700d847 GIT binary patch literal 2835 zcmV+u3+(iXP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_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/4] add texts --- build/1UP.png | Bin 0 -> 2875 bytes build/Hiscore.png | Bin 0 -> 2863 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100755 build/1UP.png create mode 100755 build/Hiscore.png diff --git a/build/1UP.png b/build/1UP.png new file mode 100755 index 0000000000000000000000000000000000000000..47234f1f287a70321778b6541ab9f2ec9344bc2a GIT binary patch literal 2875 zcmV-B3&iw^P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuT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vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001HNklnKgz(sz`$T_X-%{kjExSE)#Cz8*eoX(SX)}dF|p<` zk?LY<0~UH&ge^3zEv>2R0CY=`Lljr&Qq=+EL?I(A7Z6IxxPlN@E+N?g0|fv800960 Z0|0~qCe1xIw*UYD002ovPDHLkV1ihqPYM74 literal 0 HcmV?d00001 diff --git a/build/Hiscore.png b/build/Hiscore.png new file mode 100755 index 0000000000000000000000000000000000000000..30a29ea5894eb9007c5b12a6d66d85aec9551522 GIT binary patch literal 2863 zcmV+~3()k5P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZH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?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00015Nkl*3Euz! N002ovPDHLkV1l-HP8k3I literal 0 HcmV?d00001 From 900013d1de4d1768c7855ff6b02d4acee17c68c7 Mon Sep 17 00:00:00 2001 From: jordism Date: Tue, 18 Jun 2019 23:22:30 +0200 Subject: [PATCH 4/4] different paint --- build/vidas.asm | 4 ++++ game_zx.c | 4 ++-- globals.h | 2 ++ logic.c | 30 ++++++++++++++++++------------ logic.h | 1 + msnampac.c | 3 ++- 6 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 build/vidas.asm diff --git a/build/vidas.asm b/build/vidas.asm new file mode 100644 index 0000000..299c1c4 --- /dev/null +++ b/build/vidas.asm @@ -0,0 +1,4 @@ +SECTION rodata_user +PUBLIC _vidas +._vidas +defb @00011100, @00111110, @01111000, @01110000, @01111000, @00111110, @00011100, @00000000 diff --git a/game_zx.c b/game_zx.c index 8cab372..df5d989 100644 --- a/game_zx.c +++ b/game_zx.c @@ -16,12 +16,12 @@ void print_points() { if(col != 0) { for(idx = 0; idx != 5; ++idx) { - sp1_PrintAtInv(0, 26 + idx, INK_CYAN | PAPER_BLACK, '0'); + sp1_PrintAtInv(0, 25 + idx, INK_CYAN | PAPER_BLACK, '0'); } } idx = 0; while(chars[idx] != '\0') { - sp1_PrintAtInv(0, 26 + idx + col, INK_CYAN | PAPER_BLACK, chars[idx]); + sp1_PrintAtInv(0, 25 + idx + col, INK_CYAN | PAPER_BLACK, chars[idx]); ++idx; } diff --git a/globals.h b/globals.h index e26b88b..35c6ab7 100644 --- a/globals.h +++ b/globals.h @@ -198,5 +198,7 @@ extern uint8_t letterboxes7[]; extern uint8_t letterboxes8[]; extern uint8_t letterboxes9[]; +extern uint8_t vidas[]; + #endif diff --git a/logic.c b/logic.c index b67816e..9981b24 100644 --- a/logic.c +++ b/logic.c @@ -55,18 +55,14 @@ void reset_map() { } - sp1_PrintAtInv(0, 19, INK_RED | PAPER_BLACK, 'P'); - sp1_PrintAtInv(0, 20, INK_RED | PAPER_BLACK, 'O'); - sp1_PrintAtInv(0, 21, INK_RED | PAPER_BLACK, 'I'); - sp1_PrintAtInv(0, 22, INK_RED | PAPER_BLACK, 'N'); - sp1_PrintAtInv(0, 23, INK_RED | PAPER_BLACK, 'T'); - sp1_PrintAtInv(0, 24, INK_RED | PAPER_BLACK, 'S'); - - sp1_PrintAt(0, 2, INK_RED | PAPER_BLACK, 'L'); - sp1_PrintAt(0, 3, INK_RED | PAPER_BLACK, 'I'); - sp1_PrintAt(0, 4, INK_RED | PAPER_BLACK, 'V'); - sp1_PrintAt(0, 5, INK_RED | PAPER_BLACK, 'E'); - sp1_PrintAt(0, 6, INK_RED | PAPER_BLACK, 'S'); + sp1_PrintAtInv(0, 22, INK_WHITE | PAPER_BLACK, 'H'); + sp1_PrintAtInv(0, 23, INK_WHITE | PAPER_BLACK, 'I'); + sp1_PrintAtInv(0, 24, INK_WHITE | PAPER_BLACK, '-'); + + sp1_PrintAt(0, 2, INK_WHITE | PAPER_BLACK, '1'); + sp1_PrintAt(0, 3, INK_WHITE | PAPER_BLACK, 'U'); + sp1_PrintAt(0, 4, INK_WHITE | PAPER_BLACK, 'P'); + sp1_PrintAt(0, 5, INK_WHITE | PAPER_BLACK, '-'); // as points are restored... remaining_points = 238; @@ -542,3 +538,13 @@ void check_fsm() { show_cherry(); } } + +void paint_lives() { + for(idx = 0; idx != 6; ++idx) { + if(idx < lives) { + sp1_PrintAtInv(0, 6 + idx, INK_YELLOW | PAPER_BLACK | BRIGHT, 'z'); + } else { + sp1_PrintAtInv(0, 6 + idx, INK_BLUE | PAPER_BLACK, 'a'); + } + } +} \ No newline at end of file diff --git a/logic.h b/logic.h index 4661b37..aeebd34 100644 --- a/logic.h +++ b/logic.h @@ -22,4 +22,5 @@ extern void reset_map(); extern void set_ghosts_offsets(); extern void show_billboard(uint8_t offset); extern void hide_billboard(); +extern void paint_lives() ; #endif diff --git a/msnampac.c b/msnampac.c index 13af4f3..5ff16ab 100644 --- a/msnampac.c +++ b/msnampac.c @@ -104,6 +104,7 @@ int main() sp1_TileEntry('w', union_left); sp1_TileEntry('x', union_right); sp1_TileEntry('y', door); + sp1_TileEntry('z', vidas); pacman.sp = add_sprite(); pacman.alt = add_dead_prota_sprite(); @@ -144,7 +145,7 @@ int main() } if(repaint_lives) { - sp1_PrintAtInv(0, 8, INK_CYAN | PAPER_BLACK, 48 + lives); + paint_lives(); repaint_lives = 0; }