Better comment

This commit is contained in:
Bigjango13 2024-02-15 02:50:15 -05:00
parent 64cb51e37c
commit ee4e9103f0
5 changed files with 12 additions and 4 deletions

View File

@ -834,10 +834,12 @@ void init_misc() {
overwrite_calls((void *) Player_stopUsingItem, (void *) Player_stopUsingItem_injection);
// Fix invalid ItemInHandRenderer texture cache
uchar cmp_r7_patch[] = {0x07, 0x00, 0x57, 0xe1}; // "cmp r7,r7"
patch((void *) 0x4b938, cmp_r7_patch);
uchar moveq_r3_true_patch[] = {0x01, 0x30, 0xa0, 0x03}; // "moveq r3,#0x1"
patch((void *) 0x4b93c, moveq_r3_true_patch);
// This works by forcing MCPI to always use the branch that enables using the
// cache, but then patches that as well to do the opposite
uchar ensure_equal_patch[] = {0x07, 0x00, 0x57, 0xe1}; // "cmp r7,r7"
patch((void *) 0x4b938, ensure_equal_patch);
uchar set_true_patch[] = {0x01, 0x30, 0xa0, 0x03}; // "moveq r3,#0x1"
patch((void *) 0x4b93c, set_true_patch);
// Init C++ And Logging
_init_misc_cpp();

View File

@ -32,6 +32,7 @@ property float pitch = 0x44;
property float old_yaw = 0x48;
property float old_pitch = 0x4c;
property AABB hitbox = 0x50;
property float height_offset = 0x68;
property int fire_timer = 0xa0;
property int renderer_id = 0xa8;
property bool on_ground = 0xb2;

View File

@ -1,3 +1,5 @@
constructor () = 0x6096c;
method void assign(uchar entity_id, EntityRenderer *renderer) = 0x6094c;
method void render(Entity *entity, float x, float y, float z, float rot, float unknown) = 0x60674;
static-method EntityRenderDispatcher *getInstance() = 0x60e90;

View File

@ -2,3 +2,5 @@ virtual-method void startOpen() = 0x24;
virtual-method void stopOpen() = 0x28;
virtual-method ItemInstance *getItem(int slot) = 0x8;
virtual-method void setItem(int slot, ItemInstance *item_instance) = 0xc;
virtual-method int getContainerSize() = 0x18;
virtual-method std::vector<ItemInstance> getSlotCopies() = 0x2c;

View File

@ -5,5 +5,6 @@ method void selectSlot(int slot) = 0x8d13c;
method ItemInstance *getSelected() = 0x8d134;
// It's just FillingContainer_linkSlot with selectedSlot as linked_slot
method bool moveToSelectedSlot(int unlinked_slot, bool push_aside) = 0x8d148;
method void setupDefault() = 0x8d164;
property int selectedSlot = 0x28;