diff --git a/Codes.xml b/Codes.xml index 2d9644a..75fc64d 100644 --- a/Codes.xml +++ b/Codes.xml @@ -4048,8 +4048,8 @@ Instant Level Select レベル選択DX sup39(サポミク) - 0.1 - Oct 16, 2022 + 0.2 + Feb 05, 2023 ::: warning Shine Get Timer does not restart with this code. @@ -4109,20 +4109,8 @@ 4. これで好きなだけハニスキを練習できます。他のエリアに入ろうとする時に自動的にやり直すので、手動でやり直す必要がありません。必要であれば`B + 十字キー上`でやり直すこともできます。 - 040ED64C 4970C435 - 0410B100 496EE990 - 040EC420 4970D600 - 04236600 495C34C4 - 0410B3CC 496EE6DC - 040FBAD8 496FDF30 - 040F9D68 496FFD78 - 040EAB80 4970EEC0 - 077F9800 000002F4 - 3CA08040 80A50D80 - 70A00208 28800208 - 3C60817F 88030004 - 7C000379 4CC61202 - 4CA60020 7D8802A6 + C20F9B74 00000044 + 7C7D1B79 41820218 4800003D 00141516 0017181D 34000090 2F2E3020 32293328 @@ -4131,94 +4119,330 @@ 08090200 123457D0 24567000 12234070 23467001 7D2802A6 - 7D8803A6 3D40803E - 394A6000 816D97D0 - 54A6CF38 50A6F77A - 50A6E7BC 50A6D7FE - 54A0C738 50A0B77C - 7CC60378 54A4873F - 41820054 2C040009 - 41820098 3C00C84A - 6000C004 1C840003 - 5C04277E 5485103A - 2C06000C 408000BC - 2C06000A 408000D4 - 2C060008 40800090 - 3C005689 60000234 - 548C103A 5C0C652E - 7CC76378 54C8077E - 480000C4 A0EA000E - 2C060000 41820028 - 2C060004 41820028 - 2C06000A 41820028 - 7C0930AE 540744AE - 5408CFFE 1D080007 - 48000094 A00A000A - B00A000E 890B00DF - 4800008C A0E30000 - 89030002 48000078 - 3989000C 7C0C30AE - 540744AE 5007CFFE - 3C00AC1A 60005CA2 - 1D860003 5C08677E - 48000054 39890018 - 7C0C20AE 540744AE - 3C001373 60002301 - 5C082F7E 48000038 - 3989FFF8 54C016B8 - 7C0C006E 5C072F7E - 5007252E 800C0004 - 5C082F7E 48000018 - 3C001578 60009200 - 5C072F3E 60E70100 - 39000000 B0E30000 - 99030002 38000001 - 980300B3 98030004 - 990B00DF 38000000 - 900B00D8 A00B00CC - 60004000 54000524 - B00B00CC B0EA0012 - 54E0C63E 818A0020 - 3880003B 2C000007 - 41820010 2C00000E - 41820008 38800000 - B08C00E4 4E800020 - 3D80817F 880C0004 - 7C000379 4C820020 - 3800003C 4A9020C0 - 4BFFFDE1 40A60014 - 7FE3FB78 4A8F1115 - 3B800009 4A8F30F4 - 881F0064 4A8F29E8 - 3C60817F A0030004 - 2C000001 40820028 - A01F004C 5400062C - B01F004C 816D97D0 - 7F8AE378 A0EA000E - 4BFFFEB5 A0FC000A - B0FC000E 380000FF - 38810054 4A8F1108 - 3D80817F 888C0005 - 68840001 4A8EE414 - 4BFFFD71 40A6000C - 38600002 9061012C - 807F0020 4A911660 - 3C60817F 88030004 - 2C000001 40820008 - 4A911A7C 2805000E - 4A911910 4BFFFD3D - 40A60008 4AA3CB54 - 807E0020 38BFFFCC - 8803013B 4AA3CB28 - 3C60817F 38000000 - 98030004 7FA3EB78 - 4A90027C 00000000 + 3C60817F 3CA08040 + 80A50D80 816D97D0 + 38C00000 2C9D0001 + 88030005 7C000379 + 4C423042 41820084 + 70A00208 28000208 + 40A201A4 54A6CF38 + 50A6F77A 50A6E7BC + 50A6D7FE 54A0C738 + 50A0B77C 7CC60378 + 54A4873F 41820054 + 2C040009 41820098 + 3C00C84A 6000C004 + 1C840003 5C04277E + 5485103A 2C06000C + 408000BC 2C06000A + 408000D4 2C060008 + 40800090 3C005689 + 60000234 548C103A + 5C0C652E 7CC76378 + 54C8077E 480000C4 + A0FF000E 2C060000 + 41820028 2C060004 + 41820028 2C06000A + 41820028 7C0930AE + 540744AE 5408CFFE + 1D080007 48000094 + A01F000A B01F000E + 890B00DF 4800008C + A0E30000 89030002 + 48000078 3989000C + 7C0C30AE 540744AE + 5007CFFE 3C00AC1A + 60005CA2 1D860003 + 5C08677E 48000054 + 39890018 7C0C20AE + 540744AE 3C001373 + 60002301 5C082F7E + 48000038 3989FFF8 + 54C016B8 7C0C006E + 5C072F7E 5007252E + 800C0004 5C082F7E + 48000018 3C001578 + 60009200 5C072F3E + 60E70100 39000000 + B0E30000 99030002 + 38000001 980300B3 + 98030004 990B00DF + 38000000 900B00D8 + A00B00CC 60004000 + 54000524 B00B00CC + B0FF0012 54E0C63E + 819F0020 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BE + 3BBD0005 00000000 28400D50 00000021 017F0005 00000001 + C20EAB80 00000002 + A01C000E B01C0012 + 380000FF 00000000 + 000ED64B 00000000 + C60ECAAC 800ECABC 28400D51 00000022 017F0005 00000000 + 040EAB80 380000FF + 000ED64B 00000001 + 040ECAAC 38800100 + E0000000 00000000 + + + C2285FCC 00000044 + 7C7D1B79 41820218 + 4800003D 00141516 + 0017181D 34000090 + 2F2E3020 32293328 + 2A1FBA3C 371E213A + 0E2C3900 00010507 + 08090200 123457D0 + 24567000 12234070 + 23467001 7D2802A6 + 3C60817F 3CA0803F + 80A55458 816D9E60 + 38C00000 2C9D0001 + 88030005 7C000379 + 4C423042 41820084 + 70A00208 28000208 + 40A201A4 54A6CF38 + 50A6F77A 50A6E7BC + 50A6D7FE 54A0C738 + 50A0B77C 7CC60378 + 54A4873F 41820054 + 2C040009 41820098 + 3C00C84A 6000C004 + 1C840003 5C04277E + 5485103A 2C06000C + 408000BC 2C06000A + 408000D4 2C060008 + 40800090 3C005689 + 60000234 548C103A + 5C0C652E 7CC76378 + 54C8077E 480000C4 + A0FF000E 2C060000 + 41820028 2C060004 + 41820028 2C06000A + 41820028 7C0930AE + 540744AE 5408CFFE + 1D080007 48000094 + A01F000A B01F000E + 890B00DF 4800008C + A0E30000 89030002 + 48000078 3989000C + 7C0C30AE 540744AE + 5007CFFE 3C00AC1A + 60005CA2 1D860003 + 5C08677E 48000054 + 39890018 7C0C20AE + 540744AE 3C001373 + 60002301 5C082F7E + 48000038 3989FFF8 + 54C016B8 7C0C006E + 5C072F7E 5007252E + 800C0004 5C082F7E + 48000018 3C001578 + 60009200 5C072F3E + 60E70100 39000000 + B0E30000 99030002 + 38000001 980300B3 + 98030004 990B00DF + 38000000 900B00D8 + A00B00CC 60004000 + 54000524 B00B00CC + B0FF0012 54E0C63E + 819F0020 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BE + 3BBD0005 00000000 + 283F5428 00000021 + 017F0005 00000001 + C227726C 00000002 + A01C000E B01C0012 + 380000FF 00000000 + 00279D77 00000000 + C62791D8 802791E8 + 283F5429 00000022 + 017F0005 00000000 + 0427726C 380000FF + 00279D77 00000001 + 042791D8 38800100 + E0000000 00000000 + + + C229E080 00000044 + 7C7D1B79 41820218 + 4800003D 00141516 + 0017181D 34000090 + 2F2E3020 32293328 + 2A1FBA3C 371E213A + 0E2C3900 00010507 + 08090200 123457D0 + 24567000 12234070 + 23467001 7D2802A6 + 3C60817F 3CA08040 + 80A5BC24 816D9EC8 + 38C00000 2C9D0001 + 88030005 7C000379 + 4C423042 41820084 + 70A00208 28000208 + 40A201A4 54A6CF38 + 50A6F77A 50A6E7BC + 50A6D7FE 54A0C738 + 50A0B77C 7CC60378 + 54A4873F 41820054 + 2C040009 41820098 + 3C00C84A 6000C004 + 1C840003 5C04277E + 5485103A 2C06000C + 408000BC 2C06000A + 408000D4 2C060008 + 40800090 3C005689 + 60000234 548C103A + 5C0C652E 7CC76378 + 54C8077E 480000C4 + A0FF000E 2C060000 + 41820028 2C060004 + 41820028 2C06000A + 41820028 7C0930AE + 540744AE 5408CFFE + 1D080007 48000094 + A01F000A B01F000E + 890B00DF 4800008C + A0E30000 89030002 + 48000078 3989000C + 7C0C30AE 540744AE + 5007CFFE 3C00AC1A + 60005CA2 1D860003 + 5C08677E 48000054 + 39890018 7C0C20AE + 540744AE 3C001373 + 60002301 5C082F7E + 48000038 3989FFF8 + 54C016B8 7C0C006E + 5C072F7E 5007252E + 800C0004 5C082F7E + 48000018 3C001578 + 60009200 5C072F3E + 60E70100 39000000 + B0E30000 99030002 + 38000001 980300B3 + 98030004 990B00DF + 38000000 900B00D8 + A00B00CC 60004000 + 54000524 B00B00CC + B0FF0012 54E0C63E + 819F0020 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BE + 3BBD0005 00000000 + 283FBBF4 00000021 + 017F0005 00000001 + C228F45C 00000002 + A01C000E B01C0012 + 380000FF 00000000 + 00291F5F 00000000 + C62913C0 802913D0 + 283FBBF5 00000022 + 017F0005 00000000 + 0428F45C 380000FF + 00291F5F 00000001 + 042913C0 38800100 + E0000000 00000000 + + + C22A6170 00000044 + 7C7D1B79 41820218 + 4800003D 00141516 + 0017181D 34000090 + 2F2E3020 32293328 + 2A1FBA3C 371E213A + 0E2C3900 00010507 + 08090200 123457D0 + 24567000 12234070 + 23467001 7D2802A6 + 3C60817F 3CA08040 + 80A54484 816D9FA0 + 38C00000 2C9D0001 + 88030005 7C000379 + 4C423042 41820084 + 70A00208 28000208 + 40A201A4 54A6CF38 + 50A6F77A 50A6E7BC + 50A6D7FE 54A0C738 + 50A0B77C 7CC60378 + 54A4873F 41820054 + 2C040009 41820098 + 3C00C84A 6000C004 + 1C840003 5C04277E + 5485103A 2C06000C + 408000BC 2C06000A + 408000D4 2C060008 + 40800090 3C005689 + 60000234 548C103A + 5C0C652E 7CC76378 + 54C8077E 480000C4 + A0FF000E 2C060000 + 41820028 2C060004 + 41820028 2C06000A + 41820028 7C0930AE + 540744AE 5408CFFE + 1D080007 48000094 + A01F000A B01F000E + 890B00DF 4800008C + A0E30000 89030002 + 48000078 3989000C + 7C0C30AE 540744AE + 5007CFFE 3C00AC1A + 60005CA2 1D860003 + 5C08677E 48000054 + 39890018 7C0C20AE + 540744AE 3C001373 + 60002301 5C082F7E + 48000038 3989FFF8 + 54C016B8 7C0C006E + 5C072F7E 5007252E + 800C0004 5C082F7E + 48000018 3C001578 + 60009200 5C072F3E + 60E70100 39000000 + B0E30000 99030002 + 38000001 980300B3 + 98030004 990B00DF + 38000000 900B00D8 + A00B00CC 60004000 + 54000524 B00B00CC + B0FF0012 54E0C63E + 819F0020 2C000007 + 2C80000E 4C423382 + 3800003B 41820008 + 38000000 B00C00E4 + A00C00E2 540007FA + B00C00E2 54FDD7BE + 3BBD0005 00000000 + 28404454 00000021 + 017F0005 00000001 + C22975C4 00000002 + A01C000E B01C0012 + 380000FF 00000000 + 0029A0C7 00000000 + C6299528 80299538 + 28404455 00000022 + 017F0005 00000000 + 042975C4 380000FF + 0029A0C7 00000001 + 04299528 38800100 E0000000 00000000 - 040eb024 60000000 @@ -4373,4 +4597,171 @@ 38210030 00000000 + + AttemptCounter + misc + Attempt Counter + sup39(サポミク) + 0.1 + Feb 05, 2023 + drawText + + Display attempt count and success count of current area. + + This code can be used with 'Area Lock' of 'Instant Level Select'. + + + 現在のエリアの試行回数と成功回数を表示します。 + + このコードは「レベル選択DX」の「エリアロック」と併用できます。 + + + C210C3C8 00000008 + 7C7E1B78 3D80817F + A00C0476 A17E007C + 7C005800 B16C0476 + 896C0479 996C0478 + 39600000 996C04A8 + 39600001 4082000C + 816C04A4 396B0001 + 916C04A4 00000000 + C20EDAE8 00000005 + 7C0802A6 3D80817F + 816C04A4 3D6B0001 + 916C04A4 896C0479 + 996C0478 39600001 + 996C04A8 00000000 + C20EAB7C 00000008 + 3B836000 A19C000E + A17C000A 7C0C5800 + 41820028 3D80817F + 896C04A8 7D6B5B79 + 40820018 816C04A4 + 3D6B0001 916C04A4 + 896C0479 996C0478 + 60000000 00000000 + C22069D8 0000000A + 3D80817F 886C0478 + 3463FFFF 41A00040 + 986C0478 386C0490 + 38830010 3D808020 + 398C1EA8 7D8803A6 + 4E800021 3D80817F + 386C0480 388C047A + A0AC04A4 A0CC04A6 + 398C0238 7D8803A6 + 4E800021 00000000 + + + C2296F20 00000008 + 7C7E1B78 3D80817F + A00C0476 A17E007C + 7C005800 B16C0476 + 896C0479 996C0478 + 39600000 996C04A8 + 39600001 4082000C + 816C04A4 396B0001 + 916C04A4 00000000 + C227A214 00000005 + 7C0802A6 3D80817F + 816C04A4 3D6B0001 + 916C04A4 896C0479 + 996C0478 39600001 + 996C04A8 00000000 + C2277268 00000008 + 3B83A8E0 A19C000E + A17C000A 7C0C5800 + 41820028 3D80817F + 896C04A8 7D6B5B79 + 40820018 816C04A4 + 3D6B0001 916C04A4 + 896C0479 996C0478 + 60000000 00000000 + C2125544 0000000A + 3D80817F 886C0478 + 3463FFFF 41A00040 + 986C0478 386C0490 + 38830010 3D808012 + 398C1660 7D8803A6 + 4E800021 3D80817F + 386C0480 388C047A + A0AC04A4 A0CC04A6 + 398C0238 7D8803A6 + 4E800021 00000000 + + + C22AF6E0 00000008 + 7C7E1B78 3D80817F + A00C0476 A17E007C + 7C005800 B16C0476 + 896C0479 996C0478 + 39600000 996C04A8 + 39600001 4082000C + 816C04A4 396B0001 + 916C04A4 00000000 + C22923FC 00000005 + 7C0802A6 3D80817F + 816C04A4 3D6B0001 + 916C04A4 896C0479 + 996C0478 39600001 + 996C04A8 00000000 + C228F458 00000008 + 3B8310C0 A19C000E + A17C000A 7C0C5800 + 41820028 3D80817F + 896C04A8 7D6B5B79 + 40820018 816C04A4 + 3D6B0001 916C04A4 + 896C0479 996C0478 + 60000000 00000000 + C2138DF4 0000000A + 3D80817F 886C0478 + 3463FFFF 41A00040 + 986C0478 386C0490 + 38830010 3D808013 + 398C4F0C 7D8803A6 + 4E800021 3D80817F + 386C0480 388C047A + A0AC04A4 A0CC04A6 + 398C0238 7D8803A6 + 4E800021 00000000 + + + C22B7710 00000008 + 7C7E1B78 3D80817F + A00C0476 A17E007C + 7C005800 B16C0476 + 896C0479 996C0478 + 39600000 996C04A8 + 39600001 4082000C + 816C04A4 396B0001 + 916C04A4 00000000 + C229A564 00000005 + 7C0802A6 3D80817F + 816C04A4 3D6B0001 + 916C04A4 896C0479 + 996C0478 39600001 + 996C04A8 00000000 + C22975C0 00000008 + 3B839700 A19C000E + A17C000A 7C0C5800 + 41820028 3D80817F + 896C04A8 7D6B5B79 + 40820018 816C04A4 + 3D6B0001 916C04A4 + 896C0479 996C0478 + 60000000 00000000 + C21441B8 0000000A + 3D80817F 886C0478 + 3463FFFF 41A00040 + 986C0478 386C0490 + 38830010 3D808014 + 398C0390 7D8803A6 + 4E800021 3D80817F + 386C0480 388C047A + A0AC04A4 A0CC04A6 + 398C0238 7D8803A6 + 4E800021 00000000 + + diff --git a/Readme.md b/Readme.md index b5bc1cc..46f9df4 100644 --- a/Readme.md +++ b/Readme.md @@ -35,6 +35,8 @@ you may also need to check the following files: - [site/.vuepress/components/codes/ui.js](site/.vuepress/components/codes/ui.js): Specify the vue component for the configuration of the code. The version string will be passed as a property. +- [site/.vuepress/components/codes/preview.js](site/.vuepress/components/codes/preview.js): + Specify the `id` and the `getConfig(version)` function of the code to make it shown in preview. #### Reserved Memory @@ -67,18 +69,28 @@ Some codes store some states in the games memory starting from address 0x817F000 | ![](./docs/reserved.svg) | `0x110` | `0x237` | QF Timer: Timer Textbox | | ![](./docs/reserved.svg) | `0x238` | `0x347` | General Function (`drawText`) | | ![](./docs/buffer.svg) | `0x348` | `0x39B` | Buffer (QF Timer) | -| ![](./docs/reserved.svg) | `0x39C` | `0x3AF` | QF Section Timer: Background Options | -| ![](./docs/reserved.svg) | `0x3B0` | `0x3BF` | QF Section Timer: Text Options | +| ![](./docs/reserved.svg) | `0x39C` | `0x3AF` | QF Section Timer: Background Config | +| ![](./docs/reserved.svg) | `0x3B0` | `0x3BF` | QF Section Timer: Text Config | | ![](./docs/reserved.svg) | `0x3C0` | `0x3C8` | QF Section Timer: Format String | | ![](./docs/reserved.svg) | `0x3C9` | `0x3C9` | QF Section Timer: (Unused) | | ![](./docs/reserved.svg) | `0x3CA` | `0x3CB` | QF Section Timer: Section Count | | ![](./docs/reserved.svg) | `0x3CC` | `0x3CF` | QF Section Timer: Last Freezed Time | | ![](./docs/reserved.svg) | `0x3D0` | `0x40F` | QF Section Timer: Section Time Array | -| ![](./docs/reserved.svg) | `0x410` | `0x41F` | Pattern Selector: Background Options | -| ![](./docs/reserved.svg) | `0x424` | `0x433` | Pattern Selector: Text Options | +| ![](./docs/reserved.svg) | `0x410` | `0x41F` | Pattern Selector: Background Config | +| ![](./docs/reserved.svg) | `0x424` | `0x433` | Pattern Selector: Text Config | | ![](./docs/reserved.svg) | `0x434` | `0x440` | Pattern Selector: Format String | | ![](./docs/reserved.svg) | `0x441` | `0x475` | Pattern Selector: Pattern Data | -| ![](./docs/unallocated.svg) | `0x476` | `0xFFF` | Not Allocated | +| ![](./docs/reserved.svg) | `0x476` | `0x477` | Attempt Counter: Previous Area | +| ![](./docs/reserved.svg) | `0x478` | `0x478` | Attempt Counter: Display Timer | +| ![](./docs/reserved.svg) | `0x479` | `0x479` | Attempt Counter: Display Duration | +| ![](./docs/reserved.svg) | `0x47A` | `0x47F` | Attempt Counter: Format String | +| ![](./docs/reserved.svg) | `0x480` | `0x48F` | Attempt Counter: Text Config | +| ![](./docs/reserved.svg) | `0x490` | `0x4A3` | Attempt Counter: Background Config | +| ![](./docs/reserved.svg) | `0x4A4` | `0x4A5` | Attempt Counter: Success Count | +| ![](./docs/reserved.svg) | `0x4A6` | `0x4A7` | Attempt Counter: Attempt Count | +| ![](./docs/reserved.svg) | `0x4A8` | `0x4A8` | Attempt Counter: Got Shine Flag | +| ![](./docs/buffer.svg) | `0x4A9` | `0x4AF` | Buffer (Attempt Counter) | +| ![](./docs/unallocated.svg) | `0x4B0` | `0xFFF` | Not Allocated | ### Adding translations diff --git a/changelog.md b/changelog.md index efc9433..3e6845c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,11 @@ # Changelog +## Feb 05, 2023 +### Created 'Attempt Counter' +Display attempt count and success count of current area +### Updated 'Instant Level Select' +- Rewrote with C2 +- Go to level instantly without transition + ## Jan 31, 2023 ### Created 'Quarterframe Section Timer' Calculate and display section times whenever Quarterframe Timer freezes diff --git a/site/.vuepress/components/CodeInfo.vue b/site/.vuepress/components/CodeInfo.vue index 00c5124..12c0c19 100644 --- a/site/.vuepress/components/CodeInfo.vue +++ b/site/.vuepress/components/CodeInfo.vue @@ -19,6 +19,7 @@ diff --git a/site/.vuepress/components/codes/AttemptCounter/codegen.js b/site/.vuepress/components/codes/AttemptCounter/codegen.js new file mode 100644 index 0000000..b141dfd --- /dev/null +++ b/site/.vuepress/components/codes/AttemptCounter/codegen.js @@ -0,0 +1,55 @@ +import { parseJSON } from '../codegen.js'; +import { insts2hex, getDrawTextOpt, getFillRectParams } from '../asm'; +import { measureText } from '../text.js'; +import { int2hex } from '../utils.js'; +export const lskey = 'config/AttemptCounter'; + +export const defaultConfig = { + x: 152, + y: 125, + fontSize: 32, + fgRGB: 0xffff99, + fgA: 0xff, + fgRGB2: null, + fgA2: null, + bgRGB: 0x000000, + bgA: 0x40, + bgLeft: 4, + bgRight: 6, + bgTop: 4, + bgBot: 3, + duration: 60, +}; + +export const getPreviewText = () => '88\n99'; + +/** @returns {typeof defaultConfig} */ +export function getConfig() { + const config = + (typeof localStorage !== 'undefined' && parseJSON(localStorage.getItem(lskey))) || {}; + return { + ...defaultConfig, + ...config, + text: getPreviewText(), + }; +} + +/** + * @param {keyof typeof import('../addrs.js').ctxSpOff} version + * @param {string=} baseCode + */ +export default function codegen(version, baseCode) { + if (!baseCode) return ''; + + const config = getConfig(); + + let code = baseCode; + code += '077F0479 0000002B'; + code += int2hex(config.duration, 1); + code += '25640A256400'; // fmt = "%d\n%d" + code += insts2hex(getDrawTextOpt(config)); + code += insts2hex(getFillRectParams(config, measureText(getPreviewText(), version))); + code += '0000000000'; // padding + + return code.replace(/\s/g, ''); +} diff --git a/site/.vuepress/components/codes/AttemptCounter/config.vue b/site/.vuepress/components/codes/AttemptCounter/config.vue new file mode 100644 index 0000000..da8add2 --- /dev/null +++ b/site/.vuepress/components/codes/AttemptCounter/config.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/site/.vuepress/components/codes/CustomizedDisplay/config.vue b/site/.vuepress/components/codes/CustomizedDisplay/config.vue index 99becb1..c07a125 100644 --- a/site/.vuepress/components/codes/CustomizedDisplay/config.vue +++ b/site/.vuepress/components/codes/CustomizedDisplay/config.vue @@ -1,15 +1,15 @@ @@ -49,7 +49,8 @@ export default { text: format2previewText(defaultConfig[0].fmt, version), ...defaultConfig[0], }; - return {config, defaultConfigCell}; + const keys = config.map((e, i) => i); + return {config, defaultConfigCell, keys, nextKey: keys.length}; }, watch: { config: makeUpdateConfig(lskey, defaultConfig), @@ -60,6 +61,10 @@ export default { // if (window.confirm(this.l('deletionConfirm'))) { this.config.splice(i, 1); }, + /** @param {any} c */ + append(c) { + this.config.push({...c, key: this.nextKey++}); + }, }, } diff --git a/site/.vuepress/components/codes/codegen.js b/site/.vuepress/components/codes/codegen.js index 6f7fef6..9a0247a 100644 --- a/site/.vuepress/components/codes/codegen.js +++ b/site/.vuepress/components/codes/codegen.js @@ -3,6 +3,7 @@ import qft from './qft/codegen.js'; import qfst from './qfst/codegen.js'; import CustomizedDisplay from './CustomizedDisplay/codegen.js'; import PatternSelector from './PatternSelector/codegen.js'; +import AttemptCounter from './AttemptCounter/codegen.js'; export default { InstantRestart, @@ -10,6 +11,7 @@ export default { qfst, CustomizedDisplay, PatternSelector, + AttemptCounter, }; /** diff --git a/site/.vuepress/components/codes/labels.json b/site/.vuepress/components/codes/labels.json index d76356d..9fa231e 100644 --- a/site/.vuepress/components/codes/labels.json +++ b/site/.vuepress/components/codes/labels.json @@ -15,7 +15,12 @@ "left": "左", "right": "右", "top": "上", - "bottom": "下" + "bottom": "下", + "display": { + "duration": "表示時間:", + "frame": "(フレーム)", + "sec": "(秒)" + } }, "en-US": { "h3": { @@ -33,7 +38,12 @@ "left": "Left", "right": "Right", "top": "Top", - "bottom": "Bottom" + "bottom": "Bottom", + "display": { + "duration": "Display duration: ", + "frame": "(frame)", + "sec": "(sec)" + } }, "fr-FR": { "location": "Position : ", diff --git a/site/.vuepress/components/codes/preview.js b/site/.vuepress/components/codes/preview.js new file mode 100644 index 0000000..fdf3381 --- /dev/null +++ b/site/.vuepress/components/codes/preview.js @@ -0,0 +1,22 @@ +import * as qft from './qft/codegen.js'; +import * as qfst from './qfst/codegen.js'; +import * as CustomizedDisplay from './CustomizedDisplay/codegen.js'; +import * as PatternSelector from './PatternSelector/codegen.js'; +import * as AttemptCounter from './AttemptCounter/codegen.js'; + +export const previewIds = ['CustomizedDisplay', 'AttemptCounter', 'PatternSelector', 'qft', 'qfst']; + +/** + * Get code configs for preview + * @param {keyof typeof import('./addrs.js').ctxSpOff} version + */ +export const getConfigs = (version) => + Object.fromEntries( + Object.entries({ + qft, + qfst, + CustomizedDisplay, + PatternSelector, + AttemptCounter, + }).map(([k, v]) => [k, v.getConfig(version)]), + ); diff --git a/site/.vuepress/components/codes/ui.js b/site/.vuepress/components/codes/ui.js index d2a3676..c8f861b 100644 --- a/site/.vuepress/components/codes/ui.js +++ b/site/.vuepress/components/codes/ui.js @@ -3,6 +3,7 @@ import CustomizedDisplay from './CustomizedDisplay/config.vue'; import PatternSelector from './PatternSelector/config.vue'; import qft from './qft/config.vue'; import qfst from './qfst/config.vue'; +import AttemptCounter from './AttemptCounter/config.vue'; export default { InstantRestart, @@ -10,4 +11,5 @@ export default { PatternSelector, qft, qfst, + AttemptCounter, };