|
| 1 | +# Summary |
| 2 | +Fatal Frame 1 uses an Atypical enum switch case design for modes of ingame functionality. |
| 3 | +As far as we are currently aware the modes are the same across versions. (`PAL, NTSC`) |
| 4 | +Ingame uses several structs to define and interact with the various logic throught the engine though most prolific is `ingame_wrk` |
| 5 | + |
| 6 | +# Modes |
| 7 | + |
| 8 | +### Ingame Work Modes |
| 9 | +<details> |
| 10 | +<summary>List Of INGAME MODE</summary> |
| 11 | +```c |
| 12 | +enum { |
| 13 | + INGAME_MODE_FIRST_LOAD = 0, |
| 14 | + INGAME_MODE_INIT = 1, |
| 15 | + INGAME_MODE_WAIT = 2, |
| 16 | + INGAME_MODE_NEW_GAME = 3, |
| 17 | + INGAME_MODE_LOAD_START = 4, |
| 18 | + INGAME_MODE_MSN_TITLE = 5, |
| 19 | + INGAME_MODE_NOMAL = 6, |
| 20 | + INGAME_MODE_EVENT = 7, |
| 21 | + INGAME_MODE_SPECIAL_EVENT = 8, |
| 22 | + INGAME_MODE_AREA_MOVE = 9, |
| 23 | + INGAME_MODE_MENU = 10, |
| 24 | + INGAME_MODE_PAUSE = 11, |
| 25 | + INGAME_MODE_SPD_MAP = 12, |
| 26 | + INGAME_MODE_SPD_OPT = 13, |
| 27 | + INGAME_MODE_GET_ITEM = 14, |
| 28 | + INGAME_MODE_WANDER_SOUL = 15, |
| 29 | + INGAME_MODE_SAVE_POINT = 16, |
| 30 | + INGAME_MODE_PHOTO_AFTER = 17, |
| 31 | + INGAME_MODE_GHOST_DEAD = 18, |
| 32 | + INGAME_MODE_SGST_DISP = 19, |
| 33 | + INGAME_MODE_GAME_OVER = 20, |
| 34 | + INGAME_MODE_GAME_OVER_ALBUM = 21, |
| 35 | + INGAME_MODE_INTER_MSN = 22, |
| 36 | + INGAME_MODE_ENDING = 23, |
| 37 | + INGAME_MODE_WAIT_MSN0 = 24 |
| 38 | +}; |
| 39 | +``` |
| 40 | +</details> |
| 41 | + |
| 42 | +## Process of Initalization |
| 43 | +The process of Initalization starts wtih mode `INGAME_MODE_INIT` |
| 44 | +Calls [InGameInit](https://decomp.me/scratch/8dB6u) |
| 45 | +Where all ingame engine initalization's occur prior to the title screen. |
| 46 | +Most notably loads Player data, preloads Model data, initalizes the event system |
| 47 | +And most other systems as well. |
| 48 | + |
| 49 | +Then we continue to `INGAME_MODE_MSN_TITLE` |
| 50 | +[InGameInit2](https://decomp.me/scratch/IJ5HJ) is called |
| 51 | +Stage data, Camera data, all rendering systes are loaded here. |
| 52 | +Memory Card data will have already been read prior to this being called and the player set into the scene. |
| 53 | + |
| 54 | +## Missions |
| 55 | + |
| 56 | +### Zero Hour |
| 57 | +Mafuyu, Miku's older brother is playable in this mode, and this mode only. |
| 58 | +Features it's own Battle System found mainly in `ap_zgost.c`, `ZeroHourAppearMain` being the main spawn logic for it. |
| 59 | +Appears to feature it's own physics logic that does not apply to Miku. |
| 60 | +Mission uses black and white filter effect over screen that is used throught many scenes of the game. |
| 61 | +Force activating the debug menu allows this filter to be turned on and off at a whim. |
| 62 | + |
| 63 | +### Miku Missions, Nights 1, 2, 3, 4 |
| 64 | +The main logic of the game. All Standard modes, battle functions, events, room transitions, etc apply here. |
| 65 | + |
| 66 | +- `INGAME_MODE_NORMAL`: |
| 67 | +The main game loop. Player control and gameplay stuff occurs in here. |
| 68 | +This will also check for the BattleModeGame if the player has previously completed this game and selected it. |
| 69 | + |
| 70 | +- `INGAME_MODE_EVENT`: |
| 71 | +Calls [EventMain](https://decomp.me/scratch/AvnAm) |
| 72 | +Event system is run here. Will be talked about in more detail in other documentation. |
| 73 | +Needless to say, this wrenches control from main game loop and subsuqently player. |
| 74 | + |
| 75 | +- `INGAME_MODE_SPECIAL_EVENT`: |
| 76 | +Special events consist of several different types and functions. |
| 77 | +Though most notable are the ingame puzzles |
| 78 | + |
| 79 | + - Star Puzzle (The Sliding Stone game) |
| 80 | + - Dial Key Door (The Number lock combination doors) |
| 81 | + - Doll Puzzle (Kaaggommee, Kaaggommee) - Used only a single time in Night 2 |
| 82 | + |
| 83 | +At least some of these have their own list of files on disc for hard coded puzzles. |
| 84 | +Each of these each have their own seperate game loop that takes inputs. |
0 commit comments