Skip to Content
The Alchemy Project

include/game/system_call.h

The system call layer: an inline for each of the thirteen main-image functions below that the scene, menu and debug overlays import, which every overlay call of them goes through. More…

Included by test.c, lucky_dice.c, altin.c, bilibin_cave.c, file_screen.c, fuchin_temple.c, kalay.c, kolima_forest_floodgate.c, kolima_forest_tree.c, log_rooms_b.c, lunpa.c, mercury_lighthouse.c, mercury_lighthouse_aerie.c, mercury_lighthouse_entrance.c, lemurian_ship_ripple.c, pushed_actor.c, suhalla_desert.c, tret_tree_branch.c, vale_cave.c, vault_cave.c and script_inline.h.

Functions

NameDescription
static inline Sint32sySetTickEvent (EVENT_FUNC callback, Sint32 priority)Adds callback as an event of priority priority (EVENT_PASS_TICK runs it once a tick), or gives the event already running it that priority.
static inline voidscFieldMenuArrowCreate (MENU_SPR *cursor, Sint32 *slot)The overlays' names for the functions they import, each the function itself.
static inline voidscFieldMenuArrowSetPos (MENU_SPR *cursor, Sint32 x, Sint32 y)
static inline voidmnFieldMessageDecodeRawUnbounded (Sint32 msg, Uint16 *buf)
static inline voidfdSetCameraBounds (Sint32 minX, Sint32 minY, Sint32 maxX, Sint32 maxY)
static inline voidscFieldActorJumpDownLedge (Sint32 actorId, Sint32 mode, Sint32 action)
static inline Sint32scFieldActorCheckMovementCollision (ACTOR *actor, FIELD_POS *pos)
static inline Sint32scFieldGameFlagGetByte (Sint32 flag)
static inline voidscFieldGameFlagSetByte (Sint32 flag, Sint32 value)
static inline Sint32scFieldPartyListMembers (Sint16 *owners)
static inline Sint32scFieldUnitAddHp (Sint32 owner, Sint32 delta)
static inline Sint32scFieldDecompressTaggedLZ (const void *src, void *dest)Decodes a tagged LZ stream (a first byte of 0 or 1) from src into dest.
static inline voidfdLineScrollStartWave (Sint32 mode, Sint32 frequencyX, Sint32 stepX, Sint32 ampX, Sint32 frequencyY, Sint32 stepY, Sint32 ampY)

Description

The system call layer: an inline for each of the thirteen main-image functions below that the scene, menu and debug overlays import, which every overlay call of them goes through.

An overlay writes sySetTickEvent(callback, EVENT_PASS_TICK), and the inline calls sySetEvent through the overlay's import stub. Main-image code calls the functions by their own names, except in scene/shared/lemurian_ship_ripple.c, which field/script_commands_line_scroll.c includes as lemurian_ship.c does. script_inline.h includes this layer; a room without the script commands includes it itself.

Functions in detail

sySetTickEvent

static inline Sint32 sySetTickEvent(EVENT_FUNC callback, Sint32 priority)

Adds callback as an event of priority priority (EVENT_PASS_TICK runs it once a tick), or gives the event already running it that priority.

References Sint32 and sySetEvent().

Referenced by scAltinApplyWaterLevel(), scAltinPeakCelebrateHydrosVictory(), scAltinPeakRestoreSpritzRoom(), scAltinPeakRunBoulderChase(), scAltinPeakStartHydrosBattle(), scAltinPeakStartPaletteAnimation(), scAltinPeakStartSpittingFX(), scAltmillerCaveTurnRock(), scBattleArenaEnterBattle(), scColosseumAzartMatchStartBrokenBridge(), scColosseumNavampaMatchPlayPostBattleReunion(), scColosseumNavampaMatchStartWallWedge(), scColosseumSatrageMatchStartLifts(), scColosseumSatrageMatchStartOpponentPath(), scColosseumSatrageMatchStartRaceGauge(), scColossoMovePointer(), scColossoShowPointer(), scColossoStartLettering(), scColossoStartOpponent(), scColossoStartRaceGauge(), scCottageRoomsAGaretComesHome(), scCrossboneIsleKeysInitBane(), scCrossboneIsleKeysInitStatues(), scCrossboneIsleSteppingStonesAnimateWaterLevel(), scCrossboneIsleSteppingStonesFreezeThirdPuddle(), scFuchinFallsCaveLightDragonWithEye(), scFuchinTempleEnterWaterfallGrotto(), scGomaCavePillarPushStumpOver(), scHeatGaugeStart(), scInit(), scKalayPrepareTown(), scKalayPrepareTunnelTreasureRoom(), scKalayStartGuidesPacing(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestFloodgateFlipFloodgateSwitch(), scKolimaForestTreeRejectHermesWater(), scKolimaForestTreeRestoreTret(), scKolimaWitnessForestCurse(), scLemurianShipRaiseTheShip(), scLemurianShipStartCurtains(), scLineScrollInitWave(), scLogRoomsAApproachSuspects(), scLogRoomsAReadCorneredSuspectsMinds(), scLunpaFortressInitGroundFloor(), scLunpaFortressInitUpperFloor(), scLunpaGuardsCatchParty(), scLunpaGuardsThrowIsaacOut(), scLunpaRevealSecrets(), scMercuryLighthouseEntranceActivateWithPly(), scMercuryLighthousePushLeaderOutOfSpout() and 42 more.

Definition at line 28 of file system_call.h.

scFieldMenuArrowCreate

static inline void scFieldMenuArrowCreate(MENU_SPR *cursor, Sint32 *slot)

The overlays' names for the functions they import, each the function itself.

References mnArrowCreate() and Sint32.

Referenced by scSanctumChooseRestartOption().

Definition at line 34 of file system_call.h.

scFieldMenuArrowSetPos

static inline void scFieldMenuArrowSetPos(MENU_SPR *cursor, Sint32 x, Sint32 y)

References mnArrowSetPos() and Sint32.

Referenced by scSanctumChooseRestartOption().

Definition at line 39 of file system_call.h.

mnFieldMessageDecodeRawUnbounded

static inline void mnFieldMessageDecodeRawUnbounded(Sint32 msg, Uint16 *buf)

References mnMessageDecodeRawUnbounded() and Sint32.

Referenced by scBattleArenaReceivePartyRecords().

Definition at line 44 of file system_call.h.

fdSetCameraBounds

static inline void fdSetCameraBounds(Sint32 minX, Sint32 minY, Sint32 maxX, Sint32 maxY)

References fdMapGridSetCameraBounds() and Sint32.

Referenced by scLogRoomsADiscussMindReading() and scLogRoomsASpreadOutToCornerSuspects().

Definition at line 49 of file system_call.h.

scFieldActorJumpDownLedge

static inline void scFieldActorJumpDownLedge(Sint32 actorId, Sint32 mode, Sint32 action)

References fdActorJumpDownLedge() and Sint32.

Referenced by scBabiLighthouseJumpIntoPit(), scColosseumNavampaMatchShovedOffWalkway(), scColosseumSatrageMatchJumpDownFromPost(), scColosseumSatrageMatchTalkToWallAttendant(), scCrossboneIsleKeysTouchThirdPillar(), scMercuryLighthouseJumpDownPastCrystal(), scTunnelRuinsJumpDownLedge() and scVenusLighthouseEnterRisingPassage().

Definition at line 55 of file system_call.h.

scFieldActorCheckMovementCollision

static inline Sint32 scFieldActorCheckMovementCollision(ACTOR *actor, FIELD_POS *pos)

References fdMapGridCheckCollision() and Sint32.

Referenced by scAltmillerCaveCheckPuddleCovered(), scAltmillerCaveHopOverPuddle(), scBilibinCavePushTorch(), scBilibinPushStatueOrCrates(), scColossoPushActorAhead(), scCrossboneIsleSteppingStonesMovePillar(), scCrossboneIsleSteppingStonesTryJumpAcrossPillar(), scCrossboneIsleTryHop(), scKalayPushTunnelStatue(), scKolimaForestHopTo(), scLamakanDesertSlipDownSand(), scLogRoomsATryJumpTo(), scMercuryLighthouseAerieJumpToNextPlatform(), scMercuryLighthouseHopAcrossPool(), scMogallForestTryJumpLeaderTo(), scPushedActorAdvancePair(), scPushedActorFindClearPos(), scPushedActorStopBlockedMotion(), scShipRoomsIsSpotFree(), scSolSanctumEntrancePushStatue(), scTunnelRuinsHopLeaderTo(), scValeCaveLeapOffRidingLog(), scVaultCavePushPillarAhead(), scVenusLighthouseAerieJumpToNextPlatform(), scVenusLighthouseDriftLeader(), scVenusLighthouseJumpAcrossGap(), scVenusLighthousePushPillarAhead() and scXianJumpOverSpilledWater().

Definition at line 61 of file system_call.h.

scFieldGameFlagGetByte

static inline Sint32 scFieldGameFlagGetByte(Sint32 flag)

References gmFlagGetByte() and Sint32.

Referenced by scColossoPlaceFriendsAtCheeringSpots(), scInit(), scSuhallaDesertStormCarriesPartyAway(), scSuhallaDesertUpdateCaptureTimer() and scWorldMapUpdateStormTimer().

Definition at line 67 of file system_call.h.

scFieldGameFlagSetByte

static inline void scFieldGameFlagSetByte(Sint32 flag, Sint32 value)

References gmFlagSetByte() and Sint32.

Referenced by scBattleArenaChooseBattleMode(), scBattleArenaExchangePartyRecords(), scColosseumAzartMatchUpdateRockMetatiles(), scColosseumNavampaMatchMoveStone(), scColosseumSatrageMatchMoveMiniMazePillar(), scColossoAskDoneCheering(), scColossoClearCheeringSpots(), scColossoOfferCheeringSpot(), scColossoTakePlaceForMatch(), scInit(), scSuhallaDesertCatchInStorm(), scSuhallaDesertDouseStorm(), scSuhallaDesertUpdateCaptureTimer(), scWorldMapCatchInStorm(), scWorldMapDouseMapStorm() and scWorldMapUpdateStormTimer().

Definition at line 72 of file system_call.h.

scFieldPartyListMembers

static inline Sint32 scFieldPartyListMembers(Sint16 *owners)

References gmPartyListMembers() and Sint32.

Referenced by dbIncreaseItemAndLevelRaisePartyLevels() and scBabiPalaceRestorePartyAndInventory().

Definition at line 77 of file system_call.h.

scFieldUnitAddHp

static inline Sint32 scFieldUnitAddHp(Sint32 owner, Sint32 delta)

References gmUnitAddHp() and Sint32.

Referenced by dbMenuTestDamageAndAfflictParty().

Definition at line 82 of file system_call.h.

scFieldDecompressTaggedLZ

static inline Sint32 scFieldDecompressTaggedLZ(const void *src, void *dest)

Decodes a tagged LZ stream (a first byte of 0 or 1) from src into dest.

References Sint32 and syDecompressTaggedLZ().

Referenced by fdLuckyDiceRun(), scColosseumSatrageMatchStartOpponentPath(), scColosseumSatrageMatchStartRaceGauge(), scColossoDrawGauge(), scColossoLoadLettering(), scColossoStartOpponent(), scColossoStartRaceGauge(), scFileScreenFillTileGridByWindowWidth(), scFileScreenLoadBackground(), scHeatGaugeStart(), scTitleLoadBackground(), scTitleLoadSprites() and scWorldMapPlayLighthouseTransition().

Definition at line 88 of file system_call.h.

fdLineScrollStartWave

static inline void fdLineScrollStartWave(Sint32 mode, Sint32 frequencyX, Sint32 stepX, Sint32 ampX, Sint32 frequencyY, Sint32 stepY, Sint32 ampY)

References scLineScrollInitWave() and Sint32.

Referenced by scRevealHideSecrets().

Definition at line 93 of file system_call.h.