-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,050 additions
and
1,089 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include "MKCharacter.h" | ||
#include "mk10utils.h" | ||
#include "mk11.h" | ||
#include <iostream> | ||
#include <Windows.h> | ||
|
||
void MKCharacter::SetLife(float life) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404C8070))(this, life); | ||
} | ||
|
||
void MKCharacter::SetScale(FVector * scale) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, FVector*))_addr(0x141161920))(this, scale); | ||
} | ||
|
||
void MKCharacter::SetSpeed(float speed) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404C3D50))(this, speed); | ||
} | ||
|
||
void MKCharacter::SetMeter(eMeterValues meter, float value) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, eMeterValues, float))_addr(0x1405FA670))(this, meter, value); | ||
} | ||
|
||
void MKCharacter::SetEasyKrushingBlows(bool enable) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404C71B0))(this, enable, 1); | ||
} | ||
|
||
void MKCharacter::SetItem(int64 ptr, char * slot) | ||
{ | ||
((void(__fastcall*)(MKCharacter*, int64, char*))_addr(0x140818380))(this, ptr, slot); | ||
} | ||
|
||
CharacterInfo * MKCharacter::GetCharacterData(int unk) | ||
{ | ||
CharacterInfo* inf = ((CharacterInfo*(__fastcall*)(MKCharacter*,int))_addr(0x140C0DE60))(this, unk); | ||
|
||
printf("========\n"); | ||
printf("PTR: %x\n", inf); | ||
printf("Character: %s\n", inf->Name); | ||
printf("Class: %s\n", inf->CharacterClass); | ||
printf("CAP: %s %d %d 2: %s %d %d\n", inf->CAPs->cap[0].Name, inf->CAPs->cap[0].unk1, inf->CAPs->cap[0].unk2, | ||
inf->CAPs->cap[1].Name, inf->CAPs->cap[1].unk1, inf->CAPs->cap[1].unk2); | ||
printf("Model: %s\n", inf->CAPPath); | ||
printf("Asset: %s\n", inf->CharacterAssetPath); | ||
printf("Script: %s\n", inf->ScriptName); | ||
printf("ScriptAssets: %s\n", inf->CommonScriptAssets); | ||
printf("Root: %s\n", inf->RootPath); | ||
printf("============\n"); | ||
|
||
|
||
return inf; | ||
|
||
} | ||
|
||
|
||
bool MKCharacter::IsCrouching() | ||
{ | ||
return ((bool(__fastcall*)(MKCharacter*))_addr(0x14047ADB0))(this); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#pragma once | ||
#include "MKStructs.h" | ||
#include "mk10utils.h" | ||
enum eMeterValues { | ||
BAR_Offensive, | ||
BAR_Defensive | ||
}; | ||
|
||
struct CharacterCAP { | ||
char* Name; | ||
int unk1; | ||
int unk2; | ||
}; | ||
|
||
struct CharacterCAPData { | ||
CharacterCAP cap[5];// dunno how many | ||
}; | ||
struct CharacterInfo { | ||
char* Name; | ||
char pad[128]; | ||
char* CharacterClass; | ||
char _pad[8]; | ||
char* AssetDefinition; | ||
char __pad[40]; | ||
char* ScriptName; | ||
char ___pad[8]; | ||
char* ScriptAssets; | ||
char ____pad[24]; | ||
char* CommonScriptAssets; | ||
char _____pad[8]; | ||
char* CharacterAssetPath; | ||
char ______pad[24]; | ||
char* CAPPath; | ||
char _______pad[8]; | ||
char* RootPath; | ||
char ________pad[48]; | ||
CharacterCAPData* CAPs; | ||
char _________pad[8]; | ||
char* Package; | ||
char __________pad[8]; | ||
void* AudioTable; | ||
}; | ||
|
||
|
||
// wrapper for old functions | ||
class MKCharacter { | ||
public: | ||
void SetLife(float life); | ||
void SetScale(FVector* scale); | ||
void SetSpeed(float speed); | ||
void SetMeter(eMeterValues meter, float value); | ||
void SetEasyKrushingBlows(bool enable); | ||
void SetItem(int64 ptr, char* slot); | ||
|
||
CharacterInfo* GetCharacterData(int unk); | ||
|
||
bool IsCrouching(); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#pragma once |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "MKModifier.h" | ||
#include "mk10utils.h" | ||
|
||
TagModifier::TagModifier(const char * character) | ||
{ | ||
((void(__fastcall*)(BaseModifier*,const char*, int))_addr(0x1405457D0))(this, character, 0); | ||
} | ||
|
||
void TagModifier::Activate(int64 info) | ||
{ | ||
//140558320 | ||
((void(__fastcall*)(BaseModifier*, int64))_addr(0x140558320))(this, info); | ||
} | ||
|
||
void MKModifier::ActivateModifier(BaseModifier * modifier, MKCharacter * obj) | ||
{ | ||
((void(__fastcall*)(MKModifier*, BaseModifier*, MKCharacter*))_addr(0x140B85960))(this, modifier, obj); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
#include "MKCharacter.h" | ||
#include "mk10utils.h" | ||
|
||
class BaseModifier { | ||
public: | ||
char data[96] = {}; | ||
}; | ||
|
||
class TagModifier : public BaseModifier { | ||
public: | ||
TagModifier(const char* character); | ||
void Activate(int64 info); | ||
}; | ||
|
||
|
||
class MKModifier { | ||
public: | ||
void ActivateModifier(BaseModifier* modifier, MKCharacter* obj); | ||
}; | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
struct FVector | ||
{ | ||
float X; | ||
float Y; | ||
float Z; | ||
}; | ||
|
||
struct FRotator | ||
{ | ||
int Pitch; | ||
int Yaw; | ||
int Roll; | ||
}; | ||
|
||
|
||
struct FName { | ||
//todo | ||
}; | ||
|
||
struct FLinearColor | ||
{ | ||
float R; | ||
float G; | ||
float B; | ||
float A; | ||
}; | ||
|
||
|
||
struct character_info { | ||
char name[16]; | ||
}; |
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
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
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
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
Oops, something went wrong.