2021-09-15 23:24:19 +00:00
|
|
|
#ifndef Z64CUTSCENE_COMMANDS_H
|
|
|
|
#define Z64CUTSCENE_COMMANDS_H
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
2020-10-03 15:22:44 +00:00
|
|
|
#include "command_macros_base.h"
|
|
|
|
#include "z64cutscene.h"
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 totalEntries (e), s32 endFrame (n)
|
|
|
|
* FORMAT
|
|
|
|
* eeeeeeee nnnnnnnn
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_BEGIN_CUTSCENE(totalEntries, endFrame) CMD_W(totalEntries), CMD_W(endFrame)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000001 0001ssss eeee0000
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CAM_POS_LIST(startFrame, endFrame) \
|
|
|
|
CS_CMD_CAMERA_POS, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CAM_POS(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000002 0001ssss eeee0000
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CAM_FOCUS_POINT_LIST(startFrame, endFrame) \
|
|
|
|
CS_CMD_CAMERA_FOCUS, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CAM_FOCUS_POINT(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000003 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_MISC_LIST(entries) CS_CMD_MISC, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* uuuussss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_MISC(unk, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10) \
|
|
|
|
CMD_HH(unk, startFrame), CMD_HH(endFrame, unused0), \
|
|
|
|
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
|
|
|
CMD_W(unused6), CMD_W(unused7), CMD_W(unused8), CMD_W(unused9), CMD_W(unused10)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000004 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_LIGHTING_LIST(entries) CS_CMD_SET_LIGHTING, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 setting (m), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* mmmmssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_LIGHTING(setting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
|
|
|
CMD_HH(setting, startFrame), CMD_HH(endFrame, unused0), \
|
|
|
|
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
|
|
|
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused , may be consistently zero
|
|
|
|
* 00000005 0001ssss eeee0000
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CAM_POS_PLAYER_LIST(startFrame, endFrame) \
|
|
|
|
CS_CMD_CAMERA_POS_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CAM_POS_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused , may be consistently zero
|
|
|
|
* 00000006 0001ssss eeee0000
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CAM_FOCUS_POINT_PLAYER_LIST(startFrame, endFrame) \
|
|
|
|
CS_CMD_CAMERA_FOCUS_PLAYER, CMD_HH(0x0001, startFrame), CMD_HH(endFrame, 0x0000)
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CAM_FOCUS_POINT_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* 00000007 uuuussss eeeeUUUU
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CMD_07_LIST(unk, startFrame, endFrame, unused) \
|
|
|
|
CS_CMD_07, CMD_HH(unk, startFrame), CMD_HH(endFrame, unused)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CMD_07(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* 00000008 uuuussss eeeeUUUU
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CMD_08_LIST(unk, startFrame, endFrame, unused) \
|
|
|
|
CS_CMD_08, CMD_HH(unk, startFrame), CMD_HH(endFrame, unused)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s8 continueFlag (c), s8 roll (r), s16 frame (f), f32 viewAngle (a),
|
|
|
|
* s16 xPos (x), s16 yPos (y), s16 zPos (z)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ccrrffff aaaaaaaa xxxxyyyy zzzzUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_CMD_08(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000009 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_CMD_09_LIST(entries) CS_CMD_09, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 unk (u), s16 startFrame (s), s16 endFrame (e), s16 unk2 (v), s16 unk3 (w), s16 unk4 (x)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* uuuussss eeeevvww xxUUUUUU
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_CMD_09(unk, startFrame, endFrame, unk2, unk3, unk4, unused0, unused1) \
|
|
|
|
CMD_HH(unk, startFrame), CMD_HBB(endFrame, unk2, unk3), CMD_BBH(unk4, unused0, unused1)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 cmdType (c), s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* cccccccc eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_UNK_DATA_LIST(cmdType, entries) CMD_W(cmdType), CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 unk1 (a), s32 unk2 (b), s32 unk3 (c), s32 unk4 (d), s32 unk5 (e), s32 unk6 (f),
|
|
|
|
* s32 unk7 (g), s32 unk8 (h), s32 unk9 (i), s32 unk10 (j), s32 unk11 (k), s32 unk12 (l)
|
|
|
|
* FORMAT
|
|
|
|
* aaaaaaaa bbbbbbbb cccccccc dddddddd eeeeeeee ffffffff gggggggg hhhhhhhh iiiiiiii jjjjjjjj kkkkkkkk llllllll
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_UNK_DATA(unk1, unk2, unk3, unk4, unk5, unk6, unk7, unk8, unk9, unk10, unk11, unk12) \
|
|
|
|
CMD_W(unk1), CMD_W(unk2), CMD_W(unk3), CMD_W(unk4), CMD_W(unk5), CMD_W(unk6), \
|
|
|
|
CMD_W(unk7), CMD_W(unk8), CMD_W(unk9), CMD_W(unk10), CMD_W(unk11), CMD_W(unk12)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 cmdType (c), s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* cccccccc eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_NPC_ACTION_LIST(cmdType, entries) CMD_W(cmdType), CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 npcAction (a), s16 startFrame (s), s16 endFrame (e),
|
|
|
|
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
|
|
|
|
* s32 startX (i), s32 startY (j), s32 startZ (k),
|
|
|
|
* s32 endX (l), s32 endY (m), s32 endZ (n),
|
|
|
|
* f32 normX (x), f32 normY (y), f32 normZ (z),
|
|
|
|
* FORMAT
|
|
|
|
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_NPC_ACTION(npcAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
|
|
|
|
CMD_HH(npcAction, startFrame), CMD_HH(endFrame, rotX), CMD_HH(rotY, rotZ), \
|
|
|
|
CMD_W(startX), CMD_W(startY), CMD_W(startZ), \
|
|
|
|
CMD_W(endX), CMD_W(endY), CMD_W(endZ), \
|
2021-11-25 02:41:23 +00:00
|
|
|
CMD_F(normX), CMD_F(normY), CMD_F(normZ)
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 cmdType (c), s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* cccccccc eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_PLAYER_ACTION_LIST(entries) CS_CMD_SET_PLAYER_ACTION, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 linkAction (a), s16 startFrame (s), s16 endFrame (e),
|
|
|
|
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
|
|
|
|
* s32 startX (i), s32 startY (j), s32 startZ (k),
|
|
|
|
* s32 endX (l), s32 endY (m), s32 endZ (n),
|
|
|
|
* f32 normX (x), f32 normY (y), f32 normZ (z),
|
|
|
|
* FORMAT
|
|
|
|
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_PLAYER_ACTION(linkAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
|
|
|
|
CS_NPC_ACTION(linkAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000013 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_TEXT_LIST(entries) CS_CMD_TEXTBOX, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e), s16 type (o),
|
|
|
|
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
|
|
|
|
* FORMAT
|
|
|
|
* iiiissss eeeeoooo yyyynnnn
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, type, topOptionBranch, bottomOptionBranch) \
|
|
|
|
CMD_HH(messageId, startFrame), CMD_HH(endFrame, type), CMD_HH(topOptionBranch, bottomOptionBranch)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* FFFFssss eeeeFFFF FFFFFFFF
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_TEXT_NONE(startFrame, endFrame) \
|
|
|
|
CS_TEXT_DISPLAY_TEXTBOX(0xFFFF, startFrame, endFrame, 0xFFFF, 0xFFFF, 0xFFFF)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 ocarinaSongAction (o), s16 startFrame (s), s16 endFrame (e), s16 topOptionBranch (i)
|
|
|
|
* FORMAT
|
|
|
|
* oooossss eeee0002 iiiiFFFF
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_TEXT_LEARN_SONG(ocarinaSongAction, startFrame, endFrame, messageId) \
|
|
|
|
CS_TEXT_DISPLAY_TEXTBOX(ocarinaSongAction, startFrame, endFrame, 0x0002, messageId, 0xFFFF)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 transitionType (t), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused , endFrame duplicate
|
|
|
|
* 0000002D 00000001 ttttssss eeeeUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_SCENE_TRANS_FX(transitionType, startFrame, endFrame) \
|
|
|
|
CS_CMD_SCENE_TRANS_FX, 0x00000001, CMD_HH(transitionType, startFrame), CMD_HH(endFrame, endFrame)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000056 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_PLAY_BGM_LIST(entries) CS_CMD_PLAYBGM, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 sequence (q), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* qqqqssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_PLAY_BGM(sequence, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
|
|
|
CMD_HH(sequence, startFrame), CMD_HH(endFrame, unused0), \
|
|
|
|
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
|
|
|
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 00000057 eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_STOP_BGM_LIST(entries) CS_CMD_STOPBGM, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 sequence (q), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* uuqqssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_STOP_BGM(sequence, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
|
|
|
CMD_HH(sequence, startFrame), CMD_HH(endFrame, unused0), \
|
|
|
|
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
|
|
|
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 0000007C eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_FADE_BGM_LIST(entries) CS_CMD_FADEBGM, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 fadeType (t), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* ttttssss eeeeUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU UUUUUUUU 00000000 00000000 00000000
|
|
|
|
* size = 0x30
|
|
|
|
*/
|
|
|
|
#define CS_FADE_BGM(fadeType, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
|
|
|
CMD_HH(fadeType, startFrame), CMD_HH(endFrame, unused0), \
|
|
|
|
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
|
|
|
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s32 entries (e)
|
|
|
|
* FORMAT
|
|
|
|
* 0000008C eeeeeeee
|
|
|
|
* size = 0x8
|
|
|
|
*/
|
|
|
|
#define CS_TIME_LIST(entries) CS_CMD_SETTIME, CMD_W(entries)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* s16 unk (u), s16 startFrame (s), s16 endFrame (e), s8 hour (h), s8 min (m)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused
|
|
|
|
* uuuussss eeeehhmm UUUUUUUU
|
|
|
|
* size = 0xC
|
|
|
|
*/
|
|
|
|
#define CS_TIME(unk, startFrame, endFrame, hour, min, unused) \
|
|
|
|
CMD_HH(unk, startFrame), \
|
|
|
|
CMD_HBB(endFrame, hour, min), \
|
|
|
|
CMD_W(unused)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ARGS
|
|
|
|
* CutsceneTerminatorDestination dest (d), s16 startFrame (s), s16 endFrame (e)
|
|
|
|
* FORMAT
|
|
|
|
* Capital U is Unused , endFrame duplicate
|
|
|
|
* 000003E8 00000001 ddddssss eeeeUUUU
|
|
|
|
* size = 0x10
|
|
|
|
*/
|
|
|
|
#define CS_TERMINATOR(dest, startFrame, endFrame) \
|
|
|
|
CS_CMD_TERMINATOR, 0x00000001, CMD_HH(dest, startFrame), CMD_HH(endFrame, endFrame)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Marks the end of a cutscene
|
|
|
|
*/
|
2020-07-12 15:38:38 +00:00
|
|
|
#define CS_END() 0xFFFFFFFF, 0x00000000
|
Create Macros for Cutscene Data (#63)
* Added additional (potentially unused) fields to macros, now builds OK
* Ran formatter, attempted better macro formatting
* Formatted unknown fields as hex, further cleanups
* Rename and prefix macros, use command base macros, format cutscenes with indents
* Move command macros into a new file and include it globally
* Generate cutscene command macros for Bg_Toki_Swd, Cleanups
* Rename CS_TEXTBOX commands to CS_TEXT, fix typo ic command_macros_base.h
* Introduce CS_CMD_CONTINUE and CS_CMD_STOP
* Remove apparently redundant arguments in certain commands, include the values in the macros directly
* Re-add cutscene terminator destination enum values to example cutscene data
* Format what should be floats as hex, Change actorAnim to actorAction
* Allow floating-point representation of values in cutscene data (asm-processor hack)
* Include cutscene commands only where necessary, documentation fixes
* Rename actor actions to npc actions, separate player action from npc actions
* Remove PlayerActionIDs for now as relevant information on it is not yet decompiled
* Generate cutscene data for en_ru1, remove apparent redundancies in CS_LIGHTING and CS_PLAY/STOP/FADE_BGM commands, relax static requirement in asm-processor CutsceneData float conversion
2020-05-20 11:37:28 +00:00
|
|
|
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
#endif
|