From 774e814d5974b4574f9a121825656bad5adb7a9b Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 07:15:54 -0300 Subject: [PATCH 1/7] Add SFX, but they're not playing. --- Makefile | 5 ++++- chicken_crossing.c | 3 +++ data/deflemask/player_shot.dmf | Bin 0 -> 142 bytes data/deflemask/player_shot.vgm | Bin 0 -> 509 bytes data/player_shot.psg | Bin 0 -> 22 bytes 5 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 data/deflemask/player_shot.dmf create mode 100644 data/deflemask/player_shot.vgm create mode 100644 data/player_shot.psg diff --git a/Makefile b/Makefile index c9f18f0..3dc7f2c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ OBJS := data.rel actor.rel chicken_crossing.rel all: $(PRJNAME).sms -data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr +data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr data/player_shot.psg folder2c data data data/sprites_tiles.psgcompr: data/img/sprites.png @@ -12,6 +12,9 @@ data/sprites_tiles.psgcompr: data/img/sprites.png data/background_tiles.psgcompr: data/img/background.png BMP2Tile.exe data/img/background.png -palsms -fullpalette -savetiles data/background_tiles.psgcompr -savetilemap data/background_tilemap.bin -savepalette data/background_palette.bin +data/player_shot.psg: data/deflemask/player_shot.vgm + vgm2psg data/deflemask/player_shot.vgm data/player_shot.psg 23 + data/%.path: data/path/%.spline.json node tool/convert_splines.js $< $@ diff --git a/chicken_crossing.c b/chicken_crossing.c index 9898fe6..50c6b04 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -129,6 +129,7 @@ void check_player_reached_top(actor *ply, score_data *score) { ply->y = PLAYER_BOTTOM; add_score(score, 1); + PSGPlayNoRepeat(player_shot_psg); } void handle_player_input() { @@ -496,6 +497,8 @@ char gameplay_loop() { level.starting = 1; } + PSGPlayNoRepeat(player_shot_psg); + handle_player_input(); handle_spawners(); diff --git a/data/deflemask/player_shot.dmf b/data/deflemask/player_shot.dmf new file mode 100644 index 0000000000000000000000000000000000000000..ad0fd80460f5d84f2063a059f294a52418bb2a19 GIT binary patch literal 142 zcmV;90CE3#oYQkj%}LF6NlnX1^-V0!))QtH2q`Vf&CkqHD9*?)Q7BHUU=ZM7U}R=w z00IX_FvZB~nOCe}z@Wen{0drutzh%D0_sn0d)8H(Rmm?LjV8( literal 0 HcmV?d00001 diff --git a/data/deflemask/player_shot.vgm b/data/deflemask/player_shot.vgm new file mode 100644 index 0000000000000000000000000000000000000000..4600502d5cca002783cbbc0b4cb61471d5c0b73f GIT binary patch literal 509 zcmcgo%?bfw6g`%9)>6K*AR7y%l%<*tb!%kJFoT%X48@Lx6c)BNX5&3Pis!K6d^5~E zfO5M(=bU@*_tou=T=h%=J;vo)gSI;HX3q4n25TCbFGVXxzXJ*6E)RLhSx%Cbvn4yp z=@R)#@){kbkZ4;eX|k7cq8+4?5H*WyYAI$SoCeCsd+Wr_?&! L=wrYc{e!kQSW0n@ literal 0 HcmV?d00001 diff --git a/data/player_shot.psg b/data/player_shot.psg new file mode 100644 index 0000000000000000000000000000000000000000..07cf8c94f31f8a6bf72bdd9f13a2704c50c77b8a GIT binary patch literal 22 QcmX@$aR0%7do;iR0B<-4uK)l5 literal 0 HcmV?d00001 From bdf38da297122b134719782e5c97aaf98912628c Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 07:21:44 -0300 Subject: [PATCH 2/7] Make the sound effects work. --- Makefile | 6 +++++- chicken_crossing.c | 2 +- data/deflemask/rescue_diver.dmf | Bin 0 -> 154 bytes data/deflemask/rescue_diver.vgm | Bin 0 -> 595 bytes data/rescue_diver.psg | Bin 0 -> 90 bytes 5 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 data/deflemask/rescue_diver.dmf create mode 100644 data/deflemask/rescue_diver.vgm create mode 100644 data/rescue_diver.psg diff --git a/Makefile b/Makefile index 3dc7f2c..05e0d3c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ OBJS := data.rel actor.rel chicken_crossing.rel all: $(PRJNAME).sms -data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr data/player_shot.psg +data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr \ + data/player_shot.psg data/rescue_diver.psg folder2c data data data/sprites_tiles.psgcompr: data/img/sprites.png @@ -15,6 +16,9 @@ data/background_tiles.psgcompr: data/img/background.png data/player_shot.psg: data/deflemask/player_shot.vgm vgm2psg data/deflemask/player_shot.vgm data/player_shot.psg 23 +data/rescue_diver.psg: data/deflemask/rescue_diver.vgm + vgm2psg data/deflemask/rescue_diver.vgm data/rescue_diver.psg 23 + data/%.path: data/path/%.spline.json node tool/convert_splines.js $< $@ diff --git a/chicken_crossing.c b/chicken_crossing.c index 50c6b04..1744d00 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -129,7 +129,7 @@ void check_player_reached_top(actor *ply, score_data *score) { ply->y = PLAYER_BOTTOM; add_score(score, 1); - PSGPlayNoRepeat(player_shot_psg); + PSGSFXPlay(rescue_diver_psg, SFX_CHANNELS2AND3); } void handle_player_input() { diff --git a/data/deflemask/rescue_diver.dmf b/data/deflemask/rescue_diver.dmf new file mode 100644 index 0000000000000000000000000000000000000000..cacccf95d7654ab1eab00b3c0e22a824f0cd67b2 GIT binary patch literal 154 zcmV;L0A>GpoYQkj%}LF6NlnX1^-V0!))QuCU=ZM7U}k1y00IX_FvZB~nOCe}z@Wen zD-g2)G0-puCXfLP)B*p&B-ph7P%z3KWsfxW zXa*Q%k7za{53mw|2{Qp9LJ2| I0MJSD&ys^Zp#T5? literal 0 HcmV?d00001 diff --git a/data/deflemask/rescue_diver.vgm b/data/deflemask/rescue_diver.vgm new file mode 100644 index 0000000000000000000000000000000000000000..3183aa74cee93579d69042d91a3dbf09b8cd82c9 GIT binary patch literal 595 zcmWGb&sFeeVqi#MWMG&%&x`>C)&toN>Oes#umRGX3<5ANgAbfVIU`_x!2W>y0sjLo z1e^(w3iuH498BK_@;@X6TnzY_6mTivQ&Pa$0C8MWFddgcISAMbiiexW}w!jfcr^93Z%KG7%MOUqpSrfHi8*a8PXXN859_N zfn+g536Ng|OP)8y|GEfc31`q%Mb6lzM literal 0 HcmV?d00001 diff --git a/data/rescue_diver.psg b/data/rescue_diver.psg new file mode 100644 index 0000000000000000000000000000000000000000..58391b4a2151ae4ff49c764d5af06b5b1e66a272 GIT binary patch literal 90 zcmX>Tb>aC3i;EvEE`72%gTlTH6u Date: Sat, 11 Dec 2021 07:22:46 -0300 Subject: [PATCH 3/7] Bump version to 0.3 --- chicken_crossing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chicken_crossing.c b/chicken_crossing.c index 1744d00..ec8e04a 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -598,6 +598,6 @@ void main() { } SMS_EMBED_SEGA_ROM_HEADER(9999,0); // code 9999 hopefully free, here this means 'homebrew' -SMS_EMBED_SDSC_HEADER(0,2, 2021,12,10, "Haroldo-OK\\2021", "Chicken Crossing", +SMS_EMBED_SDSC_HEADER(0,3, 2021,12,11, "Haroldo-OK\\2021", "Chicken Crossing", "Made for The Honest Jam III - https://itch.io/jam/honest-jam-3.\n" "Built using devkitSMS & SMSlib - https://github.com/sverx/devkitSMS"); From ac5572f7ff7d594cd1d887874212b6d2582a8aa6 Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 07:26:02 -0300 Subject: [PATCH 4/7] Make SFX conversion more generic. --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 05e0d3c..b1890e9 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,8 @@ data/sprites_tiles.psgcompr: data/img/sprites.png data/background_tiles.psgcompr: data/img/background.png BMP2Tile.exe data/img/background.png -palsms -fullpalette -savetiles data/background_tiles.psgcompr -savetilemap data/background_tilemap.bin -savepalette data/background_palette.bin -data/player_shot.psg: data/deflemask/player_shot.vgm - vgm2psg data/deflemask/player_shot.vgm data/player_shot.psg 23 - -data/rescue_diver.psg: data/deflemask/rescue_diver.vgm - vgm2psg data/deflemask/rescue_diver.vgm data/rescue_diver.psg 23 +data/%.psg: data/deflemask/%.vgm + vgm2psg $< $@ 23 data/%.path: data/path/%.spline.json node tool/convert_splines.js $< $@ From 587da6aa2e591949677ae5cb5b1f3596cbf5d585 Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 07:37:02 -0300 Subject: [PATCH 5/7] Add scoring effect for player 1. --- Makefile | 2 +- chicken_crossing.c | 2 +- data/deflemask/player_1_score.dmf | Bin 0 -> 134 bytes data/deflemask/player_1_score.vgm | Bin 0 -> 303 bytes data/player_1_score.psg | Bin 0 -> 69 bytes 5 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 data/deflemask/player_1_score.dmf create mode 100644 data/deflemask/player_1_score.vgm create mode 100644 data/player_1_score.psg diff --git a/Makefile b/Makefile index b1890e9..8c1340e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ OBJS := data.rel actor.rel chicken_crossing.rel all: $(PRJNAME).sms data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr \ - data/player_shot.psg data/rescue_diver.psg + data/player_1_score.psg folder2c data data data/sprites_tiles.psgcompr: data/img/sprites.png diff --git a/chicken_crossing.c b/chicken_crossing.c index ec8e04a..f5c0581 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -129,7 +129,7 @@ void check_player_reached_top(actor *ply, score_data *score) { ply->y = PLAYER_BOTTOM; add_score(score, 1); - PSGSFXPlay(rescue_diver_psg, SFX_CHANNELS2AND3); + PSGSFXPlay(player_1_score_psg, SFX_CHANNELS2AND3); } void handle_player_input() { diff --git a/data/deflemask/player_1_score.dmf b/data/deflemask/player_1_score.dmf new file mode 100644 index 0000000000000000000000000000000000000000..6b41ad6489ba26f0bf5ec8fb673d3f8d5d55ecf8 GIT binary patch literal 134 zcmV;10D1p-oYQkj%}LF6NlnX1^-V0!){|gnVBip7U}k1y00IXf1~V90J@bkc3>Xyn zfgBj-L&CgJ%mc;TNSF(XIgv025VHd@8xXSsF$)kg!ED0={)0)ds{c?h${uBpH1=o) o7-f%WHX{$PxQnMLmi(^zKq|-ALGLKYy2}VjjK=;;bq)z+*V`gYlFR$DO%_t zAjXyQ9qy(3QYjv`Dw8@F8meciI%|pd_qJTh=?PsVnu_7Ny>>QRyYiZv2)I#?U-0+` DDRoC} literal 0 HcmV?d00001 diff --git a/data/player_1_score.psg b/data/player_1_score.psg new file mode 100644 index 0000000000000000000000000000000000000000..209f709d696333442322da0c6ade06d4ec6966ea GIT binary patch literal 69 zcmX@$aR0%7#$&!0{##wNx@39T;=IQN2+Q({)m6)DR@W_VSlqO@WpUf$uEjlz`}UZ? GmH_|@ydSjy literal 0 HcmV?d00001 From b8982bdede7d1c0cf787ec7e4795edfb55056eaf Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 07:43:47 -0300 Subject: [PATCH 6/7] Create score SFX for player 2. --- Makefile | 2 +- chicken_crossing.c | 12 ++++++------ data/deflemask/player_2_score.dmf | Bin 0 -> 133 bytes data/deflemask/player_2_score.vgm | Bin 0 -> 303 bytes data/player_2_score.psg | Bin 0 -> 69 bytes 5 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 data/deflemask/player_2_score.dmf create mode 100644 data/deflemask/player_2_score.vgm create mode 100644 data/player_2_score.psg diff --git a/Makefile b/Makefile index 8c1340e..50d4005 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ OBJS := data.rel actor.rel chicken_crossing.rel all: $(PRJNAME).sms data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr \ - data/player_1_score.psg + data/player_1_score.psg data/player_2_score.psg folder2c data data data/sprites_tiles.psgcompr: data/img/sprites.png diff --git a/chicken_crossing.c b/chicken_crossing.c index f5c0581..f9f1e1f 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -124,12 +124,12 @@ void player_knockback(actor *ply) { ply->state_timer--; } -void check_player_reached_top(actor *ply, score_data *score) { +void check_player_reached_top(actor *ply, score_data *score, void *sfx) { if (ply->y > PLAYER_TOP + PLAYER_SPEED) return; ply->y = PLAYER_BOTTOM; add_score(score, 1); - PSGSFXPlay(player_1_score_psg, SFX_CHANNELS2AND3); + PSGSFXPlay(sfx, SFX_CHANNELS2AND3); } void handle_player_input() { @@ -148,7 +148,7 @@ void handle_player_input() { } } player_knockback(player1); - check_player_reached_top(player1, score1); + check_player_reached_top(player1, score1, player_1_score_psg); // Player 2 if (!player2->state) { @@ -163,7 +163,7 @@ void handle_player_input() { } } player_knockback(player2); - check_player_reached_top(player2, score2); + check_player_reached_top(player2, score2, player_2_score_psg); // Player 3 if (!player3->state) { @@ -178,7 +178,7 @@ void handle_player_input() { } } player_knockback(player3); - check_player_reached_top(player3, score3); + check_player_reached_top(player3, score3, player_1_score_psg); // Player 4 if (!player4->state) { @@ -193,7 +193,7 @@ void handle_player_input() { } } player_knockback(player4); - check_player_reached_top(player4, score4); + check_player_reached_top(player4, score4, player_2_score_psg); } void adjust_facing(actor *act, char facing_left) { diff --git a/data/deflemask/player_2_score.dmf b/data/deflemask/player_2_score.dmf new file mode 100644 index 0000000000000000000000000000000000000000..7ba01ea05988f10499ecaeddb397e99ebe39eda4 GIT binary patch literal 133 zcmV;00DAv;oYQkj%}LF6NlnX1^-V0!){|gnVBip7U}k1y00IXf1~V90J@bkc3>Xyn zfgBj-L&CgJ%mc;TNSF(XIgv025VHd@8xXSsF$)kg!ED0={)0)ds{c?h${uBpH1=o) n7-f%WHX{oIGXp{xyCQZX)Qqx6*+Y>%S_6!-M>rb*hjso$1M)Mh literal 0 HcmV?d00001 diff --git a/data/deflemask/player_2_score.vgm b/data/deflemask/player_2_score.vgm new file mode 100644 index 0000000000000000000000000000000000000000..88333748032222fa23119084ed903fd4eed69a66 GIT binary patch literal 303 zcmZ8byG{a86db8mL*XZE#TFJ8Bvcd@CR8SqEU~{wfdaNc8+$swz(Ohf5GxuQR>2oW z_>^@H5JEV~oI5k;b+0>Fe0Bs-czmwGV<=oCB~;c5sOvq(=~e;d9n;*1uUxTU&IwP# zQ^Yq>7)mcltzqjR5PEY6}(NqlA?X|Pn+LhPTM8J)D{DQ|n DDqlx# literal 0 HcmV?d00001 diff --git a/data/player_2_score.psg b/data/player_2_score.psg new file mode 100644 index 0000000000000000000000000000000000000000..146d99df5112d75d9c615fbdd31e94345520fb4b GIT binary patch literal 69 zcmX@$aR0%7##3Gw{##wNx@39T;=IQN2+Q({)m6)DR@W_VSlqO@WpUf$uEjlz`}UZ? GmH_|@{vWmg literal 0 HcmV?d00001 From 523f2ac8a9c9fba4cad0f3ccef3f3d0435e6550a Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Sat, 11 Dec 2021 08:20:02 -0300 Subject: [PATCH 7/7] Add scoring SFX for players 3 and 4. --- Makefile | 2 +- chicken_crossing.c | 4 ++-- data/deflemask/player_3_score.dmf | Bin 0 -> 137 bytes data/deflemask/player_3_score.vgm | Bin 0 -> 303 bytes data/deflemask/player_4_score.dmf | Bin 0 -> 133 bytes data/deflemask/player_4_score.vgm | Bin 0 -> 303 bytes data/player_3_score.psg | Bin 0 -> 69 bytes data/player_4_score.psg | Bin 0 -> 69 bytes 8 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 data/deflemask/player_3_score.dmf create mode 100644 data/deflemask/player_3_score.vgm create mode 100644 data/deflemask/player_4_score.dmf create mode 100644 data/deflemask/player_4_score.vgm create mode 100644 data/player_3_score.psg create mode 100644 data/player_4_score.psg diff --git a/Makefile b/Makefile index 50d4005..be459a8 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ OBJS := data.rel actor.rel chicken_crossing.rel all: $(PRJNAME).sms data.c: data/* data/sprites_tiles.psgcompr data/background_tiles.psgcompr \ - data/player_1_score.psg data/player_2_score.psg + data/player_1_score.psg data/player_2_score.psg data/player_3_score.psg data/player_4_score.psg folder2c data data data/sprites_tiles.psgcompr: data/img/sprites.png diff --git a/chicken_crossing.c b/chicken_crossing.c index f9f1e1f..2708ef5 100644 --- a/chicken_crossing.c +++ b/chicken_crossing.c @@ -178,7 +178,7 @@ void handle_player_input() { } } player_knockback(player3); - check_player_reached_top(player3, score3, player_1_score_psg); + check_player_reached_top(player3, score3, player_3_score_psg); // Player 4 if (!player4->state) { @@ -193,7 +193,7 @@ void handle_player_input() { } } player_knockback(player4); - check_player_reached_top(player4, score4, player_2_score_psg); + check_player_reached_top(player4, score4, player_4_score_psg); } void adjust_facing(actor *act, char facing_left) { diff --git a/data/deflemask/player_3_score.dmf b/data/deflemask/player_3_score.dmf new file mode 100644 index 0000000000000000000000000000000000000000..d9af7bc7e19c1dd5d53c2481337c13485aee3360 GIT binary patch literal 137 zcmV;40CxX)oYQkj%}LF6NlnX1^-V0!){|gnVBip7U}k1y00IXf1~V90J@bkc3>Xyn zfgBj-L&CgJ%mc;TNSF(XIgv025VHd@8xXSsF$)kg!ED0={)0)ds{c?h${uBpH1=o) r7-f%WHX}O&GXp{xyCQaAwL(bED0`GW6xpLSz$klUv;PACpj!V&;RH5i literal 0 HcmV?d00001 diff --git a/data/deflemask/player_3_score.vgm b/data/deflemask/player_3_score.vgm new file mode 100644 index 0000000000000000000000000000000000000000..5cf61f13e001449f52ce7b59108702ca9613f18f GIT binary patch literal 303 zcmZ8by-osQ5F8B!CKf!xRZv)1m{?g*m{6Hag0cTrI10Gtw6Uk-2`Geu2eC4gprC+8 z?orNJB;?{Iv)|0@-*?wZqO&7_!fhs?OTtX<^H?oSx7{O;ZtE$2;e5YggW_CIar&;}<-B E0V7LCWdHyG literal 0 HcmV?d00001 diff --git a/data/deflemask/player_4_score.dmf b/data/deflemask/player_4_score.dmf new file mode 100644 index 0000000000000000000000000000000000000000..dd2b8e85081c5ebbeba06cced3568881d0f15889 GIT binary patch literal 133 zcmV;00DAv;oYQkj%}LF6NlnX1^-V0!){|gnVBip7U}k1y00IXf1~V90J@bkc3>Xyn zfgBj-L&CgJ%mc;TNSF(XIgv025VHd@8xXSsF$)kg!ED0={)0)ds{c?h${uBpH1=o) n7-f%WHX}Q*%0LKXSHwbuno;&BdnmF;Yk*Pq2xkKTlfV8(ISMud literal 0 HcmV?d00001 diff --git a/data/deflemask/player_4_score.vgm b/data/deflemask/player_4_score.vgm new file mode 100644 index 0000000000000000000000000000000000000000..c2aa3976e875d28a1f67bfb8769cf3cff42ddcba GIT binary patch literal 303 zcmZ8byG{a86dVjBnppS=TR}l#VM1j=VX_s;Bunh?QJ{crz{Z}AFQ7mRKg5dAE-F3) z`zgyDB!+mBId^8x>t6TLs9pjnOdlHXm