Files
mm/include/variables.h
T
Anghelo Carvajal 5db52cfd39 A higher level language for schedule scripts (#1462)
* schedule script

* start something

* tokenize

* make a tree

* start to emit macros

* start to handle args

* handle branch targets

* cleanup a bit

* script to convert the current schedule scripts to the new language

* Add schedule compilation to Makefile

* Fix bug on compiler if the script doesn't have an extra empty line

* Allow to have `else`s without braces

* convert a lot of schedules

* door

* en_tk

* fix some checks being the wrong way around

* borkens

* door borken schedules

* kafei schedule

* postman schedule

* Implement `if_since_time_*` command

* Allow `if`s to not have an `else`

* Implement some debugging options

* fix another one from door

* D_808675D0

* door D_8086775C

* don't print else if there isn't one

* start supporting labels

* rewrite comment handling

* add branch support

* emit debugging information

* postman and one door

* the remaining scripts

* add tokens for the non _s/_l versions

* meh

* Add built schedules

* Remove _s/_l suffixes from almost every command

* TokenProperties

* Move macros and length into TokenProperties

* move short and long to TokenType

* rename member

* some cleanups

* fatalError

* Write various notes on the compiler

* more errors and comments

* debug flags

* Move the built schedules to the build folder

* manually cleanup control flow of many schedule scripts

* cleanup postman schedule

* start write up

* write more stuff

* write a little more

* Start writing about the commands

* 2 more commands

* more

* almost everything, except returns

* hopefully finish documenting the commands

* cleanup

* formal grammar

* Table of contents

* typo

* Rename schc.py

* remove todo

* Warn if a if_before_time/if_since_time is negated

* Add colors to warnings and errors

* delete rebuild schedules script

* version

* Apply suggestions from code review

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* suggestions on md file

* compiler review

* invented is invented

* ScheduleScript typedef

* fix

* Convert Anju's schedule to the new format

* simplify anju's schedule

* forgot to remove `_s`/`_l`

* bss

* Rework schc to allow multiple scripts per file

* Migrate all the schedules to the new format

* update language specification

* Update docs/schedule_scripting_language.md

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

* Update docs/schedule_scripting_language.md

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

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-02-01 09:50:32 -03:00

112 lines
3.0 KiB
C

#ifndef VARIABLES_H
#define VARIABLES_H
#include "z64.h"
#include "segment_symbols.h"
#include "macros.h"
// data
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX];
extern ActorId gMaxActorId;
extern FlexSkeletonHeader* gPlayerSkeletons[PLAYER_FORM_MAX];
extern PlayerModelIndices gPlayerModelTypes[];
extern struct_80124618 D_801C03A0[];
extern struct_80124618 D_801C0490[];
extern Gfx gCullBackDList[];
extern Gfx gCullFrontDList[];
extern u32 gBitFlags[32];
extern u16 gEquipMasks[];
extern u16 gEquipNegMasks[];
extern u32 gUpgradeMasks[8];
extern u32 gUpgradeNegMasks[];
extern u8 gEquipShifts[];
extern u8 gUpgradeShifts[8];
extern u16 gUpgradeCapacities[][4];
extern u32 gGsFlagsMask[];
extern u32 gGsFlagsShift[];
extern TexturePtr gItemIcons[];
extern u8 gItemSlots[];
extern s16 gItemPrices[];
extern u16 gSceneIdsPerRegion[11][27];
extern u8 gPlayerFormItemRestrictions[PLAYER_FORM_MAX][114];
extern s16 gPlayerFormObjectIds[PLAYER_FORM_MAX];
extern ObjectId gObjectTableSize;
extern RomFile gObjectTable[OBJECT_ID_MAX];
extern SceneTableEntry gSceneTable[SCENE_MAX];
extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[2];
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
extern s32 gDbgCamEnabled;
extern Vec3f gZeroVec3f;
extern Vec3s gZeroVec3s;
extern s16 gLowPassFilterData[];
extern s16 gHighPassFilterData[];
extern s16 gBandStopFilterData[];
extern s16 gBandPassFilterData[];
extern s16* gWaveSamples[9];
extern f32 gBendPitchOneOctaveFrequencies[];
extern f32 gBendPitchTwoSemitonesFrequencies[];
extern f32 gPitchFrequencies[];
extern u8 gDefaultShortNoteVelocityTable[];
extern u8 gDefaultShortNoteGateTimeTable[];
extern EnvelopePoint gDefaultEnvelope[];
extern NoteSampleState gZeroedSampleState;
extern NoteSampleState gDefaultSampleState;
extern u16 gHaasEffectDelaySize[];
extern u16 gHaasEffectDelaySize[];
extern s16 gInvalidAdpcmCodeBook[];
extern f32 gHeadsetPanVolume[];
extern f32 gStereoPanVolume[];
extern f32 gDefaultPanVolume[];
extern s32 gAudioCtxInitalized;
extern u8 D_801D6200[0x400];
extern u8 gAudioSpecId;
extern u8 gAudioHeapResetState;
extern AudioSpec gAudioSpecs[21];
// rodata
extern TexturePtr gCircleTex[];
extern const u16 gAudioEnvironmentalSfx[];
extern const s16 gAudioTatumInit[];
extern const AudioHeapInitSizes gAudioHeapInitSizes;
extern u8 gSoundFontTable[];
extern u8 gSequenceFontTable[];
extern u8 gSequenceTable[];
extern u8 gSampleBankTable[];
// bss
extern s32 gTransitionTileState;
extern Color_RGBA8_u32 gPlayVisMonoColor;
extern GfxMasterList* gGfxMasterDL;
extern u64* gAudioSPDataPtr;
extern u32 gAudioSPDataSize;
extern s32 D_801FD120;
extern u8 sResetAudioHeapTimer;
extern u16 sResetAudioHeapFadeReverbVolume;
extern u16 sResetAudioHeapFadeReverbVolumeStep;
extern AudioContext gAudioCtx; // at 0x80200C70
extern AudioCustomUpdateFunction gAudioCustomUpdateFunction;
extern AudioCustomSeqFunction gAudioCustomSeqFunction;
extern AudioCustomReverbFunction gAudioCustomReverbFunction;
extern AudioCustomSynthFunction gAudioCustomSynthFunction;
// other segments
extern Mtx D_01000000;
extern u16 D_0F000000[];
#endif