Sonic Adventure DX: PC/EXE Editing/Function List
From Sonic Retro
The following is a list of functions in the US version of sonic.exe. For the EU version, adding $50 to the address usually works. All values are in hex unless explicitly specified otherwise.
Address | Size | Label | Description | Arguments | Returns |
---|---|---|---|---|---|
25B0 | 8AD | CheckSettings | Checks settings in sonicDX.ini and checks for CD in drive. | None | Nothing |
3070 | 19 | SetTextures | Sets the texture list to use when drawing models. | pointer to texture list header | Nothing |
B860 | D5 | ObjLoad | Loads an object. | unknown char, unknown char, pointer to object's code | pointer to master object struct for the loaded object, 0 if loading failed. |
C090 | 92D | GameMode | Runs different parts of the game based on the current game mode. | None | Nothing |
144D0 | C | SetCharacter | Sets the character value. | short character ID | Nothing |
144E0 | 8 | GetCurrentCharacterID | Returns the ID of the current character. | None | Current character ID |
14570 | 34 | SetLevelAndAct | Sets the level and act values, and stores the previous level and act values. | char level, char act | Nothing |
145B0 | 1A | SetNextLevelAndAct | Sets the level and act to use for the next area. | char level, char act | Nothing |
14610 | 35 | GoToNextLevel | Sets the current level and act to the next level and act, and stores the previous level and act. | None | Nothing |
14650 | 13 | GetLevelAndAct | Returns the current level and act values as a short. | None | (level << 8) |
14670 | 13 | GetPrevLevelAndAct | Returns the previous level and act values as a short. | None | (prevlevel << 8) |
14690 | 13 | GetNextLevelAndAct | Returns the next level and act values as a short. | None | (nextlevel << 8) |
146B0 | 27 | IsLevelChaoGarden | Returns True (1) if the current level ID is 27, 28, 29, or 2A. | None | True (1) or False (0) |
147F0 | D | SetLevelEntrance | Sets the level entrance number. | char entrance number | Nothing |
14800 | 6 | GetLevelEntrance | Returns the level entrance number. | None | level entrance number |
157C0 | 1BC | CharLoad | Loads all the characters for the level. | None | Nothing |
23D70 | A9 | PlaySound | Plays a sound effect/voice clip. | int ID, int unknown, int unknown, int unknown | Unknown |
25690 | 18 | PlayMusic | Plays a song. | int song | 0 if music is disabled, song if music is enabled |
258F0 | 11 | GetDebugMode | Returns status of the debug mode flag. | None | 1 if debug is enabled, 0 otherwise |