mm/include/command_macros_base.h
Anghelo Carvajal 77cfd399d0
z_demo with 4 NON_MATCHINGs (#514)
* starting

* a bunch

* and another bunch

* a bunch

* Match func_800EB1DC

* func_800EB4B4

* func_800EB6F8

* 2 more

* fix prototype of a random kankyo function

* func_800EBD60 non matching

* func_800EC678 matched?

* func_800EC6D4

* break

* func_800ECD7C

* A bunch of functions

* func_800EE200

* func_800EDF78 and func_800EE0CC

* func_800EDBE0 NON_MATCHING

* Cutscene_Init NON_MATCHING

* func_800EA324 NON_EQUIVALENT

* Fix warnings

* func_800EC924 NON_EQUIVALENT

* Cutscene_ProcessCommands NON_EQUIVALENT

* Format

* Split z_demo data and import it

* Import bss

* Match func_800EB364

* Rename Cutscene_Command_SetTime

* Improve Cutscene_ProcessCommands a bit (still not equivalent, probably)

* Improve Cutscene_ProcessCommands thanks to engineer and anon

* Cutscene_ProcessCommands NON_MATCHING

* Name some commands

* Fix

* Renames based on Engineer knowledge of Audio stuff

* More command names

* Cutscene_Command_GiveTatlToPlayer

* Some cutscene commands macros

* more command macros

* Macros for unknown commands

* Improve Cutscene_Command_Textbox a bit

* Rename stuff

* Name Terminator and Camera

* MOTIONBLUR

* Macros for textbox commands

* CS_PLAYER_ACTION_LIST

* A few macro renames

* Small cleaning

* A bit more of cleanup

* Rumble

* Entrance comments in func_800EB6F8

* Some var renames

* CS_CMD_FADESCREEN

* More clean up

* Clean functions protos

* Move CutsceneStateHandler out of z64.h

* Cutscene_DoNothing

* Cutscene_IsPlayingCs & Cutscene_GetSceneSetupIndex

* And more renames

* name some stuff in the cutscenecontext struct

* npcActionIndex->actorActionIndex

* Undo names of CS_STATE_ enum

* Name Cutscene_ActorTranslate family of functions

* small docs pass

* sfxconvert and format

* Hopefully last cleanup

* Add some missing functions to actorfixer

* Fix merge issues and remove trailing commas

* Cutscene commands fix

* Cutscene_Command_Misc improved by engineer

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Address review

* bss

* Match Cutscene_Command_Textbox by anon58

* Fix merge issues

* Match Cutscene_Command_Misc by @hensldm

* review

* float time macros

* fix merge issues

* format

* Fix building assets

* fix merge issues

* format

* Fix

* format

* fix merge issues

* fix

* fix

* format

* fix issues and run format

* bss

* Fix conflicts, bss and formatter

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* address review and fix some stuff

* fix merge problems

* more fixes and format

* Fixes

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Engineer suggestions

* format

* Elliptic review

* Use dec for ShrinkWindow_SetLetterboxTarget

* add a few comments

* Cutscene_Command_ChooseCreditsScenes

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* format

* some cleanups and some comments

* change actorActionCmd from hex to dec in the codebase

* minor comment on textboxcmd

* ahhhh

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* brackets

* minor comments

* rewording

* im dumb

* brackets

* another bracket

* Dawn of the New Day

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* fixes

* Cutscene_Command_TransitionFX by Anon

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2022-03-04 19:14:52 -05:00

28 lines
737 B
C

#ifndef _COMMAND_MACROS_BASE_H_
#define _COMMAND_MACROS_BASE_H_
/**
* Command Base macros intended for use in designing of more specific command macros
* Each macro packs bytes (B), halfwords (H) and words (W, for consistency) into a single word
*/
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 8, 8) | _SHIFTL(d, 0, 8))
#define CMD_BBH(a, b, c) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 0, 16))
#define CMD_HBB(a, b, c) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 8, 8) | _SHIFTL(c, 0, 8))
#define CMD_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
#define CMD_W(a) (a)
#ifdef __GNUC__
#define CMD_F(a) .f = (a)
#else
#define CMD_F(a) (a)
#endif
#define CMD_PTR(a) (uintptr_t)(a)
#endif