NTRで使える色々なソースコードです。
1.offset statement sample
----
void sample(void)
{
u32 offset;
offset = 0xXXXXXXXX;//オフセットを記述
WRITEU32(0xYYYYYYYY + offset);
}
----
2.Pointer Code sample
----
void pointersample(void)
{
u32 pointer;
pointer = READU32(0xXXXXXXXX) + 0xYYY; //My pointer is equal to the address stocked at the address 0xXXXXXXXX and we add 0xYYY to this address.
WRITEU32(pointer, 0xSSSSSSSS); //We write the value 0xSSSSSSSS in the address previously retrieved.
}
----
3.preservation teleport code sample
----
#include "cheats.h"
#include <stdbool.h>
#include "hid.h"
static u32 x = 0;
static u32 y = 0;
static u32 z = 0;
//////////////////////////////Code Start//////////////////////////////
void teleport(void)
{
static u32 x = 0;
static u32 y = 0;
static u32 z = 0;
if (is_pressed(L + R + X)) //Save coordinates with L+R+X.
{
x = READU32(0xXXXXXXXX + 0xSS); //0xXXXXXXXX specifies the area of the X coordinate in the game. 0xSS specify the X coordinate.
y = READU32(0xYYYYYYYY + 0xSS); //0xYYYYYYYY specifies the area of the X coordinate in the game. 0xSS specify the Y coordinate.
z = READU32(0xZZZZZZZZ + 0xSS); //0xZZZZZZZZ specifies the area of the X coordinate in the game. 0xSS specify the Z coordinate.
}
if (is_pressed(L + R + Y)) //Load coordinates with L+R+Y.
{
WRITEU32(0xXXXXXXXX + 0xSS, x); //Write the same address as "x = READU32" adove.
WRITEU32(0xYYYYYYYY + 0xSS, y); //Write the same address as "y = READU32" adove.
WRITEU32(0xZZZZZZZZ + 0xSS, z); //Write the same address as "z = READU32" adove.
}
}
----
全てpastebinからの転載。
http://pastebin.com/u/yoshicfw
最終更新:2018年01月28日 16:23