Registrarse

JZW 2016 Code Snippets

Estado
Cerrado para nuevas respuestas.

jiangzhengwenjz

Usuario mítico
This a thread featuring a small portion of my code in 2016. They're not able to be compiled because they're directly grabbed from my old project. If you want to try yourself, make sure that you have enough ASM & C knowledge!

The main idea is still trying to introduce some related knowledge to you.
You're not allowed to use these codes in your public project! And please don't post it elsewhere!

1. minihack: item 'trainercard'

I'm pretty sure that the code is quite ugly because i used init_malloc(). Maybe you just need to call free in other location. But now I'm too lazy to check myself after 2 years.
Código:
.thumb
.global p_trainer_function
p_trainer_function:
push {r4, lr}
mov r4, r0
ldr r1, =0x3005090
lsl r0, r4, #2
add r0, r0, r4
lsl r0, r0, #3
add r0, r0, r1
ldrh r0, [r0, #0xe]
bl trainer_card_modified
mov r0, r4
ldr r1, =task_del
bl bx_r1
pop {r4, pc}

trainer_card_modified:
push {r4, lr}
mov r4, r0
ldr r0, =0x2037AB8
ldrb r1, [r0, #7]
mov r0, #0x80
and r0, r1
cmp r0, #0
beq real
mov r0, #0
pop {r4, pc}

real:
ldr r1, =0x807B005
bl bx_r1
cmp r4, #0
bne backtoow
ldr r0, =backtobagfunc+1
b mainhandler

backtoow:
ldr r0, =backtoowfunc+1

mainhandler:
ldr r1, =0x808B699
bl bx_r1
pop {r4, pc}
.ltorg

backtobagfunc:
push {lr}
ldr r0, =0x2000000
ldr r1, =0x1c000
ldr r2, =0x8002B81
bl bx_r2
ldr r1, =0x8107EB9
bl bx_r1
pop {pc}
.ltorg

backtoowfunc:
push {lr}
ldr r0, =0x2000000
ldr r1, =0x1c000
ldr r2, =0x8002B81
bl bx_r2
ldr r1, =0x80567DD
bl bx_r1
pop {pc}
.ltorg

bx_r1: bx r1
bx_r2: bx r2
2. new fishing system:

No real function about pokemon encounter, lol. It just hijacks the fishing callbacks to let you select the bait.
Código:
;fish hack
.org 0x805D30C
ldr r1, =ultrarod_task_hook|1
bx r1
.pool
.org 0x805D350
ldr r0, =ultrarod_chooser_hook|1
bx r0
.pool
Código:
/*hook via r1 at 0x805D30C*/
.global ultrarod_task_hook
.global ultrarod_chooser_hook
ultrarod_task_hook:
ldr r2, =0x3005090
lsl r1, r0, #2
add r1, r1, r0
lsl r1, r1, #3
add r4, r1, r2
ldrh r0, [r4, #0x26]
cmp r0, #3
bne normal_fishing
ldr r0, =task_bait_choose+1
ldr r3, =task_find_id_by_funcptr
bl bx_r3
cmp r0, #0xFF
bne bait_choosing

normal_fishing:
ldr r0, =0x805D317
bx r0

bait_choosing:
pop {r4, r5, pc}
.ltorg

/*hook via r0 at 0x805D350*/
ultrarod_chooser_hook:
ldrh r0, [r4, #0x26]
cmp r0, #3
bne back
ldr r0, =task_bait_choose+1
mov r1, #0x50
ldr r3, =task_add
bl bx_r3
mov r0, #0

back:
pop {r4, pc}
.ltorg

bx_r3: bx r3
Código:
#include <funcs.h>
#define bait_index_start 0x63

void stringnospecifiedbait_print(void);
void baitpalfade(u8 mode);
extern const unsigned int MugBoxTileTiles[72];
extern const unsigned int MugBoxTilePal[8];
extern struct oam oam32x32_prio0;
extern struct image_frame* anim_null_ptr;
extern struct image_frame* anim_flip_ptr;
extern struct rotscale * rotscale_null_ptr;
extern u16* char_name_rbox_draw_rectangle_around;
extern u16* pal_rbox_draw_rectangle_around;
extern void**image_buffer_ptr;
extern void**image_buffer_ptr2;
extern struct task *tasks;
extern struct superstate*super;
extern struct obj*objects;
const struct rbox_short bait_boxes[] __attribute__((aligned(4))) = {
	{0,3,5,3,3,0xF,0x38},
	{0,10,5,3,3,0xF,0x38},
	{0,17,5,3,3,0xF,0x38},
	{0,24,5,3,3,0xF,0x38},
	{0,3,0xD,24,4,0xF,0x41}
};

const struct objtemplate bait_templates[] __attribute__((aligned(4))) = {
	{0x1600,0x1600,&oam32x32_prio0,&anim_null_ptr,(void*)0,&rotscale_null_ptr,objc_nullsub},
	{0x1601,0x1601,&oam32x32_prio0,&anim_null_ptr,(void*)0,&rotscale_null_ptr,objc_nullsub},
	{0x1602,0x1602,&oam32x32_prio0,&anim_null_ptr,(void*)0,&rotscale_null_ptr,objc_nullsub},
	{0x1603,0x1603,&oam32x32_prio0,&anim_null_ptr,(void*)0,&rotscale_null_ptr,objc_nullsub}
};

const char stringchoosebait[] = {
	0x0B, 0x0D, 0x0E, 0x8A, 0x10, 0x06, 0x0F, 0x0B, 0x10, 0xA7, 0x03, 0x3D, 0x03, 0xA1, 0x37, 0xFF
};

const char stringnospecifiedbait[] = {
	0x09, 0x53, 0x0F, 0x7E, 0x10, 0x55, 0x10, 0xA7, 0x03, 0x3D, 0x03, 0xA1, 0x07, 0x7D, 0x02, 0x51, 0x0B, 0xF1, 0x03, 0x2A, 0x3B, 0xFE, 0x09, 0xD9, 0x10, 0x59, 0x0F, 0x24, 0x0D, 0x70, 0x07, 0xE3, 0x03, 0x3D, 0x04, 0x37, 0x07, 0x7D, 0x09, 0xD2, 0x03, 0x3D, 0x03, 0x04, 0x0F, 0x91, 0x08, 0x9E, 0x3D, 0xFF
};
extern u8 Bait1Tiles;
extern u8 Bait2Tiles;
extern u8 Bait3Tiles;
extern u8 Bait4Tiles;
extern u8 Bait1Pal;
extern u8 Bait2Pal;
extern u8 Bait3Pal;
extern u8 Bait4Pal;
const void* baitimagepointers[] __attribute__((aligned(4))) = {
	&Bait1Tiles,
	&Bait2Tiles,
	&Bait3Tiles,
	&Bait4Tiles
};

const struct pal_graphic baitpalette[] __attribute__((aligned(4))) = {
	{&Bait1Pal,0x1600,0},
	{&Bait2Pal,0x1601,0},
	{&Bait3Pal,0x1602,0},
	{&Bait4Pal,0x1603,0}
};

void task_bait_choose(u8 task_id)
{
	int i;
	u8 rboxid;
	struct graphic temp;
	switch ((tasks+task_id)->priv[0])
	{
		case 0:
		gpu_copy_to_tileset(0,MugBoxTileTiles,0x120,0x21D);
		gpu_pal_apply(MugBoxTilePal,0xD0,0x20);
		gpu_pal_apply((u16*)0x8471DEC,0xF0,0x20);
		for (i = 0; i < 4; i++)
		{
			rboxid = rbox_spawn(bait_boxes+i);
			(tasks+task_id)->priv[1+i] = rboxid;
			rboxid_bg_prepare(rboxid);
			*char_name_rbox_draw_rectangle_around = 0x21D;
			*pal_rbox_draw_rectangle_around = 0xD;
			rboxid_unpack_and_call(rboxid,rbox_draw_rectangle_around);
			rboxid_fill_pixels(rboxid,0x11);//white
			rboxid_bg_prepare(rboxid);
			rboxid_upload_and_tilemap_send(rboxid,3);
		}
		rboxid = rbox_spawn(bait_boxes+4);
		(tasks+task_id)->priv[5] = rboxid;
		rboxid_bg_prepare(rboxid);
		*char_name_rbox_draw_rectangle_around = 0x21D;
		*pal_rbox_draw_rectangle_around = 0xD;
		rboxid_unpack_and_call(rboxid,rbox_draw_rectangle_around);
		rboxid_fill_pixels(rboxid,0x11);//white
		rboxid_bg_prepare(rboxid);
		rboxid_upload_and_tilemap_send(rboxid,3);
		rboxid_print(rboxid,2,stringchoosebait,48,9,0,0);
		bgid_mark_for_sync(0);
		break;
		case 1:
		item_image_expand_buffer_malloc();
		for (i = 0; i < 4; ++i)
		{
			LZ77UnCompWram(baitimagepointers[i],*image_buffer_ptr);
			item_24x24_to_32x32(*image_buffer_ptr,*image_buffer_ptr2);
			temp.img = *image_buffer_ptr2;
			temp.size = 0x200;
			temp.tag = 0x1600+i;
			gpu_tile_obj_alloc_tag_and_upload(&temp);
			gpu_pal_obj_alloc_tag_and_apply_2(baitpalette+i);
			(tasks+task_id)->priv[6+i] = template_instanciate_forward_search(bait_templates+i,40+i*56,56,0);
		}
		free(*image_buffer_ptr);
		free(*image_buffer_ptr2);
		baitpalfade(0);
		break;
		case 2:
		if(super->buttons3_new_remapped != 1) //not A
		{
			if(super->buttons3_new_remapped == 0) //no buttons
				return;
			if(super->buttons3_new_remapped == 0x10) //RIGHT
			{
				if((tasks+task_id)->priv[10] == 3)
					return;
				else
				{
					++(tasks+task_id)->priv[10];
					baitpalfade((tasks+task_id)->priv[10]);
					return;
				}
			}
			else if(super->buttons3_new_remapped == 0x20) //LEFT
			{
				if((tasks+task_id)->priv[10] == 0)
					return;
				else
				{
					--(tasks+task_id)->priv[10];
					baitpalfade((tasks+task_id)->priv[10]);
					return;
				}
			}
			return;
		}
		else break;
		case 3:
		for (i=0; i<4; ++i)
		{	
			rboxid_80040B8((tasks+task_id)->priv[1+i]);
			pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1600+i) << 4),16,0,0);
			obj_delete_and_free_associated_resources(objects+(tasks+task_id)->priv[6+i]);
			rboxid_flush((tasks+task_id)->priv[1+i],1);
			rboxid_upload_and_tilemap_send((tasks+task_id)->priv[1+i],2);
			rboxid_free((tasks+task_id)->priv[1+i]);
		}
		rboxid_80040B8((tasks+task_id)->priv[5]);
		rboxid_flush((tasks+task_id)->priv[5],1);
		rboxid_upload_and_tilemap_send((tasks+task_id)->priv[5],2);
		rboxid_free((tasks+task_id)->priv[5]);
		break;
		case 4:
		if(!check_item_2(bait_index_start+(tasks+task_id)->priv[10],1))
		{
			stringnospecifiedbait_print();
			break;
		}
		else 
		{	
			bag_remove_item(bait_index_start+(tasks+task_id)->priv[10],1);
			task_del(task_id);
			return;
		}
		case 5:
		if(super->buttons3_new_remapped&1 || super->buttons3_new_remapped&2)
		{	
			(tasks+task_find_id_by_funcptr(0x805D305))->priv[0]=0xF;//goto fishF
			task_del(task_id);
		}
		else return;
		default:
		break;
	}
	++(tasks+task_id)->priv[0];
	return;
}

void stringnospecifiedbait_print()
{
	box_border_curve_load_tiles_and_pal(0,1);
	rboxid_fill_pixels(0,0x11);
	rboxid_print(0,2,stringnospecifiedbait,1,1,0,0);
	return;
}

void baitpalfade(u8 mode)
{
	if(mode!=0)
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1600) << 4),16,12,0);
	else
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1600) << 4),16,0,0);
	if(mode!=1)
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1601) << 4),16,12,0);
	else
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1601) << 4),16,0,0);
	if(mode!=2)
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1602) << 4),16,12,0);
	else 
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1602) << 4),16,0,0);
	if(mode!=3)
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1603) << 4),16,12,0);
	else
		pal_fade_1(0x100+(gpu_pal_tags_index_of(0x1603) << 4),16,0,0);
	return;
}
3. pre-battle animation & bg slide in different directions:
Código:
.org 0x807FF90
ldr r0, =pre_battle_anim_load_type+1
bx r0
.pool

.org 0x80D0A58
.word pre_battle_anim_type_functions

.org 0x80D0A88
.word pre_battle_anim_type_functions

.org 0x80D09E8
.word pre_battle_anim_fade_functions

.org 0x80D0A20
.word pre_battle_anim_fade_functions
Código:
#include <funcs.h>
u16* char_name_rbox_draw_rectangle_around = (u16*)0x203ADF0;
u16* pal_rbox_draw_rectangle_around = (u16*)0x203ADF2;
void**image_buffer_ptr = (void**)0x2039884;
void**image_buffer_ptr2 = (void**)0x2039888;
struct task *tasks = (struct task*)0x3005090;
struct superstate*super = (struct superstate*)0x30030F0;
struct obj*objects = (struct obj*)0x202063C;
vu16 *VCOUNT = (vu16*)0x4000006;
vu16 *BG0HOFS = (vu16*)0x4000010;
u16* var_8000 = (u16*)0x20370B8;
u16* var_8001 = (u16*)0x20370BA;
u16* var_8002 = (u16*)0x20370BC;
u16* var_8003 = (u16*)0x20370BE;
u16* var_8004 = (u16*)0x20370C0;
u16* var_8005 = (u16*)0x20370C2;
u16* var_8006 = (u16*)0x20370C4;
u16* var_8007 = (u16*)0x20370C6;
u16* var_800A = (u16*)0x20370CC;
u16* var_800B = (u16*)0x20370CE;
Código:
/* Generated by BIN2S - please don't edit directly */
	.section .rodata
	.balign 4
	.global x3tm_LZ_bin_size
	.global x3tm_LZ_bin
x3tm_LZ_bin:
	.byte  16,  0,  5,  0, 63,  0,240,240,  1,240,  1,240,  1,240,  1,240
	.byte   1,240,  1,224,240,  1,240,  1, 16,  1,  3,240,  4,240,  5,  0
	.byte 240,  6,240,  6,244,  5,244,  4, 14,244,  3,244,  0, 80,  1,240
	.byte  43,224,  1,  7,  2,240,  8,240,  9,240,  1, 48,  1,244,131, 16
	.byte   1,  9,244,  8,244,  7,240, 63,240,  1,142,  0,  1, 10,240, 11
	.byte  80, 59, 96, 63, 16,  1, 11, 51,244, 10,240, 63,240,  1,240, 13
	.byte 144, 61,128, 63, 24,  1,244, 13,240, 63,224,  1, 14,240, 15,198
	.byte 240, 63, 64,  1, 15,244, 14,240, 63,192,  1, 16,198,176, 61,160
	.byte  63,  1,244, 16,240, 63,192,  1, 17,128,128, 59, 36,240, 37,240
	.byte  37,244, 36,177,128, 63, 17,240, 63,192,  1, 18,240, 19, 96,  1
	.byte   0, 38,240, 39,240, 39,244, 38,244, 88, 19, 96,  1, 18,240, 63
	.byte 192,  1, 20,240, 21,128, 96,  1, 40,240, 41,240, 41,244, 40, 44
	.byte 244, 21, 96,  1, 20,240, 63,192,  1, 22,240, 64,  2, 96,  1, 42
	.byte 240, 43,240, 43,244, 22, 42,244,  2, 96,  1, 22,240, 63,192,  1
	.byte  23,227,128, 63, 32,  1,128, 61,  2,244, 23,240, 63,192,  1, 24
	.byte  24,240, 25,240, 63, 64,  1, 25,244, 24,219,240, 63,224,  1, 26
	.byte 240, 63, 64,  1, 26,242, 63,240,  1, 12,240, 27,240, 28,240, 63
	.byte   0,  1, 28,244,112, 27,240, 63,240,  1,  0,  1, 29,240, 30,240
	.byte  65, 31,160, 63, 31,244, 30,244, 29,243,129,192,240,  1, 96,  1
	.byte  32,240, 33,240, 34,240,  0, 35,240, 35,244, 34,244, 33,244,127
	.byte  32,115,191,240, 63,240,  1,240,  1,240,  1,240,  1,240,  1,192
	.byte 240,  1,240,  1,240,  0,  0,  0

	.global x3tm_LZ_bin_end
x3tm_LZ_bin_end:

	.align
x3tm_LZ_bin_size: .int 344
Código:
.global pre_battle_anim_type_x12_functions
pre_battle_anim_type_x12_functions:
.word pre_battle_anim_type_x12_func1+1
.word pre_battle_anim_type_x12_func2+1
Código:
#include <funcs.h>
extern u8 x3tm_LZ_bin;
extern struct task *tasks;
void pre_battle_anim_type_x12_hblank(void);
void pre_battle_anim_type_x12_helper(u8 task_id);
extern vu16 *VCOUNT;
extern vu16 *BG0HOFS;
u8 pre_battle_anim_type_x12_func1(struct task*task_addr)
{
	reg_ie_orr(2);
	hblank_handler_set(pre_battle_anim_type_x12_hblank+1);
	decompress_with_fallback(0,&x3tm_LZ_bin,0,0,1);
	gpu_copy_to_tileset(0,0x83F87A0,0x580,0);
	task_addr->priv[0]++;
	gpu_pal_apply(0x83FA638,0xf0,0x20);
	tasks[task_add(pre_battle_anim_type_x12_helper+1,0x50)].priv[0]=56;
	return 0;
}

u8 pre_battle_anim_type_x12_func2(struct task*task_addr)
{
	u8 x;
	x = task_find_id_by_funcptr(pre_battle_anim_type_x12_helper+1);
	if (x != 0xFF)
		return 0;
	else
	{
		if(task_addr->priv[1] <= 0x10)
		{
			pal_fade_1(0xf0,16,task_addr->priv[1],0x7fff);
			task_addr->priv[1]+=2;
			return 0;
		}
		else
		{	
			if(task_addr->priv[1] <= 0x18)
			{
				task_addr->priv[1]+=2;
				return 0;
			}
			else 
			{	
				pal_0_fade(0xFFFFFFFF,0x10,0);
				task_del(task_find_id_by_funcptr(task_addr->fptr));
			}
		}
	}
	return 0;
}

void pre_battle_anim_type_x12_hblank()
{
	u8 i;
	u16 j,k;
	i = task_find_id_by_funcptr(pre_battle_anim_type_x12_helper+1);
	if (i == 0xFF)
	{
		hblank_handler_set((void*)0);
		return;
	}
	else
	{
		j = *VCOUNT;
		k = tasks[i].priv[0];
		if(j <= 49)
			*BG0HOFS = k;
		else 
			if(j <= 79)
				*BG0HOFS = 256-k;
			else
				if(j <= 109)
					*BG0HOFS = k;
				else
					*BG0HOFS = 256-k;
	}
	return;
}

void pre_battle_anim_type_x12_helper(u8 task_id)
{
	u16 i;
	i = tasks[task_id].priv[0];
	if(i)
		tasks[task_id].priv[0]-=4;
	else
		task_del(task_id);
	return;
}
Código:
.thumb
.global pre_battle_anim_type_x12
pre_battle_anim_type_x12:
push {lr}
lsl r0, r0, #0x18
lsr r0, r0, #0x18
ldr r2, =0x3005090
lsl r1, r0, #2
add r1, r1, r0
lsl r1, r1, #3
add r1, r1, r2
mov r2, #0
strh r2, [r1, #0x26]
bl mainsub_x12
pop {pc}
.ltorg

mainsub_x12:
push {r4, r5, lr}
lsl r0, r0, #0x18
lsr r0, r0, #0x18
ldr r5, =pre_battle_anim_type_x12_functions
ldr r2, =0x3005090
lsl r1, r0, #2
add r1, r1, r0
lsl r1, r1, #3
add r4, r1, r2

loc_loop:
mov r1, #8
ldrsh r0, [r4, r1]
lsl r0, r0, #2
add r0, r0, r5
ldr r1, [r0]
mov r0, r4
bl bx_r1
lsl r0, r0, #0x18
cmp r0, #0
bne loc_loop
pop {r4, r5, pc}

bx_r1:
bx r1
Código:
.thumb
.global pre_battle_anim_load_type
@hook via r0 at 0x807FF90
pre_battle_anim_load_type:
ldrb r2, [r4, #3]
cmp r2, #0
beq normal
mov r0, r2
pop {r4-r6, pc}

normal:
ldrh r2, [r4]
lsl r0, r2, #2
add r0, r0, r2
lsl r0, r0, #3
add r0, r0, r1
ldr r1, =0x807ff9b
bx r1
.ltorg
Código:
.global pre_battle_anim_type_functions
pre_battle_anim_type_functions:
.word 0x080D0ADD

.word 0x080D0BD5

.word 0x080D0D55

.word 0x080D0EE5

.word 0x080D13C9

.word 0x080D1639

.word 0x080D1B59

.word 0x080D1D2D

.word 0x080D316D

.word 0x080D33ED

.word 0x080D3819

.word 0x080D3929

.word 0x080D2769

.word 0x080D2789

.word 0x080D27A9

.word 0x080D27C9

.word 0x080D27E9

.word 0x080D1F2D

.word pre_battle_anim_type_x12+1
Código:
.global pre_battle_anim_fade_functions
pre_battle_anim_fade_functions:
.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D

.word 0x080D0A8D
Functions you may have interest in:
Código:
sub_8112364 = 0x8112365;
set_callback2 = 0x8000545;
script_env_2_enable = 0x8069941;
malloc_and_clear = 0x8002BB1;
malloc = 0x8002B9D;
memcpy = 0x81E5E79;
memset = 0x81E5ED9;
intro_set_cb = 0x80ECAA9;
init_malloc = 0x8002B81;
obj_delete = 0x80073DD;
obj_delete_and_free_associated_resources = 0x8007805;
obj_and_aux_reset_all = 0x8006B11;
pal_fade_control_and_dead_struct_reset = 0x8070529;
task03_intro_sys_cb_exec_and_check_key_press_to_end = 0x80ECAB1;
gpu_pal_allocator_reset = 0x80088F1;
gpu_pal_apply = 0x80703ED;
rboxid_free = 0x8003E3D;
obj_free_tiles_by_tag = 0x80077AD;
obj_free_pal_by_tag = 0x80077C9;
obj_free_rotscale_entry = 0x80077D9;
obj_delete_and_free_tiles = 0x8007281;
gpu_tile_obj_free_by_tag = 0x800874D;
gpu_pal_free_by_tag = 0x8008A31;
gpu_tilemap_apply = 0x8002041;
tasks_init = 0x80773BD;
dp12_abort = 0x8087E65;
task_add = 0x807741D;
task_exec = 0x8077579;
task_del = 0x8077509;
objc_exec = 0x8006B5D;
obj_sync_something = 0x8006BA9;
fade_and_return_progress_probably = 0x80704D1;
vblank_handler_set = 0x80006F5;
hblank_handler_set = 0x8000701;
vblank_std_080EC9EC = 0x80EC9ED;
taskid_set_priv_u32 = 0x80776E9;
taskid_get_priv_u32 = 0x8077721;
c2_intro_1 = 0x80EC9D5;
lcd_io_set = 0x8000A39;
lcd_io_get = 0x8000AC5;
lcd_io_orr = 0x8000AF5;
lcd_io_bic = 0x8000B15;
reg_ie_orr = 0x8000B69;
reg_ie_bic = 0x8000B95;
gpu_tile_bg_drop_all_sets = 0x8001619;
gpu_pal_all_set = 0x8070425;
bgid_mark_for_sync = 0x80F67A5;
bg_vram_setup = 0x8001659;
bgid_mod_x_offset = 0x8001B91;
bgid_mod_y_offset = 0x8001D09;
bgid_send_tilemap = 0x80020BD;
rbox_calc_and_send = 0x8003B25;
remo_clear_unk = 0x8002C29;
bgid_set_tilemap = 0x8001FA1;
gpu_sync_bg_show = 0x80019BD;
gpu_sync_bg_hide = 0x80019D1;
pal_0_fade = 0x80714D5;
bgid_fill_big_rectangle = 0x8002455;
graphic_log_clear = 0x80F6809;
decompress_stat_check = 0x80F682D;
decompress_with_fallback = 0x80F6879;
oak_fade = 0x8070589;
vblank_cb_080F4BFC = 0x80F4BFD;
obj_anim_image_start = 0x800838D;
gpu_tile_obj_decompress_alloc_tag_and_upload_2 = 0x800EBCD;
gpu_tile_obj_alloc_tag_and_upload = 0x80086DD;
gpu_pal_obj_alloc_tag_and_apply = 0x8008929;
gpu_pal_obj_alloc_tag_and_apply_2 = 0x800EC29;
template_instanciate_forward_search = 0x8006F8D;
template_instanciate_reverse_search = 0x8006FE1;
rotscale_new_anim_with_checksum = 0x8008469;
cb_8130FB8 = 0x8130FB9;
box_print = 0x812E51D;
rboxid_bg_prepare = 0x8003FA1;
rboxid_fill_pixels = 0x800445D;
rboxid_unpack_and_call = 0x800486D;
gpu_copy_to_tileset = 0x80017D1;
stdpal_get = 0x8150409;
rboxid_draw_810F2E8 = 0x810F2E9;
rboxid_print = 0x8002C49;
rbox_spawn = 0x8003CE5;
rboxid_disp_transbg = 0x812E5A5;
pokemon_getattr = 0x803FBE9;
pokemon_setattr = 0x804037D;
song_play_and_auto_config = 0x81DD0F5;
int_to_str = 0x8008E79;
rboxid_get_field = 0x8004951;
gf_strcat = 0x8008DA5;
declen = 0x80CBF05;
box_print_2 = 0x813E9A1;
strcpy_xFF_terminated = 0x8008D85;
__divsi3 = 0x81E4019;
__umodsi3 = 0x81E4685;
rboxid_flush = 0x810F4D9;
rboxes_free = 0x8003ECD;
free = 0x8002BC5;
LZ77UnCompWram = 0x81E3B71;
rboxid_render_graphic_80041F0 = 0x80041F1;
LZ77UnCompVram = 0x81E3B6D;
bgid_fill_rectangle = 0x8002555;
rboxid_render_graphic_80041B8 = 0x80041B9;
tilemaps_sync = 0x80F67B9;
calc_circle = 0x807EE2D;
rboxid_upload_and_tilemap_send = 0x8003F21;
c2_exit_to_overworld_1_continue_scripts_and_music = 0x80568C5;
audio_play = 0x80722CD;
c2_exit_to_overworld_1_continue_scripts_restart_music = 0x80568E1;
bgid_clear_and_pal_swap_maybe = 0x80F6B09;
rbox_render_graphic_800D1E8 = 0x800D1E9;
rbox_struct_make = 0x810FE51;
objc_nullsub = 0x800760D;
rboxid_get_field_ext = 0x80019E5;
task_is_running = 0x8077651;
script_env_2_enable_and_set_ctx_running = 0x8069B35;
task_find_id_by_funcptr = 0x8077689;
rbox_draw_rectangle_around = 0x810F381;
box_related_one = 0x80F6CD1;
box_border_curve_load_tiles_and_pal = 0x80F7769;
check_item_2 = 0x8099F41;
item_image_expand_buffer_malloc = 0x80986ED;
item_24x24_to_32x32 = 0x809872D;
gpu_pal_tags_index_of = 0x80089E9;
pal_fade_1 = 0x8045275;
bag_remove_item = 0x809A1D9;
rboxid_80040B8 = 0x80040B9;
copy_part_of_tilemap_somewhere = 0x8002125;
rand = 0x8044EC9;
Credit list: Knizz, strange_kid (graphic)
 

kakarotto

Leyenda de WaH
Incredible!!!!!!! Your skill is very impresive. I wish in the future to practice with your code and realise some cool things!

Btw thankssss!
 

Fran Agustín

Si el sol besa tus ojos, ni cuenta te das.
Miembro insignia
OH MY FUCKING GOD! JIANG! YOU ARE AWESOME, MAN!
I wasn't expecting this huge post so full of code to be analysed. It's a great source of knowledge, perfect to learn from. I'll use it for sure some time in the future, there's so much to watch, read and understand...
This is one of the best contributions I've ever seen. Thank you very, very much!

--------------------------------------------------------------------------------------------------------------------

¡DIOS MÍO! ¡JIANG! ¡ERES ASOMBROSO!
No estaba esperando este gigantesco post, repleto de código por analizar. Es una magnífica fuente de conocimiento, perfecta para aprender. Seguramente la usaré de aquí a un tiempo en el futuro, hay tanto para ver, leer y entender...
Es uno de los mejores aportes que haya visto jamás. ¡Muchas, muchas gracias!
 
Última edición:

Naren Jr.

Puto amo
Usuario de Platino
OMFGGGGGG @jiangzhengwenjz de donde sacaste esto??

Es algo increíble hermano, veré si aplico una que otra rutina, pero literalmente he quedado sin palabras :eek:

Y me sorprende que siendo tremendo aporte contenga pocos comentarios, pero bueno... no se puede esperar mas.

Gracias por esto!

-----------------------
@jiangzhengwenjz where did you get this ??

It's something incredible brother, I'll see if I apply the odd routine, but I've literally run out of words:

And I'm surprised that being a tremendous contribution contains few comments, but hey ... you can not wait any longer.

Thank you for this!
 
Estado
Cerrado para nuevas respuestas.
Arriba