diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2024-03-01 22:12:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-01 16:12:22 -0500 |
| commit | bdee3d33b4554cbfe52a5416b7407644e0725885 (patch) | |
| tree | 5e6a2be9cd6d396a6559ce01157160a64c0df309 /include | |
| parent | c9e97a3055c9d8b31791b65bc78bed3596f7ba33 (diff) | |
No longer use asm-processor (#1824)
* git subrepo pull --force tools/ZAPD
subrepo:
subdir: "tools/ZAPD"
merged: "b3bfa14cf"
upstream:
origin: "https://github.com/zeldaret/ZAPD.git"
branch: "master"
commit: "b3bfa14cf"
git-subrepo:
version: "0.4.6"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "110b9eb"
* use CS_FLOAT
* update csdis
* update committed csdata
* finish updating csdis.py
* add script to reextract committed csdata
* dont use asm-processor, use iconv for reencoding utf8 to eucjp
* remove asm-processor csdata usage remnants
* --cs-float hex
* delete tempfile at end of reencode.sh (may want to rm even if compilation fails though?)
* comment reencode.sh
* comment CMD_F
* do not break permuter guessing compile command, by not reencode.sh-wrapping compilation under PERMUTER (thanks anghelo)
* fix the permuter fix
* pad -> sBssDummyNeg1
* reencode.sh: rm tempfile on script exit (including on error)
* renumber sBssDummy vars in zcolchk from 0
* Revert "--cs-float hex"
This reverts commit 85267dc348741b67ac9c12eb60e1e764793d0bb6.
* Revert BSS changes
* Add linemarker to reencoded files for better error message
* fix audio/general.c bss
* make reencode.sh work on macOS
* touch up csdis, csdis_re
---------
Co-authored-by: cadmic <cadmic24@gmail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/z64cutscene.h | 14 | ||||
| -rw-r--r-- | include/z64cutscene_commands.h | 9 |
2 files changed, 9 insertions, 14 deletions
diff --git a/include/z64cutscene.h b/include/z64cutscene.h index ebd261220..99cca6263 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -3,20 +3,6 @@ #include "ultra64.h" -/** - * Special type for blocks of cutscene data, asm-processor checks - * arrays for CutsceneData type and converts floats within the array - * to their IEEE-754 representation. The array must close with }; - * on its own line. - * - * Files that contain this type that are included in other C files - * must be preceded by a '#pragma asmproc recurse' qualifier to - * inform asm-processor that it must recursively process that include. - * - * Example: - * #pragma asmproc recurse - * #include "file.c" - */ typedef union CutsceneData { s32 i; f32 f; diff --git a/include/z64cutscene_commands.h b/include/z64cutscene_commands.h index beaecb798..d77416cf5 100644 --- a/include/z64cutscene_commands.h +++ b/include/z64cutscene_commands.h @@ -21,9 +21,18 @@ * when sometimes only the `startFrame` matters (as documented). */ +/** + * CMD_F expects an (IEEE 754) encoded float (colloquially "in hex", such as `0x42280000`), + * rather than a C float literal (such as `42.0f`). + * Float literals cannot be used because cutscenes are arrays of union type CutsceneData, which may contain integers and floats. + * Regardless of CutsceneData having a float member, initializing with a float will cast the float to s32. + * Designated initializers (added in C99) would solve this problem but are not supported by IDO (C89 and some extensions). + */ #ifdef __GNUC__ +#define CS_FLOAT(ieee754bin, f) (f) #define CMD_F(a) {.f = (a)} #else +#define CS_FLOAT(ieee754bin, f) (ieee754bin) #define CMD_F(a) {(a)} #endif |
