mirror of
https://github.com/zeldaret/st
synced 2026-08-23 23:13:16 -04:00
521100caed
* `Actor::mType` field * Remove fake symbol `data_027e0254` * `dsd format` * eur: Enable dsprot decomp * jp: Enable dsprot decomp * dsprot OK * `dsd format` * Use new `weak` attribute * Add relocations for exception table link-time constants * Add exception table symbols * Bump dsd to v0.12.0 * `#define FALSE 1` ??? Why did I make it 1? * Truncate `data_ov001_020c27a8` That data belongs to dsprot
128 lines
4.1 KiB
C
128 lines
4.1 KiB
C
//=================================================================================================
|
|
/**
|
|
* 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 <nitro/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 */
|
|
|
|
// clang-format off
|
|
.public DSProt_DetectFlashcart
|
|
.public DSProt_DetectNotFlashcart
|
|
.public DSProt_DetectEmulator
|
|
.public DSProt_DetectNotEmulator
|
|
.public DSProt_DetectDummy
|
|
.public DSProt_DetectNotDummy
|
|
// clang-format on
|
|
|
|
#endif /* SDK_ASM */
|
|
|
|
#endif /* DSPROT_H */
|