include/types.h
SGL's integer types, Bool and logic constants, UNUSED, unread results and the fixed-address macros.
Included by unused_portrait_pairs.c, battle_effect_internal.h, blitter_color_fragments.c, blitter_fragments.c, blitter_operands.c, actor_update_arm.c, world_map_lines.c, paths.c, self_pointers_after_first_block.c, self_pointers_after_second_block.c, djinn_menu_strings.c, menu_strings.c, status_panel_strings.c, colosso_hex_string.c, colosso_lettering_scripts.c, colosso_lettering_tables.c, sol_sanctum_elemental_star_light_tables.c, debug_labels.c, expand_nibble_table.c, glyph_arm.c, message_speed.c, text_tables.c, window_spans.c, battle.h, battle_action.h, battle_actor.h, battle_camera.h, battle_effect_params.h, battle_effect_state.h, battle_random.h, battle_sprites.h, battle_state.h, blitter.h, debug_parameter_set.h, first_strike.h, formations.h, range_falloff.h, stubs.h, battle_effect.h, battle_effect_table.h, blitter_operands.h, stubs.h, debug.h, actor.h, actor_script.h, actor_update_arm.h, curve.h, encounter_zone.h, engine_stubs.h, facing.h and 102 more.
Macros
| Name | Description | |
|---|---|---|
#define | UNUSED __attribute__((unused)) | |
#define | UNREAD_RESULT void | |
#define | RETURN_UNREAD (value) | |
#define | FIXED_LINKED (linked) | Reaches a fixed address through its linked name, in the modern build. |
#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. |
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 ; | Carry, Lift, Douse, Move and the Djinni's hop into battle throw things this way. |
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.
UNREAD_RESULT
#define UNREAD_RESULT void
#define UNREAD_RESULT Sint32
Referenced by btAbilityApplyToTarget(), btAIChooseAction(), btCameraApplyTransform(), btDjinnRecoveryReconcile(), btElementGlowUpdateStarField(), btEnemyAdjustLevel(), btEnemyLetterFirstOfKind(), btEnemyReleaseNameLetter(), btLinkBattleSendParty(), btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btObjectReleaseSpriteSlots(), btObjectSetColorMode(), btObjectUpdatePose(), btPartyAssignOpponentSlots(), btPartyClearBattleStatuses(), btPlacementRelayoutEnemies(), btPlaybackWaitForReady(), btProcessTurnEnd(), btStagingBuildTargetList(), btStagingRunMessages(), btStatusIconCycle(), btUnitBuildStatusFlags(), btUnitClearStatuses(), btUnitProcessActionEnd(), btUnitRemoveEnemy(), fdEffectCopyWatchedActorPos(), fdStartEncounterTransition(), fdWorldMapInitPerspective(), fdWorldMapStepZoom(), gmUnitCalculateBaseElements(), mnPartyStatusDrawBars(), mnRangeIconBuildTiles(), mnRangeIconDraw(), mnStringFormatNumberToHalfwords(), mnWindowSpriteCreateAbilityIcon(), scActorUpdateBlockDrawOrder(), scAlpineCrossingLeaderFaceFeizhi(), scAlpineCrossingSortPillarAgainstLeader(), scAltinPeakShadowFollowBoulder(), scBattleArenaWatchOpponent(), scCrossboneIsleKeysFaceBaneTowardLeader(), scCrossboneIsleSteppingStonesSpawnMeltParticle(), scCrossboneIsleSteppingStonesUpdateActorPriority(), scCrossboneIsleSteppingStonesUpdateFrozenPuddlePriority(), scFuchinTempleFaceLeader(), scLamakanDesertKickUpSand(), scMercuryLighthouseEntranceMiaWatchesLeader(), scMercuryLighthouseTrailSparks(), scPushedActorStopBlockedMotion() and 21 more.
Definition at lines 61 and 69 of file types.h.
RETURN_UNREAD
#define RETURN_UNREAD(value)
#define RETURN_UNREAD(value) return value
Referenced by gmUnitCalculateBaseElements(), mnDebugSceneSelectRun(), scActorUpdateBlockDrawOrder(), scBattleArenaWatchOpponent(), scCrossboneIsleKeysFaceBaneTowardLeader(), scCrossboneIsleSteppingStonesSpawnMeltParticle(), scCrossboneIsleSteppingStonesUpdateActorPriority(), scCrossboneIsleSteppingStonesUpdateFrozenPuddlePriority(), scLamakanDesertKickUpSand(), scMercuryLighthouseTrailSparks(), scPushedActorStopBlockedMotion(), scSanctumKeepFacingActor(), scSanctumMatchLeaderPriority(), scTolbiUpdateKid(), scTunnelRuinsFrostTargetFollowsPillar(), scTunnelRuinsRideStoneBelow(), scTunnelRuinsSplashDousedPillar(), scValeCaveFaceActorTowardLeader(), scValeHaveGuardWatchTheLeader(), scVaultUpdateWalkingVillager(), scVaultUpdateWomanWantingRoofFixed(), scVenusLighthouseEmitPassageSparkTrail(), scVenusLighthouseEmitRisingParticles(), scVenusLighthouseEmitRisingSparkles(), scVenusLighthouseFlashStruckLeader(), scVenusLighthouseFollowSupportingPillarHeight(), scVenusLighthouseTrailLight() and scXianWatchWaterCarrierPath().
Definition at lines 62 and 70 of file types.h.
FIXED_LINKED
#define FIXED_LINKED(linked)
Reaches a fixed address through its linked name, in the modern build. The modern build places code and data where its own compiler puts them: a fixed address is the linked name, read through a volatile pointer so that code copied into RAM still reaches it through a register.
Definition at line 78 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 83 and 90 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 84 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, ActorBlinkSpriteColors, ActorShadowTiles, ActorSpriteSlots, AltinPeakUnusedAfterSpitOrigin, AnimationFacingEightPictures, AnimationFacingEightPicturesMirrored, AnimationFacingFivePictures, AnimationFacingFourPictures, AnimationFacingFrontBack, AnimationFacingFrontBackSwapped, AnimationFacingOnePicture, AnimationFacingSixPictures, AnimationFacingThreePictures, BasicSpritePalettes, BattleAIActionWeights, BattleArenaSaveStamp, BattleArenaSlotColumns, BattleEffectGlintPictureHeights, BattleEffectGlintPictureWidths, BattleEffectPuffArcPictureBiasY, BattleEffectPuffArcPictureHeights, BattleEffectPuffArcPictureWidths, BattleEffectSparkleSizes, BattleMessageAdvanceArrowTiles, BattleStatusScreenHpString, BattleStatusScreenKpString, BattleStatusScreenLevelString, BattleStatusScreenNivString, BattleStatusScreenNvString, BattleStatusScreenPpString, BattleStatusScreenPvString, BattleStatusScreenSlashString, BattleTransitionCurtainTiles, BattleTransitionCurtainVariants, BattleUnusedCounting, BeamPictureHeights, BeamPictureReaches, BeamPictureWidths, BgmFadeRequested, BgmRestoreDelay, BgTileBuffer, BilibinCratesPushMetatiles, BitDecoderSize, BladeRainSwordHeights, BladeRainSwordWidths, BlankCreditLine, BoltCounts, BoltGlintFlips, BoltGlintModes and 922 more.
Definition at line 16 of file types.h.
Sint8
typedef signed char Sint8;
Referenced by AltinPeakPaletteScript, ArticleA, ArticleAn, ArticleDas, 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, BattleEffectAtalantaPath, BattleEffectDragonCloudFlamePath, BattleFormationCenteredOffsets, BattleHighlightBlendRamp, BattlePlacementSpots, BoreasShakeOffsets, btAIChooseAction(), btBackgroundStepHighlightBlend(), btEffectRunAtalanta(), btEffectRunDragonCloud(), btEffectRunFroth(), btEffectRunGrowingColumns(), btEffectRunLobbedShells(), btEffectRunThorn(), btEnemyClaimNameLetter(), btFormationSelectLevelMatchedCandidate(), btUnitBuildStatusFlags(), btUnitProcessActionEnd(), ColosseumNavampaMatchWallWedgeCycle, dbIncreaseItemAndLevelSelectAbility() and 105 more.
Definition at line 17 of file types.h.
Uint16
typedef unsigned short Uint16;
Referenced by AltinArmorShopDoorMetatiles, AltinCliffHouseAndWeaponShopDoorMetatiles, AltinEastHouseDoorMetatiles, AltinInnDoorMetatiles, AltinItemShopDoorMetatiles, AltinPeakFlickerTimer, AltinSanctumDoorMetatiles, AltinSouthHouseDoorMetatiles, BabiPalaceDoorMetatiles, BattleEffectFlarePictures, BattleEffectGlintPictures, BattleEffectMotePictures, BattleEffectPuffArcPictures, BattleEffectSparklePictures, BattleFormationExcludedEnemies, BattleUnitWeaponAnimationsGaret, BattleUnitWeaponAnimationsIsaac, BattleUnitWeaponAnimationsIvan, BattleUnitWeaponAnimationsJenna, BattleUnitWeaponAnimationsMia, BattleUnitWeaponKinds, BeamPictures, BgmTempoPitch, BgmTempoPitchStep, BgmTempoPitchTarget, BgmVolume, BgmVolumeStep, BgmVolumeTarget, BilibinDoorSteps, BilibinHouseEastDoorSteps, BilibinHouseNorthDoorSteps, BilibinHouseWestDoorSteps, BilibinInnDoorSteps, BilibinItemShopDoorSteps, BilibinSanctumDoorSteps, BilibinWeaponAndArmorShopDoorSteps, BladeRainSwordPictures, BlitterImmediatePowers, BlitterUnusedImmediatePowers, BoreasCrystalPictures, BoreasDebrisPictures, BoreasFallPictures, BoreasRisingCrystalPictures, BoreasSprayPictures, btAbilityApplyToTarget(), btAbilityReplaceDefeated(), btActionRunBuild(), btAIChooseRandomTarget(), btAIChooseTarget(), btAutoBattleBuildActions() and 624 more.
Definition at line 18 of file types.h.
Sint16
typedef signed short Sint16;
Referenced by ActorScriptEndScriptTail, AltinPeakPaletteHold, AltinPeakPaletteStep, BattleUnusedCharacterPortraits, BattleUnusedSpritePortraits, BilibinDoorMetatiles, BilibinTreasuryRegions, btAbilityApplyToTarget(), btAbilityReplaceDefeated(), btAIChooseAction(), btAIChooseRandomTarget(), btAIChooseTarget(), btAwardSpoils(), btBuildEnemyActions(), btCameraSetRange(), btCameraUpdate(), btEffectBuildCenteredIndexList(), btEffectConvertBackgroundToBlueRamp(), btEffectRunShatteringOpening(), btEffectRunSparkGroups(), btEffectRunThor(), btEffectShowLivingTargets(), btEnemyList(), btFindUnitPlace(), btFleeCheckSuccess(), btFleePlayRun(), btHighlightClearAllSpriteModes(), btHighlightSetModes(), btHighlightSetOtherSpriteModes(), btIntroAnnounceEncounter(), btObjectPut(), btObjectPutKeepingPoses(), btObjectSpawnObjectsForList(), btPlacementContainsId(), btRun(), btStagingRunAttack(), btStagingRunFlee(), btStagingRunPsynergyCast(), btUnitGetWeaponKind(), btUnitListLiving(), BupSlot, CharacterChildSpriteTable, CharacterSpriteTable, ColossoLetteringDigit, ColossoLetteringFadeStart, ColossoLetteringFadeStep, ColossoLetteringFadeTarget, ColossoLetteringGo, ColossoLetteringLose, ColossoLetteringMode and 295 more.
Definition at line 19 of file types.h.
Uint32
typedef unsigned int Uint32;
Referenced by AbilityBattleEffects, AlpineCrossingLamaTempleExits, AltinExits, AltinPeakExits, AltmillerCaveExits, AltmillerCavePulseScales, BabiLighthouseExits, BabiPalaceExits, BalancePlatformHeights, BattleArenaAskCalls, BattleArenaExits, BattleEffectAdditiveForward(), BattleEffectAdditiveReverse(), BattleEffectColorForward(), BattleEffectColorReverse(), BattleEffectCopyForward(), BattleEffectCopyReverse(), BattleEffectMask(), BattleEffectMax4Forward(), BattleEffectMax4Reverse(), BattleEffectMaxForward(), BattleEffectMaxReverse(), BattleEffectTransparent8Forward(), BattleEffectTransparent8Reverse(), BattleEffectTransparentForward(), BattleEffectTransparentReverse(), BattleTablesUnusedWord, BilibinCaveExits, BilibinExits, BlitterTemplate, btAbilityApplyToTarget(), btAbilityIsPsynergy(), btAIChooseAction(), btAIChooseTarget(), btAppendLinkedActions(), btAutoBattleApplyDamage(), btAutoBattleRunPsynergy(), btAwardSpoils(), btBackgroundSetMode(), btBackgroundSetPaletteLevel(), btBuildEnemyActions(), btCameraSetCommandView(), btCameraSetRange(), btCameraSetView(), btCameraSetViewAtDepth(), btCameraShake(), btCameraUpdate(), btDebugBattleViewMessages(), btDjinnCountStandby(), btEffectArmBg2AffineHBlankDMA() and 950 more.
Definition at line 20 of file types.h.
Sint32
typedef signed int Sint32;
Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorDefaultScript, ActorFaceWatchedScript, ActorIdleScript, ActorKeyCheckScript, ActorKeysScript, ActorLaunchScript, ActorPlayerScript, ActorScriptCycleTable, ActorScriptEndScript, ActorStepAngleScript, ActorTrembleScript, ActorUnusedCameraScript, ActorWaitScript, ActorWorldMapScript, AlpineCrossingActorPlacements, AlpineCrossingFeizhiPath, AlpineCrossingHsuStruggle, AlpineCrossingLeaderPath, AlpineCrossingWorkerActorPlacementScript, AltinPeakBoulderPath, AltinPeakDebrisScript, AltinPeakFaceLeaderScript, AltinPeakGaretScript, AltinPeakIvanScript, AltinPeakLeaderFleePath, AltinPeakMiaScript, AltinPeakPuddleGrowScript, AltinPeakRejoinScript, AltinPeakRumbleTicks, AltinPeakSpitDirection, AltinPeakSpitOrigin, AltinPeakStatueSinkScript, AltmillerCaveBabiLeavePath, AltmillerCaveFirstGuardLeavePath, AltmillerCaveGuardsArrivePath, AltmillerCaveSecondGuardLeavePath, BabiLighthouseEntryActorPlacements, BabiLighthouseTrembleScript, BabiPalaceActorPlacementsBabiMissing, BabiPalaceIndigestionScript, BattleArenaSlotValues, BattleArenaWaitTicks, BattleHighlightUnusedWords, BattleKnockbackDistancePercent, BattleKnockbackUnusedWords, BattleObjectEmptyScript, BattleRandomSeed, BeaconRiseStep and 3207 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;
Referenced by syMulFX().
Definition at line 23 of file types.h.
Bool
typedef int Bool;
Referenced by btAbilityEffectAppliesToDowned(), btActionRunBuild(), btDebugParamSetLoad(), btDjinnRecoveryCountDown(), btFleeCheckSuccess(), btFleePlayRun(), btFormationBuildEnemyList(), btPlacementContainsId(), btSpriteIsSmall(), btStagingDispatchAction(), btStagingRunAttack(), btStagingRunFlee(), btUnitCountDownAgilityStage(), btUnitCountDownAttackStage(), btUnitCountDownPsynergySeal(), btUnitCountDownReflect(), btUnitCountDownRegenerate(), btUnitRollCounterEarlyEnd(), fdActorApproachWatchedActor(), fdActorIsTargetUnset(), fdActorScriptInvokeCallback(), fdActorScriptWaitForArrival(), fdActorWander(), fdExamineMetatile(), fdHasPsynergyCue(), fdIsRevealActive(), fdScriptAskYesNoWithActorAnimation(), fdSpriteComposePicture(), fdTalkToActor(), fdUsePsynergy(), gmBattleAbilityIsWeakToEffect(), gmBattleIsReviveEffect(), gmBattleUnitSet(), gmDjinnCanSet(), gmDjinnRecoveryRemove(), gmFlagGet(), gmPartyInventoryHasSpace(), gmUnitKnowsPsynergy(), mnBattleDjinnMenuRun(), mnBattleRefuseFlee(), mnColossoMenuChoose(), mnDebugBrowserIcons(), mnDebugBrowserPortraits(), mnDjinnMenuRunPreview(), mnDjinnMenuRunScreen(), mnDjinnMenuSelectDjinn(), mnDjinnMenuShowMemberStatus(), mnFileListSelectAction(), mnFileListSelectFile(), mnItemIconCompose() and 81 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.
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;
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.