Skip to content

Commit

Permalink
Refactored chunk building to make it simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
Fexty12573 committed Dec 13, 2023
1 parent 3cd1e82 commit e3c137a
Show file tree
Hide file tree
Showing 28 changed files with 395 additions and 5 deletions.
22 changes: 22 additions & 0 deletions Assets/AssetList.Debug.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Out:$(AssetDir)/Default.Debug.bin
$(AssetDir)/DebugAssets/Reloaded.Hooks.dll
$(AssetDir)/DebugAssets/Reloaded.Hooks.Definitions.dll
$(AssetDir)/DebugAssets/Reloaded.Assembler.dll
$(AssetDir)/DebugAssets/Reloaded.Memory.dll
$(AssetDir)/DebugAssets/Reloaded.Memory.Buffers.dll
$(AssetDir)/DebugAssets/Iced.dll
$(AssetDir)/DebugAssets/ImGui.NET.dll
$(AssetDir)/Common/Roboto-Bold.ttf
$(AssetDir)/Common/Roboto-Medium.ttf
$(AssetDir)/Common/NotoSansJP-Regular.ttf
$(AssetDir)/Common/fa-solid-900.ttf
$(AssetDir)/Common/AddressRecords.json
n:$(AssetDir)/Common/FASMX64.dll
n:$(AssetDir)/DebugAssets/cimgui.debug.dll
$(AssetDir)/Common/Sphere.obj
$(AssetDir)/Common/Cube.obj
$(AssetDir)/Common/Hemisphere.obj
$(AssetDir)/Common/BottomHemisphere.obj
$(AssetDir)/Common/Cylinder.obj
$(ShaderDir)/PrimitiveRenderingVS.hlsl
$(ShaderDir)/PrimitiveRenderingPS.hlsl
22 changes: 22 additions & 0 deletions Assets/AssetList.Release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Out:$(AssetDir)/Default.bin
$(AssetDir)/ReleaseAssets/Reloaded.Hooks.dll
$(AssetDir)/ReleaseAssets/Reloaded.Hooks.Definitions.dll
$(AssetDir)/ReleaseAssets/Reloaded.Assembler.dll
$(AssetDir)/ReleaseAssets/Reloaded.Memory.dll
$(AssetDir)/ReleaseAssets/Reloaded.Memory.Buffers.dll
$(AssetDir)/ReleaseAssets/Iced.dll
$(AssetDir)/ReleaseAssets/ImGui.NET.dll
$(AssetDir)/Common/Roboto-Bold.ttf
$(AssetDir)/Common/Roboto-Medium.ttf
$(AssetDir)/Common/NotoSansJP-Regular.ttf
$(AssetDir)/Common/fa-solid-900.ttf
$(AssetDir)/Common/AddressRecords.json
n:$(AssetDir)/Common/FASMX64.dll
n:$(AssetDir)/ReleaseAssets/cimgui.debug.dll
$(AssetDir)/Common/Sphere.obj
$(AssetDir)/Common/Cube.obj
$(AssetDir)/Common/Hemisphere.obj
$(AssetDir)/Common/BottomHemisphere.obj
$(AssetDir)/Common/Cylinder.obj
$(ShaderDir)/PrimitiveRenderingVS.hlsl
$(ShaderDir)/PrimitiveRenderingPS.hlsl
262 changes: 262 additions & 0 deletions Assets/Common/AddressRecords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
[
{
"Name": "AnimationLayerComponent:RegisterLmt",
"Pattern": "48 8b 81 60 04 00 00 48 85 c0 74 08 48 8b c8 e9 ? ? ? ? 48 8b 89 68 04 00 00 48 85 c9 ? ? ? ? ? ? c3",
"Offset": 0
},
{
"Name": "Entity:CreateEffect",
"Pattern": "48 81 EC 20 01 00 00 48 8B 59",
"Offset": -22
},
{
"Name": "Monster:LaunchAction",
"Pattern": "84 C0 74 1E 48 8B 8B E0 89 00 00 48 8D 54 24 38 41 B8 01 00 00",
"Offset": -24
},
{
"Name": "Monster:ForceAction",
"Pattern": "48 89 6C 24 30 48 8B CB 48 89 7C 24 38 4C 89 74 24 40 C6 86 A5 00 00 00",
"Offset": -40
},
{
"Name": "Monster:Enrage",
"Pattern": "C1 EA 03 F6 C2 01 74 07 32 C0 48 83 C4 28",
"Offset": -17
},
{
"Name": "Monster:Unenrage",
"Pattern": "83 E9 01 74 28 83 F9 01 75 37 83 A3 78 01 00 00",
"Offset": -21
},
{
"Name": "Monster:SpeedResetPatch1",
"Pattern": "C7 87 A8 D8 01 00 00 00 80 3F 44 88 BF 80 07 02",
"Offset": 0
},
{
"Name": "Monster:SpeedResetPatch2",
"Pattern": "89 82 A8 D8 01 00 80 BB BC 01 00 00",
"Offset": 0
},
{
"Name": "Player:ChangeWeapon",
"Pattern": "48 8B C4 55 41 54 48 81 EC 38 01 00 00 48 89 70",
"Offset": 0
},
{
"Name": "Player:FindMasterPlayer",
"Pattern": "49 8B 40 08 48 85 C0 74 06 F6 40 0C 0E 75 02 33 C0",
"Offset": -71
},
{
"Name": "Player:CreateShell",
"Pattern": "57 48 81 EC 90 01 00 00 48 89 58",
"Offset": -3
},
{
"Name": "EffectProvider:GetEffect",
"Pattern": "49 8D 83 B0 00 00 00 48 85 C0 74",
"Offset": -18
},
{
"Name": "ResourceManager:AddRef",
"Pattern": "FF 46 5C 80 7B 30 00 48 8B 5C 24 30",
"Offset": -56
},
{
"Name": "ResourceManager:Release",
"Pattern": "48 83 EC 20 40 32 F6 48 8B DA 48 8B F9 40 38 71 30 75 09",
"Offset": -11
},
{
"Name": "ShellParamList:GetShell",
"Pattern": "3B 91 B0 00 00 00 72 03 33 C0 C3 8B C2 48 C1 E0 04 48 03 81 A8 00 00 00 C3",
"Offset": 0
},
{
"Name": "Weapon:GetWeaponType",
"Pattern": "8B 80 F8 09 00 00 C3",
"Offset": -18
},
{
"Name": "Weapon:RegisterCol",
"Pattern": "41 83 F8 08 0F 83 0A 01 00 00 48 89 5C 24 10",
"Offset": 0
},
{
"Name": "ActionController:DoAction",
"Pattern": "48 8D 41 07 48 C1 E0 04 46 3B 04 08",
"Offset": -10
},
{
"Name": "Entity:DoAnimation",
"Pattern": "48 8D 68 B9 48 81 EC B0 00 00 00 0F 28 05 3A D7 24 01",
"Offset": -20
},
{
"Name": "AnimationLayerComponent:Update",
"Pattern": "55 53 56 57 41 54 41 55 41 56 41 57 48 8D A8 28 FE FF FF",
"Offset": -18
},
{
"Name": "Gui:DisplayPopup",
"Pattern": "48 8D 6C 24 F0 48 81 EC 10 01 00 00 80 79 30 00 48 8B D9 0F B6 45 40",
"Offset": -6
},
{
"Name": "Gui:DisplayMessage",
"Pattern": "0F 29 B4 24 B0 01 00 00 48 8B DA 0F 28 F2 48 8B F9 75 09",
"Offset": -25
},
{
"Name": "Gui:DisplayMessageWindow",
"Pattern": "57 48 83 EC 50 80 79 30 00 49 8B F9",
"Offset": -10
},
{
"Name": "Gui:DisplayAlert",
"Pattern": "F3 0F 11 4D 84 0F 57 C9 48 89 4C 24 68 48 8D 4C 24 20 48 89 44 24 58 F3 0F 11 45 88 F3 0F 11 4D 8C 48 89 7D E0 66 89 7D 90 89 7D 94 48 C7 45 9C 10 00 00 00",
"Offset": -112
},
{
"Name": "Chat:MessageSent",
"Pattern": "45 33 C0 48 8D 81 08 10 00 00",
"Offset": 0
},
{
"Name": "MtPropertyList:Find",
"Pattern": "4C 8B 49 08 4C 8B D2 4D 85 C9 74 34 0F 1F 40 00",
"Offset": 0
},
{
"Name": "MtPropertyList:FindByType",
"Pattern": "48 89 5C 24 08 4C 8B 49 08 49 8B D8",
"Offset": 0
},
{
"Name": "MtPropertyList:FindByHash",
"Pattern": "48 89 5C 24 08 57 48 83 EC 20 48 8B 59 08 8B FA 48 85 DB 74 39",
"Offset": 0
},
{
"Name": "MtPropertyList:operator[]",
"Pattern": "48 8B 41 08 45 33 C0 48 85 C0 74 12",
"Offset": 0
},
{
"Name": "Quest:AcceptQuest",
"Pattern": "40 53 57 41 57 48 83 EC 50 48 8B D9 45 0F B6 F8",
"Offset": 0
},
{
"Name": "Quest:EnterQuest",
"Pattern": "48 8B C4 55 48 81 EC F0 01 00 00 33 ED",
"Offset": 0
},
{
"Name": "Quest:ReturnFromQuest",
"Pattern": "40 57 48 83 EC 60 83 79 38 02 48 8B F9",
"Offset": 0
},
{
"Name": "Quest:LeaveQuest",
"Pattern": "00 84 c0 0F 84 ? ? ? ? BE B0 9E 51 00",
"Offset": -54
},
{
"Name": "Quest:AbandonQuest",
"Pattern": "F3 0F 2C C0 F3 0F 11 81 A4 31 01 00",
"Offset": -67
},
{
"Name": "Quest:CancelQuest",
"Pattern": "48 81 EC 60 02 00 00 45 33 FF 48 8B D9",
"Offset": -28
},
{
"Name": "Quest:EndQuest",
"Pattern": "41 0F B6 F9 33 D2 41 8B F0 48 8B D9",
"Offset": -37
},
{
"Name": "Quest:DepartOnQuest",
"Pattern": "48 8B C4 53 55 48 81 EC 08 02 00 00",
"Offset": 0
},
{
"Name": "Quest:GetQuestName",
"Pattern": "41 56 48 83 EC 20 48 8D B1 A0 AE 00 00",
"Offset": -20
},
{
"Name": "ResourceManager:GetResource",
"Pattern": "48 83 EC 30 80 B9 7B 80 20 00 00",
"Offset": -26
},
{
"Name": "MtDti:Find",
"Pattern": "39 48 34 74 0B 48 8B 40 28",
"Offset": -19
},
{
"Name": "MtArray:Reserve",
"Pattern": "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 20 48 8B F1 8B EA 48 8D 0D ? ? ? ? E8 ? ? ? ? 8B DD 41 B8 10 00 00 00 48 C1 E3 03",
"Offset": 0
},
{
"Name": "Monster:GetNameFromId",
"Pattern": "F7 80 68 4E 0F 00 00 04 00 00 75 14",
"Offset": -134
},
{
"Name": "Monster:Ctor",
"Pattern": "4C 89 B3 10 76 00 00",
"Offset": -60
},
{
"Name": "Entity:Initialize",
"Pattern": "48 8D 8F 40 05 00 00 48 8B D7",
"Offset": -18
},
{
"Name": "Monster:Flinch",
"Pattern": "8B A8 40 89 01 00",
"Offset": -98
},
{
"Name": "Monster:Die",
"Pattern": "48 8B E9 8B 82 80 47 01 00",
"Offset": -26
},
{
"Name": "Monster:Dtor",
"Pattern": "48 83 EC 20 48 8B B9 A0 09 00 00",
"Offset": -20
},
{
"Name": "Network:SendPacket",
"Pattern": "40 57 41 54 41 55 41 56 41 57",
"Offset": 0
},
{
"Name": "Network:ReceivePacket",
"Pattern": "41 8B F9 48 81 C1 E0 07 00 00",
"Offset": -30
},
{
"Name": "NetBuffer:Create",
"Pattern": "48 8B C2 48 89 51 48 44 89 41 50 33 D2 C7 41 54 00 00 00 00 48 8B C8 45 8B C0",
"Offset": 0
},
{
"Name": "NetBuffer:Ctor",
"Pattern": "33 C0 48 89 43 48 48 89 43 50 48 8B C3 48 83 C4 20",
"Offset": -24
},
{
"Name": "Entity:RegisterShll",
"Pattern": "48 8B D8 48 85 C0 74 2A 48 8B 0C F7",
"Offset": -40
}
]
Binary file added Assets/Common/FASMX64.dll
Binary file not shown.
Binary file added Assets/Common/NotoSansJP-Regular.ttf
Binary file not shown.
Binary file added Assets/Common/Roboto-Bold.ttf
Binary file not shown.
Binary file added Assets/Common/Roboto-Medium.ttf
Binary file not shown.
Binary file added Assets/Common/fa-solid-900.ttf
Binary file not shown.
Binary file added Assets/DebugAssets/Iced.dll
Binary file not shown.
Binary file added Assets/DebugAssets/ImGui.NET.dll
Binary file not shown.
Binary file added Assets/DebugAssets/Reloaded.Assembler.dll
Binary file not shown.
Binary file added Assets/DebugAssets/Reloaded.Hooks.Definitions.dll
Binary file not shown.
Binary file added Assets/DebugAssets/Reloaded.Hooks.dll
Binary file not shown.
Binary file added Assets/DebugAssets/Reloaded.Memory.Buffers.dll
Binary file not shown.
Binary file added Assets/DebugAssets/Reloaded.Memory.dll
Binary file not shown.
Binary file added Assets/DebugAssets/cimgui.debug.dll
Binary file not shown.
Binary file added Assets/Default.Debug.bin
Binary file not shown.
Binary file added Assets/ReleaseAssets/Iced.dll
Binary file not shown.
Binary file added Assets/ReleaseAssets/ImGui.NET.dll
Binary file not shown.
Binary file added Assets/ReleaseAssets/Reloaded.Assembler.dll
Binary file not shown.
Binary file not shown.
Binary file added Assets/ReleaseAssets/Reloaded.Hooks.dll
Binary file not shown.
Binary file not shown.
Binary file added Assets/ReleaseAssets/Reloaded.Memory.dll
Binary file not shown.
Binary file added Assets/ReleaseAssets/cimgui.dll
Binary file not shown.
75 changes: 75 additions & 0 deletions Assets/SharpPluginLoaderChunk.bt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//------------------------------------------------
//--- 010 Editor v13.0.1 Binary Template
//
// File: SharpPluginLoaderChunk
// Authors: Fexty
// Version:
// Purpose:
// Category:
// File Mask: *.bin
// ID Bytes: 62 69 6E 00
// History:
//------------------------------------------------

typedef struct {
char Magic[4];
uint Version;
int64 RootOffset;
FSeek(RootOffset);
} Header;

typedef struct {
int16 Length;
char String[Length];
} PrefixedString<read=Str("%s", this.String)>;

typedef enum<byte> {
ItemFile = 0,
ItemFolder = 1
} ItemType;

struct ChunkFolder;
struct ChunkFile;

typedef struct {
ItemType Type;
if (Type == ItemFile) {
ChunkFile file<read=Str("%s", this.Name.String)>;
} else if (Type == ItemFolder) {
ChunkFolder folder<read=Str("%s", this.Name.String)>;
} else {
Printf("ERROR: Invalid ItemType: %d", Type);
}
} ChunkItem;

struct ChunkFolder {
local int i;

int16 ChildCount;
PrefixedString Name;
for (i = 0; i < ChildCount; i++) {
Printf("ChunkItem[%i]\n", i);
ChunkItem Child<read=readItem>;
}
};

struct ChunkFile {
int32 ContentLength;
int32 DecompressedLength;
PrefixedString Name;
byte Contents[ContentLength];
};

string readItem(ChunkItem& x) {
if (x.Type == ItemFile) {
return x.file.Name.String;
} else if (x.Type == ItemFolder) {
return x.folder.Name.String;
} else {
return "Error";
}
}


Header header;
ChunkFolder Root<read=Str("%s", this.Name.String)>;
Loading

0 comments on commit e3c137a

Please sign in to comment.