mirror of
https://github.com/pret/pmd-sky.git
synced 2026-08-24 11:35:06 -05:00
Merge pull request #193 from slaw-22/HasPlayedOldGame
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
Decomp HasPlayedOldGame
This commit is contained in:
@@ -1,4 +1,27 @@
|
||||
#pragma once
|
||||
.public AddMoneyCarried
|
||||
.public DEBUG_SPECIAL_EPISODE_NUMBER
|
||||
.public Debug_FatalError
|
||||
.public Debug_Print
|
||||
.public Debug_Print0
|
||||
.public GAME_MODE
|
||||
.public GetGameMode
|
||||
.public GetLanguageType
|
||||
.public GetMoneyCarried
|
||||
.public GetMoneyStored
|
||||
.public GetNotifyNote
|
||||
.public GetPartyMembers
|
||||
.public InitDungeonListScriptVars
|
||||
.public InitWorldMapScriptVars
|
||||
.public MemcpySimple
|
||||
.public RandInt
|
||||
.public SCRIPT_VARS
|
||||
.public SCRIPT_VARS_LOCALS
|
||||
.public SCRIPT_VARS_VALUES
|
||||
.public ScenarioFlagBackup
|
||||
.public SetMoneyCarried
|
||||
.public SetMoneyStored
|
||||
.public SetNotifyNote
|
||||
.public _0209CEAC
|
||||
.public _0209CF0C
|
||||
.public _0209CF28
|
||||
@@ -7,52 +30,5 @@
|
||||
.public _0209CF84
|
||||
.public _0209DF70
|
||||
.public _0209DFA0
|
||||
.public _0209DFC8
|
||||
.public _0209DFE8
|
||||
.public _0209E008
|
||||
.public _0209E010
|
||||
.public _0209E011
|
||||
.public _s32_div_f
|
||||
.public AddMoneyCarried
|
||||
.public ARM9_UNKNOWN_TABLE__NA_209E164
|
||||
.public CopyBitsFrom
|
||||
.public CopyBitsTo
|
||||
.public Debug_FatalError
|
||||
.public Debug_Print
|
||||
.public Debug_Print0
|
||||
.public DEBUG_SPECIAL_EPISODE_NUMBER
|
||||
.public FemaleToMaleForm
|
||||
.public FileClose
|
||||
.public FileRom_HandleOpen
|
||||
.public FileRom_HandleRead
|
||||
.public FileRom_HandleSeek
|
||||
.public FileRom_InitDataTransfer
|
||||
.public FileRom_StopDataTransfer
|
||||
.public FileRom_Veneer_FileInit
|
||||
.public GAME_MODE
|
||||
.public GetDexNumber
|
||||
.public GetGameMode
|
||||
.public GetLanguageType
|
||||
.public GetMoneyCarried
|
||||
.public GetMoneyStored
|
||||
.public GetNotifyNote
|
||||
.public GetPartyMembers
|
||||
.public GLOBAL_PROGRESS_PTR
|
||||
.public KAOMADO_FILEPATH
|
||||
.public KAOMADO_STREAM
|
||||
.public MemAlloc
|
||||
.public MemcpySimple
|
||||
.public MemZero
|
||||
.public PORTRAIT_LAYOUTS
|
||||
.public RandInt
|
||||
.public SCRIPT_VARS
|
||||
.public SCRIPT_VARS_LOCALS
|
||||
.public SCRIPT_VARS_VALUES
|
||||
.public SetAdventureLogCompleted
|
||||
.public SetMoneyCarried
|
||||
.public SetMoneyStored
|
||||
.public SetNotifyNote
|
||||
.public sub_02050974
|
||||
.public sub_02050990
|
||||
.public sub_020509BC
|
||||
.public VERSION_EXCLUSIVE_MONSTERS
|
||||
.public sub_0204CBE8
|
||||
|
||||
36
asm/include/main_0204CA94.inc
Normal file
36
asm/include/main_0204CA94.inc
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
.public ARM9_UNKNOWN_TABLE__NA_209E164
|
||||
.public CopyBitsFrom
|
||||
.public CopyBitsTo
|
||||
.public Debug_Print0
|
||||
.public FemaleToMaleForm
|
||||
.public FileClose
|
||||
.public FileRom_HandleOpen
|
||||
.public FileRom_HandleRead
|
||||
.public FileRom_HandleSeek
|
||||
.public FileRom_InitDataTransfer
|
||||
.public FileRom_StopDataTransfer
|
||||
.public FileRom_Veneer_FileInit
|
||||
.public GLOBAL_PROGRESS_PTR
|
||||
.public GetDexNumber
|
||||
.public GetGameMode
|
||||
.public KAOMADO_FILEPATH
|
||||
.public KAOMADO_STREAM
|
||||
.public LoadScriptVariableValue
|
||||
.public LoadScriptVariableValueAtIndex
|
||||
.public MemAlloc
|
||||
.public MemZero
|
||||
.public PORTRAIT_LAYOUTS
|
||||
.public SaveScriptVariableValue
|
||||
.public SaveScriptVariableValueAtIndex
|
||||
.public SetAdventureLogCompleted
|
||||
.public VERSION_EXCLUSIVE_MONSTERS
|
||||
.public ZinitScriptVariable
|
||||
.public _0209DFC8
|
||||
.public _0209DFE8
|
||||
.public _0209E008
|
||||
.public _0209E010
|
||||
.public _0209E011
|
||||
.public sub_02050974
|
||||
.public sub_02050990
|
||||
.public sub_020509BC
|
||||
1262
asm/main_0204B018.s
1262
asm/main_0204B018.s
File diff suppressed because it is too large
Load Diff
1253
asm/main_0204CA94.s
Normal file
1253
asm/main_0204CA94.s
Normal file
File diff suppressed because it is too large
Load Diff
8
include/dungeon_recruitment_3.h
Normal file
8
include/dungeon_recruitment_3.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef PMDSKY_DUNGEON_RECRUITMENT_3_H
|
||||
#define PMDSKY_DUNGEON_RECRUITMENT_3_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
bool8 HasPlayedOldGame();
|
||||
|
||||
#endif //PMDSKY_DUNGEON_RECRUITMENT_3_H
|
||||
@@ -2961,4 +2961,8 @@ enum dungeon_restriction_flags {
|
||||
// Remaining flags are unused
|
||||
};
|
||||
|
||||
enum script_variables {
|
||||
PLAYED_OLD_GAME = 0x6f
|
||||
};
|
||||
|
||||
#endif //PMDSKY_ENUMS_H
|
||||
|
||||
2
main.lsf
2
main.lsf
@@ -77,6 +77,8 @@ Static main
|
||||
Object asm/main_0203C774.o
|
||||
Object src/main_0204AFF8.o
|
||||
Object asm/main_0204B018.o
|
||||
Object src/dungeon_recruitment_3.o
|
||||
Object asm/main_0204CA94.o
|
||||
Object src/main_0204DA2C.o
|
||||
Object asm/main_0204DB08.o
|
||||
Object src/main_0204DD80.o
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "dungeon_pokemon_attributes_1.h"
|
||||
#include "dungeon_recruitment.h"
|
||||
#include "dungeon_recruitment_2.h"
|
||||
#include "dungeon_recruitment_3.h"
|
||||
#include "dg_random.h"
|
||||
#include "dungeon_visibility.h"
|
||||
#include "enums.h"
|
||||
@@ -19,7 +20,6 @@ extern bool8 IsCurrentMissionTypeExact(u32 mission_type, u32 mission_subtype);
|
||||
extern bool8 IsMonsterOnTeam(s16 monsterId, s32 checkType);
|
||||
extern void ov29_022E1B28(s32);
|
||||
extern void ov29_022E81F8(void);
|
||||
extern bool8 HasPlayedOldGame(void);
|
||||
extern s32 GetFirstEmptyMemberIdx(u32);
|
||||
|
||||
extern const s16 FRIEND_BOW_FAST_FRIEND_BOOST;
|
||||
|
||||
14
src/dungeon_recruitment_3.c
Normal file
14
src/dungeon_recruitment_3.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "dungeon_recruitment_3.h"
|
||||
#include "enums.h"
|
||||
#include "util.h"
|
||||
|
||||
extern bool8 LoadScriptVariableValue(u8 local_var_table_ptr, u8 script_variable_id);
|
||||
|
||||
bool8 HasPlayedOldGame()
|
||||
{
|
||||
if(LoadScriptVariableValue(0, PLAYED_OLD_GAME)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user