void preRowanMultichoice(u8 index) { //task *tasks = (task *) 0x3005090; char *dest = (char*) 0x02021D18; u32 *okay = (u32*) 0x2020050; u8 *prev_quest_mode = (u8*) 0x0203ADFA; u8 b = 8; /* Wait for A press */ if (check_a_pressed(0)) return; //*textflags = 0xF; //*prev_quest_mode = 2; // Textflags = 4 (3rd bit) means no continue arrow, bit 2 means auto a press // We use auto A press to wait for message to finish rendering // By checking for a press loadMessageBox(0, 0); fdecoder(dest, (char*) caAdvice); box_related_one(0, 4, dest, b, 0, 2, 1, 3); rboxid_to_vram(0, 3); tasks[index].args[6] = 0x1E; tasks[index].function = (u32) slideRowanMultichoice; }
void introduceRowan(u8 index) { //task *tasks = (task *) 0x3005090; u16 arg; u8 mix_color; mix_color = (u8) fade_control->color; if (mix_color & 0x80) return; arg = tasks[index].args[6]; if (!arg) { u32 **ptr = (u32**) 0x0203B108; char *dest = (char*) 0x02021D18; u8 b = 8; loadMessageBox(0, 0); fdecoder(dest, (char*) caIntroduce); box_related_one(0, 4, dest, b, 0, 2, 1, 3); rboxid_to_vram(0, 3); tasks[index].args[6] = 0x0; tasks[index].function = (u32) preRowanMultichoice; } else { tasks[index].args[6] = arg - 1; } return; }
void textbox_set_text(u8 *string, u8 font, u8 text_bg, u8 text_colour, u8 shadow, u8 text_bg_box) { textflags.unknown[0] = textflags.unknown[0] | 1; if (text_bg_box) { rboxid_clear_pixels(0, 0xFF); // transparent } else { rboxid_clear_pixels(0, 0x11); // white } rboxid_08003FA0(0); rboxid_to_vram(0, 0); box_related_one(0, font, string, sav2_get_text_speed(), 0, text_colour, text_bg, shadow); }
void helloThere(u8 index) { u16 arg; arg = tasks[index].args[6]; if (!arg) { u32 **ptr = (u32**) 0x0203B108; char *dest = (char*) 0x02021D18; u8 b = 8; u8 i; u16 (*object_from_compressed)(u32*) = (u16 (*)(void)) 0x0800EBCC + 1; u8 (*object_apply_palette)(u32*) = (u8 (*)(void)) 0x08008928 + 1; u8 (*object_search)(u32*,u16,u16,u8) = (u8 (*)(void)) 0x08006F8C + 1; void (*load_pal)(u32*,u16,u16) = (void (*)(void)) 0x080703EC + 1; void (*lcd_io_set)(u8,u16) = (void (*)(void)) 0x08000A38 + 1; //object_from_compressed((u32*) 0x8462F14); //object_apply_palette((u32*) 0x8462F24); //object_from_compressed((u32*) &graphics); //object_apply_palette((u32*) &palette); // For 256 //load_pal((u32*) 0x084615FC, 0x100 + 4 * 16, 16 * 2 * 2); // Set BLDCNT to allow alpha blending of OAM onto bg //lcd_io_set(0x50, 0x2F50); // Set opacity of the sprites //lcd_io_set(0x52, 0x40C); // Now we can toggle the one objects opacity bit to set which objects are blended // This isn't a search, it controls display of objects //object_search((u32*) &temp, 64, 0x30, 1); // object_search((u32*) &temp2, 64, 0x70, 1); loadMessageBox(0, 0); fdecoder(dest, (char*) caHelloThere); box_related_one(0, 4, dest, b, 0, 2, 1, 3); rboxid_to_vram(0, 3); tasks[index].args[6] = 0x1E; tasks[index].function = (u32) showRowan; } else { tasks[index].args[6] = arg - 1; } return; }