Struct eos_rs::api::ground_mode::GroundModeContext   
source · pub struct GroundModeContext(_);Expand description
Misc. and general ground mode functions, guarded by this struct.
Implementations§
source§impl GroundModeContext
 
impl GroundModeContext
sourcepub unsafe fn script_special_process_call(
    &mut self,
    param_1: *mut undefined4,
    id: SpecialProcessId,
    arg1: i32,
    arg2: i32
) -> i32
 
pub unsafe fn script_special_process_call( &mut self, param_1: *mut undefined4, id: SpecialProcessId, arg1: i32, arg2: i32 ) -> i32
Processes calls to the ScriptOpcodeId::OPCODE_PROCESS_SPECIAL script opcode.
Returns result value of the special process if it has one, otherwise 0.
Some built-in special processes include:
SpecialProcessId::SPECIAL_PROC_KEY_WAIT_INIT:gameplay::key_wait_initSpecialProcessId::SPECIAL_PROC_IS_BAG_FULL:items::InventoryBag::is_fullSpecialProcessId::SPECIAL_PROC_COUNT_ITEM_TYPE_IN_BAG:items::InventoryBag::count_item_typeSpecialProcessId::SPECIAL_PROC_ADD_ITEM_TO_BAG:items::InventoryBag::add_itemSpecialProcessId::SPECIAL_PROC_0x39:items::InventoryStorage::is_fullSpecialProcessId::SPECIAL_PROC_COUNT_ITEM_TYPE_IN_STORAGE:items::InventoryStorage::count_item_typeSpecialProcessId::SPECIAL_PROC_0x2A:items::InventoryStorage::remove_itemSpecialProcessId::SPECIAL_PROC_ADD_ITEM_TO_STORAGE:items::InventoryStorage::add_itemSpecialProcessId::SPECIAL_PROC_INIT_MAIN_TEAM_AFTER_QUIZ:gameplay::init_main_team_after_quizSpecialProcessId::SPECIAL_PROC_0x3:gameplay::script_special_process_3SpecialProcessId::SPECIAL_PROC_0x4:gameplay::script_special_process_4SpecialProcessId::SPECIAL_PROC_0x3A:gameplay::AdventureLog::increment_number_dungeons_clearedSpecialProcessId::SPECIAL_PROC_0x3B:gameplay::AdventureLog::increment_number_of_big_treasure_winsSpecialProcessId::SPECIAL_PROC_SEND_SKY_GIFT_TO_GUILDMASTER:gameplay::AdventureLog::increment_number_of_gifts_sentSpecialProcessId::SPECIAL_PROC_SET_TEAM_SETUP_HERO_AND_PARTNER_ONLY:gameplay::set_team_setupSpecialProcessId::SPECIAL_PROC_SET_TEAM_SETUP_HERO_ONLY:gameplay::set_team_setupSpecialProcessId::SPECIAL_PROC_IS_TEAM_SETUP_SOLO:gameplay::count_party_membersSpecialProcessId::SPECIAL_PROC_GET_SOS_MAIL_COUNT:gameplay::get_sos_mail_countSpecialProcessId::SPECIAL_PROC_DUNGEON_HAD_REQUEST_DONE:gameplay::dungeon_had_request_doneSpecialProcessId::SPECIAL_PROC_0x3D:gameplay::script_special_process_x3dSpecialProcessId::SPECIAL_PROC_0x3E:gameplay::script_special_process_x3eSpecialProcessId::SPECIAL_PROC_0x17:gameplay::script_special_process_x17SpecialProcessId::SPECIAL_PROC_COUNT_TABLE_ITEM_TYPE_IN_BAG:gameplay::item_at_table_idxSpecialProcessId::SPECIAL_PROC_PREPARE_MENU_ACCEPT_TEAM_MEMBER:Self::prepare_menu_accept_team_memberSpecialProcessId::SPECIAL_PROC_INIT_RANDOM_NPC_JOBS:Self::init_random_npc_jobsSpecialProcessId::SPECIAL_PROC_GET_RANDOM_NPC_JOB_TYPE:Self::get_random_npc_job_typeSpecialProcessId::SPECIAL_PROC_GET_RANDOM_NPC_JOB_SUBTYPE:Self::get_random_npc_job_subtypeSpecialProcessId::SPECIAL_PROC_GET_RANDOM_NPC_JOB_STILL_AVAILABLE:Self::is_random_npc_job_still_availableSpecialProcessId::SPECIAL_PROC_ACCEPT_RANDOM_NPC_JOB:Self::accept_random_npc_jobSpecialProcessId::SPECIAL_PROC_RETURN_DUNGEON:Self::return_dungeonSpecialProcessId::SPECIAL_PROC_NEXT_DAY:Self::next_daySpecialProcessId::SPECIAL_PROC_JUMP_TO_TITLE_SCREEN:Self::jump_to_title_screenSpecialProcessId::SPECIAL_PROC_0x1A:Self::jump_to_title_screenSpecialProcessId::SPECIAL_PROC_RETURN_TO_TITLE_SCREEN:Self::return_to_title_screenSpecialProcessId::SPECIAL_PROC_0x16:Self::script_special_process_x16SpecialProcessId::SPECIAL_PROC_STATUS_UPDATE:Self::status_update
Arguments
param_1- some struct containing a callback of some sort, only used for special process ID 18id- special process IDarg1- first argument, if relevant? Probably corresponds to the second parameter ofScriptOpcodeId::OPCODE_PROCESS_SPECIALarg2- second argument, if relevant? Probably corresponds to the third parameter ofScriptOpcodeId::OPCODE_PROCESS_SPECIAL
Safety
The caller must make sure the undefined params are valid for this function.
sourcepub unsafe fn get_special_recruitment_species(
    &self,
    index: i32
) -> MonsterSpeciesId
 
pub unsafe fn get_special_recruitment_species( &self, index: i32 ) -> MonsterSpeciesId
Implements SPECIAL_PROC_PREPARE_MENU_ACCEPT_TEAM_MEMBER.
idx is an index into the RECRUITMENT_TABLE_SPECIES.
sourcepub unsafe fn init_random_npc_jobs(
    &mut self,
    job_type: i32,
    param_2: undefined2
)
 
pub unsafe fn init_random_npc_jobs( &mut self, job_type: i32, param_2: undefined2 )
sourcepub fn get_random_npc_job_type(&self) -> i32
 
pub fn get_random_npc_job_type(&self) -> i32
Implements SPECIAL_PROC_GET_RANDOM_NPC_JOB_TYPE.
sourcepub fn get_random_npc_job_subtype(&self) -> i32
 
pub fn get_random_npc_job_subtype(&self) -> i32
Implements SPECIAL_PROC_GET_RANDOM_NPC_JOB_SUBTYPE.
sourcepub fn is_random_npc_job_still_available(&self) -> bool
 
pub fn is_random_npc_job_still_available(&self) -> bool
Implements SPECIAL_PROC_GET_RANDOM_NPC_JOB_STILL_AVAILABLE.
sourcepub fn accept_random_npc_job(&mut self) -> bool
 
pub fn accept_random_npc_job(&mut self) -> bool
Implements SPECIAL_PROC_ACCEPT_RANDOM_NPC_JOB.
sourcepub fn return_dungeon(&mut self)
 
pub fn return_dungeon(&mut self)
Implements SPECIAL_PROC_RETURN_DUNGEON.
sourcepub fn jump_to_title_screen(&mut self, arg: i32) -> bool
 
pub fn jump_to_title_screen(&mut self, arg: i32) -> bool
Fades the screen out and throws the player to the title screen.
Implements SPECIAL_PROC_JUMP_TO_TITLE_SCREEN and SPECIAL_PROC_0x1A.
arg is argument value for SPECIAL_PROC_JUMP_TO_TITLE_SCREEN and -1
for SPECIAL_PROC_0x1A. It is probably the screen fade out time…?
sourcepub fn return_to_title_screen(&mut self, fade_duration: u32) -> bool
 
pub fn return_to_title_screen(&mut self, fade_duration: u32) -> bool
Fades the screen out and throws the player to the title screen.
Implements SPECIAL_PROC_RETURN_TO_TITLE_SCREEN.
sourcepub fn script_special_process_x16(&mut self, param_1: bool)
 
pub fn script_special_process_x16(&mut self, param_1: bool)
Implements SPECIAL_PROC_0x16.
sourcepub fn status_update(&mut self)
 
pub fn status_update(&mut self)
Implements SPECIAL_PROC_STATUS_UPDATE.
sourcepub fn get_alloc_arena_ground(
    &self,
    arena: *mut mem_arena,
    flags: u32
) -> *mut mem_arena
 
pub fn get_alloc_arena_ground( &self, arena: *mut mem_arena, flags: u32 ) -> *mut mem_arena
Returns the memory allocation arena for ground mode.
You can use this with crate::allocation::EoSCustomAllocator.
Parameters
size- initial memory arena pointer, or null.flags-MemAllocflags.
sourcepub fn get_free_arena_ground(
    &self,
    arena: *mut mem_arena,
    flags: u32
) -> *mut mem_arena
 
pub fn get_free_arena_ground( &self, arena: *mut mem_arena, flags: u32 ) -> *mut mem_arena
Returns the memory freeing arena for ground mode.
You can use this with crate::allocation::EoSCustomAllocator.
Parameters
size- initial memory arena pointer, or null.flags-MemAllocflags.
sourcepub unsafe fn load_background_attributes(
    &mut self,
    output: *mut c_char,
    bg_id: i32
)
 
pub unsafe fn load_background_attributes( &mut self, output: *mut c_char, bg_id: i32 )
No description available.
Note: unverified, ported from Irdkwia’s notes
Safety
Passes the pointers to the game’s function, unchecked.
sourcepub unsafe fn load_map_type_10(
    &mut self,
    buf: *mut c_void,
    map_id: i32,
    dungeon_info_str: *mut undefined,
    additional_info: undefined4
)
 
pub unsafe fn load_map_type_10( &mut self, buf: *mut c_void, map_id: i32, dungeon_info_str: *mut undefined, additional_info: undefined4 )
No description available.
Note: unverified, ported from Irdkwia’s notes
Safety
Passes the pointers to the game’s function, unchecked. Contains undefined parameters.
sourcepub unsafe fn load_map_type_11(
    &mut self,
    buf: *mut c_void,
    map_id: i32,
    dungeon_info_str: *mut undefined,
    additional_info: undefined4
)
 
pub unsafe fn load_map_type_11( &mut self, buf: *mut c_void, map_id: i32, dungeon_info_str: *mut undefined, additional_info: undefined4 )
No description available.
Note: unverified, ported from Irdkwia’s notes
Safety
Passes the pointers to the game’s function, unchecked. Contains undefined parameters.
sourcepub unsafe fn get_special_layout_background(
    &mut self,
    bg_id: i32,
    dungeon_info_str: *mut undefined,
    additional_info: undefined4,
    copy_fixed_room_layout: bool
)
 
pub unsafe fn get_special_layout_background( &mut self, bg_id: i32, dungeon_info_str: *mut undefined, additional_info: undefined4, copy_fixed_room_layout: bool )
No description available.
Note: unverified, ported from Irdkwia’s notes
Safety
Passes the pointers to the game’s function, unchecked. Contains undefined parameters.