├── project ├── revision.sh ├── Makefile.user ├── text-files │ ├── geohit.inc │ │ ├── geohit-item-head-cr.inc │ │ ├── geohit-kart-head-cr.inc │ │ ├── geohit-item-setup-cr.inc │ │ ├── geohit-kart-setup-cr.inc │ │ ├── geohit-kart-objects-cr.inc │ │ ├── geohit-item-objects-cr.inc │ │ ├── geohit-kart-info-cr.inc │ │ └── geohit-item-info-cr.inc │ ├── kcl.inc │ │ ├── kcl-dump-octlist-cr.inc │ │ ├── kcl-dump-octree-cr.inc │ │ ├── kcl-head-cr.inc │ │ ├── kcl-dump-tridata-cr.inc │ │ ├── kcl-flag-template-cr.inc │ │ └── kcl-dump-head-cr.inc │ ├── minigame.inc │ │ ├── minigame-head-cr.inc │ │ ├── minigame-param-cr.inc │ │ ├── minigame-table-cr.inc │ │ ├── minigame-setup-cr.inc │ │ ├── minigame-table-head-cr.inc │ │ └── minigame-info-cr.inc │ ├── objflow.inc │ │ ├── objflow-head-cr.inc │ │ ├── objflow-setup-cr.inc │ │ ├── objflow-objects-cr.inc │ │ └── objflow-info-cr.inc │ ├── itemslot.inc │ │ ├── itemslot-head-cr.inc │ │ ├── itemslot-table-cr.inc │ │ ├── itemslot-param-cr.inc │ │ ├── itemslot-setup-cr.inc │ │ └── itemslot-info-cr.inc │ ├── lex.inc │ │ ├── lex-hexdump-sep-cr.inc │ │ ├── lex-elem-ritp-tabhead-cr.inc │ │ ├── lex-elem-feat-cr.inc │ │ ├── lex-elem-set1-develop-cr.inc │ │ ├── lex-elem-cann-cr.inc │ │ ├── lex-head-cr.inc │ │ ├── lex-elem-dev1-cr.inc │ │ ├── lex-setup-cr.inc │ │ ├── lex-elem-ctdn-cr.inc │ │ ├── lex-hexdump-cr.inc │ │ ├── lex-elem-set1-cr.inc │ │ ├── lex-elem-hipt-cr.inc │ │ ├── lex-elem-test-cr.inc │ │ └── lex-elem-ritp-cr.inc │ ├── mdl.inc │ │ ├── mdl-s0-tabhead-cr.inc │ │ ├── mdl-header-cr.inc │ │ ├── mdl-hexdump-cr.inc │ │ ├── mdl-setup-cr.inc │ │ ├── mdl-s0-cr.inc │ │ └── mdl-file-head-cr.inc │ ├── lpar.inc │ │ ├── lpar-sect-chat-example-cr.inc │ │ ├── lpar-head-cr.inc │ │ └── lpar-sect-chat-cr.inc │ ├── kmp.inc │ │ ├── kmp-itpt-ropt-cr.inc │ │ ├── kmp-jgpt-cr.inc │ │ ├── kmp-mspt-cr.inc │ │ ├── kmp-cnpt-cr.inc │ │ ├── kmp-enpt-cr.inc │ │ ├── kmp-pt-mask-cr.inc │ │ ├── kmp-itpt-cr.inc │ │ ├── kmp-ckph-cr.inc │ │ ├── kmp-enph-cr.inc │ │ ├── kmp-itph-cr.inc │ │ ├── kmp-defaults-cr.inc │ │ ├── kmp-param3-cr.inc │ │ ├── kmp-pt2-head-cr.inc │ │ ├── kmp-gobj-tabhead-cr.inc │ │ ├── kmp-pt-head-cr.inc │ │ ├── kmp-area-cr.inc │ │ ├── kmp-ph-cr.inc │ │ ├── kmp-came-cr.inc │ │ ├── kmp-stgi-cr.inc │ │ ├── kmp-ckpt-cr.inc │ │ ├── kmp-head-cr.inc │ │ ├── kmp-ktpt-cr.inc │ │ ├── kmp-param2-cr.inc │ │ ├── kmp-jgpt-auto-cr.inc │ │ ├── kmp-pt2-cr.inc │ │ ├── kmp-setup-cr.inc │ │ ├── kmp-enpt-ropt-cr.inc │ │ ├── kmp-poti-cr.inc │ │ ├── kmp-pt-info-cr.inc │ │ ├── kmp-gobj-cr.inc │ │ ├── kmp-param1-cr.inc │ │ └── kmp-macros-cr.inc │ ├── pat.inc │ │ ├── pat-header-cr.inc │ │ ├── pat-simple-cr.inc │ │ ├── pat-s0_base-cr.inc │ │ ├── pat-s0_list-cr.inc │ │ ├── pat-strings-cr.inc │ │ ├── pat-setup-cr.inc │ │ └── pat-file-head-cr.inc │ ├── ctcode.inc │ │ ├── ctcode-setup-arena-cr.inc │ │ ├── ctcode-list-syntax-brief-cr.inc │ │ ├── ctcode-head-cr.inc │ │ └── ctcode-setup-cr.inc │ ├── distrib.inc │ │ ├── distrib-param-cr.inc │ │ └── distrib-tracks-cr.inc │ ├── ledis.inc │ │ ├── ledis-tool-cr.inc │ │ ├── ledis-ledef-header-cr.inc │ │ ├── ledis-ledef-setup-cr.inc │ │ ├── ledis-ctdef-header-cr.inc │ │ ├── ledis-ledef-track-list-cr.inc │ │ └── ledis-ledef-cup-list-cr.inc │ ├── logo.inc │ ├── setup.inc │ │ ├── setup-header-cr.inc │ │ ├── setup-order-cr.inc │ │ ├── setup-include-cr.inc │ │ ├── setup-create-cr.inc │ │ ├── setup-exclude-cr.inc │ │ └── setup-encode-cr.inc │ ├── common.inc │ │ └── explain-objmgr-cr.inc │ ├── config.inc │ │ └── config-paths-cr.inc │ └── ui-head.inc ├── src │ ├── wrapper-wbmgt.c │ ├── wrapper-wctct.c │ ├── wrapper-wimgt.c │ ├── wrapper-wkclt.c │ ├── wrapper-wkmpt.c │ ├── wrapper-wlect.c │ ├── wrapper-wmdlt.c │ ├── wrapper-wpatt.c │ ├── wrapper-wstrt.c │ ├── ui │ │ ├── ui.def │ │ └── ui.h │ ├── lib-image3.c │ ├── liblzma │ │ ├── Precomp.h │ │ ├── LzHash.h │ │ ├── LzFindMt.h │ │ └── LzmaEnc.h │ ├── libbz2 │ │ ├── LICENSE │ │ └── randtable.c │ ├── db-dol.h │ ├── crypto │ │ ├── ssl-asm.S │ │ ├── ssl-asm.h │ │ ├── sha1dgst.c │ │ └── sha1_one.c │ ├── crypt.h │ ├── types.h │ ├── db-ctcode.h │ └── category.inc ├── scripts │ ├── distrib.list │ ├── kcl │ │ ├── minimap.txt │ │ ├── remove-sound-triggers.txt │ │ ├── remove-face-down-roads.txt │ │ └── lower-walls.txt │ ├── patch-all-messages.sh │ ├── test-wu8.sh │ ├── test-wszst.sh │ └── minimap.sh ├── setup │ ├── sendto-install.bat │ ├── sendto-uninstall.bat │ ├── windows-sendto │ │ ├── create-autoadd-library.bat │ │ ├── convert-to-SZS.bat │ │ ├── convert-to-WBZ.bat │ │ ├── normalize-SZS.bat │ │ ├── adjust-minimap.bat │ │ └── clean-KCL-of-SZS.bat │ ├── windows-uninstall.bat │ ├── setup-install.sh │ ├── windows-install.exe │ ├── szs.def │ ├── version.h │ ├── INSTALL.txt │ ├── cygwin-copy.sh │ ├── sendto-install.sh │ ├── sendto-uninstall.sh │ └── install.sh ├── dclib │ ├── dclib-ui.c │ ├── lib-mkw.h │ ├── dclib-debug.h │ ├── dclib-network.h │ └── Makefile.rules ├── makefiles-local │ ├── Makefile.local.x86_64 │ ├── Makefile.local.i386 │ ├── Makefile.local │ └── Makefile.local.mac ├── templates │ ├── module │ │ ├── features-en.forum │ │ ├── features-de.forum │ │ ├── features.txt │ │ ├── head.txt │ │ └── last-history.txt │ ├── forums │ │ └── mariokartwii.txt │ └── DOCUMENTATION.txt ├── gen-template.sh ├── support │ └── KCLFlags.xml ├── gen-text-file.sh └── system.c ├── .gitattributes ├── .gitignore ├── .github └── workflows │ └── make.yml └── README.md /project/revision.sh: -------------------------------------------------------------------------------- 1 | revision=8989 2 | -------------------------------------------------------------------------------- /project/Makefile.user: -------------------------------------------------------------------------------- 1 | -include work/Makefile.user 2 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-item-head-cr.inc: -------------------------------------------------------------------------------- 1 | %s 2 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-kart-head-cr.inc: -------------------------------------------------------------------------------- 1 | %s 2 | -------------------------------------------------------------------------------- /project/text-files/kcl.inc/kcl-dump-octlist-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #L# 3 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-head-cr.inc: -------------------------------------------------------------------------------- 1 | #KMG 2 | -------------------------------------------------------------------------------- /project/text-files/objflow.inc/objflow-head-cr.inc: -------------------------------------------------------------------------------- 1 | #OBJFLOW 2 | -------------------------------------------------------------------------------- /project/text-files/itemslot.inc/itemslot-head-cr.inc: -------------------------------------------------------------------------------- 1 | #ITEMSLT 2 | -------------------------------------------------------------------------------- /project/src/wrapper-wbmgt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wbmgt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wctct.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wctct.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wimgt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wimgt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wkclt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wkclt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wkmpt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wkmpt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wlect.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wlect.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wmdlt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wmdlt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wpatt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wpatt.c" 3 | -------------------------------------------------------------------------------- /project/src/wrapper-wstrt.c: -------------------------------------------------------------------------------- 1 | #define SZS_WRAPPER 1 2 | #include "wstrt.c" 3 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-param-cr.inc: -------------------------------------------------------------------------------- 1 | [PARAMETERS] 2 | @REVISION = %u 3 | -------------------------------------------------------------------------------- /project/scripts/distrib.list: -------------------------------------------------------------------------------- 1 | scripts/kcl 2 | scripts/test-wszst.sh 3 | scripts/test-wu8.sh 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.c linguist-language=C 2 | *.h linguist-language=C 3 | *.inc linguist-language=C 4 | -------------------------------------------------------------------------------- /project/setup/sendto-install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | .\windows-install.exe --script sendto-install.sh 3 | -------------------------------------------------------------------------------- /project/setup/sendto-uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | .\windows-install.exe --script sendto-uninstall.sh 3 | -------------------------------------------------------------------------------- /project/setup/windows-sendto/create-autoadd-library.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst autoadd %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/src/ui/ui.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/src/ui/ui.def -------------------------------------------------------------------------------- /project/dclib/dclib-ui.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/dclib/dclib-ui.c -------------------------------------------------------------------------------- /project/dclib/lib-mkw.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/dclib/lib-mkw.h -------------------------------------------------------------------------------- /project/setup/windows-uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | .\windows-install.exe --script windows-uninstall.sh 3 | -------------------------------------------------------------------------------- /project/src/lib-image3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/src/lib-image3.c -------------------------------------------------------------------------------- /project/dclib/dclib-debug.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/dclib/dclib-debug.h -------------------------------------------------------------------------------- /project/setup/windows-sendto/convert-to-SZS.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst compress --szs --number %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/setup/windows-sendto/convert-to-WBZ.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst compress --wbz --number %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-table-cr.inc: -------------------------------------------------------------------------------- 1 | [%s] # table at offset 0x%03x 2 | @REVISION = %u 3 | 4 | -------------------------------------------------------------------------------- /project/dclib/dclib-network.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/dclib/dclib-network.h -------------------------------------------------------------------------------- /project/setup/setup-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ./wszst config --install --sections >install-config.txt 3 | -------------------------------------------------------------------------------- /project/setup/windows-sendto/normalize-SZS.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst normalize -v --szs --number %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/setup/windows-sendto/adjust-minimap.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst normalize -v --minimap --number %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/setup/windows-install.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wiimm/wiimms-szs-tools/HEAD/project/setup/windows-install.exe -------------------------------------------------------------------------------- /project/setup/windows-sendto/clean-KCL-of-SZS.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | wszst normalize -v --kcl drop,new,log --number %1 3 | pause 4 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-hexdump-sep-cr.inc: -------------------------------------------------------------------------------- 1 | #----+------------------------------------------------------+----------------+ 2 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-s0-tabhead-cr.inc: -------------------------------------------------------------------------------- 1 | # cmd command dependent parameters 2 | #------------------------------------- 3 | -------------------------------------------------------------------------------- /project/text-files/itemslot.inc/itemslot-table-cr.inc: -------------------------------------------------------------------------------- 1 | [%s] # %s table at offset 0x%03x, %u rows, %u columns 2 | @REVISION = %u 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.bak 2 | cmd.txt 3 | bin/ 4 | project/bin/ 5 | project/edit-list/ 6 | project/Makefile.setup 7 | project/Makefile.local 8 | project/Makefile.user 9 | -------------------------------------------------------------------------------- /project/text-files/lpar.inc/lpar-sect-chat-example-cr.inc: -------------------------------------------------------------------------------- 1 | # 2 | # Examples: 3 | # M01 = CHAT$TRACK_BY_HOST 4 | # M96 = chat$n_races(15), CHAT$USE_ENGINE_2 5 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-ritp-tabhead-cr.inc: -------------------------------------------------------------------------------- 1 | #RITP# 2 | #----------------------------- 3 | # index nn mode param 4 | #----------------------------- 5 | -------------------------------------------------------------------------------- /project/text-files/itemslot.inc/itemslot-param-cr.inc: -------------------------------------------------------------------------------- 1 | [PARAMETERS] 2 | @REVISION = %u 3 | 4 | ADD-BATTLE = %d # used if creating a binary file 5 | USE-SLT = %d # information only 6 | 7 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-itpt-ropt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Route options. See section [ENPT] for details. 3 | @SHOW-OPTIONS = %d # >0: force printing of all route options 4 | @AUTO-CONNECT = %s%s%s 5 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-header-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [HEADER] 6 | # MDL header 7 | @REVISION = %u 8 | 9 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-header-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [HEADER] 6 | # PAT header 7 | @REVISION = %u 8 | 9 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-simple-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SIMPLE] 6 | # Simplified PAT definiton. 7 | @REVISION = %u 8 | -------------------------------------------------------------------------------- /project/text-files/ctcode.inc/ctcode-setup-arena-cr.inc: -------------------------------------------------------------------------------- 1 | [SETUP-ARENA] 2 | 3 | # Assign new property slots and optionally new music ids to arena slots. 4 | # Syntax: ARENA_SLOT NEW_PROPERTY_SLOT [NEW_MUSIC_ID] 5 | 6 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-s0_base-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [S0_BASE] 6 | # PAT section 0, base data 7 | @REVISION = %u 8 | 9 | -------------------------------------------------------------------------------- /project/text-files/kcl.inc/kcl-dump-octree-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | # Octree dump: %u base cubes + %u normal cubes, %u triangle lists 5 | 6 | #O# 7 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-s0_list-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [S0_LIST] 6 | # PAT section 0, string reference lists 7 | @REVISION = %u 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-jgpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [JGPT] 6 | # Respawn positions 7 | # KMP/JGPT syntax & semantics: https://szs.wiimm.de/doc/kmp/jgpt 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-mspt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [MSPT] 6 | # End battle positions 7 | # KMP/MSPT syntax & semantics: https://szs.wiimm.de/doc/kmp/mspt 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-cnpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CNPT] 6 | # Cannon target positions 7 | # KMP/CNPT syntax & semantics: https://szs.wiimm.de/doc/kmp/cnpt 8 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-strings-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [STRINGS] 6 | # Strings defined in section 1 with attributes defined in section 3 7 | @REVISION = %u 8 | 9 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-feat-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [FEAT] 6 | # Sort order: %u 7 | 8 | # This section reflects the special features of a track file. 9 | 10 | -------------------------------------------------------------------------------- /project/src/liblzma/Precomp.h: -------------------------------------------------------------------------------- 1 | /* Precomp.h -- StdAfx 2 | 2023-04-02 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_PRECOMP_H 5 | #define ZIP7_INC_PRECOMP_H 6 | 7 | #include "Compiler.h" 8 | /* #include "7zTypes.h" */ 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-enpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [ENPT] 6 | # Enemy Points: Routes of the cpu racers 7 | # KMP/ENPT syntax & semantics: https://szs.wiimm.de/doc/kmp/enpt 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-pt-mask-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Both settings support a common definition of ENPT and ITPT. 3 | # If writing a binary KMP file, the settings 1 and 2 are masked 4 | # (AND operation) by the following values: 5 | @mask-1 = 0x%04x 6 | @mask-2 = 0x%04x 7 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-itpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [ITPT] 6 | # Item Points: Routes of red shells and bullet bill 7 | # KMP/ITPT syntax & semantics: https://szs.wiimm.de/doc/kmp/itpt 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-ckph-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CKPH] 6 | # Check points header: Divide check points into groups. 7 | # KMP/CKPH syntax & semantics: https://szs.wiimm.de/doc/kmp/ckph 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-enph-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [ENPH] 6 | # Enemy route points header: Divide enemy points into groups. 7 | # KMP/ENPH syntax & semantics: https://szs.wiimm.de/doc/kmp/enph 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-itph-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [ITPH] 6 | # Item route points header: Divide item points into groups. 7 | # KMP/ITPH syntax & semantics: https://szs.wiimm.de/doc/kmp/itph 8 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-set1-develop-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------- 3 | 4 | # The following settings are under development and experimental. Names and 5 | # values can still change. Therefore, they should not be used, or at most 6 | # experimentally. 7 | 8 | @PADDING-0D = %d 9 | -------------------------------------------------------------------------------- /project/text-files/objflow.inc/objflow-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | 5 | [SETUP] 6 | 7 | # identification of creator tool 8 | TOOL = %s 9 | SYSTEM = %s 10 | VERSION = %s 11 | REVISION = %u 12 | DATE = %s 13 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-item-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | 5 | [SETUP] 6 | 7 | # identification of creator tool 8 | TOOL = %s 9 | SYSTEM = %s 10 | VERSION = %s 11 | REVISION = %u 12 | DATE = %s 13 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-kart-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | 5 | [SETUP] 6 | 7 | # identification of creator tool 8 | TOOL = %s 9 | SYSTEM = %s 10 | VERSION = %s 11 | REVISION = %u 12 | DATE = %s 13 | -------------------------------------------------------------------------------- /project/text-files/itemslot.inc/itemslot-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | 5 | [SETUP] 6 | 7 | # identification of creator tool 8 | TOOL = %s 9 | SYSTEM = %s 10 | VERSION = %s 11 | REVISION = %u 12 | DATE = %s 13 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | 5 | [SETUP] 6 | 7 | # identification of creator tool 8 | TOOL = %s 9 | SYSTEM = %s 10 | VERSION = %s 11 | REVISION = %u 12 | DATE = %s 13 | -------------------------------------------------------------------------------- /project/text-files/distrib.inc/distrib-param-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | # User defined parameters 4 | #------------------------------------------------------------------------------ 5 | # Some unknown parameters were detected. They are listed here: 6 | 7 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-table-head-cr.inc: -------------------------------------------------------------------------------- 1 | #--------------------------------------------------------------#-------------------------- 2 | # slot N=2 3 4 5 6 7 8 9 10 11 12 # arena info 3 | #--------------------------------------------------------------#-------------------------- 4 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-hexdump-cr.inc: -------------------------------------------------------------------------------- 1 | $HEX # switch to hexdump modus 2 | #----+------------------------------------------------------+----------------+ 3 | #addr: data: bytes in hex | '(' expression ')' : ASCII of data : 4 | #----+------------------------------------------------------+----------------+ 5 | -------------------------------------------------------------------------------- /project/makefiles-local/Makefile.local.x86_64: -------------------------------------------------------------------------------- 1 | 2 | # optimize linux x86 (64-bit) 3 | 4 | # to include this file 5 | # => copy Makefile.local to main directory and remove appropriate comments 6 | 7 | #------------------------------------------------------------------------------ 8 | 9 | CFLAGS += -march=x86-64 10 | 11 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-defaults-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | # These are the default settings for route objects: 5 | # @ROUTE-OBJECT = %s 6 | # @ROUTE-OBJECT-SHIFT = v( %4.2f, %4.2f, %4.2f ) 7 | # @ROUTE-OBJECT-SCALE = v( %4.2f, %4.2f, %4.2f ) 8 | 9 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-tool-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############ 4 | [TOOL] 5 | ############ 6 | 7 | # Information about the tool that created this file. 8 | # This section is optional. If present, it must be the first section. 9 | 10 | TOOL = %s 11 | SYSTEM = %s 12 | VERSION = %s 13 | REVISION = %u 14 | DATE = %s 15 | 16 | -------------------------------------------------------------------------------- /project/makefiles-local/Makefile.local.i386: -------------------------------------------------------------------------------- 1 | 2 | # optimize linux i86 (32-bit) 3 | 4 | # to include this file 5 | # => copy Makefile.local to main directory and remove appropriate comments 6 | 7 | #------------------------------------------------------------------------------ 8 | 9 | #CFLAGS += -mtune=generic 10 | CFLAGS += -march=i686 11 | -------------------------------------------------------------------------------- /project/text-files/objflow.inc/objflow-objects-cr.inc: -------------------------------------------------------------------------------- 1 | [OBJECTS] 2 | @REVISION = %u 3 | 4 | #----------------------------------------------------------------------- 5 | # OBJECT ID, NAME, RESOURCES 6 | # PARAM P0 P1 P2 P3 P4 P5 P6 P7 P8 7 | #----------------------------------------------------------------------- 8 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-param3-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Now the tools 'wszst' and 'wkmpt' can be called with the --const (or short 3 | # -c) option for a conditional encoding. Example: 4 | # -c test=12,ocam=2,laps=0 5 | # Enable test mode 12, show opening camera 2 endless (until pressing A) and 6 | # finish the race very fast to view the finish cameras very soon. 7 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-kart-objects-cr.inc: -------------------------------------------------------------------------------- 1 | [OBJECTS] 2 | @REVISION = %u 3 | 4 | #--------------------------------#----------------- 5 | # No power-up # Name 6 | # : Star # 7 | # : : Mega Mushroom 8 | # ID : : : Bullet Bill 9 | #--------------------------------#----------------- 10 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-pt2-head-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #%s# 3 | #------------------------------------------------------------------------------- 4 | # _____________position_____________ _______rotation________ related 5 | # idx x y z x y z id effect 6 | #------------------------------------------------------------------------------- 7 | -------------------------------------------------------------------------------- /project/text-files/kcl.inc/kcl-head-cr.inc: -------------------------------------------------------------------------------- 1 | #KCL : Wavefront OBJ File 2 | 3 | ## Created by 'Wiimms SZS Tools' - https://szs.wiimm.de/ 4 | #@ TOOL = %s 5 | #@ SYSTEM = %s 6 | #@ VERSION = %s 7 | #@ REVISION = %u 8 | #@ DATE = %s 9 | #@ MODE = %s 10 | 11 | 12 | # Statistics: 13 | # 14 | # %8u vertices 15 | # %8u normals 16 | # %8u triangles 17 | # %8u groups 18 | # 19 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-gobj-tabhead-cr.inc: -------------------------------------------------------------------------------- 1 | #GOBJ# 2 | #------------------------------------------------------------------------------------ 3 | # idx obj-id ______position/rotation/scale______ _________settings_________ route 4 | # /ref-id x y z #1/#5 #2/#6 #3/#7 #4/#8 /p-flag 5 | #------------------------------------------------------------------------------------ 6 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-pt-head-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #%s# 3 | #----------------------------------------------------------------------#------------------- 4 | # _____________position_____________ width properties # distance horiz 5 | #idx x y z factor #1 #2 flag # to prev angle 6 | #----------------------------------------------------------------------#------------------- 7 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-ledef-header-cr.inc: -------------------------------------------------------------------------------- 1 | %s 2 | 3 | #------------------------------------------------------------------------------ 4 | # 5 | # This file was created either by command »wlect distrib ... LE-DEF=...« or by 6 | # command »wlect create LE-DEF«. 7 | # 8 | # This file can only be read by the tools since version 2.28a. 9 | # 10 | #------------------------------------------------------------------------------ 11 | 12 | -------------------------------------------------------------------------------- /project/scripts/kcl/minimap.txt: -------------------------------------------------------------------------------- 1 | 2 | @def start = mSec() # start time 3 | @def mod_count = 0 # modification counter 4 | 5 | @function isRoad # flag 6 | @pdef t = $1 & 0x1f 7 | @return t <= 0x05 || t == 0x17 || t == 0x1d 8 | @endfunction 9 | 10 | @for t=0;tri$n()-1 11 | @if !isRoad(tri$flag(t,2)) 12 | @def status = tri$remove(t) 13 | @endif 14 | @endfor 15 | 16 | @echo " - " mod_count " of " tri$n() " triangles lowered in " (mSec()-start) " msec." 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/make.yml: -------------------------------------------------------------------------------- 1 | name: make mac distrib 2 | 3 | on: 4 | push: 5 | branches: [ master, test-mac-build ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: macos-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - run: SYSTEM=mac make -C project flags distrib 15 | - name: Upload distribution 16 | uses: actions/upload-artifact@v2 17 | with: 18 | name: latest-szs@mac-distribution 19 | path: project/latest-mac.tar.gz 20 | 21 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-cann-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CANN] 6 | # Sort order: %u 7 | 8 | # Cannon characteristics: 9 | # https://wiki.tockdom.com/wiki/Template:Cannon_characteristics 10 | 11 | #CANN# 12 | #--------------------------------------------------- 13 | # Deceleration End 14 | # Idx Speed Height Factor Deceleration 15 | #--------------------------------------------------- 16 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-ledef-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############# 4 | [SETUP] 5 | ############# 6 | 7 | # General setup. 8 | # With the exception of section [TOOL], this must always be the first section. 9 | 10 | #------------------------------------------------------------------------------ 11 | 12 | # Should the 10 battle arenas (slots 32-41) and 32 versus tracks (slots 0-31) 13 | # be automatically defined with the original tracks? (0=NO/1=YES): 14 | ORIG-BATTLE-ARENAS = %s 15 | ORIG-VERSUS-TRACKS = %s 16 | 17 | -------------------------------------------------------------------------------- /project/templates/module/features-en.forum: -------------------------------------------------------------------------------- 1 | [list] 2 | [*][url=@@URI-HOME@@features.html#1][b]SZS (Wiimms SZS Toolset) is a set of command line tools.[/b][/url] 3 | [*][url=@@URI-HOME@@features.html#3][b]wszst (Wiimms SZS tool) is the main SZS manipulation tool.[/b][/url] 4 | [*][url=@@URI-HOME@@features.html#4][b]wbmgt (Wiimms BMG tool) is the main BMG manipulation tool.[/b][/url] 5 | [*][url=@@URI-HOME@@features.html#5][b]Advanced shell support.[/b][/url] 6 | [/list]Visit [url=@@URI-HOME@@features.html][b]@@URI-HOME@@features.html[/b][/url] for more details. 7 | -------------------------------------------------------------------------------- /project/makefiles-local/Makefile.local: -------------------------------------------------------------------------------- 1 | 2 | # this is a template for ../Makefile.local 3 | 4 | # copy this file to the main directory 5 | # and remove appropriate comments (the leading '# ' of the include lines) 6 | 7 | #------------------------------------------------------------------------------ 8 | 9 | # Linux, 32 bit, i368 10 | # -include makefiles-local/Makefile.local.i386 11 | 12 | # Linux, 64 bit, x86 13 | # -include makefiles-local/Makefile.local.x86_64 14 | 15 | # Mac, universal binary 16 | # -include makefiles-local/Makefile.local.mac 17 | 18 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-head-cr.inc: -------------------------------------------------------------------------------- 1 | #LEX <<< The first 4 characters '#LEX' are the magic for a LEX text file. 2 | # <<< Don't remove them! 3 | # 4 | ############################################################################### 5 | # 6 | # This is a textual representation of a LEX file. It is defined by Wiimm. 7 | # 8 | # Hint: 9 | # Set one of the options --no-header (-H) or --brief (-B) while decoding 10 | # to suppress this general description. The --brief option will also disable 11 | # info parts in the different sections. 12 | # 13 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-dev1-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [DEV1] 6 | # Sort order: %u 7 | 8 | # This section defines various settings for LE-CODE developers. It is 9 | # recognized only if LPAR setting DEVELOPER-MODES is set to a value >0. 10 | 11 | #------------------------- 12 | 13 | # LE-CODE recognized this section only if ENABLED is >0. 14 | 15 | @ENABLED = %u 16 | 17 | # Define 3 developer modes. The usage changes frequently. 18 | 19 | @MODE1 = %u 20 | @MODE2 = %u 21 | @MODE3 = %u 22 | 23 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-item-objects-cr.inc: -------------------------------------------------------------------------------- 1 | [OBJECTS] 2 | @REVISION = %u 3 | 4 | #-----------------------------------------------------------------------#----------------- 5 | # Green Shell Star Mega Shroom Golden Shroom 6 | # : Red Shell : Blue Shell : Bob-omb : Bullet Bill 7 | # : : Banana : : Thunder : : Blooper : : Thunder Cloud 8 | # ID : : : Shroom : : : Fake Box : : POW : : : # Name 9 | #-----------------------------------------------------------------------#----------------- 10 | -------------------------------------------------------------------------------- /project/text-files/logo.inc: -------------------------------------------------------------------------------- 1 | *********************************** 2 | * _______ _______ _______ * 3 | * | ___ |____ | ___ | * 4 | * | | |_| / /| | |_| * 5 | * | |_____ / / | |_____ * 6 | * |_____ | / / |_____ | * 7 | * _ | | / / _ | | * 8 | * | |___| |/ /____| |___| | * 9 | * |_______|_______|_______| * 10 | * * 11 | * Wiimms SZS Tools * 12 | * https://szs.wiimm.de/ * 13 | * * 14 | *********************************** 15 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SETUP] 6 | # This is the general setup and info section. Some parameters are preceeded by 7 | # a hash ('#') to signal the informative only status. This section should 8 | # always be the first one to setup correct scanning modes. 9 | 10 | # Identify the tool and version, that have written this file: 11 | TOOL = %s 12 | SYSTEM = %s 13 | VERSION = %s 14 | REVISION = %u 15 | DATE = %s 16 | 17 | # Statistics: List of all included sections (magic name+hex,size): 18 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-header-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | ############################################################################### 3 | # 4 | # wszst settings: 5 | # --------------- 6 | # 7 | # This is the settings file for wszst (tool of "Wiimms SZS Tools"). It 8 | # was created by the EXTRACT command and is needed by the CREATE command 9 | # to rebuild the original source archive with or without modifications. 10 | # You can edit it, if you know what you do. 11 | # 12 | ############################################################################### 13 | 14 | # The first part contains some general settings: 15 | 16 | -------------------------------------------------------------------------------- /project/templates/module/features-de.forum: -------------------------------------------------------------------------------- 1 | [list] 2 | [*][url=@@URI-HOME@@features.html#1][b]SZS (Wiimms SZS Toolset) ist eine Sammlung von Kommandozeilen-Programmen.[/b][/url] 3 | [*][url=@@URI-HOME@@features.html#3][b]wszst (Wiimms SZS tool) ist das Hauptprogramm zu Manipulation von SZS-Dateien.[/b][/url] 4 | [*][url=@@URI-HOME@@features.html#4][b]wbmgt (Wiimms BMG tool) ist das Hauptprogramm zu Manipulation von BMG-Dateien.[/b][/url] 5 | [*][url=@@URI-HOME@@features.html#5][b]Besondere Unterstützung von Script-Sprachen.[/b][/url] 6 | [/list]Besuche [url=@@URI-HOME@@features.html][b]@@URI-HOME@@features.html[/b][/url] für mehr Details. 7 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-order-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | [order] 5 | 6 | # This list contains all extracted files in the order of the original archive. 7 | # If creating archives (but neither U8 nor LTA) this list will be used to sort 8 | # the found files. For archives with directory support (all except PACK) it is 9 | # important, that the directories are listed before the files that resides in 10 | # the directories. 11 | # 12 | # The value before the equal sign is the file offset in the original archive 13 | # and is ignored for sorting. 14 | 15 | -------------------------------------------------------------------------------- /project/text-files/lpar.inc/lpar-head-cr.inc: -------------------------------------------------------------------------------- 1 | #LE-LPAR <<< The first 8 characters are the magic for a LE-CODE parameter file. 2 | # <<< Don't remove them! 3 | # 4 | ############################################################################### 5 | # 6 | # This LE-CODE parameter file is a textual representation of the LPAR section 7 | # of LE-CODE binary fils with editable parameters. It is defined by Wiimm. 8 | # 9 | # Hint: 10 | # Set one of the options --no-header (-H) or --brief (-B) while decoding 11 | # to suppress this general description. The --brief option will also disable 12 | # info parts in the different sections. 13 | # 14 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-area-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [AREA] 6 | # Camera and other areas 7 | # KMP/AREA syntax & semantics: https://szs.wiimm.de/doc/kmp/area 8 | 9 | @REVISION = %u 10 | @AREA-HEAD-VALUE = %#x 11 | 12 | #AREA# 13 | #------------------------------------------------------------------------------ 14 | # mode type _____position/rotation/scale______ set-1 set-2 15 | # idx came prio x y z route enemy ?@0x2e 16 | #------------------------------------------------------------------------------ 17 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SETUP] 6 | # This is the general setup and info section. Some parameters are preceeded by 7 | # a hash ('#') to signal the informative only status. The scanning starts 8 | # always with this section. 9 | 10 | # Identify the tool and version, that have written this file: 11 | TOOL = %s 12 | SYSTEM = %s 13 | VERSION = %s 14 | REVISION = %u 15 | DATE = %s 16 | 17 | # The MDL name & version and the number of sections 18 | @MDL-NAME = "%s" 19 | @MDL-VERSION = %2u 20 | @N-SECTIONS = %2u 21 | 22 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SETUP] 6 | # This is the general setup and info section. Some parameters are preceeded by 7 | # a hash ('#') to signal the informative only status. The scanning starts 8 | # always with this section. 9 | 10 | # Identify the tool and version, that have written this file: 11 | TOOL = %s 12 | SYSTEM = %s 13 | VERSION = %s 14 | REVISION = %u 15 | DATE = %s 16 | 17 | # The PAT version, number of sections and output mode. Info only. 18 | PAT-VERSION = %2u 19 | N-SECTIONS = %2u 20 | OUTPUT-MODE = %s 21 | 22 | -------------------------------------------------------------------------------- /project/templates/module/features.txt: -------------------------------------------------------------------------------- 1 | Features: 2 | 3 | - SZS (Wiimms SZS Toolset) is a set of command line tools. 4 | - wszst (Wiimms SZS Tool) is the main SZS manipulation tool. 5 | - wimgt (Wiimms IMG Tool) is a graphics conversion tool. 6 | - wkclt (Wiimms KCL Tool) is a KCL creation and modification tool. 7 | - wkmpt (Wiimms KMP Tool) is a KMP creation and modification tool. 8 | - wbmgt (Wiimms BMG Tool) is a BMG manipulation tool. 9 | - wstrt (Wiimms STATIC.REL Tool) is a staric.rel and main.dol manipulation tool. 10 | - wctct (Wiimms CT-CODE Tool) manage CT-CODE extensions. 11 | - Advanced shell support. 12 | 13 | Visit @@URI-HOME@@features.html for more details. 14 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-ctdn-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CTDN] 6 | # Sort order: %u 7 | 8 | # This section defines various settings for game mode countdown. New settings 9 | # are placed at the end of the binary data. Unknown data is printed as hexdump, 10 | # so no data is lost even with old tools. 11 | 12 | #------------------------- 13 | 14 | # Define countdown time limits in seconds for the different engine classes. 15 | # @TIME-LIMIT-300CC is intended for future expansions >200cc. 16 | 17 | @TIME-LIMIT-50CC = %3u%s 18 | @TIME-LIMIT-100CC = %3u%s 19 | @TIME-LIMIT-150CC = %3u%s 20 | @TIME-LIMIT-200CC = %3u%s 21 | @TIME-LIMIT-300CC = %3u%s 22 | 23 | -------------------------------------------------------------------------------- /project/scripts/kcl/remove-sound-triggers.txt: -------------------------------------------------------------------------------- 1 | ############################### 2 | ### (c) Wiimm, 2021-09-24 ### 3 | ############################### 4 | 5 | # Setup 6 | @def start = mSec() # start time, for the status line 7 | @def rm_count = 0 # remove counter 8 | 9 | # Define a function to test the KCL flag for sound trigger 10 | @function isSound # flag 11 | @pdef t = $1 & 0x1f 12 | @return t == 0x18 13 | @endfunction 14 | 15 | # Main loop: Iterate through all triangles 16 | @for t=0;tri$n()-1 17 | @if isSound(tri$flag(t)) 18 | @def status = tri$remove(t) 19 | @def rm_count = rm_count+1 20 | @endif 21 | @endfor 22 | 23 | # Print a little status line 24 | @echo " - " rm_count " of " tri$n() " triangles removed in " (mSec()-start) " msec." 25 | 26 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-s0-cr.inc: -------------------------------------------------------------------------------- 1 | # This section represents one draw list. 2 | # 3 | # A draw list is a sequence of u8, u16 (1 and 2 byte unsigned integers) and 4 | # float (4 bytes) values divided into commands. For each command the first 5 | # byte declares the length and the meaning of the command: 6 | # 7 | # #1 : 1 byte, end of command list 8 | # #2 : 5 bytes, bone mapping 9 | # #3 : 4+N*6 bytes, weighting 10 | # #4 : 8 bytes, draw polygon 11 | # #5 : 5 bytes, indexing 12 | # 13 | # And these are the codings of the commands: 14 | # #1 15 | # #2, u16:weight_index, u16:parent:weight_index 16 | # #3, u16:wight_id, u8:N, N*( u16:table_id, float:weight ) 17 | # #4, u16:object_index, u16:material_index, u16:bone_index, u8:unknown 18 | # #5, u16:weight_id, u16:weight_index 19 | 20 | -------------------------------------------------------------------------------- /project/scripts/kcl/remove-face-down-roads.txt: -------------------------------------------------------------------------------- 1 | 2 | #--- remove face down roads 3 | 4 | @def start = mSec() # start time, for the status line 5 | @def rm_count = 0 # reset status counter 6 | 7 | @for t=0; tri$n()-1 # for each tirangle (index 0 based) 8 | @pdef type = tri$flag(t) & 0x1f # get the KCL type 9 | @if kcl$drive & (1< current) 6 | # N1 _______ x,y,z of normal #1 _______ | status 7 | # N2 _______ x,y,z of normal #2 _______ | 'valid', 'used' 8 | # N3 _______ x,y,z of normal #3 _______ | 9 | # P1 _______ x,y,z of point #1 ________ | length 10 | # P2 _______ x,y,z of point #2 ________ | difference: point2 - point1 11 | # P3 _______ x,y,z of point #3 ________ | difference: point3 - point1 12 | # LEN _______ 3x side length2 __________ | area of triangle 13 | # HT _______ 3x height ________________ | min and max height 14 | #-----------------------------------------+---------------------------------- 15 | 16 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-ph-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | ################################################################################ 3 | ## This entire section is for informational purposes only and will be ignored ## 4 | ## when reading. It is automatically generated after scanning section [%s]. ## 5 | ################################################################################ 6 | 7 | # values never used: 8 | # @REVISION = %u 9 | # @%s-HEAD-VALUE = %#x 10 | 11 | #%s# 12 | #-----------------------------------------------------------------------------#------- 13 | # ___range___ _________prev__________ _________next__________ # group 14 | #idx beg end len #1 #2 #3 #4 #5 #6 #1 #2 #3 #4 #5 #6 unknown # name 15 | #-----------------------------------------------------------------------------#------- 16 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-came-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CAME] 6 | # Cameras 7 | # KMP/CAME syntax & semantics: https://szs.wiimm.de/doc/kmp/came 8 | 9 | @REVISION = %u 10 | @OPENING-INDEX = %s 11 | @SELECTION-INDEX = %s 12 | 13 | #CAME# 14 | #------------------------------------------------------------------------------------------- 15 | # idx type v(came) _________position (x,y,z)_________ zoom_beg # some 16 | # next v(zoom) _________rotation (x,y,z)_________ zoom_end # calculated 17 | # unknown v(v.pt) ______view point beg (x,y,z)______ - # values 18 | # route unknown ______view point end (x,y,z)______ sec*60 # (info only) 19 | #------------------------------------------------------------------------------------------- 20 | -------------------------------------------------------------------------------- /project/text-files/pat.inc/pat-file-head-cr.inc: -------------------------------------------------------------------------------- 1 | #PAT <<< The first 4 characters '#PAT' are the magic for a PAT text file. 2 | # <<< Don't remove them! 3 | # 4 | ############################################################################### 5 | # 6 | # This is a textual representation of a PAT0 file used in Nintendos "Mario Kart 7 | # Wii". "Wiimms SZS Tools" may convert binary (raw) and text PAT files in both 8 | # directions in the near future. The text parser supports variables, C like 9 | # expressions and nested IF-THEN-ELSE structures. 10 | # 11 | # Details about PAT text files are available in the Web: 12 | # - Parser Syntax and Semantics: https://szs.wiimm.de/doc/syntax 13 | # - PAT Syntax and Semantics: https://szs.wiimm.de/doc/pat/text 14 | # - The BRRES/PAT0 file format: https://szs.wiimm.de/r/wiki/PAT0 15 | # 16 | #------------------------------------------------------------------------------ 17 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-stgi-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [STGI] 6 | # Stage information 7 | # KMP/STGI syntax & semantics: https://szs.wiimm.de/doc/kmp/stgi 8 | 9 | @REVISION = %u 10 | @STGI-HEAD-VALUE = %#x 11 | 12 | #STGI# 13 | #----------------------------------------------------------------------------- 14 | # Write a floating point number (a '.' is mandatory) instead of the 15 | # 2 last bytes, and it will be rounded and accepted as speed modifier. 16 | #-----------------------------------------------------------------#----------- 17 | # byte byte byte byte u32 byte byte byte byte # last 2 18 | # laps pole narrow flare flare flare pad or # bytes as 19 | #idx 1..N 1=rt if 1 1=on color alpha 0 speed mod # speed mod 20 | #-----------------------------------------------------------------#----------- 21 | -------------------------------------------------------------------------------- /project/templates/module/head.txt: -------------------------------------------------------------------------------- 1 | ******************************************************************************* 2 | ******* Wiimms SZS Tools v@.@@@ - @@@@-@@-@@ ******* 3 | ******************************************************************************* 4 | 5 | Wiimms SZS Tools (SZS) is a command line tool set for linux and for other 6 | unix like operating systems including Cygwin. The tools manage SZS files. 7 | 8 | The software is developed under the GPL 2.0 license. See file gpl-2.0.txt 9 | or http://www.gnu.org/licenses/gpl-2.0.txt for details. 10 | 11 | The most current source is available under: 12 | @@URI-SOURCE@@/ 13 | ~ 14 | ~The most current source is available under: 15 | ~ @@URI-VIEWVC@@/ 16 | ~The source of this revision (@@REV@@) is available under: 17 | ~ @@URI-VIEWVC@@/?pathrev=@@REV-NEXT@@ 18 | ~You can also checkout the SVN repository: 19 | ~ @@URI-REPOS@@/ 20 | 21 | See @@URI-HOME@@ for announcements and discussions. 22 | -------------------------------------------------------------------------------- /project/text-files/ctcode.inc/ctcode-list-syntax-brief-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Syntax: 3 | # '%' name = value 4 | # : Define an option. 5 | # 'N' mode : Define mode for Nintendos original tracks: 6 | # N$NONE | N$HIDE | N$SHOW | N$SWAP 7 | # OR it with N$F_HEX and/or N$F_WII and/or N$F_ 8 | # 'C' name : Enter a new cup and define its name. 9 | # 'S' list : Predefine track slots for the next tracks. 10 | # 'X' list : Mark slots as 'unusable'. 11 | # 'T' music_id; property_id; file_name; [info;] [id] 12 | # 'T' music_id; property_id; le_flags; file_name; [info;] [id] 13 | # : Define a racing track, See https://szs.wiimm.de/doc/slot-id 14 | # for 'music_id' and 'property_id'. 15 | # 'H' music_id; property_id; file_name; [info;] [id] 16 | # 'H' music_id; property_id; le_flags; file_name; [info;] [id] 17 | # : Define a hidden track, that doesn't appear in any cup. 18 | # 'A' music_id; property_id; file_name; [info;] [id] 19 | # 'A' music_id; property_id; le_flags; file_name; [info;] [id] 20 | # : Define a battle arena. 21 | -------------------------------------------------------------------------------- /project/src/liblzma/LzHash.h: -------------------------------------------------------------------------------- 1 | /* LzHash.h -- HASH constants for LZ algorithms 2 | 2023-03-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_LZ_HASH_H 5 | #define ZIP7_INC_LZ_HASH_H 6 | 7 | /* 8 | (kHash2Size >= (1 << 8)) : Required 9 | (kHash3Size >= (1 << 16)) : Required 10 | */ 11 | 12 | #define kHash2Size (1 << 10) 13 | #define kHash3Size (1 << 16) 14 | // #define kHash4Size (1 << 20) 15 | 16 | #define kFix3HashSize (kHash2Size) 17 | #define kFix4HashSize (kHash2Size + kHash3Size) 18 | // #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) 19 | 20 | /* 21 | We use up to 3 crc values for hash: 22 | crc0 23 | crc1 << Shift_1 24 | crc2 << Shift_2 25 | (Shift_1 = 5) and (Shift_2 = 10) is good tradeoff. 26 | Small values for Shift are not good for collision rate. 27 | Big value for Shift_2 increases the minimum size 28 | of hash table, that will be slow for small files. 29 | */ 30 | 31 | #define kLzHash_CrcShift_1 5 32 | #define kLzHash_CrcShift_2 10 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-ctdef-header-cr.inc: -------------------------------------------------------------------------------- 1 | %s 2 | 3 | #------------------------------------------------------------------------------ 4 | # 5 | # This file was created by »wlect distrib ... CTDEF=...«. It is not guaranteed 6 | # to correctly represent all features of the distribution. This applies in 7 | # particular to the slot arrangement. In addition, only the property slots can 8 | # be defined for the battle arenas. 9 | # 10 | # As an alternative, the use of LEDEF= instead of CTDEF= is recommended. 11 | # 12 | # Due to some new parameters, this file can only be read with the tools since 13 | # version 2.28a. 14 | # 15 | #------------------------------------------------------------------------------ 16 | 17 | [RACING-TRACK-LIST] 18 | 19 | # Define the maximum number of strings of track definition: 20 | %%N-STRINGS = 4 21 | 22 | # Enable support for LE-CODE flags (0=no, 1=yes): 23 | %%LE-FLAGS = 1 24 | 25 | # Auto insert a Wiimm cup with 4 special random slots (0=no, 1=yes): 26 | %%WIIMM-CUP = %d 27 | 28 | # Standard setup 29 | N N$SWAP | N$F_WII 30 | 31 | -------------------------------------------------------------------------------- /project/scripts/patch-all-messages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #--- pre definitions: enter your local settings 4 | 5 | # This is the directory with all message files (/Scene/UI) 6 | SRC_UI_DIR="./ui" 7 | 8 | # and this is the destination directory. If it is the same as the source 9 | # than all files are replaced by the patched version. 10 | DEST_UI_DIR="$SRC_UI_DIR" 11 | 12 | # This is the path to the message file of above: 13 | PATCH_FILE="bmg-patch.txt" 14 | 15 | # Remove the the hash ('#') of the second line for fast operation. 16 | # This makes the file about 25-30% larger but the operation is much faster 17 | FAST= 18 | #FAST=--fast 19 | 20 | #--- more automated setup 21 | 22 | TEMP="$(mktemp -d)" || exit 1 23 | 24 | #--- patch it in 3 steps: extract szs + patch bmg + create new szs 25 | 26 | wszst extract --quiet "$SRC_UI_DIR/"*_?.szs --dest "$TEMP/%N.d" 27 | wbmgt patch --quiet "$TEMP/"*.d/message/*.bmg --patch "replace,$PATCH_FILE" 28 | wszst create --quiet --remove "$TEMP/"*.d --dest "$DEST_UI_DIR" $FAST 29 | 30 | #--- clean up (remove temp dir) 31 | 32 | rm -rf "$TEMP" 33 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-include-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | ############################################################################### 3 | # 4 | # Some general rules for the next sections: 5 | # All paths are relative to the current base directory (directory that 6 | # contains the file wszst-setup.txt). Prefix at least paths that starts 7 | # not with a letter, digit, point, star or underscore with "./". 8 | # 9 | #------------------------------------------------------------------------------ 10 | 11 | [include-pattern] 12 | 13 | # All files and directories start with a . are hidden (unix like) and excluded 14 | # automatically. But filenames in one of the include sections are included 15 | # independent of this point. Also the include sections takes precedence over 16 | # the exclude sections. 17 | 18 | # This section expects file patterns with wildcards. 19 | 20 | #------------------------------------------------------------------------------ 21 | 22 | [include] 23 | 24 | # This second include section accpepts only complete file names and none of 25 | # characters have any special meaning. 26 | 27 | -------------------------------------------------------------------------------- /project/text-files/minigame.inc/minigame-info-cr.inc: -------------------------------------------------------------------------------- 1 | #KMG <<< The first 4 characters are the magic for minigame.kmg text files. 2 | # <<< Don't remove them! 3 | # 4 | #------------------------------------------------------------------------------ 5 | # 6 | # This is the textual representation of an minigame.kmg file. 7 | # It is defined by Wiimm and scanned by a 2-pass parser. 8 | # 9 | # Hints for decoding to a text file: 10 | # 11 | # - If either option --no-header (-H) or option --brief (-B) is set, this 12 | # general description is suppressed. 13 | # 14 | # - If either option --export (-X) is set once or option --brief (-B) is set 15 | # twice, a very small text file without descriptions and other not needed 16 | # parameters is created. 17 | # 18 | # - If option --long (-l) is set, then additional hidden parameters are 19 | # included. They are automatically included, if they are differ from the 20 | # the standard settings. 21 | # 22 | # See https://wiki.tockdom.com/wiki/minigame.kmg for more details. 23 | # 24 | #------------------------------------------------------------------------------ 25 | -------------------------------------------------------------------------------- /project/text-files/ctcode.inc/ctcode-head-cr.inc: -------------------------------------------------------------------------------- 1 | #CT-CODE 2 | 3 | [INFO] 4 | # This section will be ignored on scanning. 5 | 6 | # This is a textual representation of CT-CODE file used by CTGPR made by Chadderz 7 | # and MrBean3500vr. "Wiimms SZS Tools" can convert binary (raw) and text CT-CODE 8 | # files in both directions. The text parser supports variables, C like expressions 9 | # and nested IF-THEN-ELSE and LOOP structures. 10 | # 11 | # Info about the general parser syntax and semantics: 12 | # * https://szs.wiimm.de/doc/syntax 13 | # 14 | # Info about the CT-CODE: 15 | # * https://szs.wiimm.de/doc/ctcode 16 | # 17 | # Reference list of CT-CODE parser functions: 18 | # * https://szs.wiimm.de/doc/ctcode/func 19 | # 20 | # Hint: 21 | # Set the options --no-header (-H) while decoding to suppress this info and some 22 | # syntax descriptions below. 23 | 24 | #---------------------------------------------------------------------------------- 25 | # Only the section [RACING-TRACK-LIST] is scanned, all other sections are ignored! 26 | #---------------------------------------------------------------------------------- 27 | 28 | -------------------------------------------------------------------------------- /project/text-files/itemslot.inc/itemslot-info-cr.inc: -------------------------------------------------------------------------------- 1 | #ITEMSLT <<< The first 8 characters are the magic for ItemSlot.bin text files. 2 | # <<< Don't remove them! 3 | # 4 | #------------------------------------------------------------------------------ 5 | # 6 | # This is the textual representation of ItemSlot.bin and ItemSlotTable.slt 7 | # files. It is defined by Wiimm and scanned by a 2-pass parser. 8 | # 9 | # Hints for decoding to a text file: 10 | # 11 | # - If either option --no-header (-H) or option --brief (-B) is set, this 12 | # general description is suppressed. 13 | # 14 | # - If either option --export (-X) is set once or option --brief (-B) is set 15 | # twice, a very small text file without descriptions and other not needed 16 | # parameters is created. 17 | # 18 | # - If option --long (-l) is set, then additional hidden parameters are 19 | # included. They are automatically included, if they are differ from the 20 | # the standard settings. 21 | # 22 | # See https://wiki.tockdom.com/wiki/ItemSlot.bin for more details. 23 | # 24 | #------------------------------------------------------------------------------ 25 | -------------------------------------------------------------------------------- /project/text-files/mdl.inc/mdl-file-head-cr.inc: -------------------------------------------------------------------------------- 1 | #MDL <<< The first 4 characters '#MDL' are the magic for a MDL text file. 2 | # <<< Don't remove them! 3 | # 4 | ############################################################################### 5 | # 6 | # This is a textual representation of a MDL file used in Nintendos "Mario Kart 7 | # Wii". "Wiimms SZS Tools" may convert binary (raw) and text MDL files in both 8 | # directions in the near future. The text parser supports variables, C like 9 | # expressions and nested IF-THEN-ELSE structures. 10 | # 11 | # Info about the general parser syntax and semantics: 12 | # * https://szs.wiimm.de/doc/syntax 13 | # 14 | # Info about the MDL text syntax and semantics: 15 | # * https://szs.wiimm.de/doc/mdl/syntax 16 | # 17 | # Reference list of MDL parser functions: 18 | # * https://szs.wiimm.de/doc/mdl/func 19 | # 20 | # Info about the MDL file format: 21 | # * https://szs.wiimm.de/r/wiki/MDL0 22 | # 23 | # Hint: 24 | # Set one of the options --no-header (-H) or --brief (-B) while decoding 25 | # to suppress this large syntax info. The --brief option will also disable 26 | # info parts in the different sections. 27 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-hexdump-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [HEXDUMP] 6 | # Sort order: %u 7 | 8 | # Unknown sections are stored as hexdump to keep the data. Parameter @MAGIC 9 | # defines the type of the section. 10 | 11 | @MAGIC = 0x%08x # %s 12 | 13 | # Syntax of the data lines: 14 | # HEXLINE := [ ADDRESS ':' ] DATA [COMMENT] 15 | # COMMENT := ( [ ':' | '#' | '/' ) ANY_TEXT 16 | # DATA := HEXBYTE | EXPR 17 | # EXPR := '(' SZS_TOOLS_EXPRESSION ')' 18 | # 19 | # The address field and the ASCII part (a COMMENT by definition) are for info 20 | # only and ignored on scanning. 21 | # 22 | # The result of SZS_TOOLS_EXPRESSION is stored in network byte order (big 23 | # endian). Integers and floats are stored as 4 bytes, vectors as 3 floats with 24 | # 12 bytes total. Strings are stored as bytes without terminating NULL. 25 | 26 | #HEX# 27 | #----+------------------------------------------------------+----------------+ 28 | #addr: data: byte in hex | '(' expression ')' : ASCII of data : 29 | #----+------------------------------------------------------+----------------+ 30 | -------------------------------------------------------------------------------- /project/text-files/ctcode.inc/ctcode-setup-cr.inc: -------------------------------------------------------------------------------- 1 | [SETUP] 2 | 3 | #--- Identify the tool and version, that have written this file: 4 | 5 | TOOL = %s 6 | SYSTEM = %s 7 | VERSION = %s 8 | REVISION = %u 9 | DATE = %s 10 | 11 | 12 | #--- mode 13 | 14 | CT-MODE = %3u # 1: CT-CODE, 2: LE-CODE 15 | 16 | 17 | #--- Statistics 18 | 19 | USED-RACING-CUPS = %3u # number of active racing cups 20 | MAX-RACING-CUPS = %3u # max possible number of racing cups 21 | USED-BATTLE-CUPS = %3u # number of active battle cups 22 | MAX-BATTLE-CUPS = %3u # max possible number of battle cups 23 | 24 | USED-RACING-TRACKS = %3u # number of active racing tracks (used by cup) 25 | USED-BATTLE-TRACKS = %3u # number of active battle tracks (used by cup) 26 | DEFINED-TRACKS = %3u # total number of defined tracks 27 | MAX-TRACKS = %3u # total number of track slots 28 | 29 | DEFINED-RACING-CUPS = %3u # number of defined racing cups 30 | MAX-RACING-CUPS = %3u # max possible number of racing cups 31 | DEFINED-BATTLE-CUPS = %3u # number of defined battle cups 32 | MAX-BATTLE-CUPS = %3u # max possible number of battle cups 33 | UNUSED-CUPS = %3u # number of unused cups (space available) 34 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-ckpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [CKPT] 6 | # Check points 7 | # KMP/CKPT syntax & semantics: https://szs.wiimm.de/doc/kmp/ckpt 8 | 9 | @REVISION = %u 10 | @CKPT-HEAD-VALUE = %#x 11 | @CKPH-HEAD-VALUE = %#x 12 | @AUTO-NEXT = %u 13 | @AUTO-GROUP-NAME = 0 14 | @AUTO-RESPAWN = 0 # 0:off, 1:on 15 | 16 | @AUTO-MODE = mode$automode 17 | # allowed values: AM$OFF AM$NORM AM$RENUMBER AM$1LAP AM$SHORT AM$UNLIMIT 18 | 19 | @ROUTE-OBJECT-MODE = mode$showck 20 | #--- default settings: 21 | # @ROUTE-OBJECT1 = o$%s 22 | # @ROUTE-OBJECT2 = o$%s 23 | # @ROUTE-OBJECT1-SCALE = v( %4.2f, %4.2f, %4.2f ) 24 | # @ROUTE-OBJECT2-SCALE = v( %4.2f, %4.2f, %4.2f ) 25 | # @ROUTE-OBJECT1-BASE = %d 26 | # @ROUTE-OBJECT2-BASE = %d 27 | 28 | #CKPT# 29 | #----------------------------------------------------------------------#------------------- 30 | # _____left_point______ _____right_point_____ respawn prev # width direc- 31 | #idx x y x y mode next # of ckpt tion 32 | #----------------------------------------------------------------------#------------------- 33 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-head-cr.inc: -------------------------------------------------------------------------------- 1 | #KMP <<< The first 4 characters '#KMP' are the magic for a KMP text file. 2 | # <<< Don't remove them! 3 | # 4 | ############################################################################### 5 | # 6 | # This is a textual representation of a KMP file used in Nintendos "Mario Kart 7 | # Wii". "Wiimms SZS Tools" can convert binary (raw) and text KMP files in both 8 | # directions. The text parser supports variables, C like expressions and nested 9 | # IF-THEN-ELSE and LOOP structures. 10 | # 11 | # Info about the general parser syntax and semantics: 12 | # * https://szs.wiimm.de/doc/syntax 13 | # 14 | # Info about the KMP text syntax and semantics: 15 | # * https://szs.wiimm.de/doc/kmp/syntax 16 | # 17 | # Reference list of KMP parser functions: 18 | # * https://szs.wiimm.de/doc/kmp/func 19 | # 20 | # Info about the KMP file format: 21 | # * https://szs.wiimm.de/r/wiki/KMP 22 | # 23 | # Hint: 24 | # Set one of the options --no-header (-H) or --brief (-B) while decoding 25 | # to suppress this general description. The --brief option will also disable 26 | # info parts in the different sections. If --brief is set twice, the output 27 | # of the unneded sections CKPH, ENPH and ITPH is completly suppressed. 28 | # 29 | -------------------------------------------------------------------------------- /project/gen-template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #set -v 4 | 5 | rm -f templates/*.bak templates/*.tmp 6 | mkdir -p doc 7 | 8 | list="$*" 9 | [[ $list = "" ]] && list="$(/bin/ls templates/)" 10 | 11 | awkprog=' 12 | /@@MODULE\(.*\)@@/ { 13 | gsub(/@@MODULE\(/,"templates/module/"); 14 | gsub(/\)@@/,""); 15 | system("cat " $0); 16 | next 17 | } 18 | 19 | /@@EXEC\(.*\)@@/ { 20 | gsub(/@@EXEC\(/,""); 21 | gsub(/\)@@/,""); 22 | system($0); 23 | next 24 | } 25 | 26 | { print $0 } 27 | ' 28 | 29 | CRLF=0 30 | uname -s | grep -q CYGWIN && CRLF=1 31 | 32 | for fname in $list 33 | do 34 | src="setup/$fname" 35 | [[ -f $src ]] || src="templates/$fname" 36 | if [[ -f "$src" ]] 37 | then 38 | dest="doc/$fname" 39 | ext="${dest##*.}" 40 | #[[ $ext == edit-list ]] && continue 41 | [[ $ext = "sh" || $ext = "bat" || $ext = "h" ]] && dest="$fname" 42 | [[ $fname = "INSTALL.txt" ]] && dest="$fname" 43 | #echo "|$src|$dest|" 44 | 45 | if ((CRLF)) && [[ $ext = bat || $ext = txt ]] 46 | then 47 | awk "$awkprog" $src | sed -f templates.sed | sed 's/$/\r/' >"$dest.tmp" 48 | else 49 | awk "$awkprog" $src | sed -f templates.sed >"$dest.tmp" 50 | fi 51 | [[ $ext = "sh" ]] && chmod a+x "$dest.tmp" 52 | mv "$dest.tmp" "$dest" 53 | fi 54 | done 55 | 56 | exit 0 57 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-create-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | [create] 5 | 6 | # Create (and overwrite without notice) the listed files before adding them to 7 | # the new archive. The source directory is searched under the same filename 8 | # with an appended ".d" or, if this fails, with an extension replaced by ".d". 9 | # If a source directory does not exist, the job is ignored silently. 10 | # Example: For "my.brres" search directories "my.brres.d" or "my.d" 11 | # The source directory itself is set on the exclude list and will not stored 12 | # into the new archive. Creating can be controlled by the options: 13 | # --no-recurse : Do not create archives recursively. 14 | # --no-encode : Do not encode files before creating an archive. 15 | # --encode-img : Encode all image files (TEX,TPL,BREFT/sub), overrides --no-encode. 16 | # --encode-all : Encode all files and ignore timestamps. 17 | # --pt-dir : Set `point directory' mode. 18 | # --u8 : Create an U8 archive. 19 | # --brres : Create an BRRES archive. 20 | # --breff : Create an BREFF archive. 21 | # --breft : Create an BREFT archive. 22 | # --no-compress : Create an uncompressed file (U8 instead of SZS). 23 | # ... 24 | 25 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-exclude-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | [exclude-pattern] 5 | 6 | # Files and directories in this section are ignored by the CREATE command. 7 | # The include sections takes precedence over the exclude sections. 8 | 9 | # This section expects file patterns with wildcards. 10 | # Here we exclude all original, backup and temp files: 11 | 12 | *.orig 13 | *.bak 14 | *.tmp 15 | *.temp 16 | 17 | # Exclude all *.d directories. To enable it, remove "# " at the beginning. 18 | # *.d 19 | 20 | # Exclude all PNG files. The intention is to allow the creation of new PNG 21 | # images and mipmap files without any need to edit this setup file. All 22 | # extracted PNG files are automatically listed in the [exclude] section. 23 | # So the exclusion of all PNG is not really needed, but may help. The second 24 | # (disabled) line is an alternative to exclude all mipmap PNG files. 25 | 26 | *.png 27 | # *.mm#.png 28 | 29 | #------------------------------------------------------------------------------ 30 | 31 | [exclude] 32 | 33 | # Files and directories in this section are ignored by the CREATE command. 34 | # This second exclude section accepts only complete file names and none of 35 | # characters have any special meaning. 36 | 37 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-ktpt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [KTPT] 6 | # Kart Points: Starting positions of the racers 7 | # KMP/KTPT syntax & semantics: https://szs.wiimm.de/doc/kmp/ktpt 8 | 9 | @REVISION = %u 10 | @KTPT-HEAD-VALUE = %#x 11 | 12 | # KCL-FALL (automatic height correction) 13 | # Define the following values here or at any place between the points. 14 | # They are valid until re-defined. Disable this feature by @KCL-FALL-WIDTH=0. 15 | @KCL-FALL-WIDTH = 0 # set to a value >0 (e.g. 200) to enable KCL falling 16 | @KCL-FALL-PRE-ADD = 0 # add this height or vector before falling 17 | @KCL-FALL-POST-ADD = 0 # add this height or vector after success 18 | @KCL-FALL-TYPES = KCL$DRIVE # bit field of recognized KCL types 19 | # Best values are: 20 | # - KCL$BORDER: All KCL types except effects. 21 | # - KCL$DRIVE: All driveable types like road, boost, ramp, water, ... 22 | 23 | #KTPT# 24 | #-------------------------------------------------------------------------------- 25 | # _____________position______________ _______rotation_______ player 26 | #idx x y z x y z index unknown 27 | #-------------------------------------------------------------------------------- 28 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-param2-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # First we define default values (if not set by --const) for all parameters: 3 | 4 | @def slot ?= 0 # Enable support for special slots 5 | @def d ?= 0 # Enable support for _d files 6 | @def arena ?= 0 # Enable battle arena support and allow different modes 7 | @def test ?= 0 # Enable test mode 8 | @def ocam ?= 0 # Test opening cam, only relevant if test>0 9 | @def showrt ?= 0 # Show item boxes for route points. 10 | # Only relevant if test>0. Set bit combination: 11 | # 1:ENPT, 2:ITPT, 4:JGPT, 8:CNPT, 0x10:MSPT, 0x20:POTI (-1:all) 12 | @def showck ?= 0 # Show objects a check point positions if test>0. 13 | # 0:off, 1:mandatory, 2:all, 3=left+right 14 | @def laps ?= 3 # Number of laps (0|1|3|4), only relevant if test>0 15 | 16 | # In a second step, global mode variables are defined and normalized. 17 | # All conditions in this file should use these variables. 18 | 19 | @gdef mode$slot = slot > 0 ? slot : 0 20 | @gdef mode$d = d > 0 21 | @gdef mode$arena = arena > 0 ? arena : 0 22 | 23 | @gdef mode$test = test > 0 ? test : 0 24 | @gdef mode$ocam = mode$test && ocam >= 1 ? ocam : 0 25 | @gdef mode$laps = mode$test && laps >= 0 ? laps : 3 26 | @gdef mode$showrt = mode$test ? showrt : 0 27 | @gdef mode$showck = mode$test ? showck : 0 28 | @gdef mode$automode = select(mode$laps,AM$SHORT,AM$1LAP,AM$OFF,AM$OFF,AM$UNLIMIT) 29 | -------------------------------------------------------------------------------- /project/text-files/setup.inc/setup-encode-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | [encode] 5 | 6 | # Encode (and overwrite without notice) the listed files before adding them 7 | # to the new archive. The source is searched under the same filename with the 8 | # correct source extension added or, if this failed, a replaced extension. 9 | # Example: For "message.bmg" search files "message.bmg.txt" or "message.txt" 10 | # The source file itself is set on the exclude list and will not stored into 11 | # the new archive. 12 | # 13 | # The syntax of this file section is a little bit different as the other file 14 | # sections. Each line begins with a comma separated list of keywords followed 15 | # by an equal sign. 16 | # Syntax: COMMA_SEPARATED_FORMAT_LIST = relative_filename 17 | # Example: BREFT,IA8,3 = ./files/rk_steam 18 | # The first keyword is the file format. The following keywords describe sub 19 | # formats. An additonal integer is a file type specific information: 20 | # -> For image files it is the number of images (main image + mipmaps). 21 | # A value of 0 means: Use the tools default (see option --n-mipmaps). 22 | # 23 | # A file is only encoded if the destination does not exist or if the source 24 | # is younger than the destination. Encoding can be controlled by options 25 | # --no-encode, --encode-img and --encode-all (short: --noenc --eimg --eall). 26 | 27 | -------------------------------------------------------------------------------- /project/templates/forums/mariokartwii.txt: -------------------------------------------------------------------------------- 1 | I have released [color=#000080]Wiimms SZS Tools v1.40a[/color]. 2 | [color=#800000](A [url=https://szs.wiimm.de/doc/cli]command line[/url] tool set for Linux, Mac and Windows)[/color] 3 | 4 | [color=#800000][b]What's new:[/b][/color] 5 | [list] 6 | [color=#ffffff].[/color] 7 | [/list] 8 | 9 | [color=#800000][b]Change Log:[/b][/color] 10 | [code] 11 | [/code] 12 | 13 | 14 | [color=#800000][b]Links:[/b][/color] 15 | [list] 16 | [*] [url=https://szs.wiimm.de/features.html][color=#000080][b]Features[/b][/color][/url] 17 | [*] [url=https://szs.wiimm.de/download.html][color=#000080][b]Download[/b][/color][/url] 18 | [*] [url=https://szs.wiimm.de/doc/cli][color=#000080][b]Command Line Interface (using the tools)[/b][/color][/url] 19 | [*] [url=https://szs.wiimm.de/doc/kcl][color=#000080][b]KCL Guide to export and import object files[/b][/color][/url] 20 | [*] [url=https://wiki.tockdom.com/wiki/Wiimms_SZS_Tools][color=#000080][b]Custom Mario Kart Wiiki[/b][/color][/url] 21 | [*] [url=https://wiki.tockdom.com/wiki/WU8][color=#000080][b]File Format WU8[/b][/color][/url] (track patch) 22 | [*] [url=https://wiki.tockdom.com/wiki/WBZ][color=#000080][b]File Format WBZ[/b][/color][/url] (BZIP2 compression) 23 | [*] [url=https://szs.wiimm.de/cgi/mkw/object][color=#000080][b]KMP Object Query[/b][/color][/url] 24 | [*] [url=https://szs.wiimm.de/cgi/mkw/track-ref][color=#000080][b]MKW Track Cross Reference[/b][/color][/url] 25 | [/list] 26 | -------------------------------------------------------------------------------- /project/templates/DOCUMENTATION.txt: -------------------------------------------------------------------------------- 1 | 2 | @@MODULE(head.txt)@@ 3 | 4 | 5 | ******************************************************************************* 6 | ******* Motivation ********* 7 | ******************************************************************************* 8 | 9 | The motives for writing a new tool are simple: 10 | 11 | I want to automate the creation of SZS files. I need this for Custom Mario 12 | Kart Distributions. 13 | 14 | Visit @@URI-HOME@@ for more information. 15 | 16 | 17 | ******************************************************************************* 18 | ******* Features ********* 19 | ******************************************************************************* 20 | 21 | @@MODULE(features.txt)@@ 22 | 23 | 24 | ******************************************************************************* 25 | ******* HISTORY ******* 26 | ******************************************************************************* 27 | 28 | For the complete history see file 'HISTORY.txt'. The last changes: 29 | 30 | @@MODULE(last-history.txt)@@ 31 | 32 | 33 | ******************************************************************************* 34 | ******* END ******* 35 | ******************************************************************************* 36 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-jgpt-auto-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Automatic definition of respawn points 3 | @AUTO-DEFINE = 0 # 0 | SECT$ENPT | SECT$ITPT 4 | @AUTO-DISTANCE = 1000.0 # minimal distance to other JGPT 5 | @AUTO-ADJUST = vy(100) # add this value to each auto-JGPT 6 | @AUTO-REMOVE = 0 # 0|1|2 7 | 8 | # Column 'flag' is optional and only used internally. 9 | # Syntax: FLAGS_STRING or '(' EXPRESSION ')' 10 | # F (F$FALL): Point can be used for FALL-DOWN functionality. 11 | # S (F$SNAP): Point can be used for SNAP functionality. 12 | # Remove the letter or replace it by '-' to disable a feature. 13 | # If the column is missed, all options are enabled by default. 14 | 15 | # If you enable EXPORT-FLAGS (set it to 1), the flags are exported using the 16 | # lowest byte of ROTATION.x. The rotation value needs only 4 or 5 digits, so 17 | # this has no disadvantage for the rotation. 5 of the 8 bits are used to 18 | # verify changes by other tools on import. If at least 1 of these bits of all 19 | # points is wrong, import is canceled. 20 | @EXPORT-FLAGS = %d # 0=disabled, 1=enabled (overridden by option --export-flags) 21 | 22 | #JGPT# 23 | #------------------------------------------------------------------------------------ 24 | # _____________position_____________ _______rotation________ related flags 25 | # idx x y z x y z id effect 26 | #------------------------------------------------------------------------------------ 27 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-pt2-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | @REVISION = %u 3 | @%s-HEAD-VALUE = %#x 4 | @AUTO-ID = %u 5 | 6 | # KCL-FALL (automatic height correction) 7 | # Define the following values here or at any place between the points. 8 | # They are valid until re-defined. Disable this feature by @KCL-FALL-WIDTH=0. 9 | @KCL-FALL-WIDTH = 0 # set to a value >0 (e.g. 200) to enable KCL falling 10 | @KCL-FALL-PRE-ADD = 0 # add this height or vector before falling 11 | @KCL-FALL-POST-ADD = 0 # add this height or vector after success 12 | @KCL-FALL-TYPES = KCL$DRIVE # bit field of recognized KCL types 13 | # Best values are: 14 | # - KCL$BORDER: All KCL types except effects. 15 | # - KCL$DRIVE: All driveable types like road, boost, ramp, water, ... 16 | 17 | # Snap to nearest point of the enemy route and add the vector. 18 | # Activate it with something like: vy(200) => 200 units higher than the enemy point 19 | @HSNAP-TO-ENPT = $NONE # horizontal snap without adjust, y-rotation 20 | @SNAP-TO-ENPT = $NONE # 3D snap, y-rotation 21 | @SNAP2-TO-ENPT = $NONE # 3D snap, x- and y-rotation 22 | 23 | # Show points in the track by using objects 24 | # Values: 0=off, -1=use default (block of ghost value), >0=force object with 'id' 25 | @ROUTE-OBJECT = mode$showrt & %u ? -1 : 0 26 | @ROUTE-OBJECT-SHIFT = $NONE # v3(0) # add vector to position 27 | @ROUTE-OBJECT-SCALE = $NONE # v3(1) # define vector scale 28 | -------------------------------------------------------------------------------- /project/scripts/kcl/lower-walls.txt: -------------------------------------------------------------------------------- 1 | ############################### 2 | ### (c) Wiimm, 2015-12-18 ### 3 | ############################### 4 | 5 | # Setup 6 | @def start = mSec() # start time, for the status line 7 | @def mod_count = 0 # modification counter 8 | 9 | # Get the value for lowering the walls. 10 | # If 'lower' is defined as number by option --const => use it. 11 | # Otherwise use the default of 30. 12 | @def lower = isNumeric(lower) ? lower : 30 13 | 14 | # Limit to walls with inclination <45 degree 15 | # If 'degree' is defined by option --const as number >0 => use it. 16 | # Otherwise use the default of 45 degrees. 17 | @def degree = isNumeric(degree) && degree > 0 ? degree : 45 18 | @def sin_degree = sin(degree) 19 | 20 | # Define a function to test the KCL flag for walls 21 | @function isWall # flag 22 | @pdef t = $1 & 0x1f 23 | @return t == 0x0c || t == 0x0d || t == 0x0f || t == 0x14 || t == 0x1e || t == 0x1f 24 | @endfunction 25 | 26 | # Main loop: Iterate through all triangles 27 | @for t=0;tri$n()-1 28 | @if isWall(tri$flag(t)) 29 | @def norm = tri$normal(t,0) # get the first normal 30 | @if abs(norm.y) < sin_degree 31 | # it's a vertical wall -> lower the wall & increment counter 32 | @def status = tri$shift(t,-vy(lower)) 33 | @def mod_count = mod_count+1 34 | @endif 35 | @endif 36 | @endfor 37 | 38 | # Print a little status line 39 | @echo " - " mod_count " of " tri$n() " triangles lowered by " lower 40 | > " in " (mSec()-start) " msec." 41 | 42 | -------------------------------------------------------------------------------- /project/text-files/common.inc/explain-objmgr-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------ 3 | 4 | # Usually, only the data of objects defined by Nintendo can be replaced. 5 | # It is not possible to remove or add an object, or to replace an object 6 | # with one ID by another object with another ID. The following settings 7 | # override this protection for experimental usage. 8 | 9 | # @NEW-OBJECT = MODE 10 | # MODE is one of 4 settings: 11 | # NEWOBJ$OFF: 12 | # Disable experimental mode. This is the default. 13 | # Ignore @OBJECT-SLOTS and @MAX-OBJECT-ID. 14 | # NEWOBJ$REPLACE: 15 | # Allow new objects, but keep the total number of slots 16 | # at 0x13c. Ignore @OBJECT-SLOTS. 17 | # NEWOBJ$SHRINK: 18 | # Allow new objects and removal of old objects. The total number 19 | # of slots may shrink, but not grow above 0x13c. 20 | # NEWOBJ$GROW: 21 | # Allow new objects and removal of old objects. The total number 22 | # of slots may shrink or grow (limit 0x400). 23 | 24 | # @OBJECT-SLOTS = NUMBER 25 | # Number of available objects slots. The default is 0x13c. Up to 26 | # 0x400 slots are supported. This setting is ignored for some modes 27 | # of @NEW-OBJECT. 28 | 29 | # @MAX-OBJECT-ID = NUMBER 30 | # Define the maximim allowed object id. The default value is 0x2f3 and the 31 | # maximal possible value is 0x3ff. 32 | # Objects with id larger than this value are ignored. The value defines the 33 | # size of the reference list of section 2 too. 34 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-set1-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SET1] 6 | # Sort order: %u 7 | 8 | # This section defines various settings. New settings are placed at the end 9 | # of the binary data. Unknown data is printed as hexdump, so no data is lost 10 | # even with old tools. A value of 0 means: Not defined/initialized, replace 11 | # the value by the default value (maybe 0 again). 12 | 13 | #------------------------- 14 | 15 | # Online, item positions are only transmitted correctly, if the positions of 16 | # all 3 axis are between -131072 and +131071. The following vector defines 3 17 | # stretch factors to increase the range at the expense of accuracy. Factors 18 | # <1.0 are ignored and set to 1.0. 19 | 20 | @ITEM-POS-FACTOR = v( %5.3f, %5.3f, %5.3f ) 21 | 22 | # Wiimmfi and tool mkw-ana support an automatic ban systems, that detect items 23 | # before race start. Unfortunately, there are some tracks where players get 24 | # an item through an item box before race start. And it is precisely these 25 | # tracks that must be marked with value 1 as an exception to avoid banning. 26 | 27 | @START-ITEM = %u 28 | 29 | # If playing online, the racing time is limited. The original MKW uses 5:00 30 | # and LE-CODE 5:40 by default. A racing track can apply another online limit 31 | # if the following setting is >0. Values between %us%s and %us%s 32 | # are accepted. LPAR settings MIN-ONLINE-SEC and MAX-ONLINE-SEC limit the 33 | # actually used value. 34 | 35 | @APPLY-ONLINE-SEC = %u%s 36 | 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Wiimms SZS Tools 2 | 3 | ********************************* 4 | * _______ _______ _______ * 5 | * | ___ |____ | ___ | * 6 | * | | |_| / /| | |_| * 7 | * | |_____ / / | |_____ * 8 | * |_____ | / / |_____ | * 9 | * _ | | / / _ | | * 10 | * | |___| |/ /____| |___| | * 11 | * |_______|_______|_______| * 12 | * * 13 | * Wiimms SZS Tools * 14 | * https://szs.wiimm.de/ * 15 | * * 16 | ********************************* 17 | 18 | »Wiimms SZS Tools« is a set of command line tools to extract, modify and create 19 | different files of game *Mario Kart Wii* and of other Nintendo games. 20 | Development started in 2011. See https://szs.wiimm.de/ for more details, 21 | documentation and downloads. 22 | 23 |
24 |
Note:
25 |
26 | This is only a copy of Wiimms private SVN repository. 27 | Only official releases are exported to GitHub. 28 | Therefor merge requests can not imported directly and must be included manually. 29 |
30 | 31 |
License:
32 |
33 | This program is free software; 34 | you can redistribute it and/or modify it under the terms of the 35 | GNU General Public License as published by the Free Software Foundation; 36 | either version 2 of the License, or (at your option) any later version. 37 | 38 | See file project/gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt for details. 39 |
40 |
41 | 42 | *Wiimm, 2020-08-22* 43 | -------------------------------------------------------------------------------- /project/support/KCLFlags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 00 Road 5 | 01 Slippery Road 6 | 02 Weak Off-road 7 | 03 Off-road 8 | 04 Heavy Off-road 9 | 05 Slippery Road 2 10 | 06 Boost Pad 11 | 07 Boost Ramp 12 | 08 Jump Pad 13 | 09 Item Road 14 | 0a Solid Fall 15 | 0b Moving Water 16 | 0c Wall 17 | 0d Invisible Wall 18 | 0e Obstacle Wall 19 | 0f Wall 20 | 10 Fall Boundary 21 | 11 Cannon Activator 22 | 12 Unknown 23 | 13 Half-pipe Ramp 24 | 14 Wall 25 | 15 Moving Road 26 | 16 Sticky Road 27 | 17 Road 28 | 18 Sound Trigger 29 | 19 Unknown 30 | 1a Unknown 31 | 1b Unknown 32 | 1c Unknown 33 | 1d Road 34 | 1e Special Wall 35 | 1f Wall 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-setup-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [SETUP] 6 | # This is the general setup and info section. Some parameters are preceeded by 7 | # a hash ('#') to signal the informative only status. This section should 8 | # always be the first one. 9 | 10 | # Identify the tool and version, that have written this file: 11 | TOOL = %s 12 | SYSTEM = %s 13 | VERSION = %s 14 | REVISION = %u 15 | DATE = %s 16 | 17 | # If the following info string is not empty it will be 18 | # inserted at the end of the KMP file behind all sections: 19 | INFO = "%s" 20 | 21 | # KMP version (offset 0x0c): 22 | KMP-VERSION = %d 23 | 24 | # If set to '1', objects with road features will be added to the internal KCL 25 | # for the automatic height calculations. Like --kcl +add-road 26 | KCL-FALL-ADD-ROAD = 0 27 | 28 | # Define the battle mode for the next text output: 29 | # 0 : Disable battle support 30 | # 1 : Enable battle support 31 | # 2 : Enable exclusive battle support => remove unneeded sections and parameters 32 | # This setting is overiden by option --battle. 33 | BATTLE-MODE = %d 34 | 35 | # Experimental feature in progress! 36 | # If set to 1, an additional KMP section named »WIM0« is created. This new 37 | # section should contain data of this text file like names or flags, that can 38 | # be restored later. At the moment, the new section contains only dummy data 39 | # for compatibility tests with other tools and the Wii. Option --wim0 can 40 | # override this setting. 41 | KMP-WIM0 = %d 42 | 43 | # Statistics: Entry counter for each section: 44 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-kart-info-cr.inc: -------------------------------------------------------------------------------- 1 | %s <<< The first 8 characters are the magic for text files of GeoHit-Kart. 2 | # <<< Don't remove them! 3 | # 4 | #------------------------------------------------------------------------------ 5 | # 6 | # This is the textual representation of a GeoHitTableKart*.bin file. 7 | # It is defined by Wiimm and scanned by a 2-pass parser. 8 | # 9 | # Hints for decoding to a text file: 10 | # 11 | # - If either option --no-header (-H) or option --brief (-B) is set, this 12 | # general description is suppressed. 13 | # 14 | # - If either option --export (-X) is set once or option --brief (-B) is set 15 | # twice, a very small text file without descriptions and other not needed 16 | # parameters is created. 17 | # 18 | # - If option --long (-l) is set, then additional hidden parameters are 19 | # included. They are automatically included, if they are differ from the 20 | # the standard settings. 21 | # 22 | #------------------------------------------------------------------------------ 23 | # 24 | # Syntax for section [OBJECTS]: 25 | # 26 | # OBJ_ID P1 P2 P3 P4 27 | # 28 | # OBJ_ID : Id of the object. Use prefix '0x' for hex numbers. 29 | # P1..P4 : 4 hit parameters, optionally separated by commas. 30 | # A point ('.') is interpreted as Null, and an equal sign ('=') 31 | # leaves the value unchanged. Missed parameters are not modified. 32 | # 33 | # See https://wiki.tockdom.com/wiki/GeoHitTableKart.bin 34 | # and https://wiki.tockdom.com/wiki/GeoHitTableKartObj.bin for more details. 35 | # 36 | #------------------------------------------------------------------------------ 37 | -------------------------------------------------------------------------------- /project/text-files/geohit.inc/geohit-item-info-cr.inc: -------------------------------------------------------------------------------- 1 | %s <<< The first 8 characters are the magic for text files of GeoHit-Item. 2 | # <<< Don't remove them! 3 | # 4 | #------------------------------------------------------------------------------ 5 | # 6 | # This is the textual representation of a GeoHitTableItem*.bin file. 7 | # It is defined by Wiimm and scanned by a 2-pass parser. 8 | # 9 | # Hints for decoding to a text file: 10 | # 11 | # - If either option --no-header (-H) or option --brief (-B) is set, this 12 | # general description is suppressed. 13 | # 14 | # - If either option --export (-X) is set once or option --brief (-B) is set 15 | # twice, a very small text file without descriptions and other not needed 16 | # parameters is created. 17 | # 18 | # - If option --long (-l) is set, then additional hidden parameters are 19 | # included. They are automatically included, if they are differ from the 20 | # the standard settings. 21 | # 22 | #------------------------------------------------------------------------------ 23 | # 24 | # Syntax for section [OBJECTS]: 25 | # 26 | # OBJ_ID P1 .. P15 27 | # 28 | # OBJ_ID : Id of the object. Use prefix '0x' for hex numbers. 29 | # P1..P15 : 15 hit parameters, optionally separated by commas. 30 | # A point ('.') is interpreted as Null, and an equal sign ('=') 31 | # leaves the value unchanged. Missed parameters are not modified. 32 | # 33 | # See https://wiki.tockdom.com/wiki/GeoHitTableItem.bin 34 | # and https://wiki.tockdom.com/wiki/GeoHitTableItemObj.bin for more details. 35 | # 36 | #------------------------------------------------------------------------------ 37 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-hipt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [HIPT] 6 | # Sort order: %u 7 | 8 | # Hide the position tracker based on online mode, the current lap index and 9 | # the current checkpoint of the player. 10 | # 11 | # Each row is a rule. If a player enters a new check point, the first matching 12 | # rule is used. Therefor the current mode (offline or online), the current lap 13 | # index and the index of the current CKPT is compared with the row elements 14 | # COND, LAP, FROM and TO. Lap is 0 until crossing the lap counter the first 15 | # time. This includes the start position. 16 | # 17 | # Row members: 18 | # COND is either 1 for offline only, 2 for online only, or 3 for both cases. 19 | # LAP is compared with the current lap index. Negative values refer to the 20 | # absolute number of laps: -1 is always the last lap and -2 is the penultimate 21 | # lap. This means that the setting remains valid if the number of laps (STGI) 22 | # is changed. The special value 99 means 'match all laps'. 23 | # FROM and TO build an inclusive range to compare the current check point. 24 | # SHOW is either 0 or 1 to hide or show the position tracker. If no rule 25 | # matches, the position tracker is shown (like rule »3 99 0 255 1«). 26 | # 27 | # Notes: Place the most specific rules above and more general rules below on 28 | # the list because of the first-hit search. Parameter @OFFLINE-ONLINE of 29 | # section TEST can be used to force a condition for testing. 30 | 31 | #HIPT# 32 | #-------------------------- 33 | # __CKPT__ 34 | # cond lap from to show 35 | #-------------------------- 36 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-test-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [TEST] 6 | # Sort order: %u 7 | 8 | # This section defines various settings to test special situations. 9 | 10 | #----------------------------------------------------------------------- 11 | # The next set defines parameters to test the extended conditions 12 | # (extended presence flags). The settings allow to force special modes. 13 | # Details: https://wiki.tockdom.com/wiki/Extended_presence_flags 14 | #----------------------------------------------------------------------- 15 | 16 | # Force offline or online mode. Use one symbol of: LEX$OO_AUTO (default), 17 | # LEX$OO_OFFLINE, LEX$OO_ONLINE. 18 | @OFFLINE-ONLINE = LEX$OO_%s 19 | 20 | # If >0: Force number of local players at Wii. It is robust, so values >4 21 | # are accepted, but rounded down to 4 (offline) or 2 (online). 22 | @N-OFFLINE = %u 23 | 24 | # If >0: Force number of total players for online modes. It is robust, so 25 | # values >99 are rounded down to 99. 26 | @N-ONLINE = %u 27 | 28 | # If between 0 and 15: Use this bit number to check 16-bit words of CONDITIONS 29 | # and ignore previous settings. Good values are: LEX$CB_AUTO, LEX$CB_TIMETRIAL 30 | # (same as LEX$CB_RESERVED1) and LEX$CB_RESERVED2. 31 | @COND-BIT = %d 32 | 33 | # Force a game mode. Use one symbol of: LEX$GM_AUTO (default), LEX$GM_BALLOON, 34 | # LEX$GM_COIN, LEX$GM_VERSUS, LEX$GM_ITEMRAIN or LEX$GM_STANDARD. 35 | @GAME-MODE = LEX$GM_%s 36 | 37 | # Force an engine mode. Use one symbol of: LEX$EN_AUTO (default), 38 | # LEX$EN_BATTLE, LEX$EN_50CC, LEX$EN_100CC, LEX$EN_150CC or LEX$EN_200CC. 39 | # For mirror modes use LEX$EN_150M or LEX$EN_200M. 40 | @ENGINE = LEX$EN_%s 41 | 42 | # If between 1 and 8: Force a random scenario. 43 | @RANDOM = %u 44 | -------------------------------------------------------------------------------- /project/text-files/distrib.inc/distrib-tracks-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | [TRACK-LIST] 4 | #------------------------------------------------------------------------------ 5 | # Track listing 6 | #------------------------------------------------------------------------------ 7 | 8 | # This is the track listing. 2 formats are supported: 9 | # old: SHA1 CUP NAME 10 | # new: TYPE DISTRIB_FLAGS LE_FLAGS SHA1 TRACK_SLOT CUP NAME 11 | 12 | # TYPE is either 'vs' or 'bt'. When TYPE is present, then TRACK_SLOT is 13 | # expected. SHA1 is the SHA1 checksunm of the track. 14 | # 15 | # DISTRIB_FLAGS is an information used by ct.wiimm.de and wiimmfi.de: 16 | # B: boost, N: new, A: again, U: update, F: fill 17 | # d: is _d file, t: title only, h: hidden, o: original track 18 | # 19 | # LE_FLAGS are LE-CODE track flags: 20 | # Flag 1: B: battle arena, V: versus track, r: random slot. 21 | # Flag 2: Used in: o: original cup, c custom cup, b: both. 22 | # Flag 3: H: header of group, G: group member, X: both. 23 | # Flags 4: N: new track, T: texture hack, 2: both. 24 | # Flags 5+6: A: alias, i: invisible/hidden. 25 | # 26 | # SHA1 is the sha1 of the track. 27 | # 28 | # TRACK_SLOT is a number between 0 and 4095 to define the slot number of the 29 | # track. If <0 or not a number, the slot is undefined. 30 | # 31 | # CUP is of format "cup.index". An optional 'A' can be used as the first 32 | # character to indicate an arena. However, this indicator is ignored if 33 | # TYPE is present. Set it to "-" if the cup is unknown. 34 | # 35 | # All other characters are read in as the NAME of the track. 36 | # 37 | # The new format is compatible with Wiimmfi.de for region limits. 38 | 39 | # Please edit the CUP column if missed. Use »CUP.INDEX« (e.g. »1.2« or »20.4«) 40 | # for racing tracks and »'A' CUP.INDEX« (e.g. »A2.5«) for battle arenas. 41 | 42 | -------------------------------------------------------------------------------- /project/text-files/kcl.inc/kcl-flag-template-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | ############################################################################## 3 | ##### All behind a '#' on the same line is a comment and ignored. ##### 4 | ##### See https://szs.wiimm.de/doc/kcl/flagfile for more details. ##### 5 | ############################################################################## 6 | # function f() 7 | 8 | # First, we define a flag function named f(). 9 | # This allows us to define type and variant as 2 values. 10 | 11 | @function f # (type,variant) 12 | @return $1 & 0x1f | $2 << 5 13 | @endfunction 14 | 15 | ############################################################################## 16 | # function a() 17 | 18 | # Here we define function a() to support the flag variant type A. 19 | # For details see http://wiimm.de/r/ctw/KCL_flag 20 | 21 | @function a # (type,w,x,y,z) 22 | @return $1 & 0x1f # type (5 bits) 23 | > | ( $2 & 7 ) << 13 # W (3 bits) 24 | > | ( $3 & 3 ) << 11 # X (2 bits) 25 | > | ( $4 & 7 ) << 8 # Y (3 bits) 26 | > | ( $5 & 7 ) << 5 # Z (3 bits) 27 | @endfunction 28 | 29 | ############################################################################## 30 | # function i() 31 | 32 | # The function i() supports fall boundaries. 33 | 34 | @function i # (type,z,index) 35 | @return $1 & 0x1f # type (5 bits) 36 | > | ( $2 & 7 ) << 5 # Z (3 bits) 37 | > | ( $3 & 0xff ) << 8 # index (8 bits) 38 | @endfunction 39 | 40 | ############################################################################## 41 | # table 42 | 43 | #----------------------------------------------------------------------------- 44 | # group_name = flag_or_expression 45 | # = f(type,variant) 46 | # = a(type,w,x,y,z) 47 | # = i(type,z,index) 48 | #----------------------------------------------------------------------------- 49 | -------------------------------------------------------------------------------- /project/text-files/config.inc/config-paths-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | [PATHS] 3 | # This section defines different paths. Each path may contain any number of 4 | # references to other paths by »$(NAME)«. All names are case sensitive. 5 | # >>> Please use '/' and not '\' as directory separator, even for Cygwin. <<< 6 | 7 | # The base is only a helper path to allow relative paths. It is not used 8 | # internally. For Cygwin, it is usually Windows »PROGRAMFILES«. For other 9 | # systems it is »/usr/local«. 10 | base = %s 11 | 12 | # The directory, where the tools will be installed. After installation 13 | # it is used for updates. It is usually »$(base)/Wiimm/SZS« for Cygwin 14 | # and »$(base)/bin« for other systems. 15 | install = %s 16 | 17 | # File or directory, where a configuration should be stored on installation. 18 | # The filename »wiimms-szs-tools.conf« is appended for directories. 19 | # An existing file is scanned and rewritten. If empty, don't create it. 20 | config = %s 21 | 22 | # The following is a directory list in the order in which the configuration 23 | # file is searched. Uncomment a line to override the previous setting. 24 | # config = "$(xdg_home)/szs/" # XDG directory of the user 25 | # config = "$(home)/.szs/" # Home directory of the user 26 | # config = "$(xdg_etc)/" # Standard XDG config-dir for unix based systems 27 | # config = "/etc/" # Standard config-dir for unix based systems 28 | # config = "$(share)/" # Directory of shared files (bad choice) 29 | # config = "$(install)/" # Directory of installation 30 | 31 | # The directory for shared files. It is usually »$(install)« for Cygwin and 32 | # »$(base)/share/szs« for other systems. 33 | share = %s 34 | 35 | # The directory in which the auto-add files are saved and searched for first. 36 | # It is usually »$(share)/auto-add« for all systems. 37 | autoadd = %s 38 | 39 | -------------------------------------------------------------------------------- /project/dclib/Makefile.rules: -------------------------------------------------------------------------------- 1 | 2 | ########################################################################### 3 | # # 4 | # _____ ____ # 5 | # | __ \ / __ \ _ _ _____ # 6 | # | | \ \ / / \_\ | | | | _ \ # 7 | # | | \ \| | | | | | |_| | # 8 | # | | | || | | | | | ___/ # 9 | # | | / /| | __ | | | | _ \ # 10 | # | |__/ / \ \__/ / | |___| | |_| | # 11 | # |_____/ \____/ |_____|_|_____/ # 12 | # # 13 | # Wiimms source code library # 14 | # # 15 | ########################################################################### 16 | 17 | #------------------------------------------------------------------------------ 18 | 19 | .PHONY: dclib 20 | dclib: 21 | @echo "" 22 | @echo "DCLIB_THREAD = $(DCLIB_THREAD)" 23 | @echo "DCLIB_MYSQL = $(DCLIB_MYSQL)" 24 | @echo "DCLIB_TERMINAL = $(DCLIB_TERMINAL)" 25 | @echo "DCLIB_NETWORK = $(DCLIB_NETWORK)" 26 | @echo "DCLIB_HAVE_USABLE_SIZE = $(DCLIB_HAVE_USABLE_SIZE)" 27 | @echo "" 28 | @echo "DCLIB_FLAGS = $(DCLIB_FLAGS)" 29 | @echo "DCLIB_O_MKW = $(DCLIB_O_MKW)" 30 | @echo "DCLIB_O_WIIMMFI = $(DCLIB_O_WIIMMFI)" 31 | @echo "" 32 | @echo "DCLIB_O = $(DCLIB_O)" 33 | @echo "" 34 | 35 | #------------------------------------------------------------------------------ 36 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-enpt-ropt-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # Experimental options, tools before v1.60a will throw error messages! 3 | @SHOW-OPTIONS = %d # >0: force printing of all route options 4 | 5 | # AUTO-CONNECT is one of the following AC$* symbols: 6 | # For racing tracks and for battle arenas with manual links setup: 7 | # AC$OFF 8 | # Do not add any auto connection. Route connection are fully under 9 | # control of the user. 10 | # AC$PREV 11 | # Setup PREV links by NEXT links of other routes. Existing PREV links 12 | # are cleared before. This is the default and the behavior of all 13 | # versions before v1.60a. 14 | # 15 | # Modes for automatic route connection in battle arenas: 16 | # AC$DISPATCH 17 | # Find dispatch points and create links automatically if not already 18 | # set manually. This is the default for enemy routes, if dispatch 19 | # points detected. 20 | # 21 | # Flags: The modes of above can be combined with the following options by 22 | # the OR operator '|' (example: AC$PREV | ACF$FIX) 23 | # ACF$FIX_PREV 24 | # Add a self-link, if a PREV list is empty. 25 | # ACF$FIX_NEXT 26 | # Add a self-link, if a NEXT list is empty. 27 | # ACF$FIX 28 | # Abbreviation for: ACF$FIX_PREV | ACF$FIX_NEXT 29 | # This is the default for item routes to avoid a freeze. 30 | # ACF$PR_PREV 31 | # Print "$PREV : ..." always. 32 | # 33 | @AUTO-CONNECT = %s%s%s 34 | 35 | # Syntax of a new command with impact to all following $GROUP commands: 36 | # "$DEF-CLASS" [":"] class_name 37 | 38 | # Syntax of new route commands (placed behind $GROUP command): 39 | # "$PREV" [":"] [group_name]... 40 | # "$SETTINGS" [":"] setting1 setting2 [ "AUTO" | "ROUTE" | "DISPATCH" ] 41 | # "$CLASS" [":"] class_name_prev [class_name_next] 42 | # "$AC-PREV" [":"] class_name 43 | # "$AC-NEXT" [":"] class_name 44 | # "$ONEWAY" [":"] "NONE" | "PREV" | "NEXT" | "BOTH" 45 | -------------------------------------------------------------------------------- /project/setup/szs.def: -------------------------------------------------------------------------------- 1 | 2 | //--------------------------------- 3 | // This file is generated by make. 4 | // Any changes will be lost! 5 | //--------------------------------- 6 | 7 | #gdef szs$ = @map 8 | 9 | #gdef szs$['TOOLSET_SHORT'] = "@@TOOLSET-SHORT@@" 10 | #gdef szs$['TOOLSET_LONG'] = "@@TOOLSET-LONG@@" 11 | #gdef szs$['WSZST_SHORT'] = "@@WSZST-SHORT@@" 12 | #gdef szs$['WSZST_LONG'] = "@@WSZST-LONG@@" 13 | #gdef szs$['WBMGT_SHORT'] = "@@WBMGT-SHORT@@" 14 | #gdef szs$['WBMGT_LONG'] = "@@WBMGT-LONG@@" 15 | #gdef szs$['WCTCT_SHORT'] = "@@WCTCT-SHORT@@" 16 | #gdef szs$['WCTCT_LONG'] = "@@WCTCT-LONG@@" 17 | #gdef szs$['WIMGT_SHORT'] = "@@WIMGT-SHORT@@" 18 | #gdef szs$['WIMGT_LONG'] = "@@WIMGT-LONG@@" 19 | #gdef szs$['WKCLT_SHORT'] = "@@WKCLT-SHORT@@" 20 | #gdef szs$['WKCLT_LONG'] = "@@WKCLT-LONG@@" 21 | #gdef szs$['WKMPT_SHORT'] = "@@WKMPT-SHORT@@" 22 | #gdef szs$['WKMPT_LONG'] = "@@WKMPT-LONG@@" 23 | #gdef szs$['WLECT_SHORT'] = "@@WLECT-SHORT@@" 24 | #gdef szs$['WLECT_LONG'] = "@@WLECT-LONG@@" 25 | #gdef szs$['WMDLT_SHORT'] = "@@WMDLT-SHORT@@" 26 | #gdef szs$['WMDLT_LONG'] = "@@WMDLT-LONG@@" 27 | #gdef szs$['WPATT_SHORT'] = "@@WPATT-SHORT@@" 28 | #gdef szs$['WPATT_LONG'] = "@@WPATT-LONG@@" 29 | #gdef szs$['WSTRT_SHORT'] = "@@WSTRT-SHORT@@" 30 | #gdef szs$['WSTRT_LONG'] = "@@WSTRT-LONG@@" 31 | 32 | #gdef szs$['AUTHOR'] = "@@AUTHOR@@" 33 | 34 | #gdef szs$['VERSION'] = "@@VERSION@@" 35 | #gdef szs$['VERSION_NUM'] = "@@VERSION-NUM@@" 36 | #gdef szs$['BETA_VERSION'] = "@@BETA-VERSION@@" 37 | #gdef szs$['BETA_SUFFIX'] = "@@BETA-SUFFIX@@" 38 | 39 | #gdef szs$['REVISION'] = "@@REV@@" 40 | #gdef szs$['REVISION_NUM'] = @@REV-NUM@@ 41 | #gdef szs$['REVISION_NEXT'] = @@REV-NEXT@@ 42 | 43 | #gdef szs$['BINTIME'] = @@BINTIME@@ 44 | #gdef szs$['DATE'] = "@@DATE@@" 45 | #gdef szs$['TIME'] = "@@TIME@@" 46 | #gdef szs$['DATETIME'] = "@@DATE@@ @@TIME@@" 47 | 48 | -------------------------------------------------------------------------------- /project/setup/version.h: -------------------------------------------------------------------------------- 1 | 2 | //--------------------------------- 3 | // This file is generated by make. 4 | // Any changes will be lost! 5 | //--------------------------------- 6 | 7 | #define TOOLSET_SHORT "@@TOOLSET-SHORT@@" 8 | #define TOOLSET_LONG "@@TOOLSET-LONG@@" 9 | #define WSZST_SHORT "@@WSZST-SHORT@@" 10 | #define WSZST_LONG "@@WSZST-LONG@@" 11 | #define WBMGT_SHORT "@@WBMGT-SHORT@@" 12 | #define WBMGT_LONG "@@WBMGT-LONG@@" 13 | #define WCTCT_SHORT "@@WCTCT-SHORT@@" 14 | #define WCTCT_LONG "@@WCTCT-LONG@@" 15 | #define WIMGT_SHORT "@@WIMGT-SHORT@@" 16 | #define WIMGT_LONG "@@WIMGT-LONG@@" 17 | #define WKCLT_SHORT "@@WKCLT-SHORT@@" 18 | #define WKCLT_LONG "@@WKCLT-LONG@@" 19 | #define WKMPT_SHORT "@@WKMPT-SHORT@@" 20 | #define WKMPT_LONG "@@WKMPT-LONG@@" 21 | #define WLECT_SHORT "@@WLECT-SHORT@@" 22 | #define WLECT_LONG "@@WLECT-LONG@@" 23 | #define WMDLT_SHORT "@@WMDLT-SHORT@@" 24 | #define WMDLT_LONG "@@WMDLT-LONG@@" 25 | #define WPATT_SHORT "@@WPATT-SHORT@@" 26 | #define WPATT_LONG "@@WPATT-LONG@@" 27 | #define WSTRT_SHORT "@@WSTRT-SHORT@@" 28 | #define WSTRT_LONG "@@WSTRT-LONG@@" 29 | 30 | #define AUTHOR "@@AUTHOR@@" 31 | 32 | #define BASE_VERSION "@@VERSION@@" 33 | #define VERSION_NUM "@@VERSION-NUM@@" 34 | #define VERSION_INT @@VERSION-INT@@ 35 | #define BETA_VERSION @@BETA-VERSION@@ 36 | 37 | #if HAVE_WIIMM_EXT 38 | #define VERSION "@@VERSION@@.w" 39 | #else 40 | #define VERSION "@@VERSION@@" 41 | #endif 42 | 43 | #define REVISION "@@REV@@" 44 | #define REVISION_NUM @@REV-NUM@@ 45 | #define REVISION_NEXT @@REV-NEXT@@ 46 | 47 | #define BINTIME @@BINTIME@@ 48 | #define DATE "@@DATE@@" 49 | #define TIME "@@TIME@@" 50 | #define DATETIME "@@DATE@@ @@TIME@@" 51 | #define YEAR @@YEAR@@ 52 | 53 | #define URI_REPOS "@@URI-REPOS@@/" 54 | #define URI_VIEWVC "@@URI-VIEWVC@@/" 55 | #define URI_HOME "@@URI-HOME@@" 56 | #define URI_DOWNLOAD "@@URI-DOWNLOAD@@" 57 | 58 | #define HAVE_XSRC @@HAVE-XSRC@@ 59 | 60 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-poti-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [POTI] 6 | # Routes 7 | # KMP/POTI syntax & semantics: https://szs.wiimm.de/doc/kmp/poti 8 | 9 | @REVISION = %u 10 | @AUTO-ROUTE-NAME = 0 11 | 12 | # If a route is closed, 3 global variables are defined for the route. 13 | # 'NAME' is a placeholder for the route name (before renaming happens): 14 | # NAME.len = Total route distance over all points. 15 | # NAME.time = Total route time in 1/60 seconds calculated by the sum of 16 | # all distances and the associated speed values. 17 | # NAME.time.set = Same value as 'NAME.time' (but see below). 18 | 19 | # These 15 commands that are computed after closing a route in this order: 20 | # @KCL-FALL-WIDTH = CUBE_WIDTH 21 | # @KCL-FALL-PRE-ADD = HEIGHT_OR_VECTOR 22 | # @KCL-FALL-POST-ADD = HEIGHT_OR_VECTOR 23 | # @KCL-FALL-TYPES = TYPEMASK 24 | # @XSS = X1OLD,X1NEW, X2OLD,X2NEW 25 | # @YSS = Y1OLD,Y1NEW, Y2OLD,Y2NEW 26 | # @ZSS = Z1OLD,Z1NEW, Z2OLD,Z2NEW 27 | # @SCALE = FACTOR [ORIGIN] 28 | # @SHIFT = DELTA 29 | # @HROTATE = DEGREE [ORIGIN] 30 | # @REVERSE-ORDER = 0|1 31 | # @SET-ROUTE-TIME = SECONDS 32 | # @ROUTE-OBJECT = 0=OFF | -1=USE_DEFAULT_SETTINGS | >0=OBJECT_ID 33 | # # Example: mode$showrt & %u ? -1 : 0 34 | # @ROUTE-OBJECT-SHIFT = VECTOR 35 | # @ROUTE-OBJECT-SCALE = VECTOR 36 | # The commands are reset after computations. 37 | 38 | #POTI# 39 | #------------------------------------------------------#-------------------------- 40 | # _____________position_____________ value un- # seconds+distance horiz 41 | #idx x y z 1/60s known # to next angle 42 | #------------------------------------------------------#-------------------------- 43 | -------------------------------------------------------------------------------- /project/text-files/lex.inc/lex-elem-ritp-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [RITP] 6 | # Sort order: %u 7 | 8 | # Normally only the first next-link of KMP:ITPH is used for Bullet Bill and 9 | # Red Shells (except when the shell has already targeted a player). In the 10 | # case of equivalent routes, however, it would be desirable for one of the 11 | # possible routes to always be selected at random. It is important to ensure 12 | # that everyone uses the same route when racing online. 13 | # 14 | # And exactly this can be defined with this section. Therfore you define a 15 | # list with rules. Each rule defines the index of the ITPH element, the number 16 | # of next-links affected, and the type of modification. LE-CODE is very robust 17 | # here and only accepts valid rules on existing elements. 18 | 19 | # Rule members: 20 | # INDEX: Index of KMP:ITPH entry (0..255). 21 | # NN: Number of next-links to shuffle (2..6). 22 | # MODE: How to shuffle (see below). 23 | # PARAM: Optional parameter for some modes (see below). 24 | 25 | # Modes: 26 | # 27 | # RITP$OFF 28 | # Ignore this rule, but store it including PARAM. 29 | # This mode can be used to temporary deactivate a rule. 30 | # 31 | # RITP$START 32 | # Select first next-link by random at race start. The selected next-link 33 | # must be defined (not -1 == not 0xff), otherwise ignore the rule. 34 | # PARAM is ignored. 35 | # 36 | # More modes are planned. 37 | 38 | # Example: 39 | # ITPH element #10 (zero based index) has defined 3 equivalent routes and 2 40 | # additional routes by its next-links. At race start one of the first 3 links 41 | # should be selected by random as standard route. The rule for this case is: 42 | # 43 | # 10 3 RITP$START 44 | # 45 | # This rule is ignored by LE-CODE, if the addressed ITPH element does not 46 | # exists or if the by random selected next-link is not defined. 47 | 48 | -------------------------------------------------------------------------------- /project/gen-text-file.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | dir="$1" 4 | shift 5 | 6 | if [[ ! -d $dir ]] 7 | then 8 | echo "Directory not found: $dir" >&2 9 | exit 1 10 | fi 11 | 12 | function gen_text() 13 | { 14 | local varname="$1" 15 | local src="$2" 16 | 17 | printf "\nconst char %s[] =\n{\n" "$varname" 18 | if [[ $varname =~ _bz2$ ]] 19 | then 20 | # '-f%z' for MAC, '-c%s' for GNU 21 | s=$( stat -c%s "$src" 2>/dev/null || stat -f%z "$src" ) 22 | x=$( printf "%08x" "$s" ) 23 | let c=s/100000+1 24 | ((c>9)) && c=9 25 | printf " 0x%s, 0x%s, 0x%s, 0x%s, // uncompressed size = $s, compression level = $c\n" \ 26 | "${x:0:2}" "${x:2:2}" "${x:4:2}" "${x:6:2}" 27 | bzip2 -$c < "$src" | xxd -i -c16 28 | elif [[ $varname =~ _cr$ ]] 29 | then 30 | grep -v '^~' "$src" \ 31 | | sed 's/\\/\\\\/g; s/"/\\"/g; s/^/ "/; s/#FF#/#\\f/; s/$/\\r\\n"/' 32 | else 33 | grep -v '^~' "$src" \ 34 | | sed 's/\\/\\\\/g; s/"/\\"/g; s/^/ "/; s/#FF#/#\\f/; s/$/\\n"/' 35 | fi 36 | printf "};\n\n" 37 | } 38 | 39 | for src in "$@" 40 | do 41 | src="${src##*/}" 42 | name="${src%.*}" 43 | name="text_${name//[-.]/_}" 44 | cname="$( echo "SZS_${name}_INC" | awk '{print toupper($0)}' )" 45 | #echo "$name : $src -> $dest" 46 | 47 | { 48 | printf "\n#ifndef %s\n#define %s 1\n" "$cname" "$cname" 49 | 50 | if [[ -f "$dir/$src" ]] 51 | then 52 | gen_text "$name" "$dir/$src" 53 | echo "$src: $dir/$src" >"$src.d" 54 | elif [[ -d "$dir/$src" ]] 55 | then 56 | printf '%s:' "$src" >"$src.d" 57 | for inc in "$dir/$src"/*.inc 58 | do 59 | name="${inc##*/}" 60 | name="${name%.*}" 61 | name="text_${name//[-.]/_}" 62 | gen_text "$name" "$inc" 63 | printf ' \\\n\t%s' "$inc" >>"$src.d" 64 | done 65 | printf '\n' >>"$src.d" 66 | else 67 | printf '\n!! Text not found: %s\n' "$dir/$src" >&2 68 | rm -f "$src" 69 | exit 1 70 | fi 71 | 72 | printf "#endif // %s\n\n" "$cname" 73 | 74 | } >"$src" 75 | 76 | done 77 | 78 | -------------------------------------------------------------------------------- /project/text-files/objflow.inc/objflow-info-cr.inc: -------------------------------------------------------------------------------- 1 | #OBJFLOW <<< The first 8 characters are the magic for OBJFLOW text files. 2 | # <<< Don't remove them! 3 | # 4 | #------------------------------------------------------------------------------ 5 | # 6 | # This is the textual representation of an ObjFlow.bin file. 7 | # It is defined by Wiimm and scanned by a 2-pass parser. 8 | # 9 | # Hints for decoding to a text file: 10 | # 11 | # - If either option --no-header (-H) or option --brief (-B) is set, this 12 | # general description is suppressed. 13 | # 14 | # - If either option --export (-X) is set once or option --brief (-B) is set 15 | # twice, a very small text file without descriptions and other not needed 16 | # parameters is created. 17 | # 18 | # - If option --long (-l) is set, then additional hidden parameters are 19 | # included. They are automatically included, if they are differ from the 20 | # the standard settings. 21 | # 22 | #------------------------------------------------------------------------------ 23 | # 24 | # Syntax for section [OBJECTS]: 25 | # 26 | # Beside of emtpy lines and comments, there are 2 kinds of parameters. 27 | # Both start with an keyword (case insensitive): 28 | # 29 | # 'OBJECT' ID, NAME, RESOURCES 30 | # ID is the object ID to identify the object. Use prefix '0x' for hex 31 | # numbers. NAME is the object name. If not set, the original name is 32 | # used. RESOURCES is the resources string. If not set, the original 33 | # string is used. Commas are mandatory to separate string parameters. 34 | # 35 | # 'PARAM' P0, P1, P2, P3, P4, P5, P6, P7, P8 36 | # Define up to 9 parameters of the previous defined 'OBJECT'. 37 | # A point ('.') is interpreted as Null, and an equal sign ('=') 38 | # leaves the value unchanged. Missed parameters are not modified. 39 | # Commas are optional if expression is not ambiguous. 40 | # 41 | # See https://wiki.tockdom.com/wiki/ObjFlow.bin for more details. 42 | # 43 | #------------------------------------------------------------------------------ 44 | -------------------------------------------------------------------------------- /project/src/libbz2/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------- 3 | 4 | This program, "bzip2", the associated library "libbzip2", and all 5 | documentation, are copyright (C) 1996-2010 Julian R Seward. All 6 | rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | 2. The origin of this software must not be misrepresented; you must 16 | not claim that you wrote the original software. If you use this 17 | software in a product, an acknowledgment in the product 18 | documentation would be appreciated but is not required. 19 | 20 | 3. Altered source versions must be plainly marked as such, and must 21 | not be misrepresented as being the original software. 22 | 23 | 4. The name of the author may not be used to endorse or promote 24 | products derived from this software without specific prior written 25 | permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 28 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 31 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 33 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 35 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | Julian Seward, jseward@bzip.org 40 | bzip2/libbzip2 version 1.0.6 of 6 September 2010 41 | 42 | -------------------------------------------------------------------------- 43 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-pt-info-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | @REVISION = %u 3 | @%s-HEAD-VALUE = %#x 4 | @%s-HEAD-VALUE = %#x 5 | @AUTO-FILL = 0.0 # >1 (e.g. 5000): create more points if distance is larger 6 | @AUTO-GROUP-NAME = 0 7 | @ROTATE-GROUP-LINKS = 0 8 | @ROUTE-OBJECT = mode$showrt & %u ? -1 : 0 # 0=off, -1=use default, >0=object id 9 | @ROUTE-OBJECT-SHIFT = $NONE # v3(0) # add vector to position 10 | @ROUTE-OBJECT-SCALE = $NONE # v3(1) # define vector scale 11 | 12 | # KCL-FALL (automatic height correction) 13 | # Define the following values here or at any place between the points. 14 | # They are valid until re-defined. Disable this feature by @KCL-FALL-WIDTH=0. 15 | @KCL-FALL-WIDTH = 0 # set to a value >0 (e.g. 200) to enable KCL falling 16 | @KCL-FALL-PRE-ADD = 0 # add this height or vector before falling 17 | @KCL-FALL-POST-ADD = 0 # add this height or vector after success 18 | @KCL-FALL-TYPES = KCL$DRIVE # bit field of recognized KCL types 19 | # Best values are: 20 | # - KCL$BORDER: All KCL types except effects. 21 | # - KCL$DRIVE: All driveable types like road, boost, ramp, water, ... 22 | 23 | # Column 'flag' is optional and usually only used internally. 24 | # Syntax: FLAGS_STRING or '(' EXPRESSION ')' 25 | # F (F$FALL): Point can be used for FALL-DOWN functionality. 26 | # S (F$SNAP): Point can be used for SNAP functionality (ignored by ITPT). 27 | # J (F$JGPT): Point can be used for automatic JGPT creation. 28 | # Remove the letter or replace it by '-' to disable a feature. 29 | # If the column is missed, all options are enabled by default. 30 | 31 | # If you enable EXPORT-FLAGS (set it to 1), the flags are exported using the 32 | # lowest byte of WIDTH FACTOR. The factor needs only 2 or 3 digits, so this 33 | # has no disadvantage on the width factors. 5 of the 8 bits are used to verify 34 | # changes by other tools on import. If at least 1 of these bit of any point 35 | # is wrong, import is canceled. 36 | @EXPORT-FLAGS = %d # 0=disabled, 1=enabled (overridden by option --export-flags) 37 | -------------------------------------------------------------------------------- /project/text-files/kcl.inc/kcl-dump-head-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | S.verticies =%8u 3 | S.normals =%8u 4 | S.triangles =%8u, %u unused, %u fixed, %u invalid 5 | S.octree_size =%8u 6 | S.total_size =%8u 7 | 8 | H.unknown_0x10 = %11.3f 9 | H.unknown_0x38 = %11.3f 10 | 11 | H.min_octree = %11.3f %11.3f %11.3f # minimum coord for octree entrance 12 | S.min_point = %11.3f %11.3f %11.3f # minimum coord of all points 13 | S.mean_point = %11.3f %11.3f %11.3f # arithmetic mean of all points 14 | S.max_point = %11.3f %11.3f %11.3f # maximum coord of all points 15 | S.max_octree = %11.3f %11.3f %11.3f # maximum coord for octree entrance 16 | 17 | H.mask = 0x%08x 0x%08x 0x%08x # masks (header) 18 | H.shifts = %8u> %8u< %8u< # header shift values 19 | S.null_bits = %8u %8u %8u # number of low 0 bits 20 | S.bcube_bits = %8u %8u %8u # number of base cube bits 21 | S.n_bcubes = %8u %8u %8u # number of base cubes 22 | 23 | S.min_distance = %14.6f # minimum distance between points of a triangle 24 | S.max_distance = %11.3f # maximum distance between points of a triangle 25 | 26 | S.bcube_width = %8u # width of a single base cube = 2^rshift 27 | S.max_cube_width = %8u # maximum width of a cube with triangles 28 | S.min_cube_width = %8u # minimum width of a cube with triangles 29 | ~S.blow_size = %8u # suggestion: what KCL_BLOW value was used 30 | S.n_base_cubes = %8u # number of base cubes 31 | S.n_cube_nodes = %8u # number of cube nodes (each with 8 cube links) 32 | S.total_cubes = %8u # total number of cubes 33 | S.max_depth = %8u # maximum octree depth 34 | S.ave_depth = %11.2f # average octree depth 35 | 36 | S.n_null_lists = %8u # number of triangle lists with 0 triangles 37 | S.n_tri_lists = %8u # number of triangle lists with >0 triangles 38 | S.n_null_links = %8u # number of triangle links to lists with 0 triangles 39 | S.n_tri_links = %8u # number of triangle links to lists with >0 triangles 40 | 41 | -------------------------------------------------------------------------------- /project/templates/module/last-history.txt: -------------------------------------------------------------------------------- 1 | szs v@@VERSION@@ r@@REV-NEXT@@ - @@@@-@@-@@ 2 | 3 | - Updated prefix database: Added CTGPS, EX, EXTR, GK2, GK3, GK7, HGSS, HWTA, 4 | SBSPLCP, SKK, TGO. Removed LPC. 5 | - Bug fix for option --lex-purge: The tools occasionally crashed when 6 | attempting to delete an existing but unneeded LEX file. 7 | - Added support for compression methods YBZ and YLZ (Yaz0 header, but 8 | alternative compressions bzip2 or LZMA). Use one of the new options --cybz, 9 | --ybz, --cylz or --ylz to select the new methods. LE-CODE supports YLZ. 10 | - New option --zero (-z): This option affects the exit status of the 11 | programs. Instead of an exit status, the value 0 is returned for OK. This 12 | happens for notices (-v, status<15), warnings (-vv, status<29), errors 13 | (-vvv, status<115) and fatal errors (-vvvv). The exit status for INTERRUPT 14 | (112) is never replaced. 15 | - Information only: wszst now knows 243 different options. 16 | 17 | ~ - KMP:STGI support for up to 255 laps. 18 | ~ - Option --kmp=MODES supports now settings 1LAP .. 15LAPS. 19 | ~ - New option --n-laps=LAPS override --kmp=MODES and accept 1 to 255 laps. 20 | ~ 21 | ~ - MDL support: Scanning a MDL file and transferring the data into an internal 22 | ~ format was already implemented, but only used for analysis purposes. Now it 23 | ~ is possible to create a binary MDL by reading the internal data. This is 24 | ~ the first step to add MDL materials to enable a track for slot 4.2. 25 | ~ - The tools verify the maximum number of CKPT, ENPT and ITPT (=255). 26 | 27 | Known bugs: 28 | 29 | - Minimaps with an additional bones layer above 'posLD' and 'posRU' (e.g. for 30 | scaling) are handled incorrect on auto adjusting the minimap. 31 | - The tools try always to find the optimal PNG format by analyzing the main 32 | image. The bug is, that mipmaps (or following images in TPL) may need a 33 | different output format (for example colors instead of grayscale). 34 | SOLUTION: Force an output format with for example --transform RGBA32. 35 | ~ - Creating a BRRES from local files is buggy, because missing adjust of 36 | ~ several BRRES and string pool pointers. 37 | ~ - If creating a BRRES the internal name of the sub file is not set to 38 | ~ the filename. This could be problematic if a sub file was renamed. 39 | ~ 40 | -------------------------------------------------------------------------------- /project/setup/INSTALL.txt: -------------------------------------------------------------------------------- 1 | 2 | ##################################################################### 3 | ## _______ _______ _______ ## 4 | ## | ___ |____ | ___ | ## 5 | ## | | |_| / /| | |_| ## 6 | ## | |_____ / / | |_____ ## 7 | ## |_____ | / / |_____ | ## 8 | ## _ | | / / _ | | ## 9 | ## | |___| |/ /____| |___| | ## 10 | ## |_______|_______|_______| ## 11 | ## ## 12 | ## Wiimms SZS Tools ## 13 | ## https://szs.wiimm.de/ ## 14 | ## ## 15 | ##################################################################### 16 | ## ## 17 | ## This file is part of the SZS project. ## 18 | ## Visit https://szs.wiimm.de/ for project details and sources. ## 19 | ## ## 20 | ## Copyright (c) 2011-2013 by Dirk Clemens ## 21 | ## ## 22 | ##################################################################### 23 | 24 | 25 | 26 | How to install Wiimms SZS Tools 27 | =============================== 28 | 29 | Windows: 30 | -------- 31 | 32 | Start: windows-install.exe 33 | After the very first installation of the tools, a reboot is needed. 34 | 35 | 36 | Mac, Linux, Unix: 37 | ----------------- 38 | 39 | First open a console terminal, an admin terminal is the best. 40 | 41 | Then change to the directory, where you have unpacked the distribution. 42 | Therefore use the command: cd DIRECTORY 43 | ... where 'DIRECTORY' is the directory path. 44 | 45 | Call: ./install.sh 46 | 47 | If the script is not started as 'root', the script call itself with 'sudo'. 48 | Depending on your 'sudo' settings, 'sudo' asks you for the root passwort. 49 | To avoid the sudo handling, start the script with: ./install.sh --no-sudo 50 | 51 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-gobj-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | [GOBJ] 6 | # Global objects. 7 | # KMP/GOBJ syntax & semantics: https://szs.wiimm.de/doc/kmp/gobj 8 | 9 | @REVISION = %u 10 | @GOBJ-HEAD-VALUE = %#x 11 | @AUTO-ENEMY-ITEM = 0 # mode$test ? : 0 12 | @AUTO-OBJECT-NAME = 0 13 | @SORT-OBJECTS = SORT$OFF # SORT$GROUPING SORT$ANGLE SORT$TINY 14 | 15 | # KCL-FALL (automatic height correction) 16 | # Define the following values here or at any place between the objects. 17 | # They are valid until re-defined. Disable this feature by @KCL-FALL-WIDTH=0. 18 | @KCL-FALL-WIDTH = 0 # set to a value >0 (e.g. 200) to enable KCL falling 19 | @KCL-FALL-PRE-ADD = 0 # add this height or vector before falling 20 | @KCL-FALL-POST-ADD = 0 # add this height or vector after success 21 | @KCL-FALL-TYPES = KCL$DRIVE # bit field of recognized KCL types 22 | # Best values are: 23 | # - KCL$BORDER: All KCL types except effects. 24 | # - KCL$DRIVE: All driveable types like road, boost, ramp, water, ... 25 | 26 | #------------------------------------------------------------------------------ 27 | # Definition objects and references 28 | 29 | # There is a new kind of presence flags in progress: 30 | # https://wiki.tockdom.com/wiki/Extension_of_Presence_Flags 31 | # Since v2.11a, the KMP compiler supports this new extension. 32 | # Here you find some global settings for the new extension: 33 | 34 | # If >0: Reset not defined parameters of definitions-object to their default 35 | # values. 36 | @FIX-OBJDEF = 0 37 | 38 | # If not DOB$OFF: Sort definitions-objects by object-id and move them to the 39 | # beginning (DOB$BEGIN) or to the end (DOB$END) of all GOBJ elements. 40 | @SORT-OBJDEF = DOB$OFF 41 | 42 | # If >0: Clear invalid reference-ids for modes 0 and 1. 43 | # If >1: Clear invalid reference-ids independend of the mode. 44 | @FIX-REFERENCE = 0 45 | 46 | # If not DOB$OFF: Sort standard objects with a valid reference-id directly 47 | # before (DOB$BEFORE) or behind (DOB$BEHIND) the related definition-object. 48 | @SORT-REFERENCE = DOB$OFF 49 | 50 | # Object statistics: 51 | ##-------------------------------------------------------------------------------------------- 52 | ##count id/hex name characteristics 53 | ##-------------------------------------------------------------------------------------------- 54 | -------------------------------------------------------------------------------- /project/scripts/test-wu8.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # (c) Wiimm, 2012-10-26 3 | 4 | export LC_ALL=POSIX 5 | szsmode=0 6 | logfile= 7 | 8 | SZS=wszst 9 | [[ -x ./wszst ]] && SZS=./wszst 10 | SZS0="$SZS -q" 11 | SZS="$SZS0" 12 | echo "SZS=$SZS" 13 | 14 | DIFF="diff -q" 15 | echo "DIFF=$DIFF" 16 | 17 | HAVE_DCC=0 18 | which -q dcc &>/dev/null && HAVE_DCC=1 19 | 20 | function error() 21 | { 22 | echo "!! Test failed: $*" >&2 23 | exit 1 24 | } 25 | 26 | let count=0 27 | for src in "$@" 28 | do 29 | if [[ $src = -n || $src = --new ]] 30 | then 31 | echo ">> enabled: --NEW" 32 | SZS="$SZS0 --NEW" 33 | continue 34 | fi 35 | 36 | if [[ $src = -o || $src = --old ]] 37 | then 38 | echo ">> enabled: --OLD" 39 | SZS="$SZS0 --OLD" 40 | continue 41 | fi 42 | 43 | if [[ $src = -s || $src = --szs ]] 44 | then 45 | echo ">> enabled: SZS mode" 46 | szsmode=1 47 | continue 48 | fi 49 | 50 | if [[ $src = -l || $src = --log ]] 51 | then 52 | szsmode=1 53 | logfile=./wu8-size.log 54 | echo ">> SZS mode enabled, log to: $logfile" 55 | { 56 | echo 57 | date +'--- %F %T ---' 58 | echo 59 | } >>"$logfile" 60 | continue 61 | fi 62 | 63 | let count++ 64 | printf "%5u. %s\n" $count "$src" 65 | temp="$(mktemp -ut test-wu8-XXXXXXXX).tmp" || exit 1 66 | #echo "TEMP=$temp" 67 | 68 | $SZS decompress "$src" -D "$temp/11.u8" || error 11 decompress 69 | $SZS norm "$temp/11.u8" || error 11 norm 70 | $SZS norm --wu8 "$temp/11.u8" -D "$temp/12.wu8" || error 12 decode WU8 71 | $SZS norm --u8 "$temp/12.wu8" -D "$temp/13.u8" || error 13 encode WU8 72 | $DIFF "$temp/11.u8" "$temp/13.u8" || error raw diff 11.u8 13.u8 73 | 74 | if ((szsmode)) 75 | then 76 | $SZS norm "$src" -D "$temp/21.szs" || error 11 norm 77 | $SZS norm --wu8 "$temp/21.szs" -D "$temp/22.wu8" || error 12 decode WU8 78 | $SZS norm --u8 "$temp/22.wu8" -D "$temp/23.szs" || error 13 encode WU8 79 | $DIFF "$temp/21.szs" "$temp/23.szs" || error raw diff 21.szs 23.szs 80 | if [[ $logfile != "" ]] 81 | then 82 | s1=$(stat -c%s "$temp/21.szs") 83 | s2=$(stat -c%s "$temp/22.wu8") 84 | if ((HAVE_DCC)) 85 | then 86 | printf "%8u %8u %6.2f%% %s\n" $s1 $s2 $(dcc "100.0*$s2/$s1") "$src" >>"$logfile" 87 | else 88 | printf "%8u %8u %3d%% %s\n" $s1 $s2 $((100*s2/s1)) "$src" >>"$logfile" 89 | fi 90 | fi 91 | fi 92 | 93 | rm -rf "$temp" 94 | done 95 | echo "**OK**" 96 | 97 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-ledef-track-list-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ################## 4 | [TRACK-LIST] 5 | ################## 6 | 7 | # A track definition consists of a basic definition (keyword TRACK) and any 8 | # number of additional definitions (keywords FILE, IDENT, NAME and XNAME). 9 | 10 | # Normally the first free slot intended for the track type is used. The slot 11 | # for the directly following TRACK definition can be set by the command: 12 | # SLOT index 13 | 14 | # Keyword TRACK introduces a track definition. The syntax is as follows: 15 | # 'TRACK' VARNAME TYPE PROPERTY MUSIC FLAGS 16 | # 17 | # If VARNAME is not '0' then the corresponding variable is assigned the 18 | # current slot number. Variables are needed for cup references in section 19 | # [CUP-LIST]. If cups are created exclusively automatically, then the value 20 | # '0' is a good choice. The exporter uses 'bt' for battle or 'vs' for versus 21 | # followed by the decimal slot number as variable name. 22 | # 23 | # TYPE is either 'vs' (versus) or 'bt' (battle). Both names are defined as 24 | # constants. 25 | # 26 | # PROPERTY is the property slot to use. It is either a number (0-31 for 'vs' 27 | # or 32-41 for 'bt'), or a symbolic name (like A25, T12 or MMM) of a track. 28 | # 29 | # MUSIC is the music-id to use. It is either a property slot number number 30 | # (0-41) or a music id (117-199) or a symbolic name of a track. 31 | # 32 | # FLAGS is either a number or a string. A string is scanned for letters 33 | # (case insensitive) to build a number: 34 | # 'N' : LE$F_NEW : Track is marked as "new track". 35 | # 'H' : LE$F_HEAD : Track is marked as "head of a group". 36 | # 'G' : LE$F_GROUP : Track is marked as "group member". 37 | # A track is considered hidden if the group flag (G) is set but the head flag 38 | # (H) is not. 39 | 40 | # The keywords FILE, IDENT, NAME and XNAME define strings for the last defined 41 | # track. Syntax: 42 | # KEYWORD "TEXT" 43 | # The TEXT is assigned to the track. The indention of the exporter is only 44 | # used for clarity. 45 | 46 | # There are 2 more commands to define standard arenas or tracks at the current 47 | # position. Best is to use these commands at top of the section: 48 | # 49 | # STANDARD-BATTLE-ARENAS 50 | # Define 10 standard battle arenas. 51 | # 52 | # STANDARD-VERSUS-TRACKS 53 | # Define 32 standard versus tracks. 54 | 55 | 56 | #--- Instructions 57 | 58 | # If IGNORE-SLOT is set to value 1, then all SLOT instructions are ignored 59 | # until it is reset to 0. This is easier than deleting all SLOT instructions. 60 | 61 | IGNORE-SLOT 0 62 | 63 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-param1-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | #FF# 3 | ############################################################################### 4 | 5 | # This second part of section [SETUP] is an example to prepare a KMP source 6 | # file for conditional encoding (compiling). The idea is, that the user 7 | # defines variables with the "--const name=value" option while calling one of 8 | # the tools 'wszst' or 'wkmpt' to create different KMP files. 9 | # 10 | # Set option --no-param (-P) to disable this parameter part. 11 | # 12 | # This example scans 7 parameters. All variables are not special for the KMP 13 | # encoder and fully under user control: The user can remove or rename them or 14 | # can add more parameters. But this values have predefined meanings: 15 | # 16 | # slot : Create a KMP for the entered slot. 17 | # The default value 0 means: Design for allmost all slots. 18 | # Use it with @if..@else..@endif to support special slots. 19 | # 20 | # d : Create a KMP file for a "_d" variant of a track. 21 | # Use it with @if..@else..@endif to skip objects. 22 | # 23 | # arena : If >0, then create a battle arena instead of a racing track. 24 | # 25 | # test : If >0, then test mode is enabled. 26 | # If <=0, test mode and also all parameters below are disabled. 27 | # 28 | # ocam : If >0 and also test>0, then enable test of opening camera # 29 | # (endless looping until button 'A' is pressed). With the default 30 | # value 0 all opening scenes are looped. If test mode is disabled, 31 | # the cameras work as usual. 32 | # 33 | # showrt : If set and also test>0, points of different sections ar shown as 34 | # item boxes and all standard item boxes are disabled. Set one or more 35 | # of the following bits to show the points of the section: 36 | # 1 : ENPT 37 | # 2 : ITPT 38 | # 4 : JGPT 39 | # 8 : CNPT 40 | # 16 : MSPT 41 | # 32 : POTI 42 | # -1 : enable all section (all bits set!) 43 | # 44 | # showck : If set and also test>0, show check points as trees (or other 45 | # user defined objects). See section [CKPT] for details. 46 | # 47 | # laps : It controls the number of laps by changing the settinge of the 48 | # check point modes (CKPT/@AUTO-MODE). Allowed values are: 49 | # 0: Make the race a short as possible. 50 | # 1: Finish the race after 1 lap 51 | # 3: Finish the race after 3 laps (default). 52 | # 4: Never finish the race (unlimited). 53 | # Value 3 is used, if test mode is disabled. 54 | # 55 | -------------------------------------------------------------------------------- /project/text-files/kmp.inc/kmp-macros-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ############################################################################### 4 | # Macros 5 | 6 | @macro itembox 7 | #------------------------------------------------------------------- 8 | # This macro helps to place N itemboxes in a row between 9 | # 2 points with optimal height. 10 | #------------------------------------------------------------------- 11 | # Syntax: 12 | # @:ITEMBOX(fall,1,pos1) 13 | # @:ITEMBOX(fall,n,pos1,pos2) 14 | # @:ITEMBOX(fall,n,pos1,pos2,factor) 15 | # @:ITEMBOX(fall,n,pos1,pos2,factor,second) 16 | # @:ITEMBOX(fall,n,pos1,pos2,factor,second,itemtype) 17 | #------------------------------------------------------------------- 18 | # Parameters: 19 | # FALL : If >0: Raise the box by FALL and let it fall to 20 | # : the road to get the optimal height. 21 | # N : If >0: Create N itemboxes between POS1 and POS2. 22 | # POS1 : Position of first itembox. 23 | # POS2 : Position of last itembox. 24 | # FACTOR : If set and >0.01: Create a line from POS1 to POS2. 25 | # : Enlarge the line by FACTOR in both directions. 26 | # : Then use the new points as new POS1 and POS2. 27 | # SECOND : If set and >0: Move each second itembox into a second 28 | # : row. The distance between both rows is SECOND units. 29 | # ITEMTYPE: Use this value for player and enemy items. 30 | #------------------------------------------------------------------- 31 | # Examples: 32 | # @:itembox( 200, 1, point ) 33 | # @:itembox( 0, 3, point1, point2, 0.9 ) 34 | # @:itembox( 500, 8, point1, point2, 1, 250, ITEM$3GREEN ) 35 | # @:itembox( 200, 4, v(2000,1000,3000), v(3000,1000,5000) ) 36 | #------------------------------------------------------------------- 37 | 38 | @param fall n p1 p2 factor second itemtype 39 | @pdef fall = fall > 0 ? fall : 0 40 | @if isScalar(factor) && factor > 0.01 41 | @pdef a = p1, b = p2, f = (1.0-factor)/2 42 | @pdef p1 = pos(f,a,b) 43 | @pdef p2 = pos(f,b,a) 44 | @endif 45 | @pdef itemtype = int(itemtype) 46 | @if n == 1 47 | @pdef p = fall ? kcl$fall(p1+vy(fall),200,KCL$DRIVE) : p1 48 | 0 o$itembox p 0 itemtype itemtype 0 -1 0 v3(0) 0 0 0 0 0x3f v3(1) 49 | @else 50 | @pdef second = isScalar(second) && second > 0 51 | > ? hrot(vz(second),hdir(p1,p2)+90) : v3(0) 52 | @pdef n = n - 1.0 53 | @for i=0;n 54 | @pdef p = pos(i/n,p1,p2) 55 | @doif(i&1) @pdef p = p + second 56 | @doif(fall) @pdef p = kcl$fall(p+vy(fall),200,KCL$DRIVE) 57 | 0 o$itembox p 0 itemtype itemtype 0 -1 0 v3(0) 0 0 0 0 0x3f v3(1) 58 | @endfor 59 | @endif 60 | @endmacro 61 | -------------------------------------------------------------------------------- /project/src/db-dol.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | /////////////////////////////////////////////////////////////////////////////// 4 | ////// This file is created by a script. Modifications will be lost! ////// 5 | /////////////////////////////////////////////////////////////////////////////// 6 | 7 | #ifndef SZS_DB_DOL_H 8 | #define SZS_DB_DOL_H 1 9 | 10 | #include "lib-std.h" 11 | 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | /////////////////////////////// definitions /////////////////////////////// 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | #define N_DOL_SECTION_MAP 95 18 | 19 | // 20 | /////////////////////////////////////////////////////////////////////////////// 21 | ///////////////////////// struct DolSectionMap_t ////////////////////////// 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | // [[DolSectionMap_t]] 25 | 26 | typedef struct DolSectionMap_t 27 | { 28 | uint mode; // str_mode_t 29 | uint dol_stat; // dol_status_t for complete dol files 30 | char sect[4]; // section name, emtpy for non sections 31 | uint size; // size of data 32 | ccp info; // info string 33 | sha1_hash_t hash; // SHA1 hash 34 | 35 | } DolSectionMap_t; 36 | 37 | extern const DolSectionMap_t DolSectionMap[N_DOL_SECTION_MAP]; 38 | 39 | // 40 | /////////////////////////////////////////////////////////////////////////////// 41 | ///////////////////////// struct DolAddressMap_t ////////////////////////// 42 | /////////////////////////////////////////////////////////////////////////////// 43 | 44 | // [[DolAddressMap_t]] 45 | 46 | typedef struct DolAddressMap_t 47 | { 48 | u32 entry_point; // 800060a4 800060a4 800060a4 800060a4 49 | u32 bss_addr; // 802a4080 8029fd00 802a3a00 80292080 50 | u32 bss_size; // e50fc e50fc e50fc e511c 51 | u32 shared_bss_addr; // 802a4080 802a4080 802a4080 802a4080 52 | u32 shared_bss_size; // ceb80 ceb80 ceb80 ceb80 53 | u32 f_setup_register; // 80006210 80006210 80006210 80006210 54 | } 55 | DolAddressMap_t; 56 | 57 | extern const DolAddressMap_t DolAddressMapPAL; 58 | extern const DolAddressMap_t DolAddressMapUSA; 59 | extern const DolAddressMap_t DolAddressMapJAP; 60 | extern const DolAddressMap_t DolAddressMapKOR; 61 | 62 | const DolAddressMap_t * GetDolAddressMap ( uint mode ); 63 | 64 | // 65 | /////////////////////////////////////////////////////////////////////////////// 66 | ////////////////////////////////// E N D ////////////////////////////////// 67 | /////////////////////////////////////////////////////////////////////////////// 68 | 69 | #endif // SZS_DB_DOL_H 70 | -------------------------------------------------------------------------------- /project/src/crypto/ssl-asm.S: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * __ __ _ ___________ * 4 | * \ \ / /| |____ ____| * 5 | * \ \ / / | | | | * 6 | * \ \ /\ / / | | | | * 7 | * \ \/ \/ / | | | | * 8 | * \ /\ / | | | | * 9 | * \/ \/ |_| |_| * 10 | * * 11 | * Wiimms ISO Tools * 12 | * http://wit.wiimm.de/ * 13 | * * 14 | *************************************************************************** 15 | * * 16 | * This file is part of the WIT project. * 17 | * Visit http://wit.wiimm.de/ for project details and sources. * 18 | * * 19 | * Copyright (c) 2011-2024 by Dirk Clemens * 20 | * * 21 | *************************************************************************** 22 | * * 23 | * This program is free software; you can redistribute it and/or modify * 24 | * it under the terms of the GNU General Public License as published by * 25 | * the Free Software Foundation; either version 2 of the License, or * 26 | * (at your option) any later version. * 27 | * * 28 | * This program is distributed in the hope that it will be useful, * 29 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 30 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 31 | * GNU General Public License for more details. * 32 | * * 33 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 34 | * * 35 | ***************************************************************************/ 36 | 37 | #define WIIMM_INCLUDE_SSL_ASM 38 | #include "ssl-asm.h" 39 | 40 | -------------------------------------------------------------------------------- /project/text-files/lpar.inc/lpar-sect-chat-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # LE-CODE supports a special feature for chat messages in private rooms. If a 3 | # message is send by the host and at least one guest is present, then some 4 | # messages change the behavior of the game. This section defines the special 5 | # function. 6 | 7 | # The first parameter resets all message to CHAT$OFF (no function). 8 | # The default is value 1. If set to 0, the current map is edited. 9 | @reset = 1 10 | 11 | # Set the value to 1 if you want to use the old behavior defined for MKW-Fun. 12 | @legacy = 0 13 | 14 | # And now define the functions for different chat messages. The syntax is: 15 | # 16 | # MESSAGE '=' EXPRESSION1 17 | # MESSAGE '=' EXPRESSION1 ',' EXPRESSION2 18 | # 19 | # MESSAGE is the letter 'M' followed by a number between 1 and 96. Examples 20 | # are M1, M02, M96. EXPRESSION is any expression supported by the parser. 21 | # Up to 2 modes (separated by a comma) can be defined for each message. 22 | # Usually the following constants or functions are used: 23 | # 24 | # CHAT$TRACK_BY_HOST : The host selects a tracks and wins the lottery. 25 | # The track selection for guests is disabled. 26 | # CHAT$ANY_TRACK : Cancel CHAT$TRACK_BY_HOST. 27 | # 28 | # CHAT$BLOCK_CLEAR : Clear the used-tracks list. 29 | # CHAT$BLOCK_DISABLE : Disable the block-track functionality. 30 | # CHAT$BLOCK_ENABLE : Enable the block-track functionality. This is the 31 | # default, but have only impact, if BLOCK-TRACK > 0. 32 | # 33 | # CHAT$KARTS_ONLY : Each player must select a kart. 34 | # CHAT$BIKES_ONLY : Each player must select a bike. 35 | # CHAT$ANY_VEHICLE : Cancel vehicle requirement. 36 | # 37 | # CHAT$USE_ENGINE_1 : Select first engine class (100cc or 150cc if 200cc enabled) 38 | # CHAT$USE_ENGINE_2 : Select second engine class (150cc or 200cc if 200cc enabled) 39 | # CHAT$USE_ENGINE_3 : Select third engine class (mirror) 40 | # CHAT$RESET_ENGINE : Cancel engine selection. 41 | # 42 | # chat$n_races(N) : Define the number of races in the next Grand Prix. 43 | # N is a number between 1 and 512 (inclusive). 44 | # 45 | # chat$vehicle(...) : Define a chat modus for a vehicle group. 0 to N values 46 | # are expected as function parameters. Each parameter is 47 | # either from the group VEH$SMALL, VEH$MEDIUM, VEH$LARGE 48 | # and VEH$ANY_SIZE for size selections and/or from the 49 | # group VEH$KART, VEH$BIKE, VEH$ANY_TYPE for type 50 | # selections. VEH$ANY resets the limitations. 51 | ~#VEH$OUT_BIKE, VEH$IN_BIKE 52 | # 53 | # CHAT$RESET : Reset all settings to their defaults. 54 | # 55 | # See https://wiki.tockdom.com/wiki/LE-CODE/Distribution_Tutorial#chatmsg 56 | # for more details. 57 | -------------------------------------------------------------------------------- /project/text-files/ledis.inc/ledis-ledef-cup-list-cr.inc: -------------------------------------------------------------------------------- 1 | 2 | # 3 | ################ 4 | [CUP-LIST] 5 | ################ 6 | 7 | # It makes no sense not to fill cups with tracks. Therefore, cups are simply 8 | # filled with tracks in order of definition and new cups are created as 9 | # needed. This is usually done with the command APPEND. Battle arenas and 10 | # versus tracks are considered separately and the tracks are assigned 11 | # accordingly. 12 | # 13 | # Battle and versus cup definitions can be done in any order. Only the 14 | # sequences within battle cups and within versus cups are important. 15 | # 16 | # The command NEW-CUP creates a new battle or versus (vs) cup. Any 17 | # unoccupied places in the current cup remain empty at the moment. 18 | # 19 | # At the end, when all commands have been processed, more cups may be added to 20 | # get an even number of battle cups and of versus cups. Then all cups are 21 | # filled with arenas and tracks. This happens first with tracks not yet used 22 | # (if the related option is activated), and then with tracks already used. 23 | # 24 | # Hidden tracks can't be added to a cup. 25 | # 26 | # Syntax: 27 | # 28 | # APPEND track... 29 | # Add each valid track reference to the current cup of correct type. 30 | # If a cup is full, create a new before adding the track. 31 | # 32 | # APPEND-BT track... 33 | # Same as APPEND, but limit operation to battle cups. This is important 34 | # for random slots, that can be added to battle and to versus cups. 35 | # 36 | # APPEND-VS track... 37 | # Same as APPEND, but limit operation to versus cups. 38 | # 39 | # NEW-CUP bt|vs [bt|vs] 40 | # Close the current battle cup (bt) or versus cup (vs). Use both 'bt' 41 | # and 'vs' to close the cups of both types. 42 | 43 | # There are 4 more commands to insert cups at the current position. They are 44 | # usually used before any other cup definition: 45 | # 46 | # STANDARD-BATTLE-CUPS 47 | # Append 10 tracks (slots 32 to 41) to the correct cup type. Usually 48 | # all tracks are of type battle. 49 | # 50 | # STANDARD-VERSUS-CUPS 51 | # Append 10 tracks (slots 0 to 31) to the correct cup type. Usually 52 | # all tracks are of type versus. 53 | # 54 | # STANDARD-CUPS 55 | # Short cut for STANDARD-BATTLE-CUPS and STANDARD-VERSUS-CUPS. 56 | # 57 | # MKWFUN-RANDOM-CUP 58 | # Append 4 random slots (slots 62 to 65, like MKW-Fun, always versus) 59 | # to the versus cups. 60 | # 61 | # If no cup was finally defined, then STANDARD-BATTLE-CUPS and/or 62 | # STANDARD-VERSUS-CUPS will be executed automatically. 63 | 64 | # There are 3 options to add cups at the end. Set it to NO (=0) or YES (=1) 65 | # at any place in the section: 66 | # 67 | # ADD-UNUSED-ARENAS = no/yes 68 | # ADD-UNUSED-TRACKS = no/yes 69 | # ADD-UNUSED = no/yes 70 | # If defined arenas or tracks except hidden tracks were not used in at 71 | # least one cup, then add cups with references to these missed tracks. 72 | # CUPS-FOR-MISSED set both other settings in one step. 73 | # 74 | 75 | -------------------------------------------------------------------------------- /project/system.c: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * http://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit http://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2021 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * This program is free software; you can redistribute it and/or modify * 25 | * it under the terms of the GNU General Public License as published by * 26 | * the Free Software Foundation; either version 2 of the License, or * 27 | * (at your option) any later version. * 28 | * * 29 | * This program is distributed in the hope that it will be useful, * 30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 32 | * GNU General Public License for more details. * 33 | * * 34 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 35 | * * 36 | ***************************************************************************/ 37 | 38 | #include "dclib/dclib-system.h" 39 | 40 | #ifndef PRINT_SYSTEM_SETTINGS 41 | int main ( int argc, char ** argv ) 42 | { 43 | dclibPrintSystem(stdout); 44 | return 0; 45 | } 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /project/text-files/ui-head.inc: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * * 14 | *************************************************************************** 15 | * * 16 | * This file is part of the SZS project. * 17 | * Visit https://szs.wiimm.de/ for project details and sources. * 18 | * * 19 | * Copyright (c) 2011-2024 by Dirk Clemens * 20 | * * 21 | *************************************************************************** 22 | * * 23 | * This program is free software; you can redistribute it and/or modify * 24 | * it under the terms of the GNU General Public License as published by * 25 | * the Free Software Foundation; either version 2 of the License, or * 26 | * (at your option) any later version. * 27 | * * 28 | * This program is distributed in the hope that it will be useful, * 29 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 30 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 31 | * GNU General Public License for more details. * 32 | * * 33 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 34 | * * 35 | *************************************************************************** 36 | * * 37 | * >>> This file is automatically generated by './src/gen-ui.c'. <<< * 38 | * >>> Do not edit this file! <<< * 39 | * * 40 | ***************************************************************************/ 41 | 42 | -------------------------------------------------------------------------------- /project/src/ui/ui.h: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * https://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit https://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2024 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * This program is free software; you can redistribute it and/or modify * 25 | * it under the terms of the GNU General Public License as published by * 26 | * the Free Software Foundation; either version 2 of the License, or * 27 | * (at your option) any later version. * 28 | * * 29 | * This program is distributed in the hope that it will be useful, * 30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 32 | * GNU General Public License for more details. * 33 | * * 34 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 35 | * * 36 | ***************************************************************************/ 37 | 38 | #ifndef SZS_UI_H 39 | #define SZS_UI_H 40 | 41 | #define OPT_OLD_NEW 1 // 0 | 1 -> enable options --OLD --NEW 42 | #include "dclib-ui.h" 43 | 44 | // 45 | /////////////////////////////////////////////////////////////////////////////// 46 | /////////////// END /////////////// 47 | /////////////////////////////////////////////////////////////////////////////// 48 | 49 | #endif // SZS_UI_H 50 | 51 | -------------------------------------------------------------------------------- /project/scripts/test-wszst.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # (c) Wiimm, 2012-11-11 3 | 4 | export LC_ALL=POSIX 5 | 6 | SZS=wszst 7 | [[ -x ./wszst ]] && SZS=./wszst 8 | SZS0="$SZS -q" 9 | SZS="$SZS0" 10 | echo "SZS=$SZS" 11 | 12 | BMG=wbmgt 13 | [[ -x ./wbmgt ]] && BMG=./wbmgt 14 | BMG0="$BMG -q" 15 | BMG="$BMG0" 16 | echo "BMG=$BMG" 17 | 18 | if [[ $1 = -i || $1 = --ignore ]] 19 | then 20 | DIFF="diff -q -x wszst-setup.txt -x .string-pool.* -x .*.d" 21 | echo "DIFF=$DIFF" 22 | printf "\n!!! WARNING: '.string-pool.*' excluded !!!\n\n" 23 | shift 24 | else 25 | DIFF="diff -q -x wszst-setup.txt" 26 | echo "DIFF=$DIFF" 27 | fi 28 | 29 | function error() 30 | { 31 | echo "!! Test failed: $*" >&2 32 | exit 1 33 | } 34 | 35 | let count=0 36 | for src in "$@" 37 | do 38 | if [[ $src = -n || $src = --new ]] 39 | then 40 | echo ">> enabled: --NEW" 41 | SZS="$SZS0 --NEW" 42 | BMG="$BMG0 --NEW" 43 | continue 44 | fi 45 | 46 | if [[ $src = -o || $src = --old ]] 47 | then 48 | echo ">> enabled: --OLD" 49 | SZS="$SZS0 --OLD" 50 | BMG="$BMG0 --OLD" 51 | continue 52 | fi 53 | 54 | let count++ 55 | printf "%5u. %s\n" $count "$src" 56 | temp="$(mktemp -ut test-wszst-XXXXXXXX).tmp" || exit 1 57 | #echo "TEMP=$temp" 58 | 59 | $SZS decom "$src" -D "$temp/11.u8" || error 11 decompress 60 | $SZS compr "$temp/11.u8" -D "$temp/12.szs" || error 12 compress 61 | $SZS decom "$temp/12.szs" -D "$temp/13.u8" || error 13 decompress 62 | $DIFF "$temp/11.u8" "$temp/13.u8" || error raw diff 11.u8 13.u8 63 | 64 | $SZS extr "$src" -D "$temp/21.d" || error 21 extract 65 | $SZS extr "$temp/11.u8" -D "$temp/22.d" || error 22 extract 66 | $DIFF -r "$temp/21.d" "$temp/22.d" || error raw diff 21.d 22.d 67 | 68 | $SZS create "$temp/22.d" -D "$temp/23.u8" --noc || error 23 create 69 | $SZS diff "$src" "$temp/23.u8" || error file diff src 23 70 | $SZS extr "$temp/23.u8" -D "$temp/24.d" || error 24 extract 71 | $DIFF -r "$temp/21.d" "$temp/24.d" || error raw diff 21 24 72 | 73 | $SZS extr "$src" -D "$temp/31.d" -a --no-check || error 31 extract --all 74 | $SZS create "$temp/31.d" -D "$temp/32.u8" --noc || error 32 create 75 | $SZS extr "$temp/32.u8" -D "$temp/33.d" -a --no-check || error 33 extract --all 76 | $DIFF -r "$temp/31.d" "$temp/33.d" || error raw diff 31 33 77 | 78 | $SZS compr "$src" -D "$temp/41.wbz" --wbz || error 41 to wbz 79 | $SZS compr "$temp/41.wbz" -D "$temp/42.szs" --szs || error 42 to szs 80 | $SZS diff "$src" "$temp/42.szs" || error file diff 41 42 81 | 82 | find "$temp/24.d" -name '*.bmg' | while read f 83 | do 84 | [[ -f $f ]] || continue 85 | echo " - ${f/*.d}" 86 | 87 | $BMG encode "$f" -d "$f.1.bmg" || error encode "$f" 88 | $DIFF "$f" "$f.1.bmg" || error raw diff src 1 89 | 90 | $BMG decode "$f" -d "$f.2.txt" || error decode "$f" 91 | $BMG encode "$f.2.txt" -d "$f.3.bmg" || error encode "$f" 92 | $DIFF "$f" "$f.3.bmg" || error raw diff src 3 93 | 94 | done || exit 1 95 | rm -rf "$temp" 96 | 97 | done 98 | echo "**OK**" 99 | 100 | -------------------------------------------------------------------------------- /project/src/crypt.h: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * https://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit https://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2024 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * This program is free software; you can redistribute it and/or modify * 25 | * it under the terms of the GNU General Public License as published by * 26 | * the Free Software Foundation; either version 2 of the License, or * 27 | * (at your option) any later version. * 28 | * * 29 | * This program is distributed in the hope that it will be useful, * 30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 32 | * GNU General Public License for more details. * 33 | * * 34 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 35 | * * 36 | ***************************************************************************/ 37 | 38 | #ifndef WIIMM_CRYPT_H 39 | #define WIIMM_CRYPT_H 1 40 | 41 | #ifdef USE_SHA_LIB 42 | #include 43 | #else 44 | #include "crypto/wiimm-sha.h" 45 | #define SHA1 WIIMM_SHA1 46 | #define SHA1_Init WIIMM_SHA1_Init 47 | #define SHA1_Update WIIMM_SHA1_Update 48 | #define SHA1_Final WIIMM_SHA1_Final 49 | #define SHA_CTX WIIMM_SHA_CTX 50 | #endif 51 | 52 | #endif // WIIMM_CRYPT_H 53 | 54 | -------------------------------------------------------------------------------- /project/setup/cygwin-copy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##################################################################### 4 | ## _______ _______ _______ ## 5 | ## | ___ |____ | ___ | ## 6 | ## | | |_| / /| | |_| ## 7 | ## | |_____ / / | |_____ ## 8 | ## |_____ | / / |_____ | ## 9 | ## _ | | / / _ | | ## 10 | ## | |___| |/ /____| |___| | ## 11 | ## |_______|_______|_______| ## 12 | ## ## 13 | ## Wiimms SZS Tools ## 14 | ## http://szs.wiimm.de/ ## 15 | ## ## 16 | ##################################################################### 17 | ## ## 18 | ## This file is part of the SZS project. ## 19 | ## Visit http://szs.wiimm.de/ for project details and sources. ## 20 | ## ## 21 | ## Copyright (c) 2011-2019 by Dirk Clemens ## 22 | ## ## 23 | ##################################################################### 24 | 25 | #------------------------------------------------------------------------------ 26 | # setup 27 | 28 | CYGWIN_DIR="@@CYGWIN-DIR@@" 29 | CYGWIN_TOOLS="@@CYGWIN-TOOLS@@" 30 | BIN_FILES="@@BIN-FILES@@" 31 | DISTRIB_PATH="@@DISTRIB-PATH@@" 32 | 33 | BIN_PATH="$DISTRIB_PATH/bin" 34 | mkdir -p "$BIN_PATH" || exit 1 35 | 36 | #------------------------------------------------------------------------------ 37 | # copy cygwin tools 38 | 39 | for tool in $CYGWIN_TOOLS 40 | do 41 | cp --preserve=time "$CYGWIN_DIR/$tool.exe" "$BIN_PATH" || exit 1 42 | done 43 | 44 | #------------------------------------------------------------------------------ 45 | # copy wit tools 46 | 47 | for tool in $BIN_FILES 48 | do 49 | if [[ -s ./$tool.exe ]] 50 | then 51 | CYGWIN_TOOLS="$CYGWIN_TOOLS $tool" 52 | ln -f ./$tool.exe "$BIN_PATH" || exit 1 53 | fi 54 | done 55 | 56 | #------------------------------------------------------------------------------ 57 | # copy needed cygwin dlls 58 | 59 | CYGCHECK="$( which cygcheck 2>/dev/null )" 60 | 61 | for tool in $CYGWIN_TOOLS 62 | do 63 | if [[ $CYGCHECK ]] 64 | then 65 | "$CYGCHECK" "$BIN_PATH/$tool.exe" \ 66 | | grep -E 'cygwin.*\\bin\\.*\.dll' \ 67 | | sed 's/.*\\//' 68 | else 69 | ldd "$BIN_PATH/$tool.exe" | grep -F "=> $CYGWIN_DIR/" | awk '{print $1}' 70 | fi 71 | done | sort | uniq | while read dll 72 | do 73 | cp --preserve=time "$CYGWIN_DIR/$dll" "$BIN_PATH" || exit 1 74 | done 75 | 76 | #------------------------------------------------------------------------------ 77 | # done 78 | 79 | exit 0 80 | 81 | -------------------------------------------------------------------------------- /project/src/liblzma/LzFindMt.h: -------------------------------------------------------------------------------- 1 | /* LzFindMt.h -- multithreaded Match finder for LZ algorithms 2 | 2023-03-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_LZ_FIND_MT_H 5 | #define ZIP7_INC_LZ_FIND_MT_H 6 | 7 | #include "LzFind.h" 8 | #include "Threads.h" 9 | 10 | EXTERN_C_BEGIN 11 | 12 | typedef struct 13 | { 14 | UInt32 numProcessedBlocks; 15 | CThread thread; 16 | UInt64 affinity; 17 | 18 | BoolInt wasCreated; 19 | BoolInt needStart; 20 | BoolInt csWasInitialized; 21 | BoolInt csWasEntered; 22 | 23 | BoolInt exit; 24 | BoolInt stopWriting; 25 | 26 | CAutoResetEvent canStart; 27 | CAutoResetEvent wasStopped; 28 | CSemaphore freeSemaphore; 29 | CSemaphore filledSemaphore; 30 | CCriticalSection cs; 31 | // UInt32 numBlocks_Sent; 32 | } CMtSync; 33 | 34 | typedef UInt32 * (*Mf_Mix_Matches)(void *p, UInt32 matchMinPos, UInt32 *distances); 35 | 36 | /* kMtCacheLineDummy must be >= size_of_CPU_cache_line */ 37 | #define kMtCacheLineDummy 128 38 | 39 | typedef void (*Mf_GetHeads)(const Byte *buffer, UInt32 pos, 40 | UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc); 41 | 42 | typedef struct 43 | { 44 | /* LZ */ 45 | const Byte *pointerToCurPos; 46 | UInt32 *btBuf; 47 | const UInt32 *btBufPos; 48 | const UInt32 *btBufPosLimit; 49 | UInt32 lzPos; 50 | UInt32 btNumAvailBytes; 51 | 52 | UInt32 *hash; 53 | UInt32 fixedHashSize; 54 | // UInt32 hash4Mask; 55 | UInt32 historySize; 56 | const UInt32 *crc; 57 | 58 | Mf_Mix_Matches MixMatchesFunc; 59 | UInt32 failure_LZ_BT; // failure in BT transfered to LZ 60 | // UInt32 failure_LZ_LZ; // failure in LZ tables 61 | UInt32 failureBuf[1]; 62 | // UInt32 crc[256]; 63 | 64 | /* LZ + BT */ 65 | CMtSync btSync; 66 | Byte btDummy[kMtCacheLineDummy]; 67 | 68 | /* BT */ 69 | UInt32 *hashBuf; 70 | UInt32 hashBufPos; 71 | UInt32 hashBufPosLimit; 72 | UInt32 hashNumAvail; 73 | UInt32 failure_BT; 74 | 75 | 76 | CLzRef *son; 77 | UInt32 matchMaxLen; 78 | UInt32 numHashBytes; 79 | UInt32 pos; 80 | const Byte *buffer; 81 | UInt32 cyclicBufferPos; 82 | UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ 83 | UInt32 cutValue; 84 | 85 | /* BT + Hash */ 86 | CMtSync hashSync; 87 | /* Byte hashDummy[kMtCacheLineDummy]; */ 88 | 89 | /* Hash */ 90 | Mf_GetHeads GetHeadsFunc; 91 | CMatchFinder *MatchFinder; 92 | // CMatchFinder MatchFinder; 93 | } CMatchFinderMt; 94 | 95 | // only for Mt part 96 | void MatchFinderMt_Construct(CMatchFinderMt *p); 97 | void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAllocPtr alloc); 98 | 99 | SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore, 100 | UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAllocPtr alloc); 101 | void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder2 *vTable); 102 | 103 | /* call MatchFinderMt_InitMt() before IMatchFinder::Init() */ 104 | SRes MatchFinderMt_InitMt(CMatchFinderMt *p); 105 | void MatchFinderMt_ReleaseStream(CMatchFinderMt *p); 106 | 107 | EXTERN_C_END 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /project/setup/sendto-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##################################################################### 4 | ## _______ _______ _______ ## 5 | ## | ___ |____ | ___ | ## 6 | ## | | |_| / /| | |_| ## 7 | ## | |_____ / / | |_____ ## 8 | ## |_____ | / / |_____ | ## 9 | ## _ | | / / _ | | ## 10 | ## | |___| |/ /____| |___| | ## 11 | ## |_______|_______|_______| ## 12 | ## ## 13 | ## Wiimms SZS Tools ## 14 | ## http://szs.wiimm.de/ ## 15 | ## ## 16 | ##################################################################### 17 | ## ## 18 | ## This file is part of the SZS project. ## 19 | ## Visit http://szs.wiimm.de/ for project details and sources. ## 20 | ## ## 21 | ## Copyright (c) 2011-2019 by Dirk Clemens ## 22 | ## ## 23 | ##################################################################### 24 | 25 | #------------------------------------------------------------------------------ 26 | # simple cygwin check 27 | 28 | if [[ $1 != --cygwin ]] 29 | then 30 | echo "Option --cygwin not set => exit" >&2 31 | exit 1 32 | fi 33 | 34 | #------------------------------------------------------------------------------ 35 | # pre definitions 36 | 37 | WIN_INSTALL_PATH="Wiimm/SZS" 38 | 39 | #------------------------------------------------------------------------------ 40 | echo "* setup" 41 | 42 | export PATH=".:$PATH" 43 | mkdir -p /tmp 44 | 45 | #--------------- 46 | 47 | SENDTO_SRC=./windows-sendto 48 | if [[ ! -d $SENDTO_SRC ]] 49 | then 50 | SENDTO_SRC="$WIN_INSTALL_PATH/windows-sendto" 51 | if [[ ! -d $SENDTO_SRC ]] 52 | then 53 | echo "Can't find SendTo source => abort" >&2 54 | exit 1 55 | fi 56 | fi 57 | 58 | #--------------- 59 | 60 | key="/user/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders/SendTo" 61 | if ! WIN_SENDTO_PATH="$(regtool get "$key")" || [[ $WIN_SENDTO_PATH = "" ]] 62 | then 63 | echo "Can't determine Windows program path => abort" >&2 64 | exit 1 65 | fi 66 | CYGWIN_SENDTO_PATH="${WIN_SENDTO_PATH//\\//}" 67 | 68 | 69 | #------------------------------------------------------------------------------ 70 | echo "* install SendTo scripts" 71 | echo " - SendTo source: $SENDTO_SRC" 72 | echo " - SendTo folder: $WIN_SENDTO_PATH" 73 | echo " - ->: $CYGWIN_SENDTO_PATH" 74 | 75 | cp -p "$SENDTO_SRC"/* "$CYGWIN_SENDTO_PATH/" 76 | 77 | #------------------------------------------------------------------------------ 78 | 79 | exit 0 80 | 81 | -------------------------------------------------------------------------------- /project/setup/sendto-uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##################################################################### 4 | ## _______ _______ _______ ## 5 | ## | ___ |____ | ___ | ## 6 | ## | | |_| / /| | |_| ## 7 | ## | |_____ / / | |_____ ## 8 | ## |_____ | / / |_____ | ## 9 | ## _ | | / / _ | | ## 10 | ## | |___| |/ /____| |___| | ## 11 | ## |_______|_______|_______| ## 12 | ## ## 13 | ## Wiimms SZS Tools ## 14 | ## http://szs.wiimm.de/ ## 15 | ## ## 16 | ##################################################################### 17 | ## ## 18 | ## This file is part of the SZS project. ## 19 | ## Visit http://szs.wiimm.de/ for project details and sources. ## 20 | ## ## 21 | ## Copyright (c) 2011-2019 by Dirk Clemens ## 22 | ## ## 23 | ##################################################################### 24 | 25 | #------------------------------------------------------------------------------ 26 | # simple cygwin check 27 | 28 | if [[ $1 != --cygwin ]] 29 | then 30 | echo "Option --cygwin not set => exit" >&2 31 | exit 1 32 | fi 33 | 34 | #------------------------------------------------------------------------------ 35 | # pre definitions 36 | 37 | WIN_INSTALL_PATH="Wiimm/SZS" 38 | 39 | #------------------------------------------------------------------------------ 40 | echo "* setup" 41 | 42 | export PATH=".:$PATH" 43 | 44 | #--------------- 45 | 46 | SENDTO_SRC=./windows-sendto 47 | if [[ ! -d $SENDTO_SRC ]] 48 | then 49 | SENDTO_SRC="$WIN_INSTALL_PATH/windows-sendto" 50 | if [[ ! -d $SENDTO_SRC ]] 51 | then 52 | echo "Can't find SendTo source => abort" >&2 53 | exit 1 54 | fi 55 | fi 56 | 57 | #--------------- 58 | 59 | key="/user/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders/SendTo" 60 | if ! WIN_SENDTO_PATH="$(regtool get "$key")" || [[ $WIN_SENDTO_PATH = "" ]] 61 | then 62 | echo "Can't determine Windows program path => abort" >&2 63 | exit 1 64 | fi 65 | CYGWIN_SENDTO_PATH="${WIN_SENDTO_PATH//\\//}" 66 | 67 | #------------------------------------------------------------------------------ 68 | echo "* uninstall SendTo scripts" 69 | echo " - SendTo folder: $WIN_SENDTO_PATH" 70 | echo " - ->: $CYGWIN_SENDTO_PATH" 71 | 72 | for f in "$SENDTO_SRC"/* 73 | do 74 | [[ -f $f ]] || continue; 75 | f="${f##*/}" 76 | echo "remove $f" 77 | rm -f "$CYGWIN_SENDTO_PATH/$f" 78 | done 79 | 80 | #------------------------------------------------------------------------------ 81 | 82 | exit 0 83 | 84 | -------------------------------------------------------------------------------- /project/src/crypto/ssl-asm.h: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * https://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit https://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2024 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * This program is free software; you can redistribute it and/or modify * 25 | * it under the terms of the GNU General Public License as published by * 26 | * the Free Software Foundation; either version 2 of the License, or * 27 | * (at your option) any later version. * 28 | * * 29 | * This program is distributed in the hope that it will be useful, * 30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 32 | * GNU General Public License for more details. * 33 | * * 34 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 35 | * * 36 | ***************************************************************************/ 37 | 38 | #ifndef USE_SHA_LIB 39 | #ifdef __CYGWIN__ 40 | #define SHA1_ASM 41 | #ifdef WIIMM_INCLUDE_SSL_ASM 42 | #if defined(__x86_64__) 43 | #include "sha1-cygwin64.s" 44 | #else 45 | #include "sha1-586-cygwin.s" 46 | #endif 47 | #endif 48 | #elif defined(__linux__) 49 | #if defined(__i386__) 50 | #define SHA1_ASM 51 | #ifdef WIIMM_INCLUDE_SSL_ASM 52 | #include "sha1-586-elf.s" 53 | #endif 54 | #elif defined(__x86_64__) 55 | #define SHA1_ASM 56 | #ifdef WIIMM_INCLUDE_SSL_ASM 57 | #include "sha1-x86_64.s" 58 | #endif 59 | #endif 60 | #endif 61 | #endif // !USE_SHA_LIB 62 | 63 | -------------------------------------------------------------------------------- /project/src/crypto/sha1dgst.c: -------------------------------------------------------------------------------- 1 | /* crypto/sha/sha1dgst.c */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #undef SHA_0 60 | #define SHA_1 61 | 62 | #include "ssl-asm.h" 63 | #include "sha_locl.h" 64 | 65 | -------------------------------------------------------------------------------- /project/makefiles-local/Makefile.local.mac: -------------------------------------------------------------------------------- 1 | 2 | # optimize mac binaries and/or build universal binaries 3 | 4 | CFLAGS += -Wno-gnu-variable-sized-type-not-at-end -Wno-address-of-packed-member 5 | 6 | #----------------------------------------------------------------------------- 7 | 8 | .PHONY : mac-distrib 9 | mac-distrib: mac1x doc $(INSTALL_SCRIPTS) gen-mac-distrib 10 | 11 | .PHONY : mac1x 12 | mac1x: mac-x86_64 13 | 14 | @echo 15 | @echo "----- building universal binaries -----" 16 | 17 | @for i in $(MAIN_TOOLS); do \ 18 | lipo -create bin/x86_64/$${i} -output $${i}; \ 19 | cp -p $${i} bin/$${i}; \ 20 | done 21 | @rm -rf bin/x86_64 22 | @echo "done" 23 | 24 | .PHONY : mac1 25 | mac1: mac-arm 26 | 27 | @echo 28 | @echo "----- building universal binaries -----" 29 | 30 | @for i in $(MAIN_TOOLS); do \ 31 | lipo -create bin/arm/$${i} -output $${i}; \ 32 | cp -p $${i} bin/$${i}; \ 33 | done 34 | @rm -rf bin/arm 35 | @echo "done" 36 | 37 | .PHONY : mac2 38 | mac2: mac-x86_64 mac-arm 39 | 40 | @echo 41 | @echo "----- building universal binaries -----" 42 | 43 | @for i in $(MAIN_TOOLS); do \ 44 | lipo -create bin/x86_64/$${i} bin/arm/$${i} -output $${i}; \ 45 | cp -p $${i} bin/$${i}; \ 46 | done 47 | @rm -rf bin/x86_64 bin/arm 48 | @echo "done" 49 | 50 | #----------------------------------------------------------------------------- 51 | 52 | .PHONY : mac-ppc 53 | mac-ppc: 54 | @echo 55 | @echo "----- building PowerPC [SDK $(SDKVERSION)] -----" 56 | @XFLAGS="-arch ppc -mcpu=powerpc" make clean all 57 | @mkdir -p bin/ppc 58 | @mv $(MAIN_TOOLS) bin/ppc 59 | 60 | #----------------------------------------------------------------------------- 61 | 62 | .PHONY : mac-i386 63 | mac-i386: 64 | @echo 65 | @echo "----- building i386 [SDK $(SDKVERSION)] -----" 66 | @XFLAGS="-arch i386 -mfpmath=sse -march=prescott" make clean all 67 | @mkdir -p bin/i386 68 | @mv $(MAIN_TOOLS) bin/i386 69 | 70 | 71 | #----------------------------------------------------------------------------- 72 | 73 | .PHONY : mac-x86_64 74 | mac-x86_64: 75 | @echo 76 | @echo "----- building X86-64 [SDK $(SDKVERSION)] -----" 77 | # @XFLAGS="-arch x86_64 -mfpmath=sse" make clean all 78 | @XFLAGS="-target x86_64-apple-macos10.12" make clean all 79 | @mkdir -p bin/x86_64 80 | @mv $(MAIN_TOOLS) bin/x86_64 81 | 82 | #----------------------------------------------------------------------------- 83 | 84 | .PHONY : mac-arm 85 | mac-arm: 86 | @echo 87 | @echo "----- building arm [SDK $(SDKVERSION)] -----" 88 | # @XFLAGS="-arch arm -mfpmath=sse" make clean all 89 | @XFLAGS="-target arm64-apple-macos11" make clean all 90 | @mkdir -p bin/arm 91 | @mv $(MAIN_TOOLS) bin/arm 92 | 93 | #----------------------------------------------------------------------------- 94 | 95 | .PHONY : gen-mac-distrib 96 | gen-mac-distrib: 97 | 98 | @printf "$(LOGFORMAT)" create "$(DISTRIB_PATH)" "" 99 | 100 | @rm -rf $(DISTRIB_PATH) 101 | @mkdir -p $(DISTRIB_PATH)/bin $(DISTRIB_PATH)/doc 102 | 103 | @cp -p $(DISTRIB_FILES) $(DISTRIB_PATH) 104 | @cp -p $(MAIN_TOOLS) $(WDF_LINKS) $(DISTRIB_PATH)/bin 105 | @cp -p $(DOC_FILES) $(DISTRIB_PATH)/doc 106 | 107 | @chmod -R 755 $(DISTRIB_PATH) 108 | @chmod a+x $(DISTRIB_PATH)/*.sh $(DISTRIB_PATH)/bin/* 109 | @chmod -R a+X $(DISTRIB_PATH) 110 | 111 | @$(DISTRIB_PATH)/bin/wszst version -ll 112 | 113 | @tar -czf $(DISTRIB_PATH).tar.gz $(DISTRIB_PATH) 114 | @ln $(DISTRIB_PATH).tar.gz latest-mac.tar.gz 115 | 116 | -------------------------------------------------------------------------------- /project/src/liblzma/LzmaEnc.h: -------------------------------------------------------------------------------- 1 | /* LzmaEnc.h -- LZMA Encoder 2 | 2023-04-13 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_LZMA_ENC_H 5 | #define ZIP7_INC_LZMA_ENC_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define LZMA_PROPS_SIZE 5 12 | 13 | typedef struct 14 | { 15 | int level; /* 0 <= level <= 9 */ 16 | UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version 17 | (1 << 12) <= dictSize <= (3 << 29) for 64-bit version 18 | default = (1 << 24) */ 19 | int lc; /* 0 <= lc <= 8, default = 3 */ 20 | int lp; /* 0 <= lp <= 4, default = 0 */ 21 | int pb; /* 0 <= pb <= 4, default = 2 */ 22 | int algo; /* 0 - fast, 1 - normal, default = 1 */ 23 | int fb; /* 5 <= fb <= 273, default = 32 */ 24 | int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ 25 | int numHashBytes; /* 2, 3 or 4, default = 4 */ 26 | unsigned numHashOutBits; /* default = ? */ 27 | UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ 28 | unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ 29 | int numThreads; /* 1 or 2, default = 2 */ 30 | 31 | // int _pad; 32 | 33 | UInt64 reduceSize; /* estimated size of data that will be compressed. default = (UInt64)(Int64)-1. 34 | Encoder uses this value to reduce dictionary size */ 35 | 36 | UInt64 affinity; 37 | } CLzmaEncProps; 38 | 39 | void LzmaEncProps_Init(CLzmaEncProps *p); 40 | void LzmaEncProps_Normalize(CLzmaEncProps *p); 41 | UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); 42 | 43 | 44 | /* ---------- CLzmaEncHandle Interface ---------- */ 45 | 46 | /* LzmaEnc* functions can return the following exit codes: 47 | SRes: 48 | SZ_OK - OK 49 | SZ_ERROR_MEM - Memory allocation error 50 | SZ_ERROR_PARAM - Incorrect paramater in props 51 | SZ_ERROR_WRITE - ISeqOutStream write callback error 52 | SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output 53 | SZ_ERROR_PROGRESS - some break from progress callback 54 | SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) 55 | */ 56 | 57 | typedef struct CLzmaEnc CLzmaEnc; 58 | typedef CLzmaEnc * CLzmaEncHandle; 59 | // Z7_DECLARE_HANDLE(CLzmaEncHandle) 60 | 61 | CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc); 62 | void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig); 63 | 64 | SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); 65 | void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize); 66 | SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); 67 | unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p); 68 | 69 | SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStreamPtr outStream, ISeqInStreamPtr inStream, 70 | ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); 71 | SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, 72 | int writeEndMark, ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); 73 | 74 | 75 | /* ---------- One Call Interface ---------- */ 76 | 77 | SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, 78 | const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, 79 | ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); 80 | 81 | EXTERN_C_END 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /project/scripts/minimap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # made by Wiimm, 2012-10-06 3 | 4 | plusmode=0 5 | testmode= 6 | kclmode=0 7 | 8 | #------------------------------------------------------------------------------ 9 | 10 | function trim() 11 | { 12 | echo "$1" | sed -r 's/[[:blank:]]+/ /; s/^ //; s/ $//' 13 | } 14 | 15 | #------------------------------------------------------------------------------ 16 | 17 | function add_destname() 18 | { 19 | local dest="$1" 20 | local plus="$2" 21 | local add="$3" 22 | 23 | if [[ ! $dest =~ $add ]] 24 | then 25 | 26 | if ((plus)) 27 | then 28 | #--- add '+' 29 | 30 | local s1="${dest%%(*}" 31 | local s2="${dest#*(}" 32 | if [[ $s1 != $s2 ]] 33 | then 34 | s2="($s2" 35 | else 36 | s1="${dest%%\[*}" 37 | s2="${dest#*\[}" 38 | if [[ $s1 != $s2 ]] 39 | then 40 | s2="[$s2" 41 | else 42 | s2="" 43 | fi 44 | fi 45 | s1=$( trim "$s1" ) 46 | s2=$( trim "$s2" ) 47 | dest="$s1+ $s2" 48 | fi 49 | 50 | 51 | #--- add '[+$add]' 52 | 53 | local s1="${dest%%]*}" 54 | local s2="${dest#*]}" 55 | if [[ $s1 != $s2 ]] 56 | then 57 | dest="$s1,+$add]$s2" 58 | else 59 | dest="$dest [+$add]" 60 | fi 61 | fi 62 | echo "$dest" 63 | } 64 | 65 | #------------------------------------------------------------------------------ 66 | 67 | while (($#)) 68 | do 69 | src="$1" 70 | shift 71 | 72 | if [[ $src = + ]] 73 | then 74 | plusmode=1 75 | continue 76 | fi 77 | 78 | if [[ $src = ++ ]] 79 | then 80 | plusmode=1 81 | kclmode=1 82 | continue 83 | fi 84 | 85 | if [[ $src = -t || $src == --test ]] 86 | then 87 | testmode=--test 88 | continue 89 | fi 90 | 91 | if [[ $src = -k || $src == --kcl ]] 92 | then 93 | kclmode=1 94 | continue 95 | fi 96 | 97 | if [[ ! -f $src ]] 98 | then 99 | printf "%s: Not found: %s\n" "${0##*/}" "$src" >&2 100 | continue 101 | fi 102 | 103 | #--- extract ext 104 | 105 | ext="${src##*.}" 106 | if [[ $ext = $src ]] 107 | then 108 | dest="$src" 109 | ext="" 110 | else 111 | dest="${src%.*}" 112 | ext=".$ext" 113 | fi 114 | 115 | d=${dest%_d} 116 | if [[ "$d" != "$dest" ]] 117 | then 118 | dest="$d" 119 | ext="_d${ext}" 120 | fi 121 | 122 | dest="$(add_destname "$dest" 1 minimap)" 123 | 124 | 125 | #--- trim dest 126 | 127 | dest="$( trim "$dest" )$ext" 128 | 129 | if ((plusmode)) 130 | then 131 | idx="${dest:0:2}" 132 | idx="${idx/[^0-9]/}" 133 | let idx=10#0$idx 134 | if (( idx % 10 < 4 )) 135 | then 136 | let idx=idx+1 137 | else 138 | let idx=idx+7 139 | fi 140 | dest="$idx ${dest:3}" 141 | #echo "idx=$idx" 142 | fi 143 | 144 | temp="$dest.temp" 145 | echo "DEST=|$dest|" 146 | 147 | 148 | #--- create temp, fix minimap, rename track 149 | 150 | ln -f "$src" "$temp" 151 | wszst -q minimap -r --auto "$temp" $testmode 152 | if ! diff -q "$src" "$temp" >/dev/null 153 | then 154 | ((plusmode)) || rm -f "$src" 155 | mv "$temp" "$dest" 156 | if ((kclmode)) 157 | then 158 | kcldest="$(add_destname "$dest" 0 kcl)" 159 | echo "KCLDEST=|$kcldest|" 160 | cp -p "$dest" "$kcldest" 161 | wszst norm "$kcldest" --kcl new,drop 162 | if diff -q "$dest" "$kcldest" >/dev/null 163 | then 164 | rm "$kcldest" 165 | else 166 | rm "$dest" 167 | fi 168 | fi 169 | fi 170 | 171 | rm -f "$temp" 172 | 173 | done 174 | 175 | -------------------------------------------------------------------------------- /project/src/types.h: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * https://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit https://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2024 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * This program is free software; you can redistribute it and/or modify * 25 | * it under the terms of the GNU General Public License as published by * 26 | * the Free Software Foundation; either version 2 of the License, or * 27 | * (at your option) any later version. * 28 | * * 29 | * This program is distributed in the hope that it will be useful, * 30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 32 | * GNU General Public License for more details. * 33 | * * 34 | * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * 35 | * * 36 | ***************************************************************************/ 37 | 38 | #ifndef SZS_TYPES_H 39 | #define SZS_TYPES_H 1 40 | 41 | #include "dclib-types.h" 42 | 43 | // 44 | /////////////////////////////////////////////////////////////////////////////// 45 | /////////////// constants /////////////// 46 | /////////////////////////////////////////////////////////////////////////////// 47 | 48 | // maximum characters for a subfile in an archive 49 | #define ARCH_FILE_MAX 2000 50 | 51 | // 52 | /////////////////////////////////////////////////////////////////////////////// 53 | /////////////// types /////////////// 54 | /////////////////////////////////////////////////////////////////////////////// 55 | 56 | // 57 | /////////////////////////////////////////////////////////////////////////////// 58 | /////////////// END /////////////// 59 | /////////////////////////////////////////////////////////////////////////////// 60 | 61 | #endif // SZS_TYPES_H 62 | 63 | -------------------------------------------------------------------------------- /project/src/crypto/sha1_one.c: -------------------------------------------------------------------------------- 1 | /* crypto/sha/sha1_one.c */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | #include 61 | #include "wiimm-sha.h" 62 | 63 | #ifndef USE_SHA_LIB 64 | 65 | unsigned char *WIIMM_SHA1(const unsigned char *d, size_t n, unsigned char *md) 66 | { 67 | WIIMM_SHA_CTX c; 68 | static unsigned char m[SHA_DIGEST_LENGTH]; 69 | 70 | if (md == NULL) md=m; 71 | if (!WIIMM_SHA1_Init(&c)) 72 | return NULL; 73 | WIIMM_SHA1_Update(&c,d,n); 74 | WIIMM_SHA1_Final(md,&c); 75 | return(md); 76 | } 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /project/src/db-ctcode.h: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * _______ _______ _______ * 4 | * | ___ |____ | ___ | * 5 | * | | |_| / /| | |_| * 6 | * | |_____ / / | |_____ * 7 | * |_____ | / / |_____ | * 8 | * _ | | / / _ | | * 9 | * | |___| |/ /____| |___| | * 10 | * |_______|_______|_______| * 11 | * * 12 | * Wiimms SZS Tools * 13 | * https://szs.wiimm.de/ * 14 | * * 15 | *************************************************************************** 16 | * * 17 | * This file is part of the SZS project. * 18 | * Visit https://szs.wiimm.de/ for project details and sources. * 19 | * * 20 | * Copyright (c) 2011-2024 by Dirk Clemens * 21 | * * 22 | *************************************************************************** 23 | * * 24 | * +----------------------------------------+ * 25 | * | This file is created automatically. | * 26 | * | Edits are lost with the next update! | * 27 | * +----------------------------------------+ * 28 | * * 29 | ***************************************************************************/ 30 | 31 | #ifndef SZS_DB_CTCODE_H 32 | #define SZS_DB_CTCODE_H 1 33 | 34 | #include "dclib/dclib-types.h" 35 | 36 | /////////////////////////////////////////////////////////////////////////////// 37 | 38 | extern const u8 ctcode_boot_code_pal_bz2[439]; // 684 bytes decompressed 39 | extern const u8 ctcode_boot_code_usa_bz2[438]; // 684 bytes decompressed 40 | extern const u8 ctcode_boot_code_jap_bz2[450]; // 684 bytes decompressed 41 | 42 | extern const u8 ctcode_boot_data_pal_bz2[238]; // 304 bytes decompressed 43 | extern const u8 ctcode_boot_data_usa_bz2[254]; // 304 bytes decompressed 44 | extern const u8 ctcode_boot_data_jap_bz2[245]; // 304 bytes decompressed 45 | 46 | extern const u8 ctcode_bad1code_pal_bz2[999]; // 1824 bytes decompressed 47 | extern const u8 ctcode_bad1code_usa_bz2[1001]; // 1824 bytes decompressed 48 | extern const u8 ctcode_bad1code_jap_bz2[1001]; // 1824 bytes decompressed 49 | 50 | extern const u8 ctcode_mod1_pal_bz2[2187]; // 3324 bytes decompressed 51 | extern const u8 ctcode_mod1_usa_bz2[2180]; // 3324 bytes decompressed 52 | extern const u8 ctcode_mod1_jap_bz2[2176]; // 3324 bytes decompressed 53 | 54 | extern const u8 ctcode_mod2_pal_bz2[1517]; // 3128 bytes decompressed 55 | extern const u8 ctcode_mod2_usa_bz2[1531]; // 3128 bytes decompressed 56 | extern const u8 ctcode_mod2_jap_bz2[1538]; // 3128 bytes decompressed 57 | 58 | extern const u8 ctcode_ovr1_pal_bz2[7364]; // 21348 bytes decompressed 59 | extern const u8 ctcode_ovr1_usa_bz2[7335]; // 21348 bytes decompressed 60 | extern const u8 ctcode_ovr1_jap_bz2[7364]; // 21348 bytes decompressed 61 | 62 | /////////////////////////////////////////////////////////////////////////////// 63 | 64 | #endif // !SZS_DB_CTCODE_H 65 | -------------------------------------------------------------------------------- /project/src/category.inc: -------------------------------------------------------------------------------- 1 | 2 | static const u8 category_inc_bz2[] = 3 | { 4 | // decompressed size: 0x586 = 1414 bytes 5 | 0x00,0x00,0x05,0x86, 6 | 7 | // bzipped data 8 | 0x42,0x5a,0x68,0x39, 0x31,0x41,0x59,0x26, 0x53,0x59,0xee,0xd9, 0xe3,0x87,0x00,0x00, 9 | 0x77,0x5f,0xe9,0x70, 0x12,0x40,0xef,0x7f, 0xe0,0x2e,0x43,0x8e, 0x00,0xbf,0xef,0xdf, 10 | 0xe4,0x00,0x40,0x11, 0x00,0x10,0x04,0x10, 0x00,0x40,0x02,0x9b, 0x5d,0x76,0xa6,0xeb, 11 | 0x69,0xc0,0x94,0x44, 0x34,0x8d,0x19,0x4f, 0x51,0xfa,0x48,0xf2, 0x8d,0x19,0xa4,0xc9, 12 | 0xea,0x1a,0x01,0xbd, 0x53,0xd4,0x69,0xa3, 0xd2,0x09,0x21,0x21, 0x36,0xa1,0x06,0x21, 13 | 0x89,0xa0,0x18,0x4d, 0x0c,0x86,0x99,0x32, 0x68,0x00,0x91,0x44, 0x6a,0x9e,0x28,0x0d, 14 | 0xa6,0xa7,0xa8,0x1e, 0xa0,0x1e,0x88,0x06, 0x86,0xd4,0xf5,0x06, 0x80,0x09,0x22,0x42, 15 | 0x9e,0xd0,0x86,0x29, 0x84,0x7a,0x11,0x88, 0xd0,0xd0,0x00,0x64, 0x68,0x07,0x58,0x6d, 16 | 0x21,0x83,0x02,0x49, 0x2d,0x49,0x2f,0x0c, 0x7b,0x49,0x6a,0xc0, 0x73,0xac,0x34,0x2d, 17 | 0x2c,0x8e,0x0b,0x15, 0x4a,0x53,0xb9,0x4e, 0xca,0x92,0xe1,0x64, 0x33,0x40,0xdb,0x38, 18 | 0x25,0x6e,0x76,0xe3, 0xde,0x72,0xa2,0xb6, 0xb2,0xdb,0x21,0xec, 0x4c,0x2a,0xb1,0x53, 19 | 0xe9,0x89,0xc6,0xf6, 0xbc,0x92,0x0e,0xa2, 0x29,0x0d,0xda,0x45, 0x97,0x86,0x11,0xbc, 20 | 0x94,0x6b,0x49,0x29, 0x8b,0xaf,0xcd,0x15, 0x39,0x41,0x22,0x42, 0x6d,0xc9,0xd4,0x59, 21 | 0x88,0xb3,0x0d,0x95, 0xbc,0xb6,0x18,0xb0, 0x05,0x55,0x38,0x55, 0x5b,0x01,0x24,0x8e, 22 | 0x5e,0x2b,0x09,0x24, 0x90,0x06,0x88,0xe3, 0xb6,0xc2,0x62,0x62, 0x45,0xc6,0x33,0x48, 23 | 0x6f,0x3b,0x49,0x37, 0x99,0xb6,0x8b,0x98, 0x9b,0x40,0xd9,0x0e, 0x91,0xa8,0x24,0x57, 24 | 0x04,0x4e,0x65,0x9a, 0x8c,0x87,0x2e,0x84, 0x51,0x55,0x54,0x52, 0x4d,0x32,0xe6,0x32, 25 | 0xcf,0x4b,0x85,0x51, 0xc8,0x86,0x62,0x70, 0x21,0x93,0xc9,0xf1, 0x94,0x13,0x1b,0x33, 26 | 0xa1,0x31,0xd4,0x75, 0x8a,0x4a,0x29,0x11, 0xb8,0x35,0xa2,0x32, 0xcf,0x5c,0xc9,0x79, 27 | 0x2e,0x60,0x58,0x47, 0x9a,0x41,0xaf,0xda, 0x85,0xc1,0x53,0x15, 0x6f,0xae,0xb1,0x1a, 28 | 0x28,0xf7,0x14,0xef, 0x63,0x05,0x4a,0x66, 0xa5,0xed,0x4c,0x45, 0xc0,0xa5,0x01,0x42, 29 | 0x58,0x8a,0x47,0x70, 0xc3,0x0c,0xbd,0x48, 0x58,0xc9,0xd4,0xc5, 0xdb,0xc8,0x84,0xf3, 30 | 0xa4,0xce,0x8b,0xe4, 0x77,0xf2,0x01,0x95, 0x90,0xb4,0x19,0x06, 0x70,0x18,0x07,0x1c, 31 | 0xbb,0x23,0x63,0x88, 0xaf,0x98,0x44,0xc6, 0xd6,0x4c,0x40,0xc9, 0x71,0x08,0x1e,0x01, 32 | 0x3a,0xaf,0xde,0xc7, 0x20,0x65,0x28,0x4b, 0xdd,0x5e,0x36,0xce, 0x01,0x1b,0x2b,0x7d, 33 | 0xba,0x9b,0x08,0x20, 0x81,0x90,0x63,0x57, 0xc1,0x5a,0x68,0x16, 0x78,0x21,0x64,0xb8, 34 | 0x5e,0x66,0x90,0x12, 0x20,0x6e,0xc6,0xef, 0x19,0x5f,0xd2,0xf6, 0xa2,0xa1,0xc6,0x4e, 35 | 0x6f,0x54,0x19,0x14, 0xa4,0x33,0x0d,0x12, 0xa6,0x97,0x12,0x8d, 0xd2,0xb4,0x65,0xb0, 36 | 0x67,0x15,0x84,0xe8, 0xd7,0x4a,0x2b,0x21, 0xa5,0x16,0x2b,0x46, 0x8a,0x90,0x54,0x94, 37 | 0xca,0xa7,0xc0,0xb4, 0x94,0xa1,0xc3,0x4a, 0x57,0x8a,0x8c,0xc4, 0xa6,0x41,0xc2,0x5d, 38 | 0xf8,0x8a,0x48,0xae, 0x12,0xb2,0xd6,0xca, 0x67,0x29,0x1d,0x2a, 0x4a,0x12,0x9a,0x24, 39 | 0x39,0x52,0xad,0x9d, 0x86,0xe5,0xae,0x63, 0xcc,0xe4,0xa4,0x78, 0x0a,0x0b,0xa8,0x7a, 40 | 0xd3,0x96,0x90,0xc8, 0x63,0x50,0x16,0xd2, 0xcc,0xa2,0xe3,0x3b, 0x9c,0x0e,0x36,0x3b, 41 | 0x40,0xd0,0x88,0x17, 0xcb,0x00,0x6d,0x42, 0x49,0x80,0xc0,0x60, 0x07,0x0a,0x0c,0x4a, 42 | 0x01,0x12,0x72,0x77, 0x67,0x6b,0xb5,0xb8, 0x50,0xd9,0x91,0x33, 0x10,0x36,0xa4,0x38, 43 | 0xc4,0x0b,0xcf,0x1f, 0xb5,0x90,0x54,0xf7, 0xdd,0x08,0x6f,0x8d, 0xaa,0x45,0xbe,0x58, 44 | 0x88,0x87,0x34,0x5b, 0xd9,0x56,0xcc,0x27, 0xc1,0x4b,0x8e,0x92, 0x66,0xd4,0x3a,0x56, 45 | 0xcf,0x0f,0x5d,0x9c, 0xf1,0xee,0x8b,0x1e, 0xdc,0xf1,0xeb,0xa2, 0xd2,0x69,0x1c,0xe8, 46 | 0x75,0xfd,0x7f,0x69, 0x7e,0x59,0x14,0xdb, 0x2b,0x6e,0x85,0xa7, 0xe8,0xa5,0x63,0x71, 47 | 0xb3,0x43,0x2c,0xb2, 0x40,0xd6,0x5b,0xab, 0x3d,0x4d,0x6b,0xab, 0x8b,0x92,0x5a,0xaa, 48 | 0xa6,0x2c,0xb4,0x31, 0xee,0x7e,0x27,0x4d, 0x26,0xad,0x14,0x69, 0x5e,0x26,0x02,0x87, 49 | 0x10,0xf6,0xf0,0x43, 0xfc,0x5d,0xc9,0x14, 0xe1,0x42,0x43,0xbb, 0x67,0x8e,0x1c, 50 | // 0x29f = 671 data bytes (48%) 51 | }; 52 | 53 | static BZ2Manager_t category_inc_mgr 54 | = { category_inc_bz2, sizeof(category_inc_bz2), 0, 0 }; 55 | 56 | -------------------------------------------------------------------------------- /project/setup/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##################################################################### 4 | ## _______ _______ _______ ## 5 | ## | ___ |____ | ___ | ## 6 | ## | | |_| / /| | |_| ## 7 | ## | |_____ / / | |_____ ## 8 | ## |_____ | / / |_____ | ## 9 | ## _ | | / / _ | | ## 10 | ## | |___| |/ /____| |___| | ## 11 | ## |_______|_______|_______| ## 12 | ## ## 13 | ## Wiimms SZS Tools ## 14 | ## http://szs.wiimm.de/ ## 15 | ## ## 16 | ##################################################################### 17 | ## ## 18 | ## This file is part of the SZS project. ## 19 | ## Visit http://szs.wiimm.de/ for project details and sources. ## 20 | ## ## 21 | ## Copyright (c) 2011-2019 by Dirk Clemens ## 22 | ## ## 23 | ##################################################################### 24 | 25 | #------------------------------------------------------------------------------ 26 | # sudo? 27 | 28 | try_sudo=1 29 | if [[ $1 = --no-sudo ]] 30 | then 31 | try_sudo=0 32 | shift 33 | else 34 | uid="$(id -u 2>/dev/null)" || try_sudo=0 35 | [[ $uid = 0 ]] && try_sudo=0 36 | fi 37 | 38 | if ((try_sudo)) 39 | then 40 | echo "*** need root privileges to install => try sudo ***" 41 | sudo "$0" --no-sudo "$@" 42 | exit $? 43 | fi 44 | 45 | #------------------------------------------------------------------------------ 46 | # settings 47 | 48 | SYSTEM="@@SYSTEM@@" 49 | SYSTEM2="@@SYSTEM2@@" 50 | 51 | BASE_PATH="@@INSTALL-PATH@@" 52 | BIN_PATH="$BASE_PATH/bin" 53 | SHARE_PATH="$BASE_PATH/share/szs" 54 | 55 | BIN_FILES="@@BIN-FILES@@" 56 | SHARE_FILES="@@SHARE-FILES@@" 57 | 58 | INST_FLAGS="-p" 59 | 60 | #------------------------------------------------------------------------------ 61 | # scan config 62 | 63 | if [[ -f install-config.txt ]] 64 | then 65 | res_install= 66 | res_config= 67 | res_share= 68 | . <( ./wszst config --bash --install --config install-config.txt ) 69 | echo "res_install=$res_install" 70 | echo "res_config=$res_config" 71 | echo "res_share=$res_share" 72 | fi 73 | 74 | #------------------------------------------------------------------------------ 75 | # make? 76 | 77 | make=0 78 | if [[ $1 = --make ]] 79 | then 80 | # it's called from make 81 | make=1 82 | shift 83 | fi 84 | 85 | #------------------------------------------------------------------------------ 86 | echo "*** install binaries to $BIN_PATH" 87 | 88 | for f in $BIN_FILES 89 | do 90 | [[ -f bin/$f ]] || continue 91 | mkdir -p "$BIN_PATH" 92 | install $INST_FLAGS "bin/$f" "$BIN_PATH/$f" 93 | done 94 | 95 | [[ $SYSTEM = mac ]] && xattr -dr com.apple.quarantine "$BIN_PATH" || true 96 | 97 | #------------------------------------------------------------------------------ 98 | echo "*** install share files to $SHARE_PATH" 99 | 100 | mkdir -p "$SHARE_PATH/auto-add/effect" 101 | chmod 775 "$SHARE_PATH/auto-add" "$SHARE_PATH/auto-add/effect" 102 | 103 | for f in $SHARE_FILES 104 | do 105 | install $INST_FLAGS -m 644 share/$f "$SHARE_PATH/$f" 106 | done 107 | 108 | #------------------------------------------------------------------------------ 109 | 110 | exit 0 111 | 112 | -------------------------------------------------------------------------------- /project/src/libbz2/randtable.c: -------------------------------------------------------------------------------- 1 | 2 | /*-------------------------------------------------------------*/ 3 | /*--- Table for randomising repetitive blocks ---*/ 4 | /*--- randtable.c ---*/ 5 | /*-------------------------------------------------------------*/ 6 | 7 | /* ------------------------------------------------------------------ 8 | This file is part of bzip2/libbzip2, a program and library for 9 | lossless, block-sorting data compression. 10 | 11 | bzip2/libbzip2 version 1.0.6 of 6 September 2010 12 | Copyright (C) 1996-2010 Julian Seward 13 | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the 15 | README file. 16 | 17 | This program is released under the terms of the license contained 18 | in the file LICENSE. 19 | ------------------------------------------------------------------ */ 20 | 21 | 22 | #include "bzlib_private.h" 23 | 24 | 25 | /*---------------------------------------------*/ 26 | Int32 BZ2_rNums[512] = { 27 | 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 28 | 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, 29 | 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, 30 | 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, 31 | 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, 32 | 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, 33 | 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, 34 | 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, 35 | 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, 36 | 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, 37 | 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, 38 | 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, 39 | 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, 40 | 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, 41 | 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, 42 | 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, 43 | 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, 44 | 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, 45 | 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, 46 | 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, 47 | 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, 48 | 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, 49 | 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, 50 | 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, 51 | 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, 52 | 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, 53 | 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, 54 | 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, 55 | 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, 56 | 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, 57 | 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, 58 | 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, 59 | 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, 60 | 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, 61 | 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, 62 | 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, 63 | 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, 64 | 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, 65 | 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, 66 | 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, 67 | 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, 68 | 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, 69 | 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, 70 | 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, 71 | 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, 72 | 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, 73 | 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, 74 | 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, 75 | 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, 76 | 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, 77 | 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 78 | 936, 638 79 | }; 80 | 81 | 82 | /*-------------------------------------------------------------*/ 83 | /*--- end randtable.c ---*/ 84 | /*-------------------------------------------------------------*/ 85 | --------------------------------------------------------------------------------