Skip to content

Instantly share code, notes, and snippets.

View leoetlino's full-sized avatar
💭
I may be slow to respond. Busy with coursework

Léo Lam leoetlino

💭
I may be slow to respond. Busy with coursework
View GitHub Profile
@leoetlino
leoetlino / nnMain_150.cpp
Created April 26, 2019 11:17
BotW nnMain 1.5.0 vs 1.6.0
void nnMain()
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
sead::system::Print("0000002d\n"); // version number. 0x10 in 1.0.0
Profiler::Push("起動時間");
Profiler::Push("main");
_WriteStatusReg(FPCR, _ReadStatusReg(FPCR) | 0x1000000);
bool MapIcon::Tower::isVisited() const {
gmd::StructHandle IsVisitLocation;
if (!gmd::GameDataMgr::instance()->getStruct(&IsVisitLocation, "IsVisitLocation")) {
return false;
}
bool visited;
if (!gmd::GameDataMgr::instance()->getBool(&visited, IsVisitLocation, mLocationNameHash)) {
return false;
}
import argparse
import csv
from typing import Optional
import byml
import mmh3
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument("romfs_root", type=Path)
parser.add_argument("-b", "--build", default="Product.100")
@leoetlino
leoetlino / cafe150.cpp
Created December 21, 2022 10:46
ksys::phys::RagdollController::recalculateEffectiveBoneWeight
int __fastcall ksys::phys::RagdollController::recalculateEffectiveBoneWeight(int this, unsigned int a2)
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
v2 = *(this + 76);
v3 = *(this + 60);
v4 = *(this + 64);
if ( v2 == 0.0 )
{
if ( a2 < v3 )
// v1.0.0
void LastBoss::xxxxx::xxxxx(...) {
// ...
if (stuff) {
if (isStunFlagSet() || status == 0x15) {
resetStunFlag(); // this then allows the player to stun Ganon again
status = 0x15;
}
}
else if (shouldStun && lastBoss->isPlayerUnderGanon()) {
@leoetlino
leoetlino / LazyIDA.py
Created June 21, 2022 19:45
copy this into the IDA/plugins/ directory
from __future__ import division
from __future__ import print_function
from struct import unpack
import idaapi
import idautils
import idc
from PyQt5.Qt import QApplication
ACTION_CONVERT = ["lazyida:convert%d" % i for i in range(10)]
signed __int64 __fastcall doCheckEquipItemType(void *a1, sead::SafeString *profile)
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
profile->assureTermination(profile);
profile->assureTermination(profile);
v3 = (char *)profile->cstr;
if ( v3 == "WeaponSmallSword" )
return 0LL;
for...
sead::SafeStringBase<char> *__fastcall ksys::res::GParamListObjectTraveler::GParamListObjectTraveler(__int64 x0_0)
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
v2 = (agl::utl::IParameterObj *)(x0_0 + 8);
*(_QWORD *)x0_0 = &BgparamlistObject::vt;
agl::utl::IParameterObj::IParameterObj((agl::utl::IParameterObj *)(x0_0 + 8));
v3 = (agl::utl::ParameterBase *)(x0_0 + 0x38);
*(_QWORD *)x0_0 = &off_71025114A0;
*(_QWORD *)(x0_0 + 8) = &`vtable for'agl::utl::ParameterObj;
Actor *__fastcall BaseProcMgr::getNextActor(BaseProcMgr *this, sead::CriticalSection *cs, Actor *actor, u8 flags)
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
if ( &this->procMapCritSection != cs )
return 0LL;
if ( !actor )
{
node = this->procMap.mRoot;
if ( node )
{
"PorchItem": [
"Weapon_Sword_070",
"Weapon_Sword_024",
"Weapon_Sword_025",
"Weapon_Sword_030",
"Weapon_Sword_041",
"Weapon_Sword_058",
"Weapon_Sword_034",
"Weapon_Sword_035",