From 3a3905863218639428e37d9cad679a3ee3057a69 Mon Sep 17 00:00:00 2001 From: jordism Date: Sun, 12 May 2019 23:13:44 +0200 Subject: [PATCH 1/6] pass level --- .DS_Store | Bin 8196 -> 8196 bytes Makefile | 1 + build/binaries.lst | 1 + build/cerezas.asm | 86 +++++++++++++++++++++++++++++++++++++++++++++ build/cerezas.png | Bin 0 -> 267 bytes globals.c | 2 ++ globals.h | 14 ++++++++ int.h | 2 +- logic.c | 36 +++++++++++++++++-- logic.h | 2 ++ msnampac.c | 15 +++++--- sprites.c | 33 ++++++++--------- sprites.h | 1 + 13 files changed, 166 insertions(+), 27 deletions(-) create mode 100644 build/cerezas.asm create mode 100644 build/cerezas.png diff --git a/.DS_Store b/.DS_Store index 4c33a03fb20063eccea3e1951e245e2aec11dae2..c6b7aebbca4dd82e09f7b71d39b4b3a0157a5056 100644 GIT binary patch delta 1122 zcmeH^OGs2v7{|Z=__{ZbdeoUwM{N}IN$NOSYGjTw&8QiYDK3g~hPlDu&DT{6duSwt zl#94jk}eX8C<_ct3tAOzD(K;~$adkj7ex?lI(n^@Zd!LY_uTIXm+$<3Bd!tG%nZji z{T^@IeBIxz2DLtiV+p3P@QBDLN!}FAVr@Sd(0NSGQKB|_iIYCqWb!R1B%<% zr)V7VbZk;uW_CewS!GpiD2~S`Ff-E^hmkAG1|^5B)&&(8&G<+U{|Lx6n~yfs2-xVC(D&*oU&XF;~Et9gHBvkE(g_-)ahjqznx_SNLN6#pOSDX%=?i_M@AMNUL?Z^Vh(j_`kcu?q!--Oq z!G(G>pb>k~i~~4`LpY28j-u0vZuH<7hH(aGF@g)Ygv+>sYq*8mxP!ZRgr|6kS9py# zc#ma#)IC;v#V4_21o^3-f}~PF)dsr#YL}nLG`hZiyT|L{b$|8euBZQ9?27Y5v&EW} zk)2=YEZkeiRi85+=eJth9{Td4yjCmJBlTO`f!lEY1 zMPvqX%?LAT6O~1V*>hKIqUbp-bPlKj0*b1w zH|@zW2ffPvCV#-&+oNt(_Nt=F@_0h>%GFu91x2OhRpI5_WM&qog-vx}+A6cNiP^0= zGWSTWs`r3mLPs2T7DpPO74M>L5S$(Ett87~P^Nx=j!1DZQa-nx#+lnZD2* z{QwY$Wr#-tl92){(%^s#Yf*?w)S?azXvAi0!}bpBKnHfhhu!FfA3=n01V?cU0~o>? z3}XzJaRuYJh6i|z=Ximac!e3v;v>Eq14dwB=Egs>8x`NR>xrqZp~Zo0I#BjsfE1 y{X9l-NpM}&xu$RjcX1E*@d(fGRvS#T;oW3&(nU ./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 + png2sp1sprite ./build/cerezas.png -b -i cerezas -f 16 -s rodata_user > ./build/cerezas.asm ls *.bin zcc +zx -v -startup=31 -DWFRAMES=3 -clib=sdcc_iy -Cz--screen=intro.scr -SO3 --max-allocs-per-node10000 @zproject.lst -pragma-include:zpragma.inc -o msnampac -create-app #zcc +zx -v -m -startup=31 -clib=sdcc_iy -SO3 --max-allocs-per-node10000 @zproject.lst -pragma-include:zpragma.inc -o alley diff --git a/build/binaries.lst b/build/binaries.lst index 861998b..2325fba 100644 --- a/build/binaries.lst +++ b/build/binaries.lst @@ -13,3 +13,4 @@ topvertiright topvertileft ghostpill red_ghost +cerezas diff --git a/build/cerezas.asm b/build/cerezas.asm new file mode 100644 index 0000000..cc9677d --- /dev/null +++ b/build/cerezas.asm @@ -0,0 +1,86 @@ +SECTION rodata_user + +; Original: 16, 24 (=2 x 3 chars) +; Blocks: 2 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +PUBLIC _cerezas1 +._cerezas1 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000001 + defb @00000010 + defb @00000100 + defb @00001000 + defb @00111100 + defb @00111100 + defb @11111111 + defb @11111111 + defb @11111101 + defb @11111101 + defb @00111100 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +PUBLIC _cerezas2 +._cerezas2 + + defb @00000000 + defb @00000000 + defb @00001110 + defb @00111110 + defb @00111110 + defb @11010000 + defb @00010000 + defb @00100000 + defb @00100000 + defb @00100000 + defb @11110000 + defb @11111100 + defb @11111100 + defb @11111100 + defb @11111100 + defb @11110000 + defb @11110000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + diff --git a/build/cerezas.png b/build/cerezas.png new file mode 100644 index 0000000000000000000000000000000000000000..0ab7cce2040e8ef7a6a719bf74b5ac9e3a21179d GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRm!3HEhFR0}KQfx`y?k)^}fRN!tWY2V<2xoyu zWHAGSo-znCRxGtI0}8U2c>21sKW60-(d0_(>yrfvNtU=qlsM<-=BDPAFgO>bCYGe8 zD3oWGWGJ|M`UZqI@`(c#6??ikhFF|_8{#Q+K!HQq@Bja&UxK3D6IossX}TY4X>sk~ zP!)8Yw9%FEiK;}y`~|H0(icwm4r2JhvE_Ikx6}nI 25 FPS. -#define WFRAMES 3 +#define WFRAMES 2 #endif #define clock(x) (tick) diff --git a/logic.c b/logic.c index 81ce399..2517c09 100644 --- a/logic.c +++ b/logic.c @@ -2,6 +2,19 @@ #include "int.h" +void show_cherry() { + cherry.y = 21; + cherry.x = 14; + cherry.showing = 100; +} + +void hide_cherry() { + cherry.y = 21; + cherry.x = 32; + cherry.showing = 0; +} + + void check_keys() { // checks keys @@ -262,9 +275,10 @@ void check_fsm() { if(current == 9) { pick += 1; - points += 10; // ten points each + points += 5; // 5 points each dot + --remaining_points; } else if(current == 11) { - points += 50; // energizers - are worth 50 points each + points += 20; // energizers - are worth 20 points each pill_eaten = 125; for(idx = 0; idx != 4; ++idx) { if(ghosts[idx]->active == ACTIVE) { @@ -339,4 +353,22 @@ void check_fsm() { sp1_IterateSprChar(ghost_magenta.sp, initialiseColourGhostMagenta); sp1_IterateSprChar(ghost_yellow.sp, initialiseColourYellow); } + + if(cherry.showing > 0) { + if(pacman.x == cherry.x && pacman.y == cherry.y) { + hide_cherry(); + points += 10; + } + --cherry.showing; + if(cherry.showing == 0) { + hide_cherry(); + } + } else if(random_value == 100) { + show_cherry(); + } + + if(remaining_points == 0) { + // level finished! + zx_border(INK_CYAN); + } } diff --git a/logic.h b/logic.h index 35fb87d..157eff4 100644 --- a/logic.h +++ b/logic.h @@ -14,5 +14,7 @@ extern void check_fsm(); extern uint8_t allow_next(uint8_t next); extern void set_eaten(struct sprite * for_who); +extern void hide_cherry(); +extern void show_cherry(); #endif diff --git a/msnampac.c b/msnampac.c index e4f4774..594eb88 100644 --- a/msnampac.c +++ b/msnampac.c @@ -23,6 +23,7 @@ void all_lives_lost() { pacman.y = 21; pacman.x = 14; repaint_lives = 1; + remaining_points = 242; ghost_red.offset = GHOST_RED; ghost_red.currentoffset = GHOST_RED; @@ -129,10 +130,12 @@ int main() pacman.offset = 1; pacman.currentoffset = 1; - ghost_red.sp = add_ghost_red_sprite(); - ghost_cyan.sp = add_ghost_cyan_sprite(); - ghost_magenta.sp = add_ghost_magenta_sprite(); - ghost_yellow.sp = add_ghost_yellow_sprite(); + ghost_red.sp = add_ghost_sprite(); + ghost_cyan.sp = add_ghost_sprite(); + ghost_magenta.sp = add_ghost_sprite(); + ghost_yellow.sp = add_ghost_sprite(); + cherry.sp = add_cherry_sprite(); + hide_cherry(); // painting an UDG is just assigning it to any char // row, col, char @@ -152,7 +155,9 @@ int main() for(idx = 0; idx != 4; ++idx) { sp1_MoveSprAbs(ghosts[idx]->sp, &full_screen, (void*) ghosts[idx]->offset, ghosts[idx]->y, ghosts[idx]->x, 0, 0); } - + if(cherry.showing != 0) { + sp1_MoveSprAbs(cherry.sp, &full_screen, (void*) 0, cherry.y, cherry.x, 0, 0); + } if(repaint_lives) { sp1_PrintAtInv(0, 8, INK_CYAN | PAPER_BLACK, 48 + lives); diff --git a/sprites.c b/sprites.c index 07dcb9d..1c5868b 100644 --- a/sprites.c +++ b/sprites.c @@ -89,29 +89,24 @@ struct sp1_ss * add_ghost_sprite() { return sp; } -struct sp1_ss * add_ghost_red_sprite() { - struct sp1_ss * sp = add_ghost_sprite(); - - - return sp; -} - -struct sp1_ss * add_ghost_cyan_sprite() { - struct sp1_ss * sp = add_ghost_sprite(); - - - return sp; +void initialiseColourGreenRed(unsigned int count, struct sp1_cs *c) +{ + c->attr_mask = SP1_AMASK_INK; + if(count < 2) { + c->attr = INK_GREEN; + } else { + c->attr = INK_RED; + } } -struct sp1_ss * add_ghost_magenta_sprite() { - struct sp1_ss * sp = add_ghost_sprite(); - +struct sp1_ss * add_cherry_sprite() { + struct sp1_ss * sp; + sp = sp1_CreateSpr(SP1_DRAW_LOAD1LB, SP1_TYPE_1BYTE, 3, (int)cerezas1, 1); + sp1_AddColSpr(sp, SP1_DRAW_LOAD1, SP1_TYPE_1BYTE, (int)cerezas2, 1); - return sp; -} + sp1_AddColSpr(sp, SP1_DRAW_LOAD1RB, SP1_TYPE_1BYTE, 0, 0); -struct sp1_ss * add_ghost_yellow_sprite() { - struct sp1_ss * sp = add_ghost_sprite(); + sp1_IterateSprChar(sp, initialiseColourGreenRed); return sp; diff --git a/sprites.h b/sprites.h index a136c87..d54a3a4 100644 --- a/sprites.h +++ b/sprites.h @@ -15,6 +15,7 @@ extern struct sp1_ss * add_ghost_red_sprite(); extern struct sp1_ss * add_ghost_cyan_sprite(); extern struct sp1_ss * add_ghost_magenta_sprite(); extern struct sp1_ss * add_ghost_yellow_sprite(); +extern struct sp1_ss * add_cherry_sprite(); extern void initialiseColourBlue(unsigned int count, struct sp1_cs *c); extern void initialiseColourWhite(unsigned int count, struct sp1_cs *c); From e2a972fa542093ae339ef9dbc20b85f2c48beec7 Mon Sep 17 00:00:00 2001 From: jordism Date: Sun, 12 May 2019 23:14:32 +0200 Subject: [PATCH 2/6] pass level --- logic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logic.c b/logic.c index 2517c09..3fbc2ed 100644 --- a/logic.c +++ b/logic.c @@ -365,6 +365,8 @@ void check_fsm() { } } else if(random_value == 100) { show_cherry(); + zx_border(INK_RED); + zx_border(INK_BLACK); } if(remaining_points == 0) { From 13fd7e6f2f83cc39d3046d8ff8482ab99a13db1b Mon Sep 17 00:00:00 2001 From: jordism Date: Mon, 20 May 2019 23:18:34 +0200 Subject: [PATCH 3/6] slower nampac --- globals.c | 1 + globals.h | 2 +- int.c | 5 ++++- logic.c | 46 ++++++++++++++++++++++++++++++++-------------- logic.h | 3 ++- msnampac.c | 15 ++++----------- 6 files changed, 44 insertions(+), 28 deletions(-) diff --git a/globals.c b/globals.c index 10582aa..147a7c0 100644 --- a/globals.c +++ b/globals.c @@ -65,5 +65,6 @@ uint8_t frame = 0; uint8_t lives = 0; uint8_t repaint_lives = 1; +uint8_t speed = 5; uint8_t idx; struct sprite * collided_sprite; diff --git a/globals.h b/globals.h index faf7b75..2e516ad 100644 --- a/globals.h +++ b/globals.h @@ -120,7 +120,7 @@ extern uint8_t col; extern uint8_t current; extern uint16_t points; extern uint8_t remaining_points; - +extern uint8_t speed; extern uint8_t frame; extern uint8_t lives; diff --git a/int.c b/int.c index 177cff7..ef12ee2 100644 --- a/int.c +++ b/int.c @@ -1,5 +1,6 @@ #include #include "int.h" +#include "globals.h" #include #include @@ -12,8 +13,10 @@ unsigned char pick; void wait(void) { - while (abs(tick - timer) < WFRAMES) + while (abs(tick - timer) < speed) { intrinsic_halt(); + in = (joy)(&joy_keys); + } timer = tick; } diff --git a/logic.c b/logic.c index 3fbc2ed..cb35cb6 100644 --- a/logic.c +++ b/logic.c @@ -1,5 +1,6 @@ #include "logic.h" #include "int.h" +#include void show_cherry() { @@ -12,6 +13,7 @@ void hide_cherry() { cherry.y = 21; cherry.x = 32; cherry.showing = 0; + sp1_MoveSprAbs(cherry.sp, &full_screen, (void*) 0, cherry.y, cherry.x, 0, 0); } @@ -37,19 +39,28 @@ void check_keys() } } +void all_ghosts_go_home() { + uint8_t i; + for(i = 0; i != 4; ++i) { + set_eaten(ghosts[i]); + sp1_MoveSprAbs(ghosts[i]->sp, &full_screen, (void*) ghosts[i]->offset, ghosts[i]->default_y, ghosts[i]->default_x, 0, 0); + } +} + +void nampac_go_home() { + pacman.y = 21; + pacman.x = 14; + pacman.dx = 0; + pacman.dy = 0; +} + void loose_a_live() { uint8_t i, j; + hide_cherry(); repaint_lives = 1; --lives; - set_eaten(&ghost_magenta); - set_eaten(&ghost_red); - set_eaten(&ghost_cyan); - set_eaten(&ghost_yellow); - - for(i = 0; i != 4; ++i) { - sp1_MoveSprAbs(ghosts[i]->sp, &full_screen, (void*) ghosts[i]->offset, ghosts[i]->default_y, ghosts[i]->default_x, 0, 0); - } + all_ghosts_go_home(); // prota dead animation, first hide the sprite from the screen sp1_MoveSprAbs(pacman.sp, &full_screen, (void*) pacman.offset, pacman.y, 32, 0, 0); @@ -65,10 +76,7 @@ void loose_a_live() { sp1_MoveSprAbs(pacman.alt, &full_screen, (void*) col, pacman.y, 32, 0, 0); sp1_UpdateNow(); - pacman.y = 21; - pacman.x = 14; - pacman.dx = 0; - pacman.dy = 0; + nampac_go_home(); } uint8_t allow_next(uint8_t next) { @@ -250,10 +258,19 @@ void move_ghosts() { // "a su bola" move_one_ghost(125, 255, 125, 255); } +} +void next_level() { + zx_border(INK_BLUE); + bit_beepfx_di_fastcall(BEEPFX_SCORE); + zx_border(INK_BLACK); + remaining_points = 238; + nampac_go_home(); + all_ghosts_go_home(); } + void check_fsm() { random_value = rand(); row = pacman.y + 1; @@ -363,7 +380,7 @@ void check_fsm() { if(cherry.showing == 0) { hide_cherry(); } - } else if(random_value == 100) { + } else if(random_value == 200) { show_cherry(); zx_border(INK_RED); zx_border(INK_BLACK); @@ -371,6 +388,7 @@ void check_fsm() { if(remaining_points == 0) { // level finished! - zx_border(INK_CYAN); + next_level(); } } + diff --git a/logic.h b/logic.h index 157eff4..bd409d5 100644 --- a/logic.h +++ b/logic.h @@ -16,5 +16,6 @@ extern uint8_t allow_next(uint8_t next); extern void set_eaten(struct sprite * for_who); extern void hide_cherry(); extern void show_cherry(); - +extern void nampac_go_home(); +extern void all_ghosts_go_home(); #endif diff --git a/msnampac.c b/msnampac.c index 594eb88..657e5ee 100644 --- a/msnampac.c +++ b/msnampac.c @@ -20,39 +20,33 @@ void all_lives_lost() { sp1_Invalidate(&full_screen); lives = 5; points = 0; - pacman.y = 21; - pacman.x = 14; + nampac_go_home(); repaint_lives = 1; - remaining_points = 242; + remaining_points = 238; ghost_red.offset = GHOST_RED; ghost_red.currentoffset = GHOST_RED; ghost_red.default_color = initialiseColourGhostRed; ghost_red.default_y = 15; ghost_red.default_x = 14; - set_eaten(&ghost_red); ghost_cyan.offset = GHOST_CYAN; ghost_cyan.currentoffset = GHOST_CYAN; ghost_cyan.default_color = initialiseColourGhostCyan; ghost_cyan.default_y = 15; ghost_cyan.default_x = 12; - set_eaten(&ghost_cyan); ghost_magenta.offset = GHOST_MAGENTA; ghost_magenta.currentoffset = GHOST_CYAN; ghost_magenta.default_color = initialiseColourGhostMagenta; ghost_magenta.default_y = 15; ghost_magenta.default_x = 16; - set_eaten(&ghost_magenta); ghost_yellow.offset = GHOST_YELLOW; ghost_yellow.currentoffset = GHOST_YELLOW; ghost_yellow.default_color = initialiseColourYellow; ghost_yellow.default_y = 15; ghost_yellow.default_x = 18; - set_eaten(&ghost_yellow); - for(row = 0; row != 24; ++row) { for(col = 0; col != 32; ++col) { @@ -80,9 +74,8 @@ void all_lives_lost() { sp1_PrintAt(0, 5, INK_RED | PAPER_BLACK, 'E'); sp1_PrintAt(0, 6, INK_RED | PAPER_BLACK, 'S'); - for(idx = 0; idx != 4; ++idx) { - sp1_MoveSprAbs(ghosts[idx]->sp, &full_screen, (void*) ghosts[idx]->offset, ghosts[idx]->y, ghosts[idx]->x, 0, 0); - } + all_ghosts_go_home(); + sp1_UpdateNow(); From e55d6b2aadf8705cde66219ba1bcb728764cf0b9 Mon Sep 17 00:00:00 2001 From: jordism Date: Wed, 22 May 2019 23:21:21 +0200 Subject: [PATCH 4/6] change sprite --- .DS_Store | Bin 8196 -> 8196 bytes build/prota.asm | 554 ++++++++++++++++++++++++++++++---------- build/prota_sprites.png | Bin 4311 -> 5242 bytes globals.c | 2 +- globals.h | 34 ++- logic.c | 26 +- msnampac.c | 2 +- 7 files changed, 460 insertions(+), 158 deletions(-) diff --git a/.DS_Store b/.DS_Store index c6b7aebbca4dd82e09f7b71d39b4b3a0157a5056..db0ed80efdcc9169016b6f65a0bf21ceaabe2b8d 100644 GIT binary patch delta 1043 zcmeH^OGs2<7>2)R)I6ug`qk0YkQo|sq{2qj@Ip3p)6mFL%r0PR$2cV_&8XEPk?cYj zu#UAVMJl32rHw7kF1u1Ef#Ew!E6DY) z_T=T~S|e(g?|x%@ix~|0{Zlw%V&fLXYx=@P&V-Dz@~s|cMV;By)>>^IH>{Gx=G=Ov zI)cVdqopBab{d-+LPoG&C3Tuc*Y@_1+147YHI4-B^alJAdExQIOu7Td_D3dfAUnGD zMngnbh$fkmC4~}@8flg`>5&UED5EkakL0<$miO{Wre#KE<-7bq&`H8Y3aPm9upBRb ziYTUpGOE}?H8t#}ktPh9IZUXQ4!StX3C?hqbDYQG8rK=%Hp7e%W|U{VY=7jq@`ypTjg`Rl|$1a!y3QMVpPK%%P(-cRh&AYM`=;9)2U)r zP>=pBU2oF`s$!0A%(SWKy5^lnnP}bf7<(mC@C6?oVI24ahZOuaFs!ZxWP?sanDwk@*v`DjBy_Ggr~e< ff)CckWH%qfRjEUS2)R9QFTm)MJj5mvjuvGBWK~(V)v1HeNC!EeeWsCPx^WyfkWI7mb9F z5{jXcYLQfgU7*mkpjA^^mk07xCS+2kkHke6?it|$*(w4dmS z%XQk+ZB3s@O-s*Moa=Ndi>6IKmKK;KN_irzsMzLI(W*%g)3W6@o3g5)9{#y!$@;*+(}AILIN6($6td#DFPckh7fQJeRpLEo9j>Mj2zAJKW_yPnZY?wh#$k h^J{_d&Fhh7#}Frb9V4-+U#+3Ul==TF{KpEDe*i0()pq~@ diff --git a/build/prota.asm b/build/prota.asm index 036a586..02a5324 100644 --- a/build/prota.asm +++ b/build/prota.asm @@ -1,6 +1,6 @@ SECTION rodata_user -; Original: 128, 24 (=16 x 3 chars) +; Original: 192, 24 (=24 x 3 chars) ; Blocks: 2 defb @00000000 defb @00000000 @@ -16,20 +16,20 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00000000 - defb @00000000 - defb @00001111 + defb @00011100 + defb @00011100 + defb @01110011 + defb @01101111 + defb @00011110 + defb @00011101 defb @00111111 - defb @01111111 - defb @01111111 - defb @11111111 - defb @11111100 - defb @11111100 - defb @11111111 - defb @01111111 - defb @01111111 defb @00111111 + defb @00111111 + defb @00110111 + defb @00011111 + defb @00011111 defb @00001111 + defb @00000011 defb @00000000 defb @00000000 defb @00000000 @@ -51,20 +51,20 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00000000 - defb @00000000 + defb @00001110 + defb @00001110 + defb @00111001 + defb @00110111 + defb @00001110 + defb @00001101 + defb @00011111 + defb @00011111 + defb @00011111 + defb @00011011 defb @00001111 - defb @00111111 - defb @01111111 - defb @01111110 - defb @01111000 - defb @11111000 - defb @11111000 - defb @01111000 - defb @01111110 - defb @01111111 - defb @00111111 defb @00001111 + defb @00000111 + defb @00000001 defb @00000000 defb @00000000 defb @00000000 @@ -86,20 +86,20 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00000000 - defb @00000000 - defb @11111000 - defb @11111110 - defb @01111111 - defb @00111111 - defb @00001111 + defb @00001100 + defb @00001100 + defb @00111001 + defb @00110111 defb @00001111 + defb @00001110 + defb @00011101 + defb @00011111 + defb @00011111 + defb @00011011 defb @00001111 defb @00001111 - defb @00111111 - defb @01111111 - defb @11111110 - defb @11111000 + defb @00000111 + defb @00000001 defb @00000000 defb @00000000 defb @00000000 @@ -123,18 +123,18 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00011110 - defb @01111111 - defb @11111111 - defb @11111111 - defb @00011111 - defb @00000111 defb @00000111 defb @00011111 - defb @11111111 - defb @11111111 + defb @00111110 + defb @00111111 defb @01111111 - defb @00011110 + defb @01111111 + defb @01111111 + defb @01111111 + defb @00111111 + defb @00111111 + defb @00011111 + defb @00000111 defb @00000000 defb @00000000 defb @00000000 @@ -158,18 +158,18 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @11000000 - defb @11100000 - defb @11110000 - defb @11110000 - defb @11111111 - defb @01111111 - defb @01111111 - defb @00111111 - defb @00000110 - defb @00000000 + defb @00000111 + defb @00001110 + defb @00000111 + defb @00000011 + defb @00000001 defb @00000000 defb @00000000 + defb @00000001 + defb @00000011 + defb @00000111 + defb @00001111 + defb @00000111 defb @00000000 defb @00000000 defb @00000000 @@ -193,18 +193,18 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @01110000 - defb @01110000 - defb @11111001 - defb @11111001 - defb @11111111 - defb @11111111 - defb @01111111 - defb @01111111 - defb @00111111 - defb @00001111 + defb @00000011 + defb @00001110 + defb @00011111 + defb @00011111 + defb @00000011 defb @00000000 defb @00000000 + defb @00000011 + defb @00011111 + defb @00011111 + defb @00001111 + defb @00000011 defb @00000000 defb @00000000 defb @00000000 @@ -229,18 +229,18 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00000110 - defb @00111111 - defb @01111111 - defb @01111111 - defb @11111111 - defb @11110000 - defb @11110000 - defb @11100000 - defb @11000000 - defb @00000000 - defb @00000000 - defb @00000000 + defb @00001100 + defb @00011100 + defb @00011100 + defb @00111110 + defb @00101110 + defb @00110111 + defb @00111011 + defb @11011111 + defb @11011111 + defb @11101111 + defb @00110011 + defb @00110000 defb @00000000 defb @00000000 defb @00000000 @@ -263,19 +263,19 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 defb @00000000 - defb @00001111 - defb @00111111 - defb @01111111 - defb @01111111 - defb @11111111 - defb @11111111 - defb @11111001 - defb @11111001 - defb @01110000 - defb @01110000 - defb @00110000 defb @00000000 defb @00000000 + defb @00010000 + defb @00111000 + defb @00111100 + defb @00101110 + defb @00110111 + defb @11011011 + defb @11011111 + defb @11101111 + defb @00110011 + defb @00110000 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 @@ -292,8 +292,31 @@ PUBLIC _sprite_protar1 defb @00000000 defb @00000000 -PUBLIC _sprite_protar2 -._sprite_protar2 +._sprite_protar1_f9 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000011 + defb @00001111 + defb @00011111 + defb @00011111 + defb @00111111 + defb @00111111 + defb @00110111 + defb @00111011 + defb @00011101 + defb @11011111 + defb @11101111 + defb @00110011 + defb @00110000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 @@ -301,16 +324,26 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 defb @00000000 - defb @11000000 - defb @11100000 - defb @11100000 defb @00000000 defb @00000000 + +._sprite_protar1_f10 defb @00000000 defb @00000000 - defb @11100000 - defb @11100000 - defb @11000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000011 + defb @00001111 + defb @00011101 + defb @00011111 + defb @00111111 + defb @00111111 + defb @00111110 + defb @00111110 + defb @00011100 + defb @00011100 + defb @00001100 defb @00000000 defb @00000000 defb @00000000 @@ -329,14 +362,22 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 -._sprite_protar2_f2 +._sprite_protar1_f11 defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 - defb @10000000 - defb @10000000 + defb @00000000 + defb @00000011 + defb @00001111 + defb @00011101 + defb @00011111 + defb @00111111 + defb @00111110 + defb @00111100 + defb @00111000 + defb @00010000 defb @00000000 defb @00000000 defb @00000000 @@ -345,8 +386,9 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 defb @00000000 - defb @10000000 - defb @10000000 + defb @00000000 + + defb @00000000 defb @00000000 defb @00000000 defb @00000000 @@ -355,16 +397,32 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 +._sprite_protar1_f12 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 + defb @00000011 + defb @00001111 + defb @00011101 + defb @00011111 + defb @00111111 + defb @00111111 + defb @00111111 + defb @00111111 + defb @00011111 + defb @00011111 + defb @00001111 + defb @00000011 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 -._sprite_protar2_f3 defb @00000000 defb @00000000 defb @00000000 @@ -373,15 +431,27 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 defb @00000000 + +PUBLIC _sprite_protar2 +._sprite_protar2 + defb @00000000 defb @00000000 - defb @10000000 - defb @10000000 defb @00000000 defb @00000000 defb @00000000 + defb @11000000 + defb @01110000 + defb @11111000 + defb @11111000 + defb @11000000 defb @00000000 defb @00000000 + defb @11000000 + defb @11111000 + defb @11111000 + defb @11110000 + defb @11000000 defb @00000000 defb @00000000 defb @00000000 @@ -399,23 +469,32 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 -._sprite_protar2_f4 +._sprite_protar2_f2 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 + defb @11100000 + defb @01110000 + defb @11100000 + defb @11000000 + defb @10000000 defb @00000000 defb @00000000 defb @10000000 defb @11000000 - defb @11000000 - defb @11100000 - defb @11100000 defb @11100000 + defb @11110000 defb @11100000 - defb @11000000 - defb @11000000 - defb @10000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 @@ -425,33 +504,94 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 +._sprite_protar2_f3 defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 + defb @11100000 + defb @11111000 + defb @01111100 + defb @11111100 + defb @11111110 + defb @11111110 + defb @11111110 + defb @11111110 + defb @11111100 + defb @11111100 + defb @11111000 + defb @11100000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 -._sprite_protar2_f5 defb @00000000 defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +._sprite_protar2_f4 defb @00000000 defb @00000000 defb @00000000 defb @00110000 - defb @01110000 + defb @00110000 + defb @10011100 + defb @11101100 defb @11110000 + defb @01110000 + defb @10111000 + defb @11111000 + defb @11111000 + defb @11011000 defb @11110000 defb @11110000 defb @11100000 - defb @11100000 - defb @11000000 + defb @10000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +._sprite_protar2_f5 + defb @00000000 defb @00000000 defb @00000000 + defb @01110000 + defb @01110000 + defb @10011100 + defb @11101100 + defb @01110000 + defb @10110000 + defb @11111000 + defb @11111000 + defb @11111000 + defb @11011000 + defb @11110000 + defb @11110000 + defb @11100000 + defb @10000000 defb @00000000 defb @00000000 defb @00000000 @@ -473,19 +613,63 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 defb @00000000 + defb @00111000 + defb @00111000 + defb @11001110 + defb @11110110 + defb @01111000 + defb @10111000 + defb @11111100 + defb @11111100 + defb @11111100 + defb @11101100 + defb @11111000 + defb @11111000 + defb @11110000 + defb @11000000 defb @00000000 defb @00000000 - defb @11100000 - defb @11100000 - defb @11110000 - defb @11110000 - defb @11110000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +._sprite_protar2_f7 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00110000 + defb @00111000 + defb @00111000 + defb @01111100 + defb @01111100 + defb @11111100 + defb @11111100 + defb @11111000 + defb @10111000 defb @11110000 - defb @11100000 - defb @11100000 defb @11000000 defb @00000000 defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 @@ -495,6 +679,23 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 +._sprite_protar2_f8 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00001000 + defb @00011100 + defb @00111100 + defb @01111100 + defb @11111100 + defb @11111000 + defb @10111000 + defb @11110000 + defb @11000000 defb @00000000 defb @00000000 defb @00000000 @@ -504,23 +705,76 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 -._sprite_protar2_f7 defb @00000000 defb @00000000 defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +._sprite_protar2_f9 defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @11000000 - defb @11100000 - defb @11100000 - defb @11110000 defb @11110000 + defb @11111000 + defb @11111000 + defb @11111100 + defb @11111100 + defb @11111100 + defb @11111100 + defb @11111000 + defb @10111000 defb @11110000 - defb @01110000 + defb @11000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + +._sprite_protar2_f10 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00001100 + defb @11001100 + defb @11110111 + defb @11111011 + defb @11111011 + defb @11011100 + defb @11101100 + defb @01110100 + defb @01111100 + defb @00111000 + defb @00111000 defb @00110000 defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 defb @00000000 defb @00000000 @@ -530,6 +784,23 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 +._sprite_protar2_f11 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00001100 + defb @11001100 + defb @11110111 + defb @11111011 + defb @11011011 + defb @11101100 + defb @01110100 + defb @00111100 + defb @00011100 + defb @00001000 + defb @00000000 defb @00000000 defb @00000000 defb @00000000 @@ -539,25 +810,34 @@ PUBLIC _sprite_protar2 defb @00000000 defb @00000000 -._sprite_protar2_f8 defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 defb @00000000 - defb @11000000 - defb @11100000 - defb @11100000 - defb @11110000 - defb @11110000 - defb @11110000 - defb @11110000 - defb @11100000 - defb @11100000 - defb @11000000 defb @00000000 defb @00000000 + +._sprite_protar2_f12 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00000000 + defb @00001100 + defb @11001100 + defb @11110111 + defb @11111011 + defb @10111000 + defb @11011100 + defb @11101100 + defb @11111100 + defb @11111100 + defb @11111000 + defb @11111000 + defb @11110000 + defb @11000000 defb @00000000 defb @00000000 defb @00000000 diff --git a/build/prota_sprites.png b/build/prota_sprites.png index 62e477335fb14a95bfbd45a885a9d2cd73779fff..9619cc9f3330803aa6baeb650a2ce44d1e1384c8 100644 GIT binary patch literal 5242 zcmV-=6ou=FP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*davVF7MgL@lxjR{Q0)}_x+RC?dJupd|zL`zW%iDBU1m~==+1eZkYAt^m8fwd!w8_ zugCBA&-h+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&Hs1)mJ1ScOIRzkce9kqSX7Mm z;WY9bg4FB@%+4_o6o8X7K=i}n+I0z_NV)wa@vy&`yVU}VYWFuMWKwO;NIN{ zYEwAGPqYDEL<7S$x&^JkQ92C|5s;;x?HSi*LNRWA8WA>w0^_u=5yh)>uMsiq6`ahB zi0Pf57}1eqGsbufm?o}t0&E`u#kAqTc2*6RDdqqf8b?~CU)idsjmiq>wwg3RB+>_? zL@aTbT$@G!4%4_ST;zZx*dY*sxYh3CLpGS{QZDjxiY|Z_H9efd-58+H!zrdSemEl) zQCy7S)X>IT)b@P}WaP4ek+e%xwufaKgFH5`n~WjXhoyRxL1%LEQ8J6V7VieZHWU~z zOi0y~1wq(0q$0N@VAi)7cFL9Fy8xRYKURPp{jvgt>*hy;46S%pV2|DG?Br7mViO5b zI9qiYYAWZjxrEPm^Fs(&jOYyd;F3T3xN%enlL-$|qSnLS>-2?f) z3-d2|C+2F?Gj8`h1Vjm#*6AcR=MJsJX+WOmmFM}i5=tc2N)r2hil-T}QB^q4A`d3R z%-ZCc2S_`PE@E_kCW4IxM|;-knF)ITAQ#?Dx$pEBfl4rtK%T;&nc~M&@#dsH%Um-* zP}={){Tsg>FR18h?%zc_aqLVUK=}Xw00v@9M??Vs0RI60puMM)00009a7bBm001r{ z001r{0eGc9b^rhX2XskIMF-;p8Wk}D7QP9h0003xNkly == 12) { - if(ghosts[frame]->x < 2 && ghosts[frame]->dx == -1) { - ghosts[frame]->x = 29; - } else if(ghosts[frame]->x > 28 && ghosts[frame]->dx == 1) { - ghosts[frame]->x = 1; - } - } - - if(allow_next(map[row + pacman.dy][col + pacman.dx])) { pacman.y += pacman.dy; pacman.x += pacman.dx; @@ -331,11 +322,14 @@ void check_fsm() { pacman.dy = 0; pacman.dx = 0; } - - if((tick & 1) == 0) { + // todo fix offset + if(frame == 0) { + pacman.offset = pacman.currentoffset; + ghosts[frame]->offset = ghosts[frame]->currentoffset; + } else if(frame == 1) { pacman.offset = pacman.currentoffset + 32; ghosts[frame]->offset = ghosts[frame]->currentoffset + 32; - } else { + } else if(frame == 2) { pacman.offset = pacman.currentoffset; ghosts[frame]->offset = ghosts[frame]->currentoffset; } @@ -351,6 +345,14 @@ void check_fsm() { } else if(ghosts[idx]->active <= JAILED) { --ghosts[idx]->active; } + // side change + if(ghosts[idx]->y == 12) { + if(ghosts[idx]->x < 2 && ghosts[idx]->dx == -1) { + ghosts[idx]->x = 29; + } else if(ghosts[idx]->x > 28 && ghosts[idx]->dx == 1) { + ghosts[idx]->x = 1; + } + } } // while has eaten pill if(pill_eaten != NONE) { diff --git a/msnampac.c b/msnampac.c index 657e5ee..3e2eedf 100644 --- a/msnampac.c +++ b/msnampac.c @@ -161,7 +161,7 @@ int main() frame += 1; - if(frame == 5) { + if(frame == 3) { // frame will go 0, 1, 2 frame = 0; print_points(); } From e45a76b0f08b4643e8cad03d921c4d50c8603a23 Mon Sep 17 00:00:00 2001 From: jordism Date: Wed, 22 May 2019 23:25:21 +0200 Subject: [PATCH 5/6] fix wrong sum --- logic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic.c b/logic.c index 0634ab9..4a38469 100644 --- a/logic.c +++ b/logic.c @@ -330,7 +330,7 @@ void check_fsm() { pacman.offset = pacman.currentoffset + 32; ghosts[frame]->offset = ghosts[frame]->currentoffset + 32; } else if(frame == 2) { - pacman.offset = pacman.currentoffset; + pacman.offset = pacman.currentoffset + 64; ghosts[frame]->offset = ghosts[frame]->currentoffset; } From 884996b9ba62de0155af169773b17622de39a89b Mon Sep 17 00:00:00 2001 From: jordism Date: Thu, 23 May 2019 23:07:52 +0200 Subject: [PATCH 6/6] fix directions --- globals.h | 1 + logic.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/globals.h b/globals.h index 578a7ec..6eccc27 100644 --- a/globals.h +++ b/globals.h @@ -75,6 +75,7 @@ struct spritep { uint8_t active; int8_t dx; int8_t dy; + uint8_t direction; uint8_t default_x; uint8_t default_y; void *default_color; diff --git a/logic.c b/logic.c index 4a38469..40ffda3 100644 --- a/logic.c +++ b/logic.c @@ -24,18 +24,22 @@ void check_keys() if ((in & IN_STICK_UP) && allow_next(map[row - 1][col])) { pacman.dy = -1; pacman.currentoffset = UP1; + pacman.direction = DIR_UP; } else if((in & IN_STICK_DOWN) && allow_next(map[row + 1][col])) { pacman.dy = 1; pacman.currentoffset = DOWN1; + pacman.direction = DIR_DOWN; } if((in & IN_STICK_LEFT) && allow_next(map[row][col - 1])) { pacman.dx = -1; pacman.currentoffset = LEFTC1; + pacman.direction = DIR_LEFT; } else if((in & IN_STICK_RIGHT) && allow_next(map[row][col + 1])) { pacman.dx = 1; pacman.currentoffset = RIGHTC1; + pacman.direction = DIR_RIGHT; } } @@ -52,6 +56,7 @@ void nampac_go_home() { pacman.x = 14; pacman.dx = 0; pacman.dy = 0; + pacman.offset = RIGHTC1; } @@ -243,7 +248,7 @@ void move_ghosts() { row = ghosts[idx]->y + 1; switch(idx) { - case 0: // Rojo: Intenta estár detrás de Pac-Man en modo "Acoso" + case 0: // Rojo: Intenta estár detras de Pac-Man en modo "Acoso" move_one_ghost(40, 80, 40, 100); break; case 1: @@ -315,23 +320,30 @@ void check_fsm() { } } - if(allow_next(map[row + pacman.dy][col + pacman.dx])) { + if(pacman.direction == DIR_UP && allow_next(map[row - 1][col])) { + --pacman.y; + } else if(pacman.direction == DIR_DOWN && allow_next(map[row + 1][col])) { + ++pacman.y; + } else if(pacman.direction == DIR_LEFT && allow_next(map[row][col - 1])) { + --pacman.x; + } else if(pacman.direction == DIR_RIGHT && allow_next(map[row][col + 1])) { + ++pacman.x; + } + + /*if(allow_next(map[row + pacman.dy][col + pacman.dx])) { pacman.y += pacman.dy; pacman.x += pacman.dx; } else if (pacman.dy != 0) { pacman.dy = 0; pacman.dx = 0; - } - // todo fix offset + }*/ + if(frame == 0) { pacman.offset = pacman.currentoffset; - ghosts[frame]->offset = ghosts[frame]->currentoffset; } else if(frame == 1) { pacman.offset = pacman.currentoffset + 32; - ghosts[frame]->offset = ghosts[frame]->currentoffset + 32; } else if(frame == 2) { pacman.offset = pacman.currentoffset + 64; - ghosts[frame]->offset = ghosts[frame]->currentoffset; } // IA FOR GHOSTS @@ -353,6 +365,14 @@ void check_fsm() { ghosts[idx]->x = 1; } } + + if(frame == 0) { + ghosts[idx]->offset = ghosts[idx]->currentoffset; + } else if(frame == 1) { + ghosts[idx]->offset = ghosts[idx]->currentoffset + 32; + } else if(frame == 2) { + ghosts[idx]->offset = ghosts[idx]->currentoffset; + } } // while has eaten pill if(pill_eaten != NONE) {