include/types.h
SGL's integer types, Bool and logic constants, UNUSED, unread results and the fixed-address macros.
Included by action_weights.c, battle_internal.h, color_scale_kernel.c, element_glow_tables.c, highlight_tables.c, battle_effect_constants.c, battle_effect_internal.h, battle_effect_table.c, blitter_color_fragments.c, blitter_fragments.c, blitter_operands.c, field_engine_internal.h, field_engine_sprite_color_tables.c, field_engine_tables.c, field_internal.h, field_psynergy_internal.h, grid_outline.c, script_commands_internal.h, script_commands_scripts.c, script_commands_tables.c, sprite_color_tables.c, terrain_tables.c, world_map_lines.c, paths.c, djinn_menu_strings.c, menu_internal.h, menu_pattern_masks.c, menu_strings.c, status_panel_strings.c, emote_pop_tilted.c, map_metatile_set.c, scene_set_arrival_flags.c, world_map_objects.c, shop_internal.h, dummy_func_work_copy.c, bupdata.c, number_text.c, debug_labels.c, expand_nibble_table.c, glyph_arm.c, message_speed.c, progress_bar_rows.c, text_tables.c, window_internal.h, window_spans.c, ability_staging.h, battle.h, battle_action.h, battle_actor.h, battle_camera.h and 145 more.
Macros
| Name | Description | |
|---|---|---|
#define | UNUSED __attribute__((unused)) | |
#define | FIXED_LINKED (linked) | The address of one of Camelot's fixed places in the modern build, which puts code and data where its own compiler does: the linked name, read through a volatile pointer so that code copied into RAM still reaches it through a register. |
#define | FIXED_ADDRESS (type, address, linked) (type FIXED_LINKED(linked)) | One of Camelot's fixed addresses, as a constant of type; linked names the symbol the modern build reaches it by, where make modern resolves it by name. |
#define | FIXED_OFFSET (value, linked, from) | The distance between two fixed places, value, which the modern build computes from their linked names. |
#define | UNREAD_RESULT void | |
#define | RETURN_UNREAD (value) |
Typedefs
| Name | Description | |
|---|---|---|
typedef unsigned char | Uint8 ; | SGL's integer types, as its sl_def.h names them. |
typedef signed char | Sint8 ; | |
typedef unsigned short | Uint16 ; | |
typedef signed short | Sint16 ; | |
typedef unsigned int | Uint32 ; | |
typedef signed int | Sint32 ; | The tick counts of the four red moai's streams' cycles (scAquaRockTimeStreams). |
typedef unsigned long long | Uint64 ; | |
typedef signed long long | Sint64 ; | |
typedef int | Bool ; | |
typedef Uint8 | u8 ; | The development kit's code keeps its own names for the same types. |
typedef Sint8 | s8 ; | |
typedef Uint16 | u16 ; | |
typedef Sint16 | s16 ; | |
typedef Uint32 | u32 ; | |
typedef Sint32 | s32 ; |
Enumerations
| Name | Description | |
|---|---|---|
enum | BooleanLogic { FALSE, TRUE } | SGL's truth values, switches and results, as sl_def.h defines them. |
enum | BooleanSwitch { OFF, ON } | |
enum | Judgement { OK, NG } |
Description
SGL's integer types, Bool and logic constants, UNUSED, unread results and the
fixed-address macros.
Macros in detail
UNUSED
#define UNUSED __attribute__((unused))
Definition at line 53 of file types.h.
FIXED_LINKED
#define FIXED_LINKED(linked)
The address of one of Camelot's fixed places in the modern build, which puts code and data where its own compiler does: the linked name, read through a volatile pointer so that code copied into RAM still reaches it through a register.
Definition at line 60 of file types.h.
FIXED_ADDRESS
#define FIXED_ADDRESS(type, address, linked) (type FIXED_LINKED(linked))
#define FIXED_ADDRESS(type, address, linked) (type address)
One of Camelot's fixed addresses, as a constant of type; linked names the
symbol the modern build reaches it by, where make modern resolves it by
name.
Definition at lines 68 and 74 of file types.h.
FIXED_OFFSET
#define FIXED_OFFSET(value, linked, from)
#define FIXED_OFFSET(value, linked, from) value
The distance between two fixed places, value, which the modern build
computes from their linked names.
Definition at lines 71 and 75 of file types.h.
UNREAD_RESULT
#define UNREAD_RESULT void
#define UNREAD_RESULT Sint32
Referenced by btCameraApplyTransform(), btEnemyAdjustLevel(), btEnemyReleaseNameLetter(), btPartyClearBattleStatuses(), btStagingPlanDaedalus(), btStagingRunMessages(), fdWorldMapInitPerspective(), mnPartyStatusDrawBars(), mnRangeIconBuildTiles() and mnRangeIconDraw().
Definition at lines 84 and 92 of file types.h.
RETURN_UNREAD
#define RETURN_UNREAD(value)
#define RETURN_UNREAD(value) return value
Definition at lines 85 and 93 of file types.h.
Typedefs in detail
Uint8
typedef unsigned char Uint8;
SGL's integer types, as its sl_def.h names them. SGL makes the 32-bit pair
long; here they are int, the type the original was compiled with: long is
another type of the same size, and a pointer to one is not a pointer to the
other. The 64-bit pair has no SGL name and follows the same pattern.
Referenced by AbilityStaging, ActionRunEffectChance, ActorBlinkSpriteColors, ActorShadowTiles, ActorSpriteSlots, ActorStepAngleScript, ActorWaitScript, AnimationFacingEightPictures, AnimationFacingFivePictures, AnimationFacingFivePicturesUnused, AnimationFacingFrontBack, AnimationFacingFrontBackSwapped, AnimationFacingOnePicture, AnimationFacingThreePictures, AquaRockBubbleTiles, AquaRockInsidePillarTiles, AquaRockInsidePoolLevelMetatiles, AquaRockInsideSplashTiles, ArrowGlintPixels, AzulObjectX, AzulObjectZ, AzulPartPoints, BattleAIActionWeights, BattleEffectDecodePictureBlockSize, BattleEffectDecodePictureCode, BattleEffectDecodePictureCopyEnd, BattleEffectEmberStreakPictureBiasY, BattleEffectEmberStreakPictureHeights, BattleEffectEmberStreakPictureWidths, BattleEffectGlintPictureHeights, BattleEffectGlintPictureWidths, BattleEffectSparkleSizes, BattleMessageAdvanceArrowTiles, BattleTransitionCurtainTiles, BattleTransitionCurtainVariants, BattleUnusedCounting, BeamPictureHeights, BeamPictureReaches, BeamPictureWidths, BgmFadeRequested, BgmRestoreDelay, BgTileBuffer, BlankCreditLine, BoltCounts, BoltGlintFlips, BoltGlintModes, BoltTrailGlintFlips, BoreasAnimations, BoreasCrystalHeights, BoreasCrystalWidths and 1485 more.
Definition at line 16 of file types.h.
Sint8
typedef signed char Sint8;
Referenced by AirsRockFogAlpha, AirsRockFogAlphaStep, AirsRockLiftingFogAlpha, AirsRockLiftingFogAlphaStep, AnemosInnerSanctumDullahanBlockOrder, AnemosInnerSanctumDullahanBlockSpots, AquaRockInsideStreamTurns, ArticleA, ArticleAn, ArticleDas, ArticleDe, ArticleDeElided, ArticleDes, ArticleDie, ArticleEin, ArticleEine, ArticleEl, ArticleEmpty, ArticleGli, ArticleIl, ArticleIndefinite, ArticleL, ArticleLa, ArticleLas, ArticleLe, ArticleLes, ArticleLo, ArticleLos, ArticleSome, ArticleTable, ArticleThe, ArticleUn, ArticleUna, ArticleUnas, ArticleUne, ArticleUnElided, ArticleUno, ArticleUnos, AzulLateObjectX, AzulLateObjectZ, BattleEffectAtalantaPath, BattleEffectDragonCloudFlamePath, BattleFormationCenteredOffsets, BattleHighlightBlendRamp, BattlePlacementSpots, BoreasShakeOffsets, BreathRingX, btAbilityApplyToTarget(), btAIChooseAction(), btEffectRunAtalanta() and 193 more.
Definition at line 17 of file types.h.
Uint16
typedef unsigned short Uint16;
Referenced by ActorScriptIdleScript, AirsRockInsidePairedStakesStakes, AlhafraDoorOpening, AlhafranCavePoundStakes, AlhafraNoDoor, AlhafraSecondDoorOpening, ALIGNED, ApojiiIslandsFallsColors, ApojiiIslandsFallsCycled, ApojiiIslandsLowerScrollX, ApojiiIslandsSeaColors, ApojiiIslandsSeaCycled, ApojiiIslandsShoreColors, ApojiiIslandsShoreCycled, ApojiiIslandsSprayColors, ApojiiIslandsSprayCycled, ApojiiIslandsStoneColors, ApojiiIslandsStoneCycled, ApojiiIslandsUpperScrollX, AquaRockInsideEntranceVentPillars, AquaRockInsideEntranceVents, AquaRockInsideVentsRoomVentPillars, AquaRockInsideVentsRoomVents, BattleAIDullahanForms, BattleAIUnusedDullahanForms, BattleEffectColumnMesh, BattleEffectCylinderMesh, BattleEffectEmberStreakPictures, BattleEffectFlarePictures, BattleEffectGlintPictures, BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectRingMesh, BattleEffectSmallSquareMesh, BattleEffectSmallSquareMeshReversed, BattleEffectSparklePictures, BattleEffectSquareMesh, BattleEffectTallMesh, BattleEffectTriangleMesh, BattleFormationExcludedEnemies, BattleFormationUnusedListEnd, BattleUnitWeaponAnimationsFelix, BattleUnitWeaponAnimationsGaret, BattleUnitWeaponAnimationsIsaac, BattleUnitWeaponAnimationsIvan, BattleUnitWeaponAnimationsJenna, BattleUnitWeaponAnimationsMia, BattleUnitWeaponAnimationsPiers, BattleUnitWeaponAnimationsSheba, BattleUnitWeaponKinds and 1046 more.
Definition at line 18 of file types.h.
Sint16
typedef signed short Sint16;
Referenced by ActorScriptIdleScriptTail, AirsRockCliffPillars, AirsRockFrozenPuddle, AirsRockGustTargets, AirsRockInsideEntrancePillars, AirsRockInsideFaceVentsPillars, AirsRockInsideHallPillars, AirsRockInsidePairedStakesPillars, AirsRockInsideStatuesPillars, AirsRockInsideTightropesPillars, AirsRockInsideWindStonePillars, AirsRockWaveLines, AlhafranCavePuddles, AlhafraPuddles, AncientLemuriaShiningWaterColors, AnemosInnerSanctumBoulderBlocks, AnemosInnerSanctumCrackedFloorBlocks, AnemosInnerSanctumDullahanLightPicture, AnemosInnerSanctumElevatorBlocks, AnemosInnerSanctumMimicStoneDoorFrames, AnemosInnerSanctumNorthDoorFrames, AngaraCavernBlocks, AnkohlRuinsSandRiseDelay, AnkohlRuinsSandStepDelay, AnkohlRuinsSandTimer, AnyFileCleared, BattleUnusedCharacterPortraits, BattleUnusedSpritePortraits, btAbilityApplyToTarget(), btAbilityReplaceDefeated(), btActionOrderSort(), btActorSpawnObjectsForList(), btAIChooseAction(), btAIChooseTarget(), btAutoBattleBuildActions(), btAutoBattleRunAction(), btAutoBattleRunPsynergy(), btAutoBattleShowDefend(), btAwardSpoils(), btBuildEnemyActions(), btCameraSetRange(), btCameraUpdate(), btEffectBuildCenteredIndexList(), btEffectConvertBackgroundToBlueRamp(), btEffectRunCanvasBurst(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCrystal(), btEffectRunDaedalus() and 594 more.
Definition at line 19 of file types.h.
Uint32
typedef unsigned int Uint32;
Referenced by AbilityBattleEffects, AirsRockInsidePooledWhirlwindFadesScript, AirsRockInsideRisingSparkScript, AirsRockInsideWhirlwindFadesScript, AirsRockInsideWhirlwindRisesScript, AirsRockInsideWindStoneScript, AirsRockWhirlwindFadesScript, AirsRockWhirlwindRisesScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraLookAroundScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveVisitorsLeaveScript, AlhafraRoomsTravelersWalkOffScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AlhafraWomanWalksOffScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumFadingSparkScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumShortScript, AnkohlRuinsFaceHalfScript, AnkohlRuinsGreatFaceScript, ApojiiIslandsCaveWeedsScript, AquaRockInsideSplashScript, AquaRockInsideTabletGlowScript, BattleEffectAdditiveForward(), BattleEffectAdditiveReverse(), BattleEffectColorForward(), BattleEffectColorReverse(), BattleEffectCopy8Forward(), BattleEffectCopy8Reverse(), BattleEffectCopyForward(), BattleEffectCopyReverse(), BattleEffectMask(), BattleEffectMax4Forward(), BattleEffectMax4Reverse(), BattleEffectMaxForward(), BattleEffectMaxReverse(), BattleEffectTransparent8Forward() and 1384 more.
Definition at line 20 of file types.h.
Sint32
typedef signed int Sint32;
Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorFootprintScript, ActorHoverScript, ActorIdleScript, ActorKeyCheckScript, ActorKeysScript, ActorLaunchScript, ActorOffsetScript, ActorPlacements, ActorPlayerScript, ActorRippleScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandPuffScript, ActorSandScript, ActorScriptCycleTable, ActorScriptEndScript, ActorScriptIdleScript, ActorSplashScript, ActorStepAngleScript, ActorTightropeScript, ActorWaitScript, ActorWalkingScript, ActorWorldMapScript, AirsRockEntrancePlacements, AirsRockInsideFaceVentsPlacements, AirsRockInsideLeaderLevel, AirsRockInsideOrbitingSparkScript, AirsRockInsidePairedStakesPlacements, AirsRockInsideStampedHeight, AirsRockInsideStampedMetatile, AirsRockInsideStampedWidth, AirsRockInsideStampedX, AirsRockInsideStampedZ, AirsRockInsideTightropesPlacements, AirsRockInsideTurningBridgePlacements, AirsRockInsideWindStonePlacements, AirsRockLeaderLevel, AirsRockRubbleScript, AirsRockWindStoneScript, AlhafraActorPlacementsOnceTheMastIsCleared, AlhafraAlhafranLeadsBehindFelixScript, AlhafraElderStepsBackScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveIdleEventTick and 4596 more.
Definition at line 21 of file types.h.
Uint64
typedef unsigned long long Uint64;
Definition at line 22 of file types.h.
Sint64
typedef signed long long Sint64;
Definition at line 23 of file types.h.
Bool
typedef int Bool;
Referenced by btAbilityEffectAppliesToDowned(), btActionRunBuild(), btAIChooseAction(), btDebugParamSetLoad(), btDjinnRecoveryCountDown(), btFleeCheckSuccess(), btFleePlayRun(), btFormationBuildEnemyList(), btPlacementContainsId(), btRenderCopyTextureToIWRAM(), btSpriteIsSmall(), btStagingDispatchAction(), btStagingRunAttack(), btStagingRunFlee(), btUnitCountDownAgilityStage(), btUnitCountDownAttackStage(), btUnitCountDownCharm(), btUnitCountDownConfusion(), btUnitCountDownDefenseStage(), btUnitCountDownDelusion(), btUnitCountDownPsynergySeal(), btUnitCountDownReflect(), btUnitCountDownRegenerate(), btUnitCountDownResistanceStage(), btUnitCountDownSleep(), btUnitCountDownStun(), btUnitKeepsOneHp(), btUnitRollCounterEarlyEnd(), fdActorApproachWatchedActor(), fdActorIsBeside(), fdActorIsNotAttachedEffect(), fdActorIsTargetUnset(), fdActorIsTouching(), fdActorSailOnMap(), fdActorScriptInvokeCallback(), fdActorScriptWaitForArrival(), fdActorUpdateHoverControl(), fdActorUpdatePlayerControl(), fdActorUpdateWalkingControl(), fdActorWander(), fdHasPsynergyCue(), fdIsRevealActive(), fdItemMatchesFilter(), fdLeaderCanPushObjectAhead(), fdLeaderStepOffRope(), fdLeaderStepOffTightrope(), fdLeaderStepOntoRope(), fdLeaderStepOntoTightrope(), fdMapGridBlocksJump(), fdMapScreenShow() and 123 more.
Definition at line 24 of file types.h.
u8
typedef Uint8 u8;
The development kit's code keeps its own names for the same types.
Referenced by MusicTrackReadCommandByteLeftover().
Definition at line 27 of file types.h.
s8
typedef Sint8 s8;
Definition at line 28 of file types.h.
u16
typedef Uint16 u16;
Definition at line 29 of file types.h.
s16
typedef Sint16 s16;
Definition at line 30 of file types.h.
u32
typedef Uint32 u32;
Referenced by MusicTrackClearModulationStateLeftover() and MusicTrackReadCommandByteLeftover().
Definition at line 31 of file types.h.
s32
typedef Sint32 s32;
Definition at line 32 of file types.h.
Enumerations in detail
BooleanLogic
enum BooleanLogic
SGL's truth values, switches and results, as sl_def.h defines them.
| Enumerator | Value | Description |
|---|---|---|
FALSE | 0 | |
TRUE | 1 |
Definition at line 35 of file types.h.
BooleanSwitch
enum BooleanSwitch
| Enumerator | Value | Description |
|---|---|---|
OFF | 0 | |
ON | 1 |
Definition at line 41 of file types.h.
Judgement
enum Judgement
| Enumerator | Value | Description |
|---|---|---|
OK | 0 | |
NG | -1 |
Definition at line 47 of file types.h.