Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //xDevKit.h
- //Source: http://www.mediafire.com/view/dm7v1adl9ziy0n8/Memory%2B%2B.h
- //Credits: DArK x1337HaX - Post on S7sins, CraigChrist's Devkit++, and TeamGeckos KYZA for Converting to C++.
- /*
- ################################
- # ----------- #
- # CREDITS #
- # ----------- #
- # CraigChrist8239 #
- # Original C# Version #
- # --------------------- #
- # KYZA #
- # Conversion To C++ #
- # ---------------------- #
- # #
- ################################
- */
- int DataType = 69;
- void ChangeDataType(int Type) {
- DataType = Type;
- }
- int GetDataType() {
- return DataType;
- }
- bool ReadBool(int offset) {
- return *(bool*)(bool)(offset);
- }
- __int16 ReadInt16(int offset) {
- return *(short*)(short)(offset);
- }
- int ReadInt32(int offset) {
- return *(int*)(int)(offset);
- }
- _int64 ReadInt64(int offset) {
- return *(long*)(long)(offset);
- }
- byte ReadByte(int offset) {
- return *(byte*)(byte)(offset);
- }
- unsigned __int16 ReadUInt16(int offset) {
- return *(unsigned short*)(unsigned short)(offset);
- }
- unsigned int ReadUInt32(int offset) {
- return *(unsigned int*)(unsigned int)(offset);
- }
- unsigned __int64 ReadUInt64(int offset) {
- return *(unsigned long*)(unsigned long)(offset);
- }
- float ReadFloat(int offset) {
- return *(float*)(float)(offset);
- }
- double ReadDouble(int offset) {
- return *(double*)(double)(offset);
- }
- const char *ReadString(int offset) {
- return *(const char*)(const char)(offset);
- }
- void WriteBool(int offset, bool input) {
- *(bool*)(offset) = (bool)input ? (byte)1 : (byte)0;
- }
- void WriteInt16(int offset, short input) {
- *(short*)(offset) = (short)input;
- }
- void WriteInt32(int offset, int input) {
- *(int*)(offset) = (int)input;
- }
- void WriteInt64(int offset, long input) {
- *(long*)(offset) = (long)input;
- }
- void WriteByte(int offset, byte input) {
- *(byte*)(offset) = (byte)input;
- }
- void WriteUInt16(int offset, unsigned __int16 input) {
- *(unsigned short*)(offset) = (unsigned short)input;
- }
- void WriteUInt32(int offset, unsigned int input) {
- *(unsigned int*)(offset) = (unsigned int)input;
- }
- void WriteUInt64(int offset, unsigned __int64 input) {
- *(unsigned long*)(offset) = (unsigned short)input;
- }
- void WriteDouble(int offset, double input) {
- *(double*)(offset) = (double)input;
- }
- void WriteString(int offset, const char*input) {
- strcpy((char*)(offset), input);
- }
- void WriteFloat(int offset, float input) {
- *(float*)(offset) = (float)input;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement