This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let's say we have this mangled symbol: _ZN5Class8functionEiifb10OtherClass | |
To demangle this, we start by removing the _Z (I'm not sure what this means) | |
N means that the following is the class name (There is no N is classless functions) | |
Next is the length of the class name (in this case 5), followed by the class name (Class) | |
Class:: | |
Now we have the length of the function name (8 here) and then the function name (function) | |
Class::function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool TileTessellator::tessellateRedstoneTileInWorld(RedstoneTile* tile, int x, int y, int z, TilePos const& pos, TileSource* tilesource) { | |
Tessellator* tessellator = tessellator_inst; | |
int data = (int) tilesource->getData(x, y, z); | |
// implement my own Texture system because of issues with MCPE's normal TextureUVCoordinateSet | |
RendererTexture* cross = new RendererTexture(0.0625F, 0.0937F, 0.5F, 0.5625F, 16, 16); // Cross texture | |
RendererTexture* line = new RendererTexture(0.125F, 0.1562F, 0.5F, 0.5625F, 16, 16); // line texture | |
RendererTexture* cross_overlay = new RendererTexture(0.0938F, 0.125F, 0.5F, 0.5625F, 16, 16); // cross overlay | |
RendererTexture* line_overlay = new RendererTexture(0.1563F, 0.1875F, 0.5F, 0.5625F, 16, 16); // line overlay |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AABB::AABB(Vec3 const&,Vec3 const&) .text 0000000000617BD4 00000096 00000010 FFFFFFFFFFFFFFF0 R | |
AABB::AABB(Vec3 const&,float) .text 0000000000617D94 0000003A 00000018 FFFFFFFFFFFFFFF8 R | |
AABB::AABB(float,float,float,float,float,float) .text 0000000000617B48 00000088 00000000 0000000C RT . | |
AABB::AABB(void) .text 0000000000617B28 0000001E 00000004 00000000 RT . | |
AABB::centerAt(Vec3 const&) .text 0000000000619658 0000007A 00000020 FFFFFFFFFFFFFFF0 RT . | |
AABB::clip(Vec3 const&,Vec3 const&) .text 0000000000619748 00000736 00000080 FFFFFFFFFFFFFFD8 RT . | |
AABB::clipXCollide(AABB const&,float) .text 0000000000618720 000000B0 RT . | |
AABB::clipYCollide(AABB const&,float) .text 00000000006187D0 000000B0 RT . | |
AABB::clipZCollide(AABB const&,float) .text 0000000000618880 000000B0 RT . | |
AABB::cloneMove(Vec3 const&) .text 00000000006186B8 00000068 00000020 FFFFFFFFFFFFFFF8 RT . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <idc.idc> | |
static symbol(addr, sym) { | |
MakeFunction(addr, BADADDR); | |
if(MakeNameEx(addr, sym, SN_NOWARN)) return; | |
auto i; | |
for(i = 0; i < 999; i++) if(MakeNameEx(addr, form("%s_%d", sym, i), SN_NOWARN)) return; | |
} | |
static main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
#include <memory> | |
#include <vector> | |
#include "../phys/Vec3.h" | |
class BlockSource; | |
class Level; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void LevelRenderer::_buildSkyMesh() | |
{ | |
Tessellator& tessellator = Tessellator::instance; | |
tessellator.begin(mce::PrimitiveMode::MODE_2, 12); | |
tessellator.color(Color::BLACK); | |
tessellator.vertex(0.0F, 128.0F, 0.0F); | |
double x = 1.0; | |
double z = 0.0; | |
double f = Math::TAU * 0.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
#include <memory> | |
class TextureUVCoordinateSet; | |
struct SeedItemComponent; | |
class FoodItemComponent; | |
class Block; | |
class CreativeItemCategory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
#include <vector> | |
#include "minecraftpe/client/renderer/texture/TextureUVCoordinateSet.h" | |
#include "minecraftpe/client/renderer/renderer/Color.h" | |
#include "minecraftpe/world/phys/AABB.h" | |
struct Material; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sys/mman.h" | |
void tiny_hook(uint32_t* addr, uint32_t hook) { | |
bool thumb = (uint32_t)addr & 1; | |
if(thumb) | |
addr = (uint32_t*) ((uint32_t) addr - 1); | |
mprotect(addr, 9, PROT_READ | PROT_WRITE); | |
*addr = (uint32_t) (thumb)? 0xF000F8DF : 0xE51FF008; // LDR PC, [PC] on Thumb and LDR PC, [PC, #-8] on ARM. | |
*(addr + 1) = hook; | |
mprotect(addr, 9, PROT_READ | PROT_EXEC); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static uintptr_t** mBlocks = (uintptr_t**) (((uint8_t*)baseAddr) + 0xA75750); | |
static TextureUVCoordinateSet myCustomTexture{0.0F,0.0F,0.0625F,0.0625F,16,16,1,1}; | |
TextureUVCoordinateSet& customGetTexture() | |
{ | |
return myCustomTexture; | |
} | |
uint32_t customGetColor() | |
{ |
NewerOlder