From 797fb4a733b2c64244ce7eac9229dcc33791dbf1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 4 Feb 2023 11:19:55 -0500 Subject: [PATCH] Document slot machine graphics --- graphics/slot_machine/digits.png | Bin 0 -> 202 bytes .../{unk_84661d4.bin => firered/bg.bin} | Bin graphics/slot_machine/firered/bg.png | Bin 0 -> 1974 bytes .../button_pressed.png} | Bin .../{unk_846506c.png => firered/clefairy.png} | Bin .../combos_window.bin} | Bin .../slot_machine/firered/combos_window.png | Bin 0 -> 913 bytes .../match_lines.pal} | 0 .../slot_machine/firered/payout_lights.pal | 51 ++ graphics/slot_machine/firered/reel_icons.png | Bin 0 -> 5968 bytes .../{unk_lg_8465ab8.bin => leafgreen/bg.bin} | Bin graphics/slot_machine/leafgreen/bg.png | Bin 0 -> 1792 bytes .../slot_machine/leafgreen/button_pressed.png | Bin 0 -> 229 bytes .../clefairy.png} | Bin .../combos_window.bin} | Bin .../slot_machine/leafgreen/combos_window.png | Bin 0 -> 973 bytes .../match_lines.pal} | 0 .../slot_machine/leafgreen/payout_lights.pal | 51 ++ .../slot_machine/leafgreen/reel_icons.png | Bin 0 -> 5860 bytes graphics/slot_machine/unk_8464974.pal | 19 - graphics/slot_machine/unk_8464994.pal | 19 - graphics/slot_machine/unk_84649b4.pal | 19 - graphics/slot_machine/unk_84649d4.pal | 19 - graphics/slot_machine/unk_84649f4.pal | 19 - graphics/slot_machine/unk_8464a14.png | Bin 1234 -> 0 bytes graphics/slot_machine/unk_8465524.pal | 19 - graphics/slot_machine/unk_8465544.png | Bin 215 -> 0 bytes graphics/slot_machine/unk_8465930.pal | 19 - graphics/slot_machine/unk_8465950.pal | 19 - graphics/slot_machine/unk_8465970.pal | 19 - graphics/slot_machine/unk_8465990.pal | 19 - graphics/slot_machine/unk_84659b0.pal | 19 - graphics/slot_machine/unk_84659d0.png | Bin 1736 -> 0 bytes graphics/slot_machine/unk_84664dc.pal | 19 - graphics/slot_machine/unk_84664fc.pal | 19 - graphics/slot_machine/unk_846651c.pal | 19 - graphics/slot_machine/unk_84665c0.pal | 19 - graphics/slot_machine/unk_84665e0.pal | 19 - graphics/slot_machine/unk_8466600.pal | 19 - graphics/slot_machine/unk_8466620.png | Bin 772 -> 0 bytes graphics/slot_machine/unk_lg_8464434.png | Bin 1200 -> 0 bytes graphics/slot_machine/unk_lg_84652bc.pal | 19 - graphics/slot_machine/unk_lg_84652dc.pal | 19 - graphics/slot_machine/unk_lg_84652fc.pal | 19 - graphics/slot_machine/unk_lg_846531c.pal | 19 - graphics/slot_machine/unk_lg_846533c.pal | 19 - graphics/slot_machine/unk_lg_846535c.png | Bin 1605 -> 0 bytes graphics/slot_machine/unk_lg_8465dbc.pal | 19 - graphics/slot_machine/unk_lg_8465ddc.pal | 19 - graphics/slot_machine/unk_lg_8465dfc.pal | 19 - graphics/slot_machine/unk_lg_8465f00.png | Bin 842 -> 0 bytes graphics_file_rules.mk | 12 +- src/slot_machine.c | 800 ++++++++++-------- 53 files changed, 542 insertions(+), 847 deletions(-) create mode 100644 graphics/slot_machine/digits.png rename graphics/slot_machine/{unk_84661d4.bin => firered/bg.bin} (100%) create mode 100644 graphics/slot_machine/firered/bg.png rename graphics/slot_machine/{unk_846653c.png => firered/button_pressed.png} (100%) rename graphics/slot_machine/{unk_846506c.png => firered/clefairy.png} (100%) rename graphics/slot_machine/{unk_8466998.bin => firered/combos_window.bin} (100%) create mode 100644 graphics/slot_machine/firered/combos_window.png rename graphics/slot_machine/{unk_84664bc.pal => firered/match_lines.pal} (100%) create mode 100644 graphics/slot_machine/firered/payout_lights.pal create mode 100644 graphics/slot_machine/firered/reel_icons.png rename graphics/slot_machine/{unk_lg_8465ab8.bin => leafgreen/bg.bin} (100%) create mode 100644 graphics/slot_machine/leafgreen/bg.png create mode 100644 graphics/slot_machine/leafgreen/button_pressed.png rename graphics/slot_machine/{unk_lg_8464a3c.png => leafgreen/clefairy.png} (100%) rename graphics/slot_machine/{unk_lg_8466278.bin => leafgreen/combos_window.bin} (100%) create mode 100644 graphics/slot_machine/leafgreen/combos_window.png rename graphics/slot_machine/{unk_lg_8465d9c.pal => leafgreen/match_lines.pal} (100%) create mode 100644 graphics/slot_machine/leafgreen/payout_lights.pal create mode 100644 graphics/slot_machine/leafgreen/reel_icons.png delete mode 100644 graphics/slot_machine/unk_8464974.pal delete mode 100644 graphics/slot_machine/unk_8464994.pal delete mode 100644 graphics/slot_machine/unk_84649b4.pal delete mode 100644 graphics/slot_machine/unk_84649d4.pal delete mode 100644 graphics/slot_machine/unk_84649f4.pal delete mode 100644 graphics/slot_machine/unk_8464a14.png delete mode 100644 graphics/slot_machine/unk_8465524.pal delete mode 100644 graphics/slot_machine/unk_8465544.png delete mode 100644 graphics/slot_machine/unk_8465930.pal delete mode 100644 graphics/slot_machine/unk_8465950.pal delete mode 100644 graphics/slot_machine/unk_8465970.pal delete mode 100644 graphics/slot_machine/unk_8465990.pal delete mode 100644 graphics/slot_machine/unk_84659b0.pal delete mode 100644 graphics/slot_machine/unk_84659d0.png delete mode 100644 graphics/slot_machine/unk_84664dc.pal delete mode 100644 graphics/slot_machine/unk_84664fc.pal delete mode 100644 graphics/slot_machine/unk_846651c.pal delete mode 100644 graphics/slot_machine/unk_84665c0.pal delete mode 100644 graphics/slot_machine/unk_84665e0.pal delete mode 100644 graphics/slot_machine/unk_8466600.pal delete mode 100644 graphics/slot_machine/unk_8466620.png delete mode 100644 graphics/slot_machine/unk_lg_8464434.png delete mode 100644 graphics/slot_machine/unk_lg_84652bc.pal delete mode 100644 graphics/slot_machine/unk_lg_84652dc.pal delete mode 100644 graphics/slot_machine/unk_lg_84652fc.pal delete mode 100644 graphics/slot_machine/unk_lg_846531c.pal delete mode 100644 graphics/slot_machine/unk_lg_846533c.pal delete mode 100644 graphics/slot_machine/unk_lg_846535c.png delete mode 100644 graphics/slot_machine/unk_lg_8465dbc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465ddc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465dfc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465f00.png diff --git a/graphics/slot_machine/digits.png b/graphics/slot_machine/digits.png new file mode 100644 index 0000000000000000000000000000000000000000..d52754d8d2a7d4aaa22a7edaea29e2acd3edd015 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^96-E)g&9a5&NHwEQU(D&A+A6=DJkmze;`c+_|Nb< zR_q;6VW_8zV~EDYpoGE8!sKjt?!=fYmZ~Spv_Pbz~d)l8zKKfIBieJ_ZDUmOH$jv)A>k_j%WKJ@0$n|5h^7*Ii%N zSQh}G@99BjX&u&H4?J31bprKCT7zO(?mIzotI4qTp<(XfxM`h2u^Aj3L=Z&%0MvV} zR&W8LAgKf-B+rtPiR7seU?aE!z`=uDZCIsJ{hdU(KxGO3Z&i>)+Vo#XoA>hSjCp{> z7;+oCX_L&Cs-1!FiS$7HYkQnN+$MSomR zymyDYFjW`c#nrvmo0e_v9&n0kpt)3xg}3mKUn&QUf`+D-1XsR<{_KpC0;<@U8h9Vt zM&qqj?j>mau582g9)#v}WUKVwFhJJ#@wul7$C2h=i|INf3tl%$dFy~-gMJ`&)(A_Q z*--baDaUE!S$|-BZNMh3507%6|Hfz+!`Jz$VS;1pQPek6>U~Le`JeUP_2m`EY|cKs z>6sKH!EZaj4}1tr=mTQfVz|*c&6DK%0U13u9TIH>un9NUKDm=&VkB>0eURX_>FrN>7zULQ;tmsAC zffCD}o~>oMM3xx6+2;xI+eE^aG6!@1+gISBaTF&V6@pLo%zn>XTucO2HP?0*Mr{d> zWr^crbTyGqmGW>?(n8T6a}tTI>^oB{0Jq(J^c&E8S^LuU0LP?BsbRtkJLH$GS?CxL z1xvmZfj-M02ds@gN`1iH--p#WVMB@+ak`2)Vh=Biyngxk%^m=M@g2blPpmH9H&ci% z)10z!2XErus;{1to|jlP{3=*h+rDikYTZxv)Ub%l(U~YNK6))^N_aB2{Gg7E-DH$D zH3G=yPC<6%PHswNc26W~Eg#5&XR+@a;Nx=BfE=9ggHh&3N;Zo$29I~Tfd><&>zVHC zS|7v(vg%CItL-}H_aaSiNcj0YB>cz21d0=uglZg$c#b-T^Dvow+_>K_ zQKvT<+CKiX-|R7(@+jIC#}5unom>SIF5lI|p^p7_8)9z*jqcCLtAK?$jBnh2VWG~H zk-s&>(YJ(t01;ILWL^6cnXRUR`b{G`NagX=%5uwQO zv^oT51$hPnYrA~o2WvqE1((Qn(x=o{CsN`j7n|)`-dTPqC zk$HK(Q#Gah6`-7cLAsKxGB-JM4YLwANj@3vW7V%(o-}1kIRU}Dc5Re8ffd%ZF71=^ zgZBjUHg(RK0&#I-Ovwvb?uH!uL3Gx>AbnNee!Lf;YW9AiRWIsK7?8;Qqr={e(QVzW zCd{s-R1zK^*2hegE#Bf4MB^HMKyQNkP6hC;?$VRGZbVnFDSgyym)f0<4k6-YnyU3! ztY&8CnQ&P;`Uw2RVBcs1JRaiK7)H3bU5-=!4!j9hZS^*ffQ~vDM!a=RCY-W?-YO*-2%>0@To4S zHp|AIBFI^s*m@n!u5xNs*>bm-nKGw3UG@yF)bqfxeIlPE)IKKy4WH1or5Jex970~R_|04U7szU*dRO1F7)bQ zlqL+Mo`y2@iHANOqWduFW8V!^<&szzXlT@26Oa6ZNGkG No^HPM;+=fqe*m;mc9{SG literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_846653c.png b/graphics/slot_machine/firered/button_pressed.png similarity index 100% rename from graphics/slot_machine/unk_846653c.png rename to graphics/slot_machine/firered/button_pressed.png diff --git a/graphics/slot_machine/unk_846506c.png b/graphics/slot_machine/firered/clefairy.png similarity index 100% rename from graphics/slot_machine/unk_846506c.png rename to graphics/slot_machine/firered/clefairy.png diff --git a/graphics/slot_machine/unk_8466998.bin b/graphics/slot_machine/firered/combos_window.bin similarity index 100% rename from graphics/slot_machine/unk_8466998.bin rename to graphics/slot_machine/firered/combos_window.bin diff --git a/graphics/slot_machine/firered/combos_window.png b/graphics/slot_machine/firered/combos_window.png new file mode 100644 index 0000000000000000000000000000000000000000..6472e5b25f5602b810de406b5e0047894b5e57f2 GIT binary patch literal 913 zcmV;C18)3@P)Px#kWfriMdrQcK|w+P|No2b|E&N2YR%sE-h2P%wAH;@-Z23G?f~}9bJd(F_Avn7 z|IPpA=EeX2K|w+G_V)i$QZcmuLDm2NoKgUs0G#ehq@=z7?g0Pxq{XB;?%n|2|IPpA z=EeX2K|w+G_V#;&gT>9w|BG{4d;isg|CCC_y;?#4w5;~#YW7M1#sB}_|IPpA=5Om8 z@c;k$)^yBk8ei0*;Dcl56a=8@3cpY^ z4OZU!7eFEIAJVC;XkK$bI03#?B@X{9U~Xzl6y?eZKQ+r5Ko%&Chw=_RF#z4O2dYHUQr|y%b69}J=5ZYH zTtn1f0uXyV?!PGoQl7vA^*9d0FpgSBxk`Y+6&>8^Ay9yEvFm%?_pMtGHM9e%H3f3y zP`>AY%>^K)kb(I1!73Vr;SSu+B6_?6q#)v2s6)YzhBscBXgN!j`~^oqUJ*l9_j}NC zpv-}2c(r2SKadD%v0$31#MM0U<_TY5&gL=R${(pXgxDPcl>yp35TCYBvnah1pe%GT z6rw?b$L9ny5$73h3%#-7ho8?Up11D<#kvivpHWv^R}Gn*?2e7vw+)u(0^7EV)!-Ts z!z3(j>$;l57a+Fc5uyRhvcv^a4m1vCQgFb)RZRc8zkqS7OMvdHOUTjm>3|qC3|Ii3 n>l7$|YcdKqatq{odmZpMt*E)auJzD300000NkvXXu0mjf0Xn?c literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_84664bc.pal b/graphics/slot_machine/firered/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_84664bc.pal rename to graphics/slot_machine/firered/match_lines.pal diff --git a/graphics/slot_machine/firered/payout_lights.pal b/graphics/slot_machine/firered/payout_lights.pal new file mode 100644 index 000000000..b95e4b5e7 --- /dev/null +++ b/graphics/slot_machine/firered/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +238 172 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 205 32 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/firered/reel_icons.png b/graphics/slot_machine/firered/reel_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..9ebb2b7a798a262eae9e78b196926a4148a358b0 GIT binary patch literal 5968 zcmV-W7q94vP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3&cawWTNMgKVp4}o9<62k$z2+zR7_d=F#`>tPv z9hR!3)8xra0vo%b(*3XheCa>#wK!^M*LD_dh-`+Ry9judk=Ef6g<1P9*s+m#%T;c>HtR{5erAzh0N0 z=gEFP=j~6+`T1Y=&uM>K*597DK`~C}e6^%Yo!=|= z&$UaX{d4htfAqK7W&e4-{(2rDw;KJtF8yz>*WWKw{&Gk1$Cdx`#@qS#hW@>F z@16PH{k1x8N~JXYEb6zVe2+MAQOf##O!*%C?>rvgxA8q$;-+JVZZ5ue5|cu;pENn* z^5lNMw`^{)m0JeCOWCD|dED3-r8xonm$Q16%d$bLF_6TgtxxDdYT{fD&=-&do@r16ieZQOTo}0bSHG z>5p^grM9x@fb?FDq{kv^RhlzPT$|4f`Hn5U{CXK`p%J}m9kj-()2!Ay_!(`2A@8-f z)O*)H`s~(St2XVbIy5-SM;&eSp<|3WZ1}9R%|3OGIj2pxVigMOrZ$pIGjr#n&Z(VG zJ4d*$vg&H9FI{8JWy?44*=_f&d+fPw`zfa$#{cLU>C9utuUw#X+wE8Hxbxce2i9JF z?e(W`y!q_;?_HChvHeTe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F-uy+_f7z*I zCx~&5OYu;s-_SgnGTF_MrG}-0M4CI{@jVQ-GQ2P(qO1 zwHsW1^!`{zjrK(~!Z0$7G~fB_~xgrw1q$4rp`>COc0r(4*BE?}IdFwc~N z*NubO6yM>}n#^}t`2)V^VMuD})5>@og&*p`0CzxWBh&kNHW$`2lPBJush=}u8fL`U z{ki9Mn#8*LmWH0TS4*#B9w=G=1Y`}gIW*NAy)d6tq>z&-DH(@AnogezpGZ(>AjTm1 z6JWJha!9iKb)77)XY_)<#O4u=rJGhNXa1)}W5~MuPC==-9LDa^Ee-;1td|sMD&7g( zfSc?$Wr4EOX2~sPQx7o`_lg5tuv!jDV{&F<8z_NyrJHB9InbuU$Z^#Ok0x2 z`^+R7EnllTbZ_du^~E;fq=_S-re0he-ypup=b1&ClXY~=@8aa7)Z@X7LCSfqYd;@f zCx#u7$B98!ZKfK7l%H3As8k}JS&)%QAoj@;VgBPC;Fvo;B=}}_7v5myzD_Nn<3lN|^r-o@t6u15a`PiZ95r}`7n9nVV}UVh zfb-7rLXF?05F+t0Od9fhYeg|;4wJ$op5%xV3Sd7in-6J=QTHzE=O3?p!s>g*nJE6t zw0V3;f2CJ4RK=OI1>wb!D_e6DR|KHd!-SvvT?!RWXgaDEFHxY%3WMFN*%k0tNLkpR h-I4=_+^KjhS4R`yv3Sy&75dMo;OXwoZRCXI{tbmQ5l;XB literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/leafgreen/button_pressed.png b/graphics/slot_machine/leafgreen/button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..f913eab9ae227d467a8037ce19e57a91bd28a1aa GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=5z5hR>co`~Uxc_q`y; zIhs*RERTNcF5VLKe~IS1DGdM5I<5&~kVuk9N{Rw1F3+m40#XH@E{-7_GhKW4^0pZ8 zwBFa*H;*Z7!-UPx#kWfriMdrQcK|w+P|No2b|E&N2YR%sE-h2P%wAH;@-Z23G?f~}9bJd(F_Avn7 z|IPpA=EeX2K|w+G_V)i$QZcmuLDm2NoKgUs0G#ehq@=z7?g0Pxq{XB;?%n|2|IPpA z=EeX2K|w+G_V#;&gT>9w|BG{4d;isg|CCC_y;?#4w5;~#YW7M1#sB}_|IPpA=5Om8 z@c;k<>q$gGR9Ja2^mmP3!EbGFwgT~MJojkcsC65HfVIgA;Iodv({v_HlLZf>NF1hI!${XE$v0all*i~R=dlL|v0%_} zGT4*n+7*b&(8Xkfgaxo3M6S>x%dKVH0Emj%+I)_|YwDBWSkfWZt1rF}rYo0x&~;zD zmR^C=mlPfxy;!?By8^>oVE862kO7YH0IctTiMvN#lL7i3UIUwK{occkV8F4bgV9sLNIw)aJZW7_sfwW@bTF9H-Gj8biF-*maEN2!Y)N_K;Pd1|6O1{h1R+aZD{1? z3SeTk2**`az{?r=S8xLa=H=OdG4oacBe{gKRc#|+O1w3|rWl*1v6V+gf3#fQJ%<0S zXzmEQQ#0Ii`lx1@8JKq<<7wyXFIu?Dcc-Si9gD!G1RcYJy(cl)n>y@Iz}m$4(3=C? zK$U(#Hsm vaFLS6^$7O{oEt02mGq4tnm558(8s{P%`(~pGqD_G00000NkvXXu0mjfPz&qZ literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_lg_8465d9c.pal b/graphics/slot_machine/leafgreen/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_lg_8465d9c.pal rename to graphics/slot_machine/leafgreen/match_lines.pal diff --git a/graphics/slot_machine/leafgreen/payout_lights.pal b/graphics/slot_machine/leafgreen/payout_lights.pal new file mode 100644 index 000000000..8e0f65ee2 --- /dev/null +++ b/graphics/slot_machine/leafgreen/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +139 222 82 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +197 246 139 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/leafgreen/reel_icons.png b/graphics/slot_machine/leafgreen/reel_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb9b739aec6cbf5b25c93cb82d5c4d50343d26c GIT binary patch literal 5860 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3&uawExZh5zR&yo7uq0W2q<5#E89?++BGXL|1V zM%ZDoTN24)RVHw79;I~u>px%m559UHmb$17A0zYCy?dSfV)^Im=V!_N^ZoNxzi;vU zx7XACG-};Ca=q%AJG1Nef|D=()~S;eNR;KZd))t z`#kygbF=?tJKz6xe^2|zw*L0KE5$g%`C3i&w$d`+Ew0kye{1veGrkK4u_}J=ZScJ{ z`{&xF+W)zDzkd5$?ehG--hMAd%Hw;$_*;#>uNV2->+RQN>TfG5e_r{wH}=WD8v6Iz zy?5-r`?I^*2bCJ>yQx36^7)Me7o}{Uj}0Emf8lriJe-HI#ZAW!-CR6&Dqbqpex;XF zW_jg)e(thaVz0L=$4Z0r%u3vb=AN$%ZSd!caEYV<$Y@^pZb0t=`Xm+ ze`#!^gYqe}vB8scs+zh^Yt~I{n3|c}^y&=?6CbY0&E4nZqLWikK0P^N z&Q(`ieaRY2mn~m&1E1Zu?6Gy*_B~HM?J)jl98JfLpLxp#O1EFR3)5o4>kNzGM4a*UH~I_wTz_zFmus_0MtoXV-XH^^a4Opc9Fn(XrYK9oOgpfUeQA zY^C=aor|7j4+4`)*NQ}QPKl1u!G24XSAO;G&(8hZz9s4ZtG?C$sdFh>_y5tk6s`Mq z?qB=%4_!O+qbTjupqRp_X>J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X>qbok5IZ#)bX%s zTzZJpB-ukrlEyeRLs1k7@wnSPif^St96NpF#rv4Xkt0=#_er|j?m?u012)obKKLVq#*0Vk!S>0NyzO)wBTK-sS)R000006aZld00001 zbW%=J06^y0W&i*LP)S5VR7i>4mrY0)ot@pVPho4<%VabyLJ!eL zL%|+O*o7W#+#x-76BvXPDmi3Nr7NK_#2mIg)q=3z(m|(6ArV$k2$VEPyQdTkyX;xm z?VEWYGiy_CE!4j{y!Ye1|L6NsQT`1<05H%*wrv3uoi8s0uiMiJMm^9eU(6j zHwOZU==l(23lRXMa3y~O|6>u6NTBoR89}O|SDA!WqQ91^yG-t=NDnJ#>5fAuIL{j?vpq%Yq+q9_mXMz0K7Nm^IXV^xV^`5kAE|trr(rWB0N|lSnQY{h9w;}jE5zFO8 z3Ko*VE|Ov?87?v%XJ;TG=sa8{XUOTZ5j@XJ667_Tp2t&g2nR}PjgIhYQGe*tY*$I` zc{MN@I3$GtOb^VT6{f_%euJ1h&1Q}3GqxZD*THP=ah=&T2`<6)=H40~g2tzCHv^d_ zH=?{8pT&)|AE+trhk;mg3Hj{$mvBb$|OM9V39an4o|9_0YT^oNeUpm6{ckaF=B1$=8FtY4!$+tI`! zgg&ESm;%1p>4TP!u-TN9hIPAKbQ}#E5g65SZ-L`1Xb6u8fTk}y! z5x@fLTptf-%fLIEK0%@1?RQna^_6r3`u?^bbb;T|S-hzsn){b-5Dw(z4z+lPk$e1?*4w_BP0eQ39jRSx>S*B{T*uK+&upU;!u wyJ=ticcQ>^LJrmBp2;-#2iFVwkKd+$0SBLhz~t=x*#H0l07*qoM6N<$f|(3NQ2+n{ diff --git a/graphics/slot_machine/unk_8465524.pal b/graphics/slot_machine/unk_8465524.pal deleted file mode 100644 index b8cf64bae..000000000 --- a/graphics/slot_machine/unk_8465524.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -98 98 90 -255 255 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 255 0 diff --git a/graphics/slot_machine/unk_8465544.png b/graphics/slot_machine/unk_8465544.png deleted file mode 100644 index 0e3154f61bb46d4393bfa7a39b34f16cabb0c7f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^96-E)g&9a5&NHwEQU(D&A+A6=DJkmze;`c+_|Nb< zR_q;6A!A99UoeBivm0qZPN=7gV~EDYpoGE8!sKjt?!=fYmZ~Spv_Pbz~d)l8zKKfIBieJ_ZDUmOH a$jT-G@yGywn#{yW0} diff --git a/graphics/slot_machine/unk_8465930.pal b/graphics/slot_machine/unk_8465930.pal deleted file mode 100644 index f2c377a3f..000000000 --- a/graphics/slot_machine/unk_8465930.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -57 57 49 -230 230 230 -255 255 255 -238 172 0 -197 74 24 -205 90 0 -255 205 32 -222 123 32 -255 164 41 -57 148 255 -164 222 255 -0 49 123 -139 0 0 -98 98 90 -0 0 0 diff --git a/graphics/slot_machine/unk_8465950.pal b/graphics/slot_machine/unk_8465950.pal deleted file mode 100644 index 634aa770d..000000000 --- a/graphics/slot_machine/unk_8465950.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_8465970.pal b/graphics/slot_machine/unk_8465970.pal deleted file mode 100644 index 1d932206e..000000000 --- a/graphics/slot_machine/unk_8465970.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -74 74 213 -115 172 255 -115 164 74 -156 238 74 -255 90 0 -255 164 41 -255 238 32 -222 41 0 -189 189 189 -156 156 156 -123 123 123 -90 90 90 -65 65 65 -0 0 0 diff --git a/graphics/slot_machine/unk_8465990.pal b/graphics/slot_machine/unk_8465990.pal deleted file mode 100644 index 2c2b3d843..000000000 --- a/graphics/slot_machine/unk_8465990.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -238 172 0 -172 106 106 -222 156 156 -148 82 82 -197 131 131 -8 123 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -222 123 32 -255 205 32 -205 90 0 diff --git a/graphics/slot_machine/unk_84659b0.pal b/graphics/slot_machine/unk_84659b0.pal deleted file mode 100644 index 742063525..000000000 --- a/graphics/slot_machine/unk_84659b0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -213 57 0 -205 90 0 -255 255 255 -238 172 0 -0 0 197 -180 65 0 -180 65 0 -0 106 0 -0 106 0 -82 123 255 -246 156 0 -246 156 0 -41 180 82 -41 180 82 -0 0 0 diff --git a/graphics/slot_machine/unk_84659d0.png b/graphics/slot_machine/unk_84659d0.png deleted file mode 100644 index 5223d0d3fd183aa4beb285503bd718d5590b913f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1736 zcmV;(1~>VMP)Ht_7{>W8+#f&~;GPyJi=vHuiZBGN5`-gE708GHGvrbR;KQH8@JsjLhcNs?so8o3B-ReJ0L&f0NHc(J z$q#B-0bN>B0U%>ePXVyzBnbcsOVE7;wF88#!~!tt^+sXXLxb{kyXRrpMKk06&E_8U zr_m|FB>+k}lTp8a7KVHMK0O``4#M#2V8HoDt^?;E4TlfH@Y--Vld(48vCMxQ;Hi}V zI>3unz<&<#N*-w)PVvtpqoRJZfA$Rk&HgMJ#DjyY0K_a|2@nn2!w1&@Xb)#cda9?> zDHK3JbhfwG2LR11dUpT*vx6{3vkG{5eEjl3*hXUjHBx|jL}zCPa7KV<_hSe^vj*_; zxD5el77D1IltRCp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H;QHg77C4FRGrE3 zmW^8At|)GH3~K#RpD0@_fm*ZLJsy9@@hkCKS)A$d_wk9cQ-lVT)quK^O|G~ut{DjQ zi(3;3RRf?o{A545z*!-M34VPmZ+8}|L9kDj)~8+2!1%KG`I(=`U{aP}f=)#HNkDRf zpJD;=Nm-UatpnOt)>w6c6#PiVAw4b2ua1$C{ig!jWLqFsrzke3sT0JiLvk}z6*wH| zT6GD}_4rr{6owFn)ExP3xhx`_YkeGX11>_)iE57g4rm*1A3s|Zh3kV0J@*#m!_f!u z{|b^xbt>aJ<$j^}n$I|z=7;b7Ou4OE5E3CV+hiMgGhqUW@o~7Udg25*0>36Cf`FO) z1yt3>x|Po2;9HZ^iox8^GG~K&V5f?{ylCDG0{;Lv91=(2ZnDS#0000n diff --git a/graphics/slot_machine/unk_lg_8464434.png b/graphics/slot_machine/unk_lg_8464434.png deleted file mode 100644 index f7c3b0d7c5c8377426a9ded185183edd88992d76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1200 zcmV;h1W)^kP))obKKLVq#*0Vk!S>0NyzO)wBTK-sS)R000006aZld00001 zbW%=J06^y0W&i*LE=fc|R7i>4mQ8FMMHGN{Zd7W}jyEmMdL5LpsT-V&Gft=?aj?A! z?WI!HSPe(gXbDGL%7Vm!(uOPtDiW2SRRfaY=0qUp)@&m;xzMEBlHP#U6_qNrNNJ?r zIDpE`&d-iRDF=j5^AcP8KEHW?GdnYy_Fo8q5Vk!6jPsC*K^}Dt3{;L`CIgj91nf%u zM?t|>go1vg$lroA#{DWt=b_OCq|QNF>QQ1eQ=vnsM+F#6PeTec@+};QDvdaa#{-$G z1fsk$6hKtZO#l`m0F=U=`~^J4A}W!<;MFq%bj|RX&{-n?dEIcCoYa9qXD)9z4jJG$ zC&(&`rjh`%?gk0Kn9kfcF&KhT48RUzh^B#9^ zRoRQ2T@le%8R!%7J7yW^-4F@QW~LF!O!vx+S9|Uu)N`*-W?an@x7lh|_yBb>o;a>c z5G?i~w3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=^4b;h+Gb_;195X7D6H=T>~GG~ z1AhklyT$%QUhosp<5~4gMpt>X$#q{Tz!kh=xRW3NN#>sU zBj699h$l}m5<4;U*>d#PZD1rQ2^8hY-;65(ui%OgKK=)+nQ`CR*Z{VP=iB zfHl4rjG+arjjc$tta=b>R-)BoEwsz#TAYpphKdiRY_3g8a(HEOZKho&*OGLE^w=&; zvo|fcQEys+dNU`@+Gh0;wW}RPc4yw3^(Ol>*q_1vW~SK+`&+4Y`gE%^?>*jA*!Z5u z_=WK}h8sf$m!uJ#0jFnQjL30uR6D0G#|3r*NgAC#l1=5?7cg=iPBVvpA!PIL8>dh= z1vQ2#xXXE9E(7x}XOp=QbxzhLklG%{IiUegQVnV5?I6N;M&~%`HKdtm_qN;pfsSwj zX-G5g{9WaNuJe!rY3A+VZ64?b4=Iplp513W&@~=XAkB0h@Qa7jTjMas066r3fr^q} zAf>J#H(B5EtLh1~x5`xHy}ox3czq9E&{RD(VbA)NHY?lZd5d0sKk~H!U^2Rcs0k!? z0|>o<%*GQ44LXNdOveMBt3%AC<6$ulFYBFLXNbaC%h+y&5Ygyk;SOHD zl>+ebPp-4gY}uVeNWPOr@pxLd5)Us7Y~R3QR#Q*DgA@rl1{+gRsuIiYGK5IPIc(D5;FnTA(#6 zRT=#+ZK{F_Bl#&9C0)Ey`1?_`8#O0uE=9#AE+@fv@1$ZcE+t}P$GTIf&5KGJHe z$$kWJ?HB~ndgmjlI~T=({pFy>Fa=zaRAkYDills0Ft16~%(=_zoPbT{UnEjpbDS}k zH4Gf(UtCk??s>Gfdc2M+&h{%lCa!A1+{{Vp@iE`nCkqf$?+5( zRH<_-eV{G;uE-CQ8D~i*&f!OhpdQSA@)l%CwDNxebglE(N4dKx00000NkvXXu0mjf D@<#uX diff --git a/graphics/slot_machine/unk_lg_8465dbc.pal b/graphics/slot_machine/unk_lg_8465dbc.pal deleted file mode 100644 index 790cb6b64..000000000 --- a/graphics/slot_machine/unk_lg_8465dbc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -255 90 0 -222 41 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465ddc.pal b/graphics/slot_machine/unk_lg_8465ddc.pal deleted file mode 100644 index 32932dfb2..000000000 --- a/graphics/slot_machine/unk_lg_8465ddc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465dfc.pal b/graphics/slot_machine/unk_lg_8465dfc.pal deleted file mode 100644 index 82eae667f..000000000 --- a/graphics/slot_machine/unk_lg_8465dfc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 90 0 -222 41 0 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465f00.png b/graphics/slot_machine/unk_lg_8465f00.png deleted file mode 100644 index 56ce87fce8d0277a86e54cf0267326b2f1e32dcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 842 zcmV-Q1GW5#P) zF>BjE6vy9JxINrp=+Ifo=nRe4WJtI`L+h!@m{plFd&(|IGIlUDUqBG(7*GwSG|&-X3FvG52^m?|a3aYlgSU$vtl~ho{NwdlfyI;~t%al&>JapGpB+I>#nMdEAX7 zwZ21d4$FGhipS6ZA&F%i=P>2{qMf1b-3qz{_K2N(YGFiBIC*2exk+M^QNkE~{D9?7 zT1KJzd4Epgsn1TYeT8M#^JS9Rn8kTd+{Av;XM4Om!6$LbxYMbP#jY)2ie!7l{T=|( zEp(`K1A2!8!S=9#+F;|2w*zO^wL4}dw@`+RQ58eNGKbQB*%`wa3kP-#2ytRddhAT( zAh`MP?J7e_FN%zH#(Jb_3f~MM%QyLjDb+D9nLM8iFX{mkKxCNIAiwr?^MJ?3sT&zi zbkbC5O?}lHDh=cDoSV2Tb<#HMR}g3lPKIZ6Vh3Ju%I$m@>Q>PlYjKyj_;a38+q}RG z!)?K5P0V=0iCGVG0~1cHMwJ9+IHC$Sepi#)?J?A#HKo1wdNrFG;v}CxZ8(udW1Pe} zO$%>$SEP{nC6R6YLtbH1w&rCikzLN#yoDE9s}*^itIvdEOx7h2nI%Ks{;ZBFXWsZs zQy6Pa=P_G0{=(oH^L)NYbqFjNH}LZ29n5>3*_g#C%ohdYU%kap0Ky*Tm8rJVWCz%K z`Mk7rTbYB-MrrDMzk21jzxP)iYL81zUZJhN0-EYeP0rD{kB$@ -$(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu.4bpp \ - $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp - @cat $^ >$@ - $(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 822 -Wnum_tiles @@ -462,12 +457,15 @@ graphics/link/321start.4bpp: %.4bpp: %.png $(TEXTWINDOWGFXDIR)/signpost.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 19 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_8466620.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/combos_window.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 66 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_84659d0.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 138 -Wnum_tiles +$(SLOTMACHINEGFXDIR)/leafgreen/bg.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 134 -Wnum_tiles + $(TEACHYTVGFXDIR)/tiles.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 233 -Wnum_tiles diff --git a/src/slot_machine.c b/src/slot_machine.c index b89412a7e..1b79bf9f8 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -13,48 +13,92 @@ #include "strings.h" #include "constants/songs.h" -#define SLOT_IMAGE_7 0 -#define SLOT_IMAGE_ROCKET 1 -#define SLOT_IMAGE_PIKACHU 2 -#define SLOT_IMAGE_PSYDUCK 3 -#define SLOT_IMAGE_CHERRIES 4 -#define SLOT_IMAGE_MAGNEMITE 5 -#define SLOT_IMAGE_SHELLDER 6 +#define NUM_REELS 3 +#define REEL_LENGTH 21 // Total number of icons per reel -#define SLOT_PAYOUT_NONE 0 -#define SLOT_PAYOUT_CHERRIES2 1 -#define SLOT_PAYOUT_CHERRIES3 2 -#define SLOT_PAYOUT_MAGSHELL 3 -#define SLOT_PAYOUT_PIKAPSY 4 -#define SLOT_PAYOUT_ROCKET 5 -#define SLOT_PAYOUT_7 6 +// Only 4 icons are actually visible per reel at a single +// time, with 1 on deck. Only 3 visible when not spinning. +#define REEL_LOAD_LENGTH 5 -#define ROWATTR_COL1POS 0 -#define ROWATTR_COL2POS 1 -#define ROWATTR_COL3POS 2 -#define ROWATTR_MINBET 3 +// 3 horizontal, 2 diagonal +#define NUM_MATCH_LINES 5 -#define SLOTTASK_GFX_INIT 0 -#define SLOTTASK_FADEOUT_EXIT 1 -#define SLOTTASK_UPDATE_LINE_LIGHTS 2 -#define SLOTTASK_CLEFAIRY_BOUNCE 3 -#define SLOTTASK_ANIM_WIN 4 -#define SLOTTASK_END_ANIM_WIN 5 -#define SLOTTASK_ANIM_LOSE 6 -#define SLOTTASK_ANIM_BETTING 7 -#define SLOTTASK_SHOW_AMOUNTS 8 -#define SLOTTASK_MSG_NO_COINS 9 -#define SLOTTASK_ASK_QUIT 10 -#define SLOTTASK_DESTROY_YESNO 11 -#define SLOTTASK_PRESS_BUTTON 12 -#define SLOTTASK_RELEASE_BUTTONS 13 -#define SLOTTASK_SHOWHELP 14 -#define SLOTTASK_HIDEHELP 15 +#define NUM_BUTTON_TILES 4 +#define NUM_DIGIT_SPRITES 4 + +enum { + PALSLOT_LINE_NORMAL = 4, // Loaded as part of sBg_Pal + PALSLOT_LINE_BET, + PALSLOT_LINE_MATCH, +}; + +enum { + GFXTAG_REEL_ICONS, + GFXTAG_CLEFAIRY, + GFXTAG_DIGITS, +}; + +enum { + PALTAG_REEL_ICONS_0, + PALTAG_REEL_ICONS_1, + PALTAG_REEL_ICONS_2, + PALTAG_REEL_ICONS_3, + PALTAG_REEL_ICONS_4, + PALTAG_CLEFAIRY, + PALTAG_DIGITS, +}; + +enum { + ICON_7, + ICON_ROCKET, + ICON_PIKACHU, + ICON_PSYDUCK, // Psyduck in FR, Slowpoke in LG + ICON_CHERRIES, + ICON_MAGNEMITE, // Magnemite in FR, Voltorb in LG + ICON_SHELLDER, // Shellder in FR, Staryu in LG +}; + +enum { + PAYOUT_NONE, + PAYOUT_CHERRIES2, + PAYOUT_CHERRIES3, + PAYOUT_MAGSHELL, + PAYOUT_PIKAPSY, + PAYOUT_ROCKET, + PAYOUT_7, + NUM_PAYOUT_TYPES +}; + +enum { + ROWATTR_COL1POS, + ROWATTR_COL2POS, + ROWATTR_COL3POS, + ROWATTR_MINBET, +}; + +enum { + SLOTTASK_GFX_INIT, + SLOTTASK_FADEOUT_EXIT, + SLOTTASK_UPDATE_LINE_LIGHTS, + SLOTTASK_CLEFAIRY_BOUNCE, + SLOTTASK_ANIM_WIN, + SLOTTASK_END_ANIM_WIN, + SLOTTASK_ANIM_LOSE, + SLOTTASK_ANIM_BETTING, + SLOTTASK_SHOW_AMOUNTS, + SLOTTASK_MSG_NO_COINS, + SLOTTASK_ASK_QUIT, + SLOTTASK_DESTROY_YESNO, + SLOTTASK_PRESS_BUTTON, + SLOTTASK_RELEASE_BUTTONS, + SLOTTASK_SHOWHELP, + SLOTTASK_HIDEHELP, +}; struct SlotMachineState { MainCallback savedCallback; - u16 machineidx; + u16 machineIdx; u16 currentReel; u16 machineBias; u16 slotRewardClass; @@ -62,22 +106,22 @@ struct SlotMachineState u16 bet; u8 taskId; u8 spinReelsTaskId; - bool32 reelIsSpinning[3]; - s16 reelPositions[3]; - s16 reelSubpixel[3]; - s16 destReelPos[3]; - s16 reelStopOrder[3]; + bool32 reelIsSpinning[NUM_REELS]; + s16 reelPositions[NUM_REELS]; + s16 reelSubpixel[NUM_REELS]; + s16 destReelPos[NUM_REELS]; + s16 reelStopOrder[NUM_REELS]; u32 reel2BiasInPlay; - bool32 winFlags[5]; + bool32 winFlags[NUM_MATCH_LINES]; u16 payout; }; struct SlotMachineGfxManager { - u32 field_00[3]; - struct Sprite *reelIconSprites[3][5]; - struct Sprite *creditDigitSprites[4]; - struct Sprite *payoutDigitSprites[4]; + u32 field_00[NUM_REELS]; // Never read + struct Sprite *reelIconSprites[NUM_REELS][REEL_LOAD_LENGTH]; + struct Sprite *creditDigitSprites[NUM_DIGIT_SPRITES]; + struct Sprite *payoutDigitSprites[NUM_DIGIT_SPRITES]; struct Sprite *clefairySprites[2]; vu16 * reelIconAffineParamPtr; }; @@ -96,13 +140,13 @@ struct SlotMachineSetupTaskData // align 2 s32 bg1X; bool32 yesNoMenuActive; - u16 buttonPressedTiles[3][4]; - u16 buttonReleasedTiles[3][4]; - u8 field_005C[0x800]; - u8 bg0TilemapBuffer[0x800]; - u8 bg1TilemapBuffer[0x800]; - u8 bg2TilemapBuffer[0x800]; - u8 bg3TilemapBuffer[0x800]; + u16 buttonPressedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u16 buttonReleasedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u8 unusedBuffer[BG_SCREEN_SIZE]; + u8 bg0TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg1TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg2TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg3TilemapBuffer[BG_SCREEN_SIZE]; }; // size: 285C struct LineStateTileIdxList @@ -198,7 +242,7 @@ static const u8 sSecondReelBiasCheckIndices[][2] = { {0x04, 0x06} }; -static const u8 sThirdReelBiasCheckIndices[][3] = { +static const u8 sThirdReelBiasCheckIndices[NUM_MATCH_LINES][3] = { {0x00, 0x03, 0x06}, // top row {0x01, 0x04, 0x07}, // middle row {0x02, 0x05, 0x08}, // bottom row @@ -206,7 +250,7 @@ static const u8 sThirdReelBiasCheckIndices[][3] = { {0x02, 0x04, 0x06} // bl-tr }; -static const u8 sRowAttributes[][4] = { +static const u8 sRowAttributes[NUM_MATCH_LINES][4] = { {0x00, 0x04, 0x08, 0x03}, // tl-br {0x00, 0x03, 0x06, 0x02}, // top row {0x01, 0x04, 0x07, 0x01}, // middle row @@ -214,150 +258,193 @@ static const u8 sRowAttributes[][4] = { {0x02, 0x04, 0x06, 0x03} // bl-tr }; -static const u16 sReelBiasChances[][7] = { - {0x1fa1, 0x2eab, 0x3630, 0x39f3, 0x3bd4, 0x3bfc, 0x0049}, - {0x1f97, 0x2ea2, 0x3627, 0x39e9, 0x3bca, 0x3bf8, 0x0049}, - {0x1f91, 0x2e9b, 0x3620, 0x39e3, 0x3bc4, 0x3bf4, 0x0049}, - {0x1f87, 0x2e92, 0x3617, 0x39d9, 0x3bba, 0x3bef, 0x0050}, - {0x1f7f, 0x2e89, 0x360e, 0x39d1, 0x3bb2, 0x3bea, 0x0050}, - {0x1fc9, 0x2efc, 0x3696, 0x3a63, 0x3c49, 0x3c8b, 0x0073}, +static const u16 sReelBiasChances[][NUM_PAYOUT_TYPES] = { + { + [PAYOUT_NONE] = 0x1fa1, + [PAYOUT_CHERRIES2] = 0x2eab, + [PAYOUT_CHERRIES3] = 0x3630, + [PAYOUT_MAGSHELL] = 0x39f3, + [PAYOUT_PIKAPSY] = 0x3bd4, + [PAYOUT_ROCKET] = 0x3bfc, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f97, + [PAYOUT_CHERRIES2] = 0x2ea2, + [PAYOUT_CHERRIES3] = 0x3627, + [PAYOUT_MAGSHELL] = 0x39e9, + [PAYOUT_PIKAPSY] = 0x3bca, + [PAYOUT_ROCKET] = 0x3bf8, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f91, + [PAYOUT_CHERRIES2] = 0x2e9b, + [PAYOUT_CHERRIES3] = 0x3620, + [PAYOUT_MAGSHELL] = 0x39e3, + [PAYOUT_PIKAPSY] = 0x3bc4, + [PAYOUT_ROCKET] = 0x3bf4, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f87, + [PAYOUT_CHERRIES2] = 0x2e92, + [PAYOUT_CHERRIES3] = 0x3617, + [PAYOUT_MAGSHELL] = 0x39d9, + [PAYOUT_PIKAPSY] = 0x3bba, + [PAYOUT_ROCKET] = 0x3bef, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1f7f, + [PAYOUT_CHERRIES2] = 0x2e89, + [PAYOUT_CHERRIES3] = 0x360e, + [PAYOUT_MAGSHELL] = 0x39d1, + [PAYOUT_PIKAPSY] = 0x3bb2, + [PAYOUT_ROCKET] = 0x3bea, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1fc9, + [PAYOUT_CHERRIES2] = 0x2efc, + [PAYOUT_CHERRIES3] = 0x3696, + [PAYOUT_MAGSHELL] = 0x3a63, + [PAYOUT_PIKAPSY] = 0x3c49, + [PAYOUT_ROCKET] = 0x3c8b, + [PAYOUT_7] = 0x0073, + }, }; -static const u8 sReelIconAnimByReelAndPos[][21] = { +static const u8 sReelIconAnimByReelAndPos[NUM_REELS][REEL_LENGTH] = { { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_7, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU + ICON_7, + ICON_PSYDUCK, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_7, + ICON_SHELLDER, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_CHERRIES, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_7, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_ROCKET, + ICON_SHELLDER, + ICON_PIKACHU }, { - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PSYDUCK, + ICON_CHERRIES }, { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_ROCKET + ICON_7, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_ROCKET }, }; static const u16 sPayoutTable[] = { - [SLOT_PAYOUT_NONE] = 0, - [SLOT_PAYOUT_CHERRIES2] = 2, - [SLOT_PAYOUT_CHERRIES3] = 6, - [SLOT_PAYOUT_MAGSHELL] = 8, - [SLOT_PAYOUT_PIKAPSY] = 15, - [SLOT_PAYOUT_ROCKET] = 100, - [SLOT_PAYOUT_7] = 300 + [PAYOUT_NONE] = 0, + [PAYOUT_CHERRIES2] = 2, + [PAYOUT_CHERRIES3] = 6, + [PAYOUT_MAGSHELL] = 8, + [PAYOUT_PIKAPSY] = 15, + [PAYOUT_ROCKET] = 100, + [PAYOUT_7] = 300 }; -static const u16 sSpritePal_ReelIcons_0[] = INCBIN_U16("graphics/slot_machine/unk_8464974.gbapal"); -static const u16 sSpritePal_ReelIcons_1[] = INCBIN_U16("graphics/slot_machine/unk_8464994.gbapal"); -static const u16 sSpritePal_ReelIcons_2[] = INCBIN_U16("graphics/slot_machine/unk_84649b4.gbapal"); -static const u16 sSpritePal_ReelIcons_3[] = INCBIN_U16("graphics/slot_machine/unk_84649d4.gbapal"); -static const u16 sSpritePal_ReelIcons_4[] = INCBIN_U16("graphics/slot_machine/unk_84649f4.gbapal"); #if defined(FIRERED) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_8464a14.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_846506c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_846506c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/firered/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/clefairy.4bpp.lz"); #elif defined(LEAFGREEN) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464434.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_lg_8464a3c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464a3c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/clefairy.4bpp.lz"); #endif -static const u16 sSpritePal_Digits[] = INCBIN_U16("graphics/slot_machine/unk_8465524.gbapal"); -static const u32 sSpriteTiles_Digits[] = INCBIN_U32("graphics/slot_machine/unk_8465544.4bpp.lz"); +static const u16 sDigits_Pal[] = INCBIN_U16("graphics/slot_machine/digits.gbapal"); +static const u32 sDigits_Tiles[] = INCBIN_U32("graphics/slot_machine/digits.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {(const void *)sSpriteTiles_ReelIcons, 0xe00, 0}, - {(const void *)sSpriteTiles_Clefairy, 0xc00, 1}, - {(const void *)sSpriteTiles_Digits, 0x280, 2}, + {.data = sReelIcons_Tiles, .size = 0xe00, .tag = GFXTAG_REEL_ICONS}, + {.data = sClefairy_Tiles, .size = 0xc00, .tag = GFXTAG_CLEFAIRY}, + {.data = sDigits_Tiles, .size = 0x280, .tag = GFXTAG_DIGITS}, }; static const struct SpritePalette sSpritePalettes[] = { - {sSpritePal_ReelIcons_0, 0}, - {sSpritePal_ReelIcons_1, 1}, - {sSpritePal_ReelIcons_2, 2}, - {sSpritePal_ReelIcons_3, 3}, - {sSpritePal_ReelIcons_4, 4}, - {sSpritePal_Clefairy, 5}, - {sSpritePal_Digits, 6}, - {NULL} + {.data = sReelIcons_Pal[0], .tag = PALTAG_REEL_ICONS_0}, + {.data = sReelIcons_Pal[1], .tag = PALTAG_REEL_ICONS_1}, + {.data = sReelIcons_Pal[2], .tag = PALTAG_REEL_ICONS_2}, + {.data = sReelIcons_Pal[3], .tag = PALTAG_REEL_ICONS_3}, + {.data = sReelIcons_Pal[4], .tag = PALTAG_REEL_ICONS_4}, + {.data = sClefairy_Pal, .tag = PALTAG_CLEFAIRY}, + {.data = sDigits_Pal, .tag = PALTAG_DIGITS}, + {} }; +static const u16 sReelIconPaletteTags[] = { #if defined(FIRERED) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 0, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 4, - [SLOT_IMAGE_SHELLDER] = 3 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_0, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_4, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_3, #elif defined(LEAFGREEN) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 3, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 1, - [SLOT_IMAGE_SHELLDER] = 1 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_3, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_1, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_1, #endif +}; static const u16 sReelIconAffineParams[] = { 0x0120, 0x011f, 0x011e, 0x011d, 0x011c, 0x011b, 0x011a, 0x0119, 0x0118, 0x0117, 0x0116, 0x0115, 0x0114, 0x0113, 0x0112, 0x0111, @@ -451,13 +538,13 @@ static const union AnimCmd sAnimCmd_ReelIcon_Shellder_2[] = { }; static const union AnimCmd *const sAnimTable_ReelIcons[] = { - sAnimCmd_ReelIcon_7, - sAnimCmd_ReelIcon_Rocket, - sAnimCmd_ReelIcon_Pikachu, - sAnimCmd_ReelIcon_Psyduck, - sAnimCmd_ReelIcon_Cherries, - sAnimCmd_ReelIcon_Magnemite, - sAnimCmd_ReelIcon_Shellder, + [ICON_7] = sAnimCmd_ReelIcon_7, + [ICON_ROCKET] = sAnimCmd_ReelIcon_Rocket, + [ICON_PIKACHU] = sAnimCmd_ReelIcon_Pikachu, + [ICON_PSYDUCK] = sAnimCmd_ReelIcon_Psyduck, + [ICON_CHERRIES] = sAnimCmd_ReelIcon_Cherries, + [ICON_MAGNEMITE] = sAnimCmd_ReelIcon_Magnemite, + [ICON_SHELLDER] = sAnimCmd_ReelIcon_Shellder, sAnimCmd_ReelIcon_Pikachu_2, sAnimCmd_ReelIcon_Psyduck_2, sAnimCmd_ReelIcon_Cherries_2, @@ -475,8 +562,8 @@ static const union AffineAnimCmd *const sAffineAnimTable_ReelIcons_Unused[] = { }; static const struct SpriteTemplate sSpriteTemplate_ReelIcons = { - .tileTag = 0, - .paletteTag = 0, + .tileTag = GFXTAG_REEL_ICONS, + .paletteTag = PALTAG_REEL_ICONS_0, .oam = &sOamData_ReelIcons, .anims = sAnimTable_ReelIcons, .images = NULL, @@ -564,8 +651,8 @@ static const union AnimCmd *const sAnimTable_Digits[] = { }; static const struct SpriteTemplate sSpriteTemplate_Digits = { - .tileTag = 2, - .paletteTag = 6, + .tileTag = GFXTAG_DIGITS, + .paletteTag = PALTAG_DIGITS, .oam = &sOamData_Digits, .anims = sAnimTable_Digits, .images = NULL, @@ -620,8 +707,8 @@ static const union AnimCmd *const sAnimTable_Clefairy[] = { }; static const struct SpriteTemplate sSpriteTemplate_Clefairy = { - .tileTag = 1, - .paletteTag = 5, + .tileTag = GFXTAG_CLEFAIRY, + .paletteTag = PALTAG_CLEFAIRY, .oam = &sOamData_Clefairy, .anims = sAnimTable_Clefairy, .images = NULL, @@ -649,36 +736,25 @@ bool8 (*const sSlotMachineSetupTasks[])(u8 *, struct SlotMachineSetupTaskData *) }; #if defined(FIRERED) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_8465930.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_8465950.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_8465970.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_8465990.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_84659b0.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_84659d0.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_84661d4.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_84664bc.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_84664dc.gbapal","graphics/slot_machine/unk_84664fc.gbapal", "graphics/slot_machine/unk_846651c.gbapal"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/firered/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/firered/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/firered/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.bin.lz"); #elif defined(LEAFGREEN) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652bc.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652dc.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652fc.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_lg_846531c.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_lg_846533c.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_lg_846535c.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465ab8.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465d9c.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465dbc.gbapal","graphics/slot_machine/unk_lg_8465ddc.gbapal", "graphics/slot_machine/unk_lg_8465dfc.gbapal"); -#endif -static const u32 sBg2Tiles_C0[] = INCBIN_U32("graphics/slot_machine/unk_846653c.4bpp.lz"); -static const u16 sBgPal_70[] = INCBIN_U16("graphics/slot_machine/unk_84665c0.gbapal"); -static const u16 sBgPal_80[] = INCBIN_U16("graphics/slot_machine/unk_84665e0.gbapal"); -static const u16 sBgPal_90[] = INCBIN_U16("graphics/slot_machine/unk_8466600.gbapal"); -#if defined(FIRERED) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_8466620.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_8466998.bin.lz"); -#elif defined(LEAFGREEN) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465f00.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8466278.bin.lz"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/leafgreen/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.bin.lz"); #endif static const struct BgTemplate sBgTemplates[] = { @@ -758,15 +834,15 @@ static const u16 sLineTiles_BLTR[] = { 0x0204, 0x0205, 0x0206, 0x0224, 0x0225, 0x0226, 0x01e7, 0x0207, 0x018c, 0x01ac, 0x0131, 0x0151, 0x00d6, 0x00f6, 0x00b7, 0x00b8, 0x00b9, 0x00d7, 0x00d8, 0x00d9 }; -static const struct LineStateTileIdxList sLineStateTileIdxs[] = { - { sLineTiles_TLBR, NELEMS(sLineTiles_TLBR) }, - { sLineTiles_TopRow, NELEMS(sLineTiles_TopRow) }, - { sLineTiles_MiddleRow, NELEMS(sLineTiles_MiddleRow) }, - { sLineTiles_BottomRow, NELEMS(sLineTiles_BottomRow) }, - { sLineTiles_BLTR, NELEMS(sLineTiles_BLTR) } +static const struct LineStateTileIdxList sLineStateTileIdxs[NUM_MATCH_LINES] = { + { sLineTiles_TLBR, ARRAY_COUNT(sLineTiles_TLBR) }, + { sLineTiles_TopRow, ARRAY_COUNT(sLineTiles_TopRow) }, + { sLineTiles_MiddleRow, ARRAY_COUNT(sLineTiles_MiddleRow) }, + { sLineTiles_BottomRow, ARRAY_COUNT(sLineTiles_BottomRow) }, + { sLineTiles_BLTR, ARRAY_COUNT(sLineTiles_BLTR) } }; -static const u8 sWInningLineFlashPalIdxs[2] = {2, 4}; +static const u8 sWinningLineFlashPalIdxs[2] = {2, 4}; static const struct WindowTemplate sYesNoWindowTemplate = { .bg = 0, @@ -778,7 +854,7 @@ static const struct WindowTemplate sYesNoWindowTemplate = { .baseBlock = 0x9F }; -static const u16 sReelButtonMapTileIdxs[][4] = { +static const u16 sReelButtonMapTileIdxs[NUM_REELS][NUM_BUTTON_TILES] = { {0x0229, 0x022a, 0x0249, 0x024a}, {0x022e, 0x022f, 0x024e, 0x024f}, {0x0233, 0x0234, 0x0253, 0x0254} @@ -792,9 +868,9 @@ void PlaySlotMachine(u16 machineIdx, MainCallback savedCallback) SetMainCallback2(savedCallback); else { - if (machineIdx > 5) + if (machineIdx >= ARRAY_COUNT(sReelBiasChances)) machineIdx = 0; - sSlotMachineState->machineidx = machineIdx; + sSlotMachineState->machineIdx = machineIdx; sSlotMachineState->savedCallback = savedCallback; InitSlotMachineState(sSlotMachineState); SetMainCallback2(CB2_InitSlotMachine); @@ -809,12 +885,12 @@ static void InitSlotMachineState(struct SlotMachineState * ptr) ptr->bet = 0; ptr->payout = 0; // for whatever reason, the loop does not use the ptr param - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { sSlotMachineState->reelIsSpinning[i] = FALSE; - sSlotMachineState->reelPositions[i] = 0; - sSlotMachineState->reelSubpixel[i] = 0; - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->reelPositions[i] = 0; + sSlotMachineState->reelSubpixel[i] = 0; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; } } @@ -952,16 +1028,16 @@ static void MainTask_SlotsGameLoop(u8 taskId) if (IsReelSpinning(sSlotMachineState->currentReel) == 0 && !IsSlotMachineSetupTaskActive(0)) { sSlotMachineState->currentReel++; - if (sSlotMachineState->currentReel >= 3) + if (sSlotMachineState->currentReel >= NUM_REELS) { sSlotMachineState->slotRewardClass = CalcPayout(); sSlotMachineState->bet = 0; sSlotMachineState->currentReel = 0; - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_NONE) + if (sSlotMachineState->slotRewardClass == PAYOUT_NONE) SetMainTask(MainTask_DarnNoPayout); else { - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_7) IncrementGameStat(GAME_STAT_SLOT_JACKPOTS); ResetMachineBias(); SetMainTask(MainTask_WinHandlePayout); @@ -1098,7 +1174,7 @@ static void MainTask_WinHandlePayout(u8 taskId) switch (data[0]) { case 0: - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == PAYOUT_7) PlayFanfare(MUS_SLOTS_JACKPOT); else PlayFanfare(MUS_SLOTS_WIN); @@ -1201,7 +1277,7 @@ static void Task_SpinReels(u8 taskId) s32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { if (sSlotMachineState->reelIsSpinning[i] || sSlotMachineState->reelSubpixel[i] != 0) { @@ -1213,12 +1289,12 @@ static void Task_SpinReels(u8 taskId) sSlotMachineState->reelSubpixel[i] = 0; sSlotMachineState->reelPositions[i]--; if (sSlotMachineState->reelPositions[i] < 0) - sSlotMachineState->reelPositions[i] = 20; + sSlotMachineState->reelPositions[i] = REEL_LENGTH - 1; } if (sSlotMachineState->reelPositions[i] != sSlotMachineState->destReelPos[i]) continue; } - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; sSlotMachineState->reelIsSpinning[i] = FALSE; } } @@ -1229,10 +1305,8 @@ static void StartReels(void) { s32 i; - for (i = 0; i < 3; i++) - { + for (i = 0; i < NUM_REELS; i++) sSlotMachineState->reelIsSpinning[i] = TRUE; - } } static void StopCurrentReel(u16 whichReel, u16 whichReel2) @@ -1263,7 +1337,7 @@ static s16 GetNextReelPosition(u16 whichReel) { position--; if (position < 0) - position = 20; + position = REEL_LENGTH - 1; } return position; } @@ -1282,7 +1356,7 @@ static void StopReel1(u16 whichReel) { for (j = 0, destPos = nextPos - i + 1; j < 3; j++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(1, sReelIconAnimByReelAndPos[whichReel][destPos])) break; @@ -1298,7 +1372,7 @@ static void StopReel1(u16 whichReel) { for (i = 0, destPos = nextPos + 1; i < 3; i++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { @@ -1310,7 +1384,7 @@ static void StopReel1(u16 whichReel) for (i = 0, destPos = nextPos; i < 4; i++, destPos--) { if (destPos < 0) - destPos = 20; + destPos = REEL_LENGTH - 1; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { posToSample[numPosToSample] = i + 1; @@ -1328,7 +1402,7 @@ static void StopReel1(u16 whichReel) } destPos = nextPos - destPos; if (destPos < 0) - destPos += 21; + destPos += REEL_LENGTH; sSlotMachineState->reelStopOrder[0] = whichReel; sSlotMachineState->destReelPos[whichReel] = destPos; } @@ -1342,11 +1416,11 @@ static void StopReel2(u16 whichReel) firstStoppedReelId = sSlotMachineState->reelStopOrder[0]; firstStoppedReelPos = sSlotMachineState->reelPositions[firstStoppedReelId] + 1; - if (firstStoppedReelPos >= 21) + if (firstStoppedReelPos >= REEL_LENGTH) firstStoppedReelPos = 0; nextPos = GetNextReelPosition(whichReel); pos = nextPos + 1; - if (pos >= 21) + if (pos >= REEL_LENGTH) pos = 0; numPossiblePositions = 0; for (i = 0; i < 5; i++) @@ -1358,12 +1432,12 @@ static void StopReel2(u16 whichReel) } pos--; if (pos < 0) - pos = 20; + pos = REEL_LENGTH - 1; } if (numPossiblePositions == 0) { sSlotMachineState->reel2BiasInPlay = 0; - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1375,7 +1449,7 @@ static void StopReel2(u16 whichReel) } pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->reelStopOrder[1] = whichReel; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1405,7 +1479,7 @@ static void StopReel3(u16 whichReel) } if (numPossiblePositions == 0) { - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1414,7 +1488,7 @@ static void StopReel3(u16 whichReel) pos = possiblePositions[0]; pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1431,10 +1505,10 @@ static bool32 TwoReelBiasCheck(s32 reel0id, s32 reel0pos, s32 reel1id, s32 reel1 icons[3 * reel0id + i] = sReelIconAnimByReelAndPos[reel0id][reel0pos]; icons[3 * reel1id + i] = sReelIconAnimByReelAndPos[reel1id][reel1pos]; reel0pos++; - if (reel0pos >= 21) + if (reel0pos >= REEL_LENGTH) reel0pos = 0; reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; } @@ -1501,40 +1575,40 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) firstStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[0]] + 1; secondStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[1]] + 1; reelPos++; - if (firstStoppedPos >= 21) + if (firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (secondStoppedPos >= 21) + if (secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; for (i = 0; i < 3; i++) { icons[sSlotMachineState->reelStopOrder[0] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[0]][firstStoppedPos]; icons[sSlotMachineState->reelStopOrder[1] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[1]][secondStoppedPos]; icons[reelId * 3 + i] = sReelIconAnimByReelAndPos[reelId][reelPos]; - if (++firstStoppedPos >= 21) + if (++firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (++secondStoppedPos >= 21) + if (++secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (++reelPos >= 21) + if (++reelPos >= REEL_LENGTH) reelPos = 0; } switch (biasIcon) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: for (i = 0; i < 3; i++) { if (TestReelIconAttribute(1, icons[i])) return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]]) return FALSE; } return TRUE; - case SLOT_PAYOUT_CHERRIES2: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES2: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return FALSE; @@ -1545,15 +1619,15 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) return TRUE; } return FALSE; - case SLOT_PAYOUT_CHERRIES3: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES3: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; } return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; @@ -1565,19 +1639,19 @@ static bool32 TestReelIconAttribute(s32 attr, s32 icon) { switch (attr) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: return icon ^ 4 ? TRUE : FALSE; - case SLOT_PAYOUT_CHERRIES2: - case SLOT_PAYOUT_CHERRIES3: - return icon == SLOT_IMAGE_CHERRIES ? TRUE : FALSE; - case SLOT_PAYOUT_MAGSHELL: - return icon == SLOT_IMAGE_MAGNEMITE || icon == SLOT_IMAGE_SHELLDER ? TRUE : FALSE; - case SLOT_PAYOUT_PIKAPSY: - return icon == SLOT_IMAGE_PIKACHU || icon == SLOT_IMAGE_PSYDUCK ? TRUE : FALSE; - case SLOT_PAYOUT_ROCKET: - return icon == SLOT_IMAGE_ROCKET ? TRUE : FALSE; - case SLOT_PAYOUT_7: - return icon == SLOT_IMAGE_7 ? TRUE : FALSE; + case PAYOUT_CHERRIES2: + case PAYOUT_CHERRIES3: + return icon == ICON_CHERRIES ? TRUE : FALSE; + case PAYOUT_MAGSHELL: + return icon == ICON_MAGNEMITE || icon == ICON_SHELLDER ? TRUE : FALSE; + case PAYOUT_PIKAPSY: + return icon == ICON_PIKACHU || icon == ICON_PSYDUCK ? TRUE : FALSE; + case PAYOUT_ROCKET: + return icon == ICON_ROCKET ? TRUE : FALSE; + case PAYOUT_7: + return icon == ICON_7 ? TRUE : FALSE; default: return FALSE; } @@ -1588,18 +1662,18 @@ static u8 ReelIconToPayoutRank(s32 iconId) switch (iconId) { default: - case SLOT_IMAGE_CHERRIES: - return SLOT_PAYOUT_CHERRIES2; - case SLOT_IMAGE_MAGNEMITE: - case SLOT_IMAGE_SHELLDER: - return SLOT_PAYOUT_MAGSHELL; - case SLOT_IMAGE_PIKACHU: - case SLOT_IMAGE_PSYDUCK: - return SLOT_PAYOUT_PIKAPSY; - case SLOT_IMAGE_ROCKET: - return SLOT_PAYOUT_ROCKET; - case SLOT_IMAGE_7: - return SLOT_PAYOUT_7; + case ICON_CHERRIES: + return PAYOUT_CHERRIES2; + case ICON_MAGNEMITE: + case ICON_SHELLDER: + return PAYOUT_MAGSHELL; + case ICON_PIKACHU: + case ICON_PSYDUCK: + return PAYOUT_PIKAPSY; + case ICON_ROCKET: + return PAYOUT_ROCKET; + case ICON_7: + return PAYOUT_7; } } @@ -1607,22 +1681,22 @@ static void CalcSlotBias(void) { u16 rval = Random() / 4; s32 i; - const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineidx]; - for (i = 0; i < 6; i++) + const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineIdx]; + for (i = 0; i < NUM_PAYOUT_TYPES - 1; i++) { if (rval < biasChances[i]) break; } - if (sSlotMachineState->machineBias < SLOT_PAYOUT_ROCKET) + if (sSlotMachineState->machineBias < PAYOUT_ROCKET) { if (sSlotMachineState->biasCooldown == 0) { - if ((Random() & 0x3FFF) < biasChances[SLOT_PAYOUT_7]) + if ((Random() & 0x3FFF) < biasChances[PAYOUT_7]) sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; } if (sSlotMachineState->biasCooldown != 0) { - if (i == 0 && (Random() & 0x3FFF) < 0x2CCC) // 70% + if (i == 0 && (Random() & 0x3FFF) < (int)(0.7 * 0x3FFF)) // 70% sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; sSlotMachineState->biasCooldown--; } @@ -1642,7 +1716,7 @@ static u16 CalcPayout(void) s32 reel1pos, reel2pos, reel3pos; s32 bestMatch; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) sSlotMachineState->winFlags[i] = FALSE; bestMatch = 0; @@ -1653,20 +1727,20 @@ static u16 CalcPayout(void) for (i = 0; i < 3; i++) { reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; reel2pos++; - if (reel2pos >= 21) + if (reel2pos >= REEL_LENGTH) reel2pos = 0; reel3pos++; - if (reel3pos >= 21) + if (reel3pos >= REEL_LENGTH) reel3pos = 0; visibleIcons[0 * 3 + i] = sReelIconAnimByReelAndPos[0][reel1pos]; visibleIcons[1 * 3 + i] = sReelIconAnimByReelAndPos[1][reel2pos]; visibleIcons[2 * 3 + i] = sReelIconAnimByReelAndPos[2][reel3pos]; } sSlotMachineState->payout = 0; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (sSlotMachineState->bet >= sRowAttributes[i][ROWATTR_MINBET]) { @@ -1699,16 +1773,16 @@ static u8 GetPlayerBet(void) return sSlotMachineState->bet; } -static bool32 GetWinFlagByLine(int a0) +static bool32 GetWinFlagByLine(int lineId) { - return sSlotMachineState->winFlags[a0]; + return sSlotMachineState->winFlags[lineId]; } static bool32 LoadSpriteGraphicsAndAllocateManager(void) { s32 i; - for (i = 0; i < NELEMS(sSpriteSheets); i++) + for (i = 0; i < ARRAY_COUNT(sSpriteSheets); i++) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalettes(sSpritePalettes); sSlotMachineGfxManager = Alloc(sizeof(*sSlotMachineGfxManager)); @@ -1731,13 +1805,11 @@ static void InitGfxManager(struct SlotMachineGfxManager * manager) { s32 i, j; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { manager->field_00[i] = 0; - for (j = 0; j < 5; j++) - { + for (j = 0; j < REEL_LOAD_LENGTH; j++) manager->reelIconSprites[i][j] = NULL; - } } } @@ -1747,9 +1819,9 @@ static void CreateReelIconSprites(void) s32 i, j; s32 spriteId; s32 animId; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { spriteId = CreateSprite(&sSpriteTemplate_ReelIcons, 80 + 40 * i, 44 + 24 * j, 2); animId = sReelIconAnimByReelAndPos[i][j]; @@ -1772,11 +1844,11 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) s32 i, j; s32 reelPos, ypos; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { reelPos = *reelPosPtr; ypos = *yposPtr * 8; - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { sSlotMachineGfxManager->reelIconSprites[i][j]->y2 = ypos; { @@ -1791,7 +1863,7 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) } sSlotMachineGfxManager->reelIconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag(sReelIconPaletteTags[sReelIconAnimByReelAndPos[i][reelPos]]); reelPos++; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; } reelPosPtr++; @@ -1819,11 +1891,11 @@ static void CreateScoreDigitSprites(void) s32 i; s32 spriteId; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x55 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 85 + 7 * i, 30, 0); sSlotMachineGfxManager->creditDigitSprites[i] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x85 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 133 + 7 * i, 30, 0); sSlotMachineGfxManager->payoutDigitSprites[i] = &gSprites[spriteId]; } } @@ -1836,7 +1908,7 @@ static void UpdateCoinsDisplay(void) s32 divisor = 1000; s32 quotient; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { quotient = coins / divisor; StartSpriteAnim(sSlotMachineGfxManager->creditDigitSprites[i], quotient); @@ -1850,11 +1922,9 @@ static void UpdateCoinsDisplay(void) static void CreateClefairySprites(void) { - s32 spriteId; - - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0x10, 0x88, 1); + s32 spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 16, 136, 1); sSlotMachineGfxManager->clefairySprites[0] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0xE0, 0x88, 1); + spriteId = CreateSprite(&sSpriteTemplate_Clefairy, DISPLAY_WIDTH - 16, 136, 1); sSlotMachineGfxManager->clefairySprites[1] = &gSprites[spriteId]; sSlotMachineGfxManager->clefairySprites[1]->hFlip = TRUE; } @@ -1862,10 +1932,8 @@ static void CreateClefairySprites(void) static void SetClefairySpriteAnim(u8 animId) { s32 i; - for (i = 0; i < 2; i++) - { + for (i = 0; i < (int)ARRAY_COUNT(sSlotMachineGfxManager->clefairySprites); i++) StartSpriteAnim(sSlotMachineGfxManager->clefairySprites[i], animId); - } } static bool32 CreateSlotMachine(void) @@ -1875,7 +1943,7 @@ static bool32 CreateSlotMachine(void) struct SlotMachineSetupTaskData * ptr = Alloc(sizeof(struct SlotMachineSetupTaskData)); if (ptr == NULL) return FALSE; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) ptr->tasks[i].active = 0; ptr->yesNoMenuActive = FALSE; SetWordTaskArg(CreateTask(Task_SlotMachine, 2), 0, (uintptr_t)ptr); @@ -1898,7 +1966,7 @@ static void Task_SlotMachine(u8 taskId) struct SlotMachineSetupTaskData * ptr = (void *)GetWordTaskArg(taskId, 0); s32 i; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) { if (ptr->tasks[i].active) ptr->tasks[i].active = sSlotMachineSetupTasks[ptr->tasks[i].funcno](&ptr->tasks[i].state, ptr); @@ -1958,7 +2026,7 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgPositions(); ResetBgsAndClearDma3BusyFlags(FALSE); - InitBgsFromTemplates(0, sBgTemplates, NELEMS(sBgTemplates)); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); InitWindows(sWindowTemplates); SetBgTilemapBuffer(3, ptr->bg3TilemapBuffer); @@ -1966,29 +2034,29 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData CopyBgTilemapBufferToVram(3); ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_00, 0, 0x00, 0); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_C0, 0, 0xC0, 0); + DecompressAndCopyTileDataToVram(2, sBg_Tiles, 0, 0x00, 0); + DecompressAndCopyTileDataToVram(2, sButtonPressed_Tiles, 0, 0xC0, 0); SetBgTilemapBuffer(2, ptr->bg2TilemapBuffer); - CopyToBgTilemapBuffer(2, sBg2Map, 0, 0x00); + CopyToBgTilemapBuffer(2, sBg_Tilemap, 0, 0x00); CopyBgTilemapBufferToVram(2); - LoadPalette(sBgPal_00, 0x00, 0xA0); - LoadPalette(sBgPal_50, 0x50, 0x20); - LoadPalette(sBgPal_70, 0x70, 0x60); + LoadPalette(sBg_Pal, 0x00, sizeof(sBg_Pal)); + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_BET * 16, sizeof(sBgPal_MatchLines)); + LoadPalette(sCombosWindow_Pal, 0x70, sizeof(sCombosWindow_Pal)); LoadColor(RGB(30, 30, 31), pal); LoadUserWindowGfx2(0, 0x00A, 0xD0); LoadStdWindowGfxOnBg(0, 0x001, 0xF0); SetBgTilemapBuffer(0, ptr->bg0TilemapBuffer); FillBgTilemapBufferRect_Palette0(0, 0, 0, 2, 32, 30); - DecompressAndCopyTileDataToVram(1, sBg1Tiles, 0, 0, 0); - DecompressAndCopyTileDataToVram(1, sBg1Map, 0, 0, 1); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tiles, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tilemap, 0, 0, 1); CopyBgTilemapBufferToVram(1); LoadPalette(GetTextWindowPalette(2), 0xE0, 0x20); FillWindowPixelBuffer(1, 0xFF); PutWindowTilemap(1); - x = 236 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); + x = DISPLAY_WIDTH - 4 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); textColor[0] = TEXT_DYNAMIC_COLOR_6; textColor[1] = TEXT_COLOR_WHITE; textColor[2] = TEXT_COLOR_DARK_GRAY; @@ -2278,20 +2346,20 @@ static void SetLineStatesByBet(u16 * bgTilemapBuffer) switch (GetPlayerBet()) { case 0: - SetLineState(bgTilemapBuffer, 0, 4); - SetLineState(bgTilemapBuffer, 1, 4); - SetLineState(bgTilemapBuffer, 2, 4); - SetLineState(bgTilemapBuffer, 3, 4); - SetLineState(bgTilemapBuffer, 4, 4); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_NORMAL); break; case 3: - SetLineState(bgTilemapBuffer, 0, 5); - SetLineState(bgTilemapBuffer, 4, 5); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_BET); case 2: - SetLineState(bgTilemapBuffer, 1, 5); - SetLineState(bgTilemapBuffer, 3, 5); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_BET); case 1: - SetLineState(bgTilemapBuffer, 2, 5); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_BET); break; } } @@ -2318,11 +2386,11 @@ static void Task_FlashWinningLine(u8 taskId) switch (data[0]) { case 0: - LoadPalette(sBgPal_50, 0x60, 0x20); - for (i = 0; i < 5; i++) + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_MATCH * 16, sizeof(sBgPal_MatchLines)); + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 6); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_MATCH); } CopyBgTilemapBufferToVram(2); data[0]++; @@ -2331,7 +2399,7 @@ static void Task_FlashWinningLine(u8 taskId) if (data[1] == 0) { u16 y = gSineTable[data[2]] >> 7; - LoadPalette(&sBgPal_VictoryFlash[16 * y], 0x10, 0x20); + LoadPalette(&sBgPal_PayoutLight[y], 0x10, sizeof(sBgPal_PayoutLight[0])); data[2] += 32; data[2] &= 0x7F; data[1] = 8; @@ -2344,7 +2412,7 @@ static void Task_FlashWinningLine(u8 taskId) data[4] += 8; data[4] &= 0x7F; data[5] = gSineTable[data[4]] >> 5; - BlendPalettes(0x00000040, data[5], RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5], RGB_BLACK); } else { @@ -2354,22 +2422,24 @@ static void Task_FlashWinningLine(u8 taskId) data[4] = 0; data[5]++; data[5] &= 1; - BlendPalettes(0x00000040, data[5] * 8, RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5] * 8, RGB_BLACK); } } - for (i = 0; i < NELEMS(sWInningLineFlashPalIdxs); i++) - { - gPlttBufferFaded[sWInningLineFlashPalIdxs[i] + 0x60] = gPlttBufferUnfaded[sWInningLineFlashPalIdxs[i] + 0x60]; - } + for (i = 0; i < ARRAY_COUNT(sWinningLineFlashPalIdxs); i++) + gPlttBufferFaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16] = gPlttBufferUnfaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16]; break; case 2: - for (i = 0; i < 5; i++) + // Restore match lines to normal color + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 4); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_NORMAL); } - LoadPalette(sBgPal_10, 0x10, 0x20); + + // Restore payout lights to normal color + LoadPalette(&sBg_Pal[1], 0x10, sizeof(sBg_Pal[1])); + CopyBgTilemapBufferToVram(2); data[0]++; break; @@ -2408,9 +2478,9 @@ static void InitReelButtonTileMem(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; data->buttonReleasedTiles[i][j] = buffer[idx]; @@ -2421,12 +2491,12 @@ static void InitReelButtonTileMem(void) static void SetReelButtonPressed(u8 reel) { - if (reel < 3) + if (reel < NUM_REELS) { s32 i; struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_BUTTON_TILES; i++) { u16 idx = sReelButtonMapTileIdxs[reel][i]; buffer[idx] = data->buttonPressedTiles[reel][i]; @@ -2440,9 +2510,9 @@ static void ReleaseReelButtons(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; buffer[idx] = data->buttonReleasedTiles[i][j];