mirror of
https://github.com/zeldaret/st
synced 2026-08-22 06:44:36 -04:00
Decompile overlay 24 (Part 1) (#65)
* GameModeAdventure_001 OK * GameModeAdventure_024 17% * GameModeAdventure_024 73% * GameModeAdventure_024 99% * jp region differences * rename GameModeAdventure_024 and GameModeAdventure + UnkStruct_ov000_020d8660_024 OK * UnkActorSystem1OK * UnkActorSystem2 OK * delink more of ov024 & UnkStruct_027e0998_024 OK * improve instance stuff & UnkStruct_027e0cf8_024 OK * AdventureModeManager_160_024 OK & GameModeStartUp OK * fix regressions * fix regressions 2 * AdventureModeManager_170 OK * AdventureModeManager_174_Base OK * AdventureModeManager_174 OK * mark GameModeAdventure_024 as complete * AdventureModeManager_178 OK * AdventureModeManager_180 OK * AdventureModeManager_184_024 OK * AdventureModeManager_18C_024 OK & AdventureModeManager_190_024 OK * AdventureModeManager_15C_20_00 61% * AdventureModeManager_15C_20_00 OK * jp version differences * delink what's left in the overlay * fix regressions * AdventureModeManager_1B8_Base_024 98% * AdventureModeManager_1B8 48% and link AdventureModeManager_024 * AdventureModeManager_1B8_Base and AdventureModeManager_1B8 OK * oops * mark statics as local
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
//=================================================================================================
|
||||
/**
|
||||
* dsprot.h
|
||||
*
|
||||
* Header file for the DS Protect library
|
||||
* Version 1.23z
|
||||
*/
|
||||
//=================================================================================================
|
||||
|
||||
#ifndef DSPROT_H
|
||||
#define DSPROT_H
|
||||
|
||||
#define DSP_VERSION (123)
|
||||
#define DSP_VERSION_STR "1.23z"
|
||||
|
||||
#ifndef SDK_ASM
|
||||
|
||||
#ifndef DSP_NO_NITRO
|
||||
|
||||
#include <types.h> // For u32
|
||||
|
||||
#else /* DSP_NO_NITRO */
|
||||
|
||||
// Assumption for convenience-- make sure this is matching if you use it!
|
||||
typedef unsigned long __dsp_u32;
|
||||
#define u32 __dsp_u32
|
||||
|
||||
#endif /* DSP_NO_NITRO */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Detect if the current environment is a flashcart.
|
||||
*
|
||||
* @param callback Function to be called if the environment is determined to be a flashcart.
|
||||
* May be NULL.
|
||||
*
|
||||
* @return 1 if the environment is determined to be a flashcart, 0 otherwise
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectFlashcart(void *callback);
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Detect if the current environment is NOT a flashcart.
|
||||
*
|
||||
* @param callback Function to be called if the environment is determined to NOT be a flashcart.
|
||||
* May be NULL.
|
||||
*
|
||||
* @return 1 if the environment is determined to NOT be a flashcart, 0 otherwise
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectNotFlashcart(void *callback);
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Detect if the current environment is an emulator.
|
||||
*
|
||||
* @param callback Function to be called if the environment is determined to be an emulator.
|
||||
* May be NULL.
|
||||
*
|
||||
* @return 1 if the environment is determined to be an emulator, 0 otherwise
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectEmulator(void *callback);
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Detect if the current environment is NOT an emulator.
|
||||
*
|
||||
* @param callback Function to be called if the environment is determined to NOT be an emulator.
|
||||
* May be NULL.
|
||||
*
|
||||
* @return 1 if the environment is determined to NOT be an emulator, 0 otherwise
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectNotEmulator(void *callback);
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Dummy environment detection function that does not do anything. Will always fail.
|
||||
*
|
||||
* @param callback Dummy callback function which will never be called. May be NULL.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectDummy(void *callback);
|
||||
|
||||
//=================================================================================================
|
||||
/**
|
||||
* Dummy environment detection function that does not do anything. Will always succeed.
|
||||
*
|
||||
* @param callback Dummy callback function which will always be called. May be NULL.
|
||||
*
|
||||
* @return 1
|
||||
*/
|
||||
//=================================================================================================
|
||||
extern u32 DSProt_DetectNotDummy(void *callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef DSP_NO_NITRO
|
||||
|
||||
#undef u32
|
||||
|
||||
#endif /* DSP_NO_NITRO */
|
||||
|
||||
#else /* SDK_ASM */
|
||||
|
||||
.public DSProt_DetectFlashcart.public DSProt_DetectNotFlashcart.public DSProt_DetectEmulator.public DSProt_DetectNotEmulator
|
||||
.public DSProt_DetectDummy.public DSProt_DetectNotDummy
|
||||
|
||||
#endif /* SDK_ASM */
|
||||
|
||||
#endif /* DSPROT_H */
|
||||
@@ -223,6 +223,26 @@ struct Mat4p {
|
||||
wColumn = W;
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" static inline void Vec2s_Clear(Vec2s *pVec) {
|
||||
s16 x = 0, y = 0;
|
||||
|
||||
pVec->x = *(s16 *) &x;
|
||||
pVec->y = *(s16 *) &y;
|
||||
}
|
||||
|
||||
extern "C" static inline void Vec2s_SetU(Vec2s *dest, Vec2us *src) {
|
||||
u16 x = src->x;
|
||||
u16 y = src->y;
|
||||
|
||||
// clear current data
|
||||
dest->x = 0;
|
||||
dest->y = 0;
|
||||
|
||||
// set new data
|
||||
dest->x = x;
|
||||
dest->y = y;
|
||||
}
|
||||
extern "C" {
|
||||
#else
|
||||
typedef struct Vec2b {
|
||||
|
||||
Reference in New Issue
Block a user