From a1298d2df65f89ba63d3d1a3e30347545d19ed3c Mon Sep 17 00:00:00 2001 From: jugeeya <jugeeya@live.com> Date: Wed, 26 Jun 2019 13:18:32 -0700 Subject: [PATCH] add test for text msbt replacement --- source/taunt_toggles.h | 12 +++++------- source/training_mods.hpp | 8 +++++++- source/useful/raygun_printer.hpp | 15 +++++++-------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/source/taunt_toggles.h b/source/taunt_toggles.h index b12bab9..d884d58 100644 --- a/source/taunt_toggles.h +++ b/source/taunt_toggles.h @@ -3,12 +3,12 @@ #define NONE 0 -/* Up Taunt */ +// Up Taunt bool HITBOX_VIS = 1; -/* Side Taunt */ +// Side Taunt -/* DI */ +// DI float DI_stick_x = 0; float DI_stick_y = 0; int DI_STATE = NONE; @@ -16,7 +16,7 @@ int DI_STATE = NONE; #define DI_RANDOM_IN_AWAY 2 #define NUM_DI_STATES 3 -/* Attack Option */ +// Attack Option #define MASH_NAIR 0 #define MASH_FAIR 1 #define MASH_BAIR 2 @@ -30,7 +30,7 @@ int DI_STATE = NONE; int ATTACK_STATE = MASH_NAIR; #define NUM_ATTACK_STATES 9 -/* Ledge Option */ +// Ledge Option #define RANDOM_LEDGE 0 #define NEUTRAL_LEDGE 1 #define ROLL_LEDGE 2 @@ -66,6 +66,4 @@ int ESCAPE_STATE = ESCAPE_LEDGE; int SHIELD_STATE = NONE; #define NUM_SHIELD_STATES 3 - - #endif // TAUNT_TOGGLES_H diff --git a/source/training_mods.hpp b/source/training_mods.hpp index 0a8403e..805c54e 100644 --- a/source/training_mods.hpp +++ b/source/training_mods.hpp @@ -444,7 +444,13 @@ int vsnprintf_intercept(char * s, size_t n, const char * format, va_list arg) { } - return vsnprintf(s, n, format, arg); + int ret = vsnprintf(s, n, format, arg); + + if (strcmp(s, "Do Not Display") == 0) { + strcpy(s, "test"); + } + + return ret; } void training_mods_main() { diff --git a/source/useful/raygun_printer.hpp b/source/useful/raygun_printer.hpp index cbc4062..bb3c907 100644 --- a/source/useful/raygun_printer.hpp +++ b/source/useful/raygun_printer.hpp @@ -18,8 +18,7 @@ using namespace app::lua_bind; segment data list : {Z, Y, X, ZRot, Size} segment labels : _ - |_| from top to top left, clockwise: a->f + g mid + \|/ from top mid to - top left, clockwise: h->m + --two half g's: n, o + |_| from top to top left, clockwise: a->f + g mid + \|/ from top mid to top left, clockwise: h->m + --two half g's: n, o |_| /|\ */ @@ -68,9 +67,10 @@ void show_segment(u64 battle_object_module_accessor, float z, float y, float x, Vector3f rot = {.x = 0, .y = 90, .z = zrot}; Vector3f random = {.x = 0, .y = 0, .z = 0}; - EffectModule::req_on_joint(battle_object_module_accessor, hash40("sys_raygun_bullet"), - hash40("top"), &pos, &rot, size, &random, &random, 0, - 0, 0, 0); + EffectModule::req_on_joint(battle_object_module_accessor, + hash40("sys_raygun_bullet"), hash40("top"), + &pos, &rot, size, &random, &random, + 0, 0, 0, 0); } int alphabet_index(char to_print) { @@ -130,9 +130,8 @@ void print_char(u64 module_accessor, char to_print, int line_num, } void print_string(u64 module_accessor, const char* print_str) { - // Delete any previous strings - Hash40 raygunShot = {.hash = 0x11e470b07fLL}; - EffectModule::kill_kind(module_accessor, raygunShot.hash, 0, 1); + // delete any previous strings + EffectModule::kill_kind(module_accessor, hash40("sys_raygun_bullet"), 0, 1); int line_num = 0; float horiz_offset = 0;