From ba8c89a77844f87d8841508216242512f99af896 Mon Sep 17 00:00:00 2001 From: kion Date: Fri, 11 Oct 2024 08:40:58 +0900 Subject: [PATCH] cycle frame color --- miku/paintings/room-203.png | Bin 1597 -> 1787 bytes src/ST47T.ts | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/miku/paintings/room-203.png b/miku/paintings/room-203.png index e7a3e0996d9cc313e8e5044bcf1d5dee5236dd80..71732a73698a8e7a7ec0aa134e8b3594c2ad00b0 100644 GIT binary patch delta 1654 zcmV-+28sE-4Eqg`LLEgd6$d+rIAo|!cCjLkwF*V35Nd^19ZW9$f+h`-Um<_IaOB6k zdyl(!fY7Wm&FV=2nr@q!R8q|4SH-?pgyx##3oJ%eXJTqcuGxNj|VzJc4 zN*A-TsS!^TM^#Oyd?Dwt%6Wf_vsSIM_Br_t!v%e1nd>yikisICAVGwJIx48broJlB zNwJWj^`wt~)b&f`Qpi;SBgX=2&>*{h@HhC~tyPRqc}d|U(EH*zALBsZF3@T?&iAq7 zv`&EFGjOGM{Iw=9`$>AEqeYK^p>5#ex}zz3z~v4w@?^-S>`FnJLa~1cyr0oC<$>W_ zAhhQ7)?UZy1CXVz(l@}tAuv&*>~)`e_jmX9@1AylKh?f+&g1UxzW@LLFi=cXMWZY2 zvRvKfUG1ZK=8BNI#f{ZvvApSp>3++w;i}Kd!M@nSL;#2d9Y_EG011=*0UHSl3JEYE_&4T0lOX~pe*~RLL_t(I%T3f@Xxl~@0PxQ% zd-vHBS?R;tTQk!=O}#kX){T+HHmTc=dXDhyP|Cm+q2yt6DI)7b8A*%Q8A={Pko#Z) zNvV~(p6LQxMafGEqP+x4lhS&YpH>*57K{->><8^TC{-YkdwD$4 zTT1vD>HzTNaMGMIDgZ}P5qh*VSM=d~;Q66T^F7%V1SpMYA0-#g*!_OSL zUY*GT)(J@U0MnEV)wE+?$MZJFQv_iiUp5GYAVjpnQqA+a2PiQ7ukq0H+m?X!`_H6Vd<+ZFL!G4^ z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d(G$FeciqNd#2sr4?XE}k%Otbe*gdgFi=cXMQcKE zbZ(H6b=XFks%Bnf@Os~|s?)!)t8vQ7^{%|@u-d`ux0?6q@!s_7?5+It_#;*q>;M1& z0b)x>L;#2d9Y_EG011=*0UHSk8Ur8)4bkbHlOX~pe*@o1L_t(I%T1KeYaC@5$KQDH zPzWTchKLB^l`b9>3JY-$3Q{)y0bwVH1rG^!D1#wwg-*ASmb%cq&=IT$msyArG%5SS z>Tx4)$R!X4_B~k8Y_l-kW0b99KrloZ-+rHWceZ&B!|eC7&(C+BmkF)gs>NX<&{{`A zh-v|Ee=Hzy6Z&V6MSfrf0Q_tpkb@?RsulzTpr@d}LvmgO)pOtra(J8mv7gTikQr@3 zL^{veP*4jaQ01=cF6TrLP_SWc03qChz*9s-?qAFR3a2{ps8S=5p8>0D+e3g?Rrx*x z!BC%T_(7o5&yN6xom>4uBMfWep=#Aol^8aNe-v|GxM9-Tj!HJrOCSPf=T@Eb8li#t zd&!>{Z4m1r{0|5E>g3(z_yauxZRH+RH9nnRx%J9bNUKjqELjA zEXBWd**pE3=d1^k9A^$kQZ`S+P!gb`S|p~i1=3&+wyM5TCIirAk3iez7<7?=pEBTA zMopx30(A@a_Kw#~+POC<%7)sI;UKw*mw2v6;CcuhQ*N-rx_{54OS2Qx7Nox4e=}#z zxXbR}X>8(5m)LYX8cDq?Jr;Q~Je%ONW4TUmsCOj}j0Nkm@rZH$-ajitmlV3Yf}>rR zUopm;hd4d!4Iqk81 z_?y!#72O{D9N@J9*xsfc?0%B|IuC&B^m1{2!6|QVV}{a;56g!?e7s^_040sHVghVm QasU7T07*qoM6N<$f`hlTMgRZ+ diff --git a/src/ST47T.ts b/src/ST47T.ts index 0017630..242e0ff 100644 --- a/src/ST47T.ts +++ b/src/ST47T.ts @@ -137,7 +137,22 @@ const updateRoom203 = (bin: Buffer, pngPath: string) => { const pngData = readFileSync(pngPath); const imgOfs = 0x29800; - const pal: number[] = []; + const pal: number[] = [ + 54262, 55216, 56111, 57113, 56280, 56913, 57036, 59960, 61940, 62235, 65535, + 60790, 59068, 63005, 62644, 62844, + ]; + + // 1 purple + // 7 darkish purple + // 9 dark green + // 10 dark grey + // 11 light green + const actualShifts = 7; + for (let i = 0; i < actualShifts; i++) { + // Remove the last element and insert it at the start + pal.unshift(pal.pop() as number); + } + const encodedLogo = encodeCutSceneTexture(pal, pngData); const mpTexture = decompress(Buffer.from(bin.subarray(imgOfs))); @@ -147,6 +162,7 @@ const updateRoom203 = (bin: Buffer, pngPath: string) => { // Update Palette const palOfs = 0x2f800; const red = encodeTexel(255, 0, 0, 255); + for (let i = 0; i < pal.length; i++) { bin.writeUInt16LE(pal[i], palOfs + 0x30 + i * 2); // bin.writeUInt16LE(red, palOfs + 0x30 + i * 2);