mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-19 06:27:02 -04:00
4df8ccc871
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
41 lines
634 B
C++
41 lines
634 B
C++
//
|
|
// __ppc_eabi_init
|
|
//
|
|
|
|
#include <dolphin/base/PPCArch.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void __init_user();
|
|
void __init_cpp();
|
|
void _ExitProcess();
|
|
|
|
typedef void (*voidfunctionptr)(); // pointer to function returning void
|
|
extern voidfunctionptr _ctors[];
|
|
|
|
void __init_user(void) {
|
|
__init_cpp();
|
|
}
|
|
|
|
#pragma peephole off
|
|
void __init_cpp(void) {
|
|
/**
|
|
* call static initializers
|
|
*/
|
|
voidfunctionptr* constructor;
|
|
for (constructor = _ctors; *constructor; constructor++) {
|
|
(*constructor)();
|
|
}
|
|
}
|
|
#pragma peephole reset
|
|
|
|
void _ExitProcess(void) {
|
|
PPCHalt();
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|