diff --git a/.github/workflows/Validate_File_Contents.yaml b/.github/workflows/Validate_File_Contents.yaml new file mode 100644 index 000000000..a3d55117e --- /dev/null +++ b/.github/workflows/Validate_File_Contents.yaml @@ -0,0 +1,38 @@ +name: Validate contents + +on: + workflow_dispatch: # manual trigger + + push: + paths: + - ".github/workflows/**" + - "examples/**/*.h*" + - "examples/**/*.c*" + - "plugin_*/**/*.c*" + - "plugin_*/**/*.h*" + - "plugin_*/**/*.c*" + - "shared/**/*.h*" + - "shared/**/*.c*" + + pull_request: + paths: + - ".github/workflows/**" + - "examples/**/*.h*" + - "examples/**/*.c*" + - "plugin_*/**/*.c*" + - "plugin_*/**/*.h*" + - "plugin_*/**/*.c*" + - "shared/**/*.h*" + - "shared/**/*.c*" + +jobs: + Validate_contents: + name: Validate contents + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Check files + run: node .github/workflows/scripts/Validate_Contents.js "github" diff --git a/.github/workflows/scripts/Validate_Contents.js b/.github/workflows/scripts/Validate_Contents.js new file mode 100644 index 000000000..6918971b6 --- /dev/null +++ b/.github/workflows/scripts/Validate_Contents.js @@ -0,0 +1,637 @@ +console.log("File contents validation:"); + +const fs = require("fs"); +const path = require("path"); + +const isGithubWorkflow = process.argv.includes("github"); + +let result = true; +result &= processDir("examples"); +result &= processDir("shared"); +result &= processDir("plugin_II"); +result &= processDir("plugin_III"); +result &= processDir("plugin_vc"); +result &= processDir("plugin_sa"); +result &= processDir("plugin_IV"); +result &= processDir("plugin_iii_unreal"); +result &= processDir("plugin_vc_unreal"); +result &= processDir("plugin_sa_unreal"); +//processFile("./plugin_IV/game_IV/rage/grcImage.h"); + +console.log(); +if (!result) +{ + console.log("Done"); + process.exit(1); // report workflow failed +} +else +{ + console.log("Done. No errors found"); + process.exit(0); +} + +function processDir(dir) +{ + console.log(); + console.log(`Processing "${dir}" directory...`); + + return walkRecursive(dir); +} + +function walkRecursive(dir) +{ + let result = true; + + const files = fs.readdirSync("./" + dir + "/", { withFileTypes: true }); + for (const file of files) + { + let filename = path.join(dir, file.name); + filename = filename.split(path.sep).join('/'); + + if (file.isDirectory()) + result &= walkRecursive(filename); + else + result &= processFile(filename); + } + + return result; +} + +function log(type, title, file, line, message) +{ + message = message.replace(/\t/, "[TAB]"); + + let msg = "\n" + type.toUpperCase() + ": " + title + "\n"; + msg += " File: \"" + file + "\", line: " + (line + 1) + "\n"; + msg += " " + message.replace(/\r?\n/, "\n "); + console.log(msg); + + if (isGithubWorkflow) + { + let flatMsg = message.replace(/\r?\n/, ", "); + console.log(`::${type} file=${file},line=${line+1},title=${title}::${flatMsg}`); + } +} + +function processFile(filename) +{ + let result = true; + + result &= processCodeFile(filename); + + return result; +} + +function processCodeFile(filename) +{ + const filetype = path.extname(filename).toLowerCase(); + const isHeader = [".h", ".hpp"].includes(filetype); + const isSource = [".c", ".cpp"].includes(filetype); + + if (!isHeader && !isSource) + return true; // not a code file + + // skip third-party and specific files + if (filename.includes("/bass/") || + filename.includes("/d3d/") || + filename.includes("/dxsdk/") || + filename.includes("/resource.h") || + filename.includes("/rw/") || + filename.includes("/rwd3d9/") || + filename.includes("/stdafx.h") || + filename.includes("/stdafx.cpp")) + return true; + + let result = true; + + result &= verifyPluginSdkComment(filename, isHeader); // check comment header + result = result && verifyDirectives(filename, isHeader); // includes and macros - lazy check + result = result && verifyMemoryLayoutInfo(filename); + + return result; +} + +function verifyPluginSdkComment(filename, isHeader) +{ + if(filename.startsWith("examples/")) + return true; // header comment not required in example projects + + let expected = "/*\n"; + + expected += " Plugin-SDK (Grand Theft Auto"; + if (filename.toLowerCase().startsWith("shared/")) + expected += ") SHARED"; + else + { + if (filename.toLowerCase().startsWith("plugin_ii/")) expected += " 2"; + if (filename.toLowerCase().startsWith("plugin_iii/")) expected += " 3"; + if (filename.toLowerCase().startsWith("plugin_vc/")) expected += " Vice City"; + if (filename.toLowerCase().startsWith("plugin_sa/")) expected += " San Andreas"; + if (filename.toLowerCase().startsWith("plugin_iv/")) expected += " IV"; + if (filename.toLowerCase().startsWith("plugin_iii_unreal/")) expected += " 3 Unreal"; + if (filename.toLowerCase().startsWith("plugin_vc_unreal/")) expected += " Vice City Unreal"; + if (filename.toLowerCase().startsWith("plugin_sa_unreal/")) expected += " San Andreas Unreal"; + expected += ")"; + } + + expected += " " + + if (isHeader) + expected += "header"; + else + expected += "source"; + expected += " file\n"; + + expected += " Authors: GTA Community. See more here\n"; + expected += " https://github.com/DK22Pac/plugin-sdk\n"; + expected += " Do not delete this comment block. Respect others' work!\n"; + expected += "*/"; + + const buffer = Buffer.alloc(expected.length + 100); + const fd = fs.openSync(filename, 'r'); + fs.readSync(fd, buffer, 0, expected.length + 100, 0); + fs.closeSync(fd); + let actual = buffer.toString('utf8'); + + // compare lines + const actualLines = actual.split(/\r?\n/); + const expectedLines = expected.split('\n'); + for (let i = 0; i < expectedLines.length; i++) + { + if (actualLines[i] !== expectedLines[i]) + { + log("error", "Invalid PSDK comment header", filename, i, `Desired: "${expectedLines[i]}"\nCurrent: "${actualLines[i]}"`); + return false; + } + } + + return true; +} + +function verifyDirectives(filename, isHeader) +{ + if (fs.statSync(filename).size > (6 * 1024 * 1024)) // skip files over 6 MB + { + log("warning", "Directives check skipped", filename, -1, `File "${filename}" has over 6 MB!`); + return true; // too big to process + } + + const content = fs.readFileSync(filename, 'utf-8'); + const lines = content.split(/\r?\n/); + + let firstLine = true; + let insideCommentBlock = false; + let afterCommentBlock = false; + + for (let i = 0; i < lines.length; i++) + { + const line = lines[i] + + if (firstLine && line.startsWith("/*")) + { + firstLine = false; + insideCommentBlock = true; + continue; + } + firstLine = false; + + if (insideCommentBlock) + { + if (line.includes("*/")) + insideCommentBlock = false; + + continue; + } + + // first non-comment line + if (afterCommentBlock == false) + { + if (isHeader && line != "#pragma once") + { + log("error", "Invalid include guard", filename, i, `Desired: "#pragma once"\nCurrent: "${line}"`); + return false; // missing include guard directive + } + + afterCommentBlock = true; + continue; + } + + break; + } + + return true; +} + +function verifyMemoryLayoutInfo(filename) +{ + if (!filename.endsWith(".h") || + filename.startsWith("examples/") || + (filename.startsWith("shared") && !filename.startsWith("shared/game")) || // only shared/game from shared + filename == "plugin_sa/game_sa/CShopping.h") // parsing of such nested types not implemented + return true; + + if (fs.statSync(filename).size > (6 * 1024 * 1024)) // skip files over 6 MB + { + log("warning", "Memory layout check skipped", filename, -1, `File "${filename}" has over 6 MB!`); + return true; // too big to process + } + + let contents = fs.readFileSync(filename, 'utf-8'); + let usedLineFeed = contents.includes("\r\n") ? "\r\n" : "\n"; + let lines = contents.split(/\r?\n/); + + // find class/struct declarations + let declaredTypes = [] + + const classStartRegex = /^([^\S\r\n]*)(template\s*<[^>]+>\s+)?(?*&]+(?:\s+[\w:<>*&]+)*[\s*&]*)\s+(?!\s*\()([^;:{}(:]+?)\s*(?::\s*(\d+))?\s*;)/gm; + + let results = []; + let handledTypes = []; + let block; + + let match; + while ((match = classStartRegex.exec(contents)) !== null) + { + const containerIndentation = match[1]; + const template = match[2]; + const type = match[3]; // "class" or "struct" + const containerName = match[4]; + + let braceCount = 1; + let lastIdx = classStartRegex.lastIndex; + let startPos = lastIdx; + + // find the matching closing brace + while (lastIdx < contents.length && braceCount > 0) + { + if (contents[lastIdx] === '{') braceCount++; + if (contents[lastIdx] === '}') braceCount--; + lastIdx++; + } + + if (template) // skip templated classes + { + classStartRegex.lastIndex = lastIdx; + continue; + } + + if (handledTypes.includes(containerName)) // skip duplicates/alternatives + { + classStartRegex.lastIndex = lastIdx; + continue; + } + handledTypes.push(containerName); + + const body = contents.substring(startPos, lastIdx - 1); + let members = GetMembers(body, (type === 'class') ? 'private' : 'public'); + + const containerEndLine = contents.substring(0, lastIdx).split(/\r?\n/).length; + + for (let i = 0; i < members.length; i++) + { + const expected = containerIndentation + "VALIDATE_OFFSET(" + containerName + ", " + members[i].name + ", 0x"; + const lineIdx = containerEndLine + i; + const line = lines[lineIdx] ? lines[lineIdx] : ''; + if (!line.startsWith(expected)) + { + log("error", "Missing member offset validation", filename, lineIdx, `Desired: "${expected}...);"\nCurrent: "${line}"`); + return false; + } + } + + const expected = containerIndentation + "VALIDATE_SIZE(" + containerName + ", 0x"; + const lineIdx = containerEndLine + members.length; + const line = lines[lineIdx] ? lines[lineIdx] : ''; + if (!line.startsWith(expected)) + { + log("error", "Missing type size validation", filename, lineIdx, `Desired: "${expected}...);"\nCurrent: "${line}"`); + return false; + } + + classStartRegex.lastIndex = lastIdx; + } + + return true +} + +function getRegexpMathGroupStartPos(match, groupIdx) +{ + let offset = match.index; + for (let i = 1; i < groupIdx; i++) + { + if (match[i]) + offset = match[0].indexOf(match[i], offset - match.index) + match.index + match[i].length; + } + return match[0].indexOf(match[groupIdx], offset - match.index) + match.index; +} + +function getContainerType(text, index) +{ + const textBefore = text.substring(0, index); + const openBraces = (textBefore.match(/\{/g) || []).length; + const closeBraces = (textBefore.match(/\}/g) || []).length; + + const defaultReturn = (type = 'global', name = null, isAnon = true, inst = null) => + ({ type, name, isAnonymous: isAnon, instanceName: inst, modifiers: "" }); + + if (openBraces <= closeBraces) return defaultReturn(); + + let braceLevel = 0; + let openingBraceIndex = -1; + for (let i = index - 1; i >= 0; i--) + { + if (text[i] === '}') braceLevel++; + if (text[i] === '{') + { + if (braceLevel === 0) + { + openingBraceIndex = i; + break; + } + braceLevel--; + } + } + + if (openingBraceIndex === -1) return defaultReturn(); + + const textBeforeBrace = text.substring(0, openingBraceIndex); + const varName = typeof getVarAfterBlock === 'function' ? getVarAfterBlock(text, index) : null; + + const lastDelimiter = Math.max( + textBeforeBrace.lastIndexOf('{'), + textBeforeBrace.lastIndexOf('}'), + textBeforeBrace.lastIndexOf(';') + ); + + const context = textBeforeBrace.substring(lastDelimiter + 1).trim(); + + // Helper: Returns a space-separated string of recognized keywords + const extractModifiers = (prefix) => { + if (!prefix) return ""; + const known = ['static', 'public', 'private', 'protected', 'virtual', 'inline', 'explicit', 'friend', 'extern', 'internal', 'volatile', 'async', 'sealed', 'abstract', 'partial', 'readonly']; + return prefix.trim().split(/\s+/) + .filter(word => known.includes(word.toLowerCase())) + .join(' '); + }; + + // 1. Function Match (Captures leading text in Group 1) + const funcRegex = /(?:([\w\s]+)\s+)?(?:operator\s*[+\-*/%^&|!<>~=,\[\]()]+|[a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)?)\s*\([^)]*\)(?:\s*(?:const|override|final|noexcept|explicit|volatile|[\w_]+))*\s*$/i; + const funcMatch = context.match(funcRegex); + if (funcMatch) + { + const sig = funcMatch[0].trim(); + const head = sig.split('(')[0].trim(); + const nameMatch = head.match(/(?:operator\s*.+|[\w_]+)$/); + return { + type: 'function', + name: nameMatch ? nameMatch[0].trim() : null, + isAnonymous: false, + instanceName: varName, + modifiers: extractModifiers(funcMatch[1]) + }; + } + + // 2. Container Match (Captures leading text in Group 1) + const contRegex = /(?:([\w\s]+)\s+)?(union|struct|class|enum)\b\s*([a-zA-Z_]\w*)?\s*(?::\s*[^;{]+)?$/i; + const contMatch = context.match(contRegex); + + if (contMatch) + { + return { + type: contMatch[2].toLowerCase(), + name: contMatch[3] || null, + isAnonymous: !contMatch[3], + instanceName: varName, + modifiers: extractModifiers(contMatch[1]) + }; + } + + return { ...defaultReturn('brackets', null, true, varName) }; +} + +function GetMembers(input, currentAccess) +{ + const strippedInput = input.replace(/\/\*[\s\S]*?\*\//g, (match) => match.replace(/[^\r\n]/g, ' ')); + const lineEndings = input.includes('\r\n') ? '\r\n' : '\n'; + const lines = strippedInput.split(lineEndings); + const results = []; + const accessRegex = /^\s*(public|private|protected)\s*:/; + const lineRegex = /^\s*(?!(?:return|if|else|for|while|virtual|typedef|using|union|struct|class|void|operator)\b)(?!(?:enum|struct|class)\s+\w+\s*;)([^;]+);/; + + let inputPos = 0; + let globalParenDepth = 0; + + for (let line of lines) + { + const trimmed = line.trim(); + const codePart = line.split('//')[0]; + + let parenDepthBeforeLine = globalParenDepth; + for (let char of codePart) + { + if (char === '(') globalParenDepth++; + else if (char === ')') globalParenDepth--; + } + + const hasParens = codePart.includes('(') && codePart.includes(')'); + const hasAssignment = codePart.includes('='); + const isOperator = trimmed.includes('operator'); + + const isFunction = (parenDepthBeforeLine > 0 && !trimmed.includes('[')) || + (hasParens && !hasAssignment && !trimmed.includes('[')) || + isOperator; + + if (isFunction || !trimmed || trimmed.startsWith('//') || trimmed === '};') + { + if (!hasAssignment || parenDepthBeforeLine > 0 || isOperator) + { + inputPos += line.length + lineEndings.length; + continue; + } + } + + const accessMatch = line.match(accessRegex); + if (accessMatch) + { + currentAccess = accessMatch[1]; + inputPos += line.length + lineEndings.length; + continue; + } + + if (line.trim().startsWith('typedef') || line.trim().startsWith('using')) + { + inputPos += line.length + lineEndings.length; + continue; + } + + const match = line.match(lineRegex); + if (match) + { + let content = match[1].trim(); + let bitWidth = null; + + const bitMatch = content.match(/\s*:\s*(\d+)$/); + if (bitMatch) + { + bitWidth = bitMatch[1]; + content = content.substring(0, bitMatch.index).trim(); + } + + let assignIdx = -1, aDepth = 0, tDepth = 0, bDepth = 0; + for (let i = 0; i < content.length; i++) + { + const c = content[i]; + if (c === '{') bDepth++; else if (c === '}') bDepth--; + else if (c === '<') tDepth++; else if (c === '>') tDepth--; + else if (c === '(') aDepth++; else if (c === ')') aDepth--; + else if (c === '=' && bDepth === 0 && tDepth === 0 && aDepth === 0) { assignIdx = i; break; } + } + if (assignIdx !== -1) content = content.substring(0, assignIdx).trim(); + + const parts = []; + let currentPart = "", dParens = 0, dBrackets = 0, dAngles = 0; + + for (let i = 0; i < content.length; i++) + { + const char = content[i]; + if (char === '(') dParens++; else if (char === ')') dParens--; + else if (char === '[') dBrackets++; else if (char === ']') dBrackets--; + else if (char === '<') dAngles++; else if (char === '>') dAngles--; + + if (/\s/.test(char) && (dParens + dBrackets + dAngles) === 0) + { + if (currentPart) + { + parts.push(currentPart); + currentPart = ""; + } + } + else + currentPart += char; + } + if (currentPart) parts.push(currentPart); + + if (parts.length >= 2) + { + let splitIdx = parts.length - 1; + for (let i = 0; i < parts.length; i++) + { + if (parts[i].includes(',')) { splitIdx = i; break; } + } + + let typePart = parts.slice(0, splitIdx).join(" ").trim(); + let namePart = parts.slice(splitIdx).join(" ").trim(); + + const symbolMatch = namePart.match(/^[*& \t]+/); + if (symbolMatch) + { + typePart += (typePart ? " " : "") + symbolMatch[0].trim(); + namePart = namePart.substring(symbolMatch[0].length).trim(); + } + + typePart = typePart.replace(/^[A-Z0-9_]{3,}\s+/, '').trim(); + + const blockInfo = getContainerType(strippedInput, inputPos + line.indexOf(match[1])); + + if (blockInfo.instanceName) + { + if (!blockInfo.modifiers.includes("static") && (!results.length || results[results.length - 1].nameRaw != blockInfo.instanceName)) + { + let cleanName = blockInfo.instanceName.split('[')[0].trim(); + cleanName = cleanName.replace(/[*&]/g, ''); + + results.push({ + access: currentAccess, + type: typePart, + name: cleanName, + nameRaw: blockInfo.instanceName, + bitWidth: bitWidth + }); + } + + inputPos += line.length + lineEndings.length; + continue; + } + + if (blockInfo.type == "function" || blockInfo.type == "brackets" || !blockInfo.isAnonymous) + { + inputPos += line.length + lineEndings.length; + continue; + } + + let names = namePart.split(',').map(n => n.trim()); + if (currentAccess === "public" && !typePart.includes("static") && !bitWidth) + { + for (let n of names) + { + let cleanName = n.split('[')[0].trim(); + if (/\s/.test(cleanName) || cleanName.includes('(')) continue; + cleanName = cleanName.replace(/[*&]/g, ''); + + if (["{}", "const"].includes(cleanName)) + continue; // random invalid junk + + if (results.length && results[results.length - 1].name == cleanName) + continue; // skip duplicate + + results.push({ + access: currentAccess, + type: typePart, + name: cleanName, + nameRaw: n, + bitWidth: bitWidth + }); + } + } + } + } + inputPos += line.length + lineEndings.length; + } + return results; +} + +function getVarAfterBlock(code, pos) +{ + // backwards to find the actual start of the block we are in + let startPos = pos; + let findDepth = 0; + while (startPos >= 0) + { + if (code[startPos] === '}') findDepth++; + if (code[startPos] === '{') + { + if (findDepth === 0) break; + findDepth--; + } + startPos--; + } + + if (startPos < 0) return null; // not inside block + + let depth = 0; + for (let i = startPos; i < code.length; i++) + { + if (code[i] === '{') + { + depth++; + } + else if (code[i] === '}') + { + depth--; + if (depth === 0) + { + const afterBlock = code.substring(i + 1); + const match = afterBlock.match(/^\s*([^;{ \t\n\r]+)\s*;/); // skip whitespace/newlines, capture word, expect semicolon + + if (match) + { + return match[1].trim(); + } + return null; // Block ended but no variable name followed + } + } + } + + return null; +} diff --git a/examples/Neon/KeyCheck.cpp b/examples/Neon/KeyCheck.cpp index 1f0adb859..f02f2dc2f 100644 --- a/examples/Neon/KeyCheck.cpp +++ b/examples/Neon/KeyCheck.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "KeyCheck.h" #include "plugin.h" diff --git a/examples/Neon/KeyCheck.h b/examples/Neon/KeyCheck.h index f83207c0e..9f87fc112 100644 --- a/examples/Neon/KeyCheck.h +++ b/examples/Neon/KeyCheck.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/examples/UnitTests/source/utest.h b/examples/UnitTests/source/utest.h index 1566adb26..b6e8efa9c 100644 --- a/examples/UnitTests/source/utest.h +++ b/examples/UnitTests/source/utest.h @@ -2,6 +2,7 @@ The latest version of this library is available on GitHub; https://github.com/sheredom/utest.h */ +#pragma once /* This is free and unencumbered software released into the public domain. diff --git a/plugin_II/game_II/CAudioManager.h b/plugin_II/game_II/CAudioManager.h index ef473ad11..472d6e041 100644 --- a/plugin_II/game_II/CAudioManager.h +++ b/plugin_II/game_II/CAudioManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -32,12 +31,24 @@ struct tAudioObject { int field_8; void* field_C; }; +VALIDATE_OFFSET(tAudioObject, type, 0x0); +VALIDATE_OFFSET(tAudioObject, field_4, 0x4); +VALIDATE_OFFSET(tAudioObject, field_5, 0x5); +VALIDATE_OFFSET(tAudioObject, field_6, 0x6); +VALIDATE_OFFSET(tAudioObject, field_7, 0x7); +VALIDATE_OFFSET(tAudioObject, field_8, 0x8); +VALIDATE_OFFSET(tAudioObject, field_C, 0xC); +VALIDATE_SIZE(tAudioObject, 0x10); struct tSound5 { int field_0; int field_4; int field_8; }; +VALIDATE_OFFSET(tSound5, field_0, 0x0); +VALIDATE_OFFSET(tSound5, field_4, 0x4); +VALIDATE_OFFSET(tSound5, field_8, 0x8); +VALIDATE_SIZE(tSound5, 0xC); struct tSound4 { int field_0; @@ -49,6 +60,15 @@ struct tSound4 { char field_A; char field_B; }; +VALIDATE_OFFSET(tSound4, field_0, 0x0); +VALIDATE_OFFSET(tSound4, field_4, 0x4); +VALIDATE_OFFSET(tSound4, field_5, 0x5); +VALIDATE_OFFSET(tSound4, field_6, 0x6); +VALIDATE_OFFSET(tSound4, field_7, 0x7); +VALIDATE_OFFSET(tSound4, field_8, 0x8); +VALIDATE_OFFSET(tSound4, field_A, 0xA); +VALIDATE_OFFSET(tSound4, field_B, 0xB); +VALIDATE_SIZE(tSound4, 0xC); struct tAudioEntity { char used; @@ -58,6 +78,13 @@ struct tAudioEntity { tAudioObject* obj; tSound4* alloc; }; +VALIDATE_OFFSET(tAudioEntity, used, 0x0); +VALIDATE_OFFSET(tAudioEntity, field_1, 0x1); +VALIDATE_OFFSET(tAudioEntity, field_2, 0x2); +VALIDATE_OFFSET(tAudioEntity, field_3, 0x3); +VALIDATE_OFFSET(tAudioEntity, obj, 0x4); +VALIDATE_OFFSET(tAudioEntity, alloc, 0x8); +VALIDATE_SIZE(tAudioEntity, 0xC); struct tSound2 { char field_0; @@ -68,6 +95,14 @@ struct tSound2 { tAudioObject field_8; int field_18; }; +VALIDATE_OFFSET(tSound2, field_0, 0x0); +VALIDATE_OFFSET(tSound2, field_1, 0x1); +VALIDATE_OFFSET(tSound2, field_2, 0x2); +VALIDATE_OFFSET(tSound2, field_3, 0x3); +VALIDATE_OFFSET(tSound2, field_4_fp, 0x4); +VALIDATE_OFFSET(tSound2, field_8, 0x8); +VALIDATE_OFFSET(tSound2, field_18, 0x18); +VALIDATE_SIZE(tSound2, 0x1C); struct tSound { int field_0; @@ -116,6 +151,52 @@ struct tSound { char field_63; int field_64; }; +VALIDATE_OFFSET(tSound, field_0, 0x0); +VALIDATE_OFFSET(tSound, field_4, 0x4); +VALIDATE_OFFSET(tSound, field_5, 0x5); +VALIDATE_OFFSET(tSound, field_6, 0x6); +VALIDATE_OFFSET(tSound, field_7, 0x7); +VALIDATE_OFFSET(tSound, field_8, 0x8); +VALIDATE_OFFSET(tSound, field_14, 0x14); +VALIDATE_OFFSET(tSound, field_18, 0x18); +VALIDATE_OFFSET(tSound, field_19, 0x19); +VALIDATE_OFFSET(tSound, field_1A, 0x1A); +VALIDATE_OFFSET(tSound, field_1B, 0x1B); +VALIDATE_OFFSET(tSound, field_1C, 0x1C); +VALIDATE_OFFSET(tSound, rate, 0x20); +VALIDATE_OFFSET(tSound, volume, 0x24); +VALIDATE_OFFSET(tSound, field_25, 0x25); +VALIDATE_OFFSET(tSound, field_26, 0x26); +VALIDATE_OFFSET(tSound, field_27, 0x27); +VALIDATE_OFFSET(tSound, field_28, 0x28); +VALIDATE_OFFSET(tSound, field_2C, 0x2C); +VALIDATE_OFFSET(tSound, field_2D, 0x2D); +VALIDATE_OFFSET(tSound, field_2E, 0x2E); +VALIDATE_OFFSET(tSound, field_2F, 0x2F); +VALIDATE_OFFSET(tSound, field_30, 0x30); +VALIDATE_OFFSET(tSound, field_34, 0x34); +VALIDATE_OFFSET(tSound, field_38, 0x38); +VALIDATE_OFFSET(tSound, field_3C, 0x3C); +VALIDATE_OFFSET(tSound, field_40, 0x40); +VALIDATE_OFFSET(tSound, field_41, 0x41); +VALIDATE_OFFSET(tSound, field_42, 0x42); +VALIDATE_OFFSET(tSound, field_43, 0x43); +VALIDATE_OFFSET(tSound, field_44, 0x44); +VALIDATE_OFFSET(tSound, field_48, 0x48); +VALIDATE_OFFSET(tSound, field_4C, 0x4C); +VALIDATE_OFFSET(tSound, field_50, 0x50); +VALIDATE_OFFSET(tSound, field_51, 0x51); +VALIDATE_OFFSET(tSound, field_52, 0x52); +VALIDATE_OFFSET(tSound, field_53, 0x53); +VALIDATE_OFFSET(tSound, field_54, 0x54); +VALIDATE_OFFSET(tSound, field_58, 0x58); +VALIDATE_OFFSET(tSound, field_5C, 0x5C); +VALIDATE_OFFSET(tSound, field_60, 0x60); +VALIDATE_OFFSET(tSound, field_61, 0x61); +VALIDATE_OFFSET(tSound, field_62, 0x62); +VALIDATE_OFFSET(tSound, field_63, 0x63); +VALIDATE_OFFSET(tSound, field_64, 0x64); +VALIDATE_SIZE(tSound, 0x68); class PLUGIN_API CAudioManager { public: @@ -230,11 +311,118 @@ class PLUGIN_API CAudioManager { short field_5570; short field_5572; int field_5574; - -public: -; }; - +VALIDATE_OFFSET(CAudioManager, field_0, 0x0); +VALIDATE_OFFSET(CAudioManager, field_1, 0x1); +VALIDATE_OFFSET(CAudioManager, field_2, 0x2); +VALIDATE_OFFSET(CAudioManager, field_3, 0x3); +VALIDATE_OFFSET(CAudioManager, field_4, 0x4); +VALIDATE_OFFSET(CAudioManager, field_8, 0x8); +VALIDATE_OFFSET(CAudioManager, field_9, 0x9); +VALIDATE_OFFSET(CAudioManager, field_A, 0xA); +VALIDATE_OFFSET(CAudioManager, field_B, 0xB); +VALIDATE_OFFSET(CAudioManager, field_C, 0xC); +VALIDATE_OFFSET(CAudioManager, m_nActiveSamples, 0x10); +VALIDATE_OFFSET(CAudioManager, field_11, 0x11); +VALIDATE_OFFSET(CAudioManager, field_12, 0x12); +VALIDATE_OFFSET(CAudioManager, field_13, 0x13); +VALIDATE_OFFSET(CAudioManager, m_nSampleRate, 0x14); +VALIDATE_OFFSET(CAudioManager, field_18, 0x18); +VALIDATE_OFFSET(CAudioManager, field_19, 0x19); +VALIDATE_OFFSET(CAudioManager, field_1A, 0x1A); +VALIDATE_OFFSET(CAudioManager, field_1B, 0x1B); +VALIDATE_OFFSET(CAudioManager, m_nSampCount, 0x1C); +VALIDATE_OFFSET(CAudioManager, m_bSound3d, 0x1D); +VALIDATE_OFFSET(CAudioManager, field_1E, 0x1E); +VALIDATE_OFFSET(CAudioManager, field_1F, 0x1F); +VALIDATE_OFFSET(CAudioManager, field_20, 0x20); +VALIDATE_OFFSET(CAudioManager, m_nEffectsVolume, 0x24); +VALIDATE_OFFSET(CAudioManager, m_nMusicVolume, 0x25); +VALIDATE_OFFSET(CAudioManager, field_26, 0x26); +VALIDATE_OFFSET(CAudioManager, field_27, 0x27); +VALIDATE_OFFSET(CAudioManager, field_28, 0x28); +VALIDATE_OFFSET(CAudioManager, field_2C, 0x2C); +VALIDATE_OFFSET(CAudioManager, field_2D, 0x2D); +VALIDATE_OFFSET(CAudioManager, field_2E, 0x2E); +VALIDATE_OFFSET(CAudioManager, field_2F, 0x2F); +VALIDATE_OFFSET(CAudioManager, m_sQueueSample, 0x30); +VALIDATE_OFFSET(CAudioManager, m_nActiveSampleQueue, 0x98); +VALIDATE_OFFSET(CAudioManager, field_99, 0x99); +VALIDATE_OFFSET(CAudioManager, field_9A, 0x9A); +VALIDATE_OFFSET(CAudioManager, field_9B, 0x9B); +VALIDATE_OFFSET(CAudioManager, m_asSamples, 0x9C); +VALIDATE_OFFSET(CAudioManager, m_aSampleQueueIndexTable, 0xD9C); +VALIDATE_OFFSET(CAudioManager, m_aSampleRequestQueuesStatus, 0xDBC); +VALIDATE_OFFSET(CAudioManager, field_DBE, 0xDBE); +VALIDATE_OFFSET(CAudioManager, m_asActiveSamples, 0xDC0); +VALIDATE_OFFSET(CAudioManager, field_1440, 0x1440); +VALIDATE_OFFSET(CAudioManager, field_1444, 0x1444); +VALIDATE_OFFSET(CAudioManager, field_1445, 0x1445); +VALIDATE_OFFSET(CAudioManager, field_1446, 0x1446); +VALIDATE_OFFSET(CAudioManager, field_1447, 0x1447); +VALIDATE_OFFSET(CAudioManager, field_1448, 0x1448); +VALIDATE_OFFSET(CAudioManager, field_144C, 0x144C); +VALIDATE_OFFSET(CAudioManager, field_1450, 0x1450); +VALIDATE_OFFSET(CAudioManager, field_1451, 0x1451); +VALIDATE_OFFSET(CAudioManager, field_1452, 0x1452); +VALIDATE_OFFSET(CAudioManager, field_1453, 0x1453); +VALIDATE_OFFSET(CAudioManager, m_anRandomTable, 0x1454); +VALIDATE_OFFSET(CAudioManager, field_1468_v1, 0x1468); +VALIDATE_OFFSET(CAudioManager, field_146C_v2, 0x146C); +VALIDATE_OFFSET(CAudioManager, field_1470_v3, 0x1470); +VALIDATE_OFFSET(CAudioManager, field_1474, 0x1474); +VALIDATE_OFFSET(CAudioManager, field_1476, 0x1476); +VALIDATE_OFFSET(CAudioManager, field_1477, 0x1477); +VALIDATE_OFFSET(CAudioManager, field_1478, 0x1478); +VALIDATE_OFFSET(CAudioManager, m_asAudioEntities, 0x147C); +VALIDATE_OFFSET(CAudioManager, m_anAudioEntityIndices, 0x444C); +VALIDATE_OFFSET(CAudioManager, m_nAudioEntitiesTotal, 0x543C); +VALIDATE_OFFSET(CAudioManager, field_5440, 0x5440); +VALIDATE_OFFSET(CAudioManager, field_5444, 0x5444); +VALIDATE_OFFSET(CAudioManager, m_nFrameCounter, 0x5448); +VALIDATE_OFFSET(CAudioManager, field_544C, 0x544C); +VALIDATE_OFFSET(CAudioManager, field_54D8, 0x54D8); +VALIDATE_OFFSET(CAudioManager, field_54DD, 0x54DD); +VALIDATE_OFFSET(CAudioManager, field_54DE, 0x54DE); +VALIDATE_OFFSET(CAudioManager, field_54DF, 0x54DF); +VALIDATE_OFFSET(CAudioManager, field_54E0, 0x54E0); +VALIDATE_OFFSET(CAudioManager, field_54E1, 0x54E1); +VALIDATE_OFFSET(CAudioManager, field_54E2, 0x54E2); +VALIDATE_OFFSET(CAudioManager, field_54E3, 0x54E3); +VALIDATE_OFFSET(CAudioManager, field_54E4, 0x54E4); +VALIDATE_OFFSET(CAudioManager, field_54E5, 0x54E5); +VALIDATE_OFFSET(CAudioManager, field_54E6, 0x54E6); +VALIDATE_OFFSET(CAudioManager, field_54E7, 0x54E7); +VALIDATE_OFFSET(CAudioManager, field_54E8, 0x54E8); +VALIDATE_OFFSET(CAudioManager, field_54F2, 0x54F2); +VALIDATE_OFFSET(CAudioManager, field_54F7, 0x54F7); +VALIDATE_OFFSET(CAudioManager, field_54FC, 0x54FC); +VALIDATE_OFFSET(CAudioManager, field_5500, 0x5500); +VALIDATE_OFFSET(CAudioManager, field_5504, 0x5504); +VALIDATE_OFFSET(CAudioManager, field_5505, 0x5505); +VALIDATE_OFFSET(CAudioManager, field_5506, 0x5506); +VALIDATE_OFFSET(CAudioManager, field_5507, 0x5507); +VALIDATE_OFFSET(CAudioManager, m_nGameAudioEntity, 0x5508); +VALIDATE_OFFSET(CAudioManager, m_GameAudioObject, 0x550C); +VALIDATE_OFFSET(CAudioManager, field_551C, 0x551C); +VALIDATE_OFFSET(CAudioManager, field_5520, 0x5520); +VALIDATE_OFFSET(CAudioManager, field_5521, 0x5521); +VALIDATE_OFFSET(CAudioManager, field_5522, 0x5522); +VALIDATE_OFFSET(CAudioManager, field_5523, 0x5523); +VALIDATE_OFFSET(CAudioManager, field_5524, 0x5524); +VALIDATE_OFFSET(CAudioManager, field_5528, 0x5528); +VALIDATE_OFFSET(CAudioManager, field_5529, 0x5529); +VALIDATE_OFFSET(CAudioManager, field_552A, 0x552A); +VALIDATE_OFFSET(CAudioManager, field_552B, 0x552B); +VALIDATE_OFFSET(CAudioManager, field_552C, 0x552C); +VALIDATE_OFFSET(CAudioManager, field_5568, 0x5568); +VALIDATE_OFFSET(CAudioManager, field_5569, 0x5569); +VALIDATE_OFFSET(CAudioManager, field_556A, 0x556A); +VALIDATE_OFFSET(CAudioManager, field_556C, 0x556C); +VALIDATE_OFFSET(CAudioManager, field_556E, 0x556E); +VALIDATE_OFFSET(CAudioManager, field_5570, 0x5570); +VALIDATE_OFFSET(CAudioManager, field_5572, 0x5572); +VALIDATE_OFFSET(CAudioManager, field_5574, 0x5574); VALIDATE_SIZE(CAudioManager, 0x5578); extern CAudioManager& AudioManager; diff --git a/plugin_II/game_II/CCamera.h b/plugin_II/game_II/CCamera.h index 696855656..234f37ecb 100644 --- a/plugin_II/game_II/CCamera.h +++ b/plugin_II/game_II/CCamera.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CEncodedVector.h" @@ -17,7 +16,7 @@ class CCamera { CObject* m_pObject; CEncodedVector m_vNextPosition; CObject* m_pNextObject; - unsigned __int8 field_20[16]; + unsigned char field_20[16]; int m_nMovementBitmask; void* field_24; unsigned int field_26; @@ -26,9 +25,9 @@ class CCamera { unsigned int field_38; void* field_42; char m_nAccuracy; - unsigned __int8 field_77; - unsigned __int8 field_78; - unsigned __int8 field_79; + unsigned char field_77; + unsigned char field_78; + unsigned char field_79; unsigned int field_80; unsigned int field_84; unsigned int field_88; @@ -56,7 +55,44 @@ class CCamera { void WorldToScreen2D(int x, int y, int z, int* outX, int* outY); void WorldToScreen2D(CEncodedVector in, CEncodedVector2D* out); }; - +VALIDATE_OFFSET(CCamera, m_vPosition, 0x0); +VALIDATE_OFFSET(CCamera, m_pObject, 0xC); +VALIDATE_OFFSET(CCamera, m_vNextPosition, 0x10); +VALIDATE_OFFSET(CCamera, m_pNextObject, 0x1C); +VALIDATE_OFFSET(CCamera, field_20, 0x20); +VALIDATE_OFFSET(CCamera, m_nMovementBitmask, 0x30); +VALIDATE_OFFSET(CCamera, field_24, 0x34); +VALIDATE_OFFSET(CCamera, field_26, 0x38); +VALIDATE_OFFSET(CCamera, field_30, 0x3C); +VALIDATE_OFFSET(CCamera, m_nTimer, 0x40); +VALIDATE_OFFSET(CCamera, field_38, 0x44); +VALIDATE_OFFSET(CCamera, field_42, 0x48); +VALIDATE_OFFSET(CCamera, m_nAccuracy, 0x4C); +VALIDATE_OFFSET(CCamera, field_77, 0x4D); +VALIDATE_OFFSET(CCamera, field_78, 0x4E); +VALIDATE_OFFSET(CCamera, field_79, 0x4F); +VALIDATE_OFFSET(CCamera, field_80, 0x50); +VALIDATE_OFFSET(CCamera, field_84, 0x54); +VALIDATE_OFFSET(CCamera, field_88, 0x58); +VALIDATE_OFFSET(CCamera, field_92, 0x5C); +VALIDATE_OFFSET(CCamera, field_96, 0x60); +VALIDATE_OFFSET(CCamera, field_100, 0x64); +VALIDATE_OFFSET(CCamera, m_nWidth, 0x68); +VALIDATE_OFFSET(CCamera, m_nHeight, 0x6C); +VALIDATE_OFFSET(CCamera, m_nHalfWidth, 0x70); +VALIDATE_OFFSET(CCamera, m_nHalfHeight, 0x74); +VALIDATE_OFFSET(CCamera, m_nScreenX, 0x78); +VALIDATE_OFFSET(CCamera, m_nScreenW, 0x7C); +VALIDATE_OFFSET(CCamera, m_nScreenY, 0x80); +VALIDATE_OFFSET(CCamera, m_nScreenH, 0x84); +VALIDATE_OFFSET(CCamera, m_vCamPosition, 0x88); +VALIDATE_OFFSET(CCamera, field_148, 0x94); +VALIDATE_OFFSET(CCamera, m_vPosInterp, 0x98); +VALIDATE_OFFSET(CCamera, field_164, 0xA4); +VALIDATE_OFFSET(CCamera, m_nHudScale, 0xA8); +VALIDATE_OFFSET(CCamera, m_vVelocity, 0xAC); +VALIDATE_OFFSET(CCamera, m_nCameraHeadVelocity, 0xB4); +VALIDATE_OFFSET(CCamera, field_184, 0xB8); VALIDATE_SIZE(CCamera, 0xBC); extern CCamera* TheCamera; diff --git a/plugin_II/game_II/CCar.h b/plugin_II/game_II/CCar.h index ee015b3d4..5570fffd0 100644 --- a/plugin_II/game_II/CCar.h +++ b/plugin_II/game_II/CCar.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CSprite.h" @@ -189,7 +188,16 @@ struct tCarDoor { unsigned char field_e; unsigned char field_f; }; - +VALIDATE_OFFSET(tCarDoor, animationFrame, 0x0); +VALIDATE_OFFSET(tCarDoor, field_1, 0x1); +VALIDATE_OFFSET(tCarDoor, index, 0x2); +VALIDATE_OFFSET(tCarDoor, field_3, 0x3); +VALIDATE_OFFSET(tCarDoor, state, 0x4); +VALIDATE_OFFSET(tCarDoor, ped, 0x8); +VALIDATE_OFFSET(tCarDoor, field_c, 0xC); +VALIDATE_OFFSET(tCarDoor, field_d, 0xD); +VALIDATE_OFFSET(tCarDoor, field_e, 0xE); +VALIDATE_OFFSET(tCarDoor, field_f, 0xF); VALIDATE_SIZE(tCarDoor, 0x10); struct tRoof { @@ -205,11 +213,26 @@ struct tRoof { unsigned char field_16; unsigned char field_17; }; +VALIDATE_OFFSET(tRoof, sprite, 0x0); +VALIDATE_OFFSET(tRoof, next, 0x4); +VALIDATE_OFFSET(tRoof, x, 0x8); +VALIDATE_OFFSET(tRoof, y, 0xC); +VALIDATE_OFFSET(tRoof, rotation, 0x10); +VALIDATE_OFFSET(tRoof, field_12, 0x12); +VALIDATE_OFFSET(tRoof, field_13, 0x13); +VALIDATE_OFFSET(tRoof, field_14, 0x14); +VALIDATE_OFFSET(tRoof, field_15, 0x15); +VALIDATE_OFFSET(tRoof, field_16, 0x16); +VALIDATE_OFFSET(tRoof, field_17, 0x17); +VALIDATE_SIZE(tRoof, 0x18); struct tPassenger { CPed* ped; tPassenger* prev; }; +VALIDATE_OFFSET(tPassenger, ped, 0x0); +VALIDATE_OFFSET(tPassenger, prev, 0x4); +VALIDATE_SIZE(tPassenger, 0x8); class PLUGIN_API CCar { public: @@ -277,5 +300,63 @@ class PLUGIN_API CCar { void SetPosition(CEncodedVector pos); void SetRemap(short remap); }; - +VALIDATE_OFFSET(CCar, m_pRoof, 0x0); +VALIDATE_OFFSET(CCar, m_pLastPassenger, 0x4); +VALIDATE_OFFSET(CCar, m_nCarLights, 0x8); +VALIDATE_OFFSET(CCar, m_aCarDoor, 0xC); +VALIDATE_OFFSET(CCar, m_pLastCar, 0x4C); +VALIDATE_OFFSET(CCar, m_pSprite, 0x50); +VALIDATE_OFFSET(CCar, m_pDriver, 0x54); +VALIDATE_OFFSET(CCar, m_pPhysics, 0x58); +VALIDATE_OFFSET(CCar, field_56, 0x5C); +VALIDATE_OFFSET(CCar, field_60, 0x60); +VALIDATE_OFFSET(CCar, m_pTrailerCtrl, 0x64); +VALIDATE_OFFSET(CCar, field_68, 0x68); +VALIDATE_OFFSET(CCar, m_nIndex, 0x6C); +VALIDATE_OFFSET(CCar, m_bDamaged, 0x70); +VALIDATE_OFFSET(CCar, field_71, 0x71); +VALIDATE_OFFSET(CCar, field_72, 0x72); +VALIDATE_OFFSET(CCar, field_73, 0x73); +VALIDATE_OFFSET(CCar, m_nDamage, 0x74); +VALIDATE_OFFSET(CCar, field_76, 0x76); +VALIDATE_OFFSET(CCar, m_nBitMask, 0x78); +VALIDATE_OFFSET(CCar, field_7a, 0x7A); +VALIDATE_OFFSET(CCar, field_7b, 0x7B); +VALIDATE_OFFSET(CCar, field_7c, 0x7C); +VALIDATE_OFFSET(CCar, field_80, 0x80); +VALIDATE_OFFSET(CCar, field_81, 0x81); +VALIDATE_OFFSET(CCar, field_82, 0x82); +VALIDATE_OFFSET(CCar, field_83, 0x83); +VALIDATE_OFFSET(CCar, m_nModel, 0x84); +VALIDATE_OFFSET(CCar, m_nMask, 0x88); +VALIDATE_OFFSET(CCar, m_nFire, 0x8C); +VALIDATE_OFFSET(CCar, field_8d, 0x8D); +VALIDATE_OFFSET(CCar, m_nAlarmTimer, 0x8E); +VALIDATE_OFFSET(CCar, field_8f, 0x8F); +VALIDATE_OFFSET(CCar, m_nDamageType, 0x90); +VALIDATE_OFFSET(CCar, m_nDamageShotTimer, 0x94); +VALIDATE_OFFSET(CCar, m_nPlayerId, 0x95); +VALIDATE_OFFSET(CCar, field_96, 0x96); +VALIDATE_OFFSET(CCar, field_97, 0x97); +VALIDATE_OFFSET(CCar, m_nDoorLockState, 0x98); +VALIDATE_OFFSET(CCar, m_nEngineState, 0x9C); +VALIDATE_OFFSET(CCar, m_nTrafficCarType, 0xA0); +VALIDATE_OFFSET(CCar, m_nSirenState, 0xA4); +VALIDATE_OFFSET(CCar, m_nSirenPhase, 0xA5); +VALIDATE_OFFSET(CCar, field_a6, 0xA6); +VALIDATE_OFFSET(CCar, m_bHorn, 0xA7); +VALIDATE_OFFSET(CCar, field_a8, 0xA8); +VALIDATE_OFFSET(CCar, m_nFireTimer, 0xA9); +VALIDATE_OFFSET(CCar, field_aa, 0xAA); +VALIDATE_OFFSET(CCar, field_ab, 0xAB); +VALIDATE_OFFSET(CCar, field_ac, 0xAC); +VALIDATE_OFFSET(CCar, field_ad, 0xAD); +VALIDATE_OFFSET(CCar, field_ae, 0xAE); +VALIDATE_OFFSET(CCar, field_af, 0xAF); +VALIDATE_OFFSET(CCar, field_b0, 0xB0); +VALIDATE_OFFSET(CCar, m_nPlaySound, 0xB4); +VALIDATE_OFFSET(CCar, m_bTurretRotated, 0xB5); +VALIDATE_OFFSET(CCar, field_b9, 0xB6); +VALIDATE_OFFSET(CCar, field_ba, 0xB7); +VALIDATE_OFFSET(CCar, field_bb, 0xB8); VALIDATE_SIZE(CCar, 0xBC); diff --git a/plugin_II/game_II/CCarManager.h b/plugin_II/game_II/CCarManager.h index 8282a978a..fd02984cc 100644 --- a/plugin_II/game_II/CCarManager.h +++ b/plugin_II/game_II/CCarManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CCar.h" @@ -17,7 +16,11 @@ class CCarManager { short m_nCarsCount; char pad[2]; }; - +VALIDATE_OFFSET(CCarManager, m_pFirst, 0x0); +VALIDATE_OFFSET(CCarManager, m_pLast, 0x4); +VALIDATE_OFFSET(CCarManager, m_pCars, 0x8); +VALIDATE_OFFSET(CCarManager, m_nCarsCount, 0x4D0); +VALIDATE_OFFSET(CCarManager, pad, 0x4D2); VALIDATE_SIZE(CCarManager, 0x4D4); extern CCarManager** gCarManager; diff --git a/plugin_II/game_II/CChar.h b/plugin_II/game_II/CChar.h index a25995f6b..4481d7e44 100644 --- a/plugin_II/game_II/CChar.h +++ b/plugin_II/game_II/CChar.h @@ -17,6 +17,7 @@ class CChar { CPed* CreatePed(CEncodedVector pos, char remap, int rotation); CPed* FindPed(int id); }; +VALIDATE_SIZE(CChar, 0x1); extern CChar** gCharManager; extern CChar* GetCharManager(); diff --git a/plugin_II/game_II/CCollisionBox.h b/plugin_II/game_II/CCollisionBox.h index 3fd225554..f87f4110c 100644 --- a/plugin_II/game_II/CCollisionBox.h +++ b/plugin_II/game_II/CCollisionBox.h @@ -24,5 +24,15 @@ class CCollisionBox { public: }; - +VALIDATE_OFFSET(CCollisionBox, x, 0x0); +VALIDATE_OFFSET(CCollisionBox, y, 0x4); +VALIDATE_OFFSET(CCollisionBox, z, 0x8); +VALIDATE_OFFSET(CCollisionBox, x1, 0xC); +VALIDATE_OFFSET(CCollisionBox, y1, 0x10); +VALIDATE_OFFSET(CCollisionBox, x2, 0x14); +VALIDATE_OFFSET(CCollisionBox, y2, 0x18); +VALIDATE_OFFSET(CCollisionBox, x3, 0x1C); +VALIDATE_OFFSET(CCollisionBox, y4, 0x20); +VALIDATE_OFFSET(CCollisionBox, x4, 0x24); +VALIDATE_OFFSET(CCollisionBox, y3, 0x28); VALIDATE_SIZE(CCollisionBox, 0x2C); diff --git a/plugin_II/game_II/CEncodedVector.h b/plugin_II/game_II/CEncodedVector.h index 5a210f82a..25d7522a4 100644 --- a/plugin_II/game_II/CEncodedVector.h +++ b/plugin_II/game_II/CEncodedVector.h @@ -21,6 +21,9 @@ class CEncodedVector2D { CVector2D FromInt16(); }; +VALIDATE_OFFSET(CEncodedVector2D, x, 0x0); +VALIDATE_OFFSET(CEncodedVector2D, y, 0x4); +VALIDATE_SIZE(CEncodedVector2D, 0x8); class CEncodedVector { public: @@ -33,3 +36,7 @@ class CEncodedVector { CVector FromInt16(); }; +VALIDATE_OFFSET(CEncodedVector, x, 0x0); +VALIDATE_OFFSET(CEncodedVector, y, 0x4); +VALIDATE_OFFSET(CEncodedVector, z, 0x8); +VALIDATE_SIZE(CEncodedVector, 0xC); diff --git a/plugin_II/game_II/CFileMgr.h b/plugin_II/game_II/CFileMgr.h index 1f36bb46b..8f4fd8597 100644 --- a/plugin_II/game_II/CFileMgr.h +++ b/plugin_II/game_II/CFileMgr.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -12,11 +11,17 @@ struct tChunkHeader { char code[4]; int size; }; +VALIDATE_OFFSET(tChunkHeader, code, 0x0); +VALIDATE_OFFSET(tChunkHeader, size, 0x4); +VALIDATE_SIZE(tChunkHeader, 0x8); struct tTextHeader { char code[4]; short size; }; +VALIDATE_OFFSET(tTextHeader, code, 0x0); +VALIDATE_OFFSET(tTextHeader, size, 0x4); +VALIDATE_SIZE(tTextHeader, 0x6); class CFileMgr { public: @@ -26,3 +31,4 @@ class CFileMgr { static bool ReadLine(void* buff, int const& size); static int Seek(int const& size); }; +VALIDATE_SIZE(CFileMgr, 0x1); diff --git a/plugin_II/game_II/CFont.h b/plugin_II/game_II/CFont.h index a3f3b4fce..a9e9c632c 100644 --- a/plugin_II/game_II/CFont.h +++ b/plugin_II/game_II/CFont.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -15,3 +14,4 @@ class CFont { static int GetStringWidth(const wchar_t* str, int style); static void PrintString(const wchar_t* str, int x, int y, int style, int scale, int const& mode, int palette, bool enableAlpha, int alpha); }; +VALIDATE_SIZE(CFont, 0x1); diff --git a/plugin_II/game_II/CGame.h b/plugin_II/game_II/CGame.h index 5860234b1..86833628b 100644 --- a/plugin_II/game_II/CGame.h +++ b/plugin_II/game_II/CGame.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -64,7 +63,29 @@ class PLUGIN_API CGame { void SetState(int unk, int state); bool GetIsUserPaused(); }; - +VALIDATE_OFFSET(CGame, m_eGameStatus, 0x0); +VALIDATE_OFFSET(CGame, m_pPlayers, 0x4); +VALIDATE_OFFSET(CGame, m_pCurrentPlr, 0x1C); +VALIDATE_OFFSET(CGame, field_20, 0x20); +VALIDATE_OFFSET(CGame, field_21, 0x21); +VALIDATE_OFFSET(CGame, field_22, 0x22); +VALIDATE_OFFSET(CGame, m_nNumPlayers, 0x23); +VALIDATE_OFFSET(CGame, m_nPlayerInFocus, 0x24); +VALIDATE_OFFSET(CGame, field_25, 0x25); +VALIDATE_OFFSET(CGame, field_26, 0x26); +VALIDATE_OFFSET(CGame, field_27, 0x27); +VALIDATE_OFFSET(CGame, field_28, 0x28); +VALIDATE_OFFSET(CGame, m_nMainState, 0x2C); +VALIDATE_OFFSET(CGame, field_30, 0x30); +VALIDATE_OFFSET(CGame, field_31, 0x31); +VALIDATE_OFFSET(CGame, field_32, 0x32); +VALIDATE_OFFSET(CGame, field_33, 0x33); +VALIDATE_OFFSET(CGame, field_34, 0x34); +VALIDATE_OFFSET(CGame, m_pCurrentPlayer, 0x38); +VALIDATE_OFFSET(CGame, m_bNoWantedLevel, 0x3C); +VALIDATE_OFFSET(CGame, field_3d, 0x3D); +VALIDATE_OFFSET(CGame, field_3e, 0x3E); +VALIDATE_OFFSET(CGame, field_3f, 0x3F); VALIDATE_SIZE(CGame, 0x40); extern CGame** gGame; diff --git a/plugin_II/game_II/CGeneral.h b/plugin_II/game_II/CGeneral.h index 46c65bd66..a1b8b617f 100644 --- a/plugin_II/game_II/CGeneral.h +++ b/plugin_II/game_II/CGeneral.h @@ -18,7 +18,8 @@ class CGeneral { void Update(); void PrintCycle(); }; - +VALIDATE_OFFSET(CGeneral, m_nCycle, 0x0); +VALIDATE_OFFSET(CGeneral, m_nRandomNumber, 0x4); VALIDATE_SIZE(CGeneral, 0x8); extern CGeneral** gGeneral; diff --git a/plugin_II/game_II/CGlobal.h b/plugin_II/game_II/CGlobal.h index 4ea8eb6e9..1eec1b15b 100644 --- a/plugin_II/game_II/CGlobal.h +++ b/plugin_II/game_II/CGlobal.h @@ -41,7 +41,34 @@ class CGlobal { public: }; - +VALIDATE_OFFSET(CGlobal, mapName, 0x0); +VALIDATE_OFFSET(CGlobal, styleName, 0xFF); +VALIDATE_OFFSET(CGlobal, scriptName, 0x1FE); +VALIDATE_OFFSET(CGlobal, saveName, 0x2FD); +VALIDATE_OFFSET(CGlobal, field_400, 0x3FC); +VALIDATE_OFFSET(CGlobal, field_401, 0x3FD); +VALIDATE_OFFSET(CGlobal, field_402, 0x3FE); +VALIDATE_OFFSET(CGlobal, saveSlot, 0x3FF); +VALIDATE_OFFSET(CGlobal, field_404, 0x400); +VALIDATE_OFFSET(CGlobal, field_405, 0x401); +VALIDATE_OFFSET(CGlobal, field_406, 0x402); +VALIDATE_OFFSET(CGlobal, field_407, 0x403); +VALIDATE_OFFSET(CGlobal, field_408, 0x404); +VALIDATE_OFFSET(CGlobal, field_430, 0x42C); +VALIDATE_OFFSET(CGlobal, field_434, 0x430); +VALIDATE_OFFSET(CGlobal, field_438, 0x434); +VALIDATE_OFFSET(CGlobal, field_43A, 0x436); +VALIDATE_OFFSET(CGlobal, field_43B, 0x437); +VALIDATE_OFFSET(CGlobal, field_43C, 0x438); +VALIDATE_OFFSET(CGlobal, field_440, 0x43C); +VALIDATE_OFFSET(CGlobal, field_441, 0x43D); +VALIDATE_OFFSET(CGlobal, field_442, 0x43E); +VALIDATE_OFFSET(CGlobal, field_443, 0x43F); +VALIDATE_OFFSET(CGlobal, field_444, 0x440); +VALIDATE_OFFSET(CGlobal, field_448, 0x444); +VALIDATE_OFFSET(CGlobal, field_490, 0x48C); +VALIDATE_OFFSET(CGlobal, field_49C, 0x498); +VALIDATE_OFFSET(CGlobal, field_4B4, 0x4B0); VALIDATE_SIZE(CGlobal, 0x570); extern CGlobal& gGlobal; diff --git a/plugin_II/game_II/CHud.h b/plugin_II/game_II/CHud.h index f8190b0ab..57f032ebd 100644 --- a/plugin_II/game_II/CHud.h +++ b/plugin_II/game_II/CHud.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #define MAX_HUD_ARROWS 17 @@ -68,6 +67,25 @@ class CHudBrief { void Clear(eMessagePriority priority); }; +VALIDATE_OFFSET(CHudBrief, text, 0x0); +VALIDATE_OFFSET(CHudBrief, field_142, 0x142); +VALIDATE_OFFSET(CHudBrief, field_146, 0x146); +VALIDATE_OFFSET(CHudBrief, field_1BE, 0x1BE); +VALIDATE_OFFSET(CHudBrief, field_1C2, 0x1C2); +VALIDATE_OFFSET(CHudBrief, field_502, 0x502); +VALIDATE_OFFSET(CHudBrief, field_503, 0x503); +VALIDATE_OFFSET(CHudBrief, displayTime, 0x504); +VALIDATE_OFFSET(CHudBrief, field_506, 0x506); +VALIDATE_OFFSET(CHudBrief, lines, 0x508); +VALIDATE_OFFSET(CHudBrief, field_50C, 0x50C); +VALIDATE_OFFSET(CHudBrief, length, 0x510); +VALIDATE_OFFSET(CHudBrief, field_514, 0x514); +VALIDATE_OFFSET(CHudBrief, gxt, 0x518); +VALIDATE_OFFSET(CHudBrief, field_520, 0x520); +VALIDATE_OFFSET(CHudBrief, prev, 0x6F8); +VALIDATE_OFFSET(CHudBrief, field_6FC, 0x6FC); +VALIDATE_OFFSET(CHudBrief, field_700, 0x700); +VALIDATE_SIZE(CHudBrief, 0x704); #pragma pack(pop) VALIDATE_SIZE(CHudBrief, 0x704); // TODO: possibly should be smaller @@ -83,7 +101,6 @@ class CHudMessage { void SetHudMessage(const char* text, eMessagePriority priority); void SetHudMessage(const wchar_t* text, eMessagePriority priority); }; - VALIDATE_SIZE(CHudMessage, 0x1C8); class CArrowTrace { @@ -105,7 +122,22 @@ class CArrowTrace { CEncodedVector m_vPos; char field_23; }; - +VALIDATE_OFFSET(CArrowTrace, field_0, 0x0); +VALIDATE_OFFSET(CArrowTrace, field_1, 0x1); +VALIDATE_OFFSET(CArrowTrace, field_2, 0x2); +VALIDATE_OFFSET(CArrowTrace, field_3, 0x3); +VALIDATE_OFFSET(CArrowTrace, field_4, 0x4); +VALIDATE_OFFSET(CArrowTrace, field_5, 0x5); +VALIDATE_OFFSET(CArrowTrace, field_6, 0x6); +VALIDATE_OFFSET(CArrowTrace, field_7, 0x7); +VALIDATE_OFFSET(CArrowTrace, field_8, 0x8); +VALIDATE_OFFSET(CArrowTrace, field_9, 0x9); +VALIDATE_OFFSET(CArrowTrace, field_A, 0xA); +VALIDATE_OFFSET(CArrowTrace, field_B, 0xB); +VALIDATE_OFFSET(CArrowTrace, field_C, 0xC); +VALIDATE_OFFSET(CArrowTrace, m_nType, 0x10); +VALIDATE_OFFSET(CArrowTrace, m_vPos, 0x14); +VALIDATE_OFFSET(CArrowTrace, field_23, 0x20); VALIDATE_SIZE(CArrowTrace, 0x24); class CHudArrow { @@ -154,14 +186,51 @@ class CHudArrow { bool IsArrowVisible(); void SetSpriteId(short id); }; - +VALIDATE_OFFSET(CHudArrow, m_vPoint, 0x0); +VALIDATE_OFFSET(CHudArrow, m_nPointRotation, 0x8); +VALIDATE_OFFSET(CHudArrow, field_A, 0xA); +VALIDATE_OFFSET(CHudArrow, field_B, 0xB); +VALIDATE_OFFSET(CHudArrow, field_C, 0xC); +VALIDATE_OFFSET(CHudArrow, field_D, 0xD); +VALIDATE_OFFSET(CHudArrow, field_E, 0xE); +VALIDATE_OFFSET(CHudArrow, field_F, 0xF); +VALIDATE_OFFSET(CHudArrow, field_10, 0x10); +VALIDATE_OFFSET(CHudArrow, field_11, 0x11); +VALIDATE_OFFSET(CHudArrow, field_12, 0x12); +VALIDATE_OFFSET(CHudArrow, field_13, 0x13); +VALIDATE_OFFSET(CHudArrow, field_14, 0x14); +VALIDATE_OFFSET(CHudArrow, field_15, 0x15); +VALIDATE_OFFSET(CHudArrow, field_16, 0x16); +VALIDATE_OFFSET(CHudArrow, field_17, 0x17); +VALIDATE_OFFSET(CHudArrow, field_18, 0x18); +VALIDATE_OFFSET(CHudArrow, field_19, 0x19); +VALIDATE_OFFSET(CHudArrow, field_1A, 0x1A); +VALIDATE_OFFSET(CHudArrow, field_1B, 0x1B); +VALIDATE_OFFSET(CHudArrow, field_1C, 0x1C); +VALIDATE_OFFSET(CHudArrow, field_1D, 0x1D); +VALIDATE_OFFSET(CHudArrow, field_1E, 0x1E); +VALIDATE_OFFSET(CHudArrow, field_1F, 0x1F); +VALIDATE_OFFSET(CHudArrow, m_nType, 0x20); +VALIDATE_OFFSET(CHudArrow, m_nSpriteId, 0x24); +VALIDATE_OFFSET(CHudArrow, field_26, 0x26); +VALIDATE_OFFSET(CHudArrow, field_28, 0x28); +VALIDATE_OFFSET(CHudArrow, field_29, 0x29); +VALIDATE_OFFSET(CHudArrow, field_2A, 0x2A); +VALIDATE_OFFSET(CHudArrow, field_2B, 0x2B); +VALIDATE_OFFSET(CHudArrow, field_2C, 0x2C); +VALIDATE_OFFSET(CHudArrow, m_bVisible, 0x2D); +VALIDATE_OFFSET(CHudArrow, field_2E, 0x2E); +VALIDATE_OFFSET(CHudArrow, field_2F, 0x2F); +VALIDATE_OFFSET(CHudArrow, m_ArrowTrace, 0x30); +VALIDATE_OFFSET(CHudArrow, m_SecondArrowTrace, 0x54); +VALIDATE_OFFSET(CHudArrow, gap, 0x78); VALIDATE_SIZE(CHudArrow, 0x7C); class CHudDerived { public: char field_0[12]; }; - +VALIDATE_OFFSET(CHudDerived, field_0, 0x0); VALIDATE_SIZE(CHudDerived, 0xC); class CHud { @@ -188,6 +257,24 @@ class CHud { public: static void DrawSprite(int id1, int id2, int x, int y, char style, int const& mode, int enableAlpha, int alpha, char unk); }; +VALIDATE_OFFSET(CHud, field_0, 0x0); +VALIDATE_OFFSET(CHud, field_1, 0x1); +VALIDATE_OFFSET(CHud, field_2e, 0x2E); +VALIDATE_OFFSET(CHud, field_2f, 0x2F); +VALIDATE_OFFSET(CHud, field_4c, 0x4C); +VALIDATE_OFFSET(CHud, field_50, 0x50); +VALIDATE_OFFSET(CHud, m_HudBrief, 0xE4); +VALIDATE_OFFSET(CHud, ptr, 0x7E8); +VALIDATE_OFFSET(CHud, field_7e8, 0x7EC); +VALIDATE_OFFSET(CHud, m_HudArrows, 0x1F18); +VALIDATE_OFFSET(CHud, gap, 0x2754); +VALIDATE_OFFSET(CHud, field_2760, 0x2760); +VALIDATE_OFFSET(CHud, field_2764, 0x2764); +VALIDATE_OFFSET(CHud, m_bDisplayDebugInfo, 0x27B5); +VALIDATE_OFFSET(CHud, field_27b6, 0x27B6); +VALIDATE_OFFSET(CHud, m_HudMessage, 0x2854); +VALIDATE_OFFSET(CHud, field_2858, 0x2A1C); +VALIDATE_OFFSET(CHud, m_nTextSpeed, 0x2AF4); VALIDATE_SIZE(CHud, 0x2AF8); extern CHud** gHud; diff --git a/plugin_II/game_II/CKeybrd.h b/plugin_II/game_II/CKeybrd.h index 25d1a916c..47a693229 100644 --- a/plugin_II/game_II/CKeybrd.h +++ b/plugin_II/game_II/CKeybrd.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -16,7 +15,8 @@ class CKeybrd { public: bool Keydown(unsigned short key); }; - +VALIDATE_OFFSET(CKeybrd, m_nKeys, 0x0); +VALIDATE_OFFSET(CKeybrd, m_nLayout, 0x200); VALIDATE_SIZE(CKeybrd, 0x204); extern CKeybrd** gKeybrd; diff --git a/plugin_II/game_II/CMenuManager.h b/plugin_II/game_II/CMenuManager.h index 0a149a67e..ee532a796 100644 --- a/plugin_II/game_II/CMenuManager.h +++ b/plugin_II/game_II/CMenuManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "GBH.h" @@ -68,6 +67,10 @@ struct tTargaFileTexture { int size; int id; }; +VALIDATE_OFFSET(tTargaFileTexture, path, 0x0); +VALIDATE_OFFSET(tTargaFileTexture, size, 0x80); +VALIDATE_OFFSET(tTargaFileTexture, id, 0x84); +VALIDATE_SIZE(tTargaFileTexture, 0x88); struct tMenuEntry { char action; // eMenuActions @@ -77,6 +80,13 @@ struct tMenuEntry { char gap[22]; short targetPage; // eMenuPages }; +VALIDATE_OFFSET(tMenuEntry, action, 0x0); +VALIDATE_OFFSET(tMenuEntry, x, 0x2); +VALIDATE_OFFSET(tMenuEntry, y, 0x4); +VALIDATE_OFFSET(tMenuEntry, str, 0x6); +VALIDATE_OFFSET(tMenuEntry, gap, 0x6A); +VALIDATE_OFFSET(tMenuEntry, targetPage, 0x80); +VALIDATE_SIZE(tMenuEntry, 0x82); struct tMenuPage { short numMenuItems; @@ -86,7 +96,12 @@ struct tMenuPage { unsigned short currentMenuItem; unsigned short initialMenuItem; }; - +VALIDATE_OFFSET(tMenuPage, numMenuItems, 0x0); +VALIDATE_OFFSET(tMenuPage, field_4, 0x2); +VALIDATE_OFFSET(tMenuPage, items, 0x4); +VALIDATE_OFFSET(tMenuPage, gap, 0x61C); +VALIDATE_OFFSET(tMenuPage, currentMenuItem, 0xBC6); +VALIDATE_OFFSET(tMenuPage, initialMenuItem, 0xBC8); VALIDATE_SIZE(tMenuPage, 0xBCA); class CKeyState { @@ -110,6 +125,14 @@ class CKeyState { del = 0; } }; +VALIDATE_OFFSET(CKeyState, left, 0x0); +VALIDATE_OFFSET(CKeyState, right, 0x1); +VALIDATE_OFFSET(CKeyState, up, 0x2); +VALIDATE_OFFSET(CKeyState, down, 0x3); +VALIDATE_OFFSET(CKeyState, enter, 0x4); +VALIDATE_OFFSET(CKeyState, esc, 0x5); +VALIDATE_OFFSET(CKeyState, del, 0x6); +VALIDATE_SIZE(CKeyState, 0x7); class CMenuManager { public: @@ -158,7 +181,39 @@ class CMenuManager { int Process(); void PopulateMenu(); }; - +VALIDATE_OFFSET(CMenuManager, m_pDirectInput, 0x0); +VALIDATE_OFFSET(CMenuManager, m_pInputDevice, 0x4); +VALIDATE_OFFSET(CMenuManager, m_nKeys, 0x8); +VALIDATE_OFFSET(CMenuManager, m_nFrontendState, 0x108); +VALIDATE_OFFSET(CMenuManager, m_nKeyboardAcquired, 0x10C); +VALIDATE_OFFSET(CMenuManager, m_bFrontendKeysEnabled, 0x10D); +VALIDATE_OFFSET(CMenuManager, field_271, 0x10E); +VALIDATE_OFFSET(CMenuManager, field_272, 0x10F); +VALIDATE_OFFSET(CMenuManager, m_nState, 0x110); +VALIDATE_OFFSET(CMenuManager, field_277, 0x114); +VALIDATE_OFFSET(CMenuManager, field_278, 0x115); +VALIDATE_OFFSET(CMenuManager, field_279, 0x116); +VALIDATE_OFFSET(CMenuManager, field_280, 0x117); +VALIDATE_OFFSET(CMenuManager, field_281, 0x118); +VALIDATE_OFFSET(CMenuManager, field_282, 0x119); +VALIDATE_OFFSET(CMenuManager, field_283, 0x11A); +VALIDATE_OFFSET(CMenuManager, m_nFontStyle, 0x11C); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuPage, 0x11E); +VALIDATE_OFFSET(CMenuManager, field_0, 0x120); +VALIDATE_OFFSET(CMenuManager, m_MenuPages, 0x122); +VALIDATE_OFFSET(CMenuManager, gap3, 0xC98C); +VALIDATE_OFFSET(CMenuManager, NewKeyState, 0xC9B8); +VALIDATE_OFFSET(CMenuManager, OldKeyState, 0xC9BF); +VALIDATE_OFFSET(CMenuManager, m_nTimeInMilliseconds, 0xC9C8); +VALIDATE_OFFSET(CMenuManager, m_nFrameCounter, 0xC9CC); +VALIDATE_OFFSET(CMenuManager, field_300, 0xC9CD); +VALIDATE_OFFSET(CMenuManager, field_301, 0xC9CE); +VALIDATE_OFFSET(CMenuManager, m_nTimeToWaitBeforeDemoStart, 0xC9D0); +VALIDATE_OFFSET(CMenuManager, gap4, 0xC9D4); +VALIDATE_OFFSET(CMenuManager, gap5, 0xCAC1); +VALIDATE_OFFSET(CMenuManager, m_nCurrScreen, 0xEDF4); +VALIDATE_OFFSET(CMenuManager, field_304, 0xEDF5); +VALIDATE_OFFSET(CMenuManager, field_305, 0xEDF6); VALIDATE_SIZE(CMenuManager, 0xEDF8); extern CMenuManager** FrontendMenuManager; diff --git a/plugin_II/game_II/CObject.h b/plugin_II/game_II/CObject.h index ab3f36888..d916a4ee3 100644 --- a/plugin_II/game_II/CObject.h +++ b/plugin_II/game_II/CObject.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CEncodedVector.h" @@ -119,5 +118,99 @@ class CObject { void SetRotation(short rot); }; - +VALIDATE_OFFSET(CObject, field_0, 0x0); +VALIDATE_OFFSET(CObject, field_2, 0x4); +VALIDATE_OFFSET(CObject, field_4, 0x8); +VALIDATE_OFFSET(CObject, field_6, 0xC); +VALIDATE_OFFSET(CObject, field_8, 0x10); +VALIDATE_OFFSET(CObject, m_nIndex, 0x14); +VALIDATE_OFFSET(CObject, field_12, 0x18); +VALIDATE_OFFSET(CObject, field_16, 0x1C); +VALIDATE_OFFSET(CObject, field_20, 0x20); +VALIDATE_OFFSET(CObject, field_21, 0x21); +VALIDATE_OFFSET(CObject, field_22, 0x22); +VALIDATE_OFFSET(CObject, field_23, 0x23); +VALIDATE_OFFSET(CObject, field_24, 0x24); +VALIDATE_OFFSET(CObject, field_26, 0x26); +VALIDATE_OFFSET(CObject, field_27, 0x27); +VALIDATE_OFFSET(CObject, field_28, 0x28); +VALIDATE_OFFSET(CObject, field_29, 0x29); +VALIDATE_OFFSET(CObject, field_2a, 0x2A); +VALIDATE_OFFSET(CObject, field_2b, 0x2B); +VALIDATE_OFFSET(CObject, field_2c, 0x2C); +VALIDATE_OFFSET(CObject, field_2d, 0x2D); +VALIDATE_OFFSET(CObject, field_2e, 0x2E); +VALIDATE_OFFSET(CObject, field_2f, 0x2F); +VALIDATE_OFFSET(CObject, field_30, 0x30); +VALIDATE_OFFSET(CObject, field_31, 0x31); +VALIDATE_OFFSET(CObject, field_32, 0x32); +VALIDATE_OFFSET(CObject, field_33, 0x33); +VALIDATE_OFFSET(CObject, field_34, 0x34); +VALIDATE_OFFSET(CObject, field_35, 0x35); +VALIDATE_OFFSET(CObject, field_36, 0x36); +VALIDATE_OFFSET(CObject, field_37, 0x37); +VALIDATE_OFFSET(CObject, m_nSpeed, 0x38); +VALIDATE_OFFSET(CObject, field_3c, 0x3C); +VALIDATE_OFFSET(CObject, m_nRotation, 0x40); +VALIDATE_OFFSET(CObject, field_42, 0x42); +VALIDATE_OFFSET(CObject, field_44, 0x44); +VALIDATE_OFFSET(CObject, field_45, 0x45); +VALIDATE_OFFSET(CObject, field_46, 0x46); +VALIDATE_OFFSET(CObject, field_48, 0x48); +VALIDATE_OFFSET(CObject, field_49, 0x49); +VALIDATE_OFFSET(CObject, m_nIdleTimer, 0x4A); +VALIDATE_OFFSET(CObject, field_4c, 0x4C); +VALIDATE_OFFSET(CObject, field_50, 0x50); +VALIDATE_OFFSET(CObject, field_54, 0x54); +VALIDATE_OFFSET(CObject, field_55, 0x55); +VALIDATE_OFFSET(CObject, field_56, 0x56); +VALIDATE_OFFSET(CObject, field_57, 0x57); +VALIDATE_OFFSET(CObject, field_58, 0x58); +VALIDATE_OFFSET(CObject, field_59, 0x59); +VALIDATE_OFFSET(CObject, field_5a, 0x5A); +VALIDATE_OFFSET(CObject, field_5b, 0x5B); +VALIDATE_OFFSET(CObject, field_5c, 0x5C); +VALIDATE_OFFSET(CObject, field_5d, 0x5D); +VALIDATE_OFFSET(CObject, field_5e, 0x5E); +VALIDATE_OFFSET(CObject, field_5f, 0x5F); +VALIDATE_OFFSET(CObject, field_60, 0x60); +VALIDATE_OFFSET(CObject, field_64, 0x64); +VALIDATE_OFFSET(CObject, field_68, 0x68); +VALIDATE_OFFSET(CObject, field_69, 0x69); +VALIDATE_OFFSET(CObject, field_6a, 0x6A); +VALIDATE_OFFSET(CObject, field_6b, 0x6B); +VALIDATE_OFFSET(CObject, field_6c, 0x6C); +VALIDATE_OFFSET(CObject, field_70, 0x70); +VALIDATE_OFFSET(CObject, field_71, 0x71); +VALIDATE_OFFSET(CObject, field_72, 0x72); +VALIDATE_OFFSET(CObject, field_73, 0x73); +VALIDATE_OFFSET(CObject, field_74, 0x74); +VALIDATE_OFFSET(CObject, field_75, 0x75); +VALIDATE_OFFSET(CObject, field_76, 0x76); +VALIDATE_OFFSET(CObject, field_77, 0x77); +VALIDATE_OFFSET(CObject, m_pNext, 0x78); +VALIDATE_OFFSET(CObject, m_pPed, 0x7C); +VALIDATE_OFFSET(CObject, m_pSprite, 0x80); +VALIDATE_OFFSET(CObject, field_84, 0x84); +VALIDATE_OFFSET(CObject, field_85, 0x85); +VALIDATE_OFFSET(CObject, field_86, 0x86); +VALIDATE_OFFSET(CObject, field_87, 0x87); +VALIDATE_OFFSET(CObject, field_88, 0x88); +VALIDATE_OFFSET(CObject, field_89, 0x89); +VALIDATE_OFFSET(CObject, field_8a, 0x8A); +VALIDATE_OFFSET(CObject, field_8b, 0x8B); +VALIDATE_OFFSET(CObject, field_8c, 0x8C); +VALIDATE_OFFSET(CObject, field_8d, 0x8D); +VALIDATE_OFFSET(CObject, field_8e, 0x8E); +VALIDATE_OFFSET(CObject, field_8f, 0x8F); +VALIDATE_OFFSET(CObject, field_90, 0x90); +VALIDATE_OFFSET(CObject, field_94, 0x94); +VALIDATE_OFFSET(CObject, m_nDeltaX, 0x98); +VALIDATE_OFFSET(CObject, m_nDeltaY, 0x9C); +VALIDATE_OFFSET(CObject, field_a0, 0xA0); +VALIDATE_OFFSET(CObject, field_a1, 0xA1); +VALIDATE_OFFSET(CObject, field_a2, 0xA2); +VALIDATE_OFFSET(CObject, field_a3, 0xA3); +VALIDATE_OFFSET(CObject, m_vPosition, 0xA4); +VALIDATE_OFFSET(CObject, field_b0, 0xB0); VALIDATE_SIZE(CObject, 0xB4); diff --git a/plugin_II/game_II/CPed.h b/plugin_II/game_II/CPed.h index 1e01ab378..cdf39c931 100644 --- a/plugin_II/game_II/CPed.h +++ b/plugin_II/game_II/CPed.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CCar.h" @@ -177,21 +176,25 @@ class CPedWeapon { CWeapon* m_pWeapons[28]; short m_nCurrentWeapon; }; +VALIDATE_OFFSET(CPedWeapon, field_0, 0x0); +VALIDATE_OFFSET(CPedWeapon, m_pWeapons, 0x718); +VALIDATE_OFFSET(CPedWeapon, m_nCurrentWeapon, 0x788); +VALIDATE_SIZE(CPedWeapon, 0x78C); class CPed { PLUGIN_NO_DEFAULT_CONSTRUCTION(CPed) public: - unsigned __int8 field_0[44]; + char field_0[44]; int m_nCounter; - unsigned __int8 field_30; - unsigned __int8 field_31; + char field_30; + char field_31; char field_32; char field_33; char m_nObjective; char field_34; char m_nPrevObjective; - unsigned __int8 field_38[9]; + char field_38[9]; unsigned __int16 field_40; unsigned char field_42[234]; unsigned short field_300; @@ -317,7 +320,7 @@ class CPed { unsigned int m_nGangCarModel; unsigned int m_nPedState; // ePedState unsigned int field_27B; - unsigned __int8 field_27C[20]; + char field_27C[20]; public: void GiveWeapon(int id, int ammo); @@ -342,5 +345,136 @@ class CPed { char GetRemap(); void EnterCarAsPassenger(CCar* target); }; - +VALIDATE_OFFSET(CPed, field_0, 0x0); +VALIDATE_OFFSET(CPed, m_nCounter, 0x2C); +VALIDATE_OFFSET(CPed, field_30, 0x30); +VALIDATE_OFFSET(CPed, field_31, 0x31); +VALIDATE_OFFSET(CPed, field_32, 0x32); +VALIDATE_OFFSET(CPed, field_33, 0x33); +VALIDATE_OFFSET(CPed, m_nObjective, 0x34); +VALIDATE_OFFSET(CPed, field_34, 0x35); +VALIDATE_OFFSET(CPed, m_nPrevObjective, 0x36); +VALIDATE_OFFSET(CPed, field_38, 0x37); +VALIDATE_OFFSET(CPed, field_40, 0x40); +VALIDATE_OFFSET(CPed, field_42, 0x42); +VALIDATE_OFFSET(CPed, field_300, 0x12C); +VALIDATE_OFFSET(CPed, field_302, 0x12E); +VALIDATE_OFFSET(CPed, field_304, 0x130); +VALIDATE_OFFSET(CPed, field_305, 0x132); +VALIDATE_OFFSET(CPed, field_306, 0x133); +VALIDATE_OFFSET(CPed, m_nRotation, 0x134); +VALIDATE_OFFSET(CPed, field_308, 0x136); +VALIDATE_OFFSET(CPed, field_309, 0x137); +VALIDATE_OFFSET(CPed, field_310, 0x138); +VALIDATE_OFFSET(CPed, field_314, 0x13C); +VALIDATE_OFFSET(CPed, m_pRefCar, 0x140); +VALIDATE_OFFSET(CPed, field_324, 0x144); +VALIDATE_OFFSET(CPed, m_pRefPed, 0x148); +VALIDATE_OFFSET(CPed, field_332, 0x14C); +VALIDATE_OFFSET(CPed, m_pArmyCarRef, 0x150); +VALIDATE_OFFSET(CPed, m_pTargetCarToEnter, 0x154); +VALIDATE_OFFSET(CPed, field_344, 0x158); +VALIDATE_OFFSET(CPed, m_pWeapons, 0x15C); +VALIDATE_OFFSET(CPed, m_pNextPed, 0x160); +VALIDATE_OFFSET(CPed, m_pTarget, 0x164); +VALIDATE_OFFSET(CPed, m_pObject, 0x168); +VALIDATE_OFFSET(CPed, m_pCurrentCar, 0x16C); +VALIDATE_OFFSET(CPed, m_pSelectedWeapon, 0x170); +VALIDATE_OFFSET(CPed, m_pWeap, 0x174); +VALIDATE_OFFSET(CPed, field_178, 0x178); +VALIDATE_OFFSET(CPed, field_17c, 0x17C); +VALIDATE_OFFSET(CPed, m_pPedRef, 0x180); +VALIDATE_OFFSET(CPed, field_184, 0x184); +VALIDATE_OFFSET(CPed, field_188, 0x188); +VALIDATE_OFFSET(CPed, field_18c, 0x18C); +VALIDATE_OFFSET(CPed, field_190, 0x190); +VALIDATE_OFFSET(CPed, field_194, 0x194); +VALIDATE_OFFSET(CPed, field_198, 0x198); +VALIDATE_OFFSET(CPed, field_19c, 0x19C); +VALIDATE_OFFSET(CPed, field_1a0, 0x1A0); +VALIDATE_OFFSET(CPed, field_420, 0x1A4); +VALIDATE_OFFSET(CPed, m_pElvisLeader, 0x1A8); +VALIDATE_OFFSET(CPed, m_vPosition, 0x1AC); +VALIDATE_OFFSET(CPed, field_430, 0x1B8); +VALIDATE_OFFSET(CPed, field_1c4, 0x1C4); +VALIDATE_OFFSET(CPed, field_1c8, 0x1C8); +VALIDATE_OFFSET(CPed, field_1cc, 0x1CC); +VALIDATE_OFFSET(CPed, field_1d0, 0x1D0); +VALIDATE_OFFSET(CPed, field_1d4, 0x1D4); +VALIDATE_OFFSET(CPed, field_472, 0x1D8); +VALIDATE_OFFSET(CPed, field_473, 0x1DC); +VALIDATE_OFFSET(CPed, field_474, 0x1E8); +VALIDATE_OFFSET(CPed, field_475, 0x1EC); +VALIDATE_OFFSET(CPed, m_fMaxRunSpeed, 0x1F0); +VALIDATE_OFFSET(CPed, field_477, 0x1F4); +VALIDATE_OFFSET(CPed, m_fMaxDriveSpeed, 0x1F8); +VALIDATE_OFFSET(CPed, field_1FC, 0x1FC); +VALIDATE_OFFSET(CPed, m_nId, 0x200); +VALIDATE_OFFSET(CPed, m_nTargetPedId, 0x204); +VALIDATE_OFFSET(CPed, m_nInvulnerability, 0x208); +VALIDATE_OFFSET(CPed, m_nWantedLevel, 0x20A); +VALIDATE_OFFSET(CPed, field_20c, 0x20C); +VALIDATE_OFFSET(CPed, field_20e, 0x20E); +VALIDATE_OFFSET(CPed, field_210, 0x210); +VALIDATE_OFFSET(CPed, field_212, 0x212); +VALIDATE_OFFSET(CPed, field_214, 0x214); +VALIDATE_OFFSET(CPed, m_nHealth, 0x216); +VALIDATE_OFFSET(CPed, m_nTimerAction, 0x218); +VALIDATE_OFFSET(CPed, field_21a, 0x21A); +VALIDATE_OFFSET(CPed, m_nPedFlags, 0x21C); +VALIDATE_OFFSET(CPed, field_220, 0x220); +VALIDATE_OFFSET(CPed, field_224, 0x224); +VALIDATE_OFFSET(CPed, m_nActionTimer, 0x225); +VALIDATE_OFFSET(CPed, field_226, 0x226); +VALIDATE_OFFSET(CPed, field_227, 0x227); +VALIDATE_OFFSET(CPed, field_228, 0x228); +VALIDATE_OFFSET(CPed, field_229, 0x229); +VALIDATE_OFFSET(CPed, field_22a, 0x22A); +VALIDATE_OFFSET(CPed, field_22b, 0x22B); +VALIDATE_OFFSET(CPed, field_22c, 0x22C); +VALIDATE_OFFSET(CPed, field_230, 0x230); +VALIDATE_OFFSET(CPed, field_234, 0x234); +VALIDATE_OFFSET(CPed, field_235, 0x235); +VALIDATE_OFFSET(CPed, field_236, 0x236); +VALIDATE_OFFSET(CPed, field_237, 0x237); +VALIDATE_OFFSET(CPed, m_nSearchType, 0x238); +VALIDATE_OFFSET(CPed, field_23c, 0x23C); +VALIDATE_OFFSET(CPed, field_23d, 0x23D); +VALIDATE_OFFSET(CPed, field_23e, 0x23E); +VALIDATE_OFFSET(CPed, field_23f, 0x23F); +VALIDATE_OFFSET(CPed, m_nOccupation, 0x240); +VALIDATE_OFFSET(CPed, m_nRemap, 0x244); +VALIDATE_OFFSET(CPed, field_245, 0x245); +VALIDATE_OFFSET(CPed, field_246, 0x246); +VALIDATE_OFFSET(CPed, field_247, 0x247); +VALIDATE_OFFSET(CPed, field_248, 0x248); +VALIDATE_OFFSET(CPed, m_nTargetCarDoor, 0x24C); +VALIDATE_OFFSET(CPed, field_24d, 0x24D); +VALIDATE_OFFSET(CPed, field_24e, 0x24E); +VALIDATE_OFFSET(CPed, field_24f, 0x24F); +VALIDATE_OFFSET(CPed, field_250, 0x250); +VALIDATE_OFFSET(CPed, field_254, 0x254); +VALIDATE_OFFSET(CPed, field_255, 0x255); +VALIDATE_OFFSET(CPed, field_256, 0x256); +VALIDATE_OFFSET(CPed, field_257, 0x257); +VALIDATE_OFFSET(CPed, m_nState, 0x258); +VALIDATE_OFFSET(CPed, field_25c, 0x25C); +VALIDATE_OFFSET(CPed, field_260, 0x260); +VALIDATE_OFFSET(CPed, field_261, 0x261); +VALIDATE_OFFSET(CPed, field_262, 0x262); +VALIDATE_OFFSET(CPed, field_263, 0x263); +VALIDATE_OFFSET(CPed, field_264, 0x264); +VALIDATE_OFFSET(CPed, field_265, 0x265); +VALIDATE_OFFSET(CPed, field_266, 0x266); +VALIDATE_OFFSET(CPed, field_267, 0x267); +VALIDATE_OFFSET(CPed, field_268, 0x268); +VALIDATE_OFFSET(CPed, field_269, 0x269); +VALIDATE_OFFSET(CPed, field_26a, 0x26A); +VALIDATE_OFFSET(CPed, field_26b, 0x26B); +VALIDATE_OFFSET(CPed, m_nGraphicType, 0x26C); +VALIDATE_OFFSET(CPed, field_270, 0x270); +VALIDATE_OFFSET(CPed, m_nGangCarModel, 0x274); +VALIDATE_OFFSET(CPed, m_nPedState, 0x278); +VALIDATE_OFFSET(CPed, field_27B, 0x27C); +VALIDATE_OFFSET(CPed, field_27C, 0x280); VALIDATE_SIZE(CPed, 0x294); diff --git a/plugin_II/game_II/CPedManager.h b/plugin_II/game_II/CPedManager.h index de86fabe5..5380d24d3 100644 --- a/plugin_II/game_II/CPedManager.h +++ b/plugin_II/game_II/CPedManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -18,7 +17,11 @@ class PLUGIN_API CPedManager { short m_nPedsCount; char pad[2]; }; - +VALIDATE_OFFSET(CPedManager, m_pFirst, 0x0); +VALIDATE_OFFSET(CPedManager, m_pLast, 0x4); +VALIDATE_OFFSET(CPedManager, m_pPeds, 0x8); +VALIDATE_OFFSET(CPedManager, m_nPedsCount, 0x328); +VALIDATE_OFFSET(CPedManager, pad, 0x32A); VALIDATE_SIZE(CPedManager, 0x32C); extern CPedManager** gPedManager; diff --git a/plugin_II/game_II/CPhysics.h b/plugin_II/game_II/CPhysics.h index bc6be1171..b9447606e 100644 --- a/plugin_II/game_II/CPhysics.h +++ b/plugin_II/game_II/CPhysics.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CEncodedVector.h" @@ -79,5 +78,55 @@ class CCarPhysics { unsigned char field_174; unsigned char field_175; }; - +VALIDATE_OFFSET(CCarPhysics, m_vPrevVelocity, 0x0); +VALIDATE_OFFSET(CCarPhysics, m_nDamage, 0x8); +VALIDATE_OFFSET(CCarPhysics, m_pNext, 0xC); +VALIDATE_OFFSET(CCarPhysics, m_vRearRightSkid, 0x10); +VALIDATE_OFFSET(CCarPhysics, m_vRearLeftSkid, 0x18); +VALIDATE_OFFSET(CCarPhysics, m_vFrontLeftSkid, 0x20); +VALIDATE_OFFSET(CCarPhysics, m_vFrontRightSkid, 0x28); +VALIDATE_OFFSET(CCarPhysics, m_vPosition, 0x30); +VALIDATE_OFFSET(CCarPhysics, m_vPrevPosition, 0x38); +VALIDATE_OFFSET(CCarPhysics, m_vVelocity, 0x40); +VALIDATE_OFFSET(CCarPhysics, m_vSlope, 0x48); +VALIDATE_OFFSET(CCarPhysics, field_80, 0x50); +VALIDATE_OFFSET(CCarPhysics, field_84, 0x54); +VALIDATE_OFFSET(CCarPhysics, m_nRotation, 0x58); +VALIDATE_OFFSET(CCarPhysics, field_144, 0x5A); +VALIDATE_OFFSET(CCarPhysics, m_pPrev, 0x5C); +VALIDATE_OFFSET(CCarPhysics, m_nGasPedal, 0x60); +VALIDATE_OFFSET(CCarPhysics, field_258, 0x64); +VALIDATE_OFFSET(CCarPhysics, m_nVelocityZ, 0x68); +VALIDATE_OFFSET(CCarPhysics, m_nPosZ, 0x6C); +VALIDATE_OFFSET(CCarPhysics, m_nPrevVelocityZ, 0x70); +VALIDATE_OFFSET(CCarPhysics, m_nRotationForce, 0x74); +VALIDATE_OFFSET(CCarPhysics, m_nPointingAngle, 0x78); +VALIDATE_OFFSET(CCarPhysics, field_124, 0x7C); +VALIDATE_OFFSET(CCarPhysics, field_128, 0x80); +VALIDATE_OFFSET(CCarPhysics, m_nFrontSkid, 0x84); +VALIDATE_OFFSET(CCarPhysics, m_nRearSkid, 0x88); +VALIDATE_OFFSET(CCarPhysics, field_140, 0x8C); +VALIDATE_OFFSET(CCarPhysics, m_nTimerSinceLastMove, 0x90); +VALIDATE_OFFSET(CCarPhysics, m_bBrakeOn, 0x91); +VALIDATE_OFFSET(CCarPhysics, m_bHandbrakeOn, 0x92); +VALIDATE_OFFSET(CCarPhysics, m_bForwardGasOn, 0x93); +VALIDATE_OFFSET(CCarPhysics, m_bBackwardGasOn, 0x94); +VALIDATE_OFFSET(CCarPhysics, field_149, 0x95); +VALIDATE_OFFSET(CCarPhysics, field_150, 0x96); +VALIDATE_OFFSET(CCarPhysics, field_151, 0x97); +VALIDATE_OFFSET(CCarPhysics, m_nTileCollisionType, 0x98); +VALIDATE_OFFSET(CCarPhysics, m_nTileSurfaceType, 0x9C); +VALIDATE_OFFSET(CCarPhysics, field_160, 0xA0); +VALIDATE_OFFSET(CCarPhysics, field_164, 0xA4); +VALIDATE_OFFSET(CCarPhysics, m_nCurrentSlopeLength, 0xA5); +VALIDATE_OFFSET(CCarPhysics, m_nCurrentSlopeLeftTiles, 0xA6); +VALIDATE_OFFSET(CCarPhysics, m_nCurrentTileZ, 0xA7); +VALIDATE_OFFSET(CCarPhysics, m_nHandbrakeForce, 0xA8); +VALIDATE_OFFSET(CCarPhysics, m_nCarModel, 0xA9); +VALIDATE_OFFSET(CCarPhysics, field_170, 0xAA); +VALIDATE_OFFSET(CCarPhysics, field_171, 0xAB); +VALIDATE_OFFSET(CCarPhysics, m_nDriveWheelsLocked, 0xAC); +VALIDATE_OFFSET(CCarPhysics, m_nSteering, 0xAD); +VALIDATE_OFFSET(CCarPhysics, field_174, 0xAE); +VALIDATE_OFFSET(CCarPhysics, field_175, 0xAF); VALIDATE_SIZE(CCarPhysics, 0xB0); diff --git a/plugin_II/game_II/CPlayerPed.h b/plugin_II/game_II/CPlayerPed.h index 3ddff5fdc..96a021529 100644 --- a/plugin_II/game_II/CPlayerPed.h +++ b/plugin_II/game_II/CPlayerPed.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CPhysics.h" @@ -64,7 +63,46 @@ struct tCounter { unsigned char field_53; short id; }; - +VALIDATE_OFFSET(tCounter, value, 0x0); +VALIDATE_OFFSET(tCounter, field_4, 0x4); +VALIDATE_OFFSET(tCounter, field_5, 0x5); +VALIDATE_OFFSET(tCounter, field_6, 0x6); +VALIDATE_OFFSET(tCounter, field_7, 0x7); +VALIDATE_OFFSET(tCounter, field_8, 0x8); +VALIDATE_OFFSET(tCounter, field_9, 0x9); +VALIDATE_OFFSET(tCounter, field_10, 0xA); +VALIDATE_OFFSET(tCounter, field_11, 0xB); +VALIDATE_OFFSET(tCounter, field_12, 0xC); +VALIDATE_OFFSET(tCounter, field_13, 0xD); +VALIDATE_OFFSET(tCounter, field_14, 0xE); +VALIDATE_OFFSET(tCounter, field_15, 0xF); +VALIDATE_OFFSET(tCounter, field_16, 0x10); +VALIDATE_OFFSET(tCounter, field_17, 0x11); +VALIDATE_OFFSET(tCounter, field_18, 0x12); +VALIDATE_OFFSET(tCounter, field_19, 0x13); +VALIDATE_OFFSET(tCounter, field_20, 0x14); +VALIDATE_OFFSET(tCounter, field_24, 0x18); +VALIDATE_OFFSET(tCounter, field_25, 0x19); +VALIDATE_OFFSET(tCounter, field_26, 0x1A); +VALIDATE_OFFSET(tCounter, field_27, 0x1B); +VALIDATE_OFFSET(tCounter, field_28, 0x1C); +VALIDATE_OFFSET(tCounter, field_29, 0x1D); +VALIDATE_OFFSET(tCounter, field_30, 0x1E); +VALIDATE_OFFSET(tCounter, field_31, 0x1F); +VALIDATE_OFFSET(tCounter, player, 0x20); +VALIDATE_OFFSET(tCounter, field_36, 0x24); +VALIDATE_OFFSET(tCounter, field_37, 0x25); +VALIDATE_OFFSET(tCounter, field_38, 0x26); +VALIDATE_OFFSET(tCounter, field_39, 0x27); +VALIDATE_OFFSET(tCounter, field_40, 0x28); +VALIDATE_OFFSET(tCounter, field_41, 0x29); +VALIDATE_OFFSET(tCounter, field_42, 0x2A); +VALIDATE_OFFSET(tCounter, field_44, 0x2C); +VALIDATE_OFFSET(tCounter, field_46, 0x2E); +VALIDATE_OFFSET(tCounter, field_47, 0x30); +VALIDATE_OFFSET(tCounter, field_52, 0x34); +VALIDATE_OFFSET(tCounter, field_53, 0x35); +VALIDATE_OFFSET(tCounter, id, 0x36); VALIDATE_SIZE(tCounter, 0x38); class PLUGIN_API CPlayerPed { @@ -227,5 +265,141 @@ class PLUGIN_API CPlayerPed { void SetEnterControlStatusOn(); CCamera* GetAuxCamera(); }; - +VALIDATE_OFFSET(CPlayerPed, field_0, 0x0); +VALIDATE_OFFSET(CPlayerPed, field_1, 0x1); +VALIDATE_OFFSET(CPlayerPed, field_2, 0x2); +VALIDATE_OFFSET(CPlayerPed, field_3, 0x3); +VALIDATE_OFFSET(CPlayerPed, m_nKeyboardKey, 0x4); +VALIDATE_OFFSET(CPlayerPed, field_8, 0x8); +VALIDATE_OFFSET(CPlayerPed, field_10, 0xA); +VALIDATE_OFFSET(CPlayerPed, field_12, 0xC); +VALIDATE_OFFSET(CPlayerPed, field_16, 0x10); +VALIDATE_OFFSET(CPlayerPed, field_17, 0x11); +VALIDATE_OFFSET(CPlayerPed, field_18, 0x12); +VALIDATE_OFFSET(CPlayerPed, field_19, 0x13); +VALIDATE_OFFSET(CPlayerPed, field_20, 0x14); +VALIDATE_OFFSET(CPlayerPed, field_22, 0x16); +VALIDATE_OFFSET(CPlayerPed, field_24, 0x18); +VALIDATE_OFFSET(CPlayerPed, field_26, 0x1A); +VALIDATE_OFFSET(CPlayerPed, field_27, 0x1B); +VALIDATE_OFFSET(CPlayerPed, field_28, 0x1C); +VALIDATE_OFFSET(CPlayerPed, field_29, 0x1D); +VALIDATE_OFFSET(CPlayerPed, field_30, 0x1E); +VALIDATE_OFFSET(CPlayerPed, field_31, 0x1F); +VALIDATE_OFFSET(CPlayerPed, field_32, 0x20); +VALIDATE_OFFSET(CPlayerPed, field_33, 0x21); +VALIDATE_OFFSET(CPlayerPed, field_34, 0x22); +VALIDATE_OFFSET(CPlayerPed, field_35, 0x23); +VALIDATE_OFFSET(CPlayerPed, field_36, 0x24); +VALIDATE_OFFSET(CPlayerPed, field_37, 0x25); +VALIDATE_OFFSET(CPlayerPed, field_38, 0x26); +VALIDATE_OFFSET(CPlayerPed, field_39, 0x27); +VALIDATE_OFFSET(CPlayerPed, field_40, 0x28); +VALIDATE_OFFSET(CPlayerPed, field_41, 0x29); +VALIDATE_OFFSET(CPlayerPed, field_42, 0x2A); +VALIDATE_OFFSET(CPlayerPed, field_44, 0x2C); +VALIDATE_OFFSET(CPlayerPed, m_nIndex, 0x2E); +VALIDATE_OFFSET(CPlayerPed, field_47, 0x2F); +VALIDATE_OFFSET(CPlayerPed, field_48, 0x30); +VALIDATE_OFFSET(CPlayerPed, field_49, 0x31); +VALIDATE_OFFSET(CPlayerPed, field_50, 0x32); +VALIDATE_OFFSET(CPlayerPed, field_51, 0x33); +VALIDATE_OFFSET(CPlayerPed, field_52, 0x34); +VALIDATE_OFFSET(CPlayerPed, field_56, 0x38); +VALIDATE_OFFSET(CPlayerPed, field_60, 0x3C); +VALIDATE_OFFSET(CPlayerPed, field_64, 0x40); +VALIDATE_OFFSET(CPlayerPed, field_65, 0x41); +VALIDATE_OFFSET(CPlayerPed, field_66, 0x42); +VALIDATE_OFFSET(CPlayerPed, field_67, 0x43); +VALIDATE_OFFSET(CPlayerPed, m_nDeathReason, 0x44); +VALIDATE_OFFSET(CPlayerPed, field_72, 0x48); +VALIDATE_OFFSET(CPlayerPed, field_73, 0x49); +VALIDATE_OFFSET(CPlayerPed, field_74, 0x4A); +VALIDATE_OFFSET(CPlayerPed, field_75, 0x4B); +VALIDATE_OFFSET(CPlayerPed, field_76, 0x4C); +VALIDATE_OFFSET(CPlayerPed, field_80, 0x50); +VALIDATE_OFFSET(CPlayerPed, m_pLastCars, 0x54); +VALIDATE_OFFSET(CPlayerPed, field_96, 0x60); +VALIDATE_OFFSET(CPlayerPed, field_100, 0x64); +VALIDATE_OFFSET(CPlayerPed, field_101, 0x65); +VALIDATE_OFFSET(CPlayerPed, field_102, 0x66); +VALIDATE_OFFSET(CPlayerPed, field_103, 0x67); +VALIDATE_OFFSET(CPlayerPed, field_104, 0x68); +VALIDATE_OFFSET(CPlayerPed, m_bProcessDebugControls, 0x6C); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadUp, 0x70); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadDown, 0x71); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadLeft, 0x72); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadRight, 0x73); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadPageDown, 0x74); +VALIDATE_OFFSET(CPlayerPed, m_bNumpadPageUp, 0x75); +VALIDATE_OFFSET(CPlayerPed, m_bPageDown, 0x76); +VALIDATE_OFFSET(CPlayerPed, m_bPageUp, 0x77); +VALIDATE_OFFSET(CPlayerPed, m_bButtonForward, 0x78); +VALIDATE_OFFSET(CPlayerPed, m_bButtonBackward, 0x79); +VALIDATE_OFFSET(CPlayerPed, m_bButtonLeft, 0x7A); +VALIDATE_OFFSET(CPlayerPed, m_bButtonRight, 0x7B); +VALIDATE_OFFSET(CPlayerPed, m_bButtonAttack, 0x7C); +VALIDATE_OFFSET(CPlayerPed, m_bButtonEnterExit, 0x7D); +VALIDATE_OFFSET(CPlayerPed, m_bButtonHandbrakeJump, 0x7E); +VALIDATE_OFFSET(CPlayerPed, m_bButtonPrevWeapon, 0x7F); +VALIDATE_OFFSET(CPlayerPed, m_bButtonNextWeapon, 0x80); +VALIDATE_OFFSET(CPlayerPed, m_bButtonSpecial, 0x81); +VALIDATE_OFFSET(CPlayerPed, m_bButtonSpecial2, 0x82); +VALIDATE_OFFSET(CPlayerPed, field_131, 0x83); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonSpecial, 0x84); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonSpecial2, 0x85); +VALIDATE_OFFSET(CPlayerPed, field_134, 0x86); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonNextWeapon, 0x87); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonPrevWeapon, 0x88); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonEnterExit, 0x89); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonHandbrakeJump, 0x8A); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonForward, 0x8B); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonBackward, 0x8C); +VALIDATE_OFFSET(CPlayerPed, m_bOldButtonAttack, 0x8D); +VALIDATE_OFFSET(CPlayerPed, m_bProcess, 0x8E); +VALIDATE_OFFSET(CPlayerPed, m_bFired, 0x8F); +VALIDATE_OFFSET(CPlayerPed, m_GameCamera, 0x90); +VALIDATE_OFFSET(CPlayerPed, m_ViewCamera, 0x14C); +VALIDATE_OFFSET(CPlayerPed, m_AuxCamera, 0x208); +VALIDATE_OFFSET(CPlayerPed, m_pPed, 0x2C4); +VALIDATE_OFFSET(CPlayerPed, field_712, 0x2C8); +VALIDATE_OFFSET(CPlayerPed, field_716, 0x2CC); +VALIDATE_OFFSET(CPlayerPed, field_720, 0x2D0); +VALIDATE_OFFSET(CPlayerPed, field_721, 0x2D1); +VALIDATE_OFFSET(CPlayerPed, field_722, 0x2D2); +VALIDATE_OFFSET(CPlayerPed, field_723, 0x2D3); +VALIDATE_OFFSET(CPlayerPed, m_MoneyCounter, 0x2D4); +VALIDATE_OFFSET(CPlayerPed, field_1593, 0x30C); +VALIDATE_OFFSET(CPlayerPed, field_1600, 0x640); +VALIDATE_OFFSET(CPlayerPed, field_1601, 0x641); +VALIDATE_OFFSET(CPlayerPed, field_1602, 0x642); +VALIDATE_OFFSET(CPlayerPed, field_1603, 0x643); +VALIDATE_OFFSET(CPlayerPed, field_1604, 0x644); +VALIDATE_OFFSET(CPlayerPed, field_1608, 0x648); +VALIDATE_OFFSET(CPlayerPed, field_1656, 0x678); +VALIDATE_OFFSET(CPlayerPed, field_1660, 0x67C); +VALIDATE_OFFSET(CPlayerPed, field_1662, 0x680); +VALIDATE_OFFSET(CPlayerPed, field_1664, 0x682); +VALIDATE_OFFSET(CPlayerPed, m_Lives, 0x684); +VALIDATE_OFFSET(CPlayerPed, m_MoneyMultiplier, 0x6BC); +VALIDATE_OFFSET(CPlayerPed, field_1780, 0x6F4); +VALIDATE_OFFSET(CPlayerPed, field_1781, 0x6F5); +VALIDATE_OFFSET(CPlayerPed, field_1782, 0x6F6); +VALIDATE_OFFSET(CPlayerPed, field_1783, 0x6F7); +VALIDATE_OFFSET(CPlayerPed, field_1784, 0x6F8); +VALIDATE_OFFSET(CPlayerPed, field_1785, 0x6F9); +VALIDATE_OFFSET(CPlayerPed, m_nArmor, 0x6FA); +VALIDATE_OFFSET(CPlayerPed, field_1787, 0x6FB); +VALIDATE_OFFSET(CPlayerPed, field_1928, 0x788); +VALIDATE_OFFSET(CPlayerPed, m_bShowGameQuitText, 0x78A); +VALIDATE_OFFSET(CPlayerPed, field_1931, 0x78B); +VALIDATE_OFFSET(CPlayerPed, field_1932, 0x78C); +VALIDATE_OFFSET(CPlayerPed, field_1936, 0x790); +VALIDATE_OFFSET(CPlayerPed, field_1937, 0x792); +VALIDATE_OFFSET(CPlayerPed, field_1938, 0x793); +VALIDATE_OFFSET(CPlayerPed, field_1939, 0x794); +VALIDATE_OFFSET(CPlayerPed, field_1940, 0x795); +VALIDATE_OFFSET(CPlayerPed, field_1941, 0x796); +VALIDATE_OFFSET(CPlayerPed, field_1942, 0x797); +VALIDATE_OFFSET(CPlayerPed, field_1943, 0x798); VALIDATE_SIZE(CPlayerPed, 0x85C); diff --git a/plugin_II/game_II/CPopulation.cpp b/plugin_II/game_II/CPopulation.cpp index 5f57cad7e..ac9ae3f44 100644 --- a/plugin_II/game_II/CPopulation.cpp +++ b/plugin_II/game_II/CPopulation.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 2) header file + Plugin-SDK (Grand Theft Auto 2) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_II/game_II/CPopulation.h b/plugin_II/game_II/CPopulation.h index 5159b6910..63605ce30 100644 --- a/plugin_II/game_II/CPopulation.h +++ b/plugin_II/game_II/CPopulation.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CCar.h" @@ -63,6 +62,55 @@ class CPopulation { public: CCar* SpawnCar(int x, int y, int z, short rot, int model); }; +VALIDATE_OFFSET(CPopulation, field_0, 0x0); +VALIDATE_OFFSET(CPopulation, field_1, 0x1); +VALIDATE_OFFSET(CPopulation, field_2, 0x2); +VALIDATE_OFFSET(CPopulation, field_3, 0x3); +VALIDATE_OFFSET(CPopulation, field_4, 0x4); +VALIDATE_OFFSET(CPopulation, field_8, 0x8); +VALIDATE_OFFSET(CPopulation, field_9, 0x9); +VALIDATE_OFFSET(CPopulation, field_10, 0xA); +VALIDATE_OFFSET(CPopulation, field_11, 0xB); +VALIDATE_OFFSET(CPopulation, field_12, 0xC); +VALIDATE_OFFSET(CPopulation, field_16, 0x10); +VALIDATE_OFFSET(CPopulation, field_18, 0x12); +VALIDATE_OFFSET(CPopulation, field_19, 0x13); +VALIDATE_OFFSET(CPopulation, field_20, 0x14); +VALIDATE_OFFSET(CPopulation, field_24, 0x18); +VALIDATE_OFFSET(CPopulation, field_25, 0x19); +VALIDATE_OFFSET(CPopulation, field_26, 0x1A); +VALIDATE_OFFSET(CPopulation, field_27, 0x1B); +VALIDATE_OFFSET(CPopulation, field_28, 0x1C); +VALIDATE_OFFSET(CPopulation, field_32, 0x20); +VALIDATE_OFFSET(CPopulation, field_36, 0x24); +VALIDATE_OFFSET(CPopulation, field_40, 0x28); +VALIDATE_OFFSET(CPopulation, field_44, 0x2C); +VALIDATE_OFFSET(CPopulation, field_48, 0x30); +VALIDATE_OFFSET(CPopulation, field_52, 0x34); +VALIDATE_OFFSET(CPopulation, field_56, 0x38); +VALIDATE_OFFSET(CPopulation, field_60, 0x3C); +VALIDATE_OFFSET(CPopulation, field_64, 0x40); +VALIDATE_OFFSET(CPopulation, field_68, 0x44); +VALIDATE_OFFSET(CPopulation, field_72, 0x48); +VALIDATE_OFFSET(CPopulation, field_76, 0x4C); +VALIDATE_OFFSET(CPopulation, field_80, 0x50); +VALIDATE_OFFSET(CPopulation, field_81, 0x54); +VALIDATE_OFFSET(CPopulation, field_82, 0x55); +VALIDATE_OFFSET(CPopulation, field_86, 0x58); +VALIDATE_OFFSET(CPopulation, field_90, 0x5C); +VALIDATE_OFFSET(CPopulation, field_92, 0x60); +VALIDATE_OFFSET(CPopulation, field_96, 0x64); +VALIDATE_OFFSET(CPopulation, field_100, 0x68); +VALIDATE_OFFSET(CPopulation, field_104, 0x6C); +VALIDATE_OFFSET(CPopulation, field_105, 0x70); +VALIDATE_OFFSET(CPopulation, field_106, 0x71); +VALIDATE_OFFSET(CPopulation, field_107, 0x72); +VALIDATE_OFFSET(CPopulation, field_108, 0x73); +VALIDATE_OFFSET(CPopulation, field_110, 0x74); +VALIDATE_OFFSET(CPopulation, field_114, 0x78); +VALIDATE_OFFSET(CPopulation, field_116, 0x7C); +VALIDATE_OFFSET(CPopulation, m_bFreeShopping, 0x7D); +VALIDATE_SIZE(CPopulation, 0x80); extern CPopulation** gPopulation; extern CPopulation* GetPopulationManager(); diff --git a/plugin_II/game_II/CRect.h b/plugin_II/game_II/CRect.h index 0e4d8d45c..ef2746f37 100644 --- a/plugin_II/game_II/CRect.h +++ b/plugin_II/game_II/CRect.h @@ -82,3 +82,8 @@ class CRect { bottom += b; } }; +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); +VALIDATE_SIZE(CRect, 0x10); diff --git a/plugin_II/game_II/CReplay.h b/plugin_II/game_II/CReplay.h index 64adf50aa..6ac4fa6bd 100644 --- a/plugin_II/game_II/CReplay.h +++ b/plugin_II/game_II/CReplay.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -33,5 +32,21 @@ class CReplay { bool GetButton(int button); }; +VALIDATE_OFFSET(CReplay, field_0, 0x0); +VALIDATE_OFFSET(CReplay, field_4, 0x4); +VALIDATE_OFFSET(CReplay, ButtonForward, 0x8); +VALIDATE_OFFSET(CReplay, ButtonBackward, 0xC); +VALIDATE_OFFSET(CReplay, ButtonLeft, 0x10); +VALIDATE_OFFSET(CReplay, ButtonRight, 0x14); +VALIDATE_OFFSET(CReplay, ButtonAttack, 0x18); +VALIDATE_OFFSET(CReplay, ButtonEnterExit, 0x1C); +VALIDATE_OFFSET(CReplay, ButtonHandbrakeJump, 0x20); +VALIDATE_OFFSET(CReplay, ButtonPrevWeapon, 0x24); +VALIDATE_OFFSET(CReplay, ButtonNextWeapon, 0x28); +VALIDATE_OFFSET(CReplay, ButtonSpecial, 0x2C); +VALIDATE_OFFSET(CReplay, ButtonSpecial2, 0x30); +VALIDATE_OFFSET(CReplay, field_56, 0x34); +VALIDATE_OFFSET(CReplay, Mode, 0x38); +VALIDATE_SIZE(CReplay, 0x3C); extern CReplay* gReplay; diff --git a/plugin_II/game_II/CSprite.h b/plugin_II/game_II/CSprite.h index b47b418fc..eacb2ed58 100644 --- a/plugin_II/game_II/CSprite.h +++ b/plugin_II/game_II/CSprite.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CCollisionBox.h" @@ -66,5 +65,41 @@ class PLUGIN_API CSprite { public: static void DrawSprite(int id1, int id2, int x, int y, int angle, int scale, int const& mode, int enableAlpha, int alpha, int unk, int lightFlag); }; - +VALIDATE_OFFSET(CSprite, m_nRotation, 0x0); +VALIDATE_OFFSET(CSprite, field_2, 0x2); +VALIDATE_OFFSET(CSprite, field_3, 0x3); +VALIDATE_OFFSET(CSprite, m_pPrevSprite, 0x4); +VALIDATE_OFFSET(CSprite, m_pObject, 0x8); +VALIDATE_OFFSET(CSprite, m_pNextSprite, 0xC); +VALIDATE_OFFSET(CSprite, m_pCollisionBox, 0x10); +VALIDATE_OFFSET(CSprite, m_vPosition, 0x14); +VALIDATE_OFFSET(CSprite, field_34, 0x20); +VALIDATE_OFFSET(CSprite, m_nSprite, 0x22); +VALIDATE_OFFSET(CSprite, m_nRemap, 0x24); +VALIDATE_OFFSET(CSprite, field_38, 0x26); +VALIDATE_OFFSET(CSprite, field_39, 0x27); +VALIDATE_OFFSET(CSprite, m_nLayer, 0x28); +VALIDATE_OFFSET(CSprite, m_nInvisibility, 0x2C); +VALIDATE_OFFSET(CSprite, field_45, 0x2D); +VALIDATE_OFFSET(CSprite, field_46, 0x2E); +VALIDATE_OFFSET(CSprite, field_47, 0x2F); +VALIDATE_OFFSET(CSprite, m_nSpriteType, 0x30); +VALIDATE_OFFSET(CSprite, m_nLockPallete, 0x34); +VALIDATE_OFFSET(CSprite, m_nZoomInSprite, 0x38); +VALIDATE_OFFSET(CSprite, m_nZOfTileOn, 0x39); +VALIDATE_OFFSET(CSprite, field_58, 0x3A); +VALIDATE_OFFSET(CSprite, field_59, 0x3B); +VALIDATE_OFFSET(CSprite, field_60, 0x3C); +VALIDATE_OFFSET(CSprite, field_61, 0x3D); +VALIDATE_OFFSET(CSprite, field_62, 0x3E); +VALIDATE_OFFSET(CSprite, field_63, 0x3F); +VALIDATE_OFFSET(CSprite, field_64, 0x40); +VALIDATE_OFFSET(CSprite, field_65, 0x41); +VALIDATE_OFFSET(CSprite, field_66, 0x42); +VALIDATE_OFFSET(CSprite, field_67, 0x43); +VALIDATE_OFFSET(CSprite, field_68, 0x44); +VALIDATE_OFFSET(CSprite, field_69, 0x45); +VALIDATE_OFFSET(CSprite, field_70, 0x46); +VALIDATE_OFFSET(CSprite, field_71, 0x47); +VALIDATE_OFFSET(CSprite, field_72, 0x48); VALIDATE_SIZE(CSprite, 0x4C); diff --git a/plugin_II/game_II/CSprite2d.h b/plugin_II/game_II/CSprite2d.h index 3f67b50e0..6bf3a9798 100644 --- a/plugin_II/game_II/CSprite2d.h +++ b/plugin_II/game_II/CSprite2d.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CRGBA.h" @@ -46,3 +45,6 @@ class PLUGIN_API CSprite2d { void Draw(CRect const& rect, CRGBA const& color, float u0, float v0, float u1, float v1, float u3, float v3, float u2, float v2); void Draw(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, CRGBA const& color); }; +VALIDATE_OFFSET(CSprite2d, m_pTexture, 0x0); +VALIDATE_OFFSET(CSprite2d, m_cPath, 0x4); +VALIDATE_SIZE(CSprite2d, 0x108); diff --git a/plugin_II/game_II/CStyle.h b/plugin_II/game_II/CStyle.h index 68c49a0c1..859c2dd07 100644 --- a/plugin_II/game_II/CStyle.h +++ b/plugin_II/game_II/CStyle.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -29,6 +28,15 @@ struct tPaletteBase { unsigned short userRemap; unsigned short fontRemap; }; +VALIDATE_OFFSET(tPaletteBase, tile, 0x0); +VALIDATE_OFFSET(tPaletteBase, sprite, 0x2); +VALIDATE_OFFSET(tPaletteBase, carRemap, 0x4); +VALIDATE_OFFSET(tPaletteBase, redRemap, 0x6); +VALIDATE_OFFSET(tPaletteBase, codeObjRemap, 0x8); +VALIDATE_OFFSET(tPaletteBase, mapObjRemap, 0xA); +VALIDATE_OFFSET(tPaletteBase, userRemap, 0xC); +VALIDATE_OFFSET(tPaletteBase, fontRemap, 0xE); +VALIDATE_SIZE(tPaletteBase, 0x10); struct tSpriteBase { unsigned short car; @@ -38,11 +46,21 @@ struct tSpriteBase { unsigned short user; unsigned short font; }; +VALIDATE_OFFSET(tSpriteBase, car, 0x0); +VALIDATE_OFFSET(tSpriteBase, ped, 0x2); +VALIDATE_OFFSET(tSpriteBase, codeObj, 0x4); +VALIDATE_OFFSET(tSpriteBase, mapObj, 0x6); +VALIDATE_OFFSET(tSpriteBase, user, 0x8); +VALIDATE_OFFSET(tSpriteBase, font, 0xA); +VALIDATE_SIZE(tSpriteBase, 0xC); struct tFontBase { unsigned short fontCount; unsigned short base[1]; }; +VALIDATE_OFFSET(tFontBase, fontCount, 0x0); +VALIDATE_OFFSET(tFontBase, base, 0x2); +VALIDATE_SIZE(tFontBase, 0x4); struct tSpriteEntry { unsigned int ptr; @@ -50,19 +68,31 @@ struct tSpriteEntry { unsigned char height; short field_6; }; +VALIDATE_OFFSET(tSpriteEntry, ptr, 0x0); +VALIDATE_OFFSET(tSpriteEntry, width, 0x4); +VALIDATE_OFFSET(tSpriteEntry, height, 0x5); +VALIDATE_OFFSET(tSpriteEntry, field_6, 0x6); +VALIDATE_SIZE(tSpriteEntry, 0x8); struct tObjectInfo { unsigned char model; unsigned char sprites; }; +VALIDATE_OFFSET(tObjectInfo, model, 0x0); +VALIDATE_OFFSET(tObjectInfo, sprites, 0x1); +VALIDATE_SIZE(tObjectInfo, 0x2); struct tPaletteIndex { unsigned short physPalette[16384]; }; +VALIDATE_OFFSET(tPaletteIndex, physPalette, 0x0); +VALIDATE_SIZE(tPaletteIndex, 0x8000); struct tTileArray { short tiles[1024]; }; +VALIDATE_OFFSET(tTileArray, tiles, 0x0); +VALIDATE_SIZE(tTileArray, 0x800); struct tDeltaEntry { unsigned short whichSprite; @@ -70,10 +100,18 @@ struct tDeltaEntry { unsigned char pad; unsigned short deltaSize[2]; }; +VALIDATE_OFFSET(tDeltaEntry, whichSprite, 0x0); +VALIDATE_OFFSET(tDeltaEntry, deltaCount, 0x2); +VALIDATE_OFFSET(tDeltaEntry, pad, 0x3); +VALIDATE_OFFSET(tDeltaEntry, deltaSize, 0x4); +VALIDATE_SIZE(tDeltaEntry, 0x8); struct tDoorInfo { char rx, ry; }; +VALIDATE_OFFSET(tDoorInfo, rx, 0x0); +VALIDATE_OFFSET(tDoorInfo, ry, 0x1); +VALIDATE_SIZE(tDoorInfo, 0x2); struct tCarInfo { unsigned char model; @@ -94,6 +132,24 @@ struct tCarInfo { unsigned char numDoors; tDoorInfo doors[1]; }; +VALIDATE_OFFSET(tCarInfo, model, 0x0); +VALIDATE_OFFSET(tCarInfo, sprite, 0x1); +VALIDATE_OFFSET(tCarInfo, w, 0x2); +VALIDATE_OFFSET(tCarInfo, h, 0x3); +VALIDATE_OFFSET(tCarInfo, numRemaps, 0x4); +VALIDATE_OFFSET(tCarInfo, passengers, 0x5); +VALIDATE_OFFSET(tCarInfo, wreck, 0x6); +VALIDATE_OFFSET(tCarInfo, rating, 0x7); +VALIDATE_OFFSET(tCarInfo, frontWheelOffset, 0x8); +VALIDATE_OFFSET(tCarInfo, rearWheelOffset, 0x9); +VALIDATE_OFFSET(tCarInfo, frontWindowOffset, 0xA); +VALIDATE_OFFSET(tCarInfo, rearWindowOffset, 0xB); +VALIDATE_OFFSET(tCarInfo, infoFlags, 0xC); +VALIDATE_OFFSET(tCarInfo, infoFlags2, 0xD); +VALIDATE_OFFSET(tCarInfo, remap, 0xE); +VALIDATE_OFFSET(tCarInfo, numDoors, 0xF); +VALIDATE_OFFSET(tCarInfo, doors, 0x10); +VALIDATE_SIZE(tCarInfo, 0x12); class CCarInfoContainer { public: @@ -106,16 +162,25 @@ class CCarInfoContainer { memset(m_pCarInfo, 0, sizeof(m_pCarInfo)); } }; +VALIDATE_OFFSET(CCarInfoContainer, m_pCarInfo, 0x0); +VALIDATE_OFFSET(CCarInfoContainer, m_nCount, 0x400); +VALIDATE_SIZE(CCarInfoContainer, 0x404); struct tDeltaStoreEntry { unsigned short offset; unsigned char len; unsigned char data[1]; }; +VALIDATE_OFFSET(tDeltaStoreEntry, offset, 0x0); +VALIDATE_OFFSET(tDeltaStoreEntry, len, 0x2); +VALIDATE_OFFSET(tDeltaStoreEntry, data, 0x3); +VALIDATE_SIZE(tDeltaStoreEntry, 0x4); struct tPhysicalPalette { unsigned char colors[256][4]; }; +VALIDATE_OFFSET(tPhysicalPalette, colors, 0x0); +VALIDATE_SIZE(tPhysicalPalette, 0x400); class CStyle { public: @@ -164,6 +229,40 @@ class CStyle { static void SetFontStyles(int fonts); }; +VALIDATE_OFFSET(CStyle, m_nPalBaseSize, 0x0); +VALIDATE_OFFSET(CStyle, m_nFontBaseSize, 0x2); +VALIDATE_OFFSET(CStyle, m_nSpriteIndexSize, 0x4); +VALIDATE_OFFSET(CStyle, m_nMapObjectInfoSize, 0x6); +VALIDATE_OFFSET(CStyle, m_nPhysPalSize, 0x8); +VALIDATE_OFFSET(CStyle, field_18, 0xA); +VALIDATE_OFFSET(CStyle, m_pPaletteBase, 0xC); +VALIDATE_OFFSET(CStyle, m_pPaletteBase2, 0x10); +VALIDATE_OFFSET(CStyle, m_pSpriteBase, 0x14); +VALIDATE_OFFSET(CStyle, m_pSpriteBase2, 0x18); +VALIDATE_OFFSET(CStyle, m_pFontBase, 0x1C); +VALIDATE_OFFSET(CStyle, m_pSpriteIndex, 0x20); +VALIDATE_OFFSET(CStyle, m_pMapObjectInfo, 0x24); +VALIDATE_OFFSET(CStyle, m_pPaletteIndex, 0x28); +VALIDATE_OFFSET(CStyle, m_pPhysPalette, 0x2C); +VALIDATE_OFFSET(CStyle, m_pPhysPalette2, 0x30); +VALIDATE_OFFSET(CStyle, m_pSprites, 0x34); +VALIDATE_OFFSET(CStyle, field_56, 0x38); +VALIDATE_OFFSET(CStyle, m_pTiles, 0x3C); +VALIDATE_OFFSET(CStyle, m_pTileArray, 0x40); +VALIDATE_OFFSET(CStyle, field_68, 0x44); +VALIDATE_OFFSET(CStyle, m_pDeltaStore, 0x48); +VALIDATE_OFFSET(CStyle, m_pDeltaEntry, 0x4C); +VALIDATE_OFFSET(CStyle, field_80, 0x50); +VALIDATE_OFFSET(CStyle, field_84, 0x54); +VALIDATE_OFFSET(CStyle, m_pCarInfo, 0x58); +VALIDATE_OFFSET(CStyle, m_pCarInfoContainer, 0x5C); +VALIDATE_OFFSET(CStyle, m_nDeltaSize, 0x60); +VALIDATE_OFFSET(CStyle, field_100, 0x64); +VALIDATE_OFFSET(CStyle, field_104, 0x68); +VALIDATE_OFFSET(CStyle, field_106, 0x6A); +VALIDATE_OFFSET(CStyle, field_107, 0x6B); +VALIDATE_OFFSET(CStyle, field_108, 0x6C); +VALIDATE_SIZE(CStyle, 0x106C); extern CStyle** gCurrentStyle; extern CStyle* GetCurrentStyle(); diff --git a/plugin_II/game_II/CText.h b/plugin_II/game_II/CText.h index 3b6aa7147..96b02d115 100644 --- a/plugin_II/game_II/CText.h +++ b/plugin_II/game_II/CText.h @@ -12,17 +12,26 @@ class CData { wchar_t* chars; int numChars; }; +VALIDATE_OFFSET(CData, chars, 0x0); +VALIDATE_OFFSET(CData, numChars, 0x4); +VALIDATE_SIZE(CData, 0x8); struct CKeyEntry { wchar_t* value; char key[8]; }; +VALIDATE_OFFSET(CKeyEntry, value, 0x0); +VALIDATE_OFFSET(CKeyEntry, key, 0x4); +VALIDATE_SIZE(CKeyEntry, 0xC); class CKeyArray { public: CKeyEntry* entries; int numEntries; }; +VALIDATE_OFFSET(CKeyArray, entries, 0x0); +VALIDATE_OFFSET(CKeyArray, numEntries, 0x4); +VALIDATE_SIZE(CKeyArray, 0x8); class PLUGIN_API CText { public: @@ -39,7 +48,9 @@ class PLUGIN_API CText { void LoadChunk(const char* type, int size); void Update(wchar_t* chars); }; - +VALIDATE_OFFSET(CText, keyArray, 0x0); +VALIDATE_OFFSET(CText, data, 0x8); +VALIDATE_OFFSET(CText, language, 0x10); VALIDATE_SIZE(CText, 0x14); extern CText** TheText; diff --git a/plugin_II/game_II/CTextureManager.h b/plugin_II/game_II/CTextureManager.h index 84a1c35b4..237951779 100644 --- a/plugin_II/game_II/CTextureManager.h +++ b/plugin_II/game_II/CTextureManager.h @@ -14,6 +14,11 @@ struct tTexMgr { short field_8; short field_A; }; +VALIDATE_OFFSET(tTexMgr, data, 0x0); +VALIDATE_OFFSET(tTexMgr, field_4, 0x4); +VALIDATE_OFFSET(tTexMgr, field_8, 0x8); +VALIDATE_OFFSET(tTexMgr, field_A, 0xA); +VALIDATE_SIZE(tTexMgr, 0xC); struct tTexMgr2 { tTexture** field_0; @@ -26,6 +31,16 @@ struct tTexMgr2 { char field_12; char field_13; }; +VALIDATE_OFFSET(tTexMgr2, field_0, 0x0); +VALIDATE_OFFSET(tTexMgr2, field_4, 0x4); +VALIDATE_OFFSET(tTexMgr2, field_6, 0x6); +VALIDATE_OFFSET(tTexMgr2, field_8, 0x8); +VALIDATE_OFFSET(tTexMgr2, field_C, 0xC); +VALIDATE_OFFSET(tTexMgr2, field_10, 0x10); +VALIDATE_OFFSET(tTexMgr2, field_11, 0x11); +VALIDATE_OFFSET(tTexMgr2, field_12, 0x12); +VALIDATE_OFFSET(tTexMgr2, field_13, 0x13); +VALIDATE_SIZE(tTexMgr2, 0x14); class CTextureManager { public: @@ -53,7 +68,23 @@ class CTextureManager { void Unload(); tTexture* GetTexture(int id1, int id2, int const& mode, int enableAlpha); }; - +VALIDATE_OFFSET(CTextureManager, m_pTextures, 0x0); +VALIDATE_OFFSET(CTextureManager, field_1000, 0x1000); +VALIDATE_OFFSET(CTextureManager, m_bTexturesInitialised, 0x1001); +VALIDATE_OFFSET(CTextureManager, field_1002, 0x1002); +VALIDATE_OFFSET(CTextureManager, field_1003, 0x1003); +VALIDATE_OFFSET(CTextureManager, field_1004, 0x1004); +VALIDATE_OFFSET(CTextureManager, field_10C4, 0x10C4); +VALIDATE_OFFSET(CTextureManager, field_1544, 0x1544); +VALIDATE_OFFSET(CTextureManager, field_1548, 0x1548); +VALIDATE_OFFSET(CTextureManager, field_155C, 0x155C); +VALIDATE_OFFSET(CTextureManager, field_1570, 0x1570); +VALIDATE_OFFSET(CTextureManager, field_1584, 0x1584); +VALIDATE_OFFSET(CTextureManager, field_1598, 0x1598); +VALIDATE_OFFSET(CTextureManager, field_15AC, 0x15AC); +VALIDATE_OFFSET(CTextureManager, field_15C0, 0x15C0); +VALIDATE_OFFSET(CTextureManager, field_15D4_idx, 0x15D4); +VALIDATE_OFFSET(CTextureManager, field_15D6_pal_count, 0x15D6); VALIDATE_SIZE(CTextureManager, 0x15D8); extern CTextureManager** TextureManager; diff --git a/plugin_II/game_II/CTheScripts.h b/plugin_II/game_II/CTheScripts.h index 63dead79f..dc7dc9ed2 100644 --- a/plugin_II/game_II/CTheScripts.h +++ b/plugin_II/game_II/CTheScripts.h @@ -22,7 +22,14 @@ class CTheScripts { CTheScripts(); void Save(const char* saveName); }; - +VALIDATE_OFFSET(CTheScripts, field_0, 0x0); +VALIDATE_OFFSET(CTheScripts, field_1, 0x4); +VALIDATE_OFFSET(CTheScripts, OnAMissionFlag, 0x344); +VALIDATE_OFFSET(CTheScripts, field_4, 0x348); +VALIDATE_OFFSET(CTheScripts, field_5, 0x468); +VALIDATE_OFFSET(CTheScripts, gap, 0x46C); +VALIDATE_OFFSET(CTheScripts, missionScript, 0x334C); +VALIDATE_OFFSET(CTheScripts, gap2, 0x1334C); VALIDATE_SIZE(CTheScripts, 0xC1EA8); extern CTheScripts** TheScripts; diff --git a/plugin_II/game_II/CWeapon.h b/plugin_II/game_II/CWeapon.h index b00b09de1..b4414f946 100644 --- a/plugin_II/game_II/CWeapon.h +++ b/plugin_II/game_II/CWeapon.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -76,5 +75,36 @@ class CWeapon { public: }; - +VALIDATE_OFFSET(CWeapon, m_nAmmo, 0x0); +VALIDATE_OFFSET(CWeapon, m_nTimer, 0x2); +VALIDATE_OFFSET(CWeapon, field_3, 0x3); +VALIDATE_OFFSET(CWeapon, field_8, 0x4); +VALIDATE_OFFSET(CWeapon, field_9, 0x8); +VALIDATE_OFFSET(CWeapon, field_10, 0x9); +VALIDATE_OFFSET(CWeapon, field_11, 0xA); +VALIDATE_OFFSET(CWeapon, field_12, 0xB); +VALIDATE_OFFSET(CWeapon, field_13, 0xC); +VALIDATE_OFFSET(CWeapon, field_14, 0xD); +VALIDATE_OFFSET(CWeapon, field_15, 0xE); +VALIDATE_OFFSET(CWeapon, field_16, 0xF); +VALIDATE_OFFSET(CWeapon, field_17, 0x10); +VALIDATE_OFFSET(CWeapon, field_18, 0x11); +VALIDATE_OFFSET(CWeapon, field_19, 0x12); +VALIDATE_OFFSET(CWeapon, field_20, 0x13); +VALIDATE_OFFSET(CWeapon, m_nVehicleId, 0x14); +VALIDATE_OFFSET(CWeapon, m_pNext, 0x18); +VALIDATE_OFFSET(CWeapon, m_eType, 0x1C); +VALIDATE_OFFSET(CWeapon, field_32, 0x20); +VALIDATE_OFFSET(CWeapon, field_33, 0x21); +VALIDATE_OFFSET(CWeapon, field_34, 0x22); +VALIDATE_OFFSET(CWeapon, field_35, 0x23); +VALIDATE_OFFSET(CWeapon, m_pPed, 0x24); +VALIDATE_OFFSET(CWeapon, m_nRange, 0x28); +VALIDATE_OFFSET(CWeapon, field_41, 0x29); +VALIDATE_OFFSET(CWeapon, field_42, 0x2A); +VALIDATE_OFFSET(CWeapon, field_43, 0x2B); +VALIDATE_OFFSET(CWeapon, field_44, 0x2C); +VALIDATE_OFFSET(CWeapon, field_45, 0x2D); +VALIDATE_OFFSET(CWeapon, field_46, 0x2E); +VALIDATE_OFFSET(CWeapon, field_47, 0x2F); VALIDATE_SIZE(CWeapon, 0x30); diff --git a/plugin_II/game_II/CWorld.h b/plugin_II/game_II/CWorld.h index d1a5ae288..8f2ef6f8e 100644 --- a/plugin_II/game_II/CWorld.h +++ b/plugin_II/game_II/CWorld.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -12,6 +11,7 @@ class CWorld { public: int FindGroundZForCoord(int* z, int x, int y); }; +VALIDATE_SIZE(CWorld, 0x1); extern CWorld** gWorld; extern CWorld* GetWorld(); diff --git a/plugin_II/game_II/GBH.h b/plugin_II/game_II/GBH.h index f578fe78d..a86585fc1 100644 --- a/plugin_II/game_II/GBH.h +++ b/plugin_II/game_II/GBH.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "tVideo.h" @@ -21,6 +20,10 @@ struct tPalData { unsigned short* data; unsigned long loaded; }; +VALIDATE_OFFSET(tPalData, originalData, 0x0); +VALIDATE_OFFSET(tPalData, data, 0x4); +VALIDATE_OFFSET(tPalData, loaded, 0x8); +VALIDATE_SIZE(tPalData, 0xC); typedef int(__stdcall* T_gbh_InitDLL)(tVideo*); typedef int(__stdcall* T_gbh_Init)(int); @@ -135,7 +138,21 @@ struct tGraphics { unsigned long pitchQ; IDirectDrawSurface4* surface; }; - +VALIDATE_OFFSET(tGraphics, videoDriver, 0x0); +VALIDATE_OFFSET(tGraphics, nextDevice, 0x4); +VALIDATE_OFFSET(tGraphics, firstDevice, 0x8); +VALIDATE_OFFSET(tGraphics, deviceIdGen, 0xC); +VALIDATE_OFFSET(tGraphics, numEnums, 0x10); +VALIDATE_OFFSET(tGraphics, activeDevice, 0x14); +VALIDATE_OFFSET(tGraphics, currentId, 0x18); +VALIDATE_OFFSET(tGraphics, field_1C, 0x1C); +VALIDATE_OFFSET(tGraphics, field_20, 0x20); +VALIDATE_OFFSET(tGraphics, d3d, 0x24); +VALIDATE_OFFSET(tGraphics, device, 0x28); +VALIDATE_OFFSET(tGraphics, viewPort, 0x2C); +VALIDATE_OFFSET(tGraphics, d3dViewPort, 0x30); +VALIDATE_OFFSET(tGraphics, pitchQ, 0x5C); +VALIDATE_OFFSET(tGraphics, surface, 0x60); VALIDATE_SIZE(tGraphics, 0x64); extern tGraphics* GetGBH(); diff --git a/plugin_II/game_II/cDMAudio.h b/plugin_II/game_II/cDMAudio.h index bc216f849..3c27aeb9e 100644 --- a/plugin_II/game_II/cDMAudio.h +++ b/plugin_II/game_II/cDMAudio.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAudioManager.h" @@ -87,5 +86,6 @@ class cDMAudio { int CreateEntity(void* object); void DestroyEntity(int audioEntity); }; +VALIDATE_SIZE(cDMAudio, 0x1); extern cDMAudio& DMAudio; diff --git a/plugin_II/game_II/cSampleManager.h b/plugin_II/game_II/cSampleManager.h index db07e9be6..921ad4bfd 100644 --- a/plugin_II/game_II/cSampleManager.h +++ b/plugin_II/game_II/cSampleManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -23,6 +22,13 @@ struct tSample { int loopStart; int loopEnd; }; +VALIDATE_OFFSET(tSample, offset, 0x0); +VALIDATE_OFFSET(tSample, size, 0x4); +VALIDATE_OFFSET(tSample, frequency, 0x8); +VALIDATE_OFFSET(tSample, field_C, 0xC); +VALIDATE_OFFSET(tSample, loopStart, 0x10); +VALIDATE_OFFSET(tSample, loopEnd, 0x14); +VALIDATE_SIZE(tSample, 0x18); class cSampleManager { public: @@ -72,7 +78,40 @@ class cSampleManager { bool IsFrontendTrackPlaying(); bool IsSampleNotPlaying(); }; - +VALIDATE_OFFSET(cSampleManager, m_pDig, 0x0); +VALIDATE_OFFSET(cSampleManager, field_4, 0x4); +VALIDATE_OFFSET(cSampleManager, m_szCDRomRootPath, 0x5); +VALIDATE_OFFSET(cSampleManager, m_bInitialised, 0x55); +VALIDATE_OFFSET(cSampleManager, pad, 0x56); +VALIDATE_OFFSET(cSampleManager, m_hSamples, 0x58); +VALIDATE_OFFSET(cSampleManager, m_hSample, 0x98); +VALIDATE_OFFSET(cSampleManager, m_hStreams, 0x9C); +VALIDATE_OFFSET(cSampleManager, field_A4, 0xA4); +VALIDATE_OFFSET(cSampleManager, field_A5, 0xA5); +VALIDATE_OFFSET(cSampleManager, field_A6, 0xA6); +VALIDATE_OFFSET(cSampleManager, field_A7, 0xA7); +VALIDATE_OFFSET(cSampleManager, m_aSamples, 0xA8); +VALIDATE_OFFSET(cSampleManager, field_1EA8, 0x1EA8); +VALIDATE_OFFSET(cSampleManager, field_1EAC, 0x1EAC); +VALIDATE_OFFSET(cSampleManager, m_nNumberOfSamples, 0x1EB0); +VALIDATE_OFFSET(cSampleManager, field_1EB1, 0x1EB1); +VALIDATE_OFFSET(cSampleManager, field_1EB2, 0x1EB2); +VALIDATE_OFFSET(cSampleManager, field_1EB3, 0x1EB3); +VALIDATE_OFFSET(cSampleManager, m_aProvider, 0x1EB4); +VALIDATE_OFFSET(cSampleManager, m_szStr, 0x22B4); +VALIDATE_OFFSET(cSampleManager, field_26B4, 0x26B4); +VALIDATE_OFFSET(cSampleManager, m_nUsingEAX, 0x26B8); +VALIDATE_OFFSET(cSampleManager, field_26BC, 0x26BC); +VALIDATE_OFFSET(cSampleManager, m_n3dProvider, 0x26C0); +VALIDATE_OFFSET(cSampleManager, m_a3dSamples, 0x26C4); +VALIDATE_OFFSET(cSampleManager, field_2704, 0x2704); +VALIDATE_OFFSET(cSampleManager, field_2708, 0x2708); +VALIDATE_OFFSET(cSampleManager, field_270C, 0x270C); +VALIDATE_OFFSET(cSampleManager, field_2710, 0x2710); +VALIDATE_OFFSET(cSampleManager, field_2714, 0x2714); +VALIDATE_OFFSET(cSampleManager, field_2715, 0x2715); +VALIDATE_OFFSET(cSampleManager, field_2716, 0x2716); +VALIDATE_OFFSET(cSampleManager, field_2717, 0x2717); VALIDATE_SIZE(cSampleManager, 0x2718); extern cSampleManager& SampleManager; diff --git a/plugin_II/game_II/tImage.h b/plugin_II/game_II/tImage.h index 48ea7ee7f..9e49401a1 100644 --- a/plugin_II/game_II/tImage.h +++ b/plugin_II/game_II/tImage.h @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto 2) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once struct tImage { @@ -13,3 +19,15 @@ struct tImage { BYTE field_11; DWORD field_12; }; +VALIDATE_OFFSET(tImage, field_0, 0x0); +VALIDATE_OFFSET(tImage, field_1, 0x1); +VALIDATE_OFFSET(tImage, field_2, 0x2); +VALIDATE_OFFSET(tImage, field_3, 0x3); +VALIDATE_OFFSET(tImage, field_4, 0x4); +VALIDATE_OFFSET(tImage, field_8, 0x8); +VALIDATE_OFFSET(tImage, width, 0xC); +VALIDATE_OFFSET(tImage, height, 0xE); +VALIDATE_OFFSET(tImage, field_10, 0x10); +VALIDATE_OFFSET(tImage, field_11, 0x11); +VALIDATE_OFFSET(tImage, field_12, 0x14); +VALIDATE_SIZE(tImage, 0x18); diff --git a/plugin_II/game_II/tLight.h b/plugin_II/game_II/tLight.h index 024e05c14..f66c1c924 100644 --- a/plugin_II/game_II/tLight.h +++ b/plugin_II/game_II/tLight.h @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto 2) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once struct tLight { @@ -7,3 +13,9 @@ struct tLight { float z; int colour; }; +VALIDATE_OFFSET(tLight, field_0, 0x0); +VALIDATE_OFFSET(tLight, x, 0x4); +VALIDATE_OFFSET(tLight, y, 0x8); +VALIDATE_OFFSET(tLight, z, 0xC); +VALIDATE_OFFSET(tLight, colour, 0x10); +VALIDATE_SIZE(tLight, 0x14); diff --git a/plugin_II/game_II/tTexture.h b/plugin_II/game_II/tTexture.h index 263cfaaf5..a26791308 100644 --- a/plugin_II/game_II/tTexture.h +++ b/plugin_II/game_II/tTexture.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -35,6 +34,32 @@ struct tHardwareTexture { struct IDirectDrawSurface4* surface; struct IDirectDrawSurface4* texSurface; }; +VALIDATE_OFFSET(tHardwareTexture, id, 0x0); +VALIDATE_OFFSET(tHardwareTexture, flags, 0x4); +VALIDATE_OFFSET(tHardwareTexture, field_8, 0x8); +VALIDATE_OFFSET(tHardwareTexture, field_C, 0xC); +VALIDATE_OFFSET(tHardwareTexture, field_10, 0x10); +VALIDATE_OFFSET(tHardwareTexture, bitCount, 0x14); +VALIDATE_OFFSET(tHardwareTexture, bitIndex, 0x18); +VALIDATE_OFFSET(tHardwareTexture, field_1C, 0x1C); +VALIDATE_OFFSET(tHardwareTexture, field_20, 0x20); +VALIDATE_OFFSET(tHardwareTexture, field_24, 0x24); +VALIDATE_OFFSET(tHardwareTexture, field_28, 0x28); +VALIDATE_OFFSET(tHardwareTexture, field_2C, 0x2C); +VALIDATE_OFFSET(tHardwareTexture, field_30, 0x30); +VALIDATE_OFFSET(tHardwareTexture, field_34, 0x34); +VALIDATE_OFFSET(tHardwareTexture, field_38, 0x38); +VALIDATE_OFFSET(tHardwareTexture, lockedPixelData, 0x3C); +VALIDATE_OFFSET(tHardwareTexture, pitch, 0x40); +VALIDATE_OFFSET(tHardwareTexture, width, 0x44); +VALIDATE_OFFSET(tHardwareTexture, height, 0x46); +VALIDATE_OFFSET(tHardwareTexture, graphics, 0x48); +VALIDATE_OFFSET(tHardwareTexture, next, 0x4C); +VALIDATE_OFFSET(tHardwareTexture, prev, 0x50); +VALIDATE_OFFSET(tHardwareTexture, d3dTexture, 0x54); +VALIDATE_OFFSET(tHardwareTexture, surface, 0x58); +VALIDATE_OFFSET(tHardwareTexture, texSurface, 0x5C); +VALIDATE_SIZE(tHardwareTexture, 0x60); struct tCache { unsigned char field_0; @@ -53,7 +78,21 @@ struct tCache { tHardwareTexture* hwTexture; unsigned int field_28; }; - +VALIDATE_OFFSET(tCache, field_0, 0x0); +VALIDATE_OFFSET(tCache, field_1_flags, 0x1); +VALIDATE_OFFSET(tCache, field_2, 0x2); +VALIDATE_OFFSET(tCache, field_3, 0x3); +VALIDATE_OFFSET(tCache, field_4, 0x4); +VALIDATE_OFFSET(tCache, field_6_cache_idx, 0x6); +VALIDATE_OFFSET(tCache, field_8_used_Frame_num, 0x8); +VALIDATE_OFFSET(tCache, field_C, 0xC); +VALIDATE_OFFSET(tCache, field_10, 0x10); +VALIDATE_OFFSET(tCache, field_14, 0x14); +VALIDATE_OFFSET(tCache, texture, 0x18); +VALIDATE_OFFSET(tCache, next, 0x1C); +VALIDATE_OFFSET(tCache, cache, 0x20); +VALIDATE_OFFSET(tCache, hwTexture, 0x24); +VALIDATE_OFFSET(tCache, field_28, 0x28); VALIDATE_SIZE(tCache, 0x2C); struct tTexture { @@ -72,5 +111,18 @@ struct tTexture { unsigned short* palData; tCache* cache; }; - +VALIDATE_OFFSET(tTexture, id, 0x0); +VALIDATE_OFFSET(tTexture, field_2, 0x2); +VALIDATE_OFFSET(tTexture, palIsTransparent, 0x4); +VALIDATE_OFFSET(tTexture, palSize, 0x6); +VALIDATE_OFFSET(tTexture, lockedPixels, 0x8); +VALIDATE_OFFSET(tTexture, field_C, 0xC); +VALIDATE_OFFSET(tTexture, field_D, 0xD); +VALIDATE_OFFSET(tTexture, width, 0xE); +VALIDATE_OFFSET(tTexture, height, 0x10); +VALIDATE_OFFSET(tTexture, palIsValid, 0x12); +VALIDATE_OFFSET(tTexture, flags, 0x13); +VALIDATE_OFFSET(tTexture, pixels, 0x14); +VALIDATE_OFFSET(tTexture, palData, 0x18); +VALIDATE_OFFSET(tTexture, cache, 0x1C); VALIDATE_SIZE(tTexture, 0x20); diff --git a/plugin_II/game_II/tVertex.h b/plugin_II/game_II/tVertex.h index ac362c6a9..7260d513e 100644 --- a/plugin_II/game_II/tVertex.h +++ b/plugin_II/game_II/tVertex.h @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto 2) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once struct tVertex { @@ -10,5 +16,14 @@ struct tVertex { float u; float v; }; +VALIDATE_OFFSET(tVertex, x, 0x0); +VALIDATE_OFFSET(tVertex, y, 0x4); +VALIDATE_OFFSET(tVertex, z, 0x8); +VALIDATE_OFFSET(tVertex, w, 0xC); +VALIDATE_OFFSET(tVertex, diff, 0x10); +VALIDATE_OFFSET(tVertex, spec, 0x14); +VALIDATE_OFFSET(tVertex, u, 0x18); +VALIDATE_OFFSET(tVertex, v, 0x1C); +VALIDATE_SIZE(tVertex, 0x20); #define COLOR_RGBA(r, g, b, a) ((unsigned int)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) diff --git a/plugin_II/game_II/tVideo.h b/plugin_II/game_II/tVideo.h index 517318c2e..7669af335 100644 --- a/plugin_II/game_II/tVideo.h +++ b/plugin_II/game_II/tVideo.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include @@ -21,6 +20,16 @@ struct tDevice { unsigned long totalVideoMemory; unsigned long buffer; }; +VALIDATE_OFFSET(tDevice, id, 0x0); +VALIDATE_OFFSET(tDevice, flags, 0x4); +VALIDATE_OFFSET(tDevice, driverName, 0x8); +VALIDATE_OFFSET(tDevice, driverDesc, 0xC); +VALIDATE_OFFSET(tDevice, next, 0x10); +VALIDATE_OFFSET(tDevice, guid, 0x14); +VALIDATE_OFFSET(tDevice, field_18, 0x18); +VALIDATE_OFFSET(tDevice, totalVideoMemory, 0x28); +VALIDATE_OFFSET(tDevice, buffer, 0x2C); +VALIDATE_SIZE(tDevice, 0x30); struct tDisplayMode { unsigned long displayModeIndex; @@ -40,11 +49,31 @@ struct tDisplayMode { tDisplayMode* field_38; unsigned long field_3C; }; +VALIDATE_OFFSET(tDisplayMode, displayModeIndex, 0x0); +VALIDATE_OFFSET(tDisplayMode, deviceId, 0x4); +VALIDATE_OFFSET(tDisplayMode, width, 0x8); +VALIDATE_OFFSET(tDisplayMode, height, 0xC); +VALIDATE_OFFSET(tDisplayMode, pitch, 0x10); +VALIDATE_OFFSET(tDisplayMode, bits, 0x14); +VALIDATE_OFFSET(tDisplayMode, field_18, 0x18); +VALIDATE_OFFSET(tDisplayMode, field_1C, 0x1C); +VALIDATE_OFFSET(tDisplayMode, field_20, 0x20); +VALIDATE_OFFSET(tDisplayMode, field_24, 0x24); +VALIDATE_OFFSET(tDisplayMode, field_28, 0x28); +VALIDATE_OFFSET(tDisplayMode, field_2C, 0x2C); +VALIDATE_OFFSET(tDisplayMode, field_30, 0x30); +VALIDATE_OFFSET(tDisplayMode, field_34, 0x34); +VALIDATE_OFFSET(tDisplayMode, field_38, 0x38); +VALIDATE_OFFSET(tDisplayMode, field_3C, 0x3C); +VALIDATE_SIZE(tDisplayMode, 0x40); struct tVidVersion { unsigned long version; char versionString[255]; }; +VALIDATE_OFFSET(tVidVersion, version, 0x0); +VALIDATE_OFFSET(tVidVersion, versionString, 0x4); +VALIDATE_SIZE(tVidVersion, 0x104); struct tVideoFunctions; @@ -99,6 +128,56 @@ struct tVideo { DDCAPS field_344; HWND hwnd; }; +VALIDATE_OFFSET(tVideo, field_0, 0x0); +VALIDATE_OFFSET(tVideo, flags, 0x4); +VALIDATE_OFFSET(tVideo, width, 0x8); +VALIDATE_OFFSET(tVideo, height, 0xC); +VALIDATE_OFFSET(tVideo, bits, 0x10); +VALIDATE_OFFSET(tVideo, displayMode, 0x14); +VALIDATE_OFFSET(tVideo, field_18, 0x18); +VALIDATE_OFFSET(tVideo, field_1C, 0x1C); +VALIDATE_OFFSET(tVideo, field_20, 0x20); +VALIDATE_OFFSET(tVideo, field_24, 0x24); +VALIDATE_OFFSET(tVideo, field_28, 0x28); +VALIDATE_OFFSET(tVideo, field_2C, 0x2C); +VALIDATE_OFFSET(tVideo, field_30, 0x30); +VALIDATE_OFFSET(tVideo, field_34, 0x34); +VALIDATE_OFFSET(tVideo, field_38, 0x38); +VALIDATE_OFFSET(tVideo, field_3C, 0x3C); +VALIDATE_OFFSET(tVideo, full_screen, 0x40); +VALIDATE_OFFSET(tVideo, field_44, 0x44); +VALIDATE_OFFSET(tVideo, field_48, 0x48); +VALIDATE_OFFSET(tVideo, field_4C, 0x4C); +VALIDATE_OFFSET(tVideo, pixels, 0x50); +VALIDATE_OFFSET(tVideo, pitch, 0x54); +VALIDATE_OFFSET(tVideo, field_58, 0x58); +VALIDATE_OFFSET(tVideo, field_5C, 0x5C); +VALIDATE_OFFSET(tVideo, field_60, 0x60); +VALIDATE_OFFSET(tVideo, field_64, 0x64); +VALIDATE_OFFSET(tVideo, field_68, 0x68); +VALIDATE_OFFSET(tVideo, field_6C, 0x6C); +VALIDATE_OFFSET(tVideo, field_70, 0x70); +VALIDATE_OFFSET(tVideo, field_74, 0x74); +VALIDATE_OFFSET(tVideo, field_78, 0x78); +VALIDATE_OFFSET(tVideo, handle, 0x7C); +VALIDATE_OFFSET(tVideo, activeMode, 0x80); +VALIDATE_OFFSET(tVideo, field_84, 0x84); +VALIDATE_OFFSET(tVideo, lastError, 0x88); +VALIDATE_OFFSET(tVideo, ddraw7, 0x8C); +VALIDATE_OFFSET(tVideo, buffer, 0x90); +VALIDATE_OFFSET(tVideo, ddraw4, 0x120); +VALIDATE_OFFSET(tVideo, field_124, 0x124); +VALIDATE_OFFSET(tVideo, surfacePrimary, 0x134); +VALIDATE_OFFSET(tVideo, surface, 0x138); +VALIDATE_OFFSET(tVideo, surfaceDesc, 0x13C); +VALIDATE_OFFSET(tVideo, clipper, 0x1B8); +VALIDATE_OFFSET(tVideo, field_1BC, 0x1BC); +VALIDATE_OFFSET(tVideo, field_1C0, 0x1C0); +VALIDATE_OFFSET(tVideo, field_1C4, 0x1C4); +VALIDATE_OFFSET(tVideo, caps, 0x1C8); +VALIDATE_OFFSET(tVideo, field_344, 0x344); +VALIDATE_OFFSET(tVideo, hwnd, 0x4C0); +VALIDATE_SIZE(tVideo, 0x4C4); typedef tVidVersion(__stdcall* T_Vid_GetVersion)(); typedef tVideo(__stdcall* T_Vid_Init_SYS)(HINSTANCE hInstance, unsigned short flags); @@ -147,6 +226,29 @@ struct tVideoFunctions { T_Vid_InitDLL* pVid_InitDLL; T_Vid_SetGamma* pVid_SetGamma; }; +VALIDATE_OFFSET(tVideoFunctions, pVid_GetVersion, 0x0); +VALIDATE_OFFSET(tVideoFunctions, pVid_Init_SYS, 0x4); +VALIDATE_OFFSET(tVideoFunctions, pVid_CheckMode, 0x8); +VALIDATE_OFFSET(tVideoFunctions, pVid_FindMode, 0xC); +VALIDATE_OFFSET(tVideoFunctions, pVid_FindFirstMode, 0x10); +VALIDATE_OFFSET(tVideoFunctions, pVid_FindNextMode, 0x14); +VALIDATE_OFFSET(tVideoFunctions, pVid_FindDevice, 0x18); +VALIDATE_OFFSET(tVideoFunctions, pVid_SetDevice, 0x1C); +VALIDATE_OFFSET(tVideoFunctions, pVid_CloseScreen, 0x20); +VALIDATE_OFFSET(tVideoFunctions, pVid_SetMode, 0x24); +VALIDATE_OFFSET(tVideoFunctions, pVid_FlipBuffers, 0x28); +VALIDATE_OFFSET(tVideoFunctions, pVid_ReleaseSurface, 0x2C); +VALIDATE_OFFSET(tVideoFunctions, pVid_GrabSurface, 0x30); +VALIDATE_OFFSET(tVideoFunctions, pVid_ShutDown_SYS, 0x34); +VALIDATE_OFFSET(tVideoFunctions, pVid_EnableWrites, 0x38); +VALIDATE_OFFSET(tVideoFunctions, pVid_DisableWrites, 0x3C); +VALIDATE_OFFSET(tVideoFunctions, pVid_GetSurface, 0x40); +VALIDATE_OFFSET(tVideoFunctions, pVid_FreeSurface, 0x44); +VALIDATE_OFFSET(tVideoFunctions, pVid_ClearScreen, 0x48); +VALIDATE_OFFSET(tVideoFunctions, pVid_WindowProc, 0x4C); +VALIDATE_OFFSET(tVideoFunctions, pVid_InitDLL, 0x50); +VALIDATE_OFFSET(tVideoFunctions, pVid_SetGamma, 0x54); +VALIDATE_SIZE(tVideoFunctions, 0x58); extern T_Vid_GetVersion& Vid_GetVersion; extern T_Vid_Init_SYS& Vid_Init_SYS; diff --git a/plugin_III/game_III/AnimBlendFrameData.h b/plugin_III/game_III/AnimBlendFrameData.h index 4f26268d3..ee113f207 100644 --- a/plugin_III/game_III/AnimBlendFrameData.h +++ b/plugin_III/game_III/AnimBlendFrameData.h @@ -10,15 +10,6 @@ #include "RenderWare.h" #include "rw/rphanim.h" -#ifdef PED_SKIN -struct RpHAnimStdInterpFrame { - RpHAnimStdKeyFrame* keyFrame1; - RpHAnimStdKeyFrame* keyFrame2; - RtQuat q; - RwV3d t; -}; -#endif - enum PLUGIN_API eFrameDataFlag : unsigned char { IGNORE_ROTATION = 0x2, IGNORE_TRANSLATION = 0x4, @@ -26,25 +17,46 @@ enum PLUGIN_API eFrameDataFlag : unsigned char { VELOCITY_EXTRACTION_3D = 0x10 }; +#ifndef PED_SKIN struct PLUGIN_API AnimBlendFrameData { unsigned char m_nFlags; RwV3d m_vecResetPos; + RwFrame* m_pFrame; +}; +VALIDATE_OFFSET(AnimBlendFrameData, m_nFlags, 0x0); +VALIDATE_OFFSET(AnimBlendFrameData, m_vecResetPos, 0x4); +VALIDATE_OFFSET(AnimBlendFrameData, m_pFrame, 0x10); +VALIDATE_SIZE(AnimBlendFrameData, 0x14); +#endif + #ifdef PED_SKIN +struct RpHAnimStdInterpFrame { + RpHAnimStdKeyFrame* keyFrame1; + RpHAnimStdKeyFrame* keyFrame2; + RtQuat q; + RwV3d t; +}; +VALIDATE_OFFSET(RpHAnimStdInterpFrame, keyFrame1, 0x0); +VALIDATE_OFFSET(RpHAnimStdInterpFrame, keyFrame2, 0x4); +VALIDATE_OFFSET(RpHAnimStdInterpFrame, q, 0x8); +VALIDATE_OFFSET(RpHAnimStdInterpFrame, t, 0x18); +VALIDATE_SIZE(RpHAnimStdInterpFrame, 0x24); + +struct PLUGIN_API AnimBlendFrameData { + unsigned char m_nFlags; + RwV3d m_vecResetPos; + union { RpHAnimStdInterpFrame* m_pAnimFrame; RwFrame* m_pFrame; }; -#else - RwFrame* m_pFrame; -#endif -#ifdef PED_SKIN int32_t m_nNodeId; -#endif }; - -#ifdef PED_SKIN -VALIDATE_SIZE(AnimBlendFrameData, 0x18); -#else +VALIDATE_OFFSET(AnimBlendFrameData, m_nFlags, 0x08); +VALIDATE_OFFSET(AnimBlendFrameData, m_vecResetPos, 0x4); +VALIDATE_OFFSET(AnimBlendFrameData, m_pAnimFrame, 0x8); +VALIDATE_OFFSET(AnimBlendFrameData, m_pFrame, 0x10); +VALIDATE_OFFSET(AnimBlendFrameData, m_nNodeId, 0x10); VALIDATE_SIZE(AnimBlendFrameData, 0x14); #endif diff --git a/plugin_III/game_III/C2dEffect.h b/plugin_III/game_III/C2dEffect.h index cbd96650b..ddb6ce19f 100644 --- a/plugin_III/game_III/C2dEffect.h +++ b/plugin_III/game_III/C2dEffect.h @@ -52,6 +52,10 @@ struct PLUGIN_API tEffectParticle { CVector m_vecDir; float m_fScale; }; +VALIDATE_OFFSET(tEffectParticle, m_nParticleType, 0x0); +VALIDATE_OFFSET(tEffectParticle, m_vecDir, 0x4); +VALIDATE_OFFSET(tEffectParticle, m_fScale, 0x10); +VALIDATE_SIZE(tEffectParticle, 0x14); struct PLUGIN_API tEffectLight { float m_fDist; @@ -66,12 +70,28 @@ struct PLUGIN_API tEffectLight { RwTexture *m_pCoronaTex; RwTexture *m_pShadowTex; }; +VALIDATE_OFFSET(tEffectLight, m_fDist, 0x0); +VALIDATE_OFFSET(tEffectLight, m_fPointlightRange, 0x4); +VALIDATE_OFFSET(tEffectLight, m_fCoronaSize, 0x8); +VALIDATE_OFFSET(tEffectLight, m_fShadowSize, 0xC); +VALIDATE_OFFSET(tEffectLight, m_nCoronaFlashType, 0x10); +VALIDATE_OFFSET(tEffectLight, m_bCoronaEnableReflection, 0x11); +VALIDATE_OFFSET(tEffectLight, m_nCoronaFlareType, 0x12); +VALIDATE_OFFSET(tEffectLight, m_nShadowColorMultiplier, 0x13); +VALIDATE_OFFSET(tEffectLight, m_nFlags, 0x14); +VALIDATE_OFFSET(tEffectLight, m_pCoronaTex, 0x18); +VALIDATE_OFFSET(tEffectLight, m_pShadowTex, 0x1C); +VALIDATE_SIZE(tEffectLight, 0x20); struct PLUGIN_API tEffectAttractor { CVector m_vecDir; eAttractorType m_nAttractorType; unsigned char m_nProbability; }; +VALIDATE_OFFSET(tEffectAttractor, m_vecDir, 0x0); +VALIDATE_OFFSET(tEffectAttractor, m_nAttractorType, 0xC); +VALIDATE_OFFSET(tEffectAttractor, m_nProbability, 0xD); +VALIDATE_SIZE(tEffectAttractor, 0x10); class PLUGIN_API C2dEffect { public: @@ -86,10 +106,12 @@ class PLUGIN_API C2dEffect { SUPPORTED_10EN_11EN_STEAM void Shutdown(); }; - -VALIDATE_SIZE(tEffectParticle, 0x14); -VALIDATE_SIZE(tEffectLight, 0x20); -VALIDATE_SIZE(tEffectAttractor, 0x10); +VALIDATE_OFFSET(C2dEffect, m_vecPosn, 0x0); +VALIDATE_OFFSET(C2dEffect, m_color, 0xC); +VALIDATE_OFFSET(C2dEffect, m_nType, 0x10); +VALIDATE_OFFSET(C2dEffect, m_light, 0x14); +VALIDATE_OFFSET(C2dEffect, m_particle, 0x14); +VALIDATE_OFFSET(C2dEffect, m_attractor, 0x14); VALIDATE_SIZE(C2dEffect, 0x34); #include "meta/meta.C2dEffect.h" diff --git a/plugin_III/game_III/C2deffectsModelInfo.h b/plugin_III/game_III/C2deffectsModelInfo.h index 51505a56f..19ed1dac5 100644 --- a/plugin_III/game_III/C2deffectsModelInfo.h +++ b/plugin_III/game_III/C2deffectsModelInfo.h @@ -13,7 +13,6 @@ class PLUGIN_API C2deffectsModelInfo : public CClumpModelInfo { PLUGIN_NO_DEFAULT_CONSTRUCTION(C2deffectsModelInfo) public: }; - VALIDATE_SIZE(C2deffectsModelInfo, 0x34); #include "meta/meta.C2deffectsModelInfo.h" diff --git a/plugin_III/game_III/C3dMarker.h b/plugin_III/game_III/C3dMarker.h index 5f75e2a57..c0d27b6f1 100644 --- a/plugin_III/game_III/C3dMarker.h +++ b/plugin_III/game_III/C3dMarker.h @@ -36,6 +36,23 @@ class PLUGIN_API C3dMarker { SUPPORTED_10EN_11EN_STEAM void DeleteMarkerObject(); SUPPORTED_10EN_11EN_STEAM void Render(); }; +VALIDATE_OFFSET(C3dMarker, m_mMat, 0x0); +VALIDATE_OFFSET(C3dMarker, m_pAtomic, 0x48); +VALIDATE_OFFSET(C3dMarker, m_pMaterial, 0x4C); +VALIDATE_OFFSET(C3dMarker, m_nType, 0x50); +VALIDATE_OFFSET(C3dMarker, m_bIsUsed, 0x52); +VALIDATE_OFFSET(C3dMarker, m_bMustBeRenderedThisFrame, 0x53); +VALIDATE_OFFSET(C3dMarker, m_nIdentifier, 0x54); +VALIDATE_OFFSET(C3dMarker, m_colour, 0x58); +VALIDATE_OFFSET(C3dMarker, m_nPulsePeriod, 0x5C); +VALIDATE_OFFSET(C3dMarker, m_nRotateRate, 0x5E); +VALIDATE_OFFSET(C3dMarker, m_nStartTime, 0x60); +VALIDATE_OFFSET(C3dMarker, m_fPulseFraction, 0x64); +VALIDATE_OFFSET(C3dMarker, m_fStdSize, 0x68); +VALIDATE_OFFSET(C3dMarker, m_fSize, 0x6C); +VALIDATE_OFFSET(C3dMarker, m_fBrightness, 0x70); +VALIDATE_OFFSET(C3dMarker, m_fCameraRange, 0x74); +VALIDATE_SIZE(C3dMarker, 0x78); SUPPORTED_10EN_11EN_STEAM RpAtomic *MarkerAtomicCB(RpAtomic *atomic, void *data); diff --git a/plugin_III/game_III/C3dMarkers.h b/plugin_III/game_III/C3dMarkers.h index 9195423b4..1239b5be0 100644 --- a/plugin_III/game_III/C3dMarkers.h +++ b/plugin_III/game_III/C3dMarkers.h @@ -23,5 +23,6 @@ class PLUGIN_API C3dMarkers { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void Shutdown(); }; +VALIDATE_SIZE(C3dMarkers, 0x1); #include "meta/meta.C3dMarkers.h" diff --git a/plugin_III/game_III/CAccident.h b/plugin_III/game_III/CAccident.h index 93013118f..01acbc239 100644 --- a/plugin_III/game_III/CAccident.h +++ b/plugin_III/game_III/CAccident.h @@ -17,7 +17,9 @@ class PLUGIN_API CAccident { unsigned int m_nMedicsAttending; unsigned int m_nMedicsPerformingCPR; }; - +VALIDATE_OFFSET(CAccident, m_pVictim, 0x0); +VALIDATE_OFFSET(CAccident, m_nMedicsAttending, 0x4); +VALIDATE_OFFSET(CAccident, m_nMedicsPerformingCPR, 0x8); VALIDATE_SIZE(CAccident, 0xC); #include "meta/meta.CAccident.h" diff --git a/plugin_III/game_III/CAccidentManager.h b/plugin_III/game_III/CAccidentManager.h index fd7c38510..e1eb84ca9 100644 --- a/plugin_III/game_III/CAccidentManager.h +++ b/plugin_III/game_III/CAccidentManager.h @@ -23,6 +23,8 @@ class PLUGIN_API CAccidentManager { SUPPORTED_10EN_11EN_STEAM void Update(); SUPPORTED_10EN_11EN_STEAM bool WorkToDoForMedics(); }; +VALIDATE_OFFSET(CAccidentManager, m_aAccidents, 0x0); +VALIDATE_SIZE(CAccidentManager, 0xF0); SUPPORTED_10EN_11EN_STEAM extern CAccidentManager &gAccidentManager; diff --git a/plugin_III/game_III/CAnimBlendAssocGroup.h b/plugin_III/game_III/CAnimBlendAssocGroup.h index 5ba108480..3686c7efc 100644 --- a/plugin_III/game_III/CAnimBlendAssocGroup.h +++ b/plugin_III/game_III/CAnimBlendAssocGroup.h @@ -26,6 +26,9 @@ class PLUGIN_API CAnimBlendAssocGroup { SUPPORTED_10EN_11EN_STEAM CAnimBlendAssociation *GetAnimation(char const *name); SUPPORTED_10EN_11EN_STEAM CAnimBlendAssociation *GetAnimation(unsigned int id); }; +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_pAssociations, 0x0); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nNumAssociations, 0x4); +VALIDATE_SIZE(CAnimBlendAssocGroup, 0x8); SUPPORTED_10EN_11EN_STEAM bool strcmpIgnoringDigits(char const *s1, char const *s2); SUPPORTED_10EN_11EN_STEAM CBaseModelInfo *GetModelFromName(char const *name); diff --git a/plugin_III/game_III/CAnimBlendAssociation.h b/plugin_III/game_III/CAnimBlendAssociation.h index b19595190..6b4a711f7 100644 --- a/plugin_III/game_III/CAnimBlendAssociation.h +++ b/plugin_III/game_III/CAnimBlendAssociation.h @@ -90,6 +90,20 @@ class PLUGIN_API CAnimBlendAssociation { return (CAnimBlendAssociation*)((uint8_t*)l - offsetof(CAnimBlendAssociation, link)); } }; +VALIDATE_OFFSET(CAnimBlendAssociation, link, 0x4); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nNumBlendNodes, 0xC); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pAnimBlendNodeArray, 0x10); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pAnimBlendHierarchy, 0x14); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendAmount, 0x18); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendDelta, 0x1C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fCurrentTime, 0x20); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fSpeed, 0x24); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fTimeStep, 0x28); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nAnimID, 0x2C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nFlags, 0x30); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nCallbackType, 0x34); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pCallbackData, 0x3C); +VALIDATE_SIZE(CAnimBlendAssociation, 0x40); VTABLE_DESC(CAnimBlendAssociation, 0x5EA02C, 1); VALIDATE_SIZE(CAnimBlendAssociation, 0x40); diff --git a/plugin_III/game_III/CAnimBlendClumpData.h b/plugin_III/game_III/CAnimBlendClumpData.h index ff6f9ef2a..47f23cd6d 100644 --- a/plugin_III/game_III/CAnimBlendClumpData.h +++ b/plugin_III/game_III/CAnimBlendClumpData.h @@ -27,7 +27,11 @@ class PLUGIN_API CAnimBlendClumpData { SUPPORTED_10EN_11EN_STEAM void ForAllFrames(void(*func)(AnimBlendFrameData *, void *), void *data); SUPPORTED_10EN_11EN_STEAM void SetNumberOfBones(int n); }; - +VALIDATE_OFFSET(CAnimBlendClumpData, link, 0x0); +VALIDATE_OFFSET(CAnimBlendClumpData, m_nNumFrames, 0x8); +VALIDATE_OFFSET(CAnimBlendClumpData, m_vecVelocity2d, 0xC); +VALIDATE_OFFSET(CAnimBlendClumpData, m_vecVelocity3d, 0xC); +VALIDATE_OFFSET(CAnimBlendClumpData, m_pFrames, 0x10); VALIDATE_SIZE(CAnimBlendClumpData, 0x14); #include "meta/meta.CAnimBlendClumpData.h" diff --git a/plugin_III/game_III/CAnimBlendHierarchy.h b/plugin_III/game_III/CAnimBlendHierarchy.h index 7e487aa71..99ebb2124 100644 --- a/plugin_III/game_III/CAnimBlendHierarchy.h +++ b/plugin_III/game_III/CAnimBlendHierarchy.h @@ -30,7 +30,12 @@ class PLUGIN_API CAnimBlendHierarchy { SUPPORTED_10EN_11EN_STEAM void Shutdown(); SUPPORTED_10EN_11EN_STEAM void Uncompress(); }; - +VALIDATE_OFFSET(CAnimBlendHierarchy, szName, 0x0); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_pAnimBlendSequence, 0x18); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_nNumSequences, 0x1C); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_nCompressed, 0x1E); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_fTotalLength, 0x20); +VALIDATE_OFFSET(CAnimBlendHierarchy, linkPtr, 0x24); VALIDATE_SIZE(CAnimBlendHierarchy, 0x28); #include "meta/meta.CAnimBlendHierarchy.h" diff --git a/plugin_III/game_III/CAnimBlendLink.h b/plugin_III/game_III/CAnimBlendLink.h index f2c896e55..23031f988 100644 --- a/plugin_III/game_III/CAnimBlendLink.h +++ b/plugin_III/game_III/CAnimBlendLink.h @@ -31,3 +31,6 @@ class PLUGIN_API CAnimBlendLink { Init(); } }; +VALIDATE_OFFSET(CAnimBlendLink, next, 0x0); +VALIDATE_OFFSET(CAnimBlendLink, prev, 0x4); +VALIDATE_SIZE(CAnimBlendLink, 0x8); diff --git a/plugin_III/game_III/CAnimBlendNode.h b/plugin_III/game_III/CAnimBlendNode.h index aa89caff6..f69ed70ef 100644 --- a/plugin_III/game_III/CAnimBlendNode.h +++ b/plugin_III/game_III/CAnimBlendNode.h @@ -31,7 +31,13 @@ class PLUGIN_API CAnimBlendNode { SUPPORTED_10EN_11EN_STEAM bool NextKeyFrame(); SUPPORTED_10EN_11EN_STEAM bool Update(CVector &trans, CQuaternion &rot, float weight); }; - +VALIDATE_OFFSET(CAnimBlendNode, theta, 0x0); +VALIDATE_OFFSET(CAnimBlendNode, invSin, 0x4); +VALIDATE_OFFSET(CAnimBlendNode, frameA, 0x8); +VALIDATE_OFFSET(CAnimBlendNode, frameB, 0xC); +VALIDATE_OFFSET(CAnimBlendNode, remainingTime, 0x10); +VALIDATE_OFFSET(CAnimBlendNode, m_pAnimBlendSequence, 0x14); +VALIDATE_OFFSET(CAnimBlendNode, m_pAnimBlendAssociation, 0x18); VALIDATE_SIZE(CAnimBlendNode, 0x1C); #include "meta/meta.CAnimBlendNode.h" diff --git a/plugin_III/game_III/CAnimBlendSequence.h b/plugin_III/game_III/CAnimBlendSequence.h index 1ee0b8e73..3e51a4227 100644 --- a/plugin_III/game_III/CAnimBlendSequence.h +++ b/plugin_III/game_III/CAnimBlendSequence.h @@ -19,20 +19,30 @@ struct PLUGIN_API KeyFrameCompressed { short rot[4]; //!< 4096 short deltaTime; //!< 60 }; +VALIDATE_OFFSET(KeyFrameCompressed, rot, 0x0); +VALIDATE_OFFSET(KeyFrameCompressed, deltaTime, 0x8); +VALIDATE_SIZE(KeyFrameCompressed, 0xA); #pragma pack(pop) struct PLUGIN_API KeyFrameTransCompressed : public KeyFrameCompressed { short trans[3]; //!< 128 }; +VALIDATE_OFFSET(KeyFrameTransCompressed, trans, 0xA); +VALIDATE_SIZE(KeyFrameTransCompressed, 0x10); struct PLUGIN_API KeyFrame { CQuaternion rotation; float deltaTime; //!< relative to previous key frame }; +VALIDATE_OFFSET(KeyFrame, rotation, 0x0); +VALIDATE_OFFSET(KeyFrame, deltaTime, 0x10); +VALIDATE_SIZE(KeyFrame, 0x14); struct PLUGIN_API KeyFrameTrans : public KeyFrame { CVector translation; }; +VALIDATE_OFFSET(KeyFrameTrans, translation, 0x14); +VALIDATE_SIZE(KeyFrameTrans, 0x20); class PLUGIN_API CAnimBlendSequence { PLUGIN_NO_DEFAULT_CONSTRUCTION_VIRTUALBASE(CAnimBlendSequence) @@ -58,11 +68,12 @@ class PLUGIN_API CAnimBlendSequence { } inline bool HasTranslation(void) { return !!(this->m_nType & KF_TRANS); } }; - -VALIDATE_SIZE(KeyFrameCompressed, 0xA); -VALIDATE_SIZE(KeyFrameTransCompressed, 0x10); -VALIDATE_SIZE(KeyFrame, 0x14); -VALIDATE_SIZE(KeyFrameTrans, 0x20); +VALIDATE_OFFSET(CAnimBlendSequence, m_nType, 0x4); +VALIDATE_OFFSET(CAnimBlendSequence, szName, 0x8); +VALIDATE_OFFSET(CAnimBlendSequence, m_nNumFrames, 0x20); +VALIDATE_OFFSET(CAnimBlendSequence, keyFrames, 0x24); +VALIDATE_OFFSET(CAnimBlendSequence, keyFramesCompressed, 0x28); +VALIDATE_SIZE(CAnimBlendSequence, 0x2C); VTABLE_DESC(CAnimBlendSequence, 0x5EA060, 1); VALIDATE_SIZE(CAnimBlendSequence, 0x2C); diff --git a/plugin_III/game_III/CAnimBlock.h b/plugin_III/game_III/CAnimBlock.h index 84bb1f3da..d36f84fc8 100644 --- a/plugin_III/game_III/CAnimBlock.h +++ b/plugin_III/game_III/CAnimBlock.h @@ -14,5 +14,7 @@ class PLUGIN_API CAnimBlock { int startAnimation; // into CAnimBlock::ms_aAnimations[] int animationCount; }; - -VALIDATE_SIZE(CAnimBlock,0x20); \ No newline at end of file +VALIDATE_OFFSET(CAnimBlock, szName, 0x0); +VALIDATE_OFFSET(CAnimBlock, startAnimation, 0x18); +VALIDATE_OFFSET(CAnimBlock, animationCount, 0x1C); +VALIDATE_SIZE(CAnimBlock, 0x20); \ No newline at end of file diff --git a/plugin_III/game_III/CAnimManager.h b/plugin_III/game_III/CAnimManager.h index 1bb6d29a1..5cab3a43c 100644 --- a/plugin_III/game_III/CAnimManager.h +++ b/plugin_III/game_III/CAnimManager.h @@ -40,5 +40,6 @@ class PLUGIN_API CAnimManager { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void UncompressAnimation(CAnimBlendHierarchy *hier); }; +VALIDATE_SIZE(CAnimManager, 0x1); #include "meta/meta.CAnimManager.h" diff --git a/plugin_III/game_III/CAnimationStyleDescriptor.h b/plugin_III/game_III/CAnimationStyleDescriptor.h index 48fd3a90d..016f15176 100644 --- a/plugin_III/game_III/CAnimationStyleDescriptor.h +++ b/plugin_III/game_III/CAnimationStyleDescriptor.h @@ -12,6 +12,9 @@ struct CAnimAssocDesc { int animId; int flags; }; +VALIDATE_OFFSET(CAnimAssocDesc, animId, 0x0); +VALIDATE_OFFSET(CAnimAssocDesc, flags, 0x4); +VALIDATE_SIZE(CAnimAssocDesc, 0x8); class PLUGIN_API CAnimationStyleDescriptor { public: @@ -22,5 +25,10 @@ class PLUGIN_API CAnimationStyleDescriptor { char **animNames; CAnimAssocDesc* animDescs; }; - +VALIDATE_OFFSET(CAnimationStyleDescriptor, groupName, 0x0); +VALIDATE_OFFSET(CAnimationStyleDescriptor, blockName, 0x4); +VALIDATE_OFFSET(CAnimationStyleDescriptor, modelIndex, 0x8); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animsCount, 0xC); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animNames, 0x10); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animDescs, 0x14); VALIDATE_SIZE(CAnimationStyleDescriptor, 0x18); \ No newline at end of file diff --git a/plugin_III/game_III/CAntenna.h b/plugin_III/game_III/CAntenna.h index af100b3af..2bbd2bb91 100644 --- a/plugin_III/game_III/CAntenna.h +++ b/plugin_III/game_III/CAntenna.h @@ -22,7 +22,12 @@ class PLUGIN_API CAntenna { SUPPORTED_10EN_11EN_STEAM void Update(CVector dir, CVector pos); }; - +VALIDATE_OFFSET(CAntenna, m_bIsActive, 0x0); +VALIDATE_OFFSET(CAntenna, m_bIsUpdatedLastFrame, 0x1); +VALIDATE_OFFSET(CAntenna, m_nId, 0x4); +VALIDATE_OFFSET(CAntenna, m_fSegmentLength, 0x8); +VALIDATE_OFFSET(CAntenna, m_avecPos, 0xC); +VALIDATE_OFFSET(CAntenna, m_avecSpeed, 0x54); VALIDATE_SIZE(CAntenna, 0x9C); #include "meta/meta.CAntenna.h" diff --git a/plugin_III/game_III/CAntennas.h b/plugin_III/game_III/CAntennas.h index 45b3dc962..511dfc8d6 100644 --- a/plugin_III/game_III/CAntennas.h +++ b/plugin_III/game_III/CAntennas.h @@ -19,5 +19,6 @@ class PLUGIN_API CAntennas { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CAntennas, 0x1); #include "meta/meta.CAntennas.h" diff --git a/plugin_III/game_III/CAudioHydrant.h b/plugin_III/game_III/CAudioHydrant.h index 2cc93f189..0d3aae6e1 100644 --- a/plugin_III/game_III/CAudioHydrant.h +++ b/plugin_III/game_III/CAudioHydrant.h @@ -19,7 +19,8 @@ class PLUGIN_API CAudioHydrant { SUPPORTED_10EN_11EN_STEAM static void Add(CParticleObject *object); SUPPORTED_10EN_11EN_STEAM static void Remove(CParticleObject *object); }; - +VALIDATE_OFFSET(CAudioHydrant, m_nAudioEntity, 0x0); +VALIDATE_OFFSET(CAudioHydrant, m_pObject, 0x4); VALIDATE_SIZE(CAudioHydrant, 0x8); #include "meta/meta.CAudioHydrant.h" diff --git a/plugin_III/game_III/CAutoPilot.cpp b/plugin_III/game_III/CAutoPilot.cpp index e1250e1bf..d8d85a236 100644 --- a/plugin_III/game_III/CAutoPilot.cpp +++ b/plugin_III/game_III/CAutoPilot.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CAutoPilot.h" diff --git a/plugin_III/game_III/CAutoPilot.h b/plugin_III/game_III/CAutoPilot.h index 5a7644c9f..4373dad25 100644 --- a/plugin_III/game_III/CAutoPilot.h +++ b/plugin_III/game_III/CAutoPilot.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPathFind.h" #include "eCarMission.h" @@ -79,6 +78,34 @@ class CAutoPilot { void ModifySpeed(float speed); void RemoveOnePathNode(); }; +VALIDATE_OFFSET(CAutoPilot, m_currentAddress, 0x0); +VALIDATE_OFFSET(CAutoPilot, m_startingRouteNode, 0x4); +VALIDATE_OFFSET(CAutoPilot, m_PreviousRouteNode, 0x8); +VALIDATE_OFFSET(CAutoPilot, m_nTotalSpeedScaleFactor, 0xC); +VALIDATE_OFFSET(CAutoPilot, m_nSpeedScaleFactor, 0x10); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentPathNodeInfo, 0x14); +VALIDATE_OFFSET(CAutoPilot, m_nNextPathNodeInfo, 0x18); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousPathNodeInfo, 0x1C); +VALIDATE_OFFSET(CAutoPilot, m_nTimeToStartMission, 0x20); +VALIDATE_OFFSET(CAutoPilot, m_nTimeSwitchedToRealPhysics, 0x24); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousDirection, 0x28); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentDirecton, 0x29); +VALIDATE_OFFSET(CAutoPilot, m_nNextDirection, 0x2A); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousPathDirection, 0x2B); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentPathDirection, 0x2C); +VALIDATE_OFFSET(CAutoPilot, m_nDrivingStyle, 0x2D); +VALIDATE_OFFSET(CAutoPilot, m_nCarMission, 0x2E); +VALIDATE_OFFSET(CAutoPilot, m_nAnimationId, 0x2F); +VALIDATE_OFFSET(CAutoPilot, m_nAnimationTime, 0x30); +VALIDATE_OFFSET(CAutoPilot, m_fMaxTrafficSpeed, 0x34); +VALIDATE_OFFSET(CAutoPilot, m_nCruiseSpeed, 0x38); +VALIDATE_OFFSET(CAutoPilot, pad1, 0x3A); +VALIDATE_OFFSET(CAutoPilot, m_vecDestinationCoors, 0x3C); +VALIDATE_OFFSET(CAutoPilot, m_aPathFindNodesInfo, 0x48); +VALIDATE_OFFSET(CAutoPilot, m_nPathFindNodesCount, 0x68); +VALIDATE_OFFSET(CAutoPilot, pad2, 0x6A); +VALIDATE_OFFSET(CAutoPilot, m_pTargetCar, 0x6C); +VALIDATE_SIZE(CAutoPilot, 0x70); #pragma pack(pop) VALIDATE_SIZE(CAutoPilot, 0x70); \ No newline at end of file diff --git a/plugin_III/game_III/CAutomobile.h b/plugin_III/game_III/CAutomobile.h index cd94538ea..e8715e874 100644 --- a/plugin_III/game_III/CAutomobile.h +++ b/plugin_III/game_III/CAutomobile.h @@ -196,6 +196,48 @@ class PLUGIN_API CAutomobile : public CVehicle { SUPPORTED_10EN_11EN_STEAM static void SetAllTaxiLights(bool enable); }; +VALIDATE_OFFSET(CAutomobile, m_carDamage, 0x288); +VALIDATE_OFFSET(CAutomobile, m_aDoors, 0x2A4); +VALIDATE_OFFSET(CAutomobile, m_aCarNodes, 0x37C); +VALIDATE_OFFSET(CAutomobile, m_aWheelColPoints, 0x3CC); +VALIDATE_OFFSET(CAutomobile, m_afSuspensionSpringRatio, 0x46C); +VALIDATE_OFFSET(CAutomobile, m_afSuspensionSpringRatioPrev, 0x47C); +VALIDATE_OFFSET(CAutomobile, m_afWheelTimer, 0x48C); +VALIDATE_OFFSET(CAutomobile, field_49C, 0x49C); +VALIDATE_OFFSET(CAutomobile, m_abWheelSkidmarkMuddy, 0x4A0); +VALIDATE_OFFSET(CAutomobile, m_abWheelSkidmarkBloody, 0x4A4); +VALIDATE_OFFSET(CAutomobile, m_afWheelRotation, 0x4A8); +VALIDATE_OFFSET(CAutomobile, m_afWheelPosition, 0x4B8); +VALIDATE_OFFSET(CAutomobile, m_afWheelSpeed, 0x4C8); +VALIDATE_OFFSET(CAutomobile, field_4D8, 0x4D8); +VALIDATE_OFFSET(CAutomobile, m_nAutomobileFlags, 0x4D9); +VALIDATE_OFFSET(CAutomobile, m_pBombRigger, 0x4DC); +VALIDATE_OFFSET(CAutomobile, field_4E0, 0x4E0); +VALIDATE_OFFSET(CAutomobile, m_nHydraulicState, 0x4E2); +VALIDATE_OFFSET(CAutomobile, m_nBusDoorTimerEnd, 0x4E4); +VALIDATE_OFFSET(CAutomobile, m_nBusDoorTimerStart, 0x4E8); +VALIDATE_OFFSET(CAutomobile, m_afSuspensionSpringLength, 0x4EC); +VALIDATE_OFFSET(CAutomobile, m_afSuspensionLineLength, 0x4FC); +VALIDATE_OFFSET(CAutomobile, m_fHeightAboveRoad, 0x50C); +VALIDATE_OFFSET(CAutomobile, m_fTraction, 0x510); +VALIDATE_OFFSET(CAutomobile, m_fVelocityChangeForAudio, 0x514); +VALIDATE_OFFSET(CAutomobile, m_randomValues, 0x518); +VALIDATE_OFFSET(CAutomobile, m_fFireBlowUpTimer, 0x530); +VALIDATE_OFFSET(CAutomobile, m_aGroundPhysical, 0x534); +VALIDATE_OFFSET(CAutomobile, m_avecGroundOffset, 0x544); +VALIDATE_OFFSET(CAutomobile, m_pSetOnFireEntity, 0x574); +VALIDATE_OFFSET(CAutomobile, m_fWeaponDoorTimerLeft, 0x578); +VALIDATE_OFFSET(CAutomobile, m_nWeaponDoorTimerRight, 0x57C); +VALIDATE_OFFSET(CAutomobile, m_fCarGunLR, 0x580); +VALIDATE_OFFSET(CAutomobile, m_fCarGunUD, 0x584); +VALIDATE_OFFSET(CAutomobile, m_fPropellerRotation, 0x588); +VALIDATE_OFFSET(CAutomobile, field_58C, 0x58C); +VALIDATE_OFFSET(CAutomobile, m_nWheelsOnGround, 0x590); +VALIDATE_OFFSET(CAutomobile, m_nDriveWheelsOnGround, 0x591); +VALIDATE_OFFSET(CAutomobile, m_nDriveWheelsOnGroundPrev, 0x592); +VALIDATE_OFFSET(CAutomobile, m_fGasPedalAudio, 0x594); +VALIDATE_OFFSET(CAutomobile, m_aWheelState, 0x598); +VALIDATE_SIZE(CAutomobile, 0x5A8); SUPPORTED_10EN_11EN_STEAM extern CVector &vecDAMAGE_ENGINE_POS_BIG; SUPPORTED_10EN_11EN_STEAM extern CVector &vecDAMAGE_ENGINE_POS_SMALL; diff --git a/plugin_III/game_III/CBaseModelInfo.h b/plugin_III/game_III/CBaseModelInfo.h index 08cf8ab1f..d2d440199 100644 --- a/plugin_III/game_III/CBaseModelInfo.h +++ b/plugin_III/game_III/CBaseModelInfo.h @@ -69,6 +69,16 @@ class PLUGIN_API CBaseModelInfo { SUPPORTED_10EN_11EN_STEAM void RemoveTexDictionaryRef(); SUPPORTED_10EN_11EN_STEAM void SetTexDictionary(char const *txdName); }; +VALIDATE_OFFSET(CBaseModelInfo, m_szName, 0x4); +VALIDATE_OFFSET(CBaseModelInfo, m_pColModel, 0x1C); +VALIDATE_OFFSET(CBaseModelInfo, m_p2dEffect, 0x20); +VALIDATE_OFFSET(CBaseModelInfo, m_nObjectDataIndex, 0x24); +VALIDATE_OFFSET(CBaseModelInfo, m_nRefCount, 0x26); +VALIDATE_OFFSET(CBaseModelInfo, m_nTxdIndex, 0x28); +VALIDATE_OFFSET(CBaseModelInfo, m_nType, 0x2A); +VALIDATE_OFFSET(CBaseModelInfo, m_nNum2dEffects, 0x2B); +VALIDATE_OFFSET(CBaseModelInfo, m_bDoWeOwnTheColModel, 0x2C); +VALIDATE_SIZE(CBaseModelInfo, 0x30); VTABLE_DESC(CBaseModelInfo, 0x5FAB58, 2); VALIDATE_SIZE(CBaseModelInfo, 0x30); diff --git a/plugin_III/game_III/CBoat.h b/plugin_III/game_III/CBoat.h index 5e4ca08ff..96de82e59 100644 --- a/plugin_III/game_III/CBoat.h +++ b/plugin_III/game_III/CBoat.h @@ -152,6 +152,33 @@ class PLUGIN_API CBoat : public CVehicle { SUPPORTED_10EN_11EN_STEAM static bool IsSectorAffectedByWake(CVector2D sector, float size, CBoat **apBoats); SUPPORTED_10EN_11EN_STEAM static float IsVertexAffectedByWake(CVector vecVertex, CBoat *boat); }; +VALIDATE_OFFSET(CBoat, m_fThrustZ, 0x288); +VALIDATE_OFFSET(CBoat, m_fThrustY, 0x28C); +VALIDATE_OFFSET(CBoat, m_vecMoveRes, 0x290); +VALIDATE_OFFSET(CBoat, m_vecTurnRes, 0x29C); +VALIDATE_OFFSET(CBoat, m_fMovingRotation, 0x2A8); +VALIDATE_OFFSET(CBoat, field_2AC, 0x2AC); +VALIDATE_OFFSET(CBoat, m_aBoatNodes, 0x2B0); +VALIDATE_OFFSET(CBoat, m_nBoatFlags, 0x2C0); +VALIDATE_OFFSET(CBoat, m_bIsAnchored, 0x2C1); +VALIDATE_OFFSET(CBoat, m_fOrientation, 0x2C4); +VALIDATE_OFFSET(CBoat, field_2C8, 0x2C8); +VALIDATE_OFFSET(CBoat, m_fDamage, 0x2CC); +VALIDATE_OFFSET(CBoat, m_pSetOnFireEntity, 0x2D0); +VALIDATE_OFFSET(CBoat, field_2D4, 0x2D4); +VALIDATE_OFFSET(CBoat, m_fAccelerate, 0x2D8); +VALIDATE_OFFSET(CBoat, m_fBrake, 0x2DC); +VALIDATE_OFFSET(CBoat, m_fSteeringLeftRight, 0x2E0); +VALIDATE_OFFSET(CBoat, m_nPadID, 0x2E4); +VALIDATE_OFFSET(CBoat, field_2E8, 0x2E8); +VALIDATE_OFFSET(CBoat, m_fVolumeUnderWater, 0x2EC); +VALIDATE_OFFSET(CBoat, m_vecBuoyancePoint, 0x2F0); +VALIDATE_OFFSET(CBoat, m_fPrevVolumeUnderWater, 0x2FC); +VALIDATE_OFFSET(CBoat, m_nDeltaVolumeUnderWater, 0x300); +VALIDATE_OFFSET(CBoat, m_nNumWakePoints, 0x302); +VALIDATE_OFFSET(CBoat, m_avec2dWakePoints, 0x304); +VALIDATE_OFFSET(CBoat, m_afWakePointLifeTime, 0x404); +VALIDATE_SIZE(CBoat, 0x484); //! 50.0f SUPPORTED_10EN_11EN_STEAM extern float &MAX_WAKE_LENGTH; diff --git a/plugin_III/game_III/CBox.h b/plugin_III/game_III/CBox.h index a7d97bb08..14d640dcf 100644 --- a/plugin_III/game_III/CBox.h +++ b/plugin_III/game_III/CBox.h @@ -19,5 +19,6 @@ class PLUGIN_API CBox { return m_vecMax - m_vecMin; } }; - +VALIDATE_OFFSET(CBox, m_vecMin, 0x0); +VALIDATE_OFFSET(CBox, m_vecMax, 0xC); VALIDATE_SIZE(CBox, 0x18); \ No newline at end of file diff --git a/plugin_III/game_III/CBridge.h b/plugin_III/game_III/CBridge.h index 34eab18b3..0cfb4f29f 100644 --- a/plugin_III/game_III/CBridge.h +++ b/plugin_III/game_III/CBridge.h @@ -29,5 +29,6 @@ class PLUGIN_API CBridge { SUPPORTED_10EN_11EN_STEAM static bool ThisIsABridgeObjectMovingUp(unsigned int modelIndex); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CBridge, 0x1); #include "meta/meta.CBridge.h" diff --git a/plugin_III/game_III/CBrightLight.h b/plugin_III/game_III/CBrightLight.h index f3c63a93b..f8926b15e 100644 --- a/plugin_III/game_III/CBrightLight.h +++ b/plugin_III/game_III/CBrightLight.h @@ -21,7 +21,12 @@ class PLUGIN_API CBrightLight { float m_fDistanceToCamera; RwRGBA m_color; }; - +VALIDATE_OFFSET(CBrightLight, m_vecPosition, 0x0); +VALIDATE_OFFSET(CBrightLight, m_vecRight, 0xC); +VALIDATE_OFFSET(CBrightLight, m_vecUp, 0x18); +VALIDATE_OFFSET(CBrightLight, m_vecAt, 0x24); +VALIDATE_OFFSET(CBrightLight, m_fDistanceToCamera, 0x30); +VALIDATE_OFFSET(CBrightLight, m_color, 0x34); VALIDATE_SIZE(CBrightLight, 0x38); #include "meta/meta.CBrightLight.h" diff --git a/plugin_III/game_III/CBrightLights.h b/plugin_III/game_III/CBrightLights.h index 6839c88f5..c983b00fc 100644 --- a/plugin_III/game_III/CBrightLights.h +++ b/plugin_III/game_III/CBrightLights.h @@ -43,6 +43,7 @@ class PLUGIN_API CBrightLights { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void RenderOutGeometryBuffer(); }; +VALIDATE_SIZE(CBrightLights, 0x1); SUPPORTED_10EN_11EN_STEAM extern float(&TrafficLightsSide)[6]; // float TrafficLightsSide[6] SUPPORTED_10EN_11EN_STEAM extern float(&TrafficLightsUp)[6]; // float TrafficLightsUp[6] diff --git a/plugin_III/game_III/CBuilding.h b/plugin_III/game_III/CBuilding.h index 5553d828c..5199778ff 100644 --- a/plugin_III/game_III/CBuilding.h +++ b/plugin_III/game_III/CBuilding.h @@ -67,6 +67,7 @@ class PLUGIN_API CBuilding : public CEntity { SUPPORTED_10EN_11EN_STEAM void ReplaceWithNewModel(int modelIndex); }; +VALIDATE_SIZE(CBuilding, 0x64); VTABLE_DESC(CBuilding, 0x5EBF44, 18); VALIDATE_SIZE(CBuilding, 0x64); diff --git a/plugin_III/game_III/CBulletInfo.h b/plugin_III/game_III/CBulletInfo.h index 94dbda8b7..22e2a991d 100644 --- a/plugin_III/game_III/CBulletInfo.h +++ b/plugin_III/game_III/CBulletInfo.h @@ -31,6 +31,14 @@ class PLUGIN_API CBulletInfo { SUPPORTED_10EN_11EN_STEAM static bool TestForSniperBullet(float x1, float x2, float y1, float y2, float z1, float z2); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_OFFSET(CBulletInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CBulletInfo, m_pSource, 0x4); +VALIDATE_OFFSET(CBulletInfo, m_fTimer, 0x8); +VALIDATE_OFFSET(CBulletInfo, m_bExist, 0xC); +VALIDATE_OFFSET(CBulletInfo, m_vecPosition, 0x10); +VALIDATE_OFFSET(CBulletInfo, m_vecSpeed, 0x1C); +VALIDATE_OFFSET(CBulletInfo, m_nDamage, 0x28); +VALIDATE_SIZE(CBulletInfo, 0x2C); SUPPORTED_10EN_11EN_STEAM extern CVector &PlayerSniperBulletStart; SUPPORTED_10EN_11EN_STEAM extern CVector &PlayerSniperBulletEnd; diff --git a/plugin_III/game_III/CBulletTrace.h b/plugin_III/game_III/CBulletTrace.h index a2dbcae0b..1145d037b 100644 --- a/plugin_III/game_III/CBulletTrace.h +++ b/plugin_III/game_III/CBulletTrace.h @@ -22,6 +22,12 @@ class PLUGIN_API CBulletTrace { SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CBulletTrace, m_vecOrigin, 0x0); +VALIDATE_OFFSET(CBulletTrace, m_vecTarget, 0xC); +VALIDATE_OFFSET(CBulletTrace, m_bExist, 0x18); +VALIDATE_OFFSET(CBulletTrace, m_nTimeCounter, 0x19); +VALIDATE_OFFSET(CBulletTrace, m_nIntensity, 0x1A); +VALIDATE_SIZE(CBulletTrace, 0x1C); SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&TraceIndexList)[12]; // RwImVertexIndex TraceIndexList[12] SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&TraceVertices)[6]; // RwIm3DVertex TraceVertices[6] diff --git a/plugin_III/game_III/CBulletTraces.h b/plugin_III/game_III/CBulletTraces.h index 36ef6da0b..2c09b6677 100644 --- a/plugin_III/game_III/CBulletTraces.h +++ b/plugin_III/game_III/CBulletTraces.h @@ -19,5 +19,6 @@ class PLUGIN_API CBulletTraces { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CBulletTraces, 0x1); #include "meta/meta.CBulletTraces.h" diff --git a/plugin_III/game_III/CCam.h b/plugin_III/game_III/CCam.h index 4e22814cb..74d597fe8 100644 --- a/plugin_III/game_III/CCam.h +++ b/plugin_III/game_III/CCam.h @@ -145,5 +145,87 @@ class CCam { int m_bFirstPersonRunAboutActive; }; - +VALIDATE_OFFSET(CCam, m_bBelowMinDist, 0x0); +VALIDATE_OFFSET(CCam, m_bBehindPlayerDesired, 0x1); +VALIDATE_OFFSET(CCam, m_bCamLookingAtVector, 0x2); +VALIDATE_OFFSET(CCam, m_bCollisionChecksOn, 0x3); +VALIDATE_OFFSET(CCam, m_bFixingBeta, 0x4); +VALIDATE_OFFSET(CCam, m_bTheHeightFixerVehicleIsATrain, 0x5); +VALIDATE_OFFSET(CCam, m_bLookBehindCamWasInFront, 0x6); +VALIDATE_OFFSET(CCam, m_bLookingBehind, 0x7); +VALIDATE_OFFSET(CCam, m_bLookingLeft, 0x8); +VALIDATE_OFFSET(CCam, m_bLookingRight, 0x9); +VALIDATE_OFFSET(CCam, m_bResetStatics, 0xA); +VALIDATE_OFFSET(CCam, m_bRotating, 0xB); +VALIDATE_OFFSET(CCam, m_nCamMode, 0xC); +VALIDATE_OFFSET(CCam, m_nFinishTime, 0x10); +VALIDATE_OFFSET(CCam, m_nDoCollisionChecksOnFrameNum, 0x14); +VALIDATE_OFFSET(CCam, m_nDoCollisionCheckEveryNumOfFrames, 0x18); +VALIDATE_OFFSET(CCam, m_nFrameNumWereAt, 0x1C); +VALIDATE_OFFSET(CCam, m_nRunningVectorArrayPos, 0x20); +VALIDATE_OFFSET(CCam, m_nRunningVectorCounter, 0x24); +VALIDATE_OFFSET(CCam, m_nDirectionWasLooking, 0x28); +VALIDATE_OFFSET(CCam, m_fMaxRoleAngle, 0x2C); +VALIDATE_OFFSET(CCam, m_fRoll, 0x30); +VALIDATE_OFFSET(CCam, m_fRollSpeed, 0x34); +VALIDATE_OFFSET(CCam, m_fSyphonModeTargetZOffSet, 0x38); +VALIDATE_OFFSET(CCam, m_fAmountFractionObscured, 0x3C); +VALIDATE_OFFSET(CCam, field_40, 0x40); +VALIDATE_OFFSET(CCam, m_fAlphaSpeedOverOneFrame, 0x44); +VALIDATE_OFFSET(CCam, m_fBetaSpeedOverOneFrame, 0x48); +VALIDATE_OFFSET(CCam, m_fBufferedTargetBeta, 0x4C); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientation, 0x50); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientationSpeed, 0x54); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeight, 0x58); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeightSpeed, 0x5C); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffset, 0x60); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffsetSpeed, 0x64); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffset, 0x68); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffsetSpeed, 0x6C); +VALIDATE_OFFSET(CCam, m_fDimensionOfHighestNearCar, 0x70); +VALIDATE_OFFSET(CCam, m_fDistanceBeforeChanges, 0x74); +VALIDATE_OFFSET(CCam, m_fFovSpeedOverOneFrame, 0x78); +VALIDATE_OFFSET(CCam, m_fMinDistAwayFromCamWhenInterPolating, 0x7C); +VALIDATE_OFFSET(CCam, m_fPedBetweenCameraHeightOffset, 0x80); +VALIDATE_OFFSET(CCam, m_fPlayerInFrontSyphonAngleOffSet, 0x84); +VALIDATE_OFFSET(CCam, m_fRadiusForDead, 0x88); +VALIDATE_OFFSET(CCam, m_fRealGroundDist, 0x8C); +VALIDATE_OFFSET(CCam, m_fTargetBeta, 0x90); +VALIDATE_OFFSET(CCam, m_fTimeElapsedFloat, 0x94); +VALIDATE_OFFSET(CCam, m_fTransitionBeta, 0x98); +VALIDATE_OFFSET(CCam, m_fTrueBeta, 0x9C); +VALIDATE_OFFSET(CCam, m_fTrueAlpha, 0xA0); +VALIDATE_OFFSET(CCam, m_fInitialPlayerOrientation, 0xA4); +VALIDATE_OFFSET(CCam, m_fVerticalAngle, 0xA8); +VALIDATE_OFFSET(CCam, m_fAlphaSpeed, 0xAC); +VALIDATE_OFFSET(CCam, m_fFOV, 0xB0); +VALIDATE_OFFSET(CCam, m_fFOVSpeed, 0xB4); +VALIDATE_OFFSET(CCam, m_fHorizontalAngle, 0xB8); +VALIDATE_OFFSET(CCam, m_fBetaSpeed, 0xBC); +VALIDATE_OFFSET(CCam, m_fDistance, 0xC0); +VALIDATE_OFFSET(CCam, m_fDistanceSpeed, 0xC4); +VALIDATE_OFFSET(CCam, m_fCaMinDistance, 0xC8); +VALIDATE_OFFSET(CCam, m_fCaMaxDistance, 0xCC); +VALIDATE_OFFSET(CCam, m_fSpeedVar, 0xD0); +VALIDATE_OFFSET(CCam, m_vecCamSourceSpeedOverOneFrame, 0xD4); +VALIDATE_OFFSET(CCam, m_vecCamTargetSpeedOverOneFrame, 0xE0); +VALIDATE_OFFSET(CCam, m_vecCamUpOverOneFrame, 0xEC); +VALIDATE_OFFSET(CCam, m_vecTargetCoorsForFudgeInter, 0xF8); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeVector, 0x104); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeSource, 0x110); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeUpOffSet, 0x11C); +VALIDATE_OFFSET(CCam, m_vecLastAboveWaterCamPosition, 0x128); +VALIDATE_OFFSET(CCam, m_vecBufferedPlayerBodyOffset, 0x134); +VALIDATE_OFFSET(CCam, m_vecFront, 0x140); +VALIDATE_OFFSET(CCam, m_vecSource, 0x14C); +VALIDATE_OFFSET(CCam, m_vecSourceBeforeLookBehind, 0x158); +VALIDATE_OFFSET(CCam, m_vecUp, 0x164); +VALIDATE_OFFSET(CCam, m_avecPreviousVectors, 0x170); +VALIDATE_OFFSET(CCam, m_pCamTargetEntity, 0x188); +VALIDATE_OFFSET(CCam, m_fCameraDistance, 0x18C); +VALIDATE_OFFSET(CCam, m_fIdealAlpha, 0x190); +VALIDATE_OFFSET(CCam, m_fPlayerVelocity, 0x194); +VALIDATE_OFFSET(CCam, m_pLastCarEntered, 0x198); +VALIDATE_OFFSET(CCam, m_pLastPedLookedAt, 0x19C); +VALIDATE_OFFSET(CCam, m_bFirstPersonRunAboutActive, 0x1A0); VALIDATE_SIZE(CCam, 0x1A4); diff --git a/plugin_III/game_III/CCamera.h b/plugin_III/game_III/CCamera.h index 20f78a1a7..44d408f02 100644 --- a/plugin_III/game_III/CCamera.h +++ b/plugin_III/game_III/CCamera.h @@ -29,6 +29,11 @@ struct PLUGIN_API CQueuedMode { short MinZoom; short MaxZoom; }; +VALIDATE_OFFSET(CQueuedMode, Mode, 0x0); +VALIDATE_OFFSET(CQueuedMode, Duration, 0x4); +VALIDATE_OFFSET(CQueuedMode, MinZoom, 0x8); +VALIDATE_OFFSET(CQueuedMode, MaxZoom, 0xA); +VALIDATE_SIZE(CQueuedMode, 0xC); class PLUGIN_API CCamera : public CPlaceable { PLUGIN_NO_DEFAULT_CONSTRUCTION(CCamera) @@ -282,6 +287,184 @@ class PLUGIN_API CCamera : public CPlaceable { SUPPORTED_10EN_11EN_STEAM void UpdateSoundDistances(); SUPPORTED_10EN_11EN_STEAM void UpdateTargetEntity(); }; +VALIDATE_OFFSET(CCamera, m_bAboveGroundTrainNodesLoaded, 0x4C); +VALIDATE_OFFSET(CCamera, m_bBelowGroundTrainNodesLoaded, 0x4D); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyBehind, 0x4E); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyInFront, 0x4F); +VALIDATE_OFFSET(CCamera, m_bCameraJustRestored, 0x50); +VALIDATE_OFFSET(CCamera, m_bCutsceneFinished, 0x51); +VALIDATE_OFFSET(CCamera, m_bCullZoneChecksOn, 0x52); +VALIDATE_OFFSET(CCamera, m_bFirstPersonBeingUsed, 0x53); +VALIDATE_OFFSET(CCamera, m_bJustJumpedOutOf1stPersonBecauseOfTarget, 0x54); +VALIDATE_OFFSET(CCamera, m_bIdleOn, 0x55); +VALIDATE_OFFSET(CCamera, m_bInATunnelAndABigVehicle, 0x56); +VALIDATE_OFFSET(CCamera, m_bInitialNodeFound, 0x57); +VALIDATE_OFFSET(CCamera, m_bInitialNoNodeStaticsSet, 0x58); +VALIDATE_OFFSET(CCamera, m_bIgnoreFadingStuffForMusic, 0x59); +VALIDATE_OFFSET(CCamera, m_bPlayerIsInGarage, 0x5A); +VALIDATE_OFFSET(CCamera, m_bJustCameOutOfGarage, 0x5B); +VALIDATE_OFFSET(CCamera, m_bJustInitalised, 0x5C); +VALIDATE_OFFSET(CCamera, m_bJust_Switched, 0x5D); +VALIDATE_OFFSET(CCamera, m_bLookingAtPlayer, 0x5E); +VALIDATE_OFFSET(CCamera, m_bLookingAtVector, 0x5F); +VALIDATE_OFFSET(CCamera, m_bMoveCamToAvoidGeom, 0x60); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicPedCamOn, 0x61); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicCarCamOn, 0x62); +VALIDATE_OFFSET(CCamera, m_bRestoreByJumpCut, 0x63); +VALIDATE_OFFSET(CCamera, m_bUseNearClipScript, 0x64); +VALIDATE_OFFSET(CCamera, m_bStartInterScript, 0x65); +VALIDATE_OFFSET(CCamera, m_bStartingSpline, 0x66); +VALIDATE_OFFSET(CCamera, m_bTargetJustBeenOnTrain, 0x67); +VALIDATE_OFFSET(CCamera, m_bTargetJustCameOffTrain, 0x68); +VALIDATE_OFFSET(CCamera, m_bUseSpecialFovTrain, 0x69); +VALIDATE_OFFSET(CCamera, m_bUseTransitionBeta, 0x6A); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValuePed, 0x6B); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValueCar, 0x6C); +VALIDATE_OFFSET(CCamera, m_bWaitForInterpolToFinish, 0x6D); +VALIDATE_OFFSET(CCamera, m_bItsOkToLookJustAtThePlayer, 0x6E); +VALIDATE_OFFSET(CCamera, m_bWantsToSwitchWidescreenOff, 0x6F); +VALIDATE_OFFSET(CCamera, m_bWideScreenOn, 0x70); +VALIDATE_OFFSET(CCamera, m_b1rstPersonRunCloseToAWall, 0x71); +VALIDATE_OFFSET(CCamera, m_bHeadBob, 0x72); +VALIDATE_OFFSET(CCamera, m_bFailedCullZoneTestPreviously, 0x73); +VALIDATE_OFFSET(CCamera, m_bFadeTargetIsSplashScreen, 0x74); +VALIDATE_OFFSET(CCamera, m_bWorldViewerBeingUsed, 0x75); +VALIDATE_OFFSET(CCamera, m_nActiveCam, 0x76); +VALIDATE_OFFSET(CCamera, m_nCamShakeStart, 0x78); +VALIDATE_OFFSET(CCamera, m_nFirstPersonCamLastInputTime, 0x7C); +VALIDATE_OFFSET(CCamera, m_nLongestTimeInMill, 0x80); +VALIDATE_OFFSET(CCamera, m_nNumberOfTrainCamNodes, 0x84); +VALIDATE_OFFSET(CCamera, m_nTransitionJUSTStarted, 0x88); +VALIDATE_OFFSET(CCamera, m_nTransitionState, 0x89); +VALIDATE_OFFSET(CCamera, m_nTimeLastChange, 0x8C); +VALIDATE_OFFSET(CCamera, m_nTimeWeEnteredIdle, 0x90); +VALIDATE_OFFSET(CCamera, m_nTimeTransitionStart, 0x94); +VALIDATE_OFFSET(CCamera, m_nTransitionDuration, 0x98); +VALIDATE_OFFSET(CCamera, m_nBlurBlue, 0x9C); +VALIDATE_OFFSET(CCamera, m_nBlurGreen, 0xA0); +VALIDATE_OFFSET(CCamera, m_nBlurRed, 0xA4); +VALIDATE_OFFSET(CCamera, m_nBlurType, 0xA8); +VALIDATE_OFFSET(CCamera, field_AC, 0xAC); +VALIDATE_OFFSET(CCamera, m_nWorkOutSpeedThisNumFrames, 0xB0); +VALIDATE_OFFSET(CCamera, m_nNumFramesSoFar, 0xB4); +VALIDATE_OFFSET(CCamera, m_nCurrentTrainCamNode, 0xB8); +VALIDATE_OFFSET(CCamera, m_nMotionBlur, 0xBC); +VALIDATE_OFFSET(CCamera, m_nMotionBlurAddAlpha, 0xC0); +VALIDATE_OFFSET(CCamera, m_nCheckCullZoneThisNumFrames, 0xC4); +VALIDATE_OFFSET(CCamera, m_nZoneCullFrameNumWereAt, 0xC8); +VALIDATE_OFFSET(CCamera, m_nWhoIsInControlOfTheCamera, 0xCC); +VALIDATE_OFFSET(CCamera, m_fCamFrontXNorm, 0xD0); +VALIDATE_OFFSET(CCamera, m_fCamFrontYNorm, 0xD4); +VALIDATE_OFFSET(CCamera, m_fCarZoomIndicator, 0xD8); +VALIDATE_OFFSET(CCamera, m_fCarZoomValue, 0xDC); +VALIDATE_OFFSET(CCamera, m_fCarZoomValueSmooth, 0xE0); +VALIDATE_OFFSET(CCamera, m_fDistanceToWater, 0xE4); +VALIDATE_OFFSET(CCamera, m_fFOVDuringInter, 0xE8); +VALIDATE_OFFSET(CCamera, m_fLODDistMultiplier, 0xEC); +VALIDATE_OFFSET(CCamera, m_fGenerationDistMultiplier, 0xF0); +VALIDATE_OFFSET(CCamera, m_fAlphaSpeedAtStartInter, 0xF4); +VALIDATE_OFFSET(CCamera, m_fAlphaWhenInterPol, 0xF8); +VALIDATE_OFFSET(CCamera, m_fAlphaDuringInterPol, 0xFC); +VALIDATE_OFFSET(CCamera, m_fBetaDuringInterPol, 0x100); +VALIDATE_OFFSET(CCamera, m_fBetaSpeedAtStartInter, 0x104); +VALIDATE_OFFSET(CCamera, m_fBetaWhenInterPol, 0x108); +VALIDATE_OFFSET(CCamera, m_fFOVWhenInterPol, 0x10C); +VALIDATE_OFFSET(CCamera, m_fFOVSpeedAtStartInter, 0x110); +VALIDATE_OFFSET(CCamera, m_fStartingBetaForInterPol, 0x114); +VALIDATE_OFFSET(CCamera, m_fStartingAlphaForInterPol, 0x118); +VALIDATE_OFFSET(CCamera, m_fPedOrientForBehindOrInFront, 0x11C); +VALIDATE_OFFSET(CCamera, m_fCameraAverageSpeed, 0x120); +VALIDATE_OFFSET(CCamera, m_fCameraSpeedSoFar, 0x124); +VALIDATE_OFFSET(CCamera, m_fCamShakeForce, 0x128); +VALIDATE_OFFSET(CCamera, m_fCarZoomValueScript, 0x12C); +VALIDATE_OFFSET(CCamera, m_fFovForTrain, 0x130); +VALIDATE_OFFSET(CCamera, m_fFOVWideScreen, 0x134); +VALIDATE_OFFSET(CCamera, m_fNearClipScript, 0x138); +VALIDATE_OFFSET(CCamera, m_fOldBetaDiff, 0x13C); +VALIDATE_OFFSET(CCamera, m_fPedZoomValue, 0x140); +VALIDATE_OFFSET(CCamera, m_fPedZoomValueScript, 0x144); +VALIDATE_OFFSET(CCamera, m_fPedZoomValueSmooth, 0x148); +VALIDATE_OFFSET(CCamera, m_fPositionAlongSpline, 0x14C); +VALIDATE_OFFSET(CCamera, m_fScreenReductionPercentage, 0x150); +VALIDATE_OFFSET(CCamera, m_fScreenReductionSpeed, 0x154); +VALIDATE_OFFSET(CCamera, m_fAlphaForPlayerAnim1rstPerson, 0x158); +VALIDATE_OFFSET(CCamera, m_fOrientation, 0x15C); +VALIDATE_OFFSET(CCamera, m_fPedZoomIndicator, 0x160); +VALIDATE_OFFSET(CCamera, m_fPlayerExhaustion, 0x164); +VALIDATE_OFFSET(CCamera, m_fSoundDistUp, 0x168); +VALIDATE_OFFSET(CCamera, m_fSoundDistLeft, 0x16C); +VALIDATE_OFFSET(CCamera, m_fSoundDistRight, 0x170); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsRead, 0x174); +VALIDATE_OFFSET(CCamera, m_fSoundDistLeftAsRead, 0x178); +VALIDATE_OFFSET(CCamera, m_fSoundDistRightAsRead, 0x17C); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsReadOld, 0x180); +VALIDATE_OFFSET(CCamera, m_fSoundDistLeftAsReadOld, 0x184); +VALIDATE_OFFSET(CCamera, m_fSoundDistRightAsReadOld, 0x188); +VALIDATE_OFFSET(CCamera, m_fWideScreenReductionAmount, 0x18C); +VALIDATE_OFFSET(CCamera, m_fStartingFOVForInterPol, 0x190); +VALIDATE_OFFSET(CCamera, m_fMouseAccelHorzntal, 0x194); +VALIDATE_OFFSET(CCamera, m_fMouseAccelVertical, 0x198); +VALIDATE_OFFSET(CCamera, m_f3rdPersonCHairMultX, 0x19C); +VALIDATE_OFFSET(CCamera, m_f3rdPersonCHairMultY, 0x1A0); +VALIDATE_OFFSET(CCamera, m_asCams, 0x1A4); +VALIDATE_OFFSET(CCamera, m_pToGarageWeAreIn, 0x690); +VALIDATE_OFFSET(CCamera, m_pToGarageWeAreInForHackAvoidFirstPerson, 0x694); +VALIDATE_OFFSET(CCamera, m_PlayerMode, 0x698); +VALIDATE_OFFSET(CCamera, m_PlayerWeaponMode, 0x6A4); +VALIDATE_OFFSET(CCamera, m_vecPreviousCameraPosition, 0x6B0); +VALIDATE_OFFSET(CCamera, m_vecRealPreviousCameraPosition, 0x6BC); +VALIDATE_OFFSET(CCamera, m_vecAimingTargetCoors, 0x6C8); +VALIDATE_OFFSET(CCamera, m_vecFixedModeVector, 0x6D4); +VALIDATE_OFFSET(CCamera, m_vecFixedModeSource, 0x6E0); +VALIDATE_OFFSET(CCamera, m_vecFixedModeUpOffSet, 0x6EC); +VALIDATE_OFFSET(CCamera, m_vCamCutSceneOffset, 0x6F8); +VALIDATE_OFFSET(CCamera, m_vecStartingSourceForInterPol, 0x704); +VALIDATE_OFFSET(CCamera, m_vecStartingTargetForInterPol, 0x710); +VALIDATE_OFFSET(CCamera, m_vecStartingUpForInterPol, 0x71C); +VALIDATE_OFFSET(CCamera, m_vecSourceSpeedAtStartInter, 0x728); +VALIDATE_OFFSET(CCamera, m_vecTargetSpeedAtStartInter, 0x734); +VALIDATE_OFFSET(CCamera, m_vecUpSpeedAtStartInter, 0x740); +VALIDATE_OFFSET(CCamera, m_vecSourceWhenInterPol, 0x74C); +VALIDATE_OFFSET(CCamera, m_vecTargetWhenInterPol, 0x758); +VALIDATE_OFFSET(CCamera, m_vecUpWhenInterPol, 0x764); +VALIDATE_OFFSET(CCamera, m_vecGameCamPos, 0x770); +VALIDATE_OFFSET(CCamera, m_vecSourceDuringInter, 0x77C); +VALIDATE_OFFSET(CCamera, m_vecTargetDuringInter, 0x788); +VALIDATE_OFFSET(CCamera, m_vecUpDuringInter, 0x794); +VALIDATE_OFFSET(CCamera, m_pRwCamera, 0x7A0); +VALIDATE_OFFSET(CCamera, m_pTargetEntity, 0x7A4); +VALIDATE_OFFSET(CCamera, m_aPathSplines, 0x7A8); +VALIDATE_OFFSET(CCamera, m_aTrainCamNodes, 0x39A8); +VALIDATE_OFFSET(CCamera, m_CameraMatrix, 0xE8A8); +VALIDATE_OFFSET(CCamera, m_bGarageFixedCamPositionSet, 0xE8F0); +VALIDATE_OFFSET(CCamera, m_bDoingSpecialInterPolation, 0xE8F1); +VALIDATE_OFFSET(CCamera, m_bScriptParametersSetForInterPol, 0xE8F2); +VALIDATE_OFFSET(CCamera, m_bFading, 0xE8F3); +VALIDATE_OFFSET(CCamera, m_bMusicFading, 0xE8F4); +VALIDATE_OFFSET(CCamera, m_ViewMatrix, 0xE8F8); +VALIDATE_OFFSET(CCamera, m_avecFrustumNormals, 0xE940); +VALIDATE_OFFSET(CCamera, m_vecOldSourceForInter, 0xE970); +VALIDATE_OFFSET(CCamera, m_vecOldFrontForInter, 0xE97C); +VALIDATE_OFFSET(CCamera, m_vecOldUpForInter, 0xE988); +VALIDATE_OFFSET(CCamera, m_fOldFOVForInter, 0xE994); +VALIDATE_OFFSET(CCamera, m_fFLOATingFade, 0xE998); +VALIDATE_OFFSET(CCamera, m_fFLOATingFadeMusic, 0xE99C); +VALIDATE_OFFSET(CCamera, m_fTimeToFadeOut, 0xE9A0); +VALIDATE_OFFSET(CCamera, m_fTimeToFadeMusic, 0xE9A4); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopMoving, 0xE9A8); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopCatchUp, 0xE9AC); +VALIDATE_OFFSET(CCamera, m_fGaitSwayBuffer, 0xE9B0); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToStopMoving, 0xE9B4); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToCatchUp, 0xE9B8); +VALIDATE_OFFSET(CCamera, m_nScriptTimeForInterPolation, 0xE9BC); +VALIDATE_OFFSET(CCamera, m_nFadingDirection, 0xE9C0); +VALIDATE_OFFSET(CCamera, m_nModeObbeCamIsInForCar, 0xE9C4); +VALIDATE_OFFSET(CCamera, m_nModeToGoTo, 0xE9C8); +VALIDATE_OFFSET(CCamera, m_nMusicFadingDirection, 0xE9CA); +VALIDATE_OFFSET(CCamera, m_nTypeOfSwitch, 0xE9CC); +VALIDATE_OFFSET(CCamera, m_nFadeTimeStarted, 0xE9D0); +VALIDATE_OFFSET(CCamera, m_nFadeTimeStartedMusic, 0xE9D4); +VALIDATE_SIZE(CCamera, 0xE9D8); SUPPORTED_10EN_11EN_STEAM extern int(&SequenceOfCams)[15]; // int SequenceOfCams[15] SUPPORTED_10EN_11EN_STEAM extern int(&SequenceOfPedCams)[5]; // int SequenceOfPedCams[5] diff --git a/plugin_III/game_III/CCarAI.h b/plugin_III/game_III/CCarAI.h index 8661c0884..c4a83fffa 100644 --- a/plugin_III/game_III/CCarAI.h +++ b/plugin_III/game_III/CCarAI.h @@ -28,5 +28,6 @@ class PLUGIN_API CCarAI { SUPPORTED_10EN_11EN_STEAM static void TellOccupantsToLeaveCar(CVehicle *vehicle); SUPPORTED_10EN_11EN_STEAM static void UpdateCarAI(CVehicle *vehicle); }; +VALIDATE_SIZE(CCarAI, 0x1); #include "meta/meta.CCarAI.h" diff --git a/plugin_III/game_III/CCarCtrl.h b/plugin_III/game_III/CCarCtrl.h index 28ce9326b..bd9e8b742 100644 --- a/plugin_III/game_III/CCarCtrl.h +++ b/plugin_III/game_III/CCarCtrl.h @@ -109,6 +109,7 @@ class PLUGIN_API CCarCtrl { SUPPORTED_10EN_11EN_STEAM static void WeaveThroughObjectsSectorList(CPtrList &list, CVehicle *vehicle, float x_inf, float y_inf, float x_sup, float y_sup, float *pAngleToWeaveLeft, float *pAngleToWeaveRight); SUPPORTED_10EN_11EN_STEAM static void WeaveThroughPedsSectorList(CPtrList &list, CVehicle *vehicle, CPhysical *target, float x_inf, float y_inf, float x_sup, float y_sup, float *pAngleToWeaveLeft, float *pAngleToWeaveRight); }; +VALIDATE_SIZE(CCarCtrl, 0x1); SUPPORTED_10EN_11EN_STEAM extern CVehicle *(&apCarsToKeep)[2]; // CVehicle *apCarsToKeep[2] SUPPORTED_10EN_11EN_STEAM extern unsigned int(&aCarsToKeepTime)[2]; // unsigned int aCarsToKeepTime[2] diff --git a/plugin_III/game_III/CCarGenerator.h b/plugin_III/game_III/CCarGenerator.h index d039df0d4..ca9658ad9 100644 --- a/plugin_III/game_III/CCarGenerator.h +++ b/plugin_III/game_III/CCarGenerator.h @@ -40,7 +40,23 @@ class PLUGIN_API CCarGenerator { SUPPORTED_10EN_11EN_STEAM void SwitchOff(); SUPPORTED_10EN_11EN_STEAM void SwitchOn(); }; - +VALIDATE_OFFSET(CCarGenerator, m_nModelId, 0x0); +VALIDATE_OFFSET(CCarGenerator, m_vecPos, 0x4); +VALIDATE_OFFSET(CCarGenerator, m_fAngle, 0x10); +VALIDATE_OFFSET(CCarGenerator, m_nPrimaryColor, 0x14); +VALIDATE_OFFSET(CCarGenerator, m_nSecondaryColor, 0x16); +VALIDATE_OFFSET(CCarGenerator, m_nForceSpawn, 0x18); +VALIDATE_OFFSET(CCarGenerator, m_nAlarm, 0x19); +VALIDATE_OFFSET(CCarGenerator, m_nDoorLock, 0x1A); +VALIDATE_OFFSET(CCarGenerator, m_nMinDelay, 0x1C); +VALIDATE_OFFSET(CCarGenerator, m_nMaxDelay, 0x1E); +VALIDATE_OFFSET(CCarGenerator, m_nTimeNextGen, 0x20); +VALIDATE_OFFSET(CCarGenerator, m_nVehicleHandle, 0x24); +VALIDATE_OFFSET(CCarGenerator, m_nEnabled, 0x28); +VALIDATE_OFFSET(CCarGenerator, m_bIsBlocking, 0x2A); +VALIDATE_OFFSET(CCarGenerator, m_vecInf, 0x2C); +VALIDATE_OFFSET(CCarGenerator, m_vecSup, 0x38); +VALIDATE_OFFSET(CCarGenerator, m_fDistance, 0x44); VALIDATE_SIZE(CCarGenerator, 0x48); #include "meta/meta.CCarGenerator.h" diff --git a/plugin_III/game_III/CCivilianPed.h b/plugin_III/game_III/CCivilianPed.h index 151f2ad67..22caa88a5 100644 --- a/plugin_III/game_III/CCivilianPed.h +++ b/plugin_III/game_III/CCivilianPed.h @@ -75,6 +75,7 @@ class PLUGIN_API CCivilianPed : public CPed SUPPORTED_10EN_11EN_STEAM void CivilianAI(); }; +VALIDATE_SIZE(CCivilianPed, 0x53C); VTABLE_DESC(CCivilianPed, 0x5F819C, 19); VALIDATE_SIZE(CCivilianPed, 0x53C); diff --git a/plugin_III/game_III/CClock.h b/plugin_III/game_III/CClock.h index 6840809ba..1edf4197e 100644 --- a/plugin_III/game_III/CClock.h +++ b/plugin_III/game_III/CClock.h @@ -44,5 +44,6 @@ class PLUGIN_API CClock { //! Updates a time. Called each frame from CGame::Process SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CClock, 0x1); #include "meta/meta.CClock.h" diff --git a/plugin_III/game_III/CClouds.h b/plugin_III/game_III/CClouds.h index cbcaf80b2..e8f08b062 100644 --- a/plugin_III/game_III/CClouds.h +++ b/plugin_III/game_III/CClouds.h @@ -26,6 +26,7 @@ class PLUGIN_API CClouds { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CClouds, 0x1); //! RwTexture* gpCloudTex[5] = {cloud1, cloud2, cloud3, cloudhilit, cloudmasked}; SUPPORTED_10EN_11EN_STEAM extern RwTexture *(&gpCloudTex)[5]; // RwTexture *gpCloudTex[5] diff --git a/plugin_III/game_III/CClumpModelInfo.h b/plugin_III/game_III/CClumpModelInfo.h index 5a07223db..e6c1ce440 100644 --- a/plugin_III/game_III/CClumpModelInfo.h +++ b/plugin_III/game_III/CClumpModelInfo.h @@ -15,6 +15,9 @@ struct PLUGIN_API FrameSearchData { char const *name; RwFrame *result; }; +VALIDATE_OFFSET(FrameSearchData, name, 0x0); +VALIDATE_OFFSET(FrameSearchData, result, 0x4); +VALIDATE_SIZE(FrameSearchData, 0x8); class PLUGIN_API CClumpModelInfo : public CBaseModelInfo { PLUGIN_NO_DEFAULT_CONSTRUCTION(CClumpModelInfo) @@ -51,8 +54,8 @@ class PLUGIN_API CClumpModelInfo : public CBaseModelInfo { return searchData.result; } }; - -VALIDATE_SIZE(FrameSearchData, 0x8); +VALIDATE_OFFSET(CClumpModelInfo, m_pClump, 0x30); +VALIDATE_SIZE(CClumpModelInfo, 0x34); VTABLE_DESC(CClumpModelInfo, 0x5FE020, 7); VALIDATE_SIZE(CClumpModelInfo, 0x34); diff --git a/plugin_III/game_III/CColBox.h b/plugin_III/game_III/CColBox.h index a7574cc41..e52096b74 100644 --- a/plugin_III/game_III/CColBox.h +++ b/plugin_III/game_III/CColBox.h @@ -18,7 +18,7 @@ class PLUGIN_API CColBox : public CBox { SUPPORTED_10EN_11EN_STEAM void Set(CVector &min, CVector &max, unsigned char material, unsigned char flag); }; - +VALIDATE_OFFSET(CColBox, m_surface, 0x18); VALIDATE_SIZE(CColBox, 0x1C); #include "meta/meta.CColBox.h" diff --git a/plugin_III/game_III/CColLine.h b/plugin_III/game_III/CColLine.h index 6428e76ba..bd3a913a5 100644 --- a/plugin_III/game_III/CColLine.h +++ b/plugin_III/game_III/CColLine.h @@ -20,7 +20,10 @@ class PLUGIN_API CColLine { SUPPORTED_10EN_11EN_STEAM void Set(CVector const &start, CVector const &end); }; - +VALIDATE_OFFSET(CColLine, m_vecStart, 0x0); +VALIDATE_OFFSET(CColLine, field_C, 0xC); +VALIDATE_OFFSET(CColLine, m_vecEnd, 0x10); +VALIDATE_OFFSET(CColLine, field_1C, 0x1C); VALIDATE_SIZE(CColLine, 0x20); #include "meta/meta.CColLine.h" diff --git a/plugin_III/game_III/CColModel.h b/plugin_III/game_III/CColModel.h index 2e84b78b9..83b6b4ffb 100644 --- a/plugin_III/game_III/CColModel.h +++ b/plugin_III/game_III/CColModel.h @@ -43,7 +43,20 @@ class PLUGIN_API CColModel { SUPPORTED_10EN_11EN_STEAM void RemoveTrianglePlanes(); SUPPORTED_10EN_11EN_STEAM void SetLinkPtr(CLink *link); }; - +VALIDATE_OFFSET(CColModel, m_boundSphere, 0x0); +VALIDATE_OFFSET(CColModel, m_boundBox, 0x14); +VALIDATE_OFFSET(CColModel, m_nNumOfSpheres, 0x30); +VALIDATE_OFFSET(CColModel, m_nNumOfLines, 0x32); +VALIDATE_OFFSET(CColModel, m_nNumOfBoxes, 0x34); +VALIDATE_OFFSET(CColModel, m_nNumOfTriangles, 0x36); +VALIDATE_OFFSET(CColModel, m_nColLevel, 0x38); +VALIDATE_OFFSET(CColModel, m_bOwnsCollisionVolumes, 0x3C); +VALIDATE_OFFSET(CColModel, m_pSpheres, 0x40); +VALIDATE_OFFSET(CColModel, m_pLines, 0x44); +VALIDATE_OFFSET(CColModel, m_pBoxes, 0x48); +VALIDATE_OFFSET(CColModel, m_pVertices, 0x4C); +VALIDATE_OFFSET(CColModel, m_pTriangles, 0x50); +VALIDATE_OFFSET(CColModel, m_pTrianglePlanes, 0x54); VALIDATE_SIZE(CColModel, 0x58); #include "meta/meta.CColModel.h" diff --git a/plugin_III/game_III/CColPoint.h b/plugin_III/game_III/CColPoint.h index d1e92bb69..4744b2d2a 100644 --- a/plugin_III/game_III/CColPoint.h +++ b/plugin_III/game_III/CColPoint.h @@ -23,7 +23,15 @@ class PLUGIN_API CColPoint { void operator=(CColPoint const &right); }; - +VALIDATE_OFFSET(CColPoint, m_vecPoint, 0x0); +VALIDATE_OFFSET(CColPoint, m_fPointOffsetZ, 0xC); +VALIDATE_OFFSET(CColPoint, m_vecNormal, 0x10); +VALIDATE_OFFSET(CColPoint, m_fNormalOffsetZ, 0x1C); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeA, 0x20); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeA, 0x21); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeB, 0x22); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeB, 0x23); +VALIDATE_OFFSET(CColPoint, m_fCollisionRadius, 0x24); VALIDATE_SIZE(CColPoint, 0x28); #include "meta/meta.CColPoint.h" diff --git a/plugin_III/game_III/CColSphere.h b/plugin_III/game_III/CColSphere.h index 563a76bc8..8342e197f 100644 --- a/plugin_III/game_III/CColSphere.h +++ b/plugin_III/game_III/CColSphere.h @@ -18,7 +18,7 @@ class PLUGIN_API CColSphere : public CSphere { SUPPORTED_10EN_11EN_STEAM void Set(float radius, CVector const& center, unsigned char material, unsigned char flag); }; - +VALIDATE_OFFSET(CColSphere, m_surface, 0x10); VALIDATE_SIZE(CColSphere, 0x14); #include "meta/meta.CColSphere.h" diff --git a/plugin_III/game_III/CColTriangle.h b/plugin_III/game_III/CColTriangle.h index 143f33c6e..e28d5b5a9 100644 --- a/plugin_III/game_III/CColTriangle.h +++ b/plugin_III/game_III/CColTriangle.h @@ -19,7 +19,11 @@ class PLUGIN_API CColTriangle { SUPPORTED_10EN_11EN_STEAM void Set(CompressedVector const *verts, int vertA, int vertB, int vertC, unsigned char material, unsigned char flag); }; - +VALIDATE_OFFSET(CColTriangle, m_nVertA, 0x0); +VALIDATE_OFFSET(CColTriangle, m_nVertB, 0x2); +VALIDATE_OFFSET(CColTriangle, m_nVertC, 0x4); +VALIDATE_OFFSET(CColTriangle, m_nMaterial, 0x6); +VALIDATE_OFFSET(CColTriangle, m_nLight, 0x7); VALIDATE_SIZE(CColTriangle, 0x8); #include "meta/meta.CColTriangle.h" diff --git a/plugin_III/game_III/CColTrianglePlane.h b/plugin_III/game_III/CColTrianglePlane.h index 8961488d4..6658ae9b6 100644 --- a/plugin_III/game_III/CColTrianglePlane.h +++ b/plugin_III/game_III/CColTrianglePlane.h @@ -20,7 +20,9 @@ class PLUGIN_API CColTrianglePlane { SUPPORTED_10EN_11EN_STEAM void GetNormal(CVector &point); SUPPORTED_10EN_11EN_STEAM void Set(CompressedVector const *verts, CColTriangle &tri); }; - +VALIDATE_OFFSET(CColTrianglePlane, m_vecNormal, 0x0); +VALIDATE_OFFSET(CColTrianglePlane, m_fDistance, 0xC); +VALIDATE_OFFSET(CColTrianglePlane, m_nOrientation, 0x10); VALIDATE_SIZE(CColTrianglePlane, 0x14); #include "meta/meta.CColTrianglePlane.h" diff --git a/plugin_III/game_III/CCollision.h b/plugin_III/game_III/CCollision.h index 8f356b1f1..30c939aca 100644 --- a/plugin_III/game_III/CCollision.h +++ b/plugin_III/game_III/CCollision.h @@ -43,6 +43,7 @@ class CCollision { static bool IsStoredPolyStillValidVerticalLine(CVector const& lineOrigin, float lineDist, CColPoint& colPoint, CStoredCollPoly* colPoly); static int ProcessColModels(CMatrix const& transform1, CColModel& colModel1, CMatrix const& transform2, CColModel& colModel2, CColPoint* colPoint1, CColPoint* colPoint2, float* maxTouchDistance); }; +VALIDATE_SIZE(CCollision, 0x1); eLevelName GetCollisionInSectorList(CPtrList& list); eLevelName GetCollisionInSector(CSector& sector); diff --git a/plugin_III/game_III/CControllerConfigManager.cpp b/plugin_III/game_III/CControllerConfigManager.cpp index 5a22b0fb8..76fd4cc76 100644 --- a/plugin_III/game_III/CControllerConfigManager.cpp +++ b/plugin_III/game_III/CControllerConfigManager.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CControllerConfigManager.h" diff --git a/plugin_III/game_III/CControllerConfigManager.h b/plugin_III/game_III/CControllerConfigManager.h index 3612f92d6..f87d82c18 100644 --- a/plugin_III/game_III/CControllerConfigManager.h +++ b/plugin_III/game_III/CControllerConfigManager.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -87,11 +87,16 @@ class CControllerKey { unsigned int keyCode; unsigned int priority; }; +VALIDATE_OFFSET(CControllerKey, keyCode, 0x0); +VALIDATE_OFFSET(CControllerKey, priority, 0x4); +VALIDATE_SIZE(CControllerKey, 0x8); class CControllerAction { public: CControllerKey keys[4]; }; +VALIDATE_OFFSET(CControllerAction, keys, 0x0); +VALIDATE_SIZE(CControllerAction, 0x20); class CControllerConfigManager { public: @@ -155,7 +160,14 @@ class CControllerConfigManager { void SetMouseButtonAssociatedWithAction(e_ControllerAction action, int32_t button); void ResetSettingOrder(e_ControllerAction action); }; - +VALIDATE_OFFSET(CControllerConfigManager, m_bFirstCapture, 0x0); +VALIDATE_OFFSET(CControllerConfigManager, m_OldState, 0x4); +VALIDATE_OFFSET(CControllerConfigManager, m_NewState, 0x114); +VALIDATE_OFFSET(CControllerConfigManager, m_aActionNames, 0x224); +VALIDATE_OFFSET(CControllerConfigManager, m_aButtonStates, 0xEF4); +VALIDATE_OFFSET(CControllerConfigManager, m_actions, 0xF08); +VALIDATE_OFFSET(CControllerConfigManager, m_aSimCheckers, 0x1428); +VALIDATE_OFFSET(CControllerConfigManager, m_bMouseAssociated, 0x1438); VALIDATE_SIZE(CControllerConfigManager, 0x143C); extern CControllerConfigManager& ControlsManager; diff --git a/plugin_III/game_III/CControllerState.cpp b/plugin_III/game_III/CControllerState.cpp index ce60b91ed..1aab983f3 100644 --- a/plugin_III/game_III/CControllerState.cpp +++ b/plugin_III/game_III/CControllerState.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CControllerState.h" diff --git a/plugin_III/game_III/CControllerState.h b/plugin_III/game_III/CControllerState.h index 48a05b786..a9774b039 100644 --- a/plugin_III/game_III/CControllerState.h +++ b/plugin_III/game_III/CControllerState.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class CControllerState { @@ -41,5 +40,25 @@ class CControllerState { //funcs void Clear(); }; - +VALIDATE_OFFSET(CControllerState, LeftStickX, 0x0); +VALIDATE_OFFSET(CControllerState, LeftStickY, 0x2); +VALIDATE_OFFSET(CControllerState, RightStickX, 0x4); +VALIDATE_OFFSET(CControllerState, RightStickY, 0x6); +VALIDATE_OFFSET(CControllerState, LeftShoulder1, 0x8); +VALIDATE_OFFSET(CControllerState, LeftShoulder2, 0xA); +VALIDATE_OFFSET(CControllerState, RightShoulder1, 0xC); +VALIDATE_OFFSET(CControllerState, RightShoulder2, 0xE); +VALIDATE_OFFSET(CControllerState, DPadUp, 0x10); +VALIDATE_OFFSET(CControllerState, DPadDown, 0x12); +VALIDATE_OFFSET(CControllerState, DPadLeft, 0x14); +VALIDATE_OFFSET(CControllerState, DPadRight, 0x16); +VALIDATE_OFFSET(CControllerState, Start, 0x18); +VALIDATE_OFFSET(CControllerState, Select, 0x1A); +VALIDATE_OFFSET(CControllerState, ButtonSquare, 0x1C); +VALIDATE_OFFSET(CControllerState, ButtonTriangle, 0x1E); +VALIDATE_OFFSET(CControllerState, ButtonCross, 0x20); +VALIDATE_OFFSET(CControllerState, ButtonCircle, 0x22); +VALIDATE_OFFSET(CControllerState, ShockButtonL, 0x24); +VALIDATE_OFFSET(CControllerState, ShockButtonR, 0x26); +VALIDATE_OFFSET(CControllerState, m_bChatIndicated, 0x28); VALIDATE_SIZE(CControllerState, 0x2A); \ No newline at end of file diff --git a/plugin_III/game_III/CCopPed.h b/plugin_III/game_III/CCopPed.h index 65a5790ef..dfbc398e6 100644 --- a/plugin_III/game_III/CCopPed.h +++ b/plugin_III/game_III/CCopPed.h @@ -89,6 +89,18 @@ class PLUGIN_API CCopPed : public CPed { SUPPORTED_10EN_11EN_STEAM void SetArrestPlayer(CPed *player); SUPPORTED_10EN_11EN_STEAM void SetPursuit(bool ignoreCopLimit); }; +VALIDATE_OFFSET(CCopPed, m_nRoadblockNode, 0x53C); +VALIDATE_OFFSET(CCopPed, m_fDistanceToTarget, 0x540); +VALIDATE_OFFSET(CCopPed, m_bIsInPursuit, 0x544); +VALIDATE_OFFSET(CCopPed, m_bIsDisabledCop, 0x545); +VALIDATE_OFFSET(CCopPed, field_546, 0x546); +VALIDATE_OFFSET(CCopPed, m_bBeatingSuspect, 0x547); +VALIDATE_OFFSET(CCopPed, m_bStopAndShootDisabledZone, 0x548); +VALIDATE_OFFSET(CCopPed, m_bZoneDisabled, 0x549); +VALIDATE_OFFSET(CCopPed, m_fAbseilPos, 0x54C); +VALIDATE_OFFSET(CCopPed, m_nCopType, 0x550); +VALIDATE_OFFSET(CCopPed, field_554, 0x554); +VALIDATE_SIZE(CCopPed, 0x558); VTABLE_DESC(CCopPed, 0x5F82A4, 19); VALIDATE_SIZE(CCopPed, 0x558); diff --git a/plugin_III/game_III/CCoronas.h b/plugin_III/game_III/CCoronas.h index b16c897c8..7e7a5632b 100644 --- a/plugin_III/game_III/CCoronas.h +++ b/plugin_III/game_III/CCoronas.h @@ -64,6 +64,7 @@ class PLUGIN_API CCoronas { SUPPORTED_10EN_11EN_STEAM static void Update(); SUPPORTED_10EN_11EN_STEAM static void UpdateCoronaCoors(unsigned int id, CVector const &coors, float drawDist, float someAngle); }; +VALIDATE_SIZE(CCoronas, 0x1); SUPPORTED_10EN_11EN_STEAM extern RwTexture *(&gpCoronaTexture)[9]; // RwTexture *gpCoronaTexture[9] diff --git a/plugin_III/game_III/CCrane.h b/plugin_III/game_III/CCrane.h index 302eda84d..9b79332c1 100644 --- a/plugin_III/game_III/CCrane.h +++ b/plugin_III/game_III/CCrane.h @@ -72,7 +72,36 @@ class PLUGIN_API CCrane { SUPPORTED_10EN_11EN_STEAM void SetHookMatrix(); SUPPORTED_10EN_11EN_STEAM void Update(); }; - +VALIDATE_OFFSET(CCrane, m_pCraneEntity, 0x0); +VALIDATE_OFFSET(CCrane, m_pHook, 0x4); +VALIDATE_OFFSET(CCrane, m_nAudioEntity, 0x8); +VALIDATE_OFFSET(CCrane, m_fPickupX1, 0xC); +VALIDATE_OFFSET(CCrane, m_fPickupX2, 0x10); +VALIDATE_OFFSET(CCrane, m_fPickupY1, 0x14); +VALIDATE_OFFSET(CCrane, m_fPickupY2, 0x18); +VALIDATE_OFFSET(CCrane, m_vecDropoffTarget, 0x1C); +VALIDATE_OFFSET(CCrane, m_fDropoffHeading, 0x28); +VALIDATE_OFFSET(CCrane, m_fPickupAngle, 0x2C); +VALIDATE_OFFSET(CCrane, m_fDropoffAngle, 0x30); +VALIDATE_OFFSET(CCrane, m_fPickupDistance, 0x34); +VALIDATE_OFFSET(CCrane, m_fDropoffDistance, 0x38); +VALIDATE_OFFSET(CCrane, m_fPickupHeight, 0x3C); +VALIDATE_OFFSET(CCrane, m_fDropoffHeight, 0x40); +VALIDATE_OFFSET(CCrane, m_fHookAngle, 0x44); +VALIDATE_OFFSET(CCrane, m_fHookOffset, 0x48); +VALIDATE_OFFSET(CCrane, m_fHookHeight, 0x4C); +VALIDATE_OFFSET(CCrane, m_vecHookInitPos, 0x50); +VALIDATE_OFFSET(CCrane, m_vecHookCurPos, 0x5C); +VALIDATE_OFFSET(CCrane, m_vecHookVelocity, 0x68); +VALIDATE_OFFSET(CCrane, m_pVehiclePickedUp, 0x70); +VALIDATE_OFFSET(CCrane, m_nTimeForNextCheck, 0x74); +VALIDATE_OFFSET(CCrane, m_nCraneStatus, 0x78); +VALIDATE_OFFSET(CCrane, m_nCraneState, 0x79); +VALIDATE_OFFSET(CCrane, m_nVehiclesCollected, 0x7A); +VALIDATE_OFFSET(CCrane, m_bIsCrusher, 0x7B); +VALIDATE_OFFSET(CCrane, m_bIsMilitaryCrane, 0x7C); +VALIDATE_OFFSET(CCrane, m_bWasMilitaryCrane, 0x7D); +VALIDATE_OFFSET(CCrane, m_bIsTop, 0x7E); VALIDATE_SIZE(CCrane, 0x80); #include "meta/meta.CCrane.h" diff --git a/plugin_III/game_III/CCranes.h b/plugin_III/game_III/CCranes.h index b2beda872..e7bb976f0 100644 --- a/plugin_III/game_III/CCranes.h +++ b/plugin_III/game_III/CCranes.h @@ -30,6 +30,7 @@ class PLUGIN_API CCranes { SUPPORTED_10EN_11EN_STEAM static void Save(unsigned char *buf, unsigned int *size); SUPPORTED_10EN_11EN_STEAM static void UpdateCranes(); }; +VALIDATE_SIZE(CCranes, 0x1); SUPPORTED_10EN_11EN_STEAM void CranesLoad(unsigned char *buf, unsigned int size); diff --git a/plugin_III/game_III/CCredits.h b/plugin_III/game_III/CCredits.h index 66865ca63..bd36f3c62 100644 --- a/plugin_III/game_III/CCredits.h +++ b/plugin_III/game_III/CCredits.h @@ -21,5 +21,6 @@ class PLUGIN_API CCredits { SUPPORTED_10EN_11EN_STEAM static void Start(); SUPPORTED_10EN_11EN_STEAM static void Stop(); }; +VALIDATE_SIZE(CCredits, 0x1); #include "meta/meta.CCredits.h" diff --git a/plugin_III/game_III/CCurrentVehicle.h b/plugin_III/game_III/CCurrentVehicle.h index 7f35bf25a..a3394bb35 100644 --- a/plugin_III/game_III/CCurrentVehicle.h +++ b/plugin_III/game_III/CCurrentVehicle.h @@ -19,7 +19,7 @@ class PLUGIN_API CCurrentVehicle { SUPPORTED_10EN_11EN_STEAM void Init(); SUPPORTED_10EN_11EN_STEAM void Process(); }; - +VALIDATE_OFFSET(CCurrentVehicle, m_pCurrentVehicle, 0x0); VALIDATE_SIZE(CCurrentVehicle, 0x4); #include "meta/meta.CCurrentVehicle.h" diff --git a/plugin_III/game_III/CCurves.h b/plugin_III/game_III/CCurves.h index 973f70c55..2db29eb7f 100644 --- a/plugin_III/game_III/CCurves.h +++ b/plugin_III/game_III/CCurves.h @@ -14,5 +14,6 @@ class PLUGIN_API CCurves { SUPPORTED_10EN_11EN_STEAM static void CalcCurvePoint(CVector *pPos1, CVector *pPos2, CVector *pDir1, CVector *pDir2, float between, int timeOnCurve, CVector *pOutPos, CVector *pOutDir); SUPPORTED_10EN_11EN_STEAM static float CalcSpeedScaleFactor(CVector *pPoint1, CVector *pPoint2, float dir1X, float dir1Y, float dir2X, float dir2Y); }; +VALIDATE_SIZE(CCurves, 0x1); #include "meta/meta.CCurves.h" diff --git a/plugin_III/game_III/CCutsceneHead.h b/plugin_III/game_III/CCutsceneHead.h index 29de014d2..59f8054c6 100644 --- a/plugin_III/game_III/CCutsceneHead.h +++ b/plugin_III/game_III/CCutsceneHead.h @@ -65,6 +65,8 @@ class PLUGIN_API CCutsceneHead : public CCutsceneObject { SUPPORTED_10EN_11EN_STEAM void PlayAnimation(char const *name); }; +VALIDATE_OFFSET(CCutsceneHead, m_pHeadNode, 0x198); +VALIDATE_SIZE(CCutsceneHead, 0x19C); VTABLE_DESC(CCutsceneHead, 0x5F7C08, 18); VALIDATE_SIZE(CCutsceneHead, 0x19C); diff --git a/plugin_III/game_III/CCutsceneMgr.h b/plugin_III/game_III/CCutsceneMgr.h index 4c8d1055d..e3350d6c4 100644 --- a/plugin_III/game_III/CCutsceneMgr.h +++ b/plugin_III/game_III/CCutsceneMgr.h @@ -44,5 +44,6 @@ class CCutsceneMgr { static void Shutdown(); static void Update(); }; +VALIDATE_SIZE(CCutsceneMgr, 0x1); int FindCutsceneAudioTrackId(char const* cutsceneName); diff --git a/plugin_III/game_III/CCutsceneObject.h b/plugin_III/game_III/CCutsceneObject.h index 374bda089..8e559494f 100644 --- a/plugin_III/game_III/CCutsceneObject.h +++ b/plugin_III/game_III/CCutsceneObject.h @@ -55,6 +55,7 @@ class PLUGIN_API CCutsceneObject : public CObject { // virtual function #17 (not overriden) }; +VALIDATE_SIZE(CCutsceneObject, 0x198); VTABLE_DESC(CCutsceneObject, 0x5F7C80, 18); VALIDATE_SIZE(CCutsceneObject, 0x198); diff --git a/plugin_III/game_III/CDamageManager.h b/plugin_III/game_III/CDamageManager.h index 06ca21a1b..a40649918 100644 --- a/plugin_III/game_III/CDamageManager.h +++ b/plugin_III/game_III/CDamageManager.h @@ -124,6 +124,14 @@ class PLUGIN_API CDamageManager { SUPPORTED_10EN_11EN_STEAM void SetPanelStatus(int panel, unsigned int status); SUPPORTED_10EN_11EN_STEAM void SetWheelStatus(int wheel, unsigned int status); }; +VALIDATE_OFFSET(CDamageManager, m_fWheelDamageEffect, 0x0); +VALIDATE_OFFSET(CDamageManager, m_nEngineStatus, 0x4); +VALIDATE_OFFSET(CDamageManager, m_anWheelStatus, 0x5); +VALIDATE_OFFSET(CDamageManager, m_anDoorStatus, 0x9); +VALIDATE_OFFSET(CDamageManager, m_nLightStatus, 0x10); +VALIDATE_OFFSET(CDamageManager, m_nPanelStatus, 0x14); +VALIDATE_OFFSET(CDamageManager, bDamSwitch, 0x18); +VALIDATE_SIZE(CDamageManager, 0x1C); //! 2.5f, 1.25f, 3.2f, 1.4f, 2.5f, 2.8f, 0.5f SUPPORTED_10EN_11EN_STEAM extern float(&G_aComponentDamage)[7]; // float G_aComponentDamage[7] diff --git a/plugin_III/game_III/CDarkel.h b/plugin_III/game_III/CDarkel.h index 620c21df2..12310ad29 100644 --- a/plugin_III/game_III/CDarkel.h +++ b/plugin_III/game_III/CDarkel.h @@ -52,5 +52,6 @@ class PLUGIN_API CDarkel { SUPPORTED_10EN_11EN_STEAM static void StartFrenzy(eWeaponType weaponType, int time, unsigned short kill, int model, wchar_t *text, int model2, int model3, int model4, bool standardSound, bool headShot); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CDarkel, 0x1); #include "meta/meta.CDarkel.h" diff --git a/plugin_III/game_III/CDate.h b/plugin_III/game_III/CDate.h index b399f9fe9..542b0f0a3 100644 --- a/plugin_III/game_III/CDate.h +++ b/plugin_III/game_III/CDate.h @@ -90,7 +90,12 @@ class PLUGIN_API CDate { this->m_nYear = year; } }; - +VALIDATE_OFFSET(CDate, m_nSecond, 0x0); +VALIDATE_OFFSET(CDate, m_nMinute, 0x4); +VALIDATE_OFFSET(CDate, m_nHour, 0x8); +VALIDATE_OFFSET(CDate, m_nDay, 0xC); +VALIDATE_OFFSET(CDate, m_nMonth, 0x10); +VALIDATE_OFFSET(CDate, m_nYear, 0x14); VALIDATE_SIZE(CDate, 0x18); #include "meta/meta.CDate.h" diff --git a/plugin_III/game_III/CDigitalClock.h b/plugin_III/game_III/CDigitalClock.h index 88f87e1e0..ef52d0f27 100644 --- a/plugin_III/game_III/CDigitalClock.h +++ b/plugin_III/game_III/CDigitalClock.h @@ -29,7 +29,15 @@ class PLUGIN_API CDigitalClock { SUPPORTED_10EN_11EN_STEAM static char const *GetString(); }; - +VALIDATE_OFFSET(CDigitalClock, m_vecPosition, 0x0); +VALIDATE_OFFSET(CDigitalClock, m_vecSize, 0xC); +VALIDATE_OFFSET(CDigitalClock, m_fDrawDistance, 0x18); +VALIDATE_OFFSET(CDigitalClock, m_fScale, 0x1C); +VALIDATE_OFFSET(CDigitalClock, m_nRed, 0x20); +VALIDATE_OFFSET(CDigitalClock, m_nGreen, 0x21); +VALIDATE_OFFSET(CDigitalClock, m_nBlue, 0x22); +VALIDATE_OFFSET(CDigitalClock, m_bVisible, 0x23); +VALIDATE_OFFSET(CDigitalClock, m_fIntensity, 0x24); VALIDATE_SIZE(CDigitalClock, 0x28); #include "meta/meta.CDigitalClock.h" diff --git a/plugin_III/game_III/CDirectory.h b/plugin_III/game_III/CDirectory.h index 063656a2c..978a86852 100644 --- a/plugin_III/game_III/CDirectory.h +++ b/plugin_III/game_III/CDirectory.h @@ -8,8 +8,6 @@ #include "PluginBase.h" -//! http://www.gtamodding.com/wiki/IMG_archive#Version_1_-_GTA_III_.26_VC - class PLUGIN_API CDirectory { PLUGIN_NO_DEFAULT_CONSTRUCTION(CDirectory) @@ -29,8 +27,9 @@ class PLUGIN_API CDirectory { SUPPORTED_10EN_11EN_STEAM void ReadDirFile(char const *fileName); SUPPORTED_10EN_11EN_STEAM bool WriteDirFile(char const *fileName); }; - -VALIDATE_SIZE(CDirectory::DirectoryInfo, 0x20); +VALIDATE_OFFSET(CDirectory, m_pEntries, 0x0); +VALIDATE_OFFSET(CDirectory, m_nCapacity, 0x4); +VALIDATE_OFFSET(CDirectory, m_nNumEntries, 0x8); VALIDATE_SIZE(CDirectory, 0xC); #include "meta/meta.CDirectory.h" diff --git a/plugin_III/game_III/CDoor.h b/plugin_III/game_III/CDoor.h index c61a3c2cf..ed18fd661 100644 --- a/plugin_III/game_III/CDoor.h +++ b/plugin_III/game_III/CDoor.h @@ -37,5 +37,13 @@ class CDoor { float RetAngleWhenClosed(); float RetAngleWhenOpen(); }; - +VALIDATE_OFFSET(CDoor, m_fOpenAngle, 0x0); +VALIDATE_OFFSET(CDoor, m_fClosedAngle, 0x4); +VALIDATE_OFFSET(CDoor, m_bDirn, 0x8); +VALIDATE_OFFSET(CDoor, m_bAxis, 0x9); +VALIDATE_OFFSET(CDoor, m_bState, 0xA); +VALIDATE_OFFSET(CDoor, m_fAngle, 0xC); +VALIDATE_OFFSET(CDoor, m_fPrevAngle, 0x10); +VALIDATE_OFFSET(CDoor, m_fAngVel, 0x14); +VALIDATE_OFFSET(CDoor, field_18, 0x18); VALIDATE_SIZE(CDoor, 0x24); \ No newline at end of file diff --git a/plugin_III/game_III/CDraw.h b/plugin_III/game_III/CDraw.h index eb316d63e..ce5046697 100644 --- a/plugin_III/game_III/CDraw.h +++ b/plugin_III/game_III/CDraw.h @@ -21,5 +21,6 @@ class PLUGIN_API CDraw { SUPPORTED_10EN_11EN_STEAM static void SetFOV(float fovValue); }; +VALIDATE_SIZE(CDraw, 0x1); #include "meta/meta.CDraw.h" diff --git a/plugin_III/game_III/CDummy.h b/plugin_III/game_III/CDummy.h index ac3ccb160..100cdb37c 100644 --- a/plugin_III/game_III/CDummy.h +++ b/plugin_III/game_III/CDummy.h @@ -63,6 +63,8 @@ class PLUGIN_API CDummy : public CEntity { // virtual function #16 (not overriden) }; +VALIDATE_OFFSET(CDummy, m_collisionList, 0x64); +VALIDATE_SIZE(CDummy, 0x68); VTABLE_DESC(CDummy, 0x5F0F40, 17); VALIDATE_SIZE(CDummy, 0x68); diff --git a/plugin_III/game_III/CDummyObject.h b/plugin_III/game_III/CDummyObject.h index bab034a6c..f8b77181c 100644 --- a/plugin_III/game_III/CDummyObject.h +++ b/plugin_III/game_III/CDummyObject.h @@ -65,6 +65,7 @@ class PLUGIN_API CDummyObject : public CDummy { // virtual function #16 (not overriden) }; +VALIDATE_SIZE(CDummyObject, 0x68); VTABLE_DESC(CDummyObject, 0x5F7CEC, 17); VALIDATE_SIZE(CDummyObject, 0x68); diff --git a/plugin_III/game_III/CEmergencyPed.h b/plugin_III/game_III/CEmergencyPed.h index 82f82f48c..869012379 100644 --- a/plugin_III/game_III/CEmergencyPed.h +++ b/plugin_III/game_III/CEmergencyPed.h @@ -92,6 +92,13 @@ class PLUGIN_API CEmergencyPed : public CPed { SUPPORTED_10EN_11EN_STEAM bool InRange(CPed *victim); SUPPORTED_10EN_11EN_STEAM void MedicAI(); }; +VALIDATE_OFFSET(CEmergencyPed, m_pRevivedPed, 0x53C); +VALIDATE_OFFSET(CEmergencyPed, m_nEmergencyPedState, 0x540); +VALIDATE_OFFSET(CEmergencyPed, m_pAttendedAccident, 0x544); +VALIDATE_OFFSET(CEmergencyPed, m_pAttendedFire, 0x548); +VALIDATE_OFFSET(CEmergencyPed, m_bStartedToCPR, 0x54C); +VALIDATE_OFFSET(CEmergencyPed, field_550, 0x550); +VALIDATE_SIZE(CEmergencyPed, 0x554); VTABLE_DESC(CEmergencyPed, 0x5F8374, 19); VALIDATE_SIZE(CEmergencyPed, 0x554); diff --git a/plugin_III/game_III/CEntity.h b/plugin_III/game_III/CEntity.h index 22e63efdc..c87926796 100644 --- a/plugin_III/game_III/CEntity.h +++ b/plugin_III/game_III/CEntity.h @@ -138,6 +138,15 @@ class PLUGIN_API CEntity : public CPlaceable { return mi ? mi->m_pColModel : nullptr; } }; +VALIDATE_OFFSET(CEntity, m_pRwObject, 0x4C); +VALIDATE_OFFSET(CEntity, m_pRwAtomic, 0x4C); +VALIDATE_OFFSET(CEntity, m_pRwClump, 0x4C); +VALIDATE_OFFSET(CEntity, m_nScanCode, 0x58); +VALIDATE_OFFSET(CEntity, m_nRandomSeed, 0x5A); +VALIDATE_OFFSET(CEntity, m_nModelIndex, 0x5C); +VALIDATE_OFFSET(CEntity, m_nLevel, 0x5E); +VALIDATE_OFFSET(CEntity, m_pFirstRef, 0x60); +VALIDATE_SIZE(CEntity, 0x64); VTABLE_DESC(CEntity, 0x5F11A8, 17); VALIDATE_SIZE(CEntity, 0x64); diff --git a/plugin_III/game_III/CEntryInfoList.h b/plugin_III/game_III/CEntryInfoList.h index 4084f3f1c..fc5f44b1f 100644 --- a/plugin_III/game_III/CEntryInfoList.h +++ b/plugin_III/game_III/CEntryInfoList.h @@ -28,7 +28,11 @@ class CEntryInfoNode { m_pSector = sector; } }; - +VALIDATE_OFFSET(CEntryInfoNode, m_pPtrList, 0x0); +VALIDATE_OFFSET(CEntryInfoNode, m_pPtrNode, 0x4); +VALIDATE_OFFSET(CEntryInfoNode, m_pSector, 0x8); +VALIDATE_OFFSET(CEntryInfoNode, m_pNext, 0xC); +VALIDATE_OFFSET(CEntryInfoNode, m_pPrev, 0x10); VALIDATE_SIZE(CEntryInfoNode, 0x14); class CEntryInfoList { @@ -54,5 +58,5 @@ class CEntryInfoList { node->m_pPrev->m_pNext = node->m_pNext; } }; - +VALIDATE_OFFSET(CEntryInfoList, m_pLastEntry, 0x0); VALIDATE_SIZE(CEntryInfoList, 0x4); \ No newline at end of file diff --git a/plugin_III/game_III/CEventList.h b/plugin_III/game_III/CEventList.h index 848ca14c4..848b736df 100644 --- a/plugin_III/game_III/CEventList.h +++ b/plugin_III/game_III/CEventList.h @@ -26,6 +26,7 @@ class PLUGIN_API CEventList { SUPPORTED_10EN_11EN_STEAM static void ReportCrimeForEvent(eEventType type, int crimeId, bool bPoliceDontReallyCare); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CEventList, 0x1); class PLUGIN_API CEvent { PLUGIN_NO_DEFAULT_CONSTRUCTION(CEvent) @@ -39,6 +40,14 @@ class PLUGIN_API CEvent { unsigned int m_nExpiryTime; eEventStatus m_nStatus; }; +VALIDATE_OFFSET(CEvent, m_nType, 0x0); +VALIDATE_OFFSET(CEvent, m_nEntityType, 0x4); +VALIDATE_OFFSET(CEvent, m_nVictimIndex, 0x8); +VALIDATE_OFFSET(CEvent, m_pCriminal, 0xC); +VALIDATE_OFFSET(CEvent, m_vecPos, 0x10); +VALIDATE_OFFSET(CEvent, m_nExpiryTime, 0x1C); +VALIDATE_OFFSET(CEvent, m_nStatus, 0x20); +VALIDATE_SIZE(CEvent, 0x24); SUPPORTED_10EN_11EN_STEAM extern CEvent(&gaEvent)[64]; // CEvent gaEvent[64] diff --git a/plugin_III/game_III/CExplosion.h b/plugin_III/game_III/CExplosion.h index ce00ef993..79178fa31 100644 --- a/plugin_III/game_III/CExplosion.h +++ b/plugin_III/game_III/CExplosion.h @@ -41,7 +41,22 @@ class CExplosion { static bool TestForExplosionInArea(eExplosionType explosionType, float x1, float y1, float z1, float x2, float y2, float z2); static void Update(); }; - +VALIDATE_OFFSET(CExplosion, m_nType, 0x0); +VALIDATE_OFFSET(CExplosion, m_vecPosition, 0x4); +VALIDATE_OFFSET(CExplosion, m_fRadius, 0x10); +VALIDATE_OFFSET(CExplosion, m_fPropagationRate, 0x14); +VALIDATE_OFFSET(CExplosion, m_pCreator, 0x18); +VALIDATE_OFFSET(CExplosion, m_pVictim, 0x1C); +VALIDATE_OFFSET(CExplosion, m_nExpireTime, 0x20); +VALIDATE_OFFSET(CExplosion, m_bIsActive, 0x24); +VALIDATE_OFFSET(CExplosion, m_nActiveCounter, 0x25); +VALIDATE_OFFSET(CExplosion, field_26, 0x26); +VALIDATE_OFFSET(CExplosion, field_27, 0x27); +VALIDATE_OFFSET(CExplosion, m_nCreatedTime, 0x28); +VALIDATE_OFFSET(CExplosion, m_nParticlesExpireTime, 0x2C); +VALIDATE_OFFSET(CExplosion, m_fVisibleDistance, 0x30); +VALIDATE_OFFSET(CExplosion, m_nFuelTimer, 0x34); +VALIDATE_OFFSET(CExplosion, m_fGroundZ, 0x38); VALIDATE_SIZE(CExplosion, 0x3C); extern CExplosion *gaExplosion; // [48] diff --git a/plugin_III/game_III/CFallingGlassPane.h b/plugin_III/game_III/CFallingGlassPane.h index 5a643ed80..5946656ab 100644 --- a/plugin_III/game_III/CFallingGlassPane.h +++ b/plugin_III/game_III/CFallingGlassPane.h @@ -26,6 +26,15 @@ class PLUGIN_API CFallingGlassPane : public CMatrix { SUPPORTED_10EN_11EN_STEAM void Render(); SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CFallingGlassPane, m_vecMoveSpeed, 0x48); +VALIDATE_OFFSET(CFallingGlassPane, m_vecTurn, 0x54); +VALIDATE_OFFSET(CFallingGlassPane, m_nTimer, 0x60); +VALIDATE_OFFSET(CFallingGlassPane, m_fGroundZ, 0x64); +VALIDATE_OFFSET(CFallingGlassPane, m_fStep, 0x68); +VALIDATE_OFFSET(CFallingGlassPane, m_nTriIndex, 0x6C); +VALIDATE_OFFSET(CFallingGlassPane, m_bActive, 0x6D); +VALIDATE_OFFSET(CFallingGlassPane, m_bShattered, 0x6E); +VALIDATE_SIZE(CFallingGlassPane, 0x70); SUPPORTED_10EN_11EN_STEAM extern CVector2D(&CoorsWithTriangle)[5][3]; // CVector2D CoorsWithTriangle[5][3] SUPPORTED_10EN_11EN_STEAM extern CVector2D(&CentersWithTriangle)[5]; // CVector2D CentersWithTriangle[5] diff --git a/plugin_III/game_III/CFileLoader.h b/plugin_III/game_III/CFileLoader.h index 81da9ccd8..bddd48928 100644 --- a/plugin_III/game_III/CFileLoader.h +++ b/plugin_III/game_III/CFileLoader.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "RenderWare.h" #include "CColModel.h" @@ -52,6 +51,7 @@ class CFileLoader { static void LoadCollisionFile(char* filepath); static void LoadCollisionModel(unsigned char* buffer, CColModel& outColModel, char* name); }; +VALIDATE_SIZE(CFileLoader, 0x1); char* GetFilename(char const* filepath); void LoadingScreenLoadingFile(char const* filepath); diff --git a/plugin_III/game_III/CFileMgr.h b/plugin_III/game_III/CFileMgr.h index 986d5460e..6b9387f55 100644 --- a/plugin_III/game_III/CFileMgr.h +++ b/plugin_III/game_III/CFileMgr.h @@ -28,5 +28,6 @@ class PLUGIN_API CFileMgr { SUPPORTED_10EN_11EN_STEAM static void SetDirMyDocuments(); SUPPORTED_10EN_11EN_STEAM static int Write(FILESTREAM fileHandle, char *buf, int size); }; +VALIDATE_SIZE(CFileMgr, 0x1); #include "meta/meta.CFileMgr.h" diff --git a/plugin_III/game_III/CFire.h b/plugin_III/game_III/CFire.h index 77e0f25d4..6af06ec95 100644 --- a/plugin_III/game_III/CFire.h +++ b/plugin_III/game_III/CFire.h @@ -31,7 +31,19 @@ class PLUGIN_API CFire { SUPPORTED_10EN_11EN_STEAM void ProcessFire(); SUPPORTED_10EN_11EN_STEAM void ReportThisFire(); }; - +VALIDATE_OFFSET(CFire, m_bIsOngoing, 0x0); +VALIDATE_OFFSET(CFire, m_bIsScriptFire, 0x1); +VALIDATE_OFFSET(CFire, m_bPropagationFlag, 0x2); +VALIDATE_OFFSET(CFire, m_bAudioSet, 0x3); +VALIDATE_OFFSET(CFire, m_vecPosition, 0x4); +VALIDATE_OFFSET(CFire, m_pEntity, 0x10); +VALIDATE_OFFSET(CFire, m_pSource, 0x14); +VALIDATE_OFFSET(CFire, m_nExtinguishTime, 0x18); +VALIDATE_OFFSET(CFire, m_nStartTime, 0x1C); +VALIDATE_OFFSET(CFire, m_nPeriodTimer, 0x20); +VALIDATE_OFFSET(CFire, m_nNextTimeToAddFlames, 0x24); +VALIDATE_OFFSET(CFire, m_nFiremenPuttingOut, 0x28); +VALIDATE_OFFSET(CFire, m_fStrength, 0x2C); VALIDATE_SIZE(CFire, 0x30); #include "meta/meta.CFire.h" diff --git a/plugin_III/game_III/CFireManager.h b/plugin_III/game_III/CFireManager.h index b9ae5b435..f5016199d 100644 --- a/plugin_III/game_III/CFireManager.h +++ b/plugin_III/game_III/CFireManager.h @@ -29,6 +29,9 @@ class PLUGIN_API CFireManager { SUPPORTED_10EN_11EN_STEAM int StartScriptFire(CVector const &pos, CEntity *target, float strength, unsigned char propagation); SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CFireManager, m_nTotalFires, 0x0); +VALIDATE_OFFSET(CFireManager, m_aFires, 0x4); +VALIDATE_SIZE(CFireManager, 0x784); SUPPORTED_10EN_11EN_STEAM extern CFireManager &gFireManager; diff --git a/plugin_III/game_III/CFont.h b/plugin_III/game_III/CFont.h index 6a662da43..11667ee9a 100644 --- a/plugin_III/game_III/CFont.h +++ b/plugin_III/game_III/CFont.h @@ -17,11 +17,18 @@ struct tFontTable { unsigned short space; unsigned short unprop; }; +VALIDATE_OFFSET(tFontTable, prop, 0x0); +VALIDATE_OFFSET(tFontTable, space, 0x17E); +VALIDATE_OFFSET(tFontTable, unprop, 0x180); +VALIDATE_SIZE(tFontTable, 0x182); struct tFontSize { tFontTable fonts[3]; unsigned short ftable[338]; }; +VALIDATE_OFFSET(tFontSize, fonts, 0x0); +VALIDATE_OFFSET(tFontSize, ftable, 0x486); +VALIDATE_SIZE(tFontSize, 0x72A); enum eFontAlignment : unsigned char { ALIGN_CENTER, @@ -134,6 +141,7 @@ class CFont { SetBackgroundOff(); } }; +VALIDATE_SIZE(CFont, 0x1); void AsciiToUnicode(char const* str_ascii, wchar_t* str_unicode); int UnicodeStrlen(wchar_t const* str); diff --git a/plugin_III/game_III/CFontDetails.cpp b/plugin_III/game_III/CFontDetails.cpp index ccc8a7e89..96b4f8320 100644 --- a/plugin_III/game_III/CFontDetails.cpp +++ b/plugin_III/game_III/CFontDetails.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CFontDetails.h" diff --git a/plugin_III/game_III/CFontDetails.h b/plugin_III/game_III/CFontDetails.h index 658a4c97b..5f8338c11 100644 --- a/plugin_III/game_III/CFontDetails.h +++ b/plugin_III/game_III/CFontDetails.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CRGBA.h" #include "CVector2D.h" @@ -43,5 +42,23 @@ class CFontDetails { //funcs ~CFontDetails(); }; - +VALIDATE_OFFSET(CFontDetails, m_Color, 0x0); +VALIDATE_OFFSET(CFontDetails, m_vScale, 0x4); +VALIDATE_OFFSET(CFontDetails, m_fSlant, 0xC); +VALIDATE_OFFSET(CFontDetails, m_vSlantRefPoint, 0x10); +VALIDATE_OFFSET(CFontDetails, m_bJustify, 0x18); +VALIDATE_OFFSET(CFontDetails, m_bCentre, 0x19); +VALIDATE_OFFSET(CFontDetails, m_bRightJustify, 0x1A); +VALIDATE_OFFSET(CFontDetails, m_bBackground, 0x1B); +VALIDATE_OFFSET(CFontDetails, m_bBackGroundOnlyText, 0x1C); +VALIDATE_OFFSET(CFontDetails, m_bProp, 0x1D); +VALIDATE_OFFSET(CFontDetails, m_fAlphaFade, 0x20); +VALIDATE_OFFSET(CFontDetails, m_BackgroundColor, 0x24); +VALIDATE_OFFSET(CFontDetails, m_fWrapX, 0x28); +VALIDATE_OFFSET(CFontDetails, m_fCentreSize, 0x2C); +VALIDATE_OFFSET(CFontDetails, m_fRightJustifyWrap, 0x30); +VALIDATE_OFFSET(CFontDetails, m_nStyle, 0x34); +VALIDATE_OFFSET(CFontDetails, field_38, 0x38); +VALIDATE_OFFSET(CFontDetails, m_nDropShadowPosition, 0x3C); +VALIDATE_OFFSET(CFontDetails, m_DropColor, 0x3E); VALIDATE_SIZE(CFontDetails, 0x44); \ No newline at end of file diff --git a/plugin_III/game_III/CGame.h b/plugin_III/game_III/CGame.h index a397e3997..d6ee04956 100644 --- a/plugin_III/game_III/CGame.h +++ b/plugin_III/game_III/CGame.h @@ -38,6 +38,7 @@ class PLUGIN_API CGame { //! dummy function SUPPORTED_10EN_11EN_STEAM static void TidyUpMemory(bool moveTextures, bool flushDraw); }; +VALIDATE_SIZE(CGame, 0x1); SUPPORTED_10EN_11EN_STEAM extern int &gameTxdSlot; extern int &gGameState; diff --git a/plugin_III/game_III/CGameLogic.h b/plugin_III/game_III/CGameLogic.h index 46db4badb..1fdb4b035 100644 --- a/plugin_III/game_III/CGameLogic.h +++ b/plugin_III/game_III/CGameLogic.h @@ -19,5 +19,6 @@ class PLUGIN_API CGameLogic { SUPPORTED_10EN_11EN_STEAM static void SortOutStreamingAndMemory(CVector const &pos); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CGameLogic, 0x1); #include "meta/meta.CGameLogic.h" diff --git a/plugin_III/game_III/CGangInfo.h b/plugin_III/game_III/CGangInfo.h index 83e5be1c0..347967fe1 100644 --- a/plugin_III/game_III/CGangInfo.h +++ b/plugin_III/game_III/CGangInfo.h @@ -17,7 +17,10 @@ class PLUGIN_API CGangInfo { int m_nWeaponOne; //!< eWeaponType int m_nWeaponTwo; //!< eWeaponType }; - +VALIDATE_OFFSET(CGangInfo, m_nVehicleModel, 0x0); +VALIDATE_OFFSET(CGangInfo, m_nPedModelOverride, 0x4); +VALIDATE_OFFSET(CGangInfo, m_nWeaponOne, 0x8); +VALIDATE_OFFSET(CGangInfo, m_nWeaponTwo, 0xC); VALIDATE_SIZE(CGangInfo, 0x10); #include "meta/meta.CGangInfo.h" diff --git a/plugin_III/game_III/CGangs.h b/plugin_III/game_III/CGangs.h index f72073a8b..2b34f66ac 100644 --- a/plugin_III/game_III/CGangs.h +++ b/plugin_III/game_III/CGangs.h @@ -21,5 +21,6 @@ class PLUGIN_API CGangs { SUPPORTED_10EN_11EN_STEAM static void SetGangVehicleModel(short gang, int model); SUPPORTED_10EN_11EN_STEAM static void SetGangWeapons(short gang, int weaponOne, int weaponTwo); }; +VALIDATE_SIZE(CGangs, 0x1); #include "meta/meta.CGangs.h" diff --git a/plugin_III/game_III/CGarage.h b/plugin_III/game_III/CGarage.h index 557462435..6571d262a 100644 --- a/plugin_III/game_III/CGarage.h +++ b/plugin_III/game_III/CGarage.h @@ -86,6 +86,39 @@ class CGarage { void UpdateCrusherShake(float x, float y); void UpdateDoorsHeight(); }; +VALIDATE_OFFSET(CGarage, m_nType, 0x0); +VALIDATE_OFFSET(CGarage, m_nState, 0x1); +VALIDATE_OFFSET(CGarage, field_2, 0x2); +VALIDATE_OFFSET(CGarage, m_bLockup, 0x3); +VALIDATE_OFFSET(CGarage, m_bIsDeActivate, 0x4); +VALIDATE_OFFSET(CGarage, m_bHasResprayHappened, 0x5); +VALIDATE_OFFSET(CGarage, m_nVehicleModelIndex, 0x8); +VALIDATE_OFFSET(CGarage, m_pDoorOne, 0xC); +VALIDATE_OFFSET(CGarage, m_pDoorTwo, 0x10); +VALIDATE_OFFSET(CGarage, m_nIndexDoorOne, 0x14); +VALIDATE_OFFSET(CGarage, m_nIndexDoorTwo, 0x15); +VALIDATE_OFFSET(CGarage, field_16, 0x16); +VALIDATE_OFFSET(CGarage, field_17, 0x17); +VALIDATE_OFFSET(CGarage, field_18, 0x18); +VALIDATE_OFFSET(CGarage, m_bDoorSwingOpen, 0x19); +VALIDATE_OFFSET(CGarage, m_bCameraFollowsPlayer, 0x1A); +VALIDATE_OFFSET(CGarage, m_fLeftCoord, 0x1C); +VALIDATE_OFFSET(CGarage, m_fRightCoord, 0x20); +VALIDATE_OFFSET(CGarage, m_fFrontCoord, 0x24); +VALIDATE_OFFSET(CGarage, m_fBackCoord, 0x28); +VALIDATE_OFFSET(CGarage, m_fUpCoord, 0x2C); +VALIDATE_OFFSET(CGarage, m_fDownCoord, 0x30); +VALIDATE_OFFSET(CGarage, m_fDoorCurrentAngle, 0x34); +VALIDATE_OFFSET(CGarage, m_fDoorOpenAngle, 0x38); +VALIDATE_OFFSET(CGarage, m_vecDoorOnePosnXY, 0x3C); +VALIDATE_OFFSET(CGarage, m_vecDoorTwoPosnXY, 0x44); +VALIDATE_OFFSET(CGarage, m_fDoorOnePosnZ, 0x4C); +VALIDATE_OFFSET(CGarage, m_fDoorTwoPosnZ, 0x50); +VALIDATE_OFFSET(CGarage, m_nTimeToOpen, 0x54); +VALIDATE_OFFSET(CGarage, m_bHasThisCarBeenCollected, 0x58); +VALIDATE_OFFSET(CGarage, m_pTargetCar, 0x5C); +VALIDATE_OFFSET(CGarage, field_60, 0x60); +VALIDATE_OFFSET(CGarage, m_storedCar, 0x64); VALIDATE_SIZE(CGarage, 0x8C); extern unsigned int *gaCarsToCollectInCraigsGarages; diff --git a/plugin_III/game_III/CGarages.h b/plugin_III/game_III/CGarages.h index d66e8f7d1..8b7ec308c 100644 --- a/plugin_III/game_III/CGarages.h +++ b/plugin_III/game_III/CGarages.h @@ -13,27 +13,27 @@ class CAutomobile; class CGarages { public: // static variables - static CGarage *aGarages; // [32] max - static int&BankVansCollected; - static bool &BombsAreFree; - static bool &RespraysAreFree; - static int&CarsCollected; - static int&CarTypesCollected; - static int &CrushedCarId; - static unsigned int &LastTimeHelpMessage; - static int&MessageNumberInString; - static char *MessageIDString; - static int&MessageNumberInString2; + static CGarage* aGarages; // [32] max + static int& BankVansCollected; + static bool& BombsAreFree; + static bool& RespraysAreFree; + static int& CarsCollected; + static int& CarTypesCollected; + static int& CrushedCarId; + static unsigned int& LastTimeHelpMessage; + static int& MessageNumberInString; + static char* MessageIDString; + static int& MessageNumberInString2; static unsigned int &MessageStartTime; static unsigned int &MessageEndTime; static unsigned int &NumGarages; - static bool &PlayerInGarage; - static int&PoliceCarsCollected; - static unsigned int &GarageToBeTidied; - static CStoredCar *aCarsInSafeHouse1; - static CStoredCar *aCarsInSafeHouse2; - static CStoredCar *aCarsInSafeHouse3; - static bool &bCamShouldBeOutside; + static bool& PlayerInGarage; + static int& PoliceCarsCollected; + static unsigned int& GarageToBeTidied; + static CStoredCar* aCarsInSafeHouse1; + static CStoredCar* aCarsInSafeHouse2; + static CStoredCar* aCarsInSafeHouse3; + static bool& bCamShouldBeOutside; // static functions static void ActivateGarage(short index); @@ -75,5 +75,6 @@ class CGarages { static void TriggerMessage(char* text, short numberInString, unsigned short time, short numberInString2); static void Update(); }; +VALIDATE_SIZE(CGarages, 0x1); extern int *hGarages; diff --git a/plugin_III/game_III/CGeneral.h b/plugin_III/game_III/CGeneral.h index 775628361..d037400b4 100644 --- a/plugin_III/game_III/CGeneral.h +++ b/plugin_III/game_III/CGeneral.h @@ -47,5 +47,6 @@ class PLUGIN_API CGeneral { static int32_t GetRandomNumberInRange(int32_t a, int32_t b); static float GetRandomNumberInRange(float a, float b); }; +VALIDATE_SIZE(CGeneral, 0x1); #include "meta/meta.CGeneral.h" diff --git a/plugin_III/game_III/CGlass.h b/plugin_III/game_III/CGlass.h index 916a9067b..68b225482 100644 --- a/plugin_III/game_III/CGlass.h +++ b/plugin_III/game_III/CGlass.h @@ -32,5 +32,6 @@ class PLUGIN_API CGlass { SUPPORTED_10EN_11EN_STEAM static void WindowRespondsToExplosion(CEntity *entity, CVector point); SUPPORTED_10EN_11EN_STEAM static void WindowRespondsToSoftCollision(CEntity *entity, float amount); }; +VALIDATE_SIZE(CGlass, 0x1); #include "meta/meta.CGlass.h" diff --git a/plugin_III/game_III/CHeli.h b/plugin_III/game_III/CHeli.h index 49302c223..b897ffe4e 100644 --- a/plugin_III/game_III/CHeli.h +++ b/plugin_III/game_III/CHeli.h @@ -188,6 +188,31 @@ class PLUGIN_API CHeli : public CVehicle { SUPPORTED_10EN_11EN_STEAM static bool TestRocketCollision(CVector *coors); SUPPORTED_10EN_11EN_STEAM static void UpdateHelis(); }; +VALIDATE_OFFSET(CHeli, m_apModelNodes, 0x288); +VALIDATE_OFFSET(CHeli, m_nHeliStatus, 0x2A8); +VALIDATE_OFFSET(CHeli, m_fSearchLightX, 0x2AC); +VALIDATE_OFFSET(CHeli, m_fSearchLightY, 0x2B0); +VALIDATE_OFFSET(CHeli, m_nExplosionTimer, 0x2B4); +VALIDATE_OFFSET(CHeli, m_fRotation, 0x2B8); +VALIDATE_OFFSET(CHeli, m_fAngularSpeed, 0x2BC); +VALIDATE_OFFSET(CHeli, m_fTargetZ, 0x2C0); +VALIDATE_OFFSET(CHeli, m_fSearchLightIntensity, 0x2C4); +VALIDATE_OFFSET(CHeli, m_nHeliId, 0x2C8); +VALIDATE_OFFSET(CHeli, m_nHeliType, 0x2C9); +VALIDATE_OFFSET(CHeli, m_nPathState, 0x2CA); +VALIDATE_OFFSET(CHeli, m_nNumSwatPassengers, 0x2CB); +VALIDATE_OFFSET(CHeli, m_afSearchLightHistoryX, 0x2CC); +VALIDATE_OFFSET(CHeli, m_afSearchLightHistoryY, 0x2E4); +VALIDATE_OFFSET(CHeli, m_nSearchLightTimer, 0x2FC); +VALIDATE_OFFSET(CHeli, m_nShootTimer, 0x300); +VALIDATE_OFFSET(CHeli, m_nLastShotTime, 0x304); +VALIDATE_OFFSET(CHeli, m_nBulletDamage, 0x308); +VALIDATE_OFFSET(CHeli, m_fRotorRotation, 0x30C); +VALIDATE_OFFSET(CHeli, m_fHeliDustZ, 0x310); +VALIDATE_OFFSET(CHeli, m_nPoliceShoutTimer, 0x330); +VALIDATE_OFFSET(CHeli, m_fTargetOffset, 0x334); +VALIDATE_OFFSET(CHeli, m_bTestRight, 0x338); +VALIDATE_SIZE(CHeli, 0x33C); SUPPORTED_10EN_11EN_STEAM extern float(&CatalinaTargetX)[7]; // float CatalinaTargetX[7] SUPPORTED_10EN_11EN_STEAM extern float(&CatalinaTargetY)[7]; // float CatalinaTargetY[7] diff --git a/plugin_III/game_III/CHud.cpp b/plugin_III/game_III/CHud.cpp index c822730d6..9674d5366 100644 --- a/plugin_III/game_III/CHud.cpp +++ b/plugin_III/game_III/CHud.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CHud.h" diff --git a/plugin_III/game_III/CHud.h b/plugin_III/game_III/CHud.h index d605c6774..1b665f875 100644 --- a/plugin_III/game_III/CHud.h +++ b/plugin_III/game_III/CHud.h @@ -1,10 +1,10 @@ -#pragma once /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" #include "CSprite2d.h" @@ -82,6 +82,7 @@ class PLUGIN_API CHud { static void SetZoneName(wchar_t *name); static void Shutdown(); }; +VALIDATE_SIZE(CHud, 0x1); extern float *BigMessageInUse; extern float *BigMessageAlpha; diff --git a/plugin_III/game_III/CIniFile.h b/plugin_III/game_III/CIniFile.h index 537143869..c84dd816b 100644 --- a/plugin_III/game_III/CIniFile.h +++ b/plugin_III/game_III/CIniFile.h @@ -17,5 +17,6 @@ class PLUGIN_API CIniFile { SUPPORTED_10EN_11EN_STEAM static void LoadIniFile(); }; +VALIDATE_SIZE(CIniFile, 0x1); #include "meta/meta.CIniFile.h" diff --git a/plugin_III/game_III/CInstance.h b/plugin_III/game_III/CInstance.h index d72c48b39..fd3569615 100644 --- a/plugin_III/game_III/CInstance.h +++ b/plugin_III/game_III/CInstance.h @@ -20,6 +20,8 @@ class PLUGIN_API CInstance : public CPlaceable { SUPPORTED_10EN_11EN_STEAM void Shutdown(); }; +VALIDATE_OFFSET(CInstance, m_nModelIndex, 0x4C); +VALIDATE_SIZE(CInstance, 0x50); VTABLE_DESC(CInstance, 0x5FE068, 1); VALIDATE_SIZE(CInstance, 0x50); diff --git a/plugin_III/game_III/CKeyboardState.cpp b/plugin_III/game_III/CKeyboardState.cpp index b93cf4d75..fc10e2c28 100644 --- a/plugin_III/game_III/CKeyboardState.cpp +++ b/plugin_III/game_III/CKeyboardState.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CKeyboardState.h" diff --git a/plugin_III/game_III/CKeyboardState.h b/plugin_III/game_III/CKeyboardState.h index 8ba31ed05..600c52433 100644 --- a/plugin_III/game_III/CKeyboardState.h +++ b/plugin_III/game_III/CKeyboardState.h @@ -1,13 +1,10 @@ - - /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class CKeyboardState { @@ -62,5 +59,50 @@ class CKeyboardState { //funcs void Clear(); }; - +VALIDATE_OFFSET(CKeyboardState, FKeys, 0x0); +VALIDATE_OFFSET(CKeyboardState, standardKeys, 0x18); +VALIDATE_OFFSET(CKeyboardState, esc, 0x218); +VALIDATE_OFFSET(CKeyboardState, insert, 0x21A); +VALIDATE_OFFSET(CKeyboardState, del, 0x21C); +VALIDATE_OFFSET(CKeyboardState, home, 0x21E); +VALIDATE_OFFSET(CKeyboardState, end, 0x220); +VALIDATE_OFFSET(CKeyboardState, pgup, 0x222); +VALIDATE_OFFSET(CKeyboardState, pgdn, 0x224); +VALIDATE_OFFSET(CKeyboardState, up, 0x226); +VALIDATE_OFFSET(CKeyboardState, down, 0x228); +VALIDATE_OFFSET(CKeyboardState, left, 0x22A); +VALIDATE_OFFSET(CKeyboardState, right, 0x22C); +VALIDATE_OFFSET(CKeyboardState, scroll, 0x22E); +VALIDATE_OFFSET(CKeyboardState, pause, 0x230); +VALIDATE_OFFSET(CKeyboardState, numlock, 0x232); +VALIDATE_OFFSET(CKeyboardState, div, 0x234); +VALIDATE_OFFSET(CKeyboardState, mul, 0x236); +VALIDATE_OFFSET(CKeyboardState, sub, 0x238); +VALIDATE_OFFSET(CKeyboardState, add, 0x23A); +VALIDATE_OFFSET(CKeyboardState, enter, 0x23C); +VALIDATE_OFFSET(CKeyboardState, decimal, 0x23E); +VALIDATE_OFFSET(CKeyboardState, num1, 0x240); +VALIDATE_OFFSET(CKeyboardState, num2, 0x242); +VALIDATE_OFFSET(CKeyboardState, num3, 0x244); +VALIDATE_OFFSET(CKeyboardState, num4, 0x246); +VALIDATE_OFFSET(CKeyboardState, num5, 0x248); +VALIDATE_OFFSET(CKeyboardState, num6, 0x24A); +VALIDATE_OFFSET(CKeyboardState, num7, 0x24C); +VALIDATE_OFFSET(CKeyboardState, num8, 0x24E); +VALIDATE_OFFSET(CKeyboardState, num9, 0x250); +VALIDATE_OFFSET(CKeyboardState, num0, 0x252); +VALIDATE_OFFSET(CKeyboardState, back, 0x254); +VALIDATE_OFFSET(CKeyboardState, tab, 0x256); +VALIDATE_OFFSET(CKeyboardState, capslock, 0x258); +VALIDATE_OFFSET(CKeyboardState, extenter, 0x25A); +VALIDATE_OFFSET(CKeyboardState, lshift, 0x25C); +VALIDATE_OFFSET(CKeyboardState, rshift, 0x25E); +VALIDATE_OFFSET(CKeyboardState, shift, 0x260); +VALIDATE_OFFSET(CKeyboardState, lctrl, 0x262); +VALIDATE_OFFSET(CKeyboardState, rctrl, 0x264); +VALIDATE_OFFSET(CKeyboardState, lmenu, 0x266); +VALIDATE_OFFSET(CKeyboardState, rmenu, 0x268); +VALIDATE_OFFSET(CKeyboardState, lwin, 0x26A); +VALIDATE_OFFSET(CKeyboardState, rwin, 0x26C); +VALIDATE_OFFSET(CKeyboardState, apps, 0x26E); VALIDATE_SIZE(CKeyboardState, 0x270); \ No newline at end of file diff --git a/plugin_III/game_III/CLines.h b/plugin_III/game_III/CLines.h index bbaebd2c6..55bff82a5 100644 --- a/plugin_III/game_III/CLines.h +++ b/plugin_III/game_III/CLines.h @@ -12,5 +12,6 @@ class PLUGIN_API CLines { public: SUPPORTED_10EN_11EN_STEAM static void RenderLineWithClipping(float x1, float y1, float z1, float x2, float y2, float z2, unsigned int color1, unsigned int color2); }; +VALIDATE_SIZE(CLines, 0x1); #include "meta/meta.CLines.h" diff --git a/plugin_III/game_III/CMBlur.h b/plugin_III/game_III/CMBlur.h index 012e7aa9d..11c427cc9 100644 --- a/plugin_III/game_III/CMBlur.h +++ b/plugin_III/game_III/CMBlur.h @@ -35,6 +35,7 @@ class PLUGIN_API CMBlur { SUPPORTED_10EN_11EN_STEAM static void MotionBlurRender(RwCamera *cam, unsigned int red, unsigned int green, unsigned int blue, unsigned int blur, int type, unsigned int blurAlpha); SUPPORTED_10EN_11EN_STEAM static void OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int type, int blurAlpha); }; +VALIDATE_SIZE(CMBlur, 0x1); //! RwImVertexIndex Index[6] = { 0, 1, 2, 0, 2, 3 }; SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&Index)[6]; // RwImVertexIndex Index[6] diff --git a/plugin_III/game_III/CMatrix.h b/plugin_III/game_III/CMatrix.h index e14f9b8ab..82c3fef77 100644 --- a/plugin_III/game_III/CMatrix.h +++ b/plugin_III/game_III/CMatrix.h @@ -127,7 +127,16 @@ class PLUGIN_API CMatrix { RwMatrixUpdate(matrix); } }; - +VALIDATE_OFFSET(CMatrix, right, 0x0); +VALIDATE_OFFSET(CMatrix, flags, 0xC); +VALIDATE_OFFSET(CMatrix, up, 0x10); +VALIDATE_OFFSET(CMatrix, pad1, 0x1C); +VALIDATE_OFFSET(CMatrix, at, 0x20); +VALIDATE_OFFSET(CMatrix, pad2, 0x2C); +VALIDATE_OFFSET(CMatrix, pos, 0x30); +VALIDATE_OFFSET(CMatrix, pad3, 0x3C); +VALIDATE_OFFSET(CMatrix, m_pAttachMatrix, 0x40); +VALIDATE_OFFSET(CMatrix, m_bOwnsAttachedMatrix, 0x44); VALIDATE_SIZE(CMatrix, 0x48); inline CVector operator*(const CMatrix &mat, const CVector &vec) { diff --git a/plugin_III/game_III/CMenuManager.cpp b/plugin_III/game_III/CMenuManager.cpp index 5984e8baa..6a2a2140c 100644 --- a/plugin_III/game_III/CMenuManager.cpp +++ b/plugin_III/game_III/CMenuManager.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CMenuManager.h" diff --git a/plugin_III/game_III/CMenuManager.h b/plugin_III/game_III/CMenuManager.h index 24afd27ca..a2236aca0 100644 --- a/plugin_III/game_III/CMenuManager.h +++ b/plugin_III/game_III/CMenuManager.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -258,6 +258,14 @@ struct PLUGIN_API CMenuScreen { int m_nTargetMenu; } m_aEntries[NUM_ENTRIES]; }; +VALIDATE_OFFSET(CMenuScreen, m_ScreenName, 0x0); +VALIDATE_OFFSET(CMenuScreen, unk, 0x8); +VALIDATE_OFFSET(CMenuScreen, m_nPreviousPage, 0xC); +VALIDATE_OFFSET(CMenuScreen, m_nPreviousGamePage, 0x10); +VALIDATE_OFFSET(CMenuScreen, m_nParentEntry, 0x14); +VALIDATE_OFFSET(CMenuScreen, m_nParentGameEntry, 0x18); +VALIDATE_OFFSET(CMenuScreen, m_aEntries, 0x1C); +VALIDATE_SIZE(CMenuScreen, 0x184); class PLUGIN_API CMenuManager { public: @@ -393,7 +401,66 @@ class PLUGIN_API CMenuManager { void UnloadTextures(); void WaitForUserCD(); }; - +VALIDATE_OFFSET(CMenuManager, m_nPrefsVideoMode, 0x0); +VALIDATE_OFFSET(CMenuManager, m_nDisplayVideoMode, 0x4); +VALIDATE_OFFSET(CMenuManager, m_nPrefsAudio3DProviderIndex, 0x8); +VALIDATE_OFFSET(CMenuManager, m_bKeyChangeNotProcessed, 0x9); +VALIDATE_OFFSET(CMenuManager, m_aSkinName, 0xA); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextMsgId, 0x10C); +VALIDATE_OFFSET(CMenuManager, m_bLanguageLoaded, 0x110); +VALIDATE_OFFSET(CMenuManager, m_bMenuActive, 0x111); +VALIDATE_OFFSET(CMenuManager, m_bMenuStateChanged, 0x112); +VALIDATE_OFFSET(CMenuManager, m_bWaitingForNewKeyBind, 0x113); +VALIDATE_OFFSET(CMenuManager, m_bWantToRestart, 0x114); +VALIDATE_OFFSET(CMenuManager, m_bFirstTime, 0x115); +VALIDATE_OFFSET(CMenuManager, m_bGameNotLoaded, 0x116); +VALIDATE_OFFSET(CMenuManager, m_nMousePosX, 0x118); +VALIDATE_OFFSET(CMenuManager, m_nMousePosY, 0x11C); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosX, 0x120); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosY, 0x124); +VALIDATE_OFFSET(CMenuManager, m_bShowMouse, 0x128); +VALIDATE_OFFSET(CMenuManager, m_sSkin, 0x12C); +VALIDATE_OFFSET(CMenuManager, m_pSelectedSkin, 0x434); +VALIDATE_OFFSET(CMenuManager, m_nFirstVisibleRowOnList, 0x438); +VALIDATE_OFFSET(CMenuManager, m_nScrollbarTopMargin, 0x43C); +VALIDATE_OFFSET(CMenuManager, m_nCurrentExSize, 0x440); +VALIDATE_OFFSET(CMenuManager, m_nSkinsTotal, 0x444); +VALIDATE_OFFSET(CMenuManager, _unk0, 0x448); +VALIDATE_OFFSET(CMenuManager, m_nCurrentExOption, 0x44C); +VALIDATE_OFFSET(CMenuManager, m_bSkinsEnumerated, 0x450); +VALIDATE_OFFSET(CMenuManager, m_bQuitGameNoCD, 0x451); +VALIDATE_OFFSET(CMenuManager, m_bRenderGameInMenu, 0x452); +VALIDATE_OFFSET(CMenuManager, m_bSaveMenuActive, 0x453); +VALIDATE_OFFSET(CMenuManager, m_bWantToLoad, 0x454); +VALIDATE_OFFSET(CMenuManager, field_455, 0x455); +VALIDATE_OFFSET(CMenuManager, field_456, 0x456); +VALIDATE_OFFSET(CMenuManager, m_bSpritesLoaded, 0x457); +VALIDATE_OFFSET(CMenuManager, m_aFrontEndSprites, 0x458); +VALIDATE_OFFSET(CMenuManager, m_aMenuSprites, 0x4C8); +VALIDATE_OFFSET(CMenuManager, field_518, 0x518); +VALIDATE_OFFSET(CMenuManager, m_nMenuFadeAlpha, 0x51C); +VALIDATE_OFFSET(CMenuManager, field_520, 0x520); +VALIDATE_OFFSET(CMenuManager, field_521, 0x521); +VALIDATE_OFFSET(CMenuManager, field_522, 0x522); +VALIDATE_OFFSET(CMenuManager, field_523, 0x523); +VALIDATE_OFFSET(CMenuManager, field_524, 0x524); +VALIDATE_OFFSET(CMenuManager, m_nCurrentControlAction, 0x528); +VALIDATE_OFFSET(CMenuManager, _unk1, 0x52C); +VALIDATE_OFFSET(CMenuManager, field_530, 0x530); +VALIDATE_OFFSET(CMenuManager, field_534, 0x534); +VALIDATE_OFFSET(CMenuManager, field_535, 0x535); +VALIDATE_OFFSET(CMenuManager, m_nCurrentExLayer, 0x536); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextAlpha, 0x538); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosX, 0x53C); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosY, 0x540); +VALIDATE_OFFSET(CMenuManager, m_nHoverOption, 0x544); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuPage, 0x548); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuEntry, 0x54C); +VALIDATE_OFFSET(CMenuManager, m_nPreviousMenuEntry, 0x550); +VALIDATE_OFFSET(CMenuManager, m_nPreviousMenuPage, 0x554); +VALIDATE_OFFSET(CMenuManager, field_558, 0x558); +VALIDATE_OFFSET(CMenuManager, m_nCurrentSaveSlot, 0x55C); +VALIDATE_OFFSET(CMenuManager, m_nScreenChangeDelayTimer, 0x560); VALIDATE_SIZE(CMenuManager, 0x564); extern CMenuManager &FrontEndMenuManager; diff --git a/plugin_III/game_III/CMessages.h b/plugin_III/game_III/CMessages.h index 4602fb594..30b210165 100644 --- a/plugin_III/game_III/CMessages.h +++ b/plugin_III/game_III/CMessages.h @@ -19,14 +19,20 @@ struct tMessage { int m_nNumber[6]; wchar_t *m_pString; }; - +VALIDATE_OFFSET(tMessage, m_pText, 0x0); +VALIDATE_OFFSET(tMessage, m_nFlag, 0x4); +VALIDATE_OFFSET(tMessage, m_nTime, 0x8); +VALIDATE_OFFSET(tMessage, m_nStartTime, 0xC); +VALIDATE_OFFSET(tMessage, m_nNumber, 0x10); +VALIDATE_OFFSET(tMessage, m_pString, 0x28); VALIDATE_SIZE(tMessage, 0x2C); struct tBigMessage { tMessage m_Current; tMessage m_Stack[3]; }; - +VALIDATE_OFFSET(tBigMessage, m_Current, 0x0); +VALIDATE_OFFSET(tBigMessage, m_Stack, 0x2C); VALIDATE_SIZE(tBigMessage, 0xB0); struct tPreviousBrief { @@ -34,7 +40,9 @@ struct tPreviousBrief { int m_nNumber[6]; wchar_t *m_pString; }; - +VALIDATE_OFFSET(tPreviousBrief, m_pText, 0x0); +VALIDATE_OFFSET(tPreviousBrief, m_nNumber, 0x4); +VALIDATE_OFFSET(tPreviousBrief, m_pString, 0x1C); VALIDATE_SIZE(tPreviousBrief, 0x20); class CMessages { @@ -90,4 +98,5 @@ class CMessages { static void AddMessageJumpQWithString(const char* text, unsigned int time, unsigned short flag, const char* str); static void ClearThisPrint(const char* text); static void ClearThisBigPrint(const char* text); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CMessages, 0x1); \ No newline at end of file diff --git a/plugin_III/game_III/CMissionCleanup.h b/plugin_III/game_III/CMissionCleanup.h index 0734e4ce8..8d7881f06 100644 --- a/plugin_III/game_III/CMissionCleanup.h +++ b/plugin_III/game_III/CMissionCleanup.h @@ -19,6 +19,9 @@ struct PLUGIN_API tCleanupEntity { unsigned char m_nType; //!< see eCleanupEntityType int m_nEntityIndex; }; +VALIDATE_OFFSET(tCleanupEntity, m_nType, 0x0); +VALIDATE_OFFSET(tCleanupEntity, m_nEntityIndex, 0x4); +VALIDATE_SIZE(tCleanupEntity, 0x8); class PLUGIN_API CMissionCleanup { PLUGIN_NO_DEFAULT_CONSTRUCTION(CMissionCleanup) @@ -33,8 +36,8 @@ class PLUGIN_API CMissionCleanup { SUPPORTED_10EN_11EN_STEAM void Process(); SUPPORTED_10EN_11EN_STEAM void RemoveEntityFromList(int id, unsigned char type); }; - -VALIDATE_SIZE(tCleanupEntity, 0x8); +VALIDATE_OFFSET(CMissionCleanup, m_sEntities, 0x0); +VALIDATE_OFFSET(CMissionCleanup, m_nCount, 0x190); VALIDATE_SIZE(CMissionCleanup, 0x194); #include "meta/meta.CMissionCleanup.h" diff --git a/plugin_III/game_III/CMloModelInfo.h b/plugin_III/game_III/CMloModelInfo.h index 47a1edfca..eb9c8ed9a 100644 --- a/plugin_III/game_III/CMloModelInfo.h +++ b/plugin_III/game_III/CMloModelInfo.h @@ -40,6 +40,10 @@ class PLUGIN_API CMloModelInfo : public CClumpModelInfo { SUPPORTED_10EN_11EN_STEAM void ConstructClump(); }; +VALIDATE_OFFSET(CMloModelInfo, m_fDrawDistance, 0x34); +VALIDATE_OFFSET(CMloModelInfo, m_nFirstInstance, 0x38); +VALIDATE_OFFSET(CMloModelInfo, m_nLastInstance, 0x3C); +VALIDATE_SIZE(CMloModelInfo, 0x40); VTABLE_DESC(CMloModelInfo, 0x5FDF74, 7); VALIDATE_SIZE(CMloModelInfo, 0x40); diff --git a/plugin_III/game_III/CModelInfo.h b/plugin_III/game_III/CModelInfo.h index 55e2212cb..06fbc7960 100644 --- a/plugin_III/game_III/CModelInfo.h +++ b/plugin_III/game_III/CModelInfo.h @@ -77,5 +77,6 @@ class PLUGIN_API CModelInfo { static bool IsTrailerModel(int modelId); static bool IsTrainModel(int modelId); }; +VALIDATE_SIZE(CModelInfo, 0x1); #include "meta/meta.CModelInfo.h" diff --git a/plugin_III/game_III/CMoneyMessage.h b/plugin_III/game_III/CMoneyMessage.h index 2bfc2eddf..0651b8564 100644 --- a/plugin_III/game_III/CMoneyMessage.h +++ b/plugin_III/game_III/CMoneyMessage.h @@ -23,7 +23,12 @@ class PLUGIN_API CMoneyMessage { SUPPORTED_10EN_11EN_STEAM void Render(); }; - +VALIDATE_OFFSET(CMoneyMessage, m_nTimeRegistered, 0x0); +VALIDATE_OFFSET(CMoneyMessage, m_vecPos, 0x4); +VALIDATE_OFFSET(CMoneyMessage, m_aText, 0x10); +VALIDATE_OFFSET(CMoneyMessage, m_Color, 0x30); +VALIDATE_OFFSET(CMoneyMessage, m_fSize, 0x34); +VALIDATE_OFFSET(CMoneyMessage, m_fOpacity, 0x38); VALIDATE_SIZE(CMoneyMessage, 0x3C); #include "meta/meta.CMoneyMessage.h" diff --git a/plugin_III/game_III/CMoneyMessages.h b/plugin_III/game_III/CMoneyMessages.h index e1c998c8e..c7bab9ac4 100644 --- a/plugin_III/game_III/CMoneyMessages.h +++ b/plugin_III/game_III/CMoneyMessages.h @@ -16,5 +16,6 @@ class PLUGIN_API CMoneyMessages { SUPPORTED_10EN_11EN_STEAM static void Init(); SUPPORTED_10EN_11EN_STEAM static void Render(); }; +VALIDATE_SIZE(CMoneyMessages, 0x1); #include "meta/meta.CMoneyMessages.h" diff --git a/plugin_III/game_III/CMotionBlurStreaks.h b/plugin_III/game_III/CMotionBlurStreaks.h index 5656b7835..975350e8d 100644 --- a/plugin_III/game_III/CMotionBlurStreaks.h +++ b/plugin_III/game_III/CMotionBlurStreaks.h @@ -19,5 +19,6 @@ class PLUGIN_API CMotionBlurStreaks { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CMotionBlurStreaks, 0x1); #include "meta/meta.CMotionBlurStreaks.h" diff --git a/plugin_III/game_III/CMouseControllerState.h b/plugin_III/game_III/CMouseControllerState.h index bfcecd0c6..3dfd3bd00 100644 --- a/plugin_III/game_III/CMouseControllerState.h +++ b/plugin_III/game_III/CMouseControllerState.h @@ -24,7 +24,15 @@ class PLUGIN_API CMouseControllerState { SUPPORTED_10EN_11EN_STEAM void Clear(); }; - +VALIDATE_OFFSET(CMouseControllerState, lmb, 0x0); +VALIDATE_OFFSET(CMouseControllerState, rmb, 0x1); +VALIDATE_OFFSET(CMouseControllerState, mmb, 0x2); +VALIDATE_OFFSET(CMouseControllerState, wheelUp, 0x3); +VALIDATE_OFFSET(CMouseControllerState, wheelDown, 0x4); +VALIDATE_OFFSET(CMouseControllerState, bmx, 0x5); +VALIDATE_OFFSET(CMouseControllerState, bmx2, 0x6); +VALIDATE_OFFSET(CMouseControllerState, x, 0x8); +VALIDATE_OFFSET(CMouseControllerState, y, 0xC); VALIDATE_SIZE(CMouseControllerState, 0x10); #include "meta/meta.CMouseControllerState.h" diff --git a/plugin_III/game_III/CMousePointerStateHelper.h b/plugin_III/game_III/CMousePointerStateHelper.h index b75a0dd84..bd602fc32 100644 --- a/plugin_III/game_III/CMousePointerStateHelper.h +++ b/plugin_III/game_III/CMousePointerStateHelper.h @@ -17,6 +17,9 @@ class PLUGIN_API CMousePointerStateHelper { SUPPORTED_10EN_11EN_STEAM CMouseControllerState GetMouseSetUp(); }; +VALIDATE_OFFSET(CMousePointerStateHelper, m_bInvertHorizontally, 0x0); +VALIDATE_OFFSET(CMousePointerStateHelper, m_bInvertVertically, 0x1); +VALIDATE_SIZE(CMousePointerStateHelper, 0x2); #pragma pack(pop) SUPPORTED_10EN_11EN_STEAM extern CMousePointerStateHelper &MousePointerStateHelper; diff --git a/plugin_III/game_III/CMovie.h b/plugin_III/game_III/CMovie.h index b11de8fc3..f397cf653 100644 --- a/plugin_III/game_III/CMovie.h +++ b/plugin_III/game_III/CMovie.h @@ -21,7 +21,13 @@ class PLUGIN_API CMovie { short m_nVehicleId; short m_nModelIndex; }; - +VALIDATE_OFFSET(CMovie, m_nCommandId, 0x0); +VALIDATE_OFFSET(CMovie, m_vecCurrentPosition, 0x4); +VALIDATE_OFFSET(CMovie, m_vecCamera, 0x10); +VALIDATE_OFFSET(CMovie, m_nActorId, 0x1C); +VALIDATE_OFFSET(CMovie, m_nActor2Id, 0x1E); +VALIDATE_OFFSET(CMovie, m_nVehicleId, 0x20); +VALIDATE_OFFSET(CMovie, m_nModelIndex, 0x22); VALIDATE_SIZE(CMovie, 0x24); #include "meta/meta.CMovie.h" diff --git a/plugin_III/game_III/CMovingThing.h b/plugin_III/game_III/CMovingThing.h index 966eaf1cd..7ed4a02c0 100644 --- a/plugin_III/game_III/CMovingThing.h +++ b/plugin_III/game_III/CMovingThing.h @@ -24,7 +24,12 @@ class PLUGIN_API CMovingThing { SUPPORTED_10EN_11EN_STEAM void RemoveFromList(); SUPPORTED_10EN_11EN_STEAM void Update(); }; - +VALIDATE_OFFSET(CMovingThing, m_pNext, 0x0); +VALIDATE_OFFSET(CMovingThing, m_pPrev, 0x4); +VALIDATE_OFFSET(CMovingThing, m_nType, 0x8); +VALIDATE_OFFSET(CMovingThing, m_nHidden, 0xA); +VALIDATE_OFFSET(CMovingThing, m_vecPosition, 0xC); +VALIDATE_OFFSET(CMovingThing, m_pEntity, 0x18); VALIDATE_SIZE(CMovingThing, 0x1C); #include "meta/meta.CMovingThing.h" diff --git a/plugin_III/game_III/CMovingThings.h b/plugin_III/game_III/CMovingThings.h index 280d5f9ec..1b045d548 100644 --- a/plugin_III/game_III/CMovingThings.h +++ b/plugin_III/game_III/CMovingThings.h @@ -23,6 +23,7 @@ class PLUGIN_API CMovingThings { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CMovingThings, 0x1); SUPPORTED_10EN_11EN_STEAM extern CScrollBar(&aScrollBars)[11]; // CScrollBar aScrollBars[11] SUPPORTED_10EN_11EN_STEAM extern CTowerClock(&aTowerClocks)[2]; // CTowerClock aTowerClocks[2] diff --git a/plugin_III/game_III/CNodeAddress.h b/plugin_III/game_III/CNodeAddress.h index 3ad6db8df..92228ce4c 100644 --- a/plugin_III/game_III/CNodeAddress.h +++ b/plugin_III/game_III/CNodeAddress.h @@ -16,5 +16,6 @@ class PLUGIN_API CNodeAddress CNodeAddress() : m_wAreaId(-1), m_wNodeId(-1) {} }; - +VALIDATE_OFFSET(CNodeAddress, m_wAreaId, 0x0); +VALIDATE_OFFSET(CNodeAddress, m_wNodeId, 0x2); VALIDATE_SIZE(CNodeAddress, 0x4); diff --git a/plugin_III/game_III/CObject.h b/plugin_III/game_III/CObject.h index 64056c959..bc026e828 100644 --- a/plugin_III/game_III/CObject.h +++ b/plugin_III/game_III/CObject.h @@ -105,6 +105,22 @@ class PLUGIN_API CObject : public CPhysical { SUPPORTED_10EN_11EN_STEAM static void DeleteAllTempObjects(); SUPPORTED_10EN_11EN_STEAM static void DeleteAllTempObjectsInArea(CVector point, float radius); }; +VALIDATE_OFFSET(CObject, m_mObjectCoords, 0x128); +VALIDATE_OFFSET(CObject, m_fUprootLimit, 0x170); +VALIDATE_OFFSET(CObject, m_nObjectCreatedBy, 0x174); +VALIDATE_OFFSET(CObject, m_nObjectFlags, 0x175); +VALIDATE_OFFSET(CObject, m_nBonusValue, 0x176); +VALIDATE_OFFSET(CObject, m_fCollisionDamageMultiplier, 0x178); +VALIDATE_OFFSET(CObject, m_nCollisionDamageEffect, 0x17C); +VALIDATE_OFFSET(CObject, m_nSpecialCollisionResponseCases, 0x17D); +VALIDATE_OFFSET(CObject, m_bCameraToAvoidThisObject, 0x17E); +VALIDATE_OFFSET(CObject, field_180, 0x180); +VALIDATE_OFFSET(CObject, m_nEndOfLifeTime, 0x184); +VALIDATE_OFFSET(CObject, m_nRefModelIndex, 0x188); +VALIDATE_OFFSET(CObject, m_pCurSurface, 0x18C); +VALIDATE_OFFSET(CObject, m_pCollidingEntity, 0x190); +VALIDATE_OFFSET(CObject, m_nColorId, 0x194); +VALIDATE_SIZE(CObject, 0x198); VTABLE_DESC(CObject, 0x5F7DD4, 18); VALIDATE_SIZE(CObject, 0x198); diff --git a/plugin_III/game_III/CObjectData.h b/plugin_III/game_III/CObjectData.h index a8178bc67..39d22aa2a 100644 --- a/plugin_III/game_III/CObjectData.h +++ b/plugin_III/game_III/CObjectData.h @@ -21,7 +21,16 @@ struct PLUGIN_API CObjectInfo { unsigned char m_nSpecialCollisionResponseCases; bool m_bCameraToAvoidThisObject; }; - +VALIDATE_OFFSET(CObjectInfo, m_fMass, 0x0); +VALIDATE_OFFSET(CObjectInfo, m_fTurnMass, 0x4); +VALIDATE_OFFSET(CObjectInfo, m_fAirResistance, 0x8); +VALIDATE_OFFSET(CObjectInfo, m_fElasticity, 0xC); +VALIDATE_OFFSET(CObjectInfo, m_fBuoyancy, 0x10); +VALIDATE_OFFSET(CObjectInfo, m_fUprootLimit, 0x14); +VALIDATE_OFFSET(CObjectInfo, m_fCollisionDamageMultiplier, 0x18); +VALIDATE_OFFSET(CObjectInfo, m_nCollisionDamageEffect, 0x1C); +VALIDATE_OFFSET(CObjectInfo, m_nSpecialCollisionResponseCases, 0x1D); +VALIDATE_OFFSET(CObjectInfo, m_bCameraToAvoidThisObject, 0x1E); VALIDATE_SIZE(CObjectInfo, 0x20); class PLUGIN_API CObjectData { @@ -31,5 +40,6 @@ class PLUGIN_API CObjectData { SUPPORTED_10EN_11EN_STEAM static void Initialise(char const *fileName); SUPPORTED_10EN_11EN_STEAM static void SetObjectData(int modelIndex, CObject &object); }; +VALIDATE_SIZE(CObjectData, 0x1); #include "meta/meta.CObjectData.h" diff --git a/plugin_III/game_III/COneSheet.h b/plugin_III/game_III/COneSheet.h index 5242e47f4..50c92d429 100644 --- a/plugin_III/game_III/COneSheet.h +++ b/plugin_III/game_III/COneSheet.h @@ -30,7 +30,21 @@ class PLUGIN_API COneSheet { SUPPORTED_10EN_11EN_STEAM void AddToList(COneSheet *list); SUPPORTED_10EN_11EN_STEAM void RemoveFromList(); }; - +VALIDATE_OFFSET(COneSheet, m_vecBasePos, 0x0); +VALIDATE_OFFSET(COneSheet, m_vecAnimatedPos, 0xC); +VALIDATE_OFFSET(COneSheet, m_fTargetZ, 0x18); +VALIDATE_OFFSET(COneSheet, m_nState, 0x1C); +VALIDATE_OFFSET(COneSheet, m_nAnimationType, 0x1D); +VALIDATE_OFFSET(COneSheet, m_nMoveStart, 0x20); +VALIDATE_OFFSET(COneSheet, m_nMoveDuration, 0x24); +VALIDATE_OFFSET(COneSheet, m_fAnimHeight, 0x28); +VALIDATE_OFFSET(COneSheet, m_nDistX, 0x2C); +VALIDATE_OFFSET(COneSheet, m_nDistY, 0x30); +VALIDATE_OFFSET(COneSheet, m_fAngle, 0x34); +VALIDATE_OFFSET(COneSheet, m_bIsVisible, 0x38); +VALIDATE_OFFSET(COneSheet, m_bTargetIsVisible, 0x39); +VALIDATE_OFFSET(COneSheet, m_pNext, 0x3C); +VALIDATE_OFFSET(COneSheet, m_pPrev, 0x40); VALIDATE_SIZE(COneSheet, 0x44); #include "meta/meta.COneSheet.h" diff --git a/plugin_III/game_III/COnscreenTimer.h b/plugin_III/game_III/COnscreenTimer.h index 65177e211..99d1b55ee 100644 --- a/plugin_III/game_III/COnscreenTimer.h +++ b/plugin_III/game_III/COnscreenTimer.h @@ -23,7 +23,9 @@ class PLUGIN_API COnscreenTimer { SUPPORTED_10EN_11EN_STEAM void Process(); SUPPORTED_10EN_11EN_STEAM void ProcessForDisplay(); }; - +VALIDATE_OFFSET(COnscreenTimer, m_sEntries, 0x0); +VALIDATE_OFFSET(COnscreenTimer, m_bDisplay, 0x74); +VALIDATE_OFFSET(COnscreenTimer, m_bDisabled, 0x75); VALIDATE_SIZE(COnscreenTimer, 0x78); #include "meta/meta.COnscreenTimer.h" diff --git a/plugin_III/game_III/COnscreenTimerEntry.h b/plugin_III/game_III/COnscreenTimerEntry.h index 6ad7320ca..92a60be0e 100644 --- a/plugin_III/game_III/COnscreenTimerEntry.h +++ b/plugin_III/game_III/COnscreenTimerEntry.h @@ -25,7 +25,15 @@ class PLUGIN_API COnscreenTimerEntry { SUPPORTED_10EN_11EN_STEAM void ProcessForDisplayClock(); SUPPORTED_10EN_11EN_STEAM void ProcessForDisplayCounter(); }; - +VALIDATE_OFFSET(COnscreenTimerEntry, m_nTimerOffset, 0x0); +VALIDATE_OFFSET(COnscreenTimerEntry, m_nCounterOffset, 0x4); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szTimerTextKey, 0x8); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szCounterTextKey, 0x12); +VALIDATE_OFFSET(COnscreenTimerEntry, m_nType, 0x1C); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szCounterDisplayedText, 0x1E); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szTimerDisplayedText, 0x48); +VALIDATE_OFFSET(COnscreenTimerEntry, m_bTimerProcessed, 0x72); +VALIDATE_OFFSET(COnscreenTimerEntry, m_bCounterProcessed, 0x73); VALIDATE_SIZE(COnscreenTimerEntry, 0x74); #include "meta/meta.COnscreenTimerEntry.h" diff --git a/plugin_III/game_III/CPacManPickup.h b/plugin_III/game_III/CPacManPickup.h index fda357521..ab7de6a0c 100644 --- a/plugin_III/game_III/CPacManPickup.h +++ b/plugin_III/game_III/CPacManPickup.h @@ -25,7 +25,9 @@ class PLUGIN_API CPacManPickup { SUPPORTED_10EN_11EN_STEAM void Update(); }; - +VALIDATE_OFFSET(CPacManPickup, m_vecPos, 0x0); +VALIDATE_OFFSET(CPacManPickup, m_pObject, 0xC); +VALIDATE_OFFSET(CPacManPickup, m_nType, 0x10); VALIDATE_SIZE(CPacManPickup, 0x14); #include "meta/meta.CPacManPickup.h" diff --git a/plugin_III/game_III/CPacManPickups.h b/plugin_III/game_III/CPacManPickups.h index ec4e61302..43b3d83d2 100644 --- a/plugin_III/game_III/CPacManPickups.h +++ b/plugin_III/game_III/CPacManPickups.h @@ -32,6 +32,7 @@ class PLUGIN_API CPacManPickups { SUPPORTED_10EN_11EN_STEAM static void StartPacManScramble(CVector pos, float scrambleMult, short count); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CPacManPickups, 0x1); SUPPORTED_10EN_11EN_STEAM extern CVector(&aRacePoints1)[107]; // CVector aRacePoints1[107] SUPPORTED_10EN_11EN_STEAM extern short &ThingsToCollect; diff --git a/plugin_III/game_III/CPad.cpp b/plugin_III/game_III/CPad.cpp index 23274dcba..304312736 100644 --- a/plugin_III/game_III/CPad.cpp +++ b/plugin_III/game_III/CPad.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPad.h" diff --git a/plugin_III/game_III/CPad.h b/plugin_III/game_III/CPad.h index b312afd90..262d632a3 100644 --- a/plugin_III/game_III/CPad.h +++ b/plugin_III/game_III/CPad.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CMouseControllerState.h" #include "CKeyboardState.h" @@ -125,6 +124,24 @@ class CPad { bool WeaponJustDown(); ~CPad(); }; +VALIDATE_OFFSET(CPad, NewState, 0x0); +VALIDATE_OFFSET(CPad, OldState, 0x2A); +VALIDATE_OFFSET(CPad, PCTempKeyState, 0x54); +VALIDATE_OFFSET(CPad, PCTempJoyState, 0x7E); +VALIDATE_OFFSET(CPad, PCTempMouseState, 0xA8); +VALIDATE_OFFSET(CPad, Phase, 0xD2); +VALIDATE_OFFSET(CPad, Mode, 0xD4); +VALIDATE_OFFSET(CPad, ShakeDur, 0xD6); +VALIDATE_OFFSET(CPad, ShakeFreq, 0xD8); +VALIDATE_OFFSET(CPad, bHornHistory, 0xD9); +VALIDATE_OFFSET(CPad, iCurrHornHistory, 0xDE); +VALIDATE_OFFSET(CPad, DisablePlayerControls, 0xDF); +VALIDATE_OFFSET(CPad, bApplyBrakes, 0xE0); +VALIDATE_OFFSET(CPad, CheatString, 0xE1); +VALIDATE_OFFSET(CPad, LastTimeTouched, 0xF0); +VALIDATE_OFFSET(CPad, AverageWeapon, 0xF4); +VALIDATE_OFFSET(CPad, AverageEntries, 0xF8); +VALIDATE_SIZE(CPad, 0xFC); extern CPad* Pads; // [2] diff --git a/plugin_III/game_III/CPager.h b/plugin_III/game_III/CPager.h index 790eead01..df4157aec 100644 --- a/plugin_III/game_III/CPager.h +++ b/plugin_III/game_III/CPager.h @@ -21,7 +21,14 @@ struct PagerMessage { public: int m_nNumber[6]; }; - +VALIDATE_OFFSET(PagerMessage, m_pText, 0x0); +VALIDATE_OFFSET(PagerMessage, m_nSpeedMs, 0x4); +VALIDATE_OFFSET(PagerMessage, m_nCurrentPosition, 0x6); +VALIDATE_OFFSET(PagerMessage, m_nStringLength, 0x8); +VALIDATE_OFFSET(PagerMessage, m_nPriority, 0xA); +VALIDATE_OFFSET(PagerMessage, m_nTimeToChangePosition, 0xC); +VALIDATE_OFFSET(PagerMessage, field_10, 0x10); +VALIDATE_OFFSET(PagerMessage, m_nNumber, 0x14); VALIDATE_SIZE(PagerMessage, 0x2C); class CPager { @@ -43,5 +50,6 @@ class CPager { void AddMessage(const char* text, unsigned short speed, unsigned short priority, unsigned short arg3); void AddMessageWithNumber(const char* text, int n1, int n2, int n3, int n4, int n5, int n6, unsigned short speed, unsigned short priority, unsigned short arg9); }; - +VALIDATE_OFFSET(CPager, m_nNumDisplayLetters, 0x0); +VALIDATE_OFFSET(CPager, m_messages, 0x4); VALIDATE_SIZE(CPager, 0x164); \ No newline at end of file diff --git a/plugin_III/game_III/CParticle.h b/plugin_III/game_III/CParticle.h index 4eddc48ec..33b72252c 100644 --- a/plugin_III/game_III/CParticle.h +++ b/plugin_III/game_III/CParticle.h @@ -58,6 +58,30 @@ class PLUGIN_API CParticle { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_OFFSET(CParticle, m_vecPosition, 0x0); +VALIDATE_OFFSET(CParticle, m_vecDirection, 0xC); +VALIDATE_OFFSET(CParticle, m_vecScreenPosition, 0x18); +VALIDATE_OFFSET(CParticle, m_nTimeWhenWillBeDestroyed, 0x24); +VALIDATE_OFFSET(CParticle, m_nTimeWhenColorWillBeChanged, 0x28); +VALIDATE_OFFSET(CParticle, m_fZCoord, 0x2C); +VALIDATE_OFFSET(CParticle, m_vecParticleMovementOffset, 0x30); +VALIDATE_OFFSET(CParticle, m_nCurrentZRotation, 0x3C); +VALIDATE_OFFSET(CParticle, m_nZRotationTimer, 0x3E); +VALIDATE_OFFSET(CParticle, m_fCurrentZRadius, 0x40); +VALIDATE_OFFSET(CParticle, m_nZRadiusTimer, 0x44); +VALIDATE_OFFSET(CParticle, m_fSize, 0x48); +VALIDATE_OFFSET(CParticle, m_fExpansionRate, 0x4C); +VALIDATE_OFFSET(CParticle, m_nFadeToBlackTimer, 0x50); +VALIDATE_OFFSET(CParticle, m_nFadeAlphaTimer, 0x52); +VALIDATE_OFFSET(CParticle, m_nColorIntensity, 0x54); +VALIDATE_OFFSET(CParticle, m_nAlpha, 0x55); +VALIDATE_OFFSET(CParticle, m_nCurrentFrame, 0x56); +VALIDATE_OFFSET(CParticle, m_nAnimationSpeedTimer, 0x58); +VALIDATE_OFFSET(CParticle, m_nRotationStep, 0x5A); +VALIDATE_OFFSET(CParticle, m_nRotation, 0x5C); +VALIDATE_OFFSET(CParticle, m_color, 0x5E); +VALIDATE_OFFSET(CParticle, m_pNext, 0x64); +VALIDATE_SIZE(CParticle, 0x68); SUPPORTED_10EN_11EN_STEAM extern CParticle(&gParticleArray)[1000]; // CParticle gParticleArray[1000] SUPPORTED_10EN_11EN_STEAM extern RwTexture *&gpFlame1Tex; diff --git a/plugin_III/game_III/CParticleObject.h b/plugin_III/game_III/CParticleObject.h index d1e3f858c..7f7e736e3 100644 --- a/plugin_III/game_III/CParticleObject.h +++ b/plugin_III/game_III/CParticleObject.h @@ -60,6 +60,23 @@ class PLUGIN_API CParticleObject : public CPlaceable { SUPPORTED_10EN_11EN_STEAM static void SaveParticle(unsigned char *buffer, unsigned int *size); SUPPORTED_10EN_11EN_STEAM static void UpdateAll(); }; +VALIDATE_OFFSET(CParticleObject, m_pNext, 0x4C); +VALIDATE_OFFSET(CParticleObject, m_pPrev, 0x50); +VALIDATE_OFFSET(CParticleObject, m_pParticle, 0x54); +VALIDATE_OFFSET(CParticleObject, m_nRemoveTimer, 0x58); +VALIDATE_OFFSET(CParticleObject, m_eType, 0x5C); +VALIDATE_OFFSET(CParticleObject, m_eParticleType, 0x60); +VALIDATE_OFFSET(CParticleObject, m_nNumEffectCycles, 0x64); +VALIDATE_OFFSET(CParticleObject, m_nSkipFrames, 0x65); +VALIDATE_OFFSET(CParticleObject, m_nFrameCounter, 0x66); +VALIDATE_OFFSET(CParticleObject, m_nState, 0x68); +VALIDATE_OFFSET(CParticleObject, m_vecTarget, 0x6C); +VALIDATE_OFFSET(CParticleObject, m_fRandVal, 0x78); +VALIDATE_OFFSET(CParticleObject, m_fSize, 0x7C); +VALIDATE_OFFSET(CParticleObject, m_color, 0x80); +VALIDATE_OFFSET(CParticleObject, m_bRemove, 0x84); +VALIDATE_OFFSET(CParticleObject, m_nCreationChance, 0x85); +VALIDATE_SIZE(CParticleObject, 0x88); VTABLE_DESC(CParticleObject, 0x5F8030, 1); VALIDATE_SIZE(CParticleObject, 0x88); diff --git a/plugin_III/game_III/CPathFind.h b/plugin_III/game_III/CPathFind.h index 4bed8fca3..9bcb1f52e 100644 --- a/plugin_III/game_III/CPathFind.h +++ b/plugin_III/game_III/CPathFind.h @@ -32,6 +32,8 @@ enum PLUGIN_API ePathType { struct PLUGIN_API CTempDetachedNode { unsigned char foo[20]; }; +VALIDATE_OFFSET(CTempDetachedNode, foo, 0x0); +VALIDATE_SIZE(CTempDetachedNode, 0x14); struct PLUGIN_API CPathInfoNode { short x; @@ -43,10 +45,20 @@ struct PLUGIN_API CPathInfoNode { char m_nNumRightLanes; unsigned char crossing : 1; }; +VALIDATE_OFFSET(CPathInfoNode, x, 0x0); +VALIDATE_OFFSET(CPathInfoNode, y, 0x2); +VALIDATE_OFFSET(CPathInfoNode, z, 0x4); +VALIDATE_OFFSET(CPathInfoNode, m_nType, 0x6); +VALIDATE_OFFSET(CPathInfoNode, m_nNext, 0x7); +VALIDATE_OFFSET(CPathInfoNode, m_nNumLeftLanes, 0x8); +VALIDATE_OFFSET(CPathInfoNode, m_nNumRightLanes, 0x9); +VALIDATE_SIZE(CPathInfoNode, 0xC); struct PLUGIN_API CPathInfoForObject { CPathInfoNode m_aNodes[12]; }; +VALIDATE_OFFSET(CPathInfoForObject, m_aNodes, 0x0); +VALIDATE_SIZE(CPathInfoForObject, 0x90); class PLUGIN_API CCarPathLink { public: @@ -60,6 +72,14 @@ class PLUGIN_API CCarPathLink { unsigned char bBridgeLights : 1; } m_nFlags; }; +VALIDATE_OFFSET(CCarPathLink, m_vec2dPos, 0x0); +VALIDATE_OFFSET(CCarPathLink, m_vec2dDir, 0x8); +VALIDATE_OFFSET(CCarPathLink, m_nPathNodeIndex, 0x10); +VALIDATE_OFFSET(CCarPathLink, m_nNumLeftLanes, 0x12); +VALIDATE_OFFSET(CCarPathLink, m_nNumRightLanes, 0x13); +VALIDATE_OFFSET(CCarPathLink, m_nTrafficLightType, 0x14); +VALIDATE_OFFSET(CCarPathLink, m_nFlags, 0x15); +VALIDATE_SIZE(CCarPathLink, 0x18); class PLUGIN_API CPathFind { PLUGIN_NO_DEFAULT_CONSTRUCTION(CPathFind) @@ -123,6 +143,24 @@ class PLUGIN_API CPathFind { SUPPORTED_10EN_11EN_STEAM static bool LoadPathFindData(); }; +VALIDATE_OFFSET(CPathFind, m_aPathNodes, 0x0); +VALIDATE_OFFSET(CPathFind, m_aCarPathLinks, 0x26840); +VALIDATE_OFFSET(CPathFind, m_apMapObjects, 0x32AE0); +VALIDATE_OFFSET(CPathFind, m_anMapObjectFlags, 0x33E68); +VALIDATE_OFFSET(CPathFind, m_anConnections, 0x3434A); +VALIDATE_OFFSET(CPathFind, m_anDistances, 0x39372); +VALIDATE_OFFSET(CPathFind, m_anConnectionFlags, 0x3E39A); +VALIDATE_OFFSET(CPathFind, m_anCarPathConnections, 0x40BAE); +VALIDATE_OFFSET(CPathFind, m_nNumPathNodes, 0x45BD8); +VALIDATE_OFFSET(CPathFind, m_nNumCarPathNodes, 0x45BDC); +VALIDATE_OFFSET(CPathFind, m_nNumPedPathNodes, 0x45BE0); +VALIDATE_OFFSET(CPathFind, m_nNumMapObjects, 0x45BE4); +VALIDATE_OFFSET(CPathFind, m_nNumConnections, 0x45BE6); +VALIDATE_OFFSET(CPathFind, m_nNumCarPathLinks, 0x45BE8); +VALIDATE_OFFSET(CPathFind, field_45BEC, 0x45BEC); +VALIDATE_OFFSET(CPathFind, m_nNumGroups, 0x45BF0); +VALIDATE_OFFSET(CPathFind, m_aSearchNodes, 0x45BF4); +VALIDATE_SIZE(CPathFind, 0x49BF4); SUPPORTED_10EN_11EN_STEAM extern int &TempListLength; SUPPORTED_10EN_11EN_STEAM extern CPathNode *(&apNodesToBeCleared)[4995]; // CPathNode *apNodesToBeCleared[4995] diff --git a/plugin_III/game_III/CPathNode.h b/plugin_III/game_III/CPathNode.h index 0eb05fb64..284ecc5c8 100644 --- a/plugin_III/game_III/CPathNode.h +++ b/plugin_III/game_III/CPathNode.h @@ -33,7 +33,15 @@ class PLUGIN_API CPathNode { return m_vecPos; } }; - +VALIDATE_OFFSET(CPathNode, m_vecPos, 0x0); +VALIDATE_OFFSET(CPathNode, m_pPrev, 0xC); +VALIDATE_OFFSET(CPathNode, m_pNext, 0x10); +VALIDATE_OFFSET(CPathNode, m_nSearchList, 0x14); +VALIDATE_OFFSET(CPathNode, m_nObjectIndex, 0x16); +VALIDATE_OFFSET(CPathNode, m_nFirstLink, 0x18); +VALIDATE_OFFSET(CPathNode, m_nNumLinks, 0x1A); +VALIDATE_OFFSET(CPathNode, m_nFlags, 0x1B); +VALIDATE_OFFSET(CPathNode, m_nGroup, 0x1C); VALIDATE_SIZE(CPathNode, 0x20); #include "meta/meta.CPathNode.h" diff --git a/plugin_III/game_III/CPathSplines.h b/plugin_III/game_III/CPathSplines.h index af8b6b497..996d88d63 100644 --- a/plugin_III/game_III/CPathSplines.h +++ b/plugin_III/game_III/CPathSplines.h @@ -18,11 +18,18 @@ struct CPathSpline { float field_24; float field_28; }; - +VALIDATE_OFFSET(CPathSpline, m_nArrayMarker, 0x0); +VALIDATE_OFFSET(CPathSpline, field_4, 0x4); +VALIDATE_OFFSET(CPathSpline, m_fFOV, 0x8); +VALIDATE_OFFSET(CPathSpline, field_12, 0xC); +VALIDATE_OFFSET(CPathSpline, field_16, 0x10); +VALIDATE_OFFSET(CPathSpline, field_20, 0x14); +VALIDATE_OFFSET(CPathSpline, field_24, 0x18); +VALIDATE_OFFSET(CPathSpline, field_28, 0x1C); VALIDATE_SIZE(CPathSpline, 0x20); struct CPathSplines { CPathSpline m_aPathData[100]; }; - +VALIDATE_OFFSET(CPathSplines, m_aPathData, 0x0); VALIDATE_SIZE(CPathSplines, 0xC80); diff --git a/plugin_III/game_III/CPed.h b/plugin_III/game_III/CPed.h index 2d3275c5d..758db5df4 100644 --- a/plugin_III/game_III/CPed.h +++ b/plugin_III/game_III/CPed.h @@ -263,6 +263,15 @@ struct PLUGIN_API FightMove { unsigned char m_nDamage; unsigned char m_nFlags; }; +VALIDATE_OFFSET(FightMove, m_nAnimId, 0x0); +VALIDATE_OFFSET(FightMove, m_fStartFireTime, 0x4); +VALIDATE_OFFSET(FightMove, m_fEndFireTime, 0x8); +VALIDATE_OFFSET(FightMove, m_fComboFollowTime, 0xC); +VALIDATE_OFFSET(FightMove, m_fStrikeRadius, 0x10); +VALIDATE_OFFSET(FightMove, m_nHitLevel, 0x14); +VALIDATE_OFFSET(FightMove, m_nDamage, 0x15); +VALIDATE_OFFSET(FightMove, m_nFlags, 0x16); +VALIDATE_SIZE(FightMove, 0x18); class PLUGIN_API CPed : public CPhysical { PLUGIN_NO_DEFAULT_CONSTRUCTION(CPed) @@ -765,6 +774,124 @@ class PLUGIN_API CPed : public CPhysical { SUPPORTED_10EN_11EN_STEAM static void SetAnimOffsetForEnterOrExitVehicle(); SUPPORTED_10EN_11EN_STEAM static void Stagger(); }; +VALIDATE_OFFSET(CPed, m_collPoly, 0x128); +VALIDATE_OFFSET(CPed, m_fCollisionSpeed, 0x150); +VALIDATE_OFFSET(CPed, field_15D, 0x15D); +VALIDATE_OFFSET(CPed, field_15E, 0x15E); +VALIDATE_OFFSET(CPed, field_15F, 0x15F); +VALIDATE_OFFSET(CPed, m_nCharCreatedBy, 0x160); +VALIDATE_OFFSET(CPed, m_eObjective, 0x164); +VALIDATE_OFFSET(CPed, m_ePrevObjective, 0x168); +VALIDATE_OFFSET(CPed, m_pPedInObjective, 0x16C); +VALIDATE_OFFSET(CPed, m_pCarInObjective, 0x170); +VALIDATE_OFFSET(CPed, m_vecNextRoutePointPos, 0x174); +VALIDATE_OFFSET(CPed, m_pGangLeader, 0x180); +VALIDATE_OFFSET(CPed, m_ePedFormation, 0x184); +VALIDATE_OFFSET(CPed, m_nFearFlags, 0x188); +VALIDATE_OFFSET(CPed, m_pThreatEntity, 0x18C); +VALIDATE_OFFSET(CPed, m_vec2dEventOrThreat, 0x190); +VALIDATE_OFFSET(CPed, m_nEventType, 0x198); +VALIDATE_OFFSET(CPed, m_pEventEntity, 0x19C); +VALIDATE_OFFSET(CPed, m_fAngleToEvent, 0x1A0); +VALIDATE_OFFSET(CPed, m_apFrames, 0x1A4); +VALIDATE_OFFSET(CPed, m_nAnimGroupId, 0x1D4); +VALIDATE_OFFSET(CPed, m_pVehicleAnim, 0x1D8); +VALIDATE_OFFSET(CPed, m_vec2dAnimMoveDelta, 0x1DC); +VALIDATE_OFFSET(CPed, m_vecOffsetSeek, 0x1E4); +VALIDATE_OFFSET(CPed, m_PedIK, 0x1F0); +VALIDATE_OFFSET(CPed, m_vec2dAction, 0x218); +VALIDATE_OFFSET(CPed, m_nPedStateTimer, 0x220); +VALIDATE_OFFSET(CPed, m_ePedState, 0x224); +VALIDATE_OFFSET(CPed, m_eLastPedState, 0x228); +VALIDATE_OFFSET(CPed, m_eMoveState, 0x22C); +VALIDATE_OFFSET(CPed, m_nStoredMoveState, 0x230); +VALIDATE_OFFSET(CPed, m_nPrevMoveState, 0x234); +VALIDATE_OFFSET(CPed, m_eWaitState, 0x238); +VALIDATE_OFFSET(CPed, m_nWaitTimer, 0x23C); +VALIDATE_OFFSET(CPed, m_apPathNodesStates, 0x240); +VALIDATE_OFFSET(CPed, m_aPathNodeStates, 0x260); +VALIDATE_OFFSET(CPed, m_nPathNodes, 0x2B0); +VALIDATE_OFFSET(CPed, m_nCurPathNode, 0x2B2); +VALIDATE_OFFSET(CPed, m_nPathDir, 0x2B4); +VALIDATE_OFFSET(CPed, m_pLastPathNode, 0x2B8); +VALIDATE_OFFSET(CPed, m_pNextPathNode, 0x2BC); +VALIDATE_OFFSET(CPed, m_fHealth, 0x2C0); +VALIDATE_OFFSET(CPed, m_fArmour, 0x2C4); +VALIDATE_OFFSET(CPed, m_nRouteLastPoint, 0x2C8); +VALIDATE_OFFSET(CPed, m_nRouteStartPoint, 0x2CA); +VALIDATE_OFFSET(CPed, m_nRoutePointsPassed, 0x2CC); +VALIDATE_OFFSET(CPed, m_nRouteType, 0x2CE); +VALIDATE_OFFSET(CPed, m_nRoutePointsBeingPassed, 0x2D0); +VALIDATE_OFFSET(CPed, m_vecAnimMovingShift, 0x2D4); +VALIDATE_OFFSET(CPed, m_fHeadingCurrent, 0x2DC); +VALIDATE_OFFSET(CPed, m_fHeadingGoal, 0x2E0); +VALIDATE_OFFSET(CPed, m_fHeadingChangeRate, 0x2E4); +VALIDATE_OFFSET(CPed, m_nVehicleDoor, 0x2E8); +VALIDATE_OFFSET(CPed, m_nWalkAroundType, 0x2EA); +VALIDATE_OFFSET(CPed, m_pCurrentPhysSurface, 0x2EC); +VALIDATE_OFFSET(CPed, m_vecOffsetFromPhysSurface, 0x2F0); +VALIDATE_OFFSET(CPed, m_pCurSurface, 0x2FC); +VALIDATE_OFFSET(CPed, m_vecSeekPos, 0x300); +VALIDATE_OFFSET(CPed, m_pSeekTarget, 0x30C); +VALIDATE_OFFSET(CPed, m_pVehicle, 0x310); +VALIDATE_OFFSET(CPed, m_bInVehicle, 0x314); +VALIDATE_OFFSET(CPed, m_fDistanceToCountSeekDone, 0x318); +VALIDATE_OFFSET(CPed, m_bRunningToPhone, 0x31C); +VALIDATE_OFFSET(CPed, m_nPhoneId, 0x31E); +VALIDATE_OFFSET(CPed, m_eCrimeToReportOnPhone, 0x320); +VALIDATE_OFFSET(CPed, m_nPhoneTalkTimer, 0x324); +VALIDATE_OFFSET(CPed, m_pLastAccident, 0x328); +VALIDATE_OFFSET(CPed, m_ePedType, 0x32C); +VALIDATE_OFFSET(CPed, m_pPedStats, 0x330); +VALIDATE_OFFSET(CPed, m_vec2dFleeFromPos, 0x334); +VALIDATE_OFFSET(CPed, m_pFleeFrom, 0x33C); +VALIDATE_OFFSET(CPed, m_nFleeTimer, 0x340); +VALIDATE_OFFSET(CPed, m_pCollidingEntityWhileFleeing, 0x344); +VALIDATE_OFFSET(CPed, m_nCollidingThingTimer, 0x348); +VALIDATE_OFFSET(CPed, m_pCollidingEntity, 0x34C); +VALIDATE_OFFSET(CPed, m_nStateUnused, 0x350); +VALIDATE_OFFSET(CPed, m_nTimerUnused, 0x354); +VALIDATE_OFFSET(CPed, m_pWanderRangeBounds, 0x358); +VALIDATE_OFFSET(CPed, m_aWeapons, 0x35C); +VALIDATE_OFFSET(CPed, m_eStoredWeapon, 0x494); +VALIDATE_OFFSET(CPed, m_nCurrentWeapon, 0x498); +VALIDATE_OFFSET(CPed, m_nMaxWeaponTypeAllowed, 0x499); +VALIDATE_OFFSET(CPed, m_nWeaponSkill, 0x49A); +VALIDATE_OFFSET(CPed, m_nWeaponAccuracy, 0x49B); +VALIDATE_OFFSET(CPed, m_pPointGunAt, 0x49C); +VALIDATE_OFFSET(CPed, m_vecHitLastPos, 0x4A0); +VALIDATE_OFFSET(CPed, m_nCurFightMove, 0x4AC); +VALIDATE_OFFSET(CPed, m_nFightButtonPressure, 0x4B0); +VALIDATE_OFFSET(CPed, m_nFightState, 0x4B1); +VALIDATE_OFFSET(CPed, m_bTakeAStepAfterAttack, 0x4B2); +VALIDATE_OFFSET(CPed, m_pFire, 0x4B4); +VALIDATE_OFFSET(CPed, m_pLookTarget, 0x4B8); +VALIDATE_OFFSET(CPed, m_fLookDirection, 0x4BC); +VALIDATE_OFFSET(CPed, m_nWepModelID, 0x4C0); +VALIDATE_OFFSET(CPed, m_nLeaveCarTimer, 0x4C4); +VALIDATE_OFFSET(CPed, m_nGetUpTimer, 0x4C8); +VALIDATE_OFFSET(CPed, m_nLookTimer, 0x4CC); +VALIDATE_OFFSET(CPed, m_nChatTimer, 0x4D0); +VALIDATE_OFFSET(CPed, m_nAttackTimer, 0x4D4); +VALIDATE_OFFSET(CPed, m_nShootTimer, 0x4D8); +VALIDATE_OFFSET(CPed, m_nCarJackTimer, 0x4DC); +VALIDATE_OFFSET(CPed, m_nObjectiveTimer, 0x4E0); +VALIDATE_OFFSET(CPed, m_nDuckTimer, 0x4E4); +VALIDATE_OFFSET(CPed, m_nDuckAndCoverTimer, 0x4E8); +VALIDATE_OFFSET(CPed, m_nBloodyFootprintCountOrDeathTime, 0x4EC); +VALIDATE_OFFSET(CPed, m_nPanicCounter, 0x4F0); +VALIDATE_OFFSET(CPed, m_bDeadBleeding, 0x4F1); +VALIDATE_OFFSET(CPed, m_nBodyPartBleeding, 0x4F2); +VALIDATE_OFFSET(CPed, m_apNearPeds, 0x4F4); +VALIDATE_OFFSET(CPed, m_nNumNearPeds, 0x51C); +VALIDATE_OFFSET(CPed, m_nLastWepDam, 0x51E); +VALIDATE_OFFSET(CPed, m_nLastSoundStart, 0x520); +VALIDATE_OFFSET(CPed, m_nSoundStart, 0x524); +VALIDATE_OFFSET(CPed, m_nLastQueuedSound, 0x528); +VALIDATE_OFFSET(CPed, m_nQueuedSound, 0x52A); +VALIDATE_OFFSET(CPed, m_vecSeekPosEx, 0x52C); +VALIDATE_OFFSET(CPed, m_fDistanceToCountSeekDoneEx, 0x538); +VALIDATE_SIZE(CPed, 0x53C); SUPPORTED_10EN_11EN_STEAM extern FightMove(&tFightMoves)[24]; // FightMove tFightMoves[24] SUPPORTED_10EN_11EN_STEAM extern CVector &vecVehicleSeatPosOffset; diff --git a/plugin_III/game_III/CPedIK.h b/plugin_III/game_III/CPedIK.h index b892baafa..da5dd665a 100644 --- a/plugin_III/game_III/CPedIK.h +++ b/plugin_III/game_III/CPedIK.h @@ -21,6 +21,9 @@ struct PLUGIN_API LimbOrientation { float m_fYaw; float m_fPitch; }; +VALIDATE_OFFSET(LimbOrientation, m_fYaw, 0x0); +VALIDATE_OFFSET(LimbOrientation, m_fPitch, 0x4); +VALIDATE_SIZE(LimbOrientation, 0x8); struct PLUGIN_API LimbMovementInfo { float maxYaw; @@ -30,6 +33,13 @@ struct PLUGIN_API LimbMovementInfo { float minPitch; float pitchD; }; +VALIDATE_OFFSET(LimbMovementInfo, maxYaw, 0x0); +VALIDATE_OFFSET(LimbMovementInfo, minYaw, 0x4); +VALIDATE_OFFSET(LimbMovementInfo, yawD, 0x8); +VALIDATE_OFFSET(LimbMovementInfo, maxPitch, 0xC); +VALIDATE_OFFSET(LimbMovementInfo, minPitch, 0x10); +VALIDATE_OFFSET(LimbMovementInfo, pitchD, 0x14); +VALIDATE_SIZE(LimbMovementInfo, 0x18); class PLUGIN_API CPedIK { public: @@ -65,6 +75,12 @@ class PLUGIN_API CPedIK { SUPPORTED_10EN_11EN_STEAM static RwMatrix *GetWorldMatrix(RwFrame *frame, RwMatrix *matrix); }; +VALIDATE_OFFSET(CPedIK, m_pPed, 0x0); +VALIDATE_OFFSET(CPedIK, m_sHead, 0x4); +VALIDATE_OFFSET(CPedIK, m_sTorso, 0xC); +VALIDATE_OFFSET(CPedIK, m_sUpperArm, 0x14); +VALIDATE_OFFSET(CPedIK, m_sLowerArm, 0x1C); +VALIDATE_SIZE(CPedIK, 0x28); SUPPORTED_10EN_11EN_STEAM extern RwV3d &ZaxisIK; SUPPORTED_10EN_11EN_STEAM extern RwV3d &YaxisIK; diff --git a/plugin_III/game_III/CPedModelInfo.h b/plugin_III/game_III/CPedModelInfo.h index e4111c2f4..a42014332 100644 --- a/plugin_III/game_III/CPedModelInfo.h +++ b/plugin_III/game_III/CPedModelInfo.h @@ -45,6 +45,12 @@ class PLUGIN_API CPedModelInfo : public CClumpModelInfo { SUPPORTED_10EN_11EN_STEAM void CreateHitColModel(); SUPPORTED_10EN_11EN_STEAM void SetLowDetailClump(RpClump *clump); }; +VALIDATE_OFFSET(CPedModelInfo, m_nAnimGroupId, 0x34); +VALIDATE_OFFSET(CPedModelInfo, m_nPedType, 0x38); +VALIDATE_OFFSET(CPedModelInfo, m_nPedStatType, 0x3C); +VALIDATE_OFFSET(CPedModelInfo, m_nCarsCanDriveMask, 0x40); +VALIDATE_OFFSET(CPedModelInfo, m_pHitColModel, 0x44); +VALIDATE_SIZE(CPedModelInfo, 0x48); VTABLE_DESC(CPedModelInfo, 0x5FDFFC, 7); VALIDATE_SIZE(CPedModelInfo, 0x48); diff --git a/plugin_III/game_III/CPedPath.h b/plugin_III/game_III/CPedPath.h index c7904d04a..7ee0a12e1 100644 --- a/plugin_III/game_III/CPedPath.h +++ b/plugin_III/game_III/CPedPath.h @@ -21,5 +21,6 @@ class PLUGIN_API CPedPath { SUPPORTED_10EN_11EN_STEAM static bool CalcPedRoute(unsigned char pathType, CVector position, CVector destination, CVector *pointPoses, short *pointsFound, short maxPoints); SUPPORTED_10EN_11EN_STEAM static void RemoveNodeFromList(CPedPathNode *node); }; +VALIDATE_SIZE(CPedPath, 0x1); #include "meta/meta.CPedPath.h" diff --git a/plugin_III/game_III/CPedPathNode.h b/plugin_III/game_III/CPedPathNode.h index 099fdcf0a..61aabd734 100644 --- a/plugin_III/game_III/CPedPathNode.h +++ b/plugin_III/game_III/CPedPathNode.h @@ -17,5 +17,10 @@ class PLUGIN_API CPedPathNode { CPedPathNode *prev; CPedPathNode *next; }; - +VALIDATE_OFFSET(CPedPathNode, m_bBlockade, 0x0); +VALIDATE_OFFSET(CPedPathNode, nodeIdX, 0x1); +VALIDATE_OFFSET(CPedPathNode, nodeIdY, 0x2); +VALIDATE_OFFSET(CPedPathNode, id, 0x4); +VALIDATE_OFFSET(CPedPathNode, prev, 0x8); +VALIDATE_OFFSET(CPedPathNode, next, 0xC); VALIDATE_SIZE(CPedPathNode, 0x10); diff --git a/plugin_III/game_III/CPedPlacement.h b/plugin_III/game_III/CPedPlacement.h index 8a974f53d..06a9076d5 100644 --- a/plugin_III/game_III/CPedPlacement.h +++ b/plugin_III/game_III/CPedPlacement.h @@ -15,5 +15,6 @@ class PLUGIN_API CPedPlacement { SUPPORTED_10EN_11EN_STEAM static bool IsPositionClearForPed(CVector *position); SUPPORTED_10EN_11EN_STEAM static CEntity *IsPositionClearOfCars(CVector *position); }; +VALIDATE_SIZE(CPedPlacement, 0x1); #include "meta/meta.CPedPlacement.h" diff --git a/plugin_III/game_III/CPedStats.h b/plugin_III/game_III/CPedStats.h index ff4058c78..7db15d260 100644 --- a/plugin_III/game_III/CPedStats.h +++ b/plugin_III/game_III/CPedStats.h @@ -39,7 +39,17 @@ class PLUGIN_API CPedStats { SUPPORTED_10EN_11EN_STEAM static void LoadPedStats(); SUPPORTED_10EN_11EN_STEAM static void Shutdown(); }; - +VALIDATE_OFFSET(CPedStats, m_Personality, 0x0); +VALIDATE_OFFSET(CPedStats, m_aszName, 0x4); +VALIDATE_OFFSET(CPedStats, m_fFleeDistance, 0x1C); +VALIDATE_OFFSET(CPedStats, m_fHeadingChangeRate, 0x20); +VALIDATE_OFFSET(CPedStats, m_nFear, 0x24); +VALIDATE_OFFSET(CPedStats, m_nTemper, 0x25); +VALIDATE_OFFSET(CPedStats, m_nLawfullness, 0x26); +VALIDATE_OFFSET(CPedStats, m_nSexiness, 0x27); +VALIDATE_OFFSET(CPedStats, m_fAttackStrength, 0x28); +VALIDATE_OFFSET(CPedStats, m_fDefendWeakness, 0x2C); +VALIDATE_OFFSET(CPedStats, m_nFlags, 0x30); VALIDATE_SIZE(CPedStats, 0x34); #include "meta/meta.CPedStats.h" diff --git a/plugin_III/game_III/CPedType.cpp b/plugin_III/game_III/CPedType.cpp index 4c3b27560..9527f41c5 100644 --- a/plugin_III/game_III/CPedType.cpp +++ b/plugin_III/game_III/CPedType.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPedType.h" diff --git a/plugin_III/game_III/CPedType.h b/plugin_III/game_III/CPedType.h index 663739bdd..81893a63c 100644 --- a/plugin_III/game_III/CPedType.h +++ b/plugin_III/game_III/CPedType.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class CPedType { @@ -68,5 +67,12 @@ class CPedType { static void Save(unsigned char* bufferPointer, unsigned int* structSize); static void Shutdown(); }; - +VALIDATE_OFFSET(CPedType, m_Type, 0x0); +VALIDATE_OFFSET(CPedType, field_4, 0x4); +VALIDATE_OFFSET(CPedType, field_8, 0x8); +VALIDATE_OFFSET(CPedType, field_C, 0xC); +VALIDATE_OFFSET(CPedType, field_10, 0x10); +VALIDATE_OFFSET(CPedType, field_14, 0x14); +VALIDATE_OFFSET(CPedType, m_Threat, 0x18); +VALIDATE_OFFSET(CPedType, m_Avoid, 0x1C); VALIDATE_SIZE(CPedType, 0x20); \ No newline at end of file diff --git a/plugin_III/game_III/CPhone.h b/plugin_III/game_III/CPhone.h index 5d003559f..c21faca5d 100644 --- a/plugin_III/game_III/CPhone.h +++ b/plugin_III/game_III/CPhone.h @@ -22,7 +22,12 @@ class PLUGIN_API CPhone { ePhoneState m_nState; bool m_bVisibleToCam; }; - +VALIDATE_OFFSET(CPhone, m_vecPos, 0x0); +VALIDATE_OFFSET(CPhone, m_pMessages, 0xC); +VALIDATE_OFFSET(CPhone, m_nStartTimer, 0x24); +VALIDATE_OFFSET(CPhone, m_pEntity, 0x28); +VALIDATE_OFFSET(CPhone, m_nState, 0x2C); +VALIDATE_OFFSET(CPhone, m_bVisibleToCam, 0x30); VALIDATE_SIZE(CPhone, 0x34); #include "meta/meta.CPhone.h" diff --git a/plugin_III/game_III/CPhoneInfo.h b/plugin_III/game_III/CPhoneInfo.h index 05ab79e28..08d407ce6 100644 --- a/plugin_III/game_III/CPhoneInfo.h +++ b/plugin_III/game_III/CPhoneInfo.h @@ -33,6 +33,10 @@ class PLUGIN_API CPhoneInfo { SUPPORTED_10EN_11EN_STEAM void Shutdown(); SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CPhoneInfo, m_nMax, 0x0); +VALIDATE_OFFSET(CPhoneInfo, m_nScriptPhonesMax, 0x4); +VALIDATE_OFFSET(CPhoneInfo, m_aPhones, 0x8); +VALIDATE_SIZE(CPhoneInfo, 0xA30); SUPPORTED_10EN_11EN_STEAM extern unsigned int &PhoneEnableControlsTimer; SUPPORTED_10EN_11EN_STEAM extern bool &bDisplayingPhoneMessage; diff --git a/plugin_III/game_III/CPhysical.h b/plugin_III/game_III/CPhysical.h index 89576b8b3..f6b0a506a 100644 --- a/plugin_III/game_III/CPhysical.h +++ b/plugin_III/game_III/CPhysical.h @@ -140,6 +140,39 @@ class PLUGIN_API CPhysical : public CEntity { SUPPORTED_10EN_11EN_STEAM static void PlacePhysicalRelativeToOtherPhysical(CPhysical *other, CPhysical *physical, CVector localPos); }; +VALIDATE_OFFSET(CPhysical, m_nAudioEntityId, 0x64); +VALIDATE_OFFSET(CPhysical, field_68, 0x68); +VALIDATE_OFFSET(CPhysical, m_pLastCarNodeTreadable, 0x6C); +VALIDATE_OFFSET(CPhysical, m_pLastPedNodeTreadable, 0x70); +VALIDATE_OFFSET(CPhysical, m_nLastTimeCollided, 0x74); +VALIDATE_OFFSET(CPhysical, m_vecMoveSpeed, 0x78); +VALIDATE_OFFSET(CPhysical, m_vecTurnSpeed, 0x84); +VALIDATE_OFFSET(CPhysical, m_vecFrictionMoveForce, 0x90); +VALIDATE_OFFSET(CPhysical, m_vecFrictionTurnForce, 0x9C); +VALIDATE_OFFSET(CPhysical, m_vecMoveSpeedAvg, 0xA8); +VALIDATE_OFFSET(CPhysical, m_vecTurnSpeedAvg, 0xB4); +VALIDATE_OFFSET(CPhysical, m_fMass, 0xC0); +VALIDATE_OFFSET(CPhysical, m_fTurnMass, 0xC4); +VALIDATE_OFFSET(CPhysical, m_fForceMultiplier, 0xC8); +VALIDATE_OFFSET(CPhysical, m_fAirResistance, 0xCC); +VALIDATE_OFFSET(CPhysical, m_fElasticity, 0xD0); +VALIDATE_OFFSET(CPhysical, m_fBuoyancy, 0xD4); +VALIDATE_OFFSET(CPhysical, m_vecCentreOfMass, 0xD8); +VALIDATE_OFFSET(CPhysical, m_entryInfoList, 0xE4); +VALIDATE_OFFSET(CPhysical, m_pMovingListNode, 0xE8); +VALIDATE_OFFSET(CPhysical, field_EC, 0xEC); +VALIDATE_OFFSET(CPhysical, m_nStaticFrames, 0xED); +VALIDATE_OFFSET(CPhysical, m_nNumCollisionRecords, 0xEE); +VALIDATE_OFFSET(CPhysical, m_bIsVehicleBeingShifted, 0xEF); +VALIDATE_OFFSET(CPhysical, m_apCollisionRecords, 0xF0); +VALIDATE_OFFSET(CPhysical, m_fDistanceTravelled, 0x108); +VALIDATE_OFFSET(CPhysical, m_fDamageImpulse, 0x10C); +VALIDATE_OFFSET(CPhysical, m_pDamageEntity, 0x110); +VALIDATE_OFFSET(CPhysical, m_vecDamageNormal, 0x114); +VALIDATE_OFFSET(CPhysical, m_nDamagePieceType, 0x120); +VALIDATE_OFFSET(CPhysical, m_nSurfaceTouched, 0x123); +VALIDATE_OFFSET(CPhysical, m_nZoneLevel, 0x124); +VALIDATE_SIZE(CPhysical, 0x128); VTABLE_DESC(CPhysical, 0x5F69D0, 18); VALIDATE_SIZE(CPhysical, 0x128); diff --git a/plugin_III/game_III/CPickup.h b/plugin_III/game_III/CPickup.h index d4a7bb3f5..a7c4eb715 100644 --- a/plugin_III/game_III/CPickup.h +++ b/plugin_III/game_III/CPickup.h @@ -46,6 +46,15 @@ class PLUGIN_API CPickup { SUPPORTED_10EN_11EN_STEAM CObject *GiveUsAPickUpObject(int handle); SUPPORTED_10EN_11EN_STEAM bool Update(CPlayerPed *player, CVehicle *vehicle, int playerId); }; +VALIDATE_OFFSET(CPickup, m_nPickupType, 0x0); +VALIDATE_OFFSET(CPickup, m_bRemoved, 0x1); +VALIDATE_OFFSET(CPickup, m_nQuantity, 0x2); +VALIDATE_OFFSET(CPickup, m_pObject, 0x4); +VALIDATE_OFFSET(CPickup, m_nTimer, 0x8); +VALIDATE_OFFSET(CPickup, m_nModelIndex, 0xC); +VALIDATE_OFFSET(CPickup, m_nReferenceIndex, 0xE); +VALIDATE_OFFSET(CPickup, m_vecPos, 0x10); +VALIDATE_SIZE(CPickup, 0x1C); //! unsigned short AmmoForWeapon[20] = { 0, 1, 45, 125, 25, 150, 300, 25, 5, 250, 5, 5, 0, 500, 0, 100, 0, 0, 0, 0 }; SUPPORTED_10EN_11EN_STEAM extern unsigned short(&AmmoForWeapon)[20]; // unsigned short AmmoForWeapon[20] diff --git a/plugin_III/game_III/CPickups.h b/plugin_III/game_III/CPickups.h index 7d1f75f98..9c02ed6d4 100644 --- a/plugin_III/game_III/CPickups.h +++ b/plugin_III/game_III/CPickups.h @@ -22,7 +22,12 @@ struct PLUGIN_API CPickupMessage { unsigned char bOutOfStock : 1; unsigned char m_nQuantity; }; - +VALIDATE_OFFSET(CPickupMessage, m_vec2dPos, 0x0); +VALIDATE_OFFSET(CPickupMessage, m_weaponType, 0x8); +VALIDATE_OFFSET(CPickupMessage, m_fW, 0xC); +VALIDATE_OFFSET(CPickupMessage, m_fH, 0x10); +VALIDATE_OFFSET(CPickupMessage, m_color, 0x14); +VALIDATE_OFFSET(CPickupMessage, m_nQuantity, 0x19); VALIDATE_SIZE(CPickupMessage, 0x1C); class PLUGIN_API CPickups { @@ -60,6 +65,7 @@ class PLUGIN_API CPickups { SUPPORTED_10EN_11EN_STEAM static void Update(); SUPPORTED_10EN_11EN_STEAM static eWeaponType WeaponForModel(int model); }; +VALIDATE_SIZE(CPickups, 0x1); //! unsigned char aWeaponReds[16] = { 255, 0, 128, 255, 255, 0, 255, 0, 128, 128, 255, 255, 128, 0, 255, 0 }; SUPPORTED_10EN_11EN_STEAM extern unsigned char(&aWeaponReds)[16]; // unsigned char aWeaponReds[16] diff --git a/plugin_III/game_III/CPlaceName.h b/plugin_III/game_III/CPlaceName.h index 4c913d6c7..77690a573 100644 --- a/plugin_III/game_III/CPlaceName.h +++ b/plugin_III/game_III/CPlaceName.h @@ -21,7 +21,9 @@ class PLUGIN_API CPlaceName { SUPPORTED_10EN_11EN_STEAM void Init(); SUPPORTED_10EN_11EN_STEAM void Process(); }; - +VALIDATE_OFFSET(CPlaceName, m_pZone, 0x0); +VALIDATE_OFFSET(CPlaceName, m_pZoneOther, 0x4); +VALIDATE_OFFSET(CPlaceName, m_nAdditionalTimer, 0x8); VALIDATE_SIZE(CPlaceName, 0xC); #include "meta/meta.CPlaceName.h" diff --git a/plugin_III/game_III/CPlaceable.h b/plugin_III/game_III/CPlaceable.h index 7a93dcb59..8a8f07742 100644 --- a/plugin_III/game_III/CPlaceable.h +++ b/plugin_III/game_III/CPlaceable.h @@ -60,6 +60,8 @@ class PLUGIN_API CPlaceable { return m_matrix; } }; +VALIDATE_OFFSET(CPlaceable, m_matrix, 0x4); +VALIDATE_SIZE(CPlaceable, 0x4C); VTABLE_DESC(CPlaceable, 0x5F6A28, 1); VALIDATE_SIZE(CPlaceable, 0x4C); diff --git a/plugin_III/game_III/CPlane.h b/plugin_III/game_III/CPlane.h index c8d7c82a8..d3d182973 100644 --- a/plugin_III/game_III/CPlane.h +++ b/plugin_III/game_III/CPlane.h @@ -30,6 +30,10 @@ struct PLUGIN_API CPlaneNode { float m_fPosAtPath; //!< xy-distance from start on path bool m_bOnGround; //!< i.e. not flying }; +VALIDATE_OFFSET(CPlaneNode, m_vecPos, 0x0); +VALIDATE_OFFSET(CPlaneNode, m_fPosAtPath, 0xC); +VALIDATE_OFFSET(CPlaneNode, m_bOnGround, 0x10); +VALIDATE_SIZE(CPlaneNode, 0x14); struct PLUGIN_API CPlaneInterpolationLine { unsigned char m_nType; @@ -38,6 +42,12 @@ struct PLUGIN_API CPlaneInterpolationLine { float m_fSpeed; float m_fAcceleration; }; +VALIDATE_OFFSET(CPlaneInterpolationLine, m_nType, 0x0); +VALIDATE_OFFSET(CPlaneInterpolationLine, m_nTime, 0x4); +VALIDATE_OFFSET(CPlaneInterpolationLine, m_fPosition, 0x8); +VALIDATE_OFFSET(CPlaneInterpolationLine, m_fSpeed, 0xC); +VALIDATE_OFFSET(CPlaneInterpolationLine, m_fAcceleration, 0x10); +VALIDATE_SIZE(CPlaneInterpolationLine, 0x14); class PLUGIN_API CPlane : public CVehicle { PLUGIN_NO_DEFAULT_CONSTRUCTION(CPlane) @@ -157,6 +167,15 @@ class PLUGIN_API CPlane : public CVehicle { SUPPORTED_10EN_11EN_STEAM static bool TestRocketCollision(CVector *coors); SUPPORTED_10EN_11EN_STEAM static void UpdatePlanes(); }; +VALIDATE_OFFSET(CPlane, m_nPlaneId, 0x288); +VALIDATE_OFFSET(CPlane, m_nIsFarAway, 0x28A); +VALIDATE_OFFSET(CPlane, m_nCurPathNode, 0x28C); +VALIDATE_OFFSET(CPlane, m_fSpeed, 0x290); +VALIDATE_OFFSET(CPlane, m_nFrameWhenHit, 0x294); +VALIDATE_OFFSET(CPlane, m_bHasBeenHit, 0x298); +VALIDATE_OFFSET(CPlane, m_bIsDrugRunCesna, 0x299); +VALIDATE_OFFSET(CPlane, m_bIsDropOffCesna, 0x29A); +VALIDATE_SIZE(CPlane, 0x29C); SUPPORTED_10EN_11EN_STEAM extern float &TotalDurationOfFlightPath; SUPPORTED_10EN_11EN_STEAM extern float &TotalLengthOfFlightPath2; diff --git a/plugin_III/game_III/CPlayerInfo.cpp b/plugin_III/game_III/CPlayerInfo.cpp index ede5e8b1f..06f080c8f 100644 --- a/plugin_III/game_III/CPlayerInfo.cpp +++ b/plugin_III/game_III/CPlayerInfo.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_III/game_III/CPlayerInfo.h b/plugin_III/game_III/CPlayerInfo.h index c47a3f23c..be43cd8b1 100644 --- a/plugin_III/game_III/CPlayerInfo.h +++ b/plugin_III/game_III/CPlayerInfo.h @@ -88,5 +88,44 @@ class CPlayerInfo { void SetPlayerSkin(char const* skinName); ~CPlayerInfo(); }; - +VALIDATE_OFFSET(CPlayerInfo, m_pPed, 0x0); +VALIDATE_OFFSET(CPlayerInfo, m_pRemoteVehicle, 0x4); +VALIDATE_OFFSET(CPlayerInfo, m_ColModel, 0x8); +VALIDATE_OFFSET(CPlayerInfo, m_pSpecCar, 0x60); +VALIDATE_OFFSET(CPlayerInfo, m_aszPlayerName, 0x64); +VALIDATE_OFFSET(CPlayerInfo, m_nMoney, 0xAC); +VALIDATE_OFFSET(CPlayerInfo, m_nDisplayMoney, 0xB0); +VALIDATE_OFFSET(CPlayerInfo, m_nCollectablesCollected, 0xB4); +VALIDATE_OFFSET(CPlayerInfo, m_nCollectablesTotal, 0xB8); +VALIDATE_OFFSET(CPlayerInfo, m_nLastBumpPlayerCarTimer, 0xBC); +VALIDATE_OFFSET(CPlayerInfo, m_nTaxiTimer, 0xC0); +VALIDATE_OFFSET(CPlayerInfo, m_bTaxiTimerScore, 0xC4); +VALIDATE_OFFSET(CPlayerInfo, m_nNextSexFrequencyUpdateTime, 0xC8); +VALIDATE_OFFSET(CPlayerInfo, m_nNextSexMoneyUpdateTime, 0xCC); +VALIDATE_OFFSET(CPlayerInfo, m_nSexFrequency, 0xD0); +VALIDATE_OFFSET(CPlayerInfo, m_pHooker, 0xD4); +VALIDATE_OFFSET(CPlayerInfo, m_nPlayerState, 0xD8); +VALIDATE_OFFSET(CPlayerInfo, m_nDeathFadeTimer, 0xDC); +VALIDATE_OFFSET(CPlayerInfo, m_bFadeAfterRemoteVehicleExplosion, 0xE0); +VALIDATE_OFFSET(CPlayerInfo, field_E1, 0xE1); +VALIDATE_OFFSET(CPlayerInfo, field_E2, 0xE2); +VALIDATE_OFFSET(CPlayerInfo, field_E3, 0xE3); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeOfRemoteVehicleExplosion, 0xE4); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeLastHealthLoss, 0xE8); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeLastArmourLoss, 0xEC); +VALIDATE_OFFSET(CPlayerInfo, field_F0, 0xF0); +VALIDATE_OFFSET(CPlayerInfo, m_nUpsideDownCounter, 0xF4); +VALIDATE_OFFSET(CPlayerInfo, field_F8, 0xF8); +VALIDATE_OFFSET(CPlayerInfo, m_nCarDensityForCurrentZone, 0xFC); +VALIDATE_OFFSET(CPlayerInfo, m_fRoadDensityAroundPlayer, 0x100); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeOfLastCarExplosionCaused, 0x104); +VALIDATE_OFFSET(CPlayerInfo, m_nExplosionMultiplier, 0x108); +VALIDATE_OFFSET(CPlayerInfo, field_10C, 0x10C); +VALIDATE_OFFSET(CPlayerInfo, field_110, 0x110); +VALIDATE_OFFSET(CPlayerInfo, m_bInfiniteSprint, 0x114); +VALIDATE_OFFSET(CPlayerInfo, m_bFastReload, 0x115); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfJailFree, 0x116); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfHospitalFree, 0x117); +VALIDATE_OFFSET(CPlayerInfo, m_szSkinName, 0x118); +VALIDATE_OFFSET(CPlayerInfo, m_pSkinTexture, 0x138); VALIDATE_SIZE(CPlayerInfo, 0x13C); diff --git a/plugin_III/game_III/CPlayerPed.h b/plugin_III/game_III/CPlayerPed.h index 6b904a946..c370e1ffb 100644 --- a/plugin_III/game_III/CPlayerPed.h +++ b/plugin_III/game_III/CPlayerPed.h @@ -139,6 +139,32 @@ class PLUGIN_API CPlayerPed : public CPed { return m_pWanted; } }; +VALIDATE_OFFSET(CPlayerPed, m_pWanted, 0x53C); +VALIDATE_OFFSET(CPlayerPed, m_pArrestingCop, 0x540); +VALIDATE_OFFSET(CPlayerPed, m_fMoveSpeed, 0x544); +VALIDATE_OFFSET(CPlayerPed, m_fCurrentStamina, 0x548); +VALIDATE_OFFSET(CPlayerPed, m_fMaxStamina, 0x54C); +VALIDATE_OFFSET(CPlayerPed, m_fStaminaProgress, 0x550); +VALIDATE_OFFSET(CPlayerPed, m_nSelectedWepSlot, 0x554); +VALIDATE_OFFSET(CPlayerPed, m_bSpeedTimerFlag, 0x555); +VALIDATE_OFFSET(CPlayerPed, m_nEvadeAmount, 0x556); +VALIDATE_OFFSET(CPlayerPed, field_557, 0x557); +VALIDATE_OFFSET(CPlayerPed, m_nSpeedTimer, 0x558); +VALIDATE_OFFSET(CPlayerPed, m_nHitAnimDelayTimer, 0x55C); +VALIDATE_OFFSET(CPlayerPed, m_fAttackButtonCounter, 0x560); +VALIDATE_OFFSET(CPlayerPed, m_bHaveTargetSelected, 0x564); +VALIDATE_OFFSET(CPlayerPed, m_pEvadingFrom, 0x568); +VALIDATE_OFFSET(CPlayerPed, m_nTargettableObjects, 0x56C); +VALIDATE_OFFSET(CPlayerPed, m_bAdrenalineActive, 0x57C); +VALIDATE_OFFSET(CPlayerPed, m_bHasLockOnTarget, 0x57D); +VALIDATE_OFFSET(CPlayerPed, m_nAdrenalineTime, 0x580); +VALIDATE_OFFSET(CPlayerPed, m_bCanBeDamaged, 0x584); +VALIDATE_OFFSET(CPlayerPed, field_585, 0x585); +VALIDATE_OFFSET(CPlayerPed, m_vecSafePos, 0x588); +VALIDATE_OFFSET(CPlayerPed, m_pPedAtSafePos, 0x5D0); +VALIDATE_OFFSET(CPlayerPed, m_fWalkAngle, 0x5E8); +VALIDATE_OFFSET(CPlayerPed, m_fFPSMoveHeading, 0x5EC); +VALIDATE_SIZE(CPlayerPed, 0x5F0); VTABLE_DESC(CPlayerPed, 0x5FA500, 19); VALIDATE_SIZE(CPlayerPed, 0x5F0); diff --git a/plugin_III/game_III/CPlayerSkin.h b/plugin_III/game_III/CPlayerSkin.h index ce94d83d8..e66156658 100644 --- a/plugin_III/game_III/CPlayerSkin.h +++ b/plugin_III/game_III/CPlayerSkin.h @@ -20,6 +20,7 @@ class PLUGIN_API CPlayerSkin { SUPPORTED_10EN_11EN_STEAM static void RenderFrontendSkinEdit(); SUPPORTED_10EN_11EN_STEAM static void Shutdown(); }; +VALIDATE_SIZE(CPlayerSkin, 0x1); struct PLUGIN_API CPlayerSkinData { int m_nSkinId; @@ -28,6 +29,12 @@ struct PLUGIN_API CPlayerSkinData { char m_aDateInfo[256]; CPlayerSkinData *m_pNextSkin; }; +VALIDATE_OFFSET(CPlayerSkinData, m_nSkinId, 0x0); +VALIDATE_OFFSET(CPlayerSkinData, m_aSkinNameDisplayed, 0x4); +VALIDATE_OFFSET(CPlayerSkinData, m_aSkinNameOriginal, 0x104); +VALIDATE_OFFSET(CPlayerSkinData, m_aDateInfo, 0x204); +VALIDATE_OFFSET(CPlayerSkinData, m_pNextSkin, 0x304); +VALIDATE_SIZE(CPlayerSkinData, 0x308); SUPPORTED_10EN_11EN_STEAM extern RpClump *&gpPlayerClump; SUPPORTED_10EN_11EN_STEAM extern float &gOldFov; diff --git a/plugin_III/game_III/CPointLights.cpp b/plugin_III/game_III/CPointLights.cpp index 2fc1e332f..410b10605 100644 --- a/plugin_III/game_III/CPointLights.cpp +++ b/plugin_III/game_III/CPointLights.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPointLights.h" diff --git a/plugin_III/game_III/CPointLights.h b/plugin_III/game_III/CPointLights.h index a00538f74..43efe3d94 100644 --- a/plugin_III/game_III/CPointLights.h +++ b/plugin_III/game_III/CPointLights.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -26,7 +25,15 @@ class CPointLight { CPointLight(); }; - +VALIDATE_OFFSET(CPointLight, m_vecPosition, 0x0); +VALIDATE_OFFSET(CPointLight, m_vecDirection, 0xC); +VALIDATE_OFFSET(CPointLight, m_fRange, 0x18); +VALIDATE_OFFSET(CPointLight, m_fColorRed, 0x1C); +VALIDATE_OFFSET(CPointLight, m_fColorGreen, 0x20); +VALIDATE_OFFSET(CPointLight, m_fColorBlue, 0x24); +VALIDATE_OFFSET(CPointLight, m_nType, 0x28); +VALIDATE_OFFSET(CPointLight, m_nFogType, 0x29); +VALIDATE_OFFSET(CPointLight, m_bGenerateShadows, 0x2A); VALIDATE_SIZE(CPointLight, 0x2C); class CPointLights { @@ -58,5 +65,6 @@ class CPointLights { static void RemoveLightsAffectingObject(); static void RenderFogEffect(); }; +VALIDATE_SIZE(CPointLights, 0x1); extern unsigned int MAX_POINTLIGHTS; // default: 32 diff --git a/plugin_III/game_III/CPools.h b/plugin_III/game_III/CPools.h index 013743343..2f0a8b9a3 100644 --- a/plugin_III/game_III/CPools.h +++ b/plugin_III/game_III/CPools.h @@ -56,5 +56,6 @@ class PLUGIN_API CPools { SUPPORTED_10EN_11EN_STEAM static void SaveVehiclePool(unsigned char *buffer, unsigned int *outSize); SUPPORTED_10EN_11EN_STEAM static void ShutDown(); }; +VALIDATE_SIZE(CPools, 0x1); #include "meta/meta.CPools.h" diff --git a/plugin_III/game_III/CPopulation.h b/plugin_III/game_III/CPopulation.h index 3831678b3..5fa5e7336 100644 --- a/plugin_III/game_III/CPopulation.h +++ b/plugin_III/game_III/CPopulation.h @@ -74,6 +74,7 @@ class PLUGIN_API CPopulation { SUPPORTED_10EN_11EN_STEAM static void Update(); SUPPORTED_10EN_11EN_STEAM static void UpdatePedCount(ePedType pedType, bool decrease); }; +VALIDATE_SIZE(CPopulation, 0x1); //! Don't know the original name struct PLUGIN_API RegenerationPoint { @@ -90,6 +91,19 @@ struct PLUGIN_API RegenerationPoint { CVector m_vecSrcPosA; CVector m_vecSrcPosB; }; +VALIDATE_OFFSET(RegenerationPoint, srcLevel, 0x0); +VALIDATE_OFFSET(RegenerationPoint, destLevel, 0x4); +VALIDATE_OFFSET(RegenerationPoint, x1, 0x8); +VALIDATE_OFFSET(RegenerationPoint, x2, 0xC); +VALIDATE_OFFSET(RegenerationPoint, y1, 0x10); +VALIDATE_OFFSET(RegenerationPoint, y2, 0x14); +VALIDATE_OFFSET(RegenerationPoint, z1, 0x18); +VALIDATE_OFFSET(RegenerationPoint, z2, 0x1C); +VALIDATE_OFFSET(RegenerationPoint, m_vecDestPosA, 0x20); +VALIDATE_OFFSET(RegenerationPoint, m_vecDestPosB, 0x2C); +VALIDATE_OFFSET(RegenerationPoint, m_vecSrcPosA, 0x38); +VALIDATE_OFFSET(RegenerationPoint, m_vecSrcPosB, 0x44); +VALIDATE_SIZE(RegenerationPoint, 0x50); SUPPORTED_10EN_11EN_STEAM extern RegenerationPoint(&aSafeZones)[8]; // RegenerationPoint aSafeZones[8] diff --git a/plugin_III/game_III/CProjectile.h b/plugin_III/game_III/CProjectile.h index 70b07f0dd..315a0c261 100644 --- a/plugin_III/game_III/CProjectile.h +++ b/plugin_III/game_III/CProjectile.h @@ -67,6 +67,7 @@ class PLUGIN_API CProjectile : public CObject { // virtual function #17 (not overriden) }; +VALIDATE_SIZE(CProjectile, 0x198); VTABLE_DESC(CProjectile, 0x5F8048, 18); VALIDATE_SIZE(CProjectile, 0x198); diff --git a/plugin_III/game_III/CProjectileInfo.h b/plugin_III/game_III/CProjectileInfo.h index 25b5044fb..6e6a3a39f 100644 --- a/plugin_III/game_III/CProjectileInfo.h +++ b/plugin_III/game_III/CProjectileInfo.h @@ -32,7 +32,11 @@ class CProjectileInfo { static void Shutdown(); static void Update(); }; - +VALIDATE_OFFSET(CProjectileInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CProjectileInfo, m_pCreator, 0x4); +VALIDATE_OFFSET(CProjectileInfo, m_nDestroyTime, 0x8); +VALIDATE_OFFSET(CProjectileInfo, m_bActive, 0xC); +VALIDATE_OFFSET(CProjectileInfo, m_vecLastPosn, 0x10); VALIDATE_SIZE(CProjectileInfo, 0x1C); extern CProjectileInfo *gaProjectileInfo; // [32] diff --git a/plugin_III/game_III/CPtrList.h b/plugin_III/game_III/CPtrList.h index 51707f2e5..0d4166022 100644 --- a/plugin_III/game_III/CPtrList.h +++ b/plugin_III/game_III/CPtrList.h @@ -36,5 +36,4 @@ class CPtrList { return m_pHead; } }; - VALIDATE_SIZE(CPtrList, 0x4); \ No newline at end of file diff --git a/plugin_III/game_III/CPtrNode.h b/plugin_III/game_III/CPtrNode.h index ca00d61bc..d6451dc9d 100644 --- a/plugin_III/game_III/CPtrNode.h +++ b/plugin_III/game_III/CPtrNode.h @@ -20,5 +20,7 @@ class CPtrNode { static void operator delete(void* data); static void* operator new(unsigned int size); }; - +VALIDATE_OFFSET(CPtrNode, m_pVoid, 0x0); +VALIDATE_OFFSET(CPtrNode, m_pPrev, 0x4); +VALIDATE_OFFSET(CPtrNode, m_pNext, 0x8); VALIDATE_SIZE(CPtrNode, 0xC); diff --git a/plugin_III/game_III/CQuaternion.h b/plugin_III/game_III/CQuaternion.h index 3275b9f36..26622db06 100644 --- a/plugin_III/game_III/CQuaternion.h +++ b/plugin_III/game_III/CQuaternion.h @@ -19,7 +19,8 @@ class PLUGIN_API CQuaternion { //! Spherical linear interpolation SUPPORTED_10EN_11EN_STEAM void Slerp(CQuaternion const &from, CQuaternion const &to, float halftheta, float sintheta_inv, float t); }; - +VALIDATE_OFFSET(CQuaternion, imag, 0x0); +VALIDATE_OFFSET(CQuaternion, real, 0xC); VALIDATE_SIZE(CQuaternion, 0x10); #include "meta/meta.CQuaternion.h" diff --git a/plugin_III/game_III/CRadar.h b/plugin_III/game_III/CRadar.h index 7ca15aa4a..6c1c1b116 100644 --- a/plugin_III/game_III/CRadar.h +++ b/plugin_III/game_III/CRadar.h @@ -80,7 +80,18 @@ class PLUGIN_API tRadarTrace { unsigned short m_nBlipDisplay; //!< see eBlipDisplay unsigned short m_nRadarSprite; //!< see eRadarSprite }; - +VALIDATE_OFFSET(tRadarTrace, m_nColour, 0x0); +VALIDATE_OFFSET(tRadarTrace, m_nBlipType, 0x4); +VALIDATE_OFFSET(tRadarTrace, m_nEntityHandle, 0x8); +VALIDATE_OFFSET(tRadarTrace, m_vec2DPos, 0xC); +VALIDATE_OFFSET(tRadarTrace, m_vecPos, 0x14); +VALIDATE_OFFSET(tRadarTrace, m_nBlipIndex, 0x20); +VALIDATE_OFFSET(tRadarTrace, m_bDim, 0x22); +VALIDATE_OFFSET(tRadarTrace, m_bInUse, 0x23); +VALIDATE_OFFSET(tRadarTrace, m_fSphereRadius, 0x24); +VALIDATE_OFFSET(tRadarTrace, m_nBlipSize, 0x28); +VALIDATE_OFFSET(tRadarTrace, m_nBlipDisplay, 0x2A); +VALIDATE_OFFSET(tRadarTrace, m_nRadarSprite, 0x2C); VALIDATE_SIZE(tRadarTrace, 0x30); class PLUGIN_API CRadar { @@ -148,6 +159,7 @@ class PLUGIN_API CRadar { SUPPORTED_10EN_11EN_STEAM static void TransformRealWorldPointToRadarSpace(CVector2D &out, CVector2D const &in); SUPPORTED_10EN_11EN_STEAM static void TransformRealWorldToTexCoordSpace(CVector2D &out, CVector2D const &in, int x, int y); }; +VALIDATE_SIZE(CRadar, 0x1); SUPPORTED_10EN_11EN_STEAM extern CSprite2d *(&pRadarSprites)[21]; // CSprite2d *pRadarSprites[21] SUPPORTED_10EN_11EN_STEAM extern char *(&gRadarTexNames)[64]; // char const *gRadarTexNames[64] diff --git a/plugin_III/game_III/CRange2D.h b/plugin_III/game_III/CRange2D.h index 7ac5a9680..4ceee25b7 100644 --- a/plugin_III/game_III/CRange2D.h +++ b/plugin_III/game_III/CRange2D.h @@ -16,7 +16,8 @@ class PLUGIN_API CRange2D { SUPPORTED_10EN_11EN_STEAM CVector2D *GetRandomPointInRange(); }; - +VALIDATE_OFFSET(CRange2D, m_vec2dMin, 0x0); +VALIDATE_OFFSET(CRange2D, m_vec2dMax, 0x8); VALIDATE_SIZE(CRange2D, 0x10); #include "meta/meta.CRange2D.h" diff --git a/plugin_III/game_III/CRecordDataForChase.h b/plugin_III/game_III/CRecordDataForChase.h index a422fe298..074cb4d8b 100644 --- a/plugin_III/game_III/CRecordDataForChase.h +++ b/plugin_III/game_III/CRecordDataForChase.h @@ -35,7 +35,20 @@ class PLUGIN_API CCarStateEachFrame { bool m_bIsHandbrakeOn; CVector m_vecPos; }; - +VALIDATE_OFFSET(CCarStateEachFrame, m_nMoveSpeedX, 0x0); +VALIDATE_OFFSET(CCarStateEachFrame, m_nMoveSpeedY, 0x2); +VALIDATE_OFFSET(CCarStateEachFrame, m_nMoveSpeedZ, 0x4); +VALIDATE_OFFSET(CCarStateEachFrame, m_nRightX, 0x6); +VALIDATE_OFFSET(CCarStateEachFrame, m_nRightY, 0x7); +VALIDATE_OFFSET(CCarStateEachFrame, m_nRightZ, 0x8); +VALIDATE_OFFSET(CCarStateEachFrame, m_nUpX, 0x9); +VALIDATE_OFFSET(CCarStateEachFrame, m_nUpY, 0xA); +VALIDATE_OFFSET(CCarStateEachFrame, m_nUpZ, 0xB); +VALIDATE_OFFSET(CCarStateEachFrame, m_nSteerAngle, 0xC); +VALIDATE_OFFSET(CCarStateEachFrame, m_nGasPedal, 0xD); +VALIDATE_OFFSET(CCarStateEachFrame, m_nBreakPedal, 0xE); +VALIDATE_OFFSET(CCarStateEachFrame, m_bIsHandbrakeOn, 0xF); +VALIDATE_OFFSET(CCarStateEachFrame, m_vecPos, 0x10); VALIDATE_SIZE(CCarStateEachFrame, 0x1C); class PLUGIN_API CRecordDataForChase { @@ -72,6 +85,7 @@ class PLUGIN_API CRecordDataForChase { return false; } }; +VALIDATE_SIZE(CRecordDataForChase, 0x1); SUPPORTED_10EN_11EN_STEAM void RemoveUnusedCollision(); diff --git a/plugin_III/game_III/CRecordDataForGame.h b/plugin_III/game_III/CRecordDataForGame.h index 127aece5c..dff12a306 100644 --- a/plugin_III/game_III/CRecordDataForGame.h +++ b/plugin_III/game_III/CRecordDataForGame.h @@ -28,6 +28,7 @@ class PLUGIN_API CRecordDataForGame { SUPPORTED_10EN_11EN_STEAM static void SaveOrRetrieveDataForThisFrame(); SUPPORTED_10EN_11EN_STEAM static unsigned char *UnPackCurrentPadValues(unsigned char *buf, unsigned char total, CControllerState *state); }; +VALIDATE_SIZE(CRecordDataForGame, 0x1); struct PLUGIN_API tGameBuffer { float m_fTimeStep; @@ -36,6 +37,12 @@ struct PLUGIN_API tGameBuffer { unsigned short m_nChecksum; unsigned char m_ControllerBuffer[116]; }; +VALIDATE_OFFSET(tGameBuffer, m_fTimeStep, 0x0); +VALIDATE_OFFSET(tGameBuffer, m_nTimeInMilliseconds, 0x4); +VALIDATE_OFFSET(tGameBuffer, m_nSizeOfPads, 0x8); +VALIDATE_OFFSET(tGameBuffer, m_nChecksum, 0xA); +VALIDATE_OFFSET(tGameBuffer, m_ControllerBuffer, 0xC); +VALIDATE_SIZE(tGameBuffer, 0x80); SUPPORTED_10EN_11EN_STEAM extern tGameBuffer &BufferDataToBeSaved; diff --git a/plugin_III/game_III/CRect.h b/plugin_III/game_III/CRect.h index 119de9993..498c0e1df 100644 --- a/plugin_III/game_III/CRect.h +++ b/plugin_III/game_III/CRect.h @@ -92,5 +92,8 @@ class CRect { bottom = y; } }; - +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); VALIDATE_SIZE(CRect, 0x10); \ No newline at end of file diff --git a/plugin_III/game_III/CReference.h b/plugin_III/game_III/CReference.h index 065b15b9e..2f48429ef 100644 --- a/plugin_III/game_III/CReference.h +++ b/plugin_III/game_III/CReference.h @@ -13,5 +13,6 @@ struct PLUGIN_API CReference { CReference *m_pNext; CEntity **m_ppEntity; }; - +VALIDATE_OFFSET(CReference, m_pNext, 0x0); +VALIDATE_OFFSET(CReference, m_ppEntity, 0x4); VALIDATE_SIZE(CReference, 0x8); diff --git a/plugin_III/game_III/CReferences.h b/plugin_III/game_III/CReferences.h index d23ef9b07..6d28149b0 100644 --- a/plugin_III/game_III/CReferences.h +++ b/plugin_III/game_III/CReferences.h @@ -18,5 +18,6 @@ class PLUGIN_API CReferences { SUPPORTED_10EN_11EN_STEAM static void PruneAllReferencesInWorld(); SUPPORTED_10EN_11EN_STEAM static void RemoveReferencesToPlayer(); }; +VALIDATE_SIZE(CReferences, 0x1); #include "meta/meta.CReferences.h" diff --git a/plugin_III/game_III/CRegisteredCorona.h b/plugin_III/game_III/CRegisteredCorona.h index 532275589..0c97a787b 100644 --- a/plugin_III/game_III/CRegisteredCorona.h +++ b/plugin_III/game_III/CRegisteredCorona.h @@ -47,7 +47,30 @@ class PLUGIN_API CRegisteredCorona { SUPPORTED_10EN_11EN_STEAM void Update(); }; - +VALIDATE_OFFSET(CRegisteredCorona, m_nUniqueID, 0x0); +VALIDATE_OFFSET(CRegisteredCorona, m_nLastLOScheck, 0x4); +VALIDATE_OFFSET(CRegisteredCorona, m_pTexture, 0x8); +VALIDATE_OFFSET(CRegisteredCorona, m_nRed, 0xC); +VALIDATE_OFFSET(CRegisteredCorona, m_nGreen, 0xD); +VALIDATE_OFFSET(CRegisteredCorona, m_nBlue, 0xE); +VALIDATE_OFFSET(CRegisteredCorona, m_nAlpha, 0xF); +VALIDATE_OFFSET(CRegisteredCorona, m_nFadeAlpha, 0x10); +VALIDATE_OFFSET(CRegisteredCorona, m_vecPos, 0x14); +VALIDATE_OFFSET(CRegisteredCorona, m_fSize, 0x20); +VALIDATE_OFFSET(CRegisteredCorona, m_fSomeAngle, 0x24); +VALIDATE_OFFSET(CRegisteredCorona, m_bRegisteredThisFrame, 0x28); +VALIDATE_OFFSET(CRegisteredCorona, m_fDrawDist, 0x2C); +VALIDATE_OFFSET(CRegisteredCorona, m_nFlareType, 0x30); +VALIDATE_OFFSET(CRegisteredCorona, m_nReflection, 0x31); +VALIDATE_OFFSET(CRegisteredCorona, m_nFlags, 0x32); +VALIDATE_OFFSET(CRegisteredCorona, m_bRenderReflection, 0x33); +VALIDATE_OFFSET(CRegisteredCorona, m_fHeightAboveRoad, 0x34); +VALIDATE_OFFSET(CRegisteredCorona, m_afPrevX, 0x38); +VALIDATE_OFFSET(CRegisteredCorona, m_afPrevY, 0x50); +VALIDATE_OFFSET(CRegisteredCorona, m_anPrevRed, 0x68); +VALIDATE_OFFSET(CRegisteredCorona, m_anPrevGreen, 0x6E); +VALIDATE_OFFSET(CRegisteredCorona, m_anPrevBlue, 0x74); +VALIDATE_OFFSET(CRegisteredCorona, m_abHasValue, 0x7A); VALIDATE_SIZE(CRegisteredCorona, 0x80); #include "meta/meta.CRegisteredCorona.h" diff --git a/plugin_III/game_III/CRegisteredMotionBlurStreak.h b/plugin_III/game_III/CRegisteredMotionBlurStreak.h index a54a6939f..bd63f1045 100644 --- a/plugin_III/game_III/CRegisteredMotionBlurStreak.h +++ b/plugin_III/game_III/CRegisteredMotionBlurStreak.h @@ -24,6 +24,12 @@ class PLUGIN_API CRegisteredMotionBlurStreak { SUPPORTED_10EN_11EN_STEAM void Render(); SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_nId, 0x0); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_color, 0x4); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecLeftPoints, 0x8); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecRightPoints, 0x2C); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_bExists, 0x50); +VALIDATE_SIZE(CRegisteredMotionBlurStreak, 0x54); SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&StreakIndexList)[12]; // RwImVertexIndex StreakIndexList[12] SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&StreakVertices)[4]; // RwIm3DVertex StreakVertices[4] diff --git a/plugin_III/game_III/CRegisteredShinyText.h b/plugin_III/game_III/CRegisteredShinyText.h index 9d1bed76c..3eb0d148b 100644 --- a/plugin_III/game_III/CRegisteredShinyText.h +++ b/plugin_III/game_III/CRegisteredShinyText.h @@ -28,7 +28,19 @@ class PLUGIN_API CRegisteredShinyText { unsigned char m_nGreen; unsigned char m_nBlue; }; - +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAA, 0x0); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAB, 0xC); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBA, 0x18); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBB, 0x24); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAA, 0x30); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAB, 0x38); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBA, 0x40); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBB, 0x48); +VALIDATE_OFFSET(CRegisteredShinyText, m_fDistanceToCamera, 0x50); +VALIDATE_OFFSET(CRegisteredShinyText, m_nType, 0x54); +VALIDATE_OFFSET(CRegisteredShinyText, m_nRed, 0x55); +VALIDATE_OFFSET(CRegisteredShinyText, m_nGreen, 0x56); +VALIDATE_OFFSET(CRegisteredShinyText, m_nBlue, 0x57); VALIDATE_SIZE(CRegisteredShinyText, 0x58); #include "meta/meta.CRegisteredShinyText.h" diff --git a/plugin_III/game_III/CRemote.h b/plugin_III/game_III/CRemote.h index 139af7be6..0b1ff0afc 100644 --- a/plugin_III/game_III/CRemote.h +++ b/plugin_III/game_III/CRemote.h @@ -13,5 +13,6 @@ class PLUGIN_API CRemote { SUPPORTED_10EN_11EN_STEAM static void GivePlayerRemoteControlledCar(float x, float y, float z, float angle, unsigned short modelIndex); SUPPORTED_10EN_11EN_STEAM static void TakeRemoteControlledCarFromPlayer(); }; +VALIDATE_SIZE(CRemote, 0x1); #include "meta/meta.CRemote.h" diff --git a/plugin_III/game_III/CRenderer.cpp b/plugin_III/game_III/CRenderer.cpp index b44ce7bd9..1f5200d93 100644 --- a/plugin_III/game_III/CRenderer.cpp +++ b/plugin_III/game_III/CRenderer.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CRenderer.h" diff --git a/plugin_III/game_III/CRenderer.h b/plugin_III/game_III/CRenderer.h index 5b8bce525..aa8b86cf8 100644 --- a/plugin_III/game_III/CRenderer.h +++ b/plugin_III/game_III/CRenderer.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -17,3 +17,4 @@ class CRenderer { public: static void ConstructRenderList(); }; +VALIDATE_SIZE(CRenderer, 0x1); diff --git a/plugin_III/game_III/CReplay.cpp b/plugin_III/game_III/CReplay.cpp index 5ef4d401b..d96a04ea9 100644 --- a/plugin_III/game_III/CReplay.cpp +++ b/plugin_III/game_III/CReplay.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CReplay.h" diff --git a/plugin_III/game_III/CReplay.h b/plugin_III/game_III/CReplay.h index 8612ec1e1..b3ecc5a51 100644 --- a/plugin_III/game_III/CReplay.h +++ b/plugin_III/game_III/CReplay.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -10,5 +10,5 @@ class PLUGIN_API CReplay { public: static char &Mode; - -}; \ No newline at end of file +}; +VALIDATE_SIZE(CReplay, 0x1); \ No newline at end of file diff --git a/plugin_III/game_III/CRestart.h b/plugin_III/game_III/CRestart.h index 38f983c9b..f6d318905 100644 --- a/plugin_III/game_III/CRestart.h +++ b/plugin_III/game_III/CRestart.h @@ -35,5 +35,6 @@ class PLUGIN_API CRestart { SUPPORTED_10EN_11EN_STEAM static void OverrideNextRestart(CVector const &pos, float heading); SUPPORTED_10EN_11EN_STEAM static void SaveAllRestartPoints(unsigned char *buf, unsigned int *size); }; +VALIDATE_SIZE(CRestart, 0x1); #include "meta/meta.CRestart.h" diff --git a/plugin_III/game_III/CRoadBlocks.h b/plugin_III/game_III/CRoadBlocks.h index b60c922bd..dc268dacf 100644 --- a/plugin_III/game_III/CRoadBlocks.h +++ b/plugin_III/game_III/CRoadBlocks.h @@ -19,5 +19,6 @@ class PLUGIN_API CRoadBlocks { SUPPORTED_10EN_11EN_STEAM static void GenerateRoadBlocks(); SUPPORTED_10EN_11EN_STEAM static void Init(); }; +VALIDATE_SIZE(CRoadBlocks, 0x1); #include "meta/meta.CRoadBlocks.h" diff --git a/plugin_III/game_III/CRouteNode.h b/plugin_III/game_III/CRouteNode.h index b5fb4af7c..f31e9eb8d 100644 --- a/plugin_III/game_III/CRouteNode.h +++ b/plugin_III/game_III/CRouteNode.h @@ -24,6 +24,9 @@ class PLUGIN_API CRouteNode { SUPPORTED_10EN_11EN_STEAM static void Initialise(); SUPPORTED_10EN_11EN_STEAM static void RemoveRoute(short route); }; +VALIDATE_OFFSET(CRouteNode, m_nRoute, 0x0); +VALIDATE_OFFSET(CRouteNode, m_vecPosition, 0x4); +VALIDATE_SIZE(CRouteNode, 0x10); SUPPORTED_10EN_11EN_STEAM extern CRouteNode(&gaRoutes)[200]; // CRouteNode gaRoutes[200] diff --git a/plugin_III/game_III/CRubbish.h b/plugin_III/game_III/CRubbish.h index a67140901..d31af6344 100644 --- a/plugin_III/game_III/CRubbish.h +++ b/plugin_III/game_III/CRubbish.h @@ -30,6 +30,7 @@ class PLUGIN_API CRubbish { SUPPORTED_10EN_11EN_STEAM static void StirUp(CVehicle *vehicle); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CRubbish, 0x1); SUPPORTED_10EN_11EN_STEAM extern float(&aAnimations)[3][34]; // float aAnimations[3][34] SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&RubbishIndexList)[6]; // RwImVertexIndex RubbishIndexList[6] diff --git a/plugin_III/game_III/CRunningScript.cpp b/plugin_III/game_III/CRunningScript.cpp index 3ca360021..434cc1845 100644 --- a/plugin_III/game_III/CRunningScript.cpp +++ b/plugin_III/game_III/CRunningScript.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_III/game_III/CRunningScript.h b/plugin_III/game_III/CRunningScript.h index f1c397ba2..57512c9e0 100644 --- a/plugin_III/game_III/CRunningScript.h +++ b/plugin_III/game_III/CRunningScript.h @@ -65,5 +65,22 @@ class PLUGIN_API CRunningScript { static unsigned char *GetScriptSpaceBase(); }; - +VALIDATE_OFFSET(CRunningScript, m_pNext, 0x0); +VALIDATE_OFFSET(CRunningScript, m_pPrev, 0x4); +VALIDATE_OFFSET(CRunningScript, m_szName, 0x8); +VALIDATE_OFFSET(CRunningScript, m_nIp, 0x10); +VALIDATE_OFFSET(CRunningScript, m_anStack, 0x14); +VALIDATE_OFFSET(CRunningScript, m_nSP, 0x2C); +VALIDATE_OFFSET(CRunningScript, m_aLocalVars, 0x30); +VALIDATE_OFFSET(CRunningScript, m_anTimers, 0x70); +VALIDATE_OFFSET(CRunningScript, m_bCondResult, 0x78); +VALIDATE_OFFSET(CRunningScript, m_bUseMissionCleanup, 0x79); +VALIDATE_OFFSET(CRunningScript, m_bIsActive, 0x7A); +VALIDATE_OFFSET(CRunningScript, m_bAwake, 0x7B); +VALIDATE_OFFSET(CRunningScript, m_nWakeTime, 0x7C); +VALIDATE_OFFSET(CRunningScript, m_nLogicalOp, 0x80); +VALIDATE_OFFSET(CRunningScript, m_bNotFlag, 0x82); +VALIDATE_OFFSET(CRunningScript, m_bWastedBustedCheck, 0x83); +VALIDATE_OFFSET(CRunningScript, m_bWastedOrBusted, 0x84); +VALIDATE_OFFSET(CRunningScript, m_bIsMission, 0x85); VALIDATE_SIZE(CRunningScript, 0x88); diff --git a/plugin_III/game_III/CScene.h b/plugin_III/game_III/CScene.h index 47ec566f8..7a8065a0c 100644 --- a/plugin_III/game_III/CScene.h +++ b/plugin_III/game_III/CScene.h @@ -14,6 +14,9 @@ class PLUGIN_API CScene { RpWorld *m_pWorld; RwCamera *m_pCamera; }; +VALIDATE_OFFSET(CScene, m_pWorld, 0x0); +VALIDATE_OFFSET(CScene, m_pCamera, 0x4); +VALIDATE_SIZE(CScene, 0x8); SUPPORTED_10EN_11EN_STEAM extern CScene &Scene; diff --git a/plugin_III/game_III/CSceneEdit.h b/plugin_III/game_III/CSceneEdit.h index 72d00e407..88bf73244 100644 --- a/plugin_III/game_III/CSceneEdit.h +++ b/plugin_III/game_III/CSceneEdit.h @@ -59,6 +59,7 @@ class CSceneEdit { static bool SelectVehicle(); static bool SelectWeapon(); }; +VALIDATE_SIZE(CSceneEdit, 0x1); // PrevOrNextModelIndex: -1 (prev), 1 (next) int NextValidModelId(int currentModelIndex, int PrevOrNextModelIndex); diff --git a/plugin_III/game_III/CScrollBar.h b/plugin_III/game_III/CScrollBar.h index cb08836d0..d134536e0 100644 --- a/plugin_III/game_III/CScrollBar.h +++ b/plugin_III/game_III/CScrollBar.h @@ -45,7 +45,20 @@ class PLUGIN_API CScrollBar { SUPPORTED_10EN_11EN_STEAM static char const *GetBridgeString(); SUPPORTED_10EN_11EN_STEAM static char const *GetTunnelString(); }; - +VALIDATE_OFFSET(CScrollBar, m_Counter, 0x0); +VALIDATE_OFFSET(CScrollBar, m_pMessage, 0x4); +VALIDATE_OFFSET(CScrollBar, m_vecPosition, 0x8); +VALIDATE_OFFSET(CScrollBar, m_MessageCurrentChar, 0x14); +VALIDATE_OFFSET(CScrollBar, m_MessageLength, 0x18); +VALIDATE_OFFSET(CScrollBar, m_vecSize, 0x1C); +VALIDATE_OFFSET(CScrollBar, m_fIntensity, 0x28); +VALIDATE_OFFSET(CScrollBar, m_MessageBar, 0x2C); +VALIDATE_OFFSET(CScrollBar, m_nType, 0x54); +VALIDATE_OFFSET(CScrollBar, m_bVisible, 0x55); +VALIDATE_OFFSET(CScrollBar, m_nRed, 0x56); +VALIDATE_OFFSET(CScrollBar, m_nGreen, 0x57); +VALIDATE_OFFSET(CScrollBar, m_nBlue, 0x58); +VALIDATE_OFFSET(CScrollBar, m_fScale, 0x5C); VALIDATE_SIZE(CScrollBar, 0x60); #include "meta/meta.CScrollBar.h" diff --git a/plugin_III/game_III/CSector.h b/plugin_III/game_III/CSector.h index 47bccf4eb..fd656e8e4 100644 --- a/plugin_III/game_III/CSector.h +++ b/plugin_III/game_III/CSector.h @@ -22,5 +22,14 @@ class CSector { CPtrList m_dummyList; CPtrList m_dummyOverlapList; }; - +VALIDATE_OFFSET(CSector, m_buildingList, 0x0); +VALIDATE_OFFSET(CSector, m_buildingOverlapList, 0x4); +VALIDATE_OFFSET(CSector, m_objectList, 0x8); +VALIDATE_OFFSET(CSector, m_objectOverlapList, 0xC); +VALIDATE_OFFSET(CSector, m_vehicleList, 0x10); +VALIDATE_OFFSET(CSector, m_vehicleOverlapList, 0x14); +VALIDATE_OFFSET(CSector, m_pedList, 0x18); +VALIDATE_OFFSET(CSector, m_pedOverlapList, 0x1C); +VALIDATE_OFFSET(CSector, m_dummyList, 0x20); +VALIDATE_OFFSET(CSector, m_dummyOverlapList, 0x24); VALIDATE_SIZE(CSector, 0x28); \ No newline at end of file diff --git a/plugin_III/game_III/CShadows.h b/plugin_III/game_III/CShadows.h index bee299aff..82f17c348 100644 --- a/plugin_III/game_III/CShadows.h +++ b/plugin_III/game_III/CShadows.h @@ -63,7 +63,11 @@ class CPolyBunch { CPolyBunch(); }; - +VALIDATE_OFFSET(CPolyBunch, m_nNumVerts, 0x0); +VALIDATE_OFFSET(CPolyBunch, m_avecPosn, 0x4); +VALIDATE_OFFSET(CPolyBunch, m_aU, 0x58); +VALIDATE_OFFSET(CPolyBunch, m_aV, 0x5F); +VALIDATE_OFFSET(CPolyBunch, m_pNext, 0x68); VALIDATE_SIZE(CPolyBunch, 0x6C); class CRegisteredShadow { @@ -88,7 +92,18 @@ class CRegisteredShadow { CRegisteredShadow(); }; - +VALIDATE_OFFSET(CRegisteredShadow, m_vecPos, 0x0); +VALIDATE_OFFSET(CRegisteredShadow, m_vec2dFront, 0xC); +VALIDATE_OFFSET(CRegisteredShadow, m_vec2dSide, 0x14); +VALIDATE_OFFSET(CRegisteredShadow, m_fZDistance, 0x1C); +VALIDATE_OFFSET(CRegisteredShadow, m_fScale, 0x20); +VALIDATE_OFFSET(CRegisteredShadow, m_nIntensity, 0x24); +VALIDATE_OFFSET(CRegisteredShadow, m_nShadowType, 0x26); +VALIDATE_OFFSET(CRegisteredShadow, m_nRed, 0x27); +VALIDATE_OFFSET(CRegisteredShadow, m_nGreen, 0x28); +VALIDATE_OFFSET(CRegisteredShadow, m_nBlue, 0x29); +VALIDATE_OFFSET(CRegisteredShadow, m_nFlags, 0x2A); +VALIDATE_OFFSET(CRegisteredShadow, m_pTexture, 0x2C); VALIDATE_SIZE(CRegisteredShadow, 0x30); class CPermanentShadow { @@ -110,7 +125,19 @@ class CPermanentShadow { CPermanentShadow(); }; - +VALIDATE_OFFSET(CPermanentShadow, m_vecPos, 0x0); +VALIDATE_OFFSET(CPermanentShadow, m_vec2dFront, 0xC); +VALIDATE_OFFSET(CPermanentShadow, m_vec2dSide, 0x14); +VALIDATE_OFFSET(CPermanentShadow, m_fZDistance, 0x1C); +VALIDATE_OFFSET(CPermanentShadow, m_fScale, 0x20); +VALIDATE_OFFSET(CPermanentShadow, m_nIntensity, 0x24); +VALIDATE_OFFSET(CPermanentShadow, m_nType, 0x26); +VALIDATE_OFFSET(CPermanentShadow, m_nRed, 0x27); +VALIDATE_OFFSET(CPermanentShadow, m_nGreen, 0x28); +VALIDATE_OFFSET(CPermanentShadow, m_nBlue, 0x29); +VALIDATE_OFFSET(CPermanentShadow, m_nTimeCreated, 0x2C); +VALIDATE_OFFSET(CPermanentShadow, m_nTimeDuration, 0x30); +VALIDATE_OFFSET(CPermanentShadow, m_pTexture, 0x34); VALIDATE_SIZE(CPermanentShadow, 0x38); class CStaticShadow { @@ -138,7 +165,23 @@ class CStaticShadow { CStaticShadow(); void Free(); }; - +VALIDATE_OFFSET(CStaticShadow, m_nId, 0x0); +VALIDATE_OFFSET(CStaticShadow, m_pPolyBunch, 0x4); +VALIDATE_OFFSET(CStaticShadow, m_nTimeCreated, 0x8); +VALIDATE_OFFSET(CStaticShadow, m_vecPosn, 0xC); +VALIDATE_OFFSET(CStaticShadow, m_vec2dFront, 0x18); +VALIDATE_OFFSET(CStaticShadow, m_vec2dSide, 0x20); +VALIDATE_OFFSET(CStaticShadow, m_fZDistance, 0x28); +VALIDATE_OFFSET(CStaticShadow, m_fScale, 0x2C); +VALIDATE_OFFSET(CStaticShadow, m_nType, 0x30); +VALIDATE_OFFSET(CStaticShadow, m_nIntensity, 0x32); +VALIDATE_OFFSET(CStaticShadow, m_nRed, 0x34); +VALIDATE_OFFSET(CStaticShadow, m_nGreen, 0x35); +VALIDATE_OFFSET(CStaticShadow, m_nBlue, 0x36); +VALIDATE_OFFSET(CStaticShadow, m_bJustCreated, 0x37); +VALIDATE_OFFSET(CStaticShadow, m_bRendered, 0x38); +VALIDATE_OFFSET(CStaticShadow, m_bTemporaryShadow, 0x39); +VALIDATE_OFFSET(CStaticShadow, m_pTexture, 0x3C); VALIDATE_SIZE(CStaticShadow, 0x40); class CShadows { @@ -177,6 +220,7 @@ class CShadows { static void RenderExtraPlayerShadows(); static void TidyUpShadows(); }; +VALIDATE_SIZE(CShadows, 0x1); extern RwTexture*& gpShadowCarTex; extern RwTexture*& gpShadowExplosionTex; diff --git a/plugin_III/game_III/CShinyTexts.h b/plugin_III/game_III/CShinyTexts.h index b0bfb2901..8426657c3 100644 --- a/plugin_III/game_III/CShinyTexts.h +++ b/plugin_III/game_III/CShinyTexts.h @@ -19,5 +19,6 @@ class PLUGIN_API CShinyTexts { SUPPORTED_10EN_11EN_STEAM static void Render(); SUPPORTED_10EN_11EN_STEAM static void RenderOutGeometryBuffer(); }; +VALIDATE_SIZE(CShinyTexts, 0x1); #include "meta/meta.CShinyTexts.h" diff --git a/plugin_III/game_III/CShotInfo.h b/plugin_III/game_III/CShotInfo.h index bbd1ec2f1..4366007a9 100644 --- a/plugin_III/game_III/CShotInfo.h +++ b/plugin_III/game_III/CShotInfo.h @@ -30,6 +30,15 @@ class PLUGIN_API CShotInfo { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_OFFSET(CShotInfo, weaponType, 0x0); +VALIDATE_OFFSET(CShotInfo, m_vecStartPos, 0x4); +VALIDATE_OFFSET(CShotInfo, m_vecAreaAffected, 0x10); +VALIDATE_OFFSET(CShotInfo, m_fRadius, 0x1C); +VALIDATE_OFFSET(CShotInfo, m_pSourceEntity, 0x20); +VALIDATE_OFFSET(CShotInfo, m_fTimeOut, 0x24); +VALIDATE_OFFSET(CShotInfo, m_bExist, 0x28); +VALIDATE_OFFSET(CShotInfo, m_bExecuted, 0x29); +VALIDATE_SIZE(CShotInfo, 0x2C); SUPPORTED_10EN_11EN_STEAM extern CShotInfo(&gaShotInfo)[100]; // CShotInfo gaShotInfo[100] diff --git a/plugin_III/game_III/CSimpleModelInfo.h b/plugin_III/game_III/CSimpleModelInfo.h index 2f256a721..ca3e96949 100644 --- a/plugin_III/game_III/CSimpleModelInfo.h +++ b/plugin_III/game_III/CSimpleModelInfo.h @@ -52,6 +52,12 @@ class PLUGIN_API CSimpleModelInfo : public CBaseModelInfo { SUPPORTED_10EN_11EN_STEAM void SetLodDistances(float *distance); SUPPORTED_10EN_11EN_STEAM void SetupBigBuilding(); }; +VALIDATE_OFFSET(CSimpleModelInfo, m_apAtomics, 0x30); +VALIDATE_OFFSET(CSimpleModelInfo, m_afLodDistances, 0x3C); +VALIDATE_OFFSET(CSimpleModelInfo, m_nNumAtomics, 0x48); +VALIDATE_OFFSET(CSimpleModelInfo, m_nVisibility, 0x49); +VALIDATE_OFFSET(CSimpleModelInfo, m_nSimpleModelFlags, 0x4A); +VALIDATE_SIZE(CSimpleModelInfo, 0x4C); VTABLE_DESC(CSimpleModelInfo, 0x5FDF98, 6); VALIDATE_SIZE(CSimpleModelInfo, 0x4C); diff --git a/plugin_III/game_III/CSkidmark.h b/plugin_III/game_III/CSkidmark.h index 81812ab18..00470b4f9 100644 --- a/plugin_III/game_III/CSkidmark.h +++ b/plugin_III/game_III/CSkidmark.h @@ -25,7 +25,17 @@ class PLUGIN_API CSkidmark { CVector m_avecPos[16]; CVector m_avecSide[16]; }; - +VALIDATE_OFFSET(CSkidmark, m_nState, 0x0); +VALIDATE_OFFSET(CSkidmark, m_bWasUpdated, 0x1); +VALIDATE_OFFSET(CSkidmark, m_bIsBloody, 0x2); +VALIDATE_OFFSET(CSkidmark, m_bIsMuddy, 0x3); +VALIDATE_OFFSET(CSkidmark, m_nId, 0x4); +VALIDATE_OFFSET(CSkidmark, m_nLast, 0x8); +VALIDATE_OFFSET(CSkidmark, m_nLastUpdate, 0xC); +VALIDATE_OFFSET(CSkidmark, m_nFadeStart, 0x10); +VALIDATE_OFFSET(CSkidmark, m_nFadeEnd, 0x14); +VALIDATE_OFFSET(CSkidmark, m_avecPos, 0x18); +VALIDATE_OFFSET(CSkidmark, m_avecSide, 0xD8); VALIDATE_SIZE(CSkidmark, 0x198); #include "meta/meta.CSkidmark.h" diff --git a/plugin_III/game_III/CSkidmarks.h b/plugin_III/game_III/CSkidmarks.h index 69f83ffa2..6286419fd 100644 --- a/plugin_III/game_III/CSkidmarks.h +++ b/plugin_III/game_III/CSkidmarks.h @@ -21,6 +21,7 @@ class PLUGIN_API CSkidmarks { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CSkidmarks, 0x1); SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&SkidmarkIndexList)[96]; // RwImVertexIndex SkidmarkIndexList[96] SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&SkidmarkVertices)[32]; // RwIm3DVertex SkidmarkVertices[32] diff --git a/plugin_III/game_III/CSpecialFX.h b/plugin_III/game_III/CSpecialFX.h index 809634965..bbb85e10b 100644 --- a/plugin_III/game_III/CSpecialFX.h +++ b/plugin_III/game_III/CSpecialFX.h @@ -16,6 +16,7 @@ class PLUGIN_API CSpecialFX { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CSpecialFX, 0x1); SUPPORTED_10EN_11EN_STEAM RwObject *LookForBatCB(RwObject *object, void *data); diff --git a/plugin_III/game_III/CSpecialParticleStuff.h b/plugin_III/game_III/CSpecialParticleStuff.h index 5686ee4cf..1475dd301 100644 --- a/plugin_III/game_III/CSpecialParticleStuff.h +++ b/plugin_III/game_III/CSpecialParticleStuff.h @@ -17,5 +17,6 @@ class PLUGIN_API CSpecialParticleStuff { SUPPORTED_10EN_11EN_STEAM static void StartBoatFoamAnimation(); SUPPORTED_10EN_11EN_STEAM static void UpdateBoatFoamAnimation(CMatrix *matrix); }; +VALIDATE_SIZE(CSpecialParticleStuff, 0x1); #include "meta/meta.CSpecialParticleStuff.h" diff --git a/plugin_III/game_III/CSphere.h b/plugin_III/game_III/CSphere.h index 472ded8db..f51dd30ae 100644 --- a/plugin_III/game_III/CSphere.h +++ b/plugin_III/game_III/CSphere.h @@ -14,5 +14,6 @@ class PLUGIN_API CSphere { CVector m_vecCenter; float m_fRadius; }; - +VALIDATE_OFFSET(CSphere, m_vecCenter, 0x0); +VALIDATE_OFFSET(CSphere, m_fRadius, 0xC); VALIDATE_SIZE(CSphere, 0x10); \ No newline at end of file diff --git a/plugin_III/game_III/CSprite.h b/plugin_III/game_III/CSprite.h index 0a0380f7d..42148bb04 100644 --- a/plugin_III/game_III/CSprite.h +++ b/plugin_III/game_III/CSprite.h @@ -35,6 +35,7 @@ class PLUGIN_API CSprite { SUPPORTED_10EN_11EN_STEAM static void Set6Vertices2D(RwIm2DVertex *vertex, CRect const &rect, CRGBA const &color1, CRGBA const &color2, CRGBA const &color3, CRGBA const &color4); SUPPORTED_10EN_11EN_STEAM static void Set6Vertices2D(RwIm2DVertex *vertex, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, CRGBA const &color1, CRGBA const &color2, CRGBA const &color3, CRGBA const &color4); }; +VALIDATE_SIZE(CSprite, 0x1); SUPPORTED_10EN_11EN_STEAM extern int &nSpriteBufferIndex; SUPPORTED_10EN_11EN_STEAM extern RwIm2DVertex(&SpriteBufferVerts)[384]; // RwIm2DVertex SpriteBufferVerts[384] diff --git a/plugin_III/game_III/CSprite2d.h b/plugin_III/game_III/CSprite2d.h index 1578d72b5..8346b36ba 100644 --- a/plugin_III/game_III/CSprite2d.h +++ b/plugin_III/game_III/CSprite2d.h @@ -54,7 +54,7 @@ class PLUGIN_API CSprite2d { SUPPORTED_10EN_11EN_STEAM static void SetVertices(int numVerts, float *pos, float *texCoors, CRGBA const &color); SUPPORTED_10EN_11EN_STEAM static void SetVertices(RwIm2DVertex *vertices, CRect const &rect, CRGBA const &color1, CRGBA const &color2, CRGBA const &color3, CRGBA const &color4, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4); }; - +VALIDATE_OFFSET(CSprite2d, m_pTexture, 0x0); VALIDATE_SIZE(CSprite2d, 0x4); #include "meta/meta.CSprite2d.h" diff --git a/plugin_III/game_III/CStats.cpp b/plugin_III/game_III/CStats.cpp index 0c2894de1..1c6647845 100644 --- a/plugin_III/game_III/CStats.cpp +++ b/plugin_III/game_III/CStats.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CStats.h" diff --git a/plugin_III/game_III/CStats.h b/plugin_III/game_III/CStats.h index 5e9eca210..5852b44c6 100644 --- a/plugin_III/game_III/CStats.h +++ b/plugin_III/game_III/CStats.h @@ -89,3 +89,4 @@ class CStats { static void SetTotalNumberKillFrenzies(int number); static void SetTotalNumberMissions(int number); }; +VALIDATE_SIZE(CStats, 0x1); diff --git a/plugin_III/game_III/CStoredCar.h b/plugin_III/game_III/CStoredCar.h index 21ca08583..9e217155e 100644 --- a/plugin_III/game_III/CStoredCar.h +++ b/plugin_III/game_III/CStoredCar.h @@ -33,7 +33,15 @@ class PLUGIN_API CStoredCar { SUPPORTED_10EN_11EN_STEAM static void SetExtras(char first, char second); }; - +VALIDATE_OFFSET(CStoredCar, m_nModelIndex, 0x0); +VALIDATE_OFFSET(CStoredCar, m_vecPosition, 0x4); +VALIDATE_OFFSET(CStoredCar, m_vecRotation, 0x10); +VALIDATE_OFFSET(CStoredCar, m_nStoredCarFlags, 0x1C); +VALIDATE_OFFSET(CStoredCar, m_nPrimaryColor, 0x20); +VALIDATE_OFFSET(CStoredCar, m_nSecondaryColor, 0x21); +VALIDATE_OFFSET(CStoredCar, m_nRadioStation, 0x22); +VALIDATE_OFFSET(CStoredCar, m_anCompsToUse, 0x23); +VALIDATE_OFFSET(CStoredCar, m_nCarBombType, 0x25); VALIDATE_SIZE(CStoredCar, 0x28); #include "meta/meta.CStoredCar.h" diff --git a/plugin_III/game_III/CStoredCollPoly.h b/plugin_III/game_III/CStoredCollPoly.h index d8010447a..b209ff66b 100644 --- a/plugin_III/game_III/CStoredCollPoly.h +++ b/plugin_III/game_III/CStoredCollPoly.h @@ -16,7 +16,8 @@ class PLUGIN_API CStoredCollPoly { CVector m_avecVertices[3]; //!< triangle vertices bool m_bValid; }; - +VALIDATE_OFFSET(CStoredCollPoly, m_avecVertices, 0x0); +VALIDATE_OFFSET(CStoredCollPoly, m_bValid, 0x24); VALIDATE_SIZE(CStoredCollPoly, 0x28); #include "meta/meta.CStoredCollPoly.h" diff --git a/plugin_III/game_III/CStreaming.h b/plugin_III/game_III/CStreaming.h index 6eabca7a9..9407eda6b 100644 --- a/plugin_III/game_III/CStreaming.h +++ b/plugin_III/game_III/CStreaming.h @@ -123,5 +123,6 @@ class CStreaming { static void RetryLoadFile(int streamnum); static void StreamZoneModels(CVector const& point); }; +VALIDATE_SIZE(CStreaming, 0x1); void DeleteIsland(CEntity* entity); diff --git a/plugin_III/game_III/CStreamingInfo.cpp b/plugin_III/game_III/CStreamingInfo.cpp index 1c97d483b..bca6bab5c 100644 --- a/plugin_III/game_III/CStreamingInfo.cpp +++ b/plugin_III/game_III/CStreamingInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CStreamingInfo.h" diff --git a/plugin_III/game_III/CStreamingInfo.h b/plugin_III/game_III/CStreamingInfo.h index 9cd1611a5..b79a4db1f 100644 --- a/plugin_III/game_III/CStreamingInfo.h +++ b/plugin_III/game_III/CStreamingInfo.h @@ -41,5 +41,11 @@ class CStreamingInfo { void RemoveFromList(); void SetCdPosnAndSize(unsigned int posn, unsigned int size); }; - +VALIDATE_OFFSET(CStreamingInfo, m_pNext, 0x0); +VALIDATE_OFFSET(CStreamingInfo, m_pPrev, 0x4); +VALIDATE_OFFSET(CStreamingInfo, m_nLoadState, 0x8); +VALIDATE_OFFSET(CStreamingInfo, m_nFlags, 0x9); +VALIDATE_OFFSET(CStreamingInfo, m_nModelIndex, 0xA); +VALIDATE_OFFSET(CStreamingInfo, m_nCdPosn, 0xC); +VALIDATE_OFFSET(CStreamingInfo, m_nCdSize, 0x10); VALIDATE_SIZE(CStreamingInfo, 0x14); diff --git a/plugin_III/game_III/CStuckCarCheck.h b/plugin_III/game_III/CStuckCarCheck.h index e9f69c953..83c373ef3 100644 --- a/plugin_III/game_III/CStuckCarCheck.h +++ b/plugin_III/game_III/CStuckCarCheck.h @@ -17,6 +17,13 @@ struct PLUGIN_API CStuckCarCheckData { unsigned int m_nStuckTime; bool m_bIsStuck; }; +VALIDATE_OFFSET(CStuckCarCheckData, m_nVehicleIndex, 0x0); +VALIDATE_OFFSET(CStuckCarCheckData, m_vecPos, 0x4); +VALIDATE_OFFSET(CStuckCarCheckData, m_nLastCheck, 0x10); +VALIDATE_OFFSET(CStuckCarCheckData, m_fRadius, 0x14); +VALIDATE_OFFSET(CStuckCarCheckData, m_nStuckTime, 0x18); +VALIDATE_OFFSET(CStuckCarCheckData, m_bIsStuck, 0x1C); +VALIDATE_SIZE(CStuckCarCheckData, 0x20); class PLUGIN_API CStuckCarCheck { PLUGIN_NO_DEFAULT_CONSTRUCTION(CStuckCarCheck) @@ -30,8 +37,7 @@ class PLUGIN_API CStuckCarCheck { SUPPORTED_10EN_11EN_STEAM void Process(); SUPPORTED_10EN_11EN_STEAM void RemoveCarFromCheck(int id); }; - -VALIDATE_SIZE(CStuckCarCheckData, 0x20); +VALIDATE_OFFSET(CStuckCarCheck, m_aCars, 0x0); VALIDATE_SIZE(CStuckCarCheck, 0xC0); #include "meta/meta.CStuckCarCheck.h" diff --git a/plugin_III/game_III/CSurfaceTable.h b/plugin_III/game_III/CSurfaceTable.h index fbce528af..72a2c2a15 100644 --- a/plugin_III/game_III/CSurfaceTable.h +++ b/plugin_III/game_III/CSurfaceTable.h @@ -76,5 +76,6 @@ class PLUGIN_API CSurfaceTable { SUPPORTED_10EN_11EN_STEAM static float GetWetMultiplier(unsigned char surfaceType); SUPPORTED_10EN_11EN_STEAM static void Initialise(char const *fileName); }; +VALIDATE_SIZE(CSurfaceTable, 0x1); #include "meta/meta.CSurfaceTable.h" diff --git a/plugin_III/game_III/CTempColModels.h b/plugin_III/game_III/CTempColModels.h index d52770ea2..9b0a2e83e 100644 --- a/plugin_III/game_III/CTempColModels.h +++ b/plugin_III/game_III/CTempColModels.h @@ -12,3 +12,4 @@ class CTempColModels { public: static CColModel& ms_colModelPedGroundHit; }; +VALIDATE_SIZE(CTempColModels, 0x1); diff --git a/plugin_III/game_III/CTempNode.h b/plugin_III/game_III/CTempNode.h index f048b106e..fb4f4a821 100644 --- a/plugin_III/game_III/CTempNode.h +++ b/plugin_III/game_III/CTempNode.h @@ -22,7 +22,14 @@ class PLUGIN_API CTempNode { char m_nNumRightLanes; char m_nLinkState; }; - +VALIDATE_OFFSET(CTempNode, m_vecPos, 0x0); +VALIDATE_OFFSET(CTempNode, m_fDirX, 0xC); +VALIDATE_OFFSET(CTempNode, m_fDirY, 0x10); +VALIDATE_OFFSET(CTempNode, m_nNextNodeIndex, 0x14); +VALIDATE_OFFSET(CTempNode, m_nPrevNodeIndex, 0x16); +VALIDATE_OFFSET(CTempNode, m_nNumLeftLanes, 0x18); +VALIDATE_OFFSET(CTempNode, m_nNumRightLanes, 0x19); +VALIDATE_OFFSET(CTempNode, m_nLinkState, 0x1A); VALIDATE_SIZE(CTempNode, 0x1C); #include "meta/meta.CTempNode.h" diff --git a/plugin_III/game_III/CText.h b/plugin_III/game_III/CText.h index a23fbd9ef..cede3b2cb 100644 --- a/plugin_III/game_III/CText.h +++ b/plugin_III/game_III/CText.h @@ -12,6 +12,9 @@ struct PLUGIN_API CKeyEntry { wchar_t *value; char key[8]; }; +VALIDATE_OFFSET(CKeyEntry, value, 0x0); +VALIDATE_OFFSET(CKeyEntry, key, 0x4); +VALIDATE_SIZE(CKeyEntry, 0xC); class PLUGIN_API CKeyArray { public: @@ -24,6 +27,9 @@ class PLUGIN_API CKeyArray { SUPPORTED_10EN_11EN_STEAM void Unload(); SUPPORTED_10EN_11EN_STEAM void Update(wchar_t *chars); }; +VALIDATE_OFFSET(CKeyArray, m_pEntries, 0x0); +VALIDATE_OFFSET(CKeyArray, m_nNumEntries, 0x4); +VALIDATE_SIZE(CKeyArray, 0x8); class PLUGIN_API CData { public: @@ -33,6 +39,9 @@ class PLUGIN_API CData { SUPPORTED_10EN_11EN_STEAM void Load(unsigned int length, char *data, int *offset); SUPPORTED_10EN_11EN_STEAM void Unload(); }; +VALIDATE_OFFSET(CData, chars, 0x0); +VALIDATE_OFFSET(CData, numChars, 0x4); +VALIDATE_SIZE(CData, 0x8); class PLUGIN_API CText { PLUGIN_NO_DEFAULT_CONSTRUCTION(CText) @@ -48,6 +57,10 @@ class PLUGIN_API CText { SUPPORTED_10EN_11EN_STEAM void Unload(); SUPPORTED_10EN_11EN_STEAM void UpperCase(wchar_t *s); }; +VALIDATE_OFFSET(CText, keyArray, 0x0); +VALIDATE_OFFSET(CText, data, 0x8); +VALIDATE_OFFSET(CText, encoding, 0x10); +VALIDATE_SIZE(CText, 0x14); SUPPORTED_10EN_11EN_STEAM extern CText &TheText; SUPPORTED_10EN_11EN_STEAM extern wchar_t(&WideErrorString)[25]; // wchar_t WideErrorString[25] diff --git a/plugin_III/game_III/CTheCarGenerators.h b/plugin_III/game_III/CTheCarGenerators.h index 67ff80bf4..bd56dd92d 100644 --- a/plugin_III/game_III/CTheCarGenerators.h +++ b/plugin_III/game_III/CTheCarGenerators.h @@ -24,5 +24,6 @@ class PLUGIN_API CTheCarGenerators { SUPPORTED_10EN_11EN_STEAM static void Process(); SUPPORTED_10EN_11EN_STEAM static void SaveAllCarGenerators(unsigned char *buffer, unsigned int *size); }; +VALIDATE_SIZE(CTheCarGenerators, 0x1); #include "meta/meta.CTheCarGenerators.h" diff --git a/plugin_III/game_III/CTheScripts.cpp b/plugin_III/game_III/CTheScripts.cpp index 75a3083dd..836316792 100644 --- a/plugin_III/game_III/CTheScripts.cpp +++ b/plugin_III/game_III/CTheScripts.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_III/game_III/CTheScripts.h b/plugin_III/game_III/CTheScripts.h index e415fb3a9..08598901d 100644 --- a/plugin_III/game_III/CTheScripts.h +++ b/plugin_III/game_III/CTheScripts.h @@ -30,7 +30,7 @@ enum class eUseTextCommandState : char #pragma pack(push,1) struct tScriptText { - // defaults from CTheScripts::Init() + // defaults from CTheScripts float letterWidth = 0.48f; float letterHeight = 1.12f; CRGBA color = { 255, 255, 255, 255 }; @@ -50,8 +50,26 @@ struct tScriptText float yPosition = 0.0f; wchar_t text[500] = { 0 }; }; -#pragma pack(pop) +VALIDATE_OFFSET(tScriptText, letterWidth, 0x0); +VALIDATE_OFFSET(tScriptText, letterHeight, 0x4); +VALIDATE_OFFSET(tScriptText, color, 0x8); +VALIDATE_OFFSET(tScriptText, justify, 0xC); +VALIDATE_OFFSET(tScriptText, centered, 0xD); +VALIDATE_OFFSET(tScriptText, withBackground, 0xE); +VALIDATE_OFFSET(tScriptText, backgroundOnly, 0xF); +VALIDATE_OFFSET(tScriptText, wrapWidth, 0x10); +VALIDATE_OFFSET(tScriptText, centerWidth, 0x14); +VALIDATE_OFFSET(tScriptText, backgroundBoxColor, 0x18); +VALIDATE_OFFSET(tScriptText, proportional, 0x1C); +VALIDATE_OFFSET(tScriptText, drawBeforeFade, 0x1D); +VALIDATE_OFFSET(tScriptText, rightJustify, 0x1E); +VALIDATE_OFFSET(tScriptText, _pad, 0x1F); +VALIDATE_OFFSET(tScriptText, font, 0x20); +VALIDATE_OFFSET(tScriptText, xPosition, 0x24); +VALIDATE_OFFSET(tScriptText, yPosition, 0x28); +VALIDATE_OFFSET(tScriptText, text, 0x2C); VALIDATE_SIZE(tScriptText, 0x414); +#pragma pack(pop) #pragma pack(push,1) struct tScriptRectangle @@ -63,9 +81,13 @@ struct tScriptRectangle CRect rect; CRGBA color = { 255, 255, 255, 255 }; }; -#pragma pack(pop) +VALIDATE_OFFSET(tScriptRectangle, isUsed, 0x0); +VALIDATE_OFFSET(tScriptRectangle, drawBeforeFade, 0x1); +VALIDATE_OFFSET(tScriptRectangle, spriteIdx, 0x2); +VALIDATE_OFFSET(tScriptRectangle, rect, 0x4); +VALIDATE_OFFSET(tScriptRectangle, color, 0x14); VALIDATE_SIZE(tScriptRectangle, 0x18); - +#pragma pack(pop) class CTheScripts { @@ -112,4 +134,5 @@ class CTheScripts { static void CleanUpThisObject(CObject* object); static void CleanUpThisVehicle(CVehicle* vehicle); static void ClearSpaceForMissionEntity(CVector const& position, CEntity* entity); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTheScripts, 0x1); \ No newline at end of file diff --git a/plugin_III/game_III/CTheZones.h b/plugin_III/game_III/CTheZones.h index 4e861c44b..b66006d70 100644 --- a/plugin_III/game_III/CTheZones.h +++ b/plugin_III/game_III/CTheZones.h @@ -40,3 +40,4 @@ class PLUGIN_API CTheZones { static short FindAudioZone(CVector* pos); static eLevelName FindZoneForPoint(const CVector& pos); }; +VALIDATE_SIZE(CTheZones, 0x1); diff --git a/plugin_III/game_III/CTimeCycle.h b/plugin_III/game_III/CTimeCycle.h index 86f5d3935..f06870390 100644 --- a/plugin_III/game_III/CTimeCycle.h +++ b/plugin_III/game_III/CTimeCycle.h @@ -107,5 +107,6 @@ class PLUGIN_API CTimeCycle { SUPPORTED_10EN_11EN_STEAM static void Initialise(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CTimeCycle, 0x1); #include "meta/meta.CTimeCycle.h" diff --git a/plugin_III/game_III/CTimeModelInfo.h b/plugin_III/game_III/CTimeModelInfo.h index 366143962..04908dfac 100644 --- a/plugin_III/game_III/CTimeModelInfo.h +++ b/plugin_III/game_III/CTimeModelInfo.h @@ -37,6 +37,10 @@ class PLUGIN_API CTimeModelInfo : public CSimpleModelInfo { SUPPORTED_10EN_11EN_STEAM CTimeModelInfo *FindOtherTimeModel(); }; +VALIDATE_OFFSET(CTimeModelInfo, m_nStartHour, 0x4C); +VALIDATE_OFFSET(CTimeModelInfo, m_nEndHour, 0x50); +VALIDATE_OFFSET(CTimeModelInfo, m_nRelatedTimeModelIndex, 0x54); +VALIDATE_SIZE(CTimeModelInfo, 0x58); VTABLE_DESC(CTimeModelInfo, 0x5FDFB8, 6); VALIDATE_SIZE(CTimeModelInfo, 0x58); diff --git a/plugin_III/game_III/CTimeStep.h b/plugin_III/game_III/CTimeStep.h index 69eb3209a..268e8cddc 100644 --- a/plugin_III/game_III/CTimeStep.h +++ b/plugin_III/game_III/CTimeStep.h @@ -15,3 +15,4 @@ class PLUGIN_API CTimeStep { SUPPORTED_10EN_11EN_STEAM static float &ms_fFramesPerUpdate; SUPPORTED_10EN_11EN_STEAM static float &ms_fTimeScale; }; +VALIDATE_SIZE(CTimeStep, 0x1); diff --git a/plugin_III/game_III/CTimer.h b/plugin_III/game_III/CTimer.h index b0fbd7c29..ab0fbae92 100644 --- a/plugin_III/game_III/CTimer.h +++ b/plugin_III/game_III/CTimer.h @@ -34,6 +34,7 @@ class PLUGIN_API CTimer { SUPPORTED_10EN_11EN_STEAM static void Suspend(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CTimer, 0x1); SUPPORTED_10EN_11EN_STEAM extern int &suspendPcTimer; SUPPORTED_10EN_11EN_STEAM extern int &suspendDepth; diff --git a/plugin_III/game_III/CTowerClock.h b/plugin_III/game_III/CTowerClock.h index 410ba94a8..164e4235b 100644 --- a/plugin_III/game_III/CTowerClock.h +++ b/plugin_III/game_III/CTowerClock.h @@ -28,6 +28,16 @@ class PLUGIN_API CTowerClock { SUPPORTED_10EN_11EN_STEAM void Render(); SUPPORTED_10EN_11EN_STEAM void Update(); }; +VALIDATE_OFFSET(CTowerClock, m_vecPosition, 0x0); +VALIDATE_OFFSET(CTowerClock, m_vecSize, 0xC); +VALIDATE_OFFSET(CTowerClock, m_fDrawDistance, 0x18); +VALIDATE_OFFSET(CTowerClock, m_fScale, 0x1C); +VALIDATE_OFFSET(CTowerClock, m_nRed, 0x20); +VALIDATE_OFFSET(CTowerClock, m_nGreen, 0x21); +VALIDATE_OFFSET(CTowerClock, m_nBlue, 0x22); +VALIDATE_OFFSET(CTowerClock, m_bVisible, 0x23); +VALIDATE_OFFSET(CTowerClock, m_fIntensity, 0x24); +VALIDATE_SIZE(CTowerClock, 0x28); SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&TempV)[4]; // RwIm3DVertex TempV[4] diff --git a/plugin_III/game_III/CTrafficLights.h b/plugin_III/game_III/CTrafficLights.h index b06e2f29f..e23d8d3a9 100644 --- a/plugin_III/game_III/CTrafficLights.h +++ b/plugin_III/game_III/CTrafficLights.h @@ -31,5 +31,6 @@ class PLUGIN_API CTrafficLights { SUPPORTED_10EN_11EN_STEAM static bool ShouldCarStopForBridge(CVehicle *vehicle); SUPPORTED_10EN_11EN_STEAM static bool ShouldCarStopForLight(CVehicle *vehicle, bool alwaysStop); }; +VALIDATE_SIZE(CTrafficLights, 0x1); #include "meta/meta.CTrafficLights.h" diff --git a/plugin_III/game_III/CTrain.h b/plugin_III/game_III/CTrain.h index 41e4c2645..db90d7bb2 100644 --- a/plugin_III/game_III/CTrain.h +++ b/plugin_III/game_III/CTrain.h @@ -25,6 +25,9 @@ struct PLUGIN_API CTrainNode { CVector m_vecPosition; float m_fStationDist; //!< xy-distance from start on track }; +VALIDATE_OFFSET(CTrainNode, m_vecPosition, 0x0); +VALIDATE_OFFSET(CTrainNode, m_fStationDist, 0xC); +VALIDATE_SIZE(CTrainNode, 0x10); struct PLUGIN_API CTrainInterpolationLine { unsigned char m_nType; @@ -33,6 +36,12 @@ struct PLUGIN_API CTrainInterpolationLine { float m_fSpeed; float m_fAcceleration; }; +VALIDATE_OFFSET(CTrainInterpolationLine, m_nType, 0x0); +VALIDATE_OFFSET(CTrainInterpolationLine, m_fTime, 0x4); +VALIDATE_OFFSET(CTrainInterpolationLine, m_fPosition, 0x8); +VALIDATE_OFFSET(CTrainInterpolationLine, m_fSpeed, 0xC); +VALIDATE_OFFSET(CTrainInterpolationLine, m_fAcceleration, 0x10); +VALIDATE_SIZE(CTrainInterpolationLine, 0x14); class PLUGIN_API CTrain : public CVehicle { PLUGIN_NO_DEFAULT_CONSTRUCTION(CTrain) @@ -163,6 +172,22 @@ class PLUGIN_API CTrain : public CVehicle { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void UpdateTrains(); }; +VALIDATE_OFFSET(CTrain, m_fWagonPosition, 0x288); +VALIDATE_OFFSET(CTrain, m_nWagonId, 0x28C); +VALIDATE_OFFSET(CTrain, m_nIsFarAway, 0x28E); +VALIDATE_OFFSET(CTrain, m_nCurTrackNode, 0x290); +VALIDATE_OFFSET(CTrain, m_nWagonGroup, 0x292); +VALIDATE_OFFSET(CTrain, m_fSpeed, 0x294); +VALIDATE_OFFSET(CTrain, m_bProcessDoor, 0x298); +VALIDATE_OFFSET(CTrain, m_bTrainStopping, 0x299); +VALIDATE_OFFSET(CTrain, m_bIsFirstWagon, 0x29A); +VALIDATE_OFFSET(CTrain, m_bIsLastWagon, 0x29B); +VALIDATE_OFFSET(CTrain, m_nTrackId, 0x29C); +VALIDATE_OFFSET(CTrain, m_nDoorTimer, 0x2A0); +VALIDATE_OFFSET(CTrain, m_nDoorState, 0x2A4); +VALIDATE_OFFSET(CTrain, m_aTrainDoors, 0x2A8); +VALIDATE_OFFSET(CTrain, m_apTrainNodes, 0x2D8); +VALIDATE_SIZE(CTrain, 0x2E4); //! 873.0f, 1522.0f, 2481.0f SUPPORTED_10EN_11EN_STEAM extern float(&StationDist)[3]; // float StationDist[3] diff --git a/plugin_III/game_III/CTrainCamNode.h b/plugin_III/game_III/CTrainCamNode.h index 44eb42d37..10cb58e7e 100644 --- a/plugin_III/game_III/CTrainCamNode.h +++ b/plugin_III/game_III/CTrainCamNode.h @@ -20,7 +20,12 @@ class PLUGIN_API CTrainCamNode { float m_fDesiredFOV; float m_fNearClip; }; - +VALIDATE_OFFSET(CTrainCamNode, m_vecCamPosition, 0x0); +VALIDATE_OFFSET(CTrainCamNode, m_vecPointToLookAt, 0xC); +VALIDATE_OFFSET(CTrainCamNode, m_vecMinPointInRange, 0x18); +VALIDATE_OFFSET(CTrainCamNode, m_vecMaxPointInRange, 0x24); +VALIDATE_OFFSET(CTrainCamNode, m_fDesiredFOV, 0x30); +VALIDATE_OFFSET(CTrainCamNode, m_fNearClip, 0x34); VALIDATE_SIZE(CTrainCamNode, 0x38); #include "meta/meta.CTrainCamNode.h" diff --git a/plugin_III/game_III/CTrainDoor.h b/plugin_III/game_III/CTrainDoor.h index 7a2e45a9b..5bc7f350b 100644 --- a/plugin_III/game_III/CTrainDoor.h +++ b/plugin_III/game_III/CTrainDoor.h @@ -34,7 +34,14 @@ class PLUGIN_API CTrainDoor { SUPPORTED_10EN_11EN_STEAM float RetTranslationWhenClosed(); SUPPORTED_10EN_11EN_STEAM float RetTranslationWhenOpen(); }; - +VALIDATE_OFFSET(CTrainDoor, m_fOpenAngle, 0x0); +VALIDATE_OFFSET(CTrainDoor, m_fClosedAngle, 0x4); +VALIDATE_OFFSET(CTrainDoor, m_nDirn, 0x8); +VALIDATE_OFFSET(CTrainDoor, m_nState, 0x9); +VALIDATE_OFFSET(CTrainDoor, m_nAxis, 0xA); +VALIDATE_OFFSET(CTrainDoor, m_fAngle, 0xC); +VALIDATE_OFFSET(CTrainDoor, m_fPrevAngle, 0x10); +VALIDATE_OFFSET(CTrainDoor, m_fAngleVel, 0x14); VALIDATE_SIZE(CTrainDoor, 0x18); #include "meta/meta.CTrainDoor.h" diff --git a/plugin_III/game_III/CTreadable.h b/plugin_III/game_III/CTreadable.h index 443e8e6d5..4b9874a3d 100644 --- a/plugin_III/game_III/CTreadable.h +++ b/plugin_III/game_III/CTreadable.h @@ -68,6 +68,9 @@ class PLUGIN_API CTreadable : public CBuilding { SUPPORTED_10EN_11EN_STEAM bool GetIsATreadable(); }; +VALIDATE_OFFSET(CTreadable, m_aNodeIndicesCarNodes, 0x64); +VALIDATE_OFFSET(CTreadable, m_aNodeIndicesPedNodes, 0x7C); +VALIDATE_SIZE(CTreadable, 0x94); VTABLE_DESC(CTreadable, 0x5EBFB4, 18); VALIDATE_SIZE(CTreadable, 0x94); diff --git a/plugin_III/game_III/CTxdStore.h b/plugin_III/game_III/CTxdStore.h index 307ee7a50..a36872a04 100644 --- a/plugin_III/game_III/CTxdStore.h +++ b/plugin_III/game_III/CTxdStore.h @@ -37,6 +37,7 @@ class CTxdStore { static void RemoveRefWithoutDelete(int id); static int GetNumRefs(int id); }; +VALIDATE_SIZE(CTxdStore, 0x1); extern unsigned int &texNumLoaded; extern float &texLoadTime; \ No newline at end of file diff --git a/plugin_III/game_III/CUpsideDownCarCheck.h b/plugin_III/game_III/CUpsideDownCarCheck.h index 8e26e30f9..063048899 100644 --- a/plugin_III/game_III/CUpsideDownCarCheck.h +++ b/plugin_III/game_III/CUpsideDownCarCheck.h @@ -12,6 +12,9 @@ struct PLUGIN_API UpsideDownCarsData { int m_nVehicleIndex; unsigned int m_nUpsideDownTimer; }; +VALIDATE_OFFSET(UpsideDownCarsData, m_nVehicleIndex, 0x0); +VALIDATE_OFFSET(UpsideDownCarsData, m_nUpsideDownTimer, 0x4); +VALIDATE_SIZE(UpsideDownCarsData, 0x8); class PLUGIN_API CUpsideDownCarCheck { public: @@ -25,8 +28,7 @@ class PLUGIN_API CUpsideDownCarCheck { SUPPORTED_10EN_11EN_STEAM void RemoveCarFromCheck(int id); SUPPORTED_10EN_11EN_STEAM void UpdateTimers(); }; - -VALIDATE_SIZE(UpsideDownCarsData, 0x8); +VALIDATE_OFFSET(CUpsideDownCarCheck, m_aCars, 0x0); VALIDATE_SIZE(CUpsideDownCarCheck, 0x30); #include "meta/meta.CUpsideDownCarCheck.h" diff --git a/plugin_III/game_III/CUserDisplay.h b/plugin_III/game_III/CUserDisplay.h index bfaa46645..c640e2942 100644 --- a/plugin_III/game_III/CUserDisplay.h +++ b/plugin_III/game_III/CUserDisplay.h @@ -22,5 +22,6 @@ class PLUGIN_API CUserDisplay { SUPPORTED_10EN_11EN_STEAM static void Init(); SUPPORTED_10EN_11EN_STEAM static void Process(); }; +VALIDATE_SIZE(CUserDisplay, 0x1); #include "meta/meta.CUserDisplay.h" diff --git a/plugin_III/game_III/CVehicle.h b/plugin_III/game_III/CVehicle.h index 9bb483b6a..7b476c04b 100644 --- a/plugin_III/game_III/CVehicle.h +++ b/plugin_III/game_III/CVehicle.h @@ -259,6 +259,56 @@ class PLUGIN_API CVehicle : public CPhysical { SUPPORTED_10EN_11EN_STEAM bool ShufflePassengersToMakeSpace(); SUPPORTED_10EN_11EN_STEAM bool UsesSiren(unsigned int vehicleModel); }; +VALIDATE_OFFSET(CVehicle, m_pHandlingData, 0x128); +VALIDATE_OFFSET(CVehicle, m_autoPilot, 0x12C); +VALIDATE_OFFSET(CVehicle, m_nPrimaryColor, 0x19C); +VALIDATE_OFFSET(CVehicle, m_nSecondaryColor, 0x19D); +VALIDATE_OFFSET(CVehicle, m_anExtras, 0x19E); +VALIDATE_OFFSET(CVehicle, m_nAlarmState, 0x1A0); +VALIDATE_OFFSET(CVehicle, m_nMissionValue, 0x1A2); +VALIDATE_OFFSET(CVehicle, m_pDriver, 0x1A4); +VALIDATE_OFFSET(CVehicle, m_apPassengers, 0x1A8); +VALIDATE_OFFSET(CVehicle, m_nNumPassengers, 0x1C8); +VALIDATE_OFFSET(CVehicle, m_nNumGettingIn, 0x1C9); +VALIDATE_OFFSET(CVehicle, m_nGettingInFlags, 0x1CA); +VALIDATE_OFFSET(CVehicle, m_nGettingOutFlags, 0x1CB); +VALIDATE_OFFSET(CVehicle, m_nMaxPassengers, 0x1CC); +VALIDATE_OFFSET(CVehicle, field_1D0, 0x1D0); +VALIDATE_OFFSET(CVehicle, m_pCurGroundEntity, 0x1E0); +VALIDATE_OFFSET(CVehicle, m_pCarFire, 0x1E4); +VALIDATE_OFFSET(CVehicle, m_fSteerAngle, 0x1E8); +VALIDATE_OFFSET(CVehicle, m_fGasPedal, 0x1EC); +VALIDATE_OFFSET(CVehicle, m_fBrakePedal, 0x1F0); +VALIDATE_OFFSET(CVehicle, m_nCreatedBy, 0x1F4); +VALIDATE_OFFSET(CVehicle, m_numPedsUseItAsCover, 0x1F9); +VALIDATE_OFFSET(CVehicle, m_nAmmoInClip, 0x1FA); +VALIDATE_OFFSET(CVehicle, m_nPacManPickupsCarried, 0x1FB); +VALIDATE_OFFSET(CVehicle, m_nRoadblockType, 0x1FC); +VALIDATE_OFFSET(CVehicle, m_nRoadblockNode, 0x1FE); +VALIDATE_OFFSET(CVehicle, m_fHealth, 0x200); +VALIDATE_OFFSET(CVehicle, m_nCurrentGear, 0x204); +VALIDATE_OFFSET(CVehicle, m_fChangeGearTime, 0x208); +VALIDATE_OFFSET(CVehicle, m_nGunFiringTime, 0x20C); +VALIDATE_OFFSET(CVehicle, m_nTimeOfDeath, 0x210); +VALIDATE_OFFSET(CVehicle, m_nTimeBlocked, 0x214); +VALIDATE_OFFSET(CVehicle, m_nBombTimer, 0x216); +VALIDATE_OFFSET(CVehicle, m_pBlowUpEntity, 0x218); +VALIDATE_OFFSET(CVehicle, m_fMapObjectHeightAhead, 0x21C); +VALIDATE_OFFSET(CVehicle, m_fMapObjectHeightBehind, 0x220); +VALIDATE_OFFSET(CVehicle, m_eDoorLock, 0x224); +VALIDATE_OFFSET(CVehicle, m_nLastWeaponDamage, 0x228); +VALIDATE_OFFSET(CVehicle, m_nRadioStation, 0x229); +VALIDATE_OFFSET(CVehicle, m_nRainAudioCounter, 0x22A); +VALIDATE_OFFSET(CVehicle, m_nRainSamplesCounter, 0x22B); +VALIDATE_OFFSET(CVehicle, m_nCarHornTimer, 0x22C); +VALIDATE_OFFSET(CVehicle, m_nCarHornPattern, 0x22D); +VALIDATE_OFFSET(CVehicle, m_bSirenOrAlarm, 0x22E); +VALIDATE_OFFSET(CVehicle, m_nCcomedyControlState, 0x22F); +VALIDATE_OFFSET(CVehicle, m_frontCollPoly, 0x230); +VALIDATE_OFFSET(CVehicle, m_rearCollPoly, 0x258); +VALIDATE_OFFSET(CVehicle, m_fSteerInput, 0x280); +VALIDATE_OFFSET(CVehicle, m_nVehicleClass, 0x284); +VALIDATE_SIZE(CVehicle, 0x288); //! 0.1f SUPPORTED_10EN_11EN_STEAM extern float &fBurstTyreMod; diff --git a/plugin_III/game_III/CVehicleModelInfo.h b/plugin_III/game_III/CVehicleModelInfo.h index d1fad9f5b..8dabad8d0 100644 --- a/plugin_III/game_III/CVehicleModelInfo.h +++ b/plugin_III/game_III/CVehicleModelInfo.h @@ -130,6 +130,32 @@ class PLUGIN_API CVehicleModelInfo : public CClumpModelInfo { //! unloads 'white' texture SUPPORTED_10EN_11EN_STEAM static void ShutdownEnvironmentMaps(); }; +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastPrimaryColor, 0x34); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastSecondaryColor, 0x35); +VALIDATE_OFFSET(CVehicleModelInfo, m_szGameName, 0x36); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleType, 0x58); +VALIDATE_OFFSET(CVehicleModelInfo, m_nWheelModelIndex, 0x5C); +VALIDATE_OFFSET(CVehicleModelInfo, m_nPlaneLodId, 0x5C); +VALIDATE_OFFSET(CVehicleModelInfo, m_fWheelScale, 0x60); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumDoors, 0x64); +VALIDATE_OFFSET(CVehicleModelInfo, m_nHandlingId, 0x68); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleClass, 0x6C); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLvl, 0x70); +VALIDATE_OFFSET(CVehicleModelInfo, m_vecDummyPos, 0x74); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRules, 0xEC); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRulesBits, 0xEC); +VALIDATE_OFFSET(CVehicleModelInfo, m_fBikeSteerAngle, 0xF0); +VALIDATE_OFFSET(CVehicleModelInfo, m_apMaterialsPrimary, 0xF4); +VALIDATE_OFFSET(CVehicleModelInfo, m_apMaterialsSecondary, 0x15C); +VALIDATE_OFFSET(CVehicleModelInfo, m_bPrimaryColorId, 0x1C4); +VALIDATE_OFFSET(CVehicleModelInfo, m_bSecondaryColorId, 0x1CC); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumColorVariations, 0x1D4); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastColorVariation, 0x1D5); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentColorId, 0x1D6); +VALIDATE_OFFSET(CVehicleModelInfo, m_pEnvironmentTex, 0x1D8); +VALIDATE_OFFSET(CVehicleModelInfo, m_apExtras, 0x1DC); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumExtras, 0x1F4); +VALIDATE_SIZE(CVehicleModelInfo, 0x1F8); SUPPORTED_10EN_11EN_STEAM extern RwTexture *&gpWhiteTexture; SUPPORTED_10EN_11EN_STEAM extern RwFrame *&pMatFxIdentityFrame; diff --git a/plugin_III/game_III/CVisibilityPlugins.h b/plugin_III/game_III/CVisibilityPlugins.h index 37ba27428..b094311ff 100644 --- a/plugin_III/game_III/CVisibilityPlugins.h +++ b/plugin_III/game_III/CVisibilityPlugins.h @@ -107,6 +107,7 @@ class PLUGIN_API CVisibilityPlugins { SUPPORTED_10EN_11EN_STEAM static bool VehicleVisibilityCB(RpClump *clump); SUPPORTED_10EN_11EN_STEAM static bool VehicleVisibilityCB_BigVehicle(RpClump *clump); }; +VALIDATE_SIZE(CVisibilityPlugins, 0x1); SUPPORTED_10EN_11EN_STEAM RpMaterial *SetAlphaCB(RpMaterial *material, void *data); SUPPORTED_10EN_11EN_STEAM RpMaterial *SetTextureCB(RpMaterial *material, void *data); diff --git a/plugin_III/game_III/CWanted.h b/plugin_III/game_III/CWanted.h index 43d85c70e..1084796d9 100644 --- a/plugin_III/game_III/CWanted.h +++ b/plugin_III/game_III/CWanted.h @@ -24,6 +24,13 @@ class PLUGIN_API CCrimeBeingQd { SUPPORTED_10EN_11EN_STEAM void operator=(CCrimeBeingQd const &right); }; +VALIDATE_OFFSET(CCrimeBeingQd, m_nCrimeType, 0x0); +VALIDATE_OFFSET(CCrimeBeingQd, m_nCrimeId, 0x4); +VALIDATE_OFFSET(CCrimeBeingQd, m_nTimeOfQing, 0x8); +VALIDATE_OFFSET(CCrimeBeingQd, m_vecPosn, 0xC); +VALIDATE_OFFSET(CCrimeBeingQd, m_bAlreadyReported, 0x18); +VALIDATE_OFFSET(CCrimeBeingQd, m_bPoliceDontReallyCare, 0x19); +VALIDATE_SIZE(CCrimeBeingQd, 0x1C); class PLUGIN_API CWanted { PLUGIN_NO_DEFAULT_CONSTRUCTION(CWanted) @@ -69,8 +76,19 @@ class PLUGIN_API CWanted { SUPPORTED_10EN_11EN_STEAM static void SetMaximumWantedLevel(int level); SUPPORTED_10EN_11EN_STEAM static int WorkOutPolicePresence(CVector pos, float radius); }; - -VALIDATE_SIZE(CCrimeBeingQd, 0x1C); +VALIDATE_OFFSET(CWanted, m_nChaosLevel, 0x0); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedDecreased, 0x4); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedLevelChanged, 0x8); +VALIDATE_OFFSET(CWanted, m_fMultiplier, 0xC); +VALIDATE_OFFSET(CWanted, m_nCopsInPursuit, 0x10); +VALIDATE_OFFSET(CWanted, m_nMaxCopsInPursuit, 0x11); +VALIDATE_OFFSET(CWanted, m_nMaxCopCarsInPursuit, 0x12); +VALIDATE_OFFSET(CWanted, m_nCopsBeatingSuspect, 0x13); +VALIDATE_OFFSET(CWanted, m_nChanceOnRoadBlock, 0x14); +VALIDATE_OFFSET(CWanted, m_nWantedFlags, 0x16); +VALIDATE_OFFSET(CWanted, m_nWantedLevel, 0x18); +VALIDATE_OFFSET(CWanted, m_aCrimesBeingQd, 0x1C); +VALIDATE_OFFSET(CWanted, m_apCopsInPursuit, 0x1DC); VALIDATE_SIZE(CWanted, 0x204); #include "meta/meta.CWanted.h" diff --git a/plugin_III/game_III/CWaterCannon.h b/plugin_III/game_III/CWaterCannon.h index a2b9f4a96..0858ba948 100644 --- a/plugin_III/game_III/CWaterCannon.h +++ b/plugin_III/game_III/CWaterCannon.h @@ -27,6 +27,13 @@ class PLUGIN_API CWaterCannon { SUPPORTED_10EN_11EN_STEAM void Update_NewInput(CVector *pos, CVector *dir); SUPPORTED_10EN_11EN_STEAM void Update_OncePerFrame(short index); }; +VALIDATE_OFFSET(CWaterCannon, m_nId, 0x0); +VALIDATE_OFFSET(CWaterCannon, m_nCur, 0x4); +VALIDATE_OFFSET(CWaterCannon, m_nTimeCreated, 0x8); +VALIDATE_OFFSET(CWaterCannon, m_avecPosition, 0xC); +VALIDATE_OFFSET(CWaterCannon, m_avecVelocity, 0xCC); +VALIDATE_OFFSET(CWaterCannon, m_abUsed, 0x18C); +VALIDATE_SIZE(CWaterCannon, 0x19C); SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&WaterCannonIndexList)[12]; // RwImVertexIndex WaterCannonIndexList[12] SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&WaterCannonVertices)[4]; // RwIm3DVertex WaterCannonVertices[4] diff --git a/plugin_III/game_III/CWaterCannons.h b/plugin_III/game_III/CWaterCannons.h index e3c7938c6..3d5f06123 100644 --- a/plugin_III/game_III/CWaterCannons.h +++ b/plugin_III/game_III/CWaterCannons.h @@ -18,5 +18,6 @@ class PLUGIN_API CWaterCannons { SUPPORTED_10EN_11EN_STEAM static void Update(); SUPPORTED_10EN_11EN_STEAM static void UpdateOne(unsigned int id, CVector *pos, CVector *dir); }; +VALIDATE_SIZE(CWaterCannons, 0x1); #include "meta/meta.CWaterCannons.h" diff --git a/plugin_III/game_III/CWaterLevel.h b/plugin_III/game_III/CWaterLevel.h index d4335c0c6..a70d5dbc9 100644 --- a/plugin_III/game_III/CWaterLevel.h +++ b/plugin_III/game_III/CWaterLevel.h @@ -13,3 +13,4 @@ class CWaterLevel { static void AllocateBoatWakeArray(); static void RenderWater(); }; +VALIDATE_SIZE(CWaterLevel, 0x1); diff --git a/plugin_III/game_III/CWeapon.h b/plugin_III/game_III/CWeapon.h index 7dab9c7fb..19efddb4a 100644 --- a/plugin_III/game_III/CWeapon.h +++ b/plugin_III/game_III/CWeapon.h @@ -65,6 +65,13 @@ class PLUGIN_API CWeapon { SUPPORTED_10EN_11EN_STEAM static void ShutdownWeapons(); SUPPORTED_10EN_11EN_STEAM static void UpdateWeapons(); }; +VALIDATE_OFFSET(CWeapon, m_eWeaponType, 0x0); +VALIDATE_OFFSET(CWeapon, m_eWeaponState, 0x4); +VALIDATE_OFFSET(CWeapon, m_nAmmoInClip, 0x8); +VALIDATE_OFFSET(CWeapon, m_nAmmoTotal, 0xC); +VALIDATE_OFFSET(CWeapon, m_nTimer, 0x10); +VALIDATE_OFFSET(CWeapon, m_bAddRotOffset, 0x14); +VALIDATE_SIZE(CWeapon, 0x18); SUPPORTED_10EN_11EN_STEAM void FireOneInstantHitRound(CVector *source, CVector *target, int damage); diff --git a/plugin_III/game_III/CWeaponEffects.cpp b/plugin_III/game_III/CWeaponEffects.cpp index 2f2d4417a..cb48add8f 100644 --- a/plugin_III/game_III/CWeaponEffects.cpp +++ b/plugin_III/game_III/CWeaponEffects.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeaponEffects.h" diff --git a/plugin_III/game_III/CWeaponEffects.h b/plugin_III/game_III/CWeaponEffects.h index 0f8f3e58a..28cec0d7e 100644 --- a/plugin_III/game_III/CWeaponEffects.h +++ b/plugin_III/game_III/CWeaponEffects.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" #include "CRGBA.h" @@ -28,7 +27,12 @@ class CWeaponEffects { static void Shutdown(); ~CWeaponEffects(); }; - +VALIDATE_OFFSET(CWeaponEffects, m_bActive, 0x0); +VALIDATE_OFFSET(CWeaponEffects, _pad0, 0x1); +VALIDATE_OFFSET(CWeaponEffects, m_vPosn, 0x4); +VALIDATE_OFFSET(CWeaponEffects, m_Color, 0x10); +VALIDATE_OFFSET(CWeaponEffects, m_fSize, 0x14); +VALIDATE_OFFSET(CWeaponEffects, m_fRotation, 0x18); VALIDATE_SIZE(CWeaponEffects, 0x1C); extern CWeaponEffects& gCrossHair; // CWeaponEffects gCrossHair diff --git a/plugin_III/game_III/CWeaponInfo.cpp b/plugin_III/game_III/CWeaponInfo.cpp index aad30a685..4743b9971 100644 --- a/plugin_III/game_III/CWeaponInfo.cpp +++ b/plugin_III/game_III/CWeaponInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeaponInfo.h" diff --git a/plugin_III/game_III/CWeaponInfo.h b/plugin_III/game_III/CWeaponInfo.h index 0ecf9d41a..15e3a538a 100644 --- a/plugin_III/game_III/CWeaponInfo.h +++ b/plugin_III/game_III/CWeaponInfo.h @@ -70,7 +70,25 @@ class CWeaponInfo { static void Shutdown(); ~CWeaponInfo(); }; - +VALIDATE_OFFSET(CWeaponInfo, m_eWeaponFire, 0x0); +VALIDATE_OFFSET(CWeaponInfo, m_fRange, 0x4); +VALIDATE_OFFSET(CWeaponInfo, m_nFiringRate, 0x8); +VALIDATE_OFFSET(CWeaponInfo, m_nReload, 0xC); +VALIDATE_OFFSET(CWeaponInfo, m_nAmountofAmmunition, 0x10); +VALIDATE_OFFSET(CWeaponInfo, m_nDamage, 0x14); +VALIDATE_OFFSET(CWeaponInfo, m_fSpeed, 0x18); +VALIDATE_OFFSET(CWeaponInfo, m_fRadius, 0x1C); +VALIDATE_OFFSET(CWeaponInfo, m_fLifespan, 0x20); +VALIDATE_OFFSET(CWeaponInfo, m_fSpread, 0x24); +VALIDATE_OFFSET(CWeaponInfo, m_vecFireOffset, 0x28); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimToPlay, 0x34); +VALIDATE_OFFSET(CWeaponInfo, m_nAnim2ToPlay, 0x38); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopStart, 0x3C); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopEnd, 0x40); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimFrameFire, 0x44); +VALIDATE_OFFSET(CWeaponInfo, m_fAnim2FrameFire, 0x48); +VALIDATE_OFFSET(CWeaponInfo, m_nModelId, 0x4C); +VALIDATE_OFFSET(CWeaponInfo, m_nWeaponFlags, 0x50); VALIDATE_SIZE(CWeaponInfo, 0x54); extern CWeaponInfo(&aWeaponInfo)[14]; diff --git a/plugin_III/game_III/CWeather.h b/plugin_III/game_III/CWeather.h index 4c191e9c3..162aa27fb 100644 --- a/plugin_III/game_III/CWeather.h +++ b/plugin_III/game_III/CWeather.h @@ -53,12 +53,17 @@ class PLUGIN_API CWeather { SUPPORTED_10EN_11EN_STEAM static void StoreWeatherState(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CWeather, 0x1); struct PLUGIN_API tRainStreak { CVector m_vecPosition; CVector m_vecDirection; unsigned int m_nTimer; }; +VALIDATE_OFFSET(tRainStreak, m_vecPosition, 0x0); +VALIDATE_OFFSET(tRainStreak, m_vecDirection, 0xC); +VALIDATE_OFFSET(tRainStreak, m_nTimer, 0x18); +VALIDATE_SIZE(tRainStreak, 0x1C); //! 0.0f - WEATHER_SUNNY, 0.7f - WEATHER_CLOUDY, 1.0f - WEATHER_RAINY, 0.5f - WEATHER_FOGGY, 0.0f, 0.0f SUPPORTED_10EN_11EN_STEAM extern float(&Windyness)[6]; // float Windyness[6] diff --git a/plugin_III/game_III/CWorld.h b/plugin_III/game_III/CWorld.h index a563c20f0..7a02f89c0 100644 --- a/plugin_III/game_III/CWorld.h +++ b/plugin_III/game_III/CWorld.h @@ -140,3 +140,4 @@ class CWorld { return y * SECTOR_SIZE_Y + WORLD_MIN_Y; } }; +VALIDATE_SIZE(CWorld, 0x1); diff --git a/plugin_III/game_III/CXtraCompsModelInfo.h b/plugin_III/game_III/CXtraCompsModelInfo.h index 52fa323cc..6cca831bd 100644 --- a/plugin_III/game_III/CXtraCompsModelInfo.h +++ b/plugin_III/game_III/CXtraCompsModelInfo.h @@ -31,6 +31,8 @@ class PLUGIN_API CXtraCompsModelInfo : public CClumpModelInfo { SUPPORTED_10EN_11EN_STEAM void SetClump(RpClump *clump); }; +VALIDATE_OFFSET(CXtraCompsModelInfo, m_nModelIndex, 0x34); +VALIDATE_SIZE(CXtraCompsModelInfo, 0x38); VTABLE_DESC(CXtraCompsModelInfo, 0x5FE044, 7); VALIDATE_SIZE(CXtraCompsModelInfo, 0x38); diff --git a/plugin_III/game_III/CZone.h b/plugin_III/game_III/CZone.h index 90eeb6a4c..5dabc8eee 100644 --- a/plugin_III/game_III/CZone.h +++ b/plugin_III/game_III/CZone.h @@ -26,7 +26,16 @@ class PLUGIN_API CZone { SUPPORTED_10EN_11EN_STEAM wchar_t *GetTranslatedName(); }; - +VALIDATE_OFFSET(CZone, m_aName, 0x0); +VALIDATE_OFFSET(CZone, m_vecMin, 0x8); +VALIDATE_OFFSET(CZone, m_vecMax, 0x14); +VALIDATE_OFFSET(CZone, m_eZoneType, 0x20); +VALIDATE_OFFSET(CZone, m_eLevel, 0x24); +VALIDATE_OFFSET(CZone, m_nZoneDay, 0x28); +VALIDATE_OFFSET(CZone, m_nZoneNight, 0x2A); +VALIDATE_OFFSET(CZone, m_pChild, 0x2C); +VALIDATE_OFFSET(CZone, m_pParent, 0x30); +VALIDATE_OFFSET(CZone, m_pNext, 0x34); VALIDATE_SIZE(CZone, 0x38); #include "meta/meta.CZone.h" diff --git a/plugin_III/game_III/CZoneInfo.h b/plugin_III/game_III/CZoneInfo.h index 776df0773..56cf82689 100644 --- a/plugin_III/game_III/CZoneInfo.h +++ b/plugin_III/game_III/CZoneInfo.h @@ -39,5 +39,33 @@ struct CZoneInfo { unsigned short pedSindacco; unsigned short pedgrp; }; - +VALIDATE_OFFSET(CZoneInfo, carDensity, 0x0); +VALIDATE_OFFSET(CZoneInfo, carPoorfamily, 0x2); +VALIDATE_OFFSET(CZoneInfo, carRichfamily, 0x4); +VALIDATE_OFFSET(CZoneInfo, carExecutive, 0x6); +VALIDATE_OFFSET(CZoneInfo, carWorker, 0x8); +VALIDATE_OFFSET(CZoneInfo, carSpecial, 0xA); +VALIDATE_OFFSET(CZoneInfo, carBig, 0xC); +VALIDATE_OFFSET(CZoneInfo, carCops, 0xE); +VALIDATE_OFFSET(CZoneInfo, carLeone, 0x10); +VALIDATE_OFFSET(CZoneInfo, carTriad, 0x12); +VALIDATE_OFFSET(CZoneInfo, carDiablo, 0x14); +VALIDATE_OFFSET(CZoneInfo, carYakuza, 0x16); +VALIDATE_OFFSET(CZoneInfo, carYardie, 0x18); +VALIDATE_OFFSET(CZoneInfo, carColombian, 0x1A); +VALIDATE_OFFSET(CZoneInfo, carHood, 0x1C); +VALIDATE_OFFSET(CZoneInfo, carForelli, 0x1E); +VALIDATE_OFFSET(CZoneInfo, carSindacco, 0x20); +VALIDATE_OFFSET(CZoneInfo, pedDensity, 0x22); +VALIDATE_OFFSET(CZoneInfo, copDensity, 0x24); +VALIDATE_OFFSET(CZoneInfo, pedLeone, 0x26); +VALIDATE_OFFSET(CZoneInfo, pedTriad, 0x28); +VALIDATE_OFFSET(CZoneInfo, pedDiablo, 0x2A); +VALIDATE_OFFSET(CZoneInfo, pedYakuza, 0x2C); +VALIDATE_OFFSET(CZoneInfo, pedYardie, 0x2E); +VALIDATE_OFFSET(CZoneInfo, pedColombian, 0x30); +VALIDATE_OFFSET(CZoneInfo, pedHood, 0x32); +VALIDATE_OFFSET(CZoneInfo, pedForelli, 0x34); +VALIDATE_OFFSET(CZoneInfo, pedSindacco, 0x36); +VALIDATE_OFFSET(CZoneInfo, pedgrp, 0x38); VALIDATE_SIZE(CZoneInfo, 0x3A); diff --git a/plugin_III/game_III/C_PcSave.h b/plugin_III/game_III/C_PcSave.h index 3ad1f5b62..9935d5196 100644 --- a/plugin_III/game_III/C_PcSave.h +++ b/plugin_III/game_III/C_PcSave.h @@ -39,6 +39,8 @@ class PLUGIN_API C_PcSave { SUPPORTED_10EN_11EN_STEAM static void SetSaveDirectory(char const *path); }; +VALIDATE_OFFSET(C_PcSave, nErrorCode, 0x0); +VALIDATE_SIZE(C_PcSave, 0x4); SUPPORTED_10EN_11EN_STEAM extern C_PcSave &PcSaveHelper; diff --git a/plugin_III/game_III/RenderBuffer.h b/plugin_III/game_III/RenderBuffer.h index 7142bedb3..39e08e049 100644 --- a/plugin_III/game_III/RenderBuffer.h +++ b/plugin_III/game_III/RenderBuffer.h @@ -19,6 +19,7 @@ class PLUGIN_API RenderBuffer { SUPPORTED_10EN_11EN_STEAM static void StartStoring(int numIndices, int numVertices, RwImVertexIndex **indexStart, RwIm3DVertex **vertexStart); SUPPORTED_10EN_11EN_STEAM static void StopStoring(); }; +VALIDATE_SIZE(RenderBuffer, 0x1); SUPPORTED_10EN_11EN_STEAM extern RwImVertexIndex(&TempBufferRenderIndexList)[1024]; // RwImVertexIndex TempBufferRenderIndexList[1024] SUPPORTED_10EN_11EN_STEAM extern RwIm3DVertex(&TempBufferRenderVertices)[256]; // RwIm3DVertex TempBufferRenderVertices[256] diff --git a/plugin_III/game_III/RpAnimBlend.h b/plugin_III/game_III/RpAnimBlend.h index 38b44e2d0..784696d00 100644 --- a/plugin_III/game_III/RpAnimBlend.h +++ b/plugin_III/game_III/RpAnimBlend.h @@ -15,8 +15,11 @@ struct PLUGIN_API AnimBlendFrameUpdateData { int foobar; - CAnimBlendNode *nodes[16]; + CAnimBlendNode* nodes[16]; }; +VALIDATE_OFFSET(AnimBlendFrameUpdateData, foobar, 0x0); +VALIDATE_OFFSET(AnimBlendFrameUpdateData, nodes, 0x4); +VALIDATE_SIZE(AnimBlendFrameUpdateData, 0x44); SUPPORTED_10EN_11EN_STEAM extern CAnimBlendClumpData *&gpAnimBlendClump; SUPPORTED_10EN_11EN_STEAM extern AnimBlendFrameData *&pFrameDataFound; @@ -53,6 +56,4 @@ SUPPORTED_10EN_11EN_STEAM CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssocia SUPPORTED_10EN_11EN_STEAM CAnimBlendAssociation *RpAnimBlendGetNextAssociation(CAnimBlendAssociation *assoc); SUPPORTED_10EN_11EN_STEAM CAnimBlendAssociation *RpAnimBlendGetNextAssociation(CAnimBlendAssociation *assoc, unsigned int mask); -VALIDATE_SIZE(AnimBlendFrameUpdateData, 0x44); - #include "meta/meta.RpAnimBlend.h" diff --git a/plugin_III/game_III/RwObjectNameIdAssocation.h b/plugin_III/game_III/RwObjectNameIdAssocation.h index f9fcafce1..9168887ec 100644 --- a/plugin_III/game_III/RwObjectNameIdAssocation.h +++ b/plugin_III/game_III/RwObjectNameIdAssocation.h @@ -14,5 +14,7 @@ class PLUGIN_API RwObjectNameIdAssocation { unsigned int m_nHierarchyId; unsigned int m_nFlags; }; - +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_pName, 0x0); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_nHierarchyId, 0x4); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_nFlags, 0x8); VALIDATE_SIZE(RwObjectNameIdAssocation, 0xC); diff --git a/plugin_III/game_III/TxdDef.h b/plugin_III/game_III/TxdDef.h index f2f356589..16d0e95be 100644 --- a/plugin_III/game_III/TxdDef.h +++ b/plugin_III/game_III/TxdDef.h @@ -11,9 +11,11 @@ class TxdDef { public: - RwTexDictionary *m_pRwDictionary; - unsigned short m_nRefCount; + RwTexDictionary* m_pRwDictionary; + unsigned short m_nRefCount; char m_szName[20]; }; - +VALIDATE_OFFSET(TxdDef, m_pRwDictionary, 0x0); +VALIDATE_OFFSET(TxdDef, m_nRefCount, 0x4); +VALIDATE_OFFSET(TxdDef, m_szName, 0x6); VALIDATE_SIZE(TxdDef, 0x1C); \ No newline at end of file diff --git a/plugin_III/game_III/cAudioCollision.h b/plugin_III/game_III/cAudioCollision.h index 1c4b3280c..7bf12b1dd 100644 --- a/plugin_III/game_III/cAudioCollision.h +++ b/plugin_III/game_III/cAudioCollision.h @@ -23,7 +23,15 @@ class PLUGIN_API cAudioCollision { float m_fDistance; int m_nBaseVolume; }; - +VALIDATE_OFFSET(cAudioCollision, m_pEntity1, 0x0); +VALIDATE_OFFSET(cAudioCollision, m_pEntity2, 0x4); +VALIDATE_OFFSET(cAudioCollision, m_nSurface1, 0x8); +VALIDATE_OFFSET(cAudioCollision, m_nSurface2, 0x9); +VALIDATE_OFFSET(cAudioCollision, m_fIntensity1, 0xC); +VALIDATE_OFFSET(cAudioCollision, m_fIntensity2, 0x10); +VALIDATE_OFFSET(cAudioCollision, m_vecPosition, 0x14); +VALIDATE_OFFSET(cAudioCollision, m_fDistance, 0x20); +VALIDATE_OFFSET(cAudioCollision, m_nBaseVolume, 0x24); VALIDATE_SIZE(cAudioCollision, 0x28); #include "meta/meta.cAudioCollision.h" diff --git a/plugin_III/game_III/cAudioCollisionManager.h b/plugin_III/game_III/cAudioCollisionManager.h index 02dda5427..9e6bc8ce0 100644 --- a/plugin_III/game_III/cAudioCollisionManager.h +++ b/plugin_III/game_III/cAudioCollisionManager.h @@ -21,7 +21,11 @@ class PLUGIN_API cAudioCollisionManager { SUPPORTED_10EN_11EN_STEAM void AddCollisionToRequestedQueue(); }; - +VALIDATE_OFFSET(cAudioCollisionManager, m_asCollisions1, 0x0); +VALIDATE_OFFSET(cAudioCollisionManager, m_asCollisions2, 0x190); +VALIDATE_OFFSET(cAudioCollisionManager, m_nIndicesTable, 0x320); +VALIDATE_OFFSET(cAudioCollisionManager, m_nCollisionsInQueue, 0x32A); +VALIDATE_OFFSET(cAudioCollisionManager, m_sQueue, 0x32C); VALIDATE_SIZE(cAudioCollisionManager, 0x354); #include "meta/meta.cAudioCollisionManager.h" diff --git a/plugin_III/game_III/cAudioManager.cpp b/plugin_III/game_III/cAudioManager.cpp index 6469128ea..3144e9555 100644 --- a/plugin_III/game_III/cAudioManager.cpp +++ b/plugin_III/game_III/cAudioManager.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto) source file + Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_III/game_III/cAudioManager.h b/plugin_III/game_III/cAudioManager.h index 9670103f7..b8746801f 100644 --- a/plugin_III/game_III/cAudioManager.h +++ b/plugin_III/game_III/cAudioManager.h @@ -46,7 +46,32 @@ class tSound { uint32_t m_nFinalPriority; int8_t m_nVolumeChange; }; - +VALIDATE_OFFSET(tSound, m_nEntityIndex, 0x0); +VALIDATE_OFFSET(tSound, m_nCounter, 0x4); +VALIDATE_OFFSET(tSound, m_nSampleIndex, 0x8); +VALIDATE_OFFSET(tSound, m_nBankIndex, 0xC); +VALIDATE_OFFSET(tSound, m_bIs2D, 0xD); +VALIDATE_OFFSET(tSound, m_nPriority, 0x10); +VALIDATE_OFFSET(tSound, m_nFrequency, 0x14); +VALIDATE_OFFSET(tSound, m_nVolume, 0x18); +VALIDATE_OFFSET(tSound, m_fDistance, 0x1C); +VALIDATE_OFFSET(tSound, m_nLoopCount, 0x20); +VALIDATE_OFFSET(tSound, m_nLoopStart, 0x24); +VALIDATE_OFFSET(tSound, m_nLoopEnd, 0x28); +VALIDATE_OFFSET(tSound, m_nEmittingVolume, 0x2C); +VALIDATE_OFFSET(tSound, m_fSpeedMultiplier, 0x30); +VALIDATE_OFFSET(tSound, m_MaxDistance, 0x34); +VALIDATE_OFFSET(tSound, m_bStatic, 0x38); +VALIDATE_OFFSET(tSound, m_vecPos, 0x3C); +VALIDATE_OFFSET(tSound, m_bReverb, 0x48); +VALIDATE_OFFSET(tSound, m_nReflectionDelay, 0x49); +VALIDATE_OFFSET(tSound, m_bReflections, 0x4A); +VALIDATE_OFFSET(tSound, m_nPan, 0x4B); +VALIDATE_OFFSET(tSound, m_nFramesToPlay, 0x4C); +VALIDATE_OFFSET(tSound, m_bIsBeingPlayed, 0x50); +VALIDATE_OFFSET(tSound, m_bIsPlayingFinished, 0x51); +VALIDATE_OFFSET(tSound, m_nFinalPriority, 0x54); +VALIDATE_OFFSET(tSound, m_nVolumeChange, 0x58); VALIDATE_SIZE(tSound, 0x5C); class cVehicleParams { @@ -58,7 +83,12 @@ class cVehicleParams { uint32_t m_nIndex; float m_fVelocityChange; }; - +VALIDATE_OFFSET(cVehicleParams, m_bDistanceCalculated, 0x0); +VALIDATE_OFFSET(cVehicleParams, m_fDistance, 0x4); +VALIDATE_OFFSET(cVehicleParams, m_pVehicle, 0x8); +VALIDATE_OFFSET(cVehicleParams, m_pTransmission, 0xC); +VALIDATE_OFFSET(cVehicleParams, m_nIndex, 0x10); +VALIDATE_OFFSET(cVehicleParams, m_fVelocityChange, 0x14); VALIDATE_SIZE(cVehicleParams, 0x18); struct tVehicleSampleData { @@ -70,6 +100,14 @@ struct tVehicleSampleData { int32_t m_nSirenOrAlarmFrequency; uint8_t m_bDoorType; }; +VALIDATE_OFFSET(tVehicleSampleData, m_nAccelerationSampleIndex, 0x0); +VALIDATE_OFFSET(tVehicleSampleData, m_nBank, 0x4); +VALIDATE_OFFSET(tVehicleSampleData, m_nHornSample, 0x8); +VALIDATE_OFFSET(tVehicleSampleData, m_nHornFrequency, 0xC); +VALIDATE_OFFSET(tVehicleSampleData, m_nSirenOrAlarmSample, 0x10); +VALIDATE_OFFSET(tVehicleSampleData, m_nSirenOrAlarmFrequency, 0x14); +VALIDATE_OFFSET(tVehicleSampleData, m_bDoorType, 0x18); +VALIDATE_SIZE(tVehicleSampleData, 0x1C); class tAudioEntity { public: @@ -81,7 +119,13 @@ class tAudioEntity { float m_afVolume[4]; uint8_t m_AudioEvents; }; - +VALIDATE_OFFSET(tAudioEntity, m_nType, 0x0); +VALIDATE_OFFSET(tAudioEntity, m_pEntity, 0x4); +VALIDATE_OFFSET(tAudioEntity, m_bIsUsed, 0x8); +VALIDATE_OFFSET(tAudioEntity, m_bStatus, 0x9); +VALIDATE_OFFSET(tAudioEntity, m_awAudioEvent, 0xA); +VALIDATE_OFFSET(tAudioEntity, m_afVolume, 0x14); +VALIDATE_OFFSET(tAudioEntity, m_AudioEvents, 0x24); VALIDATE_SIZE(tAudioEntity, 0x28); class tPedComment { @@ -93,7 +137,12 @@ class tPedComment { uint8_t m_nVolume; int8_t m_nLoadingTimeout; }; - +VALIDATE_OFFSET(tPedComment, m_nSampleIndex, 0x0); +VALIDATE_OFFSET(tPedComment, m_nEntityIndex, 0x4); +VALIDATE_OFFSET(tPedComment, m_vecPos, 0x8); +VALIDATE_OFFSET(tPedComment, m_fDistance, 0x14); +VALIDATE_OFFSET(tPedComment, m_nVolume, 0x18); +VALIDATE_OFFSET(tPedComment, m_nLoadingTimeout, 0x19); VALIDATE_SIZE(tPedComment, 0x1C); class cPedComments { @@ -103,7 +152,10 @@ class cPedComments { uint8_t m_nPedCommentCount[2]; uint8_t m_nActiveQueue; }; - +VALIDATE_OFFSET(cPedComments, m_aPedCommentQueue, 0x0); +VALIDATE_OFFSET(cPedComments, m_aPedCommentOrderList, 0x460); +VALIDATE_OFFSET(cPedComments, m_nPedCommentCount, 0x488); +VALIDATE_OFFSET(cPedComments, m_nActiveQueue, 0x48A); VALIDATE_SIZE(cPedComments, 0x48C); class cPoliceRadioQueue { @@ -113,7 +165,10 @@ class cPoliceRadioQueue { uint8_t m_nAddOffset; uint8_t m_nRemoveOffset; }; - +VALIDATE_OFFSET(cPoliceRadioQueue, m_aSamples, 0x0); +VALIDATE_OFFSET(cPoliceRadioQueue, m_nSamplesInQueue, 0xF0); +VALIDATE_OFFSET(cPoliceRadioQueue, m_nAddOffset, 0xF1); +VALIDATE_OFFSET(cPoliceRadioQueue, m_nRemoveOffset, 0xF2); VALIDATE_SIZE(cPoliceRadioQueue, 0xF4); struct cAMCrime { @@ -121,6 +176,9 @@ struct cAMCrime { CVector position; uint16_t timer; }; +VALIDATE_OFFSET(cAMCrime, type, 0x0); +VALIDATE_OFFSET(cAMCrime, position, 0x4); +VALIDATE_OFFSET(cAMCrime, timer, 0x10); VALIDATE_SIZE(cAMCrime, 0x14); class cAudioCollision { @@ -135,7 +193,15 @@ class cAudioCollision { float m_fDistance; int32_t m_nBaseVolume; }; - +VALIDATE_OFFSET(cAudioCollision, m_pEntity1, 0x0); +VALIDATE_OFFSET(cAudioCollision, m_pEntity2, 0x4); +VALIDATE_OFFSET(cAudioCollision, m_bSurface1, 0x8); +VALIDATE_OFFSET(cAudioCollision, m_bSurface2, 0x9); +VALIDATE_OFFSET(cAudioCollision, m_fIntensity1, 0xC); +VALIDATE_OFFSET(cAudioCollision, m_fIntensity2, 0x10); +VALIDATE_OFFSET(cAudioCollision, m_vecPosition, 0x14); +VALIDATE_OFFSET(cAudioCollision, m_fDistance, 0x20); +VALIDATE_OFFSET(cAudioCollision, m_nBaseVolume, 0x24); VALIDATE_SIZE(cAudioCollision, 0x28); class cAudioCollisionManager { @@ -146,7 +212,11 @@ class cAudioCollisionManager { uint8_t m_bCollisionsInQueue; cAudioCollision m_sQueue; }; - +VALIDATE_OFFSET(cAudioCollisionManager, m_asCollisions1, 0x0); +VALIDATE_OFFSET(cAudioCollisionManager, m_asCollisions2, 0x190); +VALIDATE_OFFSET(cAudioCollisionManager, m_bIndicesTable, 0x320); +VALIDATE_OFFSET(cAudioCollisionManager, m_bCollisionsInQueue, 0x32A); +VALIDATE_OFFSET(cAudioCollisionManager, m_sQueue, 0x32C); VALIDATE_SIZE(cAudioCollisionManager, 0x354); class cAudioManager { @@ -231,7 +301,51 @@ class cAudioManager { float GetCollisionOneShotRatio(uint32_t a, float b); }; - +VALIDATE_OFFSET(cAudioManager, m_bIsInitialised, 0x0); +VALIDATE_OFFSET(cAudioManager, m_bIsSurround, 0x1); +VALIDATE_OFFSET(cAudioManager, m_bReduceReleasingPriority, 0x2); +VALIDATE_OFFSET(cAudioManager, m_nActiveSamples, 0x3); +VALIDATE_OFFSET(cAudioManager, m_bDoubleVolume, 0x4); +VALIDATE_OFFSET(cAudioManager, m_bDynamicAcousticModelingStatus, 0x5); +VALIDATE_OFFSET(cAudioManager, m_fSpeedOfSound, 0x8); +VALIDATE_OFFSET(cAudioManager, m_bTimerJustReset, 0xC); +VALIDATE_OFFSET(cAudioManager, m_nTimer, 0x10); +VALIDATE_OFFSET(cAudioManager, m_sQueueSample, 0x14); +VALIDATE_OFFSET(cAudioManager, m_nActiveQueue, 0x70); +VALIDATE_OFFSET(cAudioManager, m_aRequestedQueue, 0x74); +VALIDATE_OFFSET(cAudioManager, m_aRequestedOrderList, 0x13DC); +VALIDATE_OFFSET(cAudioManager, m_nRequestedCount, 0x1412); +VALIDATE_OFFSET(cAudioManager, m_asActiveSamples, 0x1414); +VALIDATE_OFFSET(cAudioManager, m_asAudioEntities, 0x1DC8); +VALIDATE_OFFSET(cAudioManager, m_aAudioEntityOrderList, 0x3D08); +VALIDATE_OFFSET(cAudioManager, m_nAudioEntitiesCount, 0x4028); +VALIDATE_OFFSET(cAudioManager, m_avecReflectionsPos, 0x402C); +VALIDATE_OFFSET(cAudioManager, m_afReflectionsDistances, 0x4068); +VALIDATE_OFFSET(cAudioManager, m_sAudioScriptObjectManager, 0x407C); +VALIDATE_OFFSET(cAudioManager, m_sPedComments, 0x4120); +VALIDATE_OFFSET(cAudioManager, m_nFireAudioEntity, 0x45AC); +VALIDATE_OFFSET(cAudioManager, m_nWaterCannonEntity, 0x45B0); +VALIDATE_OFFSET(cAudioManager, m_nPoliceChannelEntity, 0x45B4); +VALIDATE_OFFSET(cAudioManager, m_sPoliceRadioQueue, 0x45B8); +VALIDATE_OFFSET(cAudioManager, m_aCrimes, 0x46AC); +VALIDATE_OFFSET(cAudioManager, m_nFrontEndEntity, 0x4774); +VALIDATE_OFFSET(cAudioManager, m_nCollisionEntity, 0x4778); +VALIDATE_OFFSET(cAudioManager, m_sCollisionManager, 0x477C); +VALIDATE_OFFSET(cAudioManager, m_nProjectileEntity, 0x4AD0); +VALIDATE_OFFSET(cAudioManager, m_nBridgeEntity, 0x4AD4); +VALIDATE_OFFSET(cAudioManager, m_vecMissionAudioPosition, 0x4AD8); +VALIDATE_OFFSET(cAudioManager, m_bIsMissionAudio2D, 0x4AE4); +VALIDATE_OFFSET(cAudioManager, m_nMissionAudioSampleIndex, 0x4AE8); +VALIDATE_OFFSET(cAudioManager, m_nMissionAudioLoadingStatus, 0x4AEC); +VALIDATE_OFFSET(cAudioManager, m_nMissionAudioPlayStatus, 0x4AED); +VALIDATE_OFFSET(cAudioManager, m_bIsMissionAudioPlaying, 0x4AEE); +VALIDATE_OFFSET(cAudioManager, m_nMissionAudioFramesToPlay, 0x4AF0); +VALIDATE_OFFSET(cAudioManager, m_bIsMissionAudioAllowedToPlay, 0x4AF4); +VALIDATE_OFFSET(cAudioManager, m_anRandomTable, 0x4AF8); +VALIDATE_OFFSET(cAudioManager, m_nTimeSpent, 0x4B0C); +VALIDATE_OFFSET(cAudioManager, m_bIsPaused, 0x4B0D); +VALIDATE_OFFSET(cAudioManager, m_bWasPaused, 0x4B0E); +VALIDATE_OFFSET(cAudioManager, m_FrameCounter, 0x4B10); VALIDATE_SIZE(cAudioManager, 0x4B14); extern cAudioManager &AudioManager; diff --git a/plugin_III/game_III/cAudioScriptObject.h b/plugin_III/game_III/cAudioScriptObject.h index d09cd4f25..d46efdfad 100644 --- a/plugin_III/game_III/cAudioScriptObject.h +++ b/plugin_III/game_III/cAudioScriptObject.h @@ -22,6 +22,10 @@ class PLUGIN_API cAudioScriptObject { SUPPORTED_10EN_11EN_STEAM static void LoadAllAudioScriptObjects(unsigned char *buf, unsigned int size); SUPPORTED_10EN_11EN_STEAM static void SaveAllAudioScriptObjects(unsigned char *buf, unsigned int *size); }; +VALIDATE_OFFSET(cAudioScriptObject, m_nAudioId, 0x0); +VALIDATE_OFFSET(cAudioScriptObject, m_vecPosition, 0x4); +VALIDATE_OFFSET(cAudioScriptObject, m_nStatusIndex, 0x10); +VALIDATE_SIZE(cAudioScriptObject, 0x14); SUPPORTED_10EN_11EN_STEAM void PlayOneShotScriptObject(unsigned char id, CVector const &pos); diff --git a/plugin_III/game_III/cBuoyancy.h b/plugin_III/game_III/cBuoyancy.h index f871b9bd1..ea988dec3 100644 --- a/plugin_III/game_III/cBuoyancy.h +++ b/plugin_III/game_III/cBuoyancy.h @@ -44,5 +44,28 @@ class cBuoyancy { bool ProcessBuoyancy(CPhysical* phys, float buoyancy, CVector* point, CVector* impulse); }; +VALIDATE_OFFSET(cBuoyancy, m_position, 0x0); +VALIDATE_OFFSET(cBuoyancy, m_matrix, 0xC); +VALIDATE_OFFSET(cBuoyancy, m_field_54, 0x54); +VALIDATE_OFFSET(cBuoyancy, m_positionZ, 0x58); +VALIDATE_OFFSET(cBuoyancy, m_waterlevel, 0x64); +VALIDATE_OFFSET(cBuoyancy, m_waterLevelInc, 0x68); +VALIDATE_OFFSET(cBuoyancy, m_buoyancy, 0x6C); +VALIDATE_OFFSET(cBuoyancy, m_dimMax, 0x70); +VALIDATE_OFFSET(cBuoyancy, m_dimMin, 0x7C); +VALIDATE_OFFSET(cBuoyancy, m_numPartialVolumes, 0x88); +VALIDATE_OFFSET(cBuoyancy, m_field_8C, 0x8C); +VALIDATE_OFFSET(cBuoyancy, m_field_90, 0x90); +VALIDATE_OFFSET(cBuoyancy, m_field_94, 0x94); +VALIDATE_OFFSET(cBuoyancy, m_haveVolume, 0x98); +VALIDATE_OFFSET(cBuoyancy, m_step, 0x9C); +VALIDATE_OFFSET(cBuoyancy, m_stepRatio, 0xA8); +VALIDATE_OFFSET(cBuoyancy, m_numSteps, 0xB4); +VALIDATE_OFFSET(cBuoyancy, m_flipAverage, 0xB8); +VALIDATE_OFFSET(cBuoyancy, m_field_B9, 0xB9); +VALIDATE_OFFSET(cBuoyancy, m_isBoat, 0xBA); +VALIDATE_OFFSET(cBuoyancy, m_volumeUnderWater, 0xBC); +VALIDATE_OFFSET(cBuoyancy, m_impulsePoint, 0xC0); +VALIDATE_SIZE(cBuoyancy, 0xCC); extern cBuoyancy& mod_Buoyancy; diff --git a/plugin_III/game_III/cDMAudio.h b/plugin_III/game_III/cDMAudio.h index 9a969d43c..83435d7d7 100644 --- a/plugin_III/game_III/cDMAudio.h +++ b/plugin_III/game_III/cDMAudio.h @@ -65,6 +65,7 @@ class PLUGIN_API cDMAudio { SUPPORTED_10EN_11EN_STEAM void StopFrontEndTrack(); SUPPORTED_10EN_11EN_STEAM void Terminate(); }; +VALIDATE_SIZE(cDMAudio, 0x1); SUPPORTED_10EN_11EN_STEAM extern cDMAudio &DMAudio; diff --git a/plugin_III/game_III/cHandlingDataMgr.h b/plugin_III/game_III/cHandlingDataMgr.h index c71649999..11d87403d 100644 --- a/plugin_III/game_III/cHandlingDataMgr.h +++ b/plugin_III/game_III/cHandlingDataMgr.h @@ -24,7 +24,13 @@ class cHandlingDataMgr { public: int GetHandlingId(const char* name); }; - +VALIDATE_OFFSET(cHandlingDataMgr, field_0, 0x0); +VALIDATE_OFFSET(cHandlingDataMgr, fWheelFriction, 0x4); +VALIDATE_OFFSET(cHandlingDataMgr, field_8, 0x8); +VALIDATE_OFFSET(cHandlingDataMgr, field_C, 0xC); +VALIDATE_OFFSET(cHandlingDataMgr, field_10, 0x10); +VALIDATE_OFFSET(cHandlingDataMgr, HandlingData, 0x14); +VALIDATE_OFFSET(cHandlingDataMgr, field_302C, 0x302C); VALIDATE_SIZE(cHandlingDataMgr, 0x3030); extern cHandlingDataMgr& mod_HandlingManager; diff --git a/plugin_III/game_III/cMusicManager.h b/plugin_III/game_III/cMusicManager.h index 68b02e5f5..af7f34672 100644 --- a/plugin_III/game_III/cMusicManager.h +++ b/plugin_III/game_III/cMusicManager.h @@ -14,6 +14,10 @@ struct PLUGIN_API tMP3Sample { unsigned int m_nPosition; unsigned int m_nLastPosCheckTimer; }; +VALIDATE_OFFSET(tMP3Sample, m_nLength, 0x0); +VALIDATE_OFFSET(tMP3Sample, m_nPosition, 0x4); +VALIDATE_OFFSET(tMP3Sample, m_nLastPosCheckTimer, 0x8); +VALIDATE_SIZE(tMP3Sample, 0xC); class PLUGIN_API cMusicManager { PLUGIN_NO_DEFAULT_CONSTRUCTION(cMusicManager) @@ -80,6 +84,31 @@ class PLUGIN_API cMusicManager { SUPPORTED_10EN_11EN_STEAM void Terminate(); SUPPORTED_10EN_11EN_STEAM bool UsesPoliceRadio(CVehicle *vehicle); }; +VALIDATE_OFFSET(cMusicManager, m_bIsInitialised, 0x0); +VALIDATE_OFFSET(cMusicManager, m_bDisabled, 0x1); +VALIDATE_OFFSET(cMusicManager, m_nMusicMode, 0x2); +VALIDATE_OFFSET(cMusicManager, m_nCurrentStreamedSound, 0x3); +VALIDATE_OFFSET(cMusicManager, m_nPreviousStreamedSound, 0x4); +VALIDATE_OFFSET(cMusicManager, m_bFrontendTrackFinished, 0x5); +VALIDATE_OFFSET(cMusicManager, m_bPlayInFrontend, 0x6); +VALIDATE_OFFSET(cMusicManager, m_bSetNextStation, 0x7); +VALIDATE_OFFSET(cMusicManager, m_nAnnouncement, 0x8); +VALIDATE_OFFSET(cMusicManager, m_bPreviousPlayerInCar, 0x9); +VALIDATE_OFFSET(cMusicManager, m_bPlayerInCar, 0xA); +VALIDATE_OFFSET(cMusicManager, m_bAnnouncementInProgress, 0xB); +VALIDATE_OFFSET(cMusicManager, m_asMP3Samples, 0xC); +VALIDATE_OFFSET(cMusicManager, m_bResetTimers, 0x93C); +VALIDATE_OFFSET(cMusicManager, m_nResetTime, 0x940); +VALIDATE_OFFSET(cMusicManager, m_nLastTrackServiceTime, 0x944); +VALIDATE_OFFSET(cMusicManager, m_nTimer, 0x948); +VALIDATE_OFFSET(cMusicManager, m_bDoTrackService, 0x94C); +VALIDATE_OFFSET(cMusicManager, m_bIgnoreTimeDelay, 0x94D); +VALIDATE_OFFSET(cMusicManager, m_bDontServiceAmbienceTrack, 0x94E); +VALIDATE_OFFSET(cMusicManager, m_bRadioSetByScript, 0x94F); +VALIDATE_OFFSET(cMusicManager, m_nRadioStation, 0x950); +VALIDATE_OFFSET(cMusicManager, m_nRadioPosition, 0x954); +VALIDATE_OFFSET(cMusicManager, m_nRadioInCar, 0x958); +VALIDATE_SIZE(cMusicManager, 0x95C); SUPPORTED_10EN_11EN_STEAM extern bool &bHasStarted; SUPPORTED_10EN_11EN_STEAM extern int &gNumRetunePresses; diff --git a/plugin_III/game_III/cParticleSystemMgr.h b/plugin_III/game_III/cParticleSystemMgr.h index d79881426..7f381fca7 100644 --- a/plugin_III/game_III/cParticleSystemMgr.h +++ b/plugin_III/game_III/cParticleSystemMgr.h @@ -17,7 +17,7 @@ class cParticleSystemMgr { void Initialise(); void LoadParticleData(); }; - +VALIDATE_OFFSET(cParticleSystemMgr, m_particleSystems, 0x0); VALIDATE_SIZE(cParticleSystemMgr, 0x2420); extern cParticleSystemMgr &mod_ParticleSystemManager; diff --git a/plugin_III/game_III/cSampleManager.cpp b/plugin_III/game_III/cSampleManager.cpp index 8d8b145b7..9f2b52a55 100644 --- a/plugin_III/game_III/cSampleManager.cpp +++ b/plugin_III/game_III/cSampleManager.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto III) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "cSampleManager.h" diff --git a/plugin_III/game_III/cSampleManager.h b/plugin_III/game_III/cSampleManager.h index 85c54608b..492efa7de 100644 --- a/plugin_III/game_III/cSampleManager.h +++ b/plugin_III/game_III/cSampleManager.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto III) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -14,6 +14,12 @@ struct PLUGIN_API tSample { unsigned int nLoopStart; unsigned int nLoopEnd; }; +VALIDATE_OFFSET(tSample, nOffset, 0x0); +VALIDATE_OFFSET(tSample, nSize, 0x4); +VALIDATE_OFFSET(tSample, nFrequency, 0x8); +VALIDATE_OFFSET(tSample, nLoopStart, 0xC); +VALIDATE_OFFSET(tSample, nLoopEnd, 0x10); +VALIDATE_SIZE(tSample, 0x14); class PLUGIN_API cSampleManager { public: @@ -47,5 +53,17 @@ class PLUGIN_API cSampleManager { void SetChannelEmittingVolume(uint32_t channel, uint32_t vol); uint32_t GetSampleBaseFrequency(uint32_t sample); }; +VALIDATE_OFFSET(cSampleManager, m_nEffectsVolume, 0x0); +VALIDATE_OFFSET(cSampleManager, m_nMusicVolume, 0x1); +VALIDATE_OFFSET(cSampleManager, m_nEffectsFadeVolume, 0x2); +VALIDATE_OFFSET(cSampleManager, m_nMusicFadeVolume, 0x3); +VALIDATE_OFFSET(cSampleManager, m_nMonoMode, 0x4); +VALIDATE_OFFSET(cSampleManager, unk, 0x5); +VALIDATE_OFFSET(cSampleManager, m_szCDRomRootPath, 0x6); +VALIDATE_OFFSET(cSampleManager, m_bInitialised, 0x56); +VALIDATE_OFFSET(cSampleManager, m_nNumberOfProviders, 0x57); +VALIDATE_OFFSET(cSampleManager, m_aAudioProviders, 0x58); +VALIDATE_OFFSET(cSampleManager, m_aSamples, 0x158); +VALIDATE_SIZE(cSampleManager, 0xEE38); extern cSampleManager& SampleManager; diff --git a/plugin_III/game_III/cTransmission.h b/plugin_III/game_III/cTransmission.h index 2fe31027d..72547b06b 100644 --- a/plugin_III/game_III/cTransmission.h +++ b/plugin_III/game_III/cTransmission.h @@ -40,5 +40,14 @@ class PLUGIN_API cTransmission { void InitGearRatios(); cTransmission(); }; - +VALIDATE_OFFSET(cTransmission, m_aGears, 0x0); +VALIDATE_OFFSET(cTransmission, m_nDriveType, 0x48); +VALIDATE_OFFSET(cTransmission, m_nEngineType, 0x49); +VALIDATE_OFFSET(cTransmission, m_nNumberOfGears, 0x4A); +VALIDATE_OFFSET(cTransmission, m_nHandlingFlags, 0x4B); +VALIDATE_OFFSET(cTransmission, m_fEngineAcceleration, 0x4C); +VALIDATE_OFFSET(cTransmission, m_fMaxForwardsVelocity, 0x50); +VALIDATE_OFFSET(cTransmission, m_fMaxTrafficVelocity, 0x54); +VALIDATE_OFFSET(cTransmission, m_fMaxBackwardsVelocity, 0x58); +VALIDATE_OFFSET(cTransmission, m_fCurrentVelocity, 0x5C); VALIDATE_SIZE(cTransmission, 0x60); diff --git a/plugin_III/game_III/enums/eBridgeState.h b/plugin_III/game_III/enums/eBridgeState.h index 30000e8ac..439a99759 100644 --- a/plugin_III/game_III/enums/eBridgeState.h +++ b/plugin_III/game_III/enums/eBridgeState.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto) header file + Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_III/game_III/enums/eCoronaType.h b/plugin_III/game_III/enums/eCoronaType.h index 6ae4deced..91d6edb69 100644 --- a/plugin_III/game_III/enums/eCoronaType.h +++ b/plugin_III/game_III/enums/eCoronaType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eCrimeType.h b/plugin_III/game_III/enums/eCrimeType.h index 75f057efc..55049325a 100644 --- a/plugin_III/game_III/enums/eCrimeType.h +++ b/plugin_III/game_III/enums/eCrimeType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/ePedModel.h b/plugin_III/game_III/enums/ePedModel.h index 89317d3e8..568eb625e 100644 --- a/plugin_III/game_III/enums/ePedModel.h +++ b/plugin_III/game_III/enums/ePedModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eSceneCommands.h b/plugin_III/game_III/enums/eSceneCommands.h index 097667375..418b94551 100644 --- a/plugin_III/game_III/enums/eSceneCommands.h +++ b/plugin_III/game_III/enums/eSceneCommands.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eWeaponModel.h b/plugin_III/game_III/enums/eWeaponModel.h index 3ea28ba7b..ff5ee8154 100644 --- a/plugin_III/game_III/enums/eWeaponModel.h +++ b/plugin_III/game_III/enums/eWeaponModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eWeaponType.h b/plugin_III/game_III/enums/eWeaponType.h index f42289246..ef7a76ca5 100644 --- a/plugin_III/game_III/enums/eWeaponType.h +++ b/plugin_III/game_III/enums/eWeaponType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eWeather.h b/plugin_III/game_III/enums/eWeather.h index 710720bce..24e6f2d40 100644 --- a/plugin_III/game_III/enums/eWeather.h +++ b/plugin_III/game_III/enums/eWeather.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/enums/eWheelModel.h b/plugin_III/game_III/enums/eWheelModel.h index c7e681de0..ba52b4f5c 100644 --- a/plugin_III/game_III/enums/eWheelModel.h +++ b/plugin_III/game_III/enums/eWheelModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_III/game_III/meta/meta.C2dEffect.h b/plugin_III/game_III/meta/meta.C2dEffect.h index 058d2b342..ec0140a13 100644 --- a/plugin_III/game_III/meta/meta.C2dEffect.h +++ b/plugin_III/game_III/meta/meta.C2dEffect.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.C2deffectsModelInfo.h b/plugin_III/game_III/meta/meta.C2deffectsModelInfo.h index 72d0d0c4f..7df419b49 100644 --- a/plugin_III/game_III/meta/meta.C2deffectsModelInfo.h +++ b/plugin_III/game_III/meta/meta.C2deffectsModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.C3dMarker.h b/plugin_III/game_III/meta/meta.C3dMarker.h index f2c39dcef..f850fb921 100644 --- a/plugin_III/game_III/meta/meta.C3dMarker.h +++ b/plugin_III/game_III/meta/meta.C3dMarker.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.C3dMarkers.h b/plugin_III/game_III/meta/meta.C3dMarkers.h index 9bd68fbe0..afaca5386 100644 --- a/plugin_III/game_III/meta/meta.C3dMarkers.h +++ b/plugin_III/game_III/meta/meta.C3dMarkers.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAccident.h b/plugin_III/game_III/meta/meta.CAccident.h index 86c5c1df9..ac1654d71 100644 --- a/plugin_III/game_III/meta/meta.CAccident.h +++ b/plugin_III/game_III/meta/meta.CAccident.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAccidentManager.h b/plugin_III/game_III/meta/meta.CAccidentManager.h index 63326917c..a69992da8 100644 --- a/plugin_III/game_III/meta/meta.CAccidentManager.h +++ b/plugin_III/game_III/meta/meta.CAccidentManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendAssocGroup.h b/plugin_III/game_III/meta/meta.CAnimBlendAssocGroup.h index e048e9750..698d3c012 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendAssocGroup.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendAssocGroup.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendAssociation.h b/plugin_III/game_III/meta/meta.CAnimBlendAssociation.h index d059af1cf..28fda21d5 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendAssociation.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendAssociation.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendClumpData.h b/plugin_III/game_III/meta/meta.CAnimBlendClumpData.h index 19a804907..3879a3b1b 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendClumpData.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendClumpData.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendHierarchy.h b/plugin_III/game_III/meta/meta.CAnimBlendHierarchy.h index 668ba225d..a0081852b 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendHierarchy.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendHierarchy.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendNode.h b/plugin_III/game_III/meta/meta.CAnimBlendNode.h index 7f8816026..bcb9d6756 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendNode.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimBlendSequence.h b/plugin_III/game_III/meta/meta.CAnimBlendSequence.h index f262ab613..128032634 100644 --- a/plugin_III/game_III/meta/meta.CAnimBlendSequence.h +++ b/plugin_III/game_III/meta/meta.CAnimBlendSequence.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAnimManager.h b/plugin_III/game_III/meta/meta.CAnimManager.h index d8734aaba..5969fba07 100644 --- a/plugin_III/game_III/meta/meta.CAnimManager.h +++ b/plugin_III/game_III/meta/meta.CAnimManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAntenna.h b/plugin_III/game_III/meta/meta.CAntenna.h index 24f4967a5..72669a042 100644 --- a/plugin_III/game_III/meta/meta.CAntenna.h +++ b/plugin_III/game_III/meta/meta.CAntenna.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAntennas.h b/plugin_III/game_III/meta/meta.CAntennas.h index 2c47d7761..daa9984e1 100644 --- a/plugin_III/game_III/meta/meta.CAntennas.h +++ b/plugin_III/game_III/meta/meta.CAntennas.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAudioHydrant.h b/plugin_III/game_III/meta/meta.CAudioHydrant.h index b98d46a3d..29ba4ef0c 100644 --- a/plugin_III/game_III/meta/meta.CAudioHydrant.h +++ b/plugin_III/game_III/meta/meta.CAudioHydrant.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CAutomobile.h b/plugin_III/game_III/meta/meta.CAutomobile.h index 5ed2e1bcc..c6d04e9a1 100644 --- a/plugin_III/game_III/meta/meta.CAutomobile.h +++ b/plugin_III/game_III/meta/meta.CAutomobile.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBaseModelInfo.h b/plugin_III/game_III/meta/meta.CBaseModelInfo.h index db06a6a03..31ceeb895 100644 --- a/plugin_III/game_III/meta/meta.CBaseModelInfo.h +++ b/plugin_III/game_III/meta/meta.CBaseModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBoat.h b/plugin_III/game_III/meta/meta.CBoat.h index bd441d907..fc978e751 100644 --- a/plugin_III/game_III/meta/meta.CBoat.h +++ b/plugin_III/game_III/meta/meta.CBoat.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBridge.h b/plugin_III/game_III/meta/meta.CBridge.h index 9b0eb8574..02b7cfef3 100644 --- a/plugin_III/game_III/meta/meta.CBridge.h +++ b/plugin_III/game_III/meta/meta.CBridge.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBrightLight.h b/plugin_III/game_III/meta/meta.CBrightLight.h index 7db019265..23d917a05 100644 --- a/plugin_III/game_III/meta/meta.CBrightLight.h +++ b/plugin_III/game_III/meta/meta.CBrightLight.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBrightLights.h b/plugin_III/game_III/meta/meta.CBrightLights.h index ee9b4b3c6..a7970aaa1 100644 --- a/plugin_III/game_III/meta/meta.CBrightLights.h +++ b/plugin_III/game_III/meta/meta.CBrightLights.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBuilding.h b/plugin_III/game_III/meta/meta.CBuilding.h index abc80f90f..4c8c80234 100644 --- a/plugin_III/game_III/meta/meta.CBuilding.h +++ b/plugin_III/game_III/meta/meta.CBuilding.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBulletInfo.h b/plugin_III/game_III/meta/meta.CBulletInfo.h index 3024ffff1..4d0614111 100644 --- a/plugin_III/game_III/meta/meta.CBulletInfo.h +++ b/plugin_III/game_III/meta/meta.CBulletInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBulletTrace.h b/plugin_III/game_III/meta/meta.CBulletTrace.h index f7e0987dd..4211922a8 100644 --- a/plugin_III/game_III/meta/meta.CBulletTrace.h +++ b/plugin_III/game_III/meta/meta.CBulletTrace.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CBulletTraces.h b/plugin_III/game_III/meta/meta.CBulletTraces.h index f856e4bec..9973ef780 100644 --- a/plugin_III/game_III/meta/meta.CBulletTraces.h +++ b/plugin_III/game_III/meta/meta.CBulletTraces.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCamera.h b/plugin_III/game_III/meta/meta.CCamera.h index 28e9214ee..2751a1ef5 100644 --- a/plugin_III/game_III/meta/meta.CCamera.h +++ b/plugin_III/game_III/meta/meta.CCamera.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCarAI.h b/plugin_III/game_III/meta/meta.CCarAI.h index 77636a67b..aed729c89 100644 --- a/plugin_III/game_III/meta/meta.CCarAI.h +++ b/plugin_III/game_III/meta/meta.CCarAI.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCarCtrl.h b/plugin_III/game_III/meta/meta.CCarCtrl.h index 0cf910a61..30f6d510f 100644 --- a/plugin_III/game_III/meta/meta.CCarCtrl.h +++ b/plugin_III/game_III/meta/meta.CCarCtrl.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCarGenerator.h b/plugin_III/game_III/meta/meta.CCarGenerator.h index 905f9969f..62659d7ac 100644 --- a/plugin_III/game_III/meta/meta.CCarGenerator.h +++ b/plugin_III/game_III/meta/meta.CCarGenerator.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCheat.h b/plugin_III/game_III/meta/meta.CCheat.h index 623e74f34..0886ee0fa 100644 --- a/plugin_III/game_III/meta/meta.CCheat.h +++ b/plugin_III/game_III/meta/meta.CCheat.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCivilianPed.h b/plugin_III/game_III/meta/meta.CCivilianPed.h index 23e2bb48a..6522aaceb 100644 --- a/plugin_III/game_III/meta/meta.CCivilianPed.h +++ b/plugin_III/game_III/meta/meta.CCivilianPed.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CClock.h b/plugin_III/game_III/meta/meta.CClock.h index 85d90224c..3a6bce4e8 100644 --- a/plugin_III/game_III/meta/meta.CClock.h +++ b/plugin_III/game_III/meta/meta.CClock.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CClouds.h b/plugin_III/game_III/meta/meta.CClouds.h index 4096aa671..fdd482d58 100644 --- a/plugin_III/game_III/meta/meta.CClouds.h +++ b/plugin_III/game_III/meta/meta.CClouds.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CClumpModelInfo.h b/plugin_III/game_III/meta/meta.CClumpModelInfo.h index e53e299ae..a3a5872e0 100644 --- a/plugin_III/game_III/meta/meta.CClumpModelInfo.h +++ b/plugin_III/game_III/meta/meta.CClumpModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColBox.h b/plugin_III/game_III/meta/meta.CColBox.h index ba8c048a1..ff93fe57b 100644 --- a/plugin_III/game_III/meta/meta.CColBox.h +++ b/plugin_III/game_III/meta/meta.CColBox.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColLine.h b/plugin_III/game_III/meta/meta.CColLine.h index 3356fca84..e1c08dfe8 100644 --- a/plugin_III/game_III/meta/meta.CColLine.h +++ b/plugin_III/game_III/meta/meta.CColLine.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColModel.h b/plugin_III/game_III/meta/meta.CColModel.h index 7d46c283d..c80608c4d 100644 --- a/plugin_III/game_III/meta/meta.CColModel.h +++ b/plugin_III/game_III/meta/meta.CColModel.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColPoint.h b/plugin_III/game_III/meta/meta.CColPoint.h index 27856681d..d832d13c0 100644 --- a/plugin_III/game_III/meta/meta.CColPoint.h +++ b/plugin_III/game_III/meta/meta.CColPoint.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColSphere.h b/plugin_III/game_III/meta/meta.CColSphere.h index 2dee64605..912b275a6 100644 --- a/plugin_III/game_III/meta/meta.CColSphere.h +++ b/plugin_III/game_III/meta/meta.CColSphere.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColTriangle.h b/plugin_III/game_III/meta/meta.CColTriangle.h index f8a5e15dc..fb9130eed 100644 --- a/plugin_III/game_III/meta/meta.CColTriangle.h +++ b/plugin_III/game_III/meta/meta.CColTriangle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CColTrianglePlane.h b/plugin_III/game_III/meta/meta.CColTrianglePlane.h index 5975d1227..27c8b1b5c 100644 --- a/plugin_III/game_III/meta/meta.CColTrianglePlane.h +++ b/plugin_III/game_III/meta/meta.CColTrianglePlane.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCopPed.h b/plugin_III/game_III/meta/meta.CCopPed.h index 7a4ce51d7..782883797 100644 --- a/plugin_III/game_III/meta/meta.CCopPed.h +++ b/plugin_III/game_III/meta/meta.CCopPed.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCoronas.h b/plugin_III/game_III/meta/meta.CCoronas.h index e8cba8257..008d61a4c 100644 --- a/plugin_III/game_III/meta/meta.CCoronas.h +++ b/plugin_III/game_III/meta/meta.CCoronas.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCrane.h b/plugin_III/game_III/meta/meta.CCrane.h index c89a195f5..0647a32b7 100644 --- a/plugin_III/game_III/meta/meta.CCrane.h +++ b/plugin_III/game_III/meta/meta.CCrane.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCranes.h b/plugin_III/game_III/meta/meta.CCranes.h index 3e830acc5..dd96b88c2 100644 --- a/plugin_III/game_III/meta/meta.CCranes.h +++ b/plugin_III/game_III/meta/meta.CCranes.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCredits.h b/plugin_III/game_III/meta/meta.CCredits.h index dba1c6030..6fa486741 100644 --- a/plugin_III/game_III/meta/meta.CCredits.h +++ b/plugin_III/game_III/meta/meta.CCredits.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCurrentVehicle.h b/plugin_III/game_III/meta/meta.CCurrentVehicle.h index 457b5715c..192a29ba6 100644 --- a/plugin_III/game_III/meta/meta.CCurrentVehicle.h +++ b/plugin_III/game_III/meta/meta.CCurrentVehicle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCurves.h b/plugin_III/game_III/meta/meta.CCurves.h index e768f0ba7..155aa62bc 100644 --- a/plugin_III/game_III/meta/meta.CCurves.h +++ b/plugin_III/game_III/meta/meta.CCurves.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCutsceneHead.h b/plugin_III/game_III/meta/meta.CCutsceneHead.h index d6bb7c20b..349c6e6ac 100644 --- a/plugin_III/game_III/meta/meta.CCutsceneHead.h +++ b/plugin_III/game_III/meta/meta.CCutsceneHead.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CCutsceneObject.h b/plugin_III/game_III/meta/meta.CCutsceneObject.h index 0f073c8be..baef0216d 100644 --- a/plugin_III/game_III/meta/meta.CCutsceneObject.h +++ b/plugin_III/game_III/meta/meta.CCutsceneObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDamageManager.h b/plugin_III/game_III/meta/meta.CDamageManager.h index 365fabdae..79a442d78 100644 --- a/plugin_III/game_III/meta/meta.CDamageManager.h +++ b/plugin_III/game_III/meta/meta.CDamageManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDarkel.h b/plugin_III/game_III/meta/meta.CDarkel.h index ff8662bbe..3d7b10261 100644 --- a/plugin_III/game_III/meta/meta.CDarkel.h +++ b/plugin_III/game_III/meta/meta.CDarkel.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDate.h b/plugin_III/game_III/meta/meta.CDate.h index 4cef65734..b3f738f51 100644 --- a/plugin_III/game_III/meta/meta.CDate.h +++ b/plugin_III/game_III/meta/meta.CDate.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDigitalClock.h b/plugin_III/game_III/meta/meta.CDigitalClock.h index b377c0b8e..6cba36495 100644 --- a/plugin_III/game_III/meta/meta.CDigitalClock.h +++ b/plugin_III/game_III/meta/meta.CDigitalClock.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDirectory.h b/plugin_III/game_III/meta/meta.CDirectory.h index 3057aff54..817cf0161 100644 --- a/plugin_III/game_III/meta/meta.CDirectory.h +++ b/plugin_III/game_III/meta/meta.CDirectory.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDraw.h b/plugin_III/game_III/meta/meta.CDraw.h index 9bee5b69a..40c4fb813 100644 --- a/plugin_III/game_III/meta/meta.CDraw.h +++ b/plugin_III/game_III/meta/meta.CDraw.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDummy.h b/plugin_III/game_III/meta/meta.CDummy.h index 9c9f87d7f..be2337cab 100644 --- a/plugin_III/game_III/meta/meta.CDummy.h +++ b/plugin_III/game_III/meta/meta.CDummy.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CDummyObject.h b/plugin_III/game_III/meta/meta.CDummyObject.h index 132601d02..3f6eafe8a 100644 --- a/plugin_III/game_III/meta/meta.CDummyObject.h +++ b/plugin_III/game_III/meta/meta.CDummyObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CEmergencyPed.h b/plugin_III/game_III/meta/meta.CEmergencyPed.h index 55eb1725e..572c19410 100644 --- a/plugin_III/game_III/meta/meta.CEmergencyPed.h +++ b/plugin_III/game_III/meta/meta.CEmergencyPed.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CEntity.h b/plugin_III/game_III/meta/meta.CEntity.h index 44d1d2701..852ce4d13 100644 --- a/plugin_III/game_III/meta/meta.CEntity.h +++ b/plugin_III/game_III/meta/meta.CEntity.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CEventList.h b/plugin_III/game_III/meta/meta.CEventList.h index ffed1f5b2..208b26a1c 100644 --- a/plugin_III/game_III/meta/meta.CEventList.h +++ b/plugin_III/game_III/meta/meta.CEventList.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CFallingGlassPane.h b/plugin_III/game_III/meta/meta.CFallingGlassPane.h index 3871aa110..d28186f99 100644 --- a/plugin_III/game_III/meta/meta.CFallingGlassPane.h +++ b/plugin_III/game_III/meta/meta.CFallingGlassPane.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CFileMgr.h b/plugin_III/game_III/meta/meta.CFileMgr.h index df3e20bf2..795fd30f3 100644 --- a/plugin_III/game_III/meta/meta.CFileMgr.h +++ b/plugin_III/game_III/meta/meta.CFileMgr.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CFire.h b/plugin_III/game_III/meta/meta.CFire.h index a0ec53988..3bb3d0f23 100644 --- a/plugin_III/game_III/meta/meta.CFire.h +++ b/plugin_III/game_III/meta/meta.CFire.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CFireManager.h b/plugin_III/game_III/meta/meta.CFireManager.h index 00f68d976..ffd9d654b 100644 --- a/plugin_III/game_III/meta/meta.CFireManager.h +++ b/plugin_III/game_III/meta/meta.CFireManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGame.h b/plugin_III/game_III/meta/meta.CGame.h index 8ab2232cc..11b06ca3d 100644 --- a/plugin_III/game_III/meta/meta.CGame.h +++ b/plugin_III/game_III/meta/meta.CGame.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGameLogic.h b/plugin_III/game_III/meta/meta.CGameLogic.h index 2ce913d30..2d221dd3e 100644 --- a/plugin_III/game_III/meta/meta.CGameLogic.h +++ b/plugin_III/game_III/meta/meta.CGameLogic.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGangInfo.h b/plugin_III/game_III/meta/meta.CGangInfo.h index a30143b6e..d79c052c3 100644 --- a/plugin_III/game_III/meta/meta.CGangInfo.h +++ b/plugin_III/game_III/meta/meta.CGangInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGangs.h b/plugin_III/game_III/meta/meta.CGangs.h index bfb6b276b..55a067f9a 100644 --- a/plugin_III/game_III/meta/meta.CGangs.h +++ b/plugin_III/game_III/meta/meta.CGangs.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGeneral.h b/plugin_III/game_III/meta/meta.CGeneral.h index f754aab22..b4c013c5c 100644 --- a/plugin_III/game_III/meta/meta.CGeneral.h +++ b/plugin_III/game_III/meta/meta.CGeneral.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CGlass.h b/plugin_III/game_III/meta/meta.CGlass.h index fbdf03a03..19cb8afaf 100644 --- a/plugin_III/game_III/meta/meta.CGlass.h +++ b/plugin_III/game_III/meta/meta.CGlass.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CHeli.h b/plugin_III/game_III/meta/meta.CHeli.h index 15657f842..6bbe3f5d2 100644 --- a/plugin_III/game_III/meta/meta.CHeli.h +++ b/plugin_III/game_III/meta/meta.CHeli.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CIniFile.h b/plugin_III/game_III/meta/meta.CIniFile.h index 16af73d7a..abeeb7f63 100644 --- a/plugin_III/game_III/meta/meta.CIniFile.h +++ b/plugin_III/game_III/meta/meta.CIniFile.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CInstance.h b/plugin_III/game_III/meta/meta.CInstance.h index ae28ea9e6..3db92c276 100644 --- a/plugin_III/game_III/meta/meta.CInstance.h +++ b/plugin_III/game_III/meta/meta.CInstance.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CLines.h b/plugin_III/game_III/meta/meta.CLines.h index b3fe0f96b..d90a610b7 100644 --- a/plugin_III/game_III/meta/meta.CLines.h +++ b/plugin_III/game_III/meta/meta.CLines.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMBlur.h b/plugin_III/game_III/meta/meta.CMBlur.h index a7fe8b4fd..e5316bd25 100644 --- a/plugin_III/game_III/meta/meta.CMBlur.h +++ b/plugin_III/game_III/meta/meta.CMBlur.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMatrix.h b/plugin_III/game_III/meta/meta.CMatrix.h index c83ca5488..185bc8ccc 100644 --- a/plugin_III/game_III/meta/meta.CMatrix.h +++ b/plugin_III/game_III/meta/meta.CMatrix.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMissionCleanup.h b/plugin_III/game_III/meta/meta.CMissionCleanup.h index 8d32470fd..6030ad31b 100644 --- a/plugin_III/game_III/meta/meta.CMissionCleanup.h +++ b/plugin_III/game_III/meta/meta.CMissionCleanup.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMloModelInfo.h b/plugin_III/game_III/meta/meta.CMloModelInfo.h index a302be7f5..d14d3a6ef 100644 --- a/plugin_III/game_III/meta/meta.CMloModelInfo.h +++ b/plugin_III/game_III/meta/meta.CMloModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CModelInfo.h b/plugin_III/game_III/meta/meta.CModelInfo.h index bfb09e062..427bcd67a 100644 --- a/plugin_III/game_III/meta/meta.CModelInfo.h +++ b/plugin_III/game_III/meta/meta.CModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMoneyMessage.h b/plugin_III/game_III/meta/meta.CMoneyMessage.h index 57cdfbd61..ffca632d9 100644 --- a/plugin_III/game_III/meta/meta.CMoneyMessage.h +++ b/plugin_III/game_III/meta/meta.CMoneyMessage.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMoneyMessages.h b/plugin_III/game_III/meta/meta.CMoneyMessages.h index 12a50adbd..357a55f85 100644 --- a/plugin_III/game_III/meta/meta.CMoneyMessages.h +++ b/plugin_III/game_III/meta/meta.CMoneyMessages.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMotionBlurStreaks.h b/plugin_III/game_III/meta/meta.CMotionBlurStreaks.h index 517976682..c004724af 100644 --- a/plugin_III/game_III/meta/meta.CMotionBlurStreaks.h +++ b/plugin_III/game_III/meta/meta.CMotionBlurStreaks.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMouseControllerState.h b/plugin_III/game_III/meta/meta.CMouseControllerState.h index 349fa5b75..3c9368624 100644 --- a/plugin_III/game_III/meta/meta.CMouseControllerState.h +++ b/plugin_III/game_III/meta/meta.CMouseControllerState.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMousePointerStateHelper.h b/plugin_III/game_III/meta/meta.CMousePointerStateHelper.h index 70c8d9531..473d1c4fa 100644 --- a/plugin_III/game_III/meta/meta.CMousePointerStateHelper.h +++ b/plugin_III/game_III/meta/meta.CMousePointerStateHelper.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMovie.h b/plugin_III/game_III/meta/meta.CMovie.h index 0646793af..0bfdd0feb 100644 --- a/plugin_III/game_III/meta/meta.CMovie.h +++ b/plugin_III/game_III/meta/meta.CMovie.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMovingThing.h b/plugin_III/game_III/meta/meta.CMovingThing.h index 2a7802f9c..f2f384c92 100644 --- a/plugin_III/game_III/meta/meta.CMovingThing.h +++ b/plugin_III/game_III/meta/meta.CMovingThing.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CMovingThings.h b/plugin_III/game_III/meta/meta.CMovingThings.h index e918fa016..3795a3ec9 100644 --- a/plugin_III/game_III/meta/meta.CMovingThings.h +++ b/plugin_III/game_III/meta/meta.CMovingThings.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CObject.h b/plugin_III/game_III/meta/meta.CObject.h index c229d6139..342b5edfa 100644 --- a/plugin_III/game_III/meta/meta.CObject.h +++ b/plugin_III/game_III/meta/meta.CObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CObjectData.h b/plugin_III/game_III/meta/meta.CObjectData.h index 50beb870e..a446acd2a 100644 --- a/plugin_III/game_III/meta/meta.CObjectData.h +++ b/plugin_III/game_III/meta/meta.CObjectData.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.COneSheet.h b/plugin_III/game_III/meta/meta.COneSheet.h index 3c7416135..9967b2db5 100644 --- a/plugin_III/game_III/meta/meta.COneSheet.h +++ b/plugin_III/game_III/meta/meta.COneSheet.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.COnscreenTimer.h b/plugin_III/game_III/meta/meta.COnscreenTimer.h index c6ca37137..be4f5a291 100644 --- a/plugin_III/game_III/meta/meta.COnscreenTimer.h +++ b/plugin_III/game_III/meta/meta.COnscreenTimer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.COnscreenTimerEntry.h b/plugin_III/game_III/meta/meta.COnscreenTimerEntry.h index 511ea64c4..e5b29a7ca 100644 --- a/plugin_III/game_III/meta/meta.COnscreenTimerEntry.h +++ b/plugin_III/game_III/meta/meta.COnscreenTimerEntry.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPacManPickup.h b/plugin_III/game_III/meta/meta.CPacManPickup.h index e2fcc8652..366f4ba7a 100644 --- a/plugin_III/game_III/meta/meta.CPacManPickup.h +++ b/plugin_III/game_III/meta/meta.CPacManPickup.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPacManPickups.h b/plugin_III/game_III/meta/meta.CPacManPickups.h index dd38298df..0c0ef0300 100644 --- a/plugin_III/game_III/meta/meta.CPacManPickups.h +++ b/plugin_III/game_III/meta/meta.CPacManPickups.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CParticle.h b/plugin_III/game_III/meta/meta.CParticle.h index 01a80f229..187863377 100644 --- a/plugin_III/game_III/meta/meta.CParticle.h +++ b/plugin_III/game_III/meta/meta.CParticle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CParticleObject.h b/plugin_III/game_III/meta/meta.CParticleObject.h index b47635a1a..490c52161 100644 --- a/plugin_III/game_III/meta/meta.CParticleObject.h +++ b/plugin_III/game_III/meta/meta.CParticleObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPathFind.h b/plugin_III/game_III/meta/meta.CPathFind.h index 54f253f5f..f521c00c6 100644 --- a/plugin_III/game_III/meta/meta.CPathFind.h +++ b/plugin_III/game_III/meta/meta.CPathFind.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPathNode.h b/plugin_III/game_III/meta/meta.CPathNode.h index 09dcaf6ae..1eeeed565 100644 --- a/plugin_III/game_III/meta/meta.CPathNode.h +++ b/plugin_III/game_III/meta/meta.CPathNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPed.h b/plugin_III/game_III/meta/meta.CPed.h index e9424d702..e8c3d13b4 100644 --- a/plugin_III/game_III/meta/meta.CPed.h +++ b/plugin_III/game_III/meta/meta.CPed.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPedIK.h b/plugin_III/game_III/meta/meta.CPedIK.h index 3b55ad896..9007d9f7d 100644 --- a/plugin_III/game_III/meta/meta.CPedIK.h +++ b/plugin_III/game_III/meta/meta.CPedIK.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPedModelInfo.h b/plugin_III/game_III/meta/meta.CPedModelInfo.h index f44826602..a53ad92e3 100644 --- a/plugin_III/game_III/meta/meta.CPedModelInfo.h +++ b/plugin_III/game_III/meta/meta.CPedModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPedPath.h b/plugin_III/game_III/meta/meta.CPedPath.h index f91e546fb..215bd3f30 100644 --- a/plugin_III/game_III/meta/meta.CPedPath.h +++ b/plugin_III/game_III/meta/meta.CPedPath.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPedPlacement.h b/plugin_III/game_III/meta/meta.CPedPlacement.h index 2effb7618..9bd662767 100644 --- a/plugin_III/game_III/meta/meta.CPedPlacement.h +++ b/plugin_III/game_III/meta/meta.CPedPlacement.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPedStats.h b/plugin_III/game_III/meta/meta.CPedStats.h index 391c93ba9..504ecaecf 100644 --- a/plugin_III/game_III/meta/meta.CPedStats.h +++ b/plugin_III/game_III/meta/meta.CPedStats.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPhone.h b/plugin_III/game_III/meta/meta.CPhone.h index a697c9848..07d6603c5 100644 --- a/plugin_III/game_III/meta/meta.CPhone.h +++ b/plugin_III/game_III/meta/meta.CPhone.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPhoneInfo.h b/plugin_III/game_III/meta/meta.CPhoneInfo.h index 84156ce7b..76a4b25bc 100644 --- a/plugin_III/game_III/meta/meta.CPhoneInfo.h +++ b/plugin_III/game_III/meta/meta.CPhoneInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPhysical.h b/plugin_III/game_III/meta/meta.CPhysical.h index 949a84be7..dc55e4757 100644 --- a/plugin_III/game_III/meta/meta.CPhysical.h +++ b/plugin_III/game_III/meta/meta.CPhysical.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPickup.h b/plugin_III/game_III/meta/meta.CPickup.h index 16d78d003..59233c9d0 100644 --- a/plugin_III/game_III/meta/meta.CPickup.h +++ b/plugin_III/game_III/meta/meta.CPickup.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPickups.h b/plugin_III/game_III/meta/meta.CPickups.h index 262fdd074..e397c1528 100644 --- a/plugin_III/game_III/meta/meta.CPickups.h +++ b/plugin_III/game_III/meta/meta.CPickups.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPlaceName.h b/plugin_III/game_III/meta/meta.CPlaceName.h index 8f6c7c76a..884a6df73 100644 --- a/plugin_III/game_III/meta/meta.CPlaceName.h +++ b/plugin_III/game_III/meta/meta.CPlaceName.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPlaceable.h b/plugin_III/game_III/meta/meta.CPlaceable.h index 253ee8d50..cc1a94e17 100644 --- a/plugin_III/game_III/meta/meta.CPlaceable.h +++ b/plugin_III/game_III/meta/meta.CPlaceable.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPlane.h b/plugin_III/game_III/meta/meta.CPlane.h index 589dd1d7a..1f4069ff5 100644 --- a/plugin_III/game_III/meta/meta.CPlane.h +++ b/plugin_III/game_III/meta/meta.CPlane.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPlayerPed.h b/plugin_III/game_III/meta/meta.CPlayerPed.h index 7f0adef46..ed8c371be 100644 --- a/plugin_III/game_III/meta/meta.CPlayerPed.h +++ b/plugin_III/game_III/meta/meta.CPlayerPed.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPlayerSkin.h b/plugin_III/game_III/meta/meta.CPlayerSkin.h index f8bed48dc..760a409de 100644 --- a/plugin_III/game_III/meta/meta.CPlayerSkin.h +++ b/plugin_III/game_III/meta/meta.CPlayerSkin.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPools.h b/plugin_III/game_III/meta/meta.CPools.h index 97b24aa7d..9957accd0 100644 --- a/plugin_III/game_III/meta/meta.CPools.h +++ b/plugin_III/game_III/meta/meta.CPools.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CPopulation.h b/plugin_III/game_III/meta/meta.CPopulation.h index de9661810..790463464 100644 --- a/plugin_III/game_III/meta/meta.CPopulation.h +++ b/plugin_III/game_III/meta/meta.CPopulation.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CProjectile.h b/plugin_III/game_III/meta/meta.CProjectile.h index 8e9e2bf13..d511fcceb 100644 --- a/plugin_III/game_III/meta/meta.CProjectile.h +++ b/plugin_III/game_III/meta/meta.CProjectile.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CQuaternion.h b/plugin_III/game_III/meta/meta.CQuaternion.h index b4c006613..60d018e4b 100644 --- a/plugin_III/game_III/meta/meta.CQuaternion.h +++ b/plugin_III/game_III/meta/meta.CQuaternion.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRadar.h b/plugin_III/game_III/meta/meta.CRadar.h index 3b6c906e3..b2cf00cc3 100644 --- a/plugin_III/game_III/meta/meta.CRadar.h +++ b/plugin_III/game_III/meta/meta.CRadar.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRange2D.h b/plugin_III/game_III/meta/meta.CRange2D.h index cc72b1970..74489400e 100644 --- a/plugin_III/game_III/meta/meta.CRange2D.h +++ b/plugin_III/game_III/meta/meta.CRange2D.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRecordDataForChase.h b/plugin_III/game_III/meta/meta.CRecordDataForChase.h index e37bdff4e..3e55ba2c4 100644 --- a/plugin_III/game_III/meta/meta.CRecordDataForChase.h +++ b/plugin_III/game_III/meta/meta.CRecordDataForChase.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRecordDataForGame.h b/plugin_III/game_III/meta/meta.CRecordDataForGame.h index f1de0743f..336a800b8 100644 --- a/plugin_III/game_III/meta/meta.CRecordDataForGame.h +++ b/plugin_III/game_III/meta/meta.CRecordDataForGame.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CReferences.h b/plugin_III/game_III/meta/meta.CReferences.h index ffaea91cc..09b66d5dc 100644 --- a/plugin_III/game_III/meta/meta.CReferences.h +++ b/plugin_III/game_III/meta/meta.CReferences.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRegisteredCorona.h b/plugin_III/game_III/meta/meta.CRegisteredCorona.h index 86b964a28..bd1f43a96 100644 --- a/plugin_III/game_III/meta/meta.CRegisteredCorona.h +++ b/plugin_III/game_III/meta/meta.CRegisteredCorona.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRegisteredMotionBlurStreak.h b/plugin_III/game_III/meta/meta.CRegisteredMotionBlurStreak.h index e90ba786c..80e4845b1 100644 --- a/plugin_III/game_III/meta/meta.CRegisteredMotionBlurStreak.h +++ b/plugin_III/game_III/meta/meta.CRegisteredMotionBlurStreak.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRegisteredShinyText.h b/plugin_III/game_III/meta/meta.CRegisteredShinyText.h index 59186538f..e7cd89197 100644 --- a/plugin_III/game_III/meta/meta.CRegisteredShinyText.h +++ b/plugin_III/game_III/meta/meta.CRegisteredShinyText.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRemote.h b/plugin_III/game_III/meta/meta.CRemote.h index fc9a2e03b..f29d45613 100644 --- a/plugin_III/game_III/meta/meta.CRemote.h +++ b/plugin_III/game_III/meta/meta.CRemote.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRestart.h b/plugin_III/game_III/meta/meta.CRestart.h index b6d1de2e9..2aceee779 100644 --- a/plugin_III/game_III/meta/meta.CRestart.h +++ b/plugin_III/game_III/meta/meta.CRestart.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRoadBlocks.h b/plugin_III/game_III/meta/meta.CRoadBlocks.h index feea65733..a53ba31d9 100644 --- a/plugin_III/game_III/meta/meta.CRoadBlocks.h +++ b/plugin_III/game_III/meta/meta.CRoadBlocks.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRouteNode.h b/plugin_III/game_III/meta/meta.CRouteNode.h index d31e324b3..d35545aa0 100644 --- a/plugin_III/game_III/meta/meta.CRouteNode.h +++ b/plugin_III/game_III/meta/meta.CRouteNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CRubbish.h b/plugin_III/game_III/meta/meta.CRubbish.h index fcc07a0b3..d36a30d50 100644 --- a/plugin_III/game_III/meta/meta.CRubbish.h +++ b/plugin_III/game_III/meta/meta.CRubbish.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CScrollBar.h b/plugin_III/game_III/meta/meta.CScrollBar.h index bd756aa06..c294db3e4 100644 --- a/plugin_III/game_III/meta/meta.CScrollBar.h +++ b/plugin_III/game_III/meta/meta.CScrollBar.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CShinyTexts.h b/plugin_III/game_III/meta/meta.CShinyTexts.h index b118724df..ce12abfeb 100644 --- a/plugin_III/game_III/meta/meta.CShinyTexts.h +++ b/plugin_III/game_III/meta/meta.CShinyTexts.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CShotInfo.h b/plugin_III/game_III/meta/meta.CShotInfo.h index 6d9790c74..28aa7d6aa 100644 --- a/plugin_III/game_III/meta/meta.CShotInfo.h +++ b/plugin_III/game_III/meta/meta.CShotInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSimpleModelInfo.h b/plugin_III/game_III/meta/meta.CSimpleModelInfo.h index 8c7584591..19255bc37 100644 --- a/plugin_III/game_III/meta/meta.CSimpleModelInfo.h +++ b/plugin_III/game_III/meta/meta.CSimpleModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSkidmark.h b/plugin_III/game_III/meta/meta.CSkidmark.h index 635e92ad0..13398fbe1 100644 --- a/plugin_III/game_III/meta/meta.CSkidmark.h +++ b/plugin_III/game_III/meta/meta.CSkidmark.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSkidmarks.h b/plugin_III/game_III/meta/meta.CSkidmarks.h index 7f28e37b1..5aa437de3 100644 --- a/plugin_III/game_III/meta/meta.CSkidmarks.h +++ b/plugin_III/game_III/meta/meta.CSkidmarks.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSpecialFX.h b/plugin_III/game_III/meta/meta.CSpecialFX.h index 28be55004..65a96dc65 100644 --- a/plugin_III/game_III/meta/meta.CSpecialFX.h +++ b/plugin_III/game_III/meta/meta.CSpecialFX.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSpecialParticleStuff.h b/plugin_III/game_III/meta/meta.CSpecialParticleStuff.h index 0107c447e..2d2d73cdc 100644 --- a/plugin_III/game_III/meta/meta.CSpecialParticleStuff.h +++ b/plugin_III/game_III/meta/meta.CSpecialParticleStuff.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSprite.h b/plugin_III/game_III/meta/meta.CSprite.h index 1abd483dd..bed4131eb 100644 --- a/plugin_III/game_III/meta/meta.CSprite.h +++ b/plugin_III/game_III/meta/meta.CSprite.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSprite2d.h b/plugin_III/game_III/meta/meta.CSprite2d.h index 19d240ce8..400bc0a58 100644 --- a/plugin_III/game_III/meta/meta.CSprite2d.h +++ b/plugin_III/game_III/meta/meta.CSprite2d.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CStoredCar.h b/plugin_III/game_III/meta/meta.CStoredCar.h index 104074fef..6434ff1aa 100644 --- a/plugin_III/game_III/meta/meta.CStoredCar.h +++ b/plugin_III/game_III/meta/meta.CStoredCar.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CStoredCollPoly.h b/plugin_III/game_III/meta/meta.CStoredCollPoly.h index bf5650fc5..8f1edc6f2 100644 --- a/plugin_III/game_III/meta/meta.CStoredCollPoly.h +++ b/plugin_III/game_III/meta/meta.CStoredCollPoly.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CStuckCarCheck.h b/plugin_III/game_III/meta/meta.CStuckCarCheck.h index 05d2b9720..37f97252d 100644 --- a/plugin_III/game_III/meta/meta.CStuckCarCheck.h +++ b/plugin_III/game_III/meta/meta.CStuckCarCheck.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CSurfaceTable.h b/plugin_III/game_III/meta/meta.CSurfaceTable.h index 2185d1535..2d9cafdda 100644 --- a/plugin_III/game_III/meta/meta.CSurfaceTable.h +++ b/plugin_III/game_III/meta/meta.CSurfaceTable.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTempNode.h b/plugin_III/game_III/meta/meta.CTempNode.h index 3b4de3a43..93e9de8aa 100644 --- a/plugin_III/game_III/meta/meta.CTempNode.h +++ b/plugin_III/game_III/meta/meta.CTempNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CText.h b/plugin_III/game_III/meta/meta.CText.h index f4eb5e774..0eb74da77 100644 --- a/plugin_III/game_III/meta/meta.CText.h +++ b/plugin_III/game_III/meta/meta.CText.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTheCarGenerators.h b/plugin_III/game_III/meta/meta.CTheCarGenerators.h index 4c8ddaae3..c2e08543c 100644 --- a/plugin_III/game_III/meta/meta.CTheCarGenerators.h +++ b/plugin_III/game_III/meta/meta.CTheCarGenerators.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTimeCycle.h b/plugin_III/game_III/meta/meta.CTimeCycle.h index 8f2da07db..5ec879d3b 100644 --- a/plugin_III/game_III/meta/meta.CTimeCycle.h +++ b/plugin_III/game_III/meta/meta.CTimeCycle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTimeModelInfo.h b/plugin_III/game_III/meta/meta.CTimeModelInfo.h index a6f530ef7..526106d2c 100644 --- a/plugin_III/game_III/meta/meta.CTimeModelInfo.h +++ b/plugin_III/game_III/meta/meta.CTimeModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTimer.h b/plugin_III/game_III/meta/meta.CTimer.h index 7a9395aa2..fdbb26dd9 100644 --- a/plugin_III/game_III/meta/meta.CTimer.h +++ b/plugin_III/game_III/meta/meta.CTimer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTowerClock.h b/plugin_III/game_III/meta/meta.CTowerClock.h index 1d80f3352..1fa164b0e 100644 --- a/plugin_III/game_III/meta/meta.CTowerClock.h +++ b/plugin_III/game_III/meta/meta.CTowerClock.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTrafficLights.h b/plugin_III/game_III/meta/meta.CTrafficLights.h index 2a998a2a2..277282d29 100644 --- a/plugin_III/game_III/meta/meta.CTrafficLights.h +++ b/plugin_III/game_III/meta/meta.CTrafficLights.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTrain.h b/plugin_III/game_III/meta/meta.CTrain.h index b2a78e8b5..157b1f06a 100644 --- a/plugin_III/game_III/meta/meta.CTrain.h +++ b/plugin_III/game_III/meta/meta.CTrain.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTrainCamNode.h b/plugin_III/game_III/meta/meta.CTrainCamNode.h index bc008199a..5b8b71d11 100644 --- a/plugin_III/game_III/meta/meta.CTrainCamNode.h +++ b/plugin_III/game_III/meta/meta.CTrainCamNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTrainDoor.h b/plugin_III/game_III/meta/meta.CTrainDoor.h index 9d023a071..3e2823ced 100644 --- a/plugin_III/game_III/meta/meta.CTrainDoor.h +++ b/plugin_III/game_III/meta/meta.CTrainDoor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CTreadable.h b/plugin_III/game_III/meta/meta.CTreadable.h index 2896fd57e..89381663f 100644 --- a/plugin_III/game_III/meta/meta.CTreadable.h +++ b/plugin_III/game_III/meta/meta.CTreadable.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CUpsideDownCarCheck.h b/plugin_III/game_III/meta/meta.CUpsideDownCarCheck.h index 564d84a65..5abc06ee8 100644 --- a/plugin_III/game_III/meta/meta.CUpsideDownCarCheck.h +++ b/plugin_III/game_III/meta/meta.CUpsideDownCarCheck.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CUserDisplay.h b/plugin_III/game_III/meta/meta.CUserDisplay.h index e7ee07863..9e2595872 100644 --- a/plugin_III/game_III/meta/meta.CUserDisplay.h +++ b/plugin_III/game_III/meta/meta.CUserDisplay.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CVehicle.h b/plugin_III/game_III/meta/meta.CVehicle.h index d832874d4..8d35e00fc 100644 --- a/plugin_III/game_III/meta/meta.CVehicle.h +++ b/plugin_III/game_III/meta/meta.CVehicle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CVehicleModelInfo.h b/plugin_III/game_III/meta/meta.CVehicleModelInfo.h index fe97ca3b0..3f8db6445 100644 --- a/plugin_III/game_III/meta/meta.CVehicleModelInfo.h +++ b/plugin_III/game_III/meta/meta.CVehicleModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CVisibilityPlugins.h b/plugin_III/game_III/meta/meta.CVisibilityPlugins.h index e18d163be..b84971665 100644 --- a/plugin_III/game_III/meta/meta.CVisibilityPlugins.h +++ b/plugin_III/game_III/meta/meta.CVisibilityPlugins.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CWanted.h b/plugin_III/game_III/meta/meta.CWanted.h index eb566e409..fa25283f6 100644 --- a/plugin_III/game_III/meta/meta.CWanted.h +++ b/plugin_III/game_III/meta/meta.CWanted.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CWaterCannon.h b/plugin_III/game_III/meta/meta.CWaterCannon.h index b2e0d4485..e4ca9b963 100644 --- a/plugin_III/game_III/meta/meta.CWaterCannon.h +++ b/plugin_III/game_III/meta/meta.CWaterCannon.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CWaterCannons.h b/plugin_III/game_III/meta/meta.CWaterCannons.h index 67b10b29d..4744fa7f9 100644 --- a/plugin_III/game_III/meta/meta.CWaterCannons.h +++ b/plugin_III/game_III/meta/meta.CWaterCannons.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CWeapon.h b/plugin_III/game_III/meta/meta.CWeapon.h index 672578692..b5ba12463 100644 --- a/plugin_III/game_III/meta/meta.CWeapon.h +++ b/plugin_III/game_III/meta/meta.CWeapon.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CWeather.h b/plugin_III/game_III/meta/meta.CWeather.h index d102f77cc..6fd027933 100644 --- a/plugin_III/game_III/meta/meta.CWeather.h +++ b/plugin_III/game_III/meta/meta.CWeather.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CXtraCompsModelInfo.h b/plugin_III/game_III/meta/meta.CXtraCompsModelInfo.h index 168766d4b..9deeff279 100644 --- a/plugin_III/game_III/meta/meta.CXtraCompsModelInfo.h +++ b/plugin_III/game_III/meta/meta.CXtraCompsModelInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.CZone.h b/plugin_III/game_III/meta/meta.CZone.h index e01b88c16..4da1396da 100644 --- a/plugin_III/game_III/meta/meta.CZone.h +++ b/plugin_III/game_III/meta/meta.CZone.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.C_PcSave.h b/plugin_III/game_III/meta/meta.C_PcSave.h index 764d7b33e..375bd58ce 100644 --- a/plugin_III/game_III/meta/meta.C_PcSave.h +++ b/plugin_III/game_III/meta/meta.C_PcSave.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.GenericGameStorage.h b/plugin_III/game_III/meta/meta.GenericGameStorage.h index df8194844..cfe49c04f 100644 --- a/plugin_III/game_III/meta/meta.GenericGameStorage.h +++ b/plugin_III/game_III/meta/meta.GenericGameStorage.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.NodeName.h b/plugin_III/game_III/meta/meta.NodeName.h index 5ff075cd8..9d4c733a0 100644 --- a/plugin_III/game_III/meta/meta.NodeName.h +++ b/plugin_III/game_III/meta/meta.NodeName.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.RenderBuffer.h b/plugin_III/game_III/meta/meta.RenderBuffer.h index 8585f2704..e339d63f5 100644 --- a/plugin_III/game_III/meta/meta.RenderBuffer.h +++ b/plugin_III/game_III/meta/meta.RenderBuffer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.RpAnimBlend.h b/plugin_III/game_III/meta/meta.RpAnimBlend.h index 85e02c16a..a5240e577 100644 --- a/plugin_III/game_III/meta/meta.RpAnimBlend.h +++ b/plugin_III/game_III/meta/meta.RpAnimBlend.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.cAudioCollision.h b/plugin_III/game_III/meta/meta.cAudioCollision.h index fd0984f38..5beecf0ad 100644 --- a/plugin_III/game_III/meta/meta.cAudioCollision.h +++ b/plugin_III/game_III/meta/meta.cAudioCollision.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.cAudioCollisionManager.h b/plugin_III/game_III/meta/meta.cAudioCollisionManager.h index c1520b823..62add9e46 100644 --- a/plugin_III/game_III/meta/meta.cAudioCollisionManager.h +++ b/plugin_III/game_III/meta/meta.cAudioCollisionManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.cAudioScriptObject.h b/plugin_III/game_III/meta/meta.cAudioScriptObject.h index d2350d5da..84a700e97 100644 --- a/plugin_III/game_III/meta/meta.cAudioScriptObject.h +++ b/plugin_III/game_III/meta/meta.cAudioScriptObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.cDMAudio.h b/plugin_III/game_III/meta/meta.cDMAudio.h index 8e2d5f007..77fdb8a0f 100644 --- a/plugin_III/game_III/meta/meta.cDMAudio.h +++ b/plugin_III/game_III/meta/meta.cDMAudio.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/meta/meta.cMusicManager.h b/plugin_III/game_III/meta/meta.cMusicManager.h index 6dd3b9550..8d6ec9dea 100644 --- a/plugin_III/game_III/meta/meta.cMusicManager.h +++ b/plugin_III/game_III/meta/meta.cMusicManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_III/game_III/tColSurface.h b/plugin_III/game_III/tColSurface.h index 12da72a96..31c7b22fc 100644 --- a/plugin_III/game_III/tColSurface.h +++ b/plugin_III/game_III/tColSurface.h @@ -14,5 +14,8 @@ struct PLUGIN_API tColSurface { unsigned char lighting; unsigned char light; }; - +VALIDATE_OFFSET(tColSurface, material, 0x0); +VALIDATE_OFFSET(tColSurface, flag, 0x1); +VALIDATE_OFFSET(tColSurface, lighting, 0x2); +VALIDATE_OFFSET(tColSurface, light, 0x3); VALIDATE_SIZE(tColSurface, 0x4); \ No newline at end of file diff --git a/plugin_III/game_III/tHandlingData.h b/plugin_III/game_III/tHandlingData.h index e0831472f..aadd46417 100644 --- a/plugin_III/game_III/tHandlingData.h +++ b/plugin_III/game_III/tHandlingData.h @@ -72,5 +72,32 @@ struct PLUGIN_API tHandlingData { eVehicleLightsSize m_nRearLights; //char _padD6[2]; }; - +VALIDATE_OFFSET(tHandlingData, m_nHandlingId, 0x0); +VALIDATE_OFFSET(tHandlingData, m_fMass, 0x4); +VALIDATE_OFFSET(tHandlingData, m_fInvMass, 0x8); +VALIDATE_OFFSET(tHandlingData, m_fTurnMass, 0xC); +VALIDATE_OFFSET(tHandlingData, m_vDimensions, 0x10); +VALIDATE_OFFSET(tHandlingData, m_vCentreOfMass, 0x1C); +VALIDATE_OFFSET(tHandlingData, m_nPercentSubmerged, 0x28); +VALIDATE_OFFSET(tHandlingData, m_fBuoyancyConstant, 0x2C); +VALIDATE_OFFSET(tHandlingData, m_fTractionMultiplier, 0x30); +VALIDATE_OFFSET(tHandlingData, m_transmissionData, 0x34); +VALIDATE_OFFSET(tHandlingData, m_fBrakeDeceleration, 0x94); +VALIDATE_OFFSET(tHandlingData, m_fBrakeBias, 0x98); +VALIDATE_OFFSET(tHandlingData, m_bABS, 0x9C); +VALIDATE_OFFSET(tHandlingData, m_fSteeringLock, 0xA0); +VALIDATE_OFFSET(tHandlingData, m_fTractionLoss, 0xA4); +VALIDATE_OFFSET(tHandlingData, m_fTractionBias, 0xA8); +VALIDATE_OFFSET(tHandlingData, field_AC, 0xAC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionForceLevel, 0xB0); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionDampingLevel, 0xB4); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionUpperLimit, 0xB8); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionLowerLimit, 0xBC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionBiasBetweenFrontAndRear, 0xC0); +VALIDATE_OFFSET(tHandlingData, m_fCollisionDamageMultiplier, 0xC4); +VALIDATE_OFFSET(tHandlingData, m_nModelFlags, 0xC8); +VALIDATE_OFFSET(tHandlingData, m_fSeatOffsetDistance, 0xCC); +VALIDATE_OFFSET(tHandlingData, m_nMonetaryValue, 0xD0); +VALIDATE_OFFSET(tHandlingData, m_nFrontLights, 0xD4); +VALIDATE_OFFSET(tHandlingData, m_nRearLights, 0xD5); VALIDATE_SIZE(tHandlingData, 0xD8); diff --git a/plugin_III/game_III/tParticleSystemData.h b/plugin_III/game_III/tParticleSystemData.h index 04b32be1b..f806df192 100644 --- a/plugin_III/game_III/tParticleSystemData.h +++ b/plugin_III/game_III/tParticleSystemData.h @@ -72,5 +72,41 @@ struct tParticleSystemData { RwTexture *m_pTexture; // rendering texture CParticle *m_pParticles; // created particles list }; - +VALIDATE_OFFSET(tParticleSystemData, m_nType, 0x0); +VALIDATE_OFFSET(tParticleSystemData, m_szName, 0x4); +VALIDATE_OFFSET(tParticleSystemData, m_fParticleCreateRange, 0x18); +VALIDATE_OFFSET(tParticleSystemData, m_fDefaultInitialRadius, 0x1C); +VALIDATE_OFFSET(tParticleSystemData, m_fExpansionRate, 0x20); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationInitialAngle, 0x24); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationAngleChangeAmount, 0x26); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationChangeTime, 0x28); +VALIDATE_OFFSET(tParticleSystemData, m_nZRadiusChangeTime, 0x2A); +VALIDATE_OFFSET(tParticleSystemData, m_fInitialZRadius, 0x2C); +VALIDATE_OFFSET(tParticleSystemData, m_fZRadiusChangeAmount, 0x30); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackTime, 0x34); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackAmount, 0x36); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackInitialIntensity, 0x38); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaInitialIntensity, 0x39); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaTime, 0x3A); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaAmount, 0x3C); +VALIDATE_OFFSET(tParticleSystemData, m_nStartAnimationFrame, 0x3E); +VALIDATE_OFFSET(tParticleSystemData, m_nFinalAnimationFrame, 0x40); +VALIDATE_OFFSET(tParticleSystemData, m_nAnimationSpeed, 0x42); +VALIDATE_OFFSET(tParticleSystemData, m_nRotationSpeed, 0x44); +VALIDATE_OFFSET(tParticleSystemData, m_fGravitationalAcceleration, 0x48); +VALIDATE_OFFSET(tParticleSystemData, m_nFrictionDecceleration, 0x4C); +VALIDATE_OFFSET(tParticleSystemData, m_nDefaultLifeSpan, 0x50); +VALIDATE_OFFSET(tParticleSystemData, m_fPositionRandomError, 0x54); +VALIDATE_OFFSET(tParticleSystemData, m_fVelocityRandomError, 0x58); +VALIDATE_OFFSET(tParticleSystemData, m_fExpansionRateError, 0x5C); +VALIDATE_OFFSET(tParticleSystemData, m_nRotationRateError, 0x60); +VALIDATE_OFFSET(tParticleSystemData, m_nLifeSpanErrorShape, 0x64); +VALIDATE_OFFSET(tParticleSystemData, m_fTrailLengthMultiplier, 0x68); +VALIDATE_OFFSET(tParticleSystemData, m_nFlags, 0x6C); +VALIDATE_OFFSET(tParticleSystemData, m_renderColor, 0x70); +VALIDATE_OFFSET(tParticleSystemData, m_nInitialColorVariation, 0x74); +VALIDATE_OFFSET(tParticleSystemData, m_fadeDestinationColor, 0x75); +VALIDATE_OFFSET(tParticleSystemData, m_nColorFadeTime, 0x7C); +VALIDATE_OFFSET(tParticleSystemData, m_pTexture, 0x80); +VALIDATE_OFFSET(tParticleSystemData, m_pParticles, 0x84); VALIDATE_SIZE(tParticleSystemData, 0x88); \ No newline at end of file diff --git a/plugin_III/game_III/tTransmissionGear.h b/plugin_III/game_III/tTransmissionGear.h index fd9a405fa..1da717e72 100644 --- a/plugin_III/game_III/tTransmissionGear.h +++ b/plugin_III/game_III/tTransmissionGear.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto 3) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" struct tTransmissionGear { @@ -13,5 +12,7 @@ struct tTransmissionGear { float fShiftUpVelocity; float fShiftDownVelocity; }; - +VALIDATE_OFFSET(tTransmissionGear, fMaxVelocity, 0x0); +VALIDATE_OFFSET(tTransmissionGear, fShiftUpVelocity, 0x4); +VALIDATE_OFFSET(tTransmissionGear, fShiftDownVelocity, 0x8); VALIDATE_SIZE(tTransmissionGear, 0xC); \ No newline at end of file diff --git a/plugin_IV/game_IV/CAmmoData.h b/plugin_IV/game_IV/CAmmoData.h index 3d1499e90..53d72fe0e 100644 --- a/plugin_IV/game_IV/CAmmoData.h +++ b/plugin_IV/game_IV/CAmmoData.h @@ -16,5 +16,10 @@ class CAmmoData { uint32_t m_nAmmoInClip; uint32_t m_nAmmoTotal; }; - +VALIDATE_OFFSET(CAmmoData, field_1, 0x0); +VALIDATE_OFFSET(CAmmoData, m_nType, 0x18); +VALIDATE_OFFSET(CAmmoData, field_32, 0x1C); +VALIDATE_OFFSET(CAmmoData, field_68, 0x20); +VALIDATE_OFFSET(CAmmoData, m_nAmmoInClip, 0x5C); +VALIDATE_OFFSET(CAmmoData, m_nAmmoTotal, 0x60); VALIDATE_SIZE(CAmmoData, 0x64); diff --git a/plugin_IV/game_IV/CAutomobile.h b/plugin_IV/game_IV/CAutomobile.h index e977d65c1..1f9d5327d 100644 --- a/plugin_IV/game_IV/CAutomobile.h +++ b/plugin_IV/game_IV/CAutomobile.h @@ -13,4 +13,5 @@ class CAutomobile : public CVehicle { CAutomobile(uint8_t createdBy); }; +VALIDATE_SIZE(CAutomobile, 0x2080); diff --git a/plugin_IV/game_IV/CBaseDC.h b/plugin_IV/game_IV/CBaseDC.h index bf90550d7..e3bde1ea3 100644 --- a/plugin_IV/game_IV/CBaseDC.h +++ b/plugin_IV/game_IV/CBaseDC.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CVirtualBase.h" @@ -30,5 +29,5 @@ class CBaseDC { virtual void m_4() { plugin::CallVirtualMethod<4>(this); } virtual void m_5() { plugin::CallVirtualMethod<5>(this); } }; - +VALIDATE_OFFSET(CBaseDC, field_1, 0x4); VALIDATE_SIZE(CBaseDC, 0x8); diff --git a/plugin_IV/game_IV/CBike.h b/plugin_IV/game_IV/CBike.h index b9337818d..aaea19a55 100644 --- a/plugin_IV/game_IV/CBike.h +++ b/plugin_IV/game_IV/CBike.h @@ -12,3 +12,4 @@ class CBike : public CVehicle { public: CBike(uint8_t createdBy); }; +VALIDATE_SIZE(CBike, 0x2080); diff --git a/plugin_IV/game_IV/CBoat.h b/plugin_IV/game_IV/CBoat.h index d75acfb30..c420effaa 100644 --- a/plugin_IV/game_IV/CBoat.h +++ b/plugin_IV/game_IV/CBoat.h @@ -12,3 +12,4 @@ class CBoat : public CVehicle { public: CBoat(uint8_t createdBy); }; +VALIDATE_SIZE(CBoat, 0x2080); diff --git a/plugin_IV/game_IV/CCam.h b/plugin_IV/game_IV/CCam.h index 180fbed7f..c05620943 100644 --- a/plugin_IV/game_IV/CCam.h +++ b/plugin_IV/game_IV/CCam.h @@ -159,5 +159,34 @@ class CCam { CCam* SetCamMode(eCamMode mode, int32_t arg2); void DestroyAllCams(bool arg); }; - +VALIDATE_OFFSET(CCam, field_4, 0x4); +VALIDATE_OFFSET(CCam, m_mMatrix, 0x10); +VALIDATE_OFFSET(CCam, field_100, 0x50); +VALIDATE_OFFSET(CCam, m_fFOV, 0x60); +VALIDATE_OFFSET(CCam, m_fNearClip, 0x64); +VALIDATE_OFFSET(CCam, m_fFarClip, 0x68); +VALIDATE_OFFSET(CCam, m_fNearDOF, 0x6C); +VALIDATE_OFFSET(CCam, m_fFarDOF, 0x70); +VALIDATE_OFFSET(CCam, field_132, 0x74); +VALIDATE_OFFSET(CCam, m_pMatrix, 0x90); +VALIDATE_OFFSET(CCam, field_168, 0x94); +VALIDATE_OFFSET(CCam, m_pTheCamera, 0x114); +VALIDATE_OFFSET(CCam, m_pNext, 0x118); +VALIDATE_OFFSET(CCam, field_278, 0x11C); +VALIDATE_OFFSET(CCam, m_pCurrentCamera, 0x124); +VALIDATE_OFFSET(CCam, field_279, 0x128); +VALIDATE_OFFSET(CCam, m_bField_290, 0x13D); +VALIDATE_OFFSET(CCam, m_bField_291, 0x13E); +VALIDATE_OFFSET(CCam, m_bField_292, 0x13F); +VALIDATE_OFFSET(CCam, m_bField_293, 0x140); +VALIDATE_OFFSET(CCam, field_294, 0x141); +VALIDATE_OFFSET(CCam, m_vRot, 0x160); +VALIDATE_OFFSET(CCam, field_295, 0x170); +VALIDATE_OFFSET(CCam, field_298, 0x18D); +VALIDATE_OFFSET(CCam, m_fHintFOV, 0x1B8); +VALIDATE_OFFSET(CCam, field_300, 0x1BC); +VALIDATE_OFFSET(CCam, field_338, 0x1C8); +VALIDATE_OFFSET(CCam, field_342, 0x1CC); +VALIDATE_OFFSET(CCam, field_448, 0x1D0); +VALIDATE_OFFSET(CCam, field_500, 0x1D4); VALIDATE_SIZE(CCam, 0x500); diff --git a/plugin_IV/game_IV/CCamFollowPed.h b/plugin_IV/game_IV/CCamFollowPed.h index 494ddd82a..407aaf0a7 100644 --- a/plugin_IV/game_IV/CCamFollowPed.h +++ b/plugin_IV/game_IV/CCamFollowPed.h @@ -12,3 +12,4 @@ class CCamFollowPed : public CCam { uint8_t field_28[92]; float m_fFOV; }; +VALIDATE_SIZE(CCamFollowPed, 0x560); diff --git a/plugin_IV/game_IV/CCamFollowVehicle.h b/plugin_IV/game_IV/CCamFollowVehicle.h index 94a49833a..acb3f606e 100644 --- a/plugin_IV/game_IV/CCamFollowVehicle.h +++ b/plugin_IV/game_IV/CCamFollowVehicle.h @@ -11,4 +11,5 @@ class CCamFollowVehicle : public CCam { public: static bool& bProstituteCam; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCamFollowVehicle, 0x500); \ No newline at end of file diff --git a/plugin_IV/game_IV/CCamGame.h b/plugin_IV/game_IV/CCamGame.h index fe2ea4d15..e1b58ee24 100644 --- a/plugin_IV/game_IV/CCamGame.h +++ b/plugin_IV/game_IV/CCamGame.h @@ -15,4 +15,6 @@ class CCamGame : public CCam { eCamMode GetCurrentCamMode() { return plugin::CallVirtualMethodAndReturn(this); } }; +VALIDATE_OFFSET(CCamGame, field_2, 0x500); +VALIDATE_SIZE(CCamGame, 0x520); diff --git a/plugin_IV/game_IV/CCamIdle.h b/plugin_IV/game_IV/CCamIdle.h index e49c2908a..3cad41f49 100644 --- a/plugin_IV/game_IV/CCamIdle.h +++ b/plugin_IV/game_IV/CCamIdle.h @@ -16,3 +16,4 @@ class CCamIdle : CCam { void ResetStats(bool unused); }; +VALIDATE_SIZE(CCamIdle, 0x500); diff --git a/plugin_IV/game_IV/CCamScriptInstruction.cpp b/plugin_IV/game_IV/CCamScriptInstruction.cpp index 191578f92..da840a70b 100644 --- a/plugin_IV/game_IV/CCamScriptInstruction.cpp +++ b/plugin_IV/game_IV/CCamScriptInstruction.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto IV) header file + Plugin-SDK (Grand Theft Auto IV) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_IV/game_IV/CCamScriptInstruction.h b/plugin_IV/game_IV/CCamScriptInstruction.h index 21427d4a9..af0a60b36 100644 --- a/plugin_IV/game_IV/CCamScriptInstruction.h +++ b/plugin_IV/game_IV/CCamScriptInstruction.h @@ -24,6 +24,8 @@ class CCamScriptInstruction { public: void SetInstruction(CCamScriptInstruction* instruction); }; +VALIDATE_OFFSET(CCamScriptInstruction, field_1, 0x4); +VALIDATE_SIZE(CCamScriptInstruction, 0x8); class CCamScriptInstruction_SetCamBehindPed : public CCamScriptInstruction { public: @@ -36,6 +38,8 @@ class CCamScriptInstruction_SetCamBehindPed : public CCamScriptInstruction { void Process() override; }; +VALIDATE_OFFSET(CCamScriptInstruction_SetCamBehindPed, m_pPed, 0x8); +VALIDATE_SIZE(CCamScriptInstruction_SetCamBehindPed, 0xC); class CCamScriptInstruction_SetCamInFrontPed : public CCamScriptInstruction { public: @@ -48,6 +52,8 @@ class CCamScriptInstruction_SetCamInFrontPed : public CCamScriptInstruction { void Process() override; }; +VALIDATE_OFFSET(CCamScriptInstruction_SetCamInFrontPed, m_pPed, 0x8); +VALIDATE_SIZE(CCamScriptInstruction_SetCamInFrontPed, 0xC); class CCamScriptInstruction_EnableDebugCam : public CCamScriptInstruction { public: @@ -60,6 +66,8 @@ class CCamScriptInstruction_EnableDebugCam : public CCamScriptInstruction { void Process() override; }; +VALIDATE_OFFSET(CCamScriptInstruction_EnableDebugCam, m_bEnabled, 0x8); +VALIDATE_SIZE(CCamScriptInstruction_EnableDebugCam, 0xC); class CCamScriptInstruction_CamProcess : public CCamScriptInstruction { public: @@ -72,6 +80,8 @@ class CCamScriptInstruction_CamProcess : public CCamScriptInstruction { void Process() override; }; +VALIDATE_OFFSET(CCamScriptInstruction_CamProcess, m_pCam, 0x8); +VALIDATE_SIZE(CCamScriptInstruction_CamProcess, 0xC); class CCamScriptInstruction_DestroyAllCams : public CCamScriptInstruction { public: @@ -82,6 +92,7 @@ class CCamScriptInstruction_DestroyAllCams : public CCamScriptInstruction { public: void Process() override; }; +VALIDATE_SIZE(CCamScriptInstruction_DestroyAllCams, 0x8); class CCamScriptInstruction_SetPosTargetEntity : public CCamScriptInstruction { public: @@ -97,5 +108,8 @@ class CCamScriptInstruction_SetPosTargetEntity : public CCamScriptInstruction { public: void Process() override; }; +VALIDATE_OFFSET(CCamScriptInstruction_SetPosTargetEntity, m_nCamIndex, 0x8); +VALIDATE_OFFSET(CCamScriptInstruction_SetPosTargetEntity, m_pPed, 0xC); +VALIDATE_SIZE(CCamScriptInstruction_SetPosTargetEntity, 0x10); extern CCamScriptInstruction& CamScript; \ No newline at end of file diff --git a/plugin_IV/game_IV/CCamera.h b/plugin_IV/game_IV/CCamera.h index aba723c60..26328f417 100644 --- a/plugin_IV/game_IV/CCamera.h +++ b/plugin_IV/game_IV/CCamera.h @@ -56,5 +56,12 @@ class CCamera { return m_pCamFinal->m_pMatrix->pos; } }; +VALIDATE_OFFSET(CCamera, field_4, 0x0); +VALIDATE_OFFSET(CCamera, m_pCamFinal, 0x4); +VALIDATE_OFFSET(CCamera, field_12, 0x8); +VALIDATE_OFFSET(CCamera, m_pCamGame, 0xC); +VALIDATE_OFFSET(CCamera, m_pCamFollowVeh, 0x10); +VALIDATE_OFFSET(CCamera, m_pCamFollowPed, 0x14); +VALIDATE_SIZE(CCamera, 0x18); extern CCamera& TheCamera; diff --git a/plugin_IV/game_IV/CCheat.h b/plugin_IV/game_IV/CCheat.h index 2890fd7b0..790188535 100644 --- a/plugin_IV/game_IV/CCheat.h +++ b/plugin_IV/game_IV/CCheat.h @@ -66,3 +66,4 @@ class CCheat { static void ChangeWeatherCheat(); static void SpawnAnnihilator(); }; +VALIDATE_SIZE(CCheat, 0x1); diff --git a/plugin_IV/game_IV/CClock.h b/plugin_IV/game_IV/CClock.h index 92a9b4e05..d9e98f249 100644 --- a/plugin_IV/game_IV/CClock.h +++ b/plugin_IV/game_IV/CClock.h @@ -17,3 +17,4 @@ class CClock { static int32_t& ms_nGameClockDayOfWeek; }; +VALIDATE_SIZE(CClock, 0x1); diff --git a/plugin_IV/game_IV/CColPoint.h b/plugin_IV/game_IV/CColPoint.h index 8b4449786..fbe461fe1 100644 --- a/plugin_IV/game_IV/CColPoint.h +++ b/plugin_IV/game_IV/CColPoint.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CVirtualBase.h" @@ -13,3 +12,4 @@ class CColPoint { public: }; +VALIDATE_SIZE(CColPoint, 0x1); diff --git a/plugin_IV/game_IV/CControl.h b/plugin_IV/game_IV/CControl.h index 211b66ca8..29edb257a 100644 --- a/plugin_IV/game_IV/CControl.h +++ b/plugin_IV/game_IV/CControl.h @@ -26,6 +26,14 @@ class CControl : rage::datBase { public: void Clear(int32_t arg1); }; - +VALIDATE_OFFSET(CControl, field_1972, 0x4); +VALIDATE_OFFSET(CControl, m_onFootMap, 0x7B8); +VALIDATE_OFFSET(CControl, m_meleeMap, 0xF70); +VALIDATE_OFFSET(CControl, m_inVehicleMap, 0x1728); +VALIDATE_OFFSET(CControl, m_unkMap, 0x1EE0); +VALIDATE_OFFSET(CControl, m_inputs, 0x2698); +VALIDATE_OFFSET(CControl, field_2084, 0x3248); +VALIDATE_OFFSET(CControl, timeInMilliseconds, 0x3A6C); +VALIDATE_OFFSET(CControl, field_16000, 0x3A70); VALIDATE_SIZE(CControl, 0x3A84); diff --git a/plugin_IV/game_IV/CControlMgr.h b/plugin_IV/game_IV/CControlMgr.h index ccf694b8e..5d8c0cbe1 100644 --- a/plugin_IV/game_IV/CControlMgr.h +++ b/plugin_IV/game_IV/CControlMgr.h @@ -17,3 +17,4 @@ class CControlMgr { public: }; +VALIDATE_SIZE(CControlMgr, 0x1); diff --git a/plugin_IV/game_IV/CCoronas.h b/plugin_IV/game_IV/CCoronas.h index 11ce38ab6..00ebb775c 100644 --- a/plugin_IV/game_IV/CCoronas.h +++ b/plugin_IV/game_IV/CCoronas.h @@ -12,3 +12,4 @@ class CCoronas { public: }; +VALIDATE_SIZE(CCoronas, 0x1); diff --git a/plugin_IV/game_IV/CCredits.h b/plugin_IV/game_IV/CCredits.h index c4ded16f9..d9962b4aa 100644 --- a/plugin_IV/game_IV/CCredits.h +++ b/plugin_IV/game_IV/CCredits.h @@ -12,3 +12,4 @@ class CCredits { static bool& bCreditsGoing; static uint32_t& CreditsStartTime; }; +VALIDATE_SIZE(CCredits, 0x1); diff --git a/plugin_IV/game_IV/CCutsceneMgr.h b/plugin_IV/game_IV/CCutsceneMgr.h index 558d317f3..7771500d8 100644 --- a/plugin_IV/game_IV/CCutsceneMgr.h +++ b/plugin_IV/game_IV/CCutsceneMgr.h @@ -19,3 +19,4 @@ class CCutsceneMgr { static void LoadSprites(); static void UnloadSprites(); }; +VALIDATE_SIZE(CCutsceneMgr, 0x1); diff --git a/plugin_IV/game_IV/CDrawRadarCircleDC.h b/plugin_IV/game_IV/CDrawRadarCircleDC.h index 24dbade1c..7b39511e7 100644 --- a/plugin_IV/game_IV/CDrawRadarCircleDC.h +++ b/plugin_IV/game_IV/CDrawRadarCircleDC.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CBaseDC.h" @@ -22,5 +21,7 @@ class CDrawRadarCircleDC : CBaseDC { virtual void Execute() override; virtual int32_t GetSize() override; }; - +VALIDATE_OFFSET(CDrawRadarCircleDC, pos, 0x8); +VALIDATE_OFFSET(CDrawRadarCircleDC, scale, 0x10); +VALIDATE_OFFSET(CDrawRadarCircleDC, col, 0x18); VALIDATE_SIZE(CDrawRadarCircleDC, 0x1C); diff --git a/plugin_IV/game_IV/CDrawRectDC.h b/plugin_IV/game_IV/CDrawRectDC.h index 047c2d9a1..2e68578df 100644 --- a/plugin_IV/game_IV/CDrawRectDC.h +++ b/plugin_IV/game_IV/CDrawRectDC.h @@ -17,5 +17,6 @@ class CDrawRectDC : public CBaseDC { public: CDrawRectDC(rage::Vector4 const& rect, rage::Color32 const& col); }; - +VALIDATE_OFFSET(CDrawRectDC, m_rect, 0x8); +VALIDATE_OFFSET(CDrawRectDC, m_col, 0x18); VALIDATE_SIZE(CDrawRectDC, 0x1C); diff --git a/plugin_IV/game_IV/CDrawSpriteDC.h b/plugin_IV/game_IV/CDrawSpriteDC.h index 6bca8ab03..21a27ddb3 100644 --- a/plugin_IV/game_IV/CDrawSpriteDC.h +++ b/plugin_IV/game_IV/CDrawSpriteDC.h @@ -19,5 +19,7 @@ class CDrawSpriteDC : public CBaseDC { public: CDrawSpriteDC(rage::Vector2 const& leftBottom, rage::Vector2 const& leftTop, rage::Vector2 const& rightBottom, rage::Vector2 const& rightTop, rage::Color32 const& col, rage::grcTexturePC* texture); }; - +VALIDATE_OFFSET(CDrawSpriteDC, m_aVertices, 0x8); +VALIDATE_OFFSET(CDrawSpriteDC, m_pTexture, 0x28); +VALIDATE_OFFSET(CDrawSpriteDC, m_nColor, 0x2C); VALIDATE_SIZE(CDrawSpriteDC, 0x30); diff --git a/plugin_IV/game_IV/CDynamicEntity.h b/plugin_IV/game_IV/CDynamicEntity.h index 28b41c539..2ba65bc5c 100644 --- a/plugin_IV/game_IV/CDynamicEntity.h +++ b/plugin_IV/game_IV/CDynamicEntity.h @@ -16,6 +16,8 @@ class CDynamicEntity : public CEntity { uint32_t* m_pAnim; uint8_t pad7[148]; }; - +VALIDATE_OFFSET(CDynamicEntity, pad6, 0x70); +VALIDATE_OFFSET(CDynamicEntity, m_pAnim, 0x78); +VALIDATE_OFFSET(CDynamicEntity, pad7, 0x7C); VALIDATE_SIZE(CDynamicEntity, 0x110); diff --git a/plugin_IV/game_IV/CEntity.h b/plugin_IV/game_IV/CEntity.h index f80c25f25..ee6d0bcb1 100644 --- a/plugin_IV/game_IV/CEntity.h +++ b/plugin_IV/game_IV/CEntity.h @@ -131,5 +131,33 @@ class CEntity : CVirtualBase { void Teleport(rage::Matrix44* mat, int32_t dontUpdatePhysicsMatrix, bool immediately) { plugin::CallVirtualMethod<1>(this, mat, dontUpdatePhysicsMatrix, immediately); } void Teleport(rage::Vector4* pos, int32_t dontUpdatePhysicsMatrix, bool immediately) { plugin::CallVirtualMethod<2>(this, pos, dontUpdatePhysicsMatrix, immediately); } }; - +VALIDATE_OFFSET(CEntity, m_nCurrentWeaponSlot, 0x4); +VALIDATE_OFFSET(CEntity, field_1, 0x8); +VALIDATE_OFFSET(CEntity, m_Transform, 0x10); +VALIDATE_OFFSET(CEntity, m_pMatrix, 0x20); +VALIDATE_OFFSET(CEntity, field_2C, 0x2C); +VALIDATE_OFFSET(CEntity, m_nModelIndex, 0x2E); +VALIDATE_OFFSET(CEntity, m_pReference, 0x30); +VALIDATE_OFFSET(CEntity, field_34, 0x34); +VALIDATE_OFFSET(CEntity, m_pColModel, 0x38); +VALIDATE_OFFSET(CEntity, field_3C, 0x3C); +VALIDATE_OFFSET(CEntity, field_40, 0x40); +VALIDATE_OFFSET(CEntity, field_41, 0x41); +VALIDATE_OFFSET(CEntity, field_42, 0x42); +VALIDATE_OFFSET(CEntity, field_44, 0x44); +VALIDATE_OFFSET(CEntity, field_46, 0x46); +VALIDATE_OFFSET(CEntity, m_hInterior, 0x48); +VALIDATE_OFFSET(CEntity, field_4C, 0x4C); +VALIDATE_OFFSET(CEntity, field_50, 0x50); +VALIDATE_OFFSET(CEntity, field_54, 0x54); +VALIDATE_OFFSET(CEntity, field_58, 0x58); +VALIDATE_OFFSET(CEntity, field_5C, 0x5C); +VALIDATE_OFFSET(CEntity, field_5E, 0x5E); +VALIDATE_OFFSET(CEntity, field_60, 0x60); +VALIDATE_OFFSET(CEntity, field_61, 0x61); +VALIDATE_OFFSET(CEntity, field_62, 0x62); +VALIDATE_OFFSET(CEntity, m_nAlpha, 0x63); +VALIDATE_OFFSET(CEntity, field_64, 0x64); +VALIDATE_OFFSET(CEntity, field_68, 0x68); +VALIDATE_OFFSET(CEntity, field_6C, 0x6C); VALIDATE_SIZE(CEntity, 0x70); diff --git a/plugin_IV/game_IV/CEntityScanner.h b/plugin_IV/game_IV/CEntityScanner.h index 9ddd4d53a..8d5067d4e 100644 --- a/plugin_IV/game_IV/CEntityScanner.h +++ b/plugin_IV/game_IV/CEntityScanner.h @@ -12,7 +12,9 @@ struct CObjectScanner { int32_t field_4; int32_t field_8; }; - +VALIDATE_OFFSET(CObjectScanner, field_0, 0x0); +VALIDATE_OFFSET(CObjectScanner, field_4, 0x4); +VALIDATE_OFFSET(CObjectScanner, field_8, 0x8); VALIDATE_SIZE(CObjectScanner, 0xC); class CEntityScanner { @@ -26,5 +28,9 @@ class CEntityScanner { public: virtual ~CEntityScanner() {} }; - +VALIDATE_OFFSET(CEntityScanner, field_4, 0x4); +VALIDATE_OFFSET(CEntityScanner, field_10, 0x10); +VALIDATE_OFFSET(CEntityScanner, m_nCount, 0x14); +VALIDATE_OFFSET(CEntityScanner, m_apEntities, 0x18); +VALIDATE_OFFSET(CEntityScanner, field_58, 0x58); VALIDATE_SIZE(CEntityScanner, 0x5C); diff --git a/plugin_IV/game_IV/CEventGroup.h b/plugin_IV/game_IV/CEventGroup.h index 93f711e39..8e9830f68 100644 --- a/plugin_IV/game_IV/CEventGroup.h +++ b/plugin_IV/game_IV/CEventGroup.h @@ -29,5 +29,21 @@ class CEventGroup { public: virtual ~CEventGroup() {} }; - +VALIDATE_OFFSET(CEventGroup, field_4, 0x4); +VALIDATE_OFFSET(CEventGroup, field_8, 0x8); +VALIDATE_OFFSET(CEventGroup, field_C, 0xC); +VALIDATE_OFFSET(CEventGroup, field_10, 0x10); +VALIDATE_OFFSET(CEventGroup, field_14, 0x14); +VALIDATE_OFFSET(CEventGroup, field_18, 0x18); +VALIDATE_OFFSET(CEventGroup, field_1C, 0x1C); +VALIDATE_OFFSET(CEventGroup, field_20, 0x20); +VALIDATE_OFFSET(CEventGroup, field_24, 0x24); +VALIDATE_OFFSET(CEventGroup, field_28, 0x28); +VALIDATE_OFFSET(CEventGroup, field_2C, 0x2C); +VALIDATE_OFFSET(CEventGroup, field_30, 0x30); +VALIDATE_OFFSET(CEventGroup, field_34, 0x34); +VALIDATE_OFFSET(CEventGroup, field_38, 0x38); +VALIDATE_OFFSET(CEventGroup, field_3C, 0x3C); +VALIDATE_OFFSET(CEventGroup, field_40, 0x40); +VALIDATE_OFFSET(CEventGroup, field_44, 0x44); VALIDATE_SIZE(CEventGroup, 0x48); diff --git a/plugin_IV/game_IV/CEventHandler.h b/plugin_IV/game_IV/CEventHandler.h index d3cf97d9b..ec697e1ab 100644 --- a/plugin_IV/game_IV/CEventHandler.h +++ b/plugin_IV/game_IV/CEventHandler.h @@ -15,6 +15,9 @@ struct CMovementEventHandler { public: virtual ~CMovementEventHandler() {} }; +VALIDATE_OFFSET(CMovementEventHandler, field_34, 0x4); +VALIDATE_OFFSET(CMovementEventHandler, field_38, 0x8); +VALIDATE_SIZE(CMovementEventHandler, 0xC); class CEventHandler { public: @@ -35,4 +38,18 @@ class CEventHandler { public: virtual ~CEventHandler() {} }; +VALIDATE_OFFSET(CEventHandler, field_4, 0x4); +VALIDATE_OFFSET(CEventHandler, field_8, 0x8); +VALIDATE_OFFSET(CEventHandler, field_C, 0xC); +VALIDATE_OFFSET(CEventHandler, field_10, 0x10); +VALIDATE_OFFSET(CEventHandler, field_14, 0x14); +VALIDATE_OFFSET(CEventHandler, field_18, 0x18); +VALIDATE_OFFSET(CEventHandler, field_1C, 0x1C); +VALIDATE_OFFSET(CEventHandler, field_20, 0x20); +VALIDATE_OFFSET(CEventHandler, field_24, 0x24); +VALIDATE_OFFSET(CEventHandler, field_28, 0x28); +VALIDATE_OFFSET(CEventHandler, field_2C, 0x2C); +VALIDATE_OFFSET(CEventHandler, field_30, 0x30); +VALIDATE_OFFSET(CEventHandler, field_34, 0x34); +VALIDATE_SIZE(CEventHandler, 0x40); diff --git a/plugin_IV/game_IV/CEventScanner.h b/plugin_IV/game_IV/CEventScanner.h index 10b8db005..839dcd227 100644 --- a/plugin_IV/game_IV/CEventScanner.h +++ b/plugin_IV/game_IV/CEventScanner.h @@ -16,6 +16,13 @@ struct CEventScanner_obj1 { char field_15; __int16 __pad; }; +VALIDATE_OFFSET(CEventScanner_obj1, field_0, 0x0); +VALIDATE_OFFSET(CEventScanner_obj1, field_C, 0xC); +VALIDATE_OFFSET(CEventScanner_obj1, field_10, 0x10); +VALIDATE_OFFSET(CEventScanner_obj1, field_14, 0x14); +VALIDATE_OFFSET(CEventScanner_obj1, field_15, 0x15); +VALIDATE_OFFSET(CEventScanner_obj1, __pad, 0x16); +VALIDATE_SIZE(CEventScanner_obj1, 0x18); struct CEventScanner_obj2 { CObjectScanner field_0; @@ -32,6 +39,20 @@ struct CEventScanner_obj2 { int field_48[9]; int field_6C[9]; }; +VALIDATE_OFFSET(CEventScanner_obj2, field_0, 0x0); +VALIDATE_OFFSET(CEventScanner_obj2, field_C, 0xC); +VALIDATE_OFFSET(CEventScanner_obj2, __pad_D, 0xD); +VALIDATE_OFFSET(CEventScanner_obj2, field_10, 0x10); +VALIDATE_OFFSET(CEventScanner_obj2, field_14, 0x14); +VALIDATE_OFFSET(CEventScanner_obj2, field_18, 0x18); +VALIDATE_OFFSET(CEventScanner_obj2, field_19, 0x19); +VALIDATE_OFFSET(CEventScanner_obj2, __pad_1A, 0x1A); +VALIDATE_OFFSET(CEventScanner_obj2, field_1C, 0x1C); +VALIDATE_OFFSET(CEventScanner_obj2, field_20, 0x20); +VALIDATE_OFFSET(CEventScanner_obj2, field_24, 0x24); +VALIDATE_OFFSET(CEventScanner_obj2, field_48, 0x48); +VALIDATE_OFFSET(CEventScanner_obj2, field_6C, 0x6C); +VALIDATE_SIZE(CEventScanner_obj2, 0x90); struct CEventScanner_obj3 { @@ -41,6 +62,12 @@ struct CEventScanner_obj3 char field_1A; char __pad_1A; }; +VALIDATE_OFFSET(CEventScanner_obj3, field_0, 0x0); +VALIDATE_OFFSET(CEventScanner_obj3, field_18, 0x18); +VALIDATE_OFFSET(CEventScanner_obj3, field_19, 0x19); +VALIDATE_OFFSET(CEventScanner_obj3, field_1A, 0x1A); +VALIDATE_OFFSET(CEventScanner_obj3, __pad_1A, 0x1B); +VALIDATE_SIZE(CEventScanner_obj3, 0x1C); class CEventScanner { public: @@ -59,5 +86,15 @@ class CEventScanner { public: virtual ~CEventScanner() {} }; - +VALIDATE_OFFSET(CEventScanner, field_4, 0x4); +VALIDATE_OFFSET(CEventScanner, field_8, 0x8); +VALIDATE_OFFSET(CEventScanner, field_C, 0xC); +VALIDATE_OFFSET(CEventScanner, field_24, 0x24); +VALIDATE_OFFSET(CEventScanner, field_3C, 0x3C); +VALIDATE_OFFSET(CEventScanner, field_CC, 0xCC); +VALIDATE_OFFSET(CEventScanner, field_E8, 0xE8); +VALIDATE_OFFSET(CEventScanner, field_100, 0x100); +VALIDATE_OFFSET(CEventScanner, field_118, 0x118); +VALIDATE_OFFSET(CEventScanner, field_124, 0x124); +VALIDATE_OFFSET(CEventScanner, field_128, 0x128); VALIDATE_SIZE(CEventScanner, 0x12C); diff --git a/plugin_IV/game_IV/CEventScannerNY.h b/plugin_IV/game_IV/CEventScannerNY.h index 7a0815d8a..865983b4a 100644 --- a/plugin_IV/game_IV/CEventScannerNY.h +++ b/plugin_IV/game_IV/CEventScannerNY.h @@ -12,5 +12,4 @@ class CEventScannerNY : CEventScanner { public: }; - VALIDATE_SIZE(CEventScannerNY, 0x12C); diff --git a/plugin_IV/game_IV/CFileLoader.h b/plugin_IV/game_IV/CFileLoader.h index 489867aff..150910785 100644 --- a/plugin_IV/game_IV/CFileLoader.h +++ b/plugin_IV/game_IV/CFileLoader.h @@ -5,10 +5,10 @@ Do not delete this comment block. Respect others' work! */ #pragma once +#include "PluginBase.h" class CFileLoader { public: -public: - }; +VALIDATE_SIZE(CFileLoader, 0x1); \ No newline at end of file diff --git a/plugin_IV/game_IV/CFileType.h b/plugin_IV/game_IV/CFileType.h index 423f0296a..a514cbd95 100644 --- a/plugin_IV/game_IV/CFileType.h +++ b/plugin_IV/game_IV/CFileType.h @@ -28,6 +28,25 @@ class CFileType { uint32_t field_106; int32_t nVersion; }; +VALIDATE_OFFSET(CFileType, field_4, 0x0); +VALIDATE_OFFSET(CFileType, pfnAt, 0x4); +VALIDATE_OFFSET(CFileType, field_12, 0x8); +VALIDATE_OFFSET(CFileType, field_16, 0xC); +VALIDATE_OFFSET(CFileType, pfnReleaseData, 0x10); +VALIDATE_OFFSET(CFileType, pfnGetIndexByNameAlways, 0x14); +VALIDATE_OFFSET(CFileType, pfnAddRef, 0x18); +VALIDATE_OFFSET(CFileType, pfnRelease, 0x1C); +VALIDATE_OFFSET(CFileType, pfnGetUsageCount, 0x20); +VALIDATE_OFFSET(CFileType, pfnHaveParent, 0x24); +VALIDATE_OFFSET(CFileType, pfnDefrag, 0x28); +VALIDATE_OFFSET(CFileType, pfnOnLoad, 0x2C); +VALIDATE_OFFSET(CFileType, pfnSetData, 0x30); +VALIDATE_OFFSET(CFileType, szStructureName, 0x34); +VALIDATE_OFFSET(CFileType, szExt, 0x54); +VALIDATE_OFFSET(CFileType, nStartIndex, 0x58); +VALIDATE_OFFSET(CFileType, field_106, 0x5C); +VALIDATE_OFFSET(CFileType, nVersion, 0x60); +VALIDATE_SIZE(CFileType, 0x64); class CFileTypeMgr { public: @@ -42,5 +61,8 @@ class CFileTypeMgr { public: static CFileTypeMgr* GetManager(); }; +VALIDATE_OFFSET(CFileTypeMgr, m_types, 0x0); +VALIDATE_OFFSET(CFileTypeMgr, m_nTypeCount, 0x9C4); +VALIDATE_SIZE(CFileTypeMgr, 0x9C8); extern CFileTypeMgr& FileTypeMgr; diff --git a/plugin_IV/game_IV/CFont.h b/plugin_IV/game_IV/CFont.h index c70db01ab..0ee9e2494 100644 --- a/plugin_IV/game_IV/CFont.h +++ b/plugin_IV/game_IV/CFont.h @@ -49,6 +49,31 @@ struct CFontDetails { uint32_t* field_20; uint8_t* field_21; }; +VALIDATE_OFFSET(CFontDetails, color, 0x0); +VALIDATE_OFFSET(CFontDetails, width, 0x4); +VALIDATE_OFFSET(CFontDetails, height, 0x8); +VALIDATE_OFFSET(CFontDetails, field_3, 0xC); +VALIDATE_OFFSET(CFontDetails, alignment, 0x10); +VALIDATE_OFFSET(CFontDetails, backgroundOn, 0x14); +VALIDATE_OFFSET(CFontDetails, backgroundWrap, 0x18); +VALIDATE_OFFSET(CFontDetails, propOn, 0x1C); +VALIDATE_OFFSET(CFontDetails, redFade, 0x20); +VALIDATE_OFFSET(CFontDetails, greenFade, 0x24); +VALIDATE_OFFSET(CFontDetails, blueFade, 0x28); +VALIDATE_OFFSET(CFontDetails, alphaFade, 0x2C); +VALIDATE_OFFSET(CFontDetails, backgroundColor, 0x30); +VALIDATE_OFFSET(CFontDetails, wrapX, 0x34); +VALIDATE_OFFSET(CFontDetails, wrapY, 0x38); +VALIDATE_OFFSET(CFontDetails, fontStyle, 0x3C); +VALIDATE_OFFSET(CFontDetails, field_15, 0x40); +VALIDATE_OFFSET(CFontDetails, dropShadow, 0x44); +VALIDATE_OFFSET(CFontDetails, dropColor, 0x48); +VALIDATE_OFFSET(CFontDetails, edgeX, 0x4C); +VALIDATE_OFFSET(CFontDetails, edgeY, 0x50); +VALIDATE_OFFSET(CFontDetails, lineHeight, 0x54); +VALIDATE_OFFSET(CFontDetails, field_20, 0x58); +VALIDATE_OFFSET(CFontDetails, field_21, 0x5C); +VALIDATE_SIZE(CFontDetails, 0x60); class CFont { public: @@ -80,3 +105,4 @@ class CFont { static void PrintString(float x, float y, const char* text); }; +VALIDATE_SIZE(CFont, 0x1); diff --git a/plugin_IV/game_IV/CGame.h b/plugin_IV/game_IV/CGame.h index 2b388c1b2..6c4667db1 100644 --- a/plugin_IV/game_IV/CGame.h +++ b/plugin_IV/game_IV/CGame.h @@ -11,3 +11,4 @@ class CGame { public: }; +VALIDATE_SIZE(CGame, 0x1); diff --git a/plugin_IV/game_IV/CGeneral.h b/plugin_IV/game_IV/CGeneral.h index 1adbd6c67..b7ecc427b 100644 --- a/plugin_IV/game_IV/CGeneral.h +++ b/plugin_IV/game_IV/CGeneral.h @@ -17,3 +17,4 @@ class CGeneral { static int32_t GetRandomNumberInRange(int32_t low, int32_t high); static float GetRandomNumberInRange(float low, float high); }; +VALIDATE_SIZE(CGeneral, 0x1); diff --git a/plugin_IV/game_IV/CGrcState_SetCullMode.h b/plugin_IV/game_IV/CGrcState_SetCullMode.h index 65c62b836..5251d356b 100644 --- a/plugin_IV/game_IV/CGrcState_SetCullMode.h +++ b/plugin_IV/game_IV/CGrcState_SetCullMode.h @@ -12,3 +12,4 @@ class CGrcState_SetCullMode : public CBaseDC { public: CGrcState_SetCullMode(int32_t mode); }; +VALIDATE_SIZE(CGrcState_SetCullMode, 0x8); diff --git a/plugin_IV/game_IV/CGrcState_SetDepthWrite.h b/plugin_IV/game_IV/CGrcState_SetDepthWrite.h index 3b405730b..cc7d494de 100644 --- a/plugin_IV/game_IV/CGrcState_SetDepthWrite.h +++ b/plugin_IV/game_IV/CGrcState_SetDepthWrite.h @@ -12,3 +12,4 @@ class CGrcState_SetDepthWrite : public CBaseDC { public: CGrcState_SetDepthWrite(int32_t mode); }; +VALIDATE_SIZE(CGrcState_SetDepthWrite, 0x8); diff --git a/plugin_IV/game_IV/CGrcState_SetLightingMode.cpp b/plugin_IV/game_IV/CGrcState_SetLightingMode.cpp index 5fb6f8e96..7e7b90d39 100644 --- a/plugin_IV/game_IV/CGrcState_SetLightingMode.cpp +++ b/plugin_IV/game_IV/CGrcState_SetLightingMode.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto IV) header file + Plugin-SDK (Grand Theft Auto IV) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_IV/game_IV/CGrcState_SetLightingMode.h b/plugin_IV/game_IV/CGrcState_SetLightingMode.h index 03522f368..c7fb7f47f 100644 --- a/plugin_IV/game_IV/CGrcState_SetLightingMode.h +++ b/plugin_IV/game_IV/CGrcState_SetLightingMode.h @@ -12,3 +12,4 @@ class CGrcState_SetLightingMode : public CBaseDC { public: CGrcState_SetLightingMode(int32_t mode); }; +VALIDATE_SIZE(CGrcState_SetLightingMode, 0x8); diff --git a/plugin_IV/game_IV/CHeli.h b/plugin_IV/game_IV/CHeli.h index 16a3ec128..1663e9112 100644 --- a/plugin_IV/game_IV/CHeli.h +++ b/plugin_IV/game_IV/CHeli.h @@ -12,3 +12,4 @@ class CHeli : public CAutomobile { public: CHeli(uint8_t createdBy); }; +VALIDATE_SIZE(CHeli, 0x2080); diff --git a/plugin_IV/game_IV/CHud.h b/plugin_IV/game_IV/CHud.h index bbd4c08e0..2627e16c8 100644 --- a/plugin_IV/game_IV/CHud.h +++ b/plugin_IV/game_IV/CHud.h @@ -63,3 +63,4 @@ class CHud { public: }; +VALIDATE_SIZE(CHud, 0x1); diff --git a/plugin_IV/game_IV/CHudColours.cpp b/plugin_IV/game_IV/CHudColours.cpp index bf4e59002..281d97d2a 100644 --- a/plugin_IV/game_IV/CHudColours.cpp +++ b/plugin_IV/game_IV/CHudColours.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto IV) header file + Plugin-SDK (Grand Theft Auto IV) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_IV/game_IV/CHudColours.h b/plugin_IV/game_IV/CHudColours.h index b4d9e0679..83e425974 100644 --- a/plugin_IV/game_IV/CHudColours.h +++ b/plugin_IV/game_IV/CHudColours.h @@ -104,3 +104,4 @@ class CHudColours { return out; } }; +VALIDATE_SIZE(CHudColours, 0x1); diff --git a/plugin_IV/game_IV/CHudComponent.cpp b/plugin_IV/game_IV/CHudComponent.cpp index 969b35ca6..00880cd99 100644 --- a/plugin_IV/game_IV/CHudComponent.cpp +++ b/plugin_IV/game_IV/CHudComponent.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto IV) header file + Plugin-SDK (Grand Theft Auto IV) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_IV/game_IV/CHudComponent.h b/plugin_IV/game_IV/CHudComponent.h index c1b71e85d..83a708751 100644 --- a/plugin_IV/game_IV/CHudComponent.h +++ b/plugin_IV/game_IV/CHudComponent.h @@ -81,6 +81,8 @@ enum eHudComponents { struct tComponentData { wchar_t text[128]; }; +VALIDATE_OFFSET(tComponentData, text, 0x0); +VALIDATE_SIZE(tComponentData, 0x100); class CHudComponent { public: @@ -110,6 +112,29 @@ class CHudComponent { public: bool IsDisplaying(); }; +VALIDATE_OFFSET(CHudComponent, field_8, 0x0); +VALIDATE_OFFSET(CHudComponent, type, 0x8); +VALIDATE_OFFSET(CHudComponent, state, 0xC); +VALIDATE_OFFSET(CHudComponent, field_24, 0x10); +VALIDATE_OFFSET(CHudComponent, display, 0x11); +VALIDATE_OFFSET(CHudComponent, field_25, 0x12); +VALIDATE_OFFSET(CHudComponent, pos, 0x18); +VALIDATE_OFFSET(CHudComponent, scale, 0x20); +VALIDATE_OFFSET(CHudComponent, field_52, 0x28); +VALIDATE_OFFSET(CHudComponent, defaultState, 0x30); +VALIDATE_OFFSET(CHudComponent, fontStyle, 0x34); +VALIDATE_OFFSET(CHudComponent, edge, 0x38); +VALIDATE_OFFSET(CHudComponent, background, 0x39); +VALIDATE_OFFSET(CHudComponent, printFromBottom, 0x3A); +VALIDATE_OFFSET(CHudComponent, timeVisible, 0x3C); +VALIDATE_OFFSET(CHudComponent, fadingTime, 0x40); +VALIDATE_OFFSET(CHudComponent, field_108, 0x44); +VALIDATE_OFFSET(CHudComponent, color, 0x45); +VALIDATE_OFFSET(CHudComponent, field_110, 0x49); +VALIDATE_OFFSET(CHudComponent, alpha, 0x59); +VALIDATE_OFFSET(CHudComponent, field_190, 0x5A); +VALIDATE_OFFSET(CHudComponent, data, 0x6C); +VALIDATE_SIZE(CHudComponent, 0x16C); //VALIDATE_SIZE(CHudComponent, 0x70); @@ -125,7 +150,11 @@ class CHudComponentInfo { public: }; - +VALIDATE_OFFSET(CHudComponentInfo, m_nIndex, 0x0); +VALIDATE_OFFSET(CHudComponentInfo, m_vPos, 0x4); +VALIDATE_OFFSET(CHudComponentInfo, m_vSize, 0xC); +VALIDATE_OFFSET(CHudComponentInfo, m_nRGB, 0x14); +VALIDATE_OFFSET(CHudComponentInfo, m_nAlpha, 0x18); VALIDATE_SIZE(CHudComponentInfo, 0x1C); extern CHudComponentInfo* aHudComponentInfo; // [455] diff --git a/plugin_IV/game_IV/CIkManager.h b/plugin_IV/game_IV/CIkManager.h index b2289931c..54e97357f 100644 --- a/plugin_IV/game_IV/CIkManager.h +++ b/plugin_IV/game_IV/CIkManager.h @@ -59,5 +59,52 @@ class CIkManager : public CSimpleIkManager { rage::Vector4 field_150; rage::Vector4 field_160; }; - +VALIDATE_OFFSET(CIkManager, field_40, 0x40); +VALIDATE_OFFSET(CIkManager, field_44, 0x44); +VALIDATE_OFFSET(CIkManager, field_50, 0x50); +VALIDATE_OFFSET(CIkManager, field_60, 0x60); +VALIDATE_OFFSET(CIkManager, field_70, 0x70); +VALIDATE_OFFSET(CIkManager, field_80, 0x80); +VALIDATE_OFFSET(CIkManager, field_8C, 0x8C); +VALIDATE_OFFSET(CIkManager, field_90, 0x90); +VALIDATE_OFFSET(CIkManager, field_A0, 0xA0); +VALIDATE_OFFSET(CIkManager, field_B0, 0xB0); +VALIDATE_OFFSET(CIkManager, field_BC, 0xBC); +VALIDATE_OFFSET(CIkManager, field_BD, 0xBD); +VALIDATE_OFFSET(CIkManager, field_C0, 0xC0); +VALIDATE_OFFSET(CIkManager, field_C4, 0xC4); +VALIDATE_OFFSET(CIkManager, field_C8, 0xC8); +VALIDATE_OFFSET(CIkManager, field_CC, 0xCC); +VALIDATE_OFFSET(CIkManager, field_D0, 0xD0); +VALIDATE_OFFSET(CIkManager, field_D4, 0xD4); +VALIDATE_OFFSET(CIkManager, field_D8, 0xD8); +VALIDATE_OFFSET(CIkManager, field_DC, 0xDC); +VALIDATE_OFFSET(CIkManager, field_E0, 0xE0); +VALIDATE_OFFSET(CIkManager, field_E4, 0xE4); +VALIDATE_OFFSET(CIkManager, field_E8, 0xE8); +VALIDATE_OFFSET(CIkManager, field_EC, 0xEC); +VALIDATE_OFFSET(CIkManager, field_F0, 0xF0); +VALIDATE_OFFSET(CIkManager, field_F4, 0xF4); +VALIDATE_OFFSET(CIkManager, field_F8, 0xF8); +VALIDATE_OFFSET(CIkManager, field_FC, 0xFC); +VALIDATE_OFFSET(CIkManager, field_100, 0x100); +VALIDATE_OFFSET(CIkManager, field_104, 0x104); +VALIDATE_OFFSET(CIkManager, field_108, 0x108); +VALIDATE_OFFSET(CIkManager, field_10C, 0x10C); +VALIDATE_OFFSET(CIkManager, field_110, 0x110); +VALIDATE_OFFSET(CIkManager, field_114, 0x114); +VALIDATE_OFFSET(CIkManager, field_118, 0x118); +VALIDATE_OFFSET(CIkManager, field_11C, 0x11C); +VALIDATE_OFFSET(CIkManager, field_120, 0x120); +VALIDATE_OFFSET(CIkManager, field_124, 0x124); +VALIDATE_OFFSET(CIkManager, field_128, 0x128); +VALIDATE_OFFSET(CIkManager, field_12C, 0x12C); +VALIDATE_OFFSET(CIkManager, field_130, 0x130); +VALIDATE_OFFSET(CIkManager, field_134, 0x134); +VALIDATE_OFFSET(CIkManager, field_138, 0x138); +VALIDATE_OFFSET(CIkManager, field_13C, 0x13C); +VALIDATE_OFFSET(CIkManager, field_140, 0x140); +VALIDATE_OFFSET(CIkManager, field_141, 0x141); +VALIDATE_OFFSET(CIkManager, field_150, 0x150); +VALIDATE_OFFSET(CIkManager, field_160, 0x160); VALIDATE_SIZE(CIkManager, 0x170); diff --git a/plugin_IV/game_IV/CKeyboard.h b/plugin_IV/game_IV/CKeyboard.h index f3360b478..a6e5e8de3 100644 --- a/plugin_IV/game_IV/CKeyboard.h +++ b/plugin_IV/game_IV/CKeyboard.h @@ -145,5 +145,9 @@ class CKeyboard { bool GetKeyJustDown(eKeyCodes key, int32_t index, const char* str); bool GetKeyDown(eKeyCodes key, int32_t index, const char* str); }; - +VALIDATE_OFFSET(CKeyboard, field_1, 0x0); +VALIDATE_OFFSET(CKeyboard, m_nCurrentIndex, 0x1); +VALIDATE_OFFSET(CKeyboard, field_3, 0x2); +VALIDATE_OFFSET(CKeyboard, field_4, 0x3); +VALIDATE_OFFSET(CKeyboard, field_5, 0x4); VALIDATE_SIZE(CKeyboard, 0x8); diff --git a/plugin_IV/game_IV/CMenuManager.h b/plugin_IV/game_IV/CMenuManager.h index fdce29530..fe41cf071 100644 --- a/plugin_IV/game_IV/CMenuManager.h +++ b/plugin_IV/game_IV/CMenuManager.h @@ -365,14 +365,19 @@ struct CMenuEntry { int8_t m_nScaler; eMenuDisplay m_nDisplayValue; }; - +VALIDATE_OFFSET(CMenuEntry, m_nAction, 0x0); +VALIDATE_OFFSET(CMenuEntry, m_EntryName, 0x1); +VALIDATE_OFFSET(CMenuEntry, m_nValue, 0x12); +VALIDATE_OFFSET(CMenuEntry, m_nScaler, 0x14); +VALIDATE_OFFSET(CMenuEntry, m_nDisplayValue, 0x15); VALIDATE_SIZE(CMenuEntry, 0x16); struct CMenuScreen { CMenuEntry* m_aEntries; uint8_t field_2[20]; }; - +VALIDATE_OFFSET(CMenuScreen, m_aEntries, 0x0); +VALIDATE_OFFSET(CMenuScreen, field_2, 0x4); VALIDATE_SIZE(CMenuScreen, 0x18); class CMenuManager { @@ -409,6 +414,7 @@ class CMenuManager { static void DrawHelpText(); static void SetHelpText(const char* right, const char* left, uint8_t arg3); }; +VALIDATE_SIZE(CMenuManager, 0x1); extern CMenuScreen* aScreens; extern int32_t* aPrefs; diff --git a/plugin_IV/game_IV/CModelInfo.h b/plugin_IV/game_IV/CModelInfo.h index 465ca1b8b..84b5c31bf 100644 --- a/plugin_IV/game_IV/CModelInfo.h +++ b/plugin_IV/game_IV/CModelInfo.h @@ -38,7 +38,31 @@ class CBaseModelInfo : CVirtualBase { uint8_t field_5B; int32_t field_5C; }; - +VALIDATE_OFFSET(CBaseModelInfo, field_4, 0x4); +VALIDATE_OFFSET(CBaseModelInfo, field_8, 0x8); +VALIDATE_OFFSET(CBaseModelInfo, field_C, 0xC); +VALIDATE_OFFSET(CBaseModelInfo, field_10, 0x10); +VALIDATE_OFFSET(CBaseModelInfo, field_14, 0x14); +VALIDATE_OFFSET(CBaseModelInfo, field_18, 0x18); +VALIDATE_OFFSET(CBaseModelInfo, field_1C, 0x1C); +VALIDATE_OFFSET(CBaseModelInfo, m_vMinBounds, 0x20); +VALIDATE_OFFSET(CBaseModelInfo, m_fDrawDistance, 0x2C); +VALIDATE_OFFSET(CBaseModelInfo, m_vMaxBounds, 0x30); +VALIDATE_OFFSET(CBaseModelInfo, m_nHash, 0x3C); +VALIDATE_OFFSET(CBaseModelInfo, m_nIDEFlags, 0x40); +VALIDATE_OFFSET(CBaseModelInfo, m_nRefCount, 0x44); +VALIDATE_OFFSET(CBaseModelInfo, m_nTxd, 0x48); +VALIDATE_OFFSET(CBaseModelInfo, field_4A, 0x4A); +VALIDATE_OFFSET(CBaseModelInfo, field_4C, 0x4C); +VALIDATE_OFFSET(CBaseModelInfo, field_4E, 0x4E); +VALIDATE_OFFSET(CBaseModelInfo, field_50, 0x50); +VALIDATE_OFFSET(CBaseModelInfo, field_52, 0x52); +VALIDATE_OFFSET(CBaseModelInfo, field_54, 0x54); +VALIDATE_OFFSET(CBaseModelInfo, field_56, 0x56); +VALIDATE_OFFSET(CBaseModelInfo, m_nAnimIndex, 0x58); +VALIDATE_OFFSET(CBaseModelInfo, field_5A, 0x5A); +VALIDATE_OFFSET(CBaseModelInfo, field_5B, 0x5B); +VALIDATE_OFFSET(CBaseModelInfo, field_5C, 0x5C); VALIDATE_SIZE(CBaseModelInfo, 0x60); class CModelInfo { @@ -48,5 +72,6 @@ class CModelInfo { public: static CBaseModelInfo* GetModelByHash(int32_t hash, uint32_t* indexOut); }; +VALIDATE_SIZE(CModelInfo, 0x1); extern CModelInfo* ModelInfo; diff --git a/plugin_IV/game_IV/CObject.h b/plugin_IV/game_IV/CObject.h index 699fde037..d9c530013 100644 --- a/plugin_IV/game_IV/CObject.h +++ b/plugin_IV/game_IV/CObject.h @@ -17,5 +17,9 @@ class CObject : public CPhysical { CAmmoData* m_pAmmoData; uint8_t field_194[192]; }; - +VALIDATE_OFFSET(CObject, field_1, 0x210); +VALIDATE_OFFSET(CObject, m_fScale, 0x250); +VALIDATE_OFFSET(CObject, field_68, 0x254); +VALIDATE_OFFSET(CObject, m_pAmmoData, 0x25C); +VALIDATE_OFFSET(CObject, field_194, 0x260); VALIDATE_SIZE(CObject, 0x320); diff --git a/plugin_IV/game_IV/CPad.h b/plugin_IV/game_IV/CPad.h index 6b599581e..c02f7717a 100644 --- a/plugin_IV/game_IV/CPad.h +++ b/plugin_IV/game_IV/CPad.h @@ -56,7 +56,26 @@ class CControllerState { public: void Clear(); }; - +VALIDATE_OFFSET(CControllerState, LeftStickX, 0x0); +VALIDATE_OFFSET(CControllerState, LeftStickY, 0x4); +VALIDATE_OFFSET(CControllerState, RightStickX, 0x8); +VALIDATE_OFFSET(CControllerState, RightStickY, 0xC); +VALIDATE_OFFSET(CControllerState, LeftShoulder1, 0x10); +VALIDATE_OFFSET(CControllerState, LeftShoulder2, 0x14); +VALIDATE_OFFSET(CControllerState, ShockButtonL, 0x18); +VALIDATE_OFFSET(CControllerState, RightShoulder1, 0x1C); +VALIDATE_OFFSET(CControllerState, RightShoulder2, 0x20); +VALIDATE_OFFSET(CControllerState, ShockButtonR, 0x24); +VALIDATE_OFFSET(CControllerState, ButtonSquare, 0x28); +VALIDATE_OFFSET(CControllerState, ButtonTriangle, 0x2C); +VALIDATE_OFFSET(CControllerState, ButtonCross, 0x30); +VALIDATE_OFFSET(CControllerState, ButtonCircle, 0x34); +VALIDATE_OFFSET(CControllerState, DPadUp, 0x38); +VALIDATE_OFFSET(CControllerState, DPadDown, 0x3C); +VALIDATE_OFFSET(CControllerState, DPadLeft, 0x40); +VALIDATE_OFFSET(CControllerState, DPadRight, 0x44); +VALIDATE_OFFSET(CControllerState, Start, 0x48); +VALIDATE_OFFSET(CControllerState, Select, 0x4C); VALIDATE_SIZE(CControllerState, 0x50); class CPad { @@ -97,7 +116,18 @@ class CPad { static void StopPadsShaking(); }; - +VALIDATE_OFFSET(CPad, field_1, 0x0); +VALIDATE_OFFSET(CPad, NewState, 0x4); +VALIDATE_OFFSET(CPad, OldState, 0x54); +VALIDATE_OFFSET(CPad, field_4, 0xA4); +VALIDATE_OFFSET(CPad, ShakeDur, 0xA8); +VALIDATE_OFFSET(CPad, ShakeFreq, 0xAC); +VALIDATE_OFFSET(CPad, NoShakeBeforeThis, 0xB0); +VALIDATE_OFFSET(CPad, NoShakeFreq, 0xB4); +VALIDATE_OFFSET(CPad, field_5, 0xB8); +VALIDATE_OFFSET(CPad, field_6, 0xB9); +VALIDATE_OFFSET(CPad, field_7, 0xBA); +VALIDATE_OFFSET(CPad, field_8, 0xBB); VALIDATE_SIZE(CPad, 0xBC); extern CPad* Pads; diff --git a/plugin_IV/game_IV/CPed.h b/plugin_IV/game_IV/CPed.h index 156e04884..6259738e7 100644 --- a/plugin_IV/game_IV/CPed.h +++ b/plugin_IV/game_IV/CPed.h @@ -205,6 +205,9 @@ class CDrawableInfo { char field_1[128]; int32_t m_drawableID; }; +VALIDATE_OFFSET(CDrawableInfo, field_1, 0x0); +VALIDATE_OFFSET(CDrawableInfo, m_drawableID, 0x80); +VALIDATE_SIZE(CDrawableInfo, 0x84); class CPed : public CPhysical { public: @@ -516,5 +519,77 @@ class CPed : public CPhysical { return &m_WeaponData.m_aWeapons[m_WeaponData.m_nActiveWeaponSlot]; } }; - +VALIDATE_OFFSET(CPed, m_bDead, 0x210); +VALIDATE_OFFSET(CPed, m_bInjured, 0x211); +VALIDATE_OFFSET(CPed, m_bFatallyInjured, 0x212); +VALIDATE_OFFSET(CPed, field_4, 0x213); +VALIDATE_OFFSET(CPed, m_fHealth, 0x214); +VALIDATE_OFFSET(CPed, m_nPlayerIndex, 0x218); +VALIDATE_OFFSET(CPed, m_bIsPlayer, 0x219); +VALIDATE_OFFSET(CPed, field_10, 0x21A); +VALIDATE_OFFSET(CPed, m_pDrawableInfo, 0x21C); +VALIDATE_OFFSET(CPed, field_16, 0x220); +VALIDATE_OFFSET(CPed, m_pPedIntelligence, 0x224); +VALIDATE_OFFSET(CPed, m_pPlayerInfo, 0x228); +VALIDATE_OFFSET(CPed, field_18, 0x22C); +VALIDATE_OFFSET(CPed, field_77, 0x275); +VALIDATE_OFFSET(CPed, m_fClimbAnimRate, 0x278); +VALIDATE_OFFSET(CPed, field_32, 0x27C); +VALIDATE_OFFSET(CPed, field_38, 0x2A0); +VALIDATE_OFFSET(CPed, field_42, 0x2A4); +VALIDATE_OFFSET(CPed, field_46, 0x2A8); +VALIDATE_OFFSET(CPed, field_50, 0x2AC); +VALIDATE_OFFSET(CPed, m_WeaponData, 0x2B0); +VALIDATE_OFFSET(CPed, field_56, 0x3B0); +VALIDATE_OFFSET(CPed, field_156, 0x3E7); +VALIDATE_OFFSET(CPed, m_pStandingOnEntity, 0x484); +VALIDATE_OFFSET(CPed, field_204, 0x488); +VALIDATE_OFFSET(CPed, m_nVoiceHash, 0x61C); +VALIDATE_OFFSET(CPed, field_208, 0x620); +VALIDATE_OFFSET(CPed, m_bIsDrunk, 0x770); +VALIDATE_OFFSET(CPed, field_210, 0x771); +VALIDATE_OFFSET(CPed, m_nRagdollState, 0x7B8); +VALIDATE_OFFSET(CPed, m_nRagdollTime, 0x7BC); +VALIDATE_OFFSET(CPed, field_216, 0x7C0); +VALIDATE_OFFSET(CPed, field_233, 0x7D0); +VALIDATE_OFFSET(CPed, m_nWeaponObjectVisible, 0x7F1); +VALIDATE_OFFSET(CPed, field_332, 0x7F2); +VALIDATE_OFFSET(CPed, m_nPedType, 0xA60); +VALIDATE_OFFSET(CPed, field_338, 0xA64); +VALIDATE_OFFSET(CPed, m_bHasBeenArrested, 0xA6E); +VALIDATE_OFFSET(CPed, field_350, 0xA70); +VALIDATE_OFFSET(CPed, m_nDeathState, 0xA74); +VALIDATE_OFFSET(CPed, m_nLastDamageBone, 0xA78); +VALIDATE_OFFSET(CPed, field_360, 0xA7C); +VALIDATE_OFFSET(CPed, m_fMaxHealth, 0xA84); +VALIDATE_OFFSET(CPed, field_370, 0xA88); +VALIDATE_OFFSET(CPed, m_pPedMoveBlendOnFoot, 0xA90); +VALIDATE_OFFSET(CPed, field_378, 0xA94); +VALIDATE_OFFSET(CPed, m_fCurrentHeading, 0xAA0); +VALIDATE_OFFSET(CPed, m_fDesiredHeading, 0xAA4); +VALIDATE_OFFSET(CPed, field_388, 0xAA8); +VALIDATE_OFFSET(CPed, field_394, 0xAB6); +VALIDATE_OFFSET(CPed, m_fMaxTimeInWater, 0xB28); +VALIDATE_OFFSET(CPed, m_fMaxTimeUnderwater, 0xB2C); +VALIDATE_OFFSET(CPed, m_pVehicle, 0xB30); +VALIDATE_OFFSET(CPed, field_402, 0xB34); +VALIDATE_OFFSET(CPed, field_404, 0xB44); +VALIDATE_OFFSET(CPed, m_fArmour, 0xB84); +VALIDATE_OFFSET(CPed, m_nMoney, 0xB88); +VALIDATE_OFFSET(CPed, field_414, 0xB8C); +VALIDATE_OFFSET(CPed, m_nLegIK, 0xBE0); +VALIDATE_OFFSET(CPed, field_422, 0xBE4); +VALIDATE_OFFSET(CPed, m_nCellphoneRingTime, 0xD2C); +VALIDATE_OFFSET(CPed, m_nCellphoneState, 0xD30); +VALIDATE_OFFSET(CPed, field_450, 0xD31); +VALIDATE_OFFSET(CPed, m_fHeadingLimitForAttachedPed, 0xD48); +VALIDATE_OFFSET(CPed, m_fHeadingLimitForAttachedPed2, 0xD4C); +VALIDATE_OFFSET(CPed, field_788, 0xD50); +VALIDATE_OFFSET(CPed, m_fWindyClothingScale, 0xE0C); +VALIDATE_OFFSET(CPed, field_800, 0xE10); +VALIDATE_OFFSET(CPed, field_819, 0xE84); +VALIDATE_OFFSET(CPed, m_bIsCop, 0xE97); +VALIDATE_OFFSET(CPed, field_832, 0xE98); +VALIDATE_OFFSET(CPed, m_pComponentModels, 0xEA8); +VALIDATE_OFFSET(CPed, field_840, 0xEAC); VALIDATE_SIZE(CPed, 0xF00); diff --git a/plugin_IV/game_IV/CPedFactory.h b/plugin_IV/game_IV/CPedFactory.h index 996464b28..f2db645cb 100644 --- a/plugin_IV/game_IV/CPedFactory.h +++ b/plugin_IV/game_IV/CPedFactory.h @@ -12,3 +12,4 @@ class CPedFactory { public: virtual ~CPedFactory() { plugin::CallVirtualMethod<0>(this, 0); } }; +VALIDATE_SIZE(CPedFactory, 0x4); diff --git a/plugin_IV/game_IV/CPedFactoryNY.h b/plugin_IV/game_IV/CPedFactoryNY.h index 8cbbe6f9c..be129afc6 100644 --- a/plugin_IV/game_IV/CPedFactoryNY.h +++ b/plugin_IV/game_IV/CPedFactoryNY.h @@ -14,6 +14,10 @@ class CControlledByInfo { uint8_t m_isPlayer; uint8_t field_3; }; +VALIDATE_OFFSET(CControlledByInfo, m_playerIndex, 0x0); +VALIDATE_OFFSET(CControlledByInfo, m_isPlayer, 0x1); +VALIDATE_OFFSET(CControlledByInfo, field_3, 0x2); +VALIDATE_SIZE(CControlledByInfo, 0x3); class CPedFactoryNY : CPedFactory { private: @@ -29,4 +33,5 @@ class CPedFactoryNY : CPedFactory { return ms_pInstance; } }; +VALIDATE_SIZE(CPedFactoryNY, 0x4); diff --git a/plugin_IV/game_IV/CPedIntelligence.h b/plugin_IV/game_IV/CPedIntelligence.h index 443560f45..37e456e26 100644 --- a/plugin_IV/game_IV/CPedIntelligence.h +++ b/plugin_IV/game_IV/CPedIntelligence.h @@ -26,5 +26,7 @@ class CPedIntelligence { bool IsClimbing(); void ClearTasks(bool arg1); }; - +VALIDATE_OFFSET(CPedIntelligence, gap_4, 0x4); +VALIDATE_OFFSET(CPedIntelligence, m_TaskMgr, 0x44); +VALIDATE_OFFSET(CPedIntelligence, field_100, 0x74); VALIDATE_SIZE(CPedIntelligence, 0x2F0); diff --git a/plugin_IV/game_IV/CPedIntelligenceNY.h b/plugin_IV/game_IV/CPedIntelligenceNY.h index 22eb49725..46810e3a8 100644 --- a/plugin_IV/game_IV/CPedIntelligenceNY.h +++ b/plugin_IV/game_IV/CPedIntelligenceNY.h @@ -16,5 +16,7 @@ class CPedIntelligenceNY : public CPedIntelligence { CEventScannerNY field_330; int field_45C; }; - +VALIDATE_OFFSET(CPedIntelligenceNY, m_eventHandler, 0x2F0); +VALIDATE_OFFSET(CPedIntelligenceNY, field_330, 0x330); +VALIDATE_OFFSET(CPedIntelligenceNY, field_45C, 0x45C); VALIDATE_SIZE(CPedIntelligenceNY, 0x460); diff --git a/plugin_IV/game_IV/CPhysical.h b/plugin_IV/game_IV/CPhysical.h index addf971d0..742729704 100644 --- a/plugin_IV/game_IV/CPhysical.h +++ b/plugin_IV/game_IV/CPhysical.h @@ -88,6 +88,27 @@ class CPhysical : public CDynamicEntity { return vel; } }; +VALIDATE_OFFSET(CPhysical, m_nBodyPart, 0x110); +VALIDATE_OFFSET(CPhysical, m_nRelationshipGroup, 0x11C); +VALIDATE_OFFSET(CPhysical, field_24, 0x11E); +VALIDATE_OFFSET(CPhysical, m_fPercentSubmerged, 0x120); +VALIDATE_OFFSET(CPhysical, field_32, 0x124); +VALIDATE_OFFSET(CPhysical, m_nSubmergedState, 0x144); +VALIDATE_OFFSET(CPhysical, field_40, 0x148); +VALIDATE_OFFSET(CPhysical, m_pAttachedToEntity, 0x1BC); +VALIDATE_OFFSET(CPhysical, m_vAttachOffset, 0x1C0); +VALIDATE_OFFSET(CPhysical, field_116, 0x1CC); +VALIDATE_OFFSET(CPhysical, m_qAttachOffset, 0x1D0); +VALIDATE_OFFSET(CPhysical, field_124, 0x1E0); +VALIDATE_OFFSET(CPhysical, m_pLastDamageEntity, 0x1E4); +VALIDATE_OFFSET(CPhysical, field_132, 0x1E8); +VALIDATE_OFFSET(CPhysical, m_nLastDamageWeapon, 0x1EC); +VALIDATE_OFFSET(CPhysical, field_138, 0x1ED); +VALIDATE_OFFSET(CPhysical, m_fLife, 0x1F0); +VALIDATE_OFFSET(CPhysical, field_152, 0x1F4); +VALIDATE_OFFSET(CPhysical, m_pEntityIgnoredCollision, 0x1F8); +VALIDATE_OFFSET(CPhysical, field_158, 0x1FC); +VALIDATE_SIZE(CPhysical, 0x210); #pragma pack(pop) VALIDATE_SIZE(CPhysical, 0x210); diff --git a/plugin_IV/game_IV/CPlane.h b/plugin_IV/game_IV/CPlane.h index d7a1a5de8..af1d33bdc 100644 --- a/plugin_IV/game_IV/CPlane.h +++ b/plugin_IV/game_IV/CPlane.h @@ -12,3 +12,4 @@ class CPlane : public CAutomobile { public: CPlane(uint8_t createdBy); }; +VALIDATE_SIZE(CPlane, 0x2080); diff --git a/plugin_IV/game_IV/CPlayerData.h b/plugin_IV/game_IV/CPlayerData.h index da9e77350..15255869d 100644 --- a/plugin_IV/game_IV/CPlayerData.h +++ b/plugin_IV/game_IV/CPlayerData.h @@ -16,5 +16,6 @@ class CPlayerData { public: int32_t GetWantedLevel(); }; - +VALIDATE_OFFSET(CPlayerData, m_Wanted, 0x0); +VALIDATE_OFFSET(CPlayerData, field_760, 0x388); VALIDATE_SIZE(CPlayerData, 0x390); diff --git a/plugin_IV/game_IV/CPlayerInfo.h b/plugin_IV/game_IV/CPlayerInfo.h index d93d83bfd..cfb996032 100644 --- a/plugin_IV/game_IV/CPlayerInfo.h +++ b/plugin_IV/game_IV/CPlayerInfo.h @@ -20,7 +20,7 @@ enum ePlayerState { struct CPlayerComponents { uint8_t bodyParts[16]; }; - +VALIDATE_OFFSET(CPlayerComponents, bodyParts, 0x0); VALIDATE_SIZE(CPlayerComponents, 0x10); class CPlayerInfo { @@ -33,7 +33,7 @@ class CPlayerInfo { public: rage::Color32 m_RGBColor; - unsigned __int8 field_1[88]; + char field_1[88]; char m_sName[17]; uint8_t m_nFlag1; CPlayerData m_PlayerData; @@ -98,7 +98,7 @@ class CPlayerInfo { int16_t field_1255; int8_t field_1256; int8_t field_1257; - unsigned __int8 field_1258[36]; + char field_1258[36]; uint32_t m_nTimeSincePerformingWheelie; uint32_t m_nTimeSinceSomethingIdk; uint32_t m_nTimeSincePerformingStoppie; @@ -175,5 +175,72 @@ class CPlayerInfo { void MakePlayerSafe(bool arg1, bool safe, float radius, bool arg4, bool arg5); bool IsPlayerOnline(); }; - +VALIDATE_OFFSET(CPlayerInfo, m_RGBColor, 0x0); +VALIDATE_OFFSET(CPlayerInfo, field_1, 0x4); +VALIDATE_OFFSET(CPlayerInfo, m_sName, 0x5C); +VALIDATE_OFFSET(CPlayerInfo, m_nFlag1, 0x6D); +VALIDATE_OFFSET(CPlayerInfo, m_PlayerData, 0x70); +VALIDATE_OFFSET(CPlayerInfo, field_1100, 0x400); +VALIDATE_OFFSET(CPlayerInfo, m_nObjFlags, 0x440); +VALIDATE_OFFSET(CPlayerInfo, field_1111, 0x444); +VALIDATE_OFFSET(CPlayerInfo, m_bDisableSprint, 0x484); +VALIDATE_OFFSET(CPlayerInfo, field_1112, 0x485); +VALIDATE_OFFSET(CPlayerInfo, m_bForceInteriorLighting, 0x487); +VALIDATE_OFFSET(CPlayerInfo, field_1150, 0x488); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePlayerHitCar, 0x4A0); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePlayerHitPed, 0x4A4); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePlayerHitBuilding, 0x4A8); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePlayerHitObject, 0x4AC); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSinceDroveOnPavement, 0x4B0); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePlayerRanLight, 0x4B4); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSinceDroveAgainstTraffic, 0x4B8); +VALIDATE_OFFSET(CPlayerInfo, field_1152, 0x4BC); +VALIDATE_OFFSET(CPlayerInfo, field_1154, 0x4CC); +VALIDATE_OFFSET(CPlayerInfo, m_fAirDragMultForCar, 0x4D8); +VALIDATE_OFFSET(CPlayerInfo, field_1156, 0x4DC); +VALIDATE_OFFSET(CPlayerInfo, field_1251, 0x4E0); +VALIDATE_OFFSET(CPlayerInfo, field_1252, 0x4E1); +VALIDATE_OFFSET(CPlayerInfo, field_1253, 0x4E2); +VALIDATE_OFFSET(CPlayerInfo, field_1254, 0x4E3); +VALIDATE_OFFSET(CPlayerInfo, m_nPlayerId, 0x4E4); +VALIDATE_OFFSET(CPlayerInfo, m_nPlayerState, 0x4E8); +VALIDATE_OFFSET(CPlayerInfo, field_1255, 0x4EC); +VALIDATE_OFFSET(CPlayerInfo, field_1256, 0x4EE); +VALIDATE_OFFSET(CPlayerInfo, field_1257, 0x4EF); +VALIDATE_OFFSET(CPlayerInfo, field_1258, 0x4F0); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePerformingWheelie, 0x514); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSinceSomethingIdk, 0x518); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeSincePerformingStoppie, 0x51C); +VALIDATE_OFFSET(CPlayerInfo, field_1259, 0x520); +VALIDATE_OFFSET(CPlayerInfo, field_1260, 0x53C); +VALIDATE_OFFSET(CPlayerInfo, field_1271, 0x540); +VALIDATE_OFFSET(CPlayerInfo, field_1272, 0x542); +VALIDATE_OFFSET(CPlayerInfo, field_1273, 0x543); +VALIDATE_OFFSET(CPlayerInfo, field_1274, 0x544); +VALIDATE_OFFSET(CPlayerInfo, m_bNeverTired, 0x552); +VALIDATE_OFFSET(CPlayerInfo, m_bFastReload, 0x553); +VALIDATE_OFFSET(CPlayerInfo, m_bFireProof, 0x554); +VALIDATE_OFFSET(CPlayerInfo, m_bSomeFlag3, 0x555); +VALIDATE_OFFSET(CPlayerInfo, MaxHealth, 0x556); +VALIDATE_OFFSET(CPlayerInfo, MaxArmour, 0x558); +VALIDATE_OFFSET(CPlayerInfo, m_bFlag1, 0x55A); +VALIDATE_OFFSET(CPlayerInfo, m_bFlag2, 0x55B); +VALIDATE_OFFSET(CPlayerInfo, m_bCanDoDriveBy, 0x55C); +VALIDATE_OFFSET(CPlayerInfo, m_bCanBeHassledByGangs, 0x55D); +VALIDATE_OFFSET(CPlayerInfo, field_1372, 0x564); +VALIDATE_OFFSET(CPlayerInfo, m_nBadMoodTimer, 0x568); +VALIDATE_OFFSET(CPlayerInfo, field_1376, 0x56C); +VALIDATE_OFFSET(CPlayerInfo, m_nColour, 0x57C); +VALIDATE_OFFSET(CPlayerInfo, m_nTeam, 0x580); +VALIDATE_OFFSET(CPlayerInfo, field_1381, 0x584); +VALIDATE_OFFSET(CPlayerInfo, m_nHasDiedRecently, 0x588); +VALIDATE_OFFSET(CPlayerInfo, field_1392, 0x58C); +VALIDATE_OFFSET(CPlayerInfo, m_pPed, 0x598); +VALIDATE_OFFSET(CPlayerInfo, field_1403, 0x59C); +VALIDATE_OFFSET(CPlayerInfo, m_pVehicle, 0x5A0); +VALIDATE_OFFSET(CPlayerInfo, m_nMpModifier, 0x5A4); +VALIDATE_OFFSET(CPlayerInfo, field_1500, 0x5B4); +VALIDATE_OFFSET(CPlayerInfo, m_nMoney, 0x5C4); +VALIDATE_OFFSET(CPlayerInfo, m_nDisplayMoney, 0x5C8); +VALIDATE_OFFSET(CPlayerInfo, field_1644, 0x5CC); VALIDATE_SIZE(CPlayerInfo, 0x5D0); diff --git a/plugin_IV/game_IV/CPlayerPed.h b/plugin_IV/game_IV/CPlayerPed.h index 41ace9d8d..c101024f3 100644 --- a/plugin_IV/game_IV/CPlayerPed.h +++ b/plugin_IV/game_IV/CPlayerPed.h @@ -12,5 +12,4 @@ class CPlayerPed : public CPed { public: }; - VALIDATE_SIZE(CPlayerPed, 0xF00); diff --git a/plugin_IV/game_IV/CPools.h b/plugin_IV/game_IV/CPools.h index a8d187486..47a137e50 100644 --- a/plugin_IV/game_IV/CPools.h +++ b/plugin_IV/game_IV/CPools.h @@ -28,3 +28,4 @@ class CPools { static int32_t GetVehicleRef(CVehicle* veh); static int32_t GetObjectRef(CObject* obj); }; +VALIDATE_SIZE(CPools, 0x1); diff --git a/plugin_IV/game_IV/CPortalTracker.h b/plugin_IV/game_IV/CPortalTracker.h index ba462b45b..36e3b2fbe 100644 --- a/plugin_IV/game_IV/CPortalTracker.h +++ b/plugin_IV/game_IV/CPortalTracker.h @@ -38,5 +38,31 @@ class CPortalTracker : CVirtualBase { char field_4A; char field_4B; }; - +VALIDATE_OFFSET(CPortalTracker, field_4, 0x4); +VALIDATE_OFFSET(CPortalTracker, field_8, 0x8); +VALIDATE_OFFSET(CPortalTracker, field_C, 0xC); +VALIDATE_OFFSET(CPortalTracker, field_10, 0x10); +VALIDATE_OFFSET(CPortalTracker, field_14, 0x14); +VALIDATE_OFFSET(CPortalTracker, field_18, 0x18); +VALIDATE_OFFSET(CPortalTracker, field_1C, 0x1C); +VALIDATE_OFFSET(CPortalTracker, field_20, 0x20); +VALIDATE_OFFSET(CPortalTracker, field_24, 0x24); +VALIDATE_OFFSET(CPortalTracker, field_28, 0x28); +VALIDATE_OFFSET(CPortalTracker, field_2C, 0x2C); +VALIDATE_OFFSET(CPortalTracker, field_30, 0x30); +VALIDATE_OFFSET(CPortalTracker, field_34, 0x34); +VALIDATE_OFFSET(CPortalTracker, field_38, 0x38); +VALIDATE_OFFSET(CPortalTracker, field_3C, 0x3C); +VALIDATE_OFFSET(CPortalTracker, field_3D, 0x3D); +VALIDATE_OFFSET(CPortalTracker, field_3E, 0x3E); +VALIDATE_OFFSET(CPortalTracker, field_3F, 0x3F); +VALIDATE_OFFSET(CPortalTracker, field_40, 0x40); +VALIDATE_OFFSET(CPortalTracker, field_44, 0x44); +VALIDATE_OFFSET(CPortalTracker, field_45, 0x45); +VALIDATE_OFFSET(CPortalTracker, field_46, 0x46); +VALIDATE_OFFSET(CPortalTracker, field_47, 0x47); +VALIDATE_OFFSET(CPortalTracker, field_48, 0x48); +VALIDATE_OFFSET(CPortalTracker, field_49, 0x49); +VALIDATE_OFFSET(CPortalTracker, field_4A, 0x4A); +VALIDATE_OFFSET(CPortalTracker, field_4B, 0x4B); VALIDATE_SIZE(CPortalTracker, 0x4C); diff --git a/plugin_IV/game_IV/CPtrNodeDouble.h b/plugin_IV/game_IV/CPtrNodeDouble.h index 31120c7eb..8c6604aa5 100644 --- a/plugin_IV/game_IV/CPtrNodeDouble.h +++ b/plugin_IV/game_IV/CPtrNodeDouble.h @@ -13,5 +13,7 @@ class CPtrNodeDouble { CPtrNodeDouble* next; CPtrNodeDouble* prev; }; - +VALIDATE_OFFSET(CPtrNodeDouble, ptr, 0x0); +VALIDATE_OFFSET(CPtrNodeDouble, next, 0x4); +VALIDATE_OFFSET(CPtrNodeDouble, prev, 0x8); VALIDATE_SIZE(CPtrNodeDouble, 0xC); diff --git a/plugin_IV/game_IV/CPtrNodeSingle.h b/plugin_IV/game_IV/CPtrNodeSingle.h index c1a198405..bbb407673 100644 --- a/plugin_IV/game_IV/CPtrNodeSingle.h +++ b/plugin_IV/game_IV/CPtrNodeSingle.h @@ -12,5 +12,6 @@ class CPtrNodeSingle { int32_t ptr; CPtrNodeSingle* next; }; - +VALIDATE_OFFSET(CPtrNodeSingle, ptr, 0x0); +VALIDATE_OFFSET(CPtrNodeSingle, next, 0x4); VALIDATE_SIZE(CPtrNodeSingle, 0x8); diff --git a/plugin_IV/game_IV/CRAGE_SetRenderStateDC.h b/plugin_IV/game_IV/CRAGE_SetRenderStateDC.h index 1839c3eb7..2f99fef9e 100644 --- a/plugin_IV/game_IV/CRAGE_SetRenderStateDC.h +++ b/plugin_IV/game_IV/CRAGE_SetRenderStateDC.h @@ -12,3 +12,4 @@ class CRAGE_SetRenderStateDC : public CBaseDC { public: CRAGE_SetRenderStateDC(int32_t state, int32_t value); }; +VALIDATE_SIZE(CRAGE_SetRenderStateDC, 0x8); diff --git a/plugin_IV/game_IV/CRadar.h b/plugin_IV/game_IV/CRadar.h index 8a32a9f60..d99d7885e 100644 --- a/plugin_IV/game_IV/CRadar.h +++ b/plugin_IV/game_IV/CRadar.h @@ -164,7 +164,8 @@ struct tRadarTraceProperties { uint8_t field_1[4]; uint32_t m_nSprite; }; - +VALIDATE_OFFSET(tRadarTraceProperties, field_1, 0x0); +VALIDATE_OFFSET(tRadarTraceProperties, m_nSprite, 0x4); VALIDATE_SIZE(tRadarTraceProperties, 0x8); struct tRadarTrace { @@ -188,7 +189,25 @@ struct tRadarTrace { uint8_t field_40[3]; tRadarTraceProperties* m_pProperties; }; - +VALIDATE_OFFSET(tRadarTrace, m_nIndex, 0x0); +VALIDATE_OFFSET(tRadarTrace, field_2, 0x2); +VALIDATE_OFFSET(tRadarTrace, m_bSomething, 0x8); +VALIDATE_OFFSET(tRadarTrace, field_4, 0x9); +VALIDATE_OFFSET(tRadarTrace, m_nDisplay, 0xC); +VALIDATE_OFFSET(tRadarTrace, field_8, 0x10); +VALIDATE_OFFSET(tRadarTrace, m_fActualScale, 0x18); +VALIDATE_OFFSET(tRadarTrace, field_14, 0x1C); +VALIDATE_OFFSET(tRadarTrace, m_nFlags, 0x20); +VALIDATE_OFFSET(tRadarTrace, field_16, 0x21); +VALIDATE_OFFSET(tRadarTrace, m_vPos, 0x30); +VALIDATE_OFFSET(tRadarTrace, field_24, 0x3C); +VALIDATE_OFFSET(tRadarTrace, m_fRotation, 0x40); +VALIDATE_OFFSET(tRadarTrace, field_30, 0x44); +VALIDATE_OFFSET(tRadarTrace, m_fScale, 0x50); +VALIDATE_OFFSET(tRadarTrace, m_nColour, 0x54); +VALIDATE_OFFSET(tRadarTrace, m_nAlpha, 0x58); +VALIDATE_OFFSET(tRadarTrace, field_40, 0x59); +VALIDATE_OFFSET(tRadarTrace, m_pProperties, 0x5C); VALIDATE_SIZE(tRadarTrace, 0x60); class CRadar { @@ -205,4 +224,5 @@ class CRadar { static bool IsRenderPhaseTime(); static int32_t GetActualBlipArrayIndex(int32_t blipIndex); }; +VALIDATE_SIZE(CRadar, 0x1); diff --git a/plugin_IV/game_IV/CRadioHud.h b/plugin_IV/game_IV/CRadioHud.h index 37a0d0a85..01f2c1297 100644 --- a/plugin_IV/game_IV/CRadioHud.h +++ b/plugin_IV/game_IV/CRadioHud.h @@ -12,3 +12,4 @@ class CRadioHud { public: }; +VALIDATE_SIZE(CRadioHud, 0x1); diff --git a/plugin_IV/game_IV/CRenderFontBufferDC.h b/plugin_IV/game_IV/CRenderFontBufferDC.h index c8c6f351a..eea361793 100644 --- a/plugin_IV/game_IV/CRenderFontBufferDC.h +++ b/plugin_IV/game_IV/CRenderFontBufferDC.h @@ -12,3 +12,4 @@ class CRenderFontBufferDC : public CBaseDC { public: }; +VALIDATE_SIZE(CRenderFontBufferDC, 0x8); diff --git a/plugin_IV/game_IV/CReplay.h b/plugin_IV/game_IV/CReplay.h index 6d4eb6d9d..4d67fe0a4 100644 --- a/plugin_IV/game_IV/CReplay.h +++ b/plugin_IV/game_IV/CReplay.h @@ -10,4 +10,5 @@ class CReplay { public: static bool& ms_bSaving; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CReplay, 0x1); \ No newline at end of file diff --git a/plugin_IV/game_IV/CScriptCommands.h b/plugin_IV/game_IV/CScriptCommands.h index 06367ee46..8581849b8 100644 --- a/plugin_IV/game_IV/CScriptCommands.h +++ b/plugin_IV/game_IV/CScriptCommands.h @@ -12,3 +12,4 @@ class CScriptCommands { public: }; +VALIDATE_SIZE(CScriptCommands, 0x1); diff --git a/plugin_IV/game_IV/CScriptCommandsNY.h b/plugin_IV/game_IV/CScriptCommandsNY.h index d429e119a..2edb1df1d 100644 --- a/plugin_IV/game_IV/CScriptCommandsNY.h +++ b/plugin_IV/game_IV/CScriptCommandsNY.h @@ -10,5 +10,6 @@ class CScriptCommandsNY { public: - + }; +VALIDATE_SIZE(CScriptCommandsNY, 0x1); diff --git a/plugin_IV/game_IV/CSetCurrentViewportToNULL.h b/plugin_IV/game_IV/CSetCurrentViewportToNULL.h index f72af5b6d..8cc79d73e 100644 --- a/plugin_IV/game_IV/CSetCurrentViewportToNULL.h +++ b/plugin_IV/game_IV/CSetCurrentViewportToNULL.h @@ -12,3 +12,4 @@ class CSetCurrentViewportToNULL : public CBaseDC { public: }; +VALIDATE_SIZE(CSetCurrentViewportToNULL, 0x8); diff --git a/plugin_IV/game_IV/CSimpleIkManager.h b/plugin_IV/game_IV/CSimpleIkManager.h index 53f5505f0..7bf6c47a6 100644 --- a/plugin_IV/game_IV/CSimpleIkManager.h +++ b/plugin_IV/game_IV/CSimpleIkManager.h @@ -25,5 +25,17 @@ class CSimpleIkManager : CVirtualBase { int field_38; int field_3C; }; - +VALIDATE_OFFSET(CSimpleIkManager, field_4, 0x4); +VALIDATE_OFFSET(CSimpleIkManager, field_8, 0x8); +VALIDATE_OFFSET(CSimpleIkManager, field_C, 0xC); +VALIDATE_OFFSET(CSimpleIkManager, field_10, 0x10); +VALIDATE_OFFSET(CSimpleIkManager, field_14, 0x14); +VALIDATE_OFFSET(CSimpleIkManager, field_18, 0x18); +VALIDATE_OFFSET(CSimpleIkManager, field_1C, 0x1C); +VALIDATE_OFFSET(CSimpleIkManager, field_20, 0x20); +VALIDATE_OFFSET(CSimpleIkManager, field_2C, 0x2C); +VALIDATE_OFFSET(CSimpleIkManager, field_30, 0x30); +VALIDATE_OFFSET(CSimpleIkManager, field_34, 0x34); +VALIDATE_OFFSET(CSimpleIkManager, field_38, 0x38); +VALIDATE_OFFSET(CSimpleIkManager, field_3C, 0x3C); VALIDATE_SIZE(CSimpleIkManager, 0x40); diff --git a/plugin_IV/game_IV/CSimpleTransform.h b/plugin_IV/game_IV/CSimpleTransform.h index 075ffecb3..2317fa759 100644 --- a/plugin_IV/game_IV/CSimpleTransform.h +++ b/plugin_IV/game_IV/CSimpleTransform.h @@ -16,5 +16,6 @@ class CSimpleTransform { public: void UpdateMatrix(rage::Matrix44* matrix); }; - +VALIDATE_OFFSET(CSimpleTransform, m_vPosn, 0x0); +VALIDATE_OFFSET(CSimpleTransform, m_fHeading, 0xC); VALIDATE_SIZE(CSimpleTransform, 0x10); diff --git a/plugin_IV/game_IV/CSprite2d.h b/plugin_IV/game_IV/CSprite2d.h index 70ee5dafe..ae4a80a60 100644 --- a/plugin_IV/game_IV/CSprite2d.h +++ b/plugin_IV/game_IV/CSprite2d.h @@ -39,5 +39,5 @@ class CSprite2d { static void DrawRect(rage::fwRect const& rect, float z, rage::Color32 const& col); static void DrawCircle(rage::Vector2 const& center, rage::Vector2 const& scale, int radius, rage::Color32 const& col, float z); }; - +VALIDATE_OFFSET(CSprite2d, m_pTexture, 0x0); VALIDATE_SIZE(CSprite2d, 0x4); diff --git a/plugin_IV/game_IV/CStreaming.h b/plugin_IV/game_IV/CStreaming.h index 2e9640222..8e9a2c48c 100644 --- a/plugin_IV/game_IV/CStreaming.h +++ b/plugin_IV/game_IV/CStreaming.h @@ -28,3 +28,4 @@ class CStreaming { static void RequestScript(int32_t hash, int32_t flags); static void SetIsModelDeletable(int32_t model, int32_t fileTypeId); }; +VALIDATE_SIZE(CStreaming, 0x1); diff --git a/plugin_IV/game_IV/CTask.h b/plugin_IV/game_IV/CTask.h index a73ba70b3..295417142 100644 --- a/plugin_IV/game_IV/CTask.h +++ b/plugin_IV/game_IV/CTask.h @@ -30,5 +30,5 @@ class CTask { CPools::ms_pTaskPool->Delete(ptr); } }; - +VALIDATE_OFFSET(CTask, m_pParentTask, 0x4); VALIDATE_SIZE(CTask, 0x8); diff --git a/plugin_IV/game_IV/CTaskComplex.h b/plugin_IV/game_IV/CTaskComplex.h index dafaceb53..0d96ab03b 100644 --- a/plugin_IV/game_IV/CTaskComplex.h +++ b/plugin_IV/game_IV/CTaskComplex.h @@ -12,5 +12,5 @@ class CTaskComplex : public CTask { public: CTask* m_pSubTask; }; - +VALIDATE_OFFSET(CTaskComplex, m_pSubTask, 0x8); VALIDATE_SIZE(CTaskComplex, 0xC); diff --git a/plugin_IV/game_IV/CTaskComplexAimAndThrowProjectile.h b/plugin_IV/game_IV/CTaskComplexAimAndThrowProjectile.h index 5763e78a6..c9045903b 100644 --- a/plugin_IV/game_IV/CTaskComplexAimAndThrowProjectile.h +++ b/plugin_IV/game_IV/CTaskComplexAimAndThrowProjectile.h @@ -14,3 +14,4 @@ class CTaskComplexAimAndThrowProjectile : public CTaskComplex { public: CPed* GetAt(); }; +VALIDATE_SIZE(CTaskComplexAimAndThrowProjectile, 0xC); diff --git a/plugin_IV/game_IV/CTaskComplexCombat.h b/plugin_IV/game_IV/CTaskComplexCombat.h index 56cf399bb..bb7d0d6af 100644 --- a/plugin_IV/game_IV/CTaskComplexCombat.h +++ b/plugin_IV/game_IV/CTaskComplexCombat.h @@ -14,3 +14,4 @@ class CTaskComplexCombat : public CTaskComplex { public: CTaskComplexCombat(CPed* target, int32_t unk); }; +VALIDATE_SIZE(CTaskComplexCombat, 0xC); diff --git a/plugin_IV/game_IV/CTaskComplexGun.h b/plugin_IV/game_IV/CTaskComplexGun.h index b6d0a43bb..5fc12a013 100644 --- a/plugin_IV/game_IV/CTaskComplexGun.h +++ b/plugin_IV/game_IV/CTaskComplexGun.h @@ -12,3 +12,4 @@ class CTaskComplexGun : CTaskComplex { public: }; +VALIDATE_SIZE(CTaskComplexGun, 0xC); diff --git a/plugin_IV/game_IV/CTaskManager.h b/plugin_IV/game_IV/CTaskManager.h index f46a48386..cd5f14e6a 100644 --- a/plugin_IV/game_IV/CTaskManager.h +++ b/plugin_IV/game_IV/CTaskManager.h @@ -25,5 +25,7 @@ class CTaskManager { return (T*)FindActiveTaskByType(index); } }; - +VALIDATE_OFFSET(CTaskManager, m_aPrimaryTasks, 0x0); +VALIDATE_OFFSET(CTaskManager, m_aSecondaryTasks, 0x14); +VALIDATE_OFFSET(CTaskManager, m_pPed, 0x2C); VALIDATE_SIZE(CTaskManager, 0x30); diff --git a/plugin_IV/game_IV/CTaskSimpleAimGun.h b/plugin_IV/game_IV/CTaskSimpleAimGun.h index 09c12303e..a14c1a183 100644 --- a/plugin_IV/game_IV/CTaskSimpleAimGun.h +++ b/plugin_IV/game_IV/CTaskSimpleAimGun.h @@ -23,4 +23,12 @@ class CTaskSimpleAimGun : public CTaskSimple { public: CEntity* GetAt(void* out, bool arg2); }; +VALIDATE_OFFSET(CTaskSimpleAimGun, field_1, 0x8); +VALIDATE_OFFSET(CTaskSimpleAimGun, m_nFlags, 0x30); +VALIDATE_OFFSET(CTaskSimpleAimGun, field_40, 0x34); +VALIDATE_OFFSET(CTaskSimpleAimGun, m_pEntity, 0x38); +VALIDATE_OFFSET(CTaskSimpleAimGun, m_pObject, 0x3C); +VALIDATE_OFFSET(CTaskSimpleAimGun, m_pBuilding, 0x40); +VALIDATE_OFFSET(CTaskSimpleAimGun, field_256, 0x44); +VALIDATE_SIZE(CTaskSimpleAimGun, 0x108); diff --git a/plugin_IV/game_IV/CTaskSimpleFireGun.h b/plugin_IV/game_IV/CTaskSimpleFireGun.h index 0c0586ae8..db54542d4 100644 --- a/plugin_IV/game_IV/CTaskSimpleFireGun.h +++ b/plugin_IV/game_IV/CTaskSimpleFireGun.h @@ -12,3 +12,4 @@ class CTaskSimpleFireGun : CTaskSimple { public: }; +VALIDATE_SIZE(CTaskSimpleFireGun, 0x8); diff --git a/plugin_IV/game_IV/CTaskTimer.h b/plugin_IV/game_IV/CTaskTimer.h index 9a81770eb..5bf089c2e 100644 --- a/plugin_IV/game_IV/CTaskTimer.h +++ b/plugin_IV/game_IV/CTaskTimer.h @@ -16,5 +16,8 @@ class CTaskTimer { private: char _pad[2]; }; - +VALIDATE_OFFSET(CTaskTimer, field_0, 0x0); +VALIDATE_OFFSET(CTaskTimer, m_nInterval, 0x10); +VALIDATE_OFFSET(CTaskTimer, m_bStarted, 0x14); +VALIDATE_OFFSET(CTaskTimer, m_bStopped, 0x15); VALIDATE_SIZE(CTaskTimer, 0x18); diff --git a/plugin_IV/game_IV/CText.h b/plugin_IV/game_IV/CText.h index f84ec5b22..8ead8afeb 100644 --- a/plugin_IV/game_IV/CText.h +++ b/plugin_IV/game_IV/CText.h @@ -13,6 +13,7 @@ class CText { const wchar_t* Get(const char* key); const wchar_t* Get(uint32_t hash, const char* key); }; +VALIDATE_SIZE(CText, 0x1); extern CText& TheText; diff --git a/plugin_IV/game_IV/CTheScripts.h b/plugin_IV/game_IV/CTheScripts.h index 02efa3bd8..d02864203 100644 --- a/plugin_IV/game_IV/CTheScripts.h +++ b/plugin_IV/game_IV/CTheScripts.h @@ -13,4 +13,5 @@ class CTheScripts { static int32_t GetScriptHash(int32_t index); static int32_t StartScript(int32_t scriptHash, int32_t arg2, int32_t arg3, int32_t arg4); static int32_t StartScript(const char* scriptName, int32_t arg2, int32_t arg3, int32_t arg4); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTheScripts, 0x1); \ No newline at end of file diff --git a/plugin_IV/game_IV/CTimeCycle.h b/plugin_IV/game_IV/CTimeCycle.h index 970394be4..fad3fedef 100644 --- a/plugin_IV/game_IV/CTimeCycle.h +++ b/plugin_IV/game_IV/CTimeCycle.h @@ -5,9 +5,10 @@ Do not delete this comment block. Respect others' work! */ #pragma once +#include "PluginBase.h" class CTimeCycle { public: }; - +VALIDATE_SIZE(CTimeCycle, 0x1); diff --git a/plugin_IV/game_IV/CTimer.h b/plugin_IV/game_IV/CTimer.h index a887eea2b..fcdbc6184 100644 --- a/plugin_IV/game_IV/CTimer.h +++ b/plugin_IV/game_IV/CTimer.h @@ -36,3 +36,4 @@ class CTimer { public: static void SetTimeScale(float scale); }; +VALIDATE_SIZE(CTimer, 0x1); diff --git a/plugin_IV/game_IV/CTrain.h b/plugin_IV/game_IV/CTrain.h index b3dfc3cd8..01e5551f8 100644 --- a/plugin_IV/game_IV/CTrain.h +++ b/plugin_IV/game_IV/CTrain.h @@ -12,3 +12,4 @@ class CTrain : CVehicle { public: CTrain(uint8_t createdBy); }; +VALIDATE_SIZE(CTrain, 0x2080); diff --git a/plugin_IV/game_IV/CTxdStore.h b/plugin_IV/game_IV/CTxdStore.h index 25df766c2..6f7b5e7aa 100644 --- a/plugin_IV/game_IV/CTxdStore.h +++ b/plugin_IV/game_IV/CTxdStore.h @@ -15,6 +15,11 @@ struct TxdDef { uint32_t name; int32_t pad; }; +VALIDATE_OFFSET(TxdDef, dict, 0x0); +VALIDATE_OFFSET(TxdDef, refName, 0x4); +VALIDATE_OFFSET(TxdDef, name, 0x8); +VALIDATE_OFFSET(TxdDef, pad, 0xC); +VALIDATE_SIZE(TxdDef, 0x10); class CTxdStore { public: @@ -36,4 +41,5 @@ class CTxdStore { static void RemoveTxdSlot(int32_t slot); }; +VALIDATE_SIZE(CTxdStore, 0x1); diff --git a/plugin_IV/game_IV/CUserDisplay.h b/plugin_IV/game_IV/CUserDisplay.h index 168290a59..0c926d9c1 100644 --- a/plugin_IV/game_IV/CUserDisplay.h +++ b/plugin_IV/game_IV/CUserDisplay.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto IV) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto IV) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -16,6 +16,10 @@ class CAreaName { public: bool Compare(); }; +VALIDATE_OFFSET(CAreaName, field_1, 0x0); +VALIDATE_OFFSET(CAreaName, m_CurrName, 0x6); +VALIDATE_OFFSET(CAreaName, m_PrevName, 0x106); +VALIDATE_SIZE(CAreaName, 0x206); class CStreetName { public: @@ -26,6 +30,10 @@ class CStreetName { public: bool Compare(); }; +VALIDATE_OFFSET(CStreetName, field_1, 0x0); +VALIDATE_OFFSET(CStreetName, m_CurrName, 0x80); +VALIDATE_OFFSET(CStreetName, m_PrevName, 0x180); +VALIDATE_SIZE(CStreetName, 0x280); class CVehicleName { public: @@ -36,6 +44,10 @@ class CVehicleName { public: bool Compare(); }; +VALIDATE_OFFSET(CVehicleName, field_1, 0x0); +VALIDATE_OFFSET(CVehicleName, m_CurrName, 0x4); +VALIDATE_OFFSET(CVehicleName, m_PrevName, 0x104); +VALIDATE_SIZE(CVehicleName, 0x204); class CUserDisplay { public: @@ -43,4 +55,5 @@ class CUserDisplay { static CStreetName& DisplayStreetName; static CVehicleName& DisplayVehicleName; }; +VALIDATE_SIZE(CUserDisplay, 0x1); diff --git a/plugin_IV/game_IV/CVehicle.h b/plugin_IV/game_IV/CVehicle.h index 55891e8d8..a54f434c4 100644 --- a/plugin_IV/game_IV/CVehicle.h +++ b/plugin_IV/game_IV/CVehicle.h @@ -19,10 +19,17 @@ struct tDoor { char boneIndex; char field_6[46]; }; +VALIDATE_OFFSET(tDoor, boneID, 0x0); +VALIDATE_OFFSET(tDoor, field_4, 0x4); +VALIDATE_OFFSET(tDoor, boneIndex, 0x5); +VALIDATE_OFFSET(tDoor, field_6, 0x6); +VALIDATE_SIZE(tDoor, 0x34); struct tDoors { tDoor m_Doors[6]; }; +VALIDATE_OFFSET(tDoors, m_Doors, 0x0); +VALIDATE_SIZE(tDoors, 0x138); enum eVehicleType { VEHICLETYPE_AUTOMOBILE = 0x0, @@ -166,5 +173,33 @@ class CVehicle : public CPhysical { void Fix() { plugin::CallVirtualMethod<101>(this); } void SetHealth(float health, int32_t arg2) { plugin::CallVirtualMethod<61>(this, health, arg2); } }; - +VALIDATE_OFFSET(CVehicle, m_pVehicleAudioEntity, 0x210); +VALIDATE_OFFSET(CVehicle, field_1, 0x214); +VALIDATE_OFFSET(CVehicle, m_nColor1, 0x2AA); +VALIDATE_OFFSET(CVehicle, m_nColor2, 0x2AB); +VALIDATE_OFFSET(CVehicle, m_nColor3, 0x2AC); +VALIDATE_OFFSET(CVehicle, m_nColor4, 0x2AD); +VALIDATE_OFFSET(CVehicle, field_146, 0x2AE); +VALIDATE_OFFSET(CVehicle, m_ForcePlayerStation, 0xD3B); +VALIDATE_OFFSET(CVehicle, field_156, 0xD3C); +VALIDATE_OFFSET(CVehicle, m_pHandlingData, 0xDC8); +VALIDATE_OFFSET(CVehicle, m_nHandlingFlags, 0xDCC); +VALIDATE_OFFSET(CVehicle, field_157, 0xDD0); +VALIDATE_OFFSET(CVehicle, m_pVehicleFrag, 0xE14); +VALIDATE_OFFSET(CVehicle, field_192, 0xE18); +VALIDATE_OFFSET(CVehicle, field_200, 0xE20); +VALIDATE_OFFSET(CVehicle, field_1000, 0xF21); +VALIDATE_OFFSET(CVehicle, m_pDriver, 0xF50); +VALIDATE_OFFSET(CVehicle, m_pPassengers, 0xF54); +VALIDATE_OFFSET(CVehicle, field_912, 0xF74); +VALIDATE_OFFSET(CVehicle, m_nMaxPassengers, 0x1070); +VALIDATE_OFFSET(CVehicle, field_1100, 0x1071); +VALIDATE_OFFSET(CVehicle, m_nCreatedBy, 0x10B8); +VALIDATE_OFFSET(CVehicle, field_1200, 0x10B9); +VALIDATE_OFFSET(CVehicle, m_fDirtLevel, 0x10C8); +VALIDATE_OFFSET(CVehicle, field_1201, 0x10CC); +VALIDATE_OFFSET(CVehicle, m_nVehicleWeapon, 0x12E7); +VALIDATE_OFFSET(CVehicle, field_2000, 0x12E8); +VALIDATE_OFFSET(CVehicle, m_nVehicleType, 0x1304); +VALIDATE_OFFSET(CVehicle, field_3304, 0x1308); VALIDATE_SIZE(CVehicle, 0x2080); diff --git a/plugin_IV/game_IV/CVehicleFactory.h b/plugin_IV/game_IV/CVehicleFactory.h index 3c05546a9..5686e5772 100644 --- a/plugin_IV/game_IV/CVehicleFactory.h +++ b/plugin_IV/game_IV/CVehicleFactory.h @@ -13,3 +13,4 @@ class CVehicleFactory { virtual ~CVehicleFactory() { plugin::CallVirtualMethod<0>(this, 0); } }; +VALIDATE_SIZE(CVehicleFactory, 0x4); diff --git a/plugin_IV/game_IV/CVehicleFactoryNY.h b/plugin_IV/game_IV/CVehicleFactoryNY.h index 82010d604..43b0869e0 100644 --- a/plugin_IV/game_IV/CVehicleFactoryNY.h +++ b/plugin_IV/game_IV/CVehicleFactoryNY.h @@ -23,4 +23,5 @@ class CVehicleFactoryNY : public CVehicleFactory { return ms_pInstance; } }; +VALIDATE_SIZE(CVehicleFactoryNY, 0x4); diff --git a/plugin_IV/game_IV/CViewport.h b/plugin_IV/game_IV/CViewport.h index 1541cae15..0f81d7daf 100644 --- a/plugin_IV/game_IV/CViewport.h +++ b/plugin_IV/game_IV/CViewport.h @@ -22,5 +22,14 @@ class CViewport { float FindAspectRatio(bool wide); void SetWidescreenBorders(bool on, int32_t delay); }; +VALIDATE_OFFSET(CViewport, field_1, 0x0); +VALIDATE_OFFSET(CViewport, field_2, 0x2); +VALIDATE_OFFSET(CViewport, field_3, 0x4); +VALIDATE_OFFSET(CViewport, field_4, 0x6); +VALIDATE_OFFSET(CViewport, field_5, 0x8); +VALIDATE_OFFSET(CViewport, field_6, 0xA); +VALIDATE_OFFSET(CViewport, field_1107, 0xC); +VALIDATE_OFFSET(CViewport, m_bWidescreen, 0x453); +VALIDATE_SIZE(CViewport, 0x454); extern CViewport& TheViewport; diff --git a/plugin_IV/game_IV/CViewportRadar.h b/plugin_IV/game_IV/CViewportRadar.h index ff2a0ca8d..8e4b0ba2f 100644 --- a/plugin_IV/game_IV/CViewportRadar.h +++ b/plugin_IV/game_IV/CViewportRadar.h @@ -13,3 +13,4 @@ class CViewportRadar { CViewportRadar(); }; +VALIDATE_SIZE(CViewportRadar, 0x1); diff --git a/plugin_IV/game_IV/CVirtualBase.h b/plugin_IV/game_IV/CVirtualBase.h index fd5287b26..37e999549 100644 --- a/plugin_IV/game_IV/CVirtualBase.h +++ b/plugin_IV/game_IV/CVirtualBase.h @@ -11,5 +11,4 @@ class CVirtualBase { public: virtual ~CVirtualBase() {} }; - VALIDATE_SIZE(CVirtualBase, 0x4); diff --git a/plugin_IV/game_IV/CWanted.h b/plugin_IV/game_IV/CWanted.h index 6e2f9358e..faf9beb9c 100644 --- a/plugin_IV/game_IV/CWanted.h +++ b/plugin_IV/game_IV/CWanted.h @@ -56,5 +56,19 @@ class CWanted { public: static void SetMaximumWantedLevel(int32_t level); }; - +VALIDATE_OFFSET(CWanted, field_1, 0x0); +VALIDATE_OFFSET(CWanted, m_nLastWantedLevelChange, 0x8); +VALIDATE_OFFSET(CWanted, field_8, 0xC); +VALIDATE_OFFSET(CWanted, m_fMultiplier, 0x1C); +VALIDATE_OFFSET(CWanted, field_58, 0x20); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedDecreased, 0x50); +VALIDATE_OFFSET(CWanted, field_72, 0x54); +VALIDATE_OFFSET(CWanted, m_nShockingEvents, 0x58); +VALIDATE_OFFSET(CWanted, field_73, 0x59); +VALIDATE_OFFSET(CWanted, field_76, 0x5C); +VALIDATE_OFFSET(CWanted, m_nFlashingAfterOffence, 0x6C); +VALIDATE_OFFSET(CWanted, field_574, 0x70); +VALIDATE_OFFSET(CWanted, field_750, 0x2AE); +VALIDATE_OFFSET(CWanted, m_WantedLevelOld, 0x380); +VALIDATE_OFFSET(CWanted, m_WantedLevel, 0x384); VALIDATE_SIZE(CWanted, 0x388); diff --git a/plugin_IV/game_IV/CWeapon.h b/plugin_IV/game_IV/CWeapon.h index 3c2f403aa..8aae92064 100644 --- a/plugin_IV/game_IV/CWeapon.h +++ b/plugin_IV/game_IV/CWeapon.h @@ -18,5 +18,8 @@ class CWeapon { public: }; - +VALIDATE_OFFSET(CWeapon, m_nType, 0x0); +VALIDATE_OFFSET(CWeapon, m_nAmountofAmmunition, 0x4); +VALIDATE_OFFSET(CWeapon, m_bHasModelLoaded, 0x8); +VALIDATE_OFFSET(CWeapon, pad, 0x9); VALIDATE_SIZE(CWeapon, 0xC); diff --git a/plugin_IV/game_IV/CWeaponData.h b/plugin_IV/game_IV/CWeaponData.h index 3b3ad1af2..3736d2ced 100644 --- a/plugin_IV/game_IV/CWeaponData.h +++ b/plugin_IV/game_IV/CWeaponData.h @@ -52,5 +52,34 @@ class CWeaponData { int32_t GetAmountOfAmmunition(int32_t weaponSlot); void GiveWeapon(eWeaponType weaponType, int32_t ammo, int8_t setAsCurrent, int8_t arg4, int8_t arg5); }; - +VALIDATE_OFFSET(CWeaponData, m_nActiveWeaponSlot, 0x0); +VALIDATE_OFFSET(CWeaponData, field_1C, 0x4); +VALIDATE_OFFSET(CWeaponData, field_20, 0x8); +VALIDATE_OFFSET(CWeaponData, field_24, 0xC); +VALIDATE_OFFSET(CWeaponData, field_28, 0x10); +VALIDATE_OFFSET(CWeaponData, m_pHoldingObject, 0x14); +VALIDATE_OFFSET(CWeaponData, field_30, 0x18); +VALIDATE_OFFSET(CWeaponData, field_34, 0x1C); +VALIDATE_OFFSET(CWeaponData, m_pAmmoData, 0x20); +VALIDATE_OFFSET(CWeaponData, m_aWeapons, 0x24); +VALIDATE_OFFSET(CWeaponData, field_41, 0xB4); +VALIDATE_OFFSET(CWeaponData, field_CE, 0xB6); +VALIDATE_OFFSET(CWeaponData, field_D0, 0xB8); +VALIDATE_OFFSET(CWeaponData, field_D4, 0xBC); +VALIDATE_OFFSET(CWeaponData, field_C8, 0xBD); +VALIDATE_OFFSET(CWeaponData, field_C9, 0xBE); +VALIDATE_OFFSET(CWeaponData, field_CA, 0xBF); +VALIDATE_OFFSET(CWeaponData, m_nShootRate, 0xC0); +VALIDATE_OFFSET(CWeaponData, m_nAccuracy, 0xC1); +VALIDATE_OFFSET(CWeaponData, field_CB, 0xC2); +VALIDATE_OFFSET(CWeaponData, field_CC, 0xC3); +VALIDATE_OFFSET(CWeaponData, field_CD, 0xC4); +VALIDATE_OFFSET(CWeaponData, field_E0, 0xC8); +VALIDATE_OFFSET(CWeaponData, field_98, 0xCC); +VALIDATE_OFFSET(CWeaponData, m_nMinAccuracy, 0xD0); +VALIDATE_OFFSET(CWeaponData, m_nMaxAccuracy, 0xD4); +VALIDATE_OFFSET(CWeaponData, gap_e4, 0xD8); +VALIDATE_OFFSET(CWeaponData, m_pTargetEntity, 0xE8); +VALIDATE_OFFSET(CWeaponData, field_104, 0xEC); +VALIDATE_OFFSET(CWeaponData, field_105, 0xED); VALIDATE_SIZE(CWeaponData, 0x100); diff --git a/plugin_IV/game_IV/CWeaponInfo.h b/plugin_IV/game_IV/CWeaponInfo.h index 97b5f8774..f2d1f7640 100644 --- a/plugin_IV/game_IV/CWeaponInfo.h +++ b/plugin_IV/game_IV/CWeaponInfo.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "Rage.h" @@ -207,7 +206,67 @@ class CWeaponInfo { static CWeaponInfo* GetWeaponInfo(uint32_t weaponType); }; - +VALIDATE_OFFSET(CWeaponInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CWeaponInfo, m_nSlot, 0x4); +VALIDATE_OFFSET(CWeaponInfo, m_nWeaponFire, 0x8); +VALIDATE_OFFSET(CWeaponInfo, m_nDamageType, 0xC); +VALIDATE_OFFSET(CWeaponInfo, m_nGroup, 0x10); +VALIDATE_OFFSET(CWeaponInfo, m_fTargetRange, 0x14); +VALIDATE_OFFSET(CWeaponInfo, m_fWeaponRange, 0x18); +VALIDATE_OFFSET(CWeaponInfo, m_nStatType, 0x1C); +VALIDATE_OFFSET(CWeaponInfo, m_nModelHash, 0x24); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimGroup, 0x28); +VALIDATE_OFFSET(CWeaponInfo, m_fFireRate, 0x2C); +VALIDATE_OFFSET(CWeaponInfo, m_fBlindFireRate, 0x30); +VALIDATE_OFFSET(CWeaponInfo, m_fAccuracy, 0x34); +VALIDATE_OFFSET(CWeaponInfo, m_fAccuracy1stPerson, 0x38); +VALIDATE_OFFSET(CWeaponInfo, field_128, 0x3C); +VALIDATE_OFFSET(CWeaponInfo, m_vFireOffset, 0x40); +VALIDATE_OFFSET(CWeaponInfo, field_132, 0x4C); +VALIDATE_OFFSET(CWeaponInfo, m_vCrouchOffset, 0x50); +VALIDATE_OFFSET(CWeaponInfo, field_142, 0x5C); +VALIDATE_OFFSET(CWeaponInfo, field_146, 0x60); +VALIDATE_OFFSET(CWeaponInfo, m_fReticuleStanding, 0x64); +VALIDATE_OFFSET(CWeaponInfo, m_fReticuleDucked, 0x68); +VALIDATE_OFFSET(CWeaponInfo, m_fReticuleScale, 0x6C); +VALIDATE_OFFSET(CWeaponInfo, m_nRumbleDuration, 0x70); +VALIDATE_OFFSET(CWeaponInfo, m_fRumbleIntensity, 0x74); +VALIDATE_OFFSET(CWeaponInfo, m_nPickupSpawnTime, 0x78); +VALIDATE_OFFSET(CWeaponInfo, field_172, 0x7C); +VALIDATE_OFFSET(CWeaponInfo, m_nPickupAmmoOnStreet, 0x80); +VALIDATE_OFFSET(CWeaponInfo, m_nDamage, 0x82); +VALIDATE_OFFSET(CWeaponInfo, m_nDamage1stPerson, 0x84); +VALIDATE_OFFSET(CWeaponInfo, m_nClipSize, 0x86); +VALIDATE_OFFSET(CWeaponInfo, m_nMaxAmmo, 0x88); +VALIDATE_OFFSET(CWeaponInfo, m_nTimeBetweenShots, 0x8C); +VALIDATE_OFFSET(CWeaponInfo, m_fPhysicsForce, 0x90); +VALIDATE_OFFSET(CWeaponInfo, m_nReloadTimeNormal, 0x94); +VALIDATE_OFFSET(CWeaponInfo, m_nReloadTimeFast, 0x98); +VALIDATE_OFFSET(CWeaponInfo, m_nReloadTimeCrouch, 0x9C); +VALIDATE_OFFSET(CWeaponInfo, m_nProjectileType, 0xA0); +VALIDATE_OFFSET(CWeaponInfo, m_nProjectileFuseTime, 0xA4); +VALIDATE_OFFSET(CWeaponInfo, m_nProjectileToCreate, 0xA8); +VALIDATE_OFFSET(CWeaponInfo, m_nProjectilExplosionType, 0xAC); +VALIDATE_OFFSET(CWeaponInfo, m_vProjectileOffset, 0xB0); +VALIDATE_OFFSET(CWeaponInfo, field_202, 0xBC); +VALIDATE_OFFSET(CWeaponInfo, m_vProjectileRot, 0xC0); +VALIDATE_OFFSET(CWeaponInfo, field_208, 0xCC); +VALIDATE_OFFSET(CWeaponInfo, m_fProjectilePhysicsExplodeImpactThreshold, 0xD0); +VALIDATE_OFFSET(CWeaponInfo, m_fProjectilePhysicsExplodeImpactWithVehicleThreshold, 0xD4); +VALIDATE_OFFSET(CWeaponInfo, m_fProjectilePhysicsVehicleVelocity, 0xD8); +VALIDATE_OFFSET(CWeaponInfo, m_nMeleeAnim, 0xDC); +VALIDATE_OFFSET(CWeaponInfo, field_222, 0xE0); +VALIDATE_OFFSET(CWeaponInfo, m_nMuzzlefx, 0xE4); +VALIDATE_OFFSET(CWeaponInfo, m_nShellfx, 0xE8); +VALIDATE_OFFSET(CWeaponInfo, m_nProjectileTrailFx, 0xEC); +VALIDATE_OFFSET(CWeaponInfo, m_fNetworkPlayerMod, 0xF0); +VALIDATE_OFFSET(CWeaponInfo, m_fNetworkPedMod, 0xF4); +VALIDATE_OFFSET(CWeaponInfo, m_fAimingAccuracyTime, 0xF8); +VALIDATE_OFFSET(CWeaponInfo, m_nAimingPellets, 0xFC); +VALIDATE_OFFSET(CWeaponInfo, m_nShotsFired, 0x100); +VALIDATE_OFFSET(CWeaponInfo, field_244, 0x104); +VALIDATE_OFFSET(CWeaponInfo, field_248, 0x108); +VALIDATE_OFFSET(CWeaponInfo, field_252, 0x10C); VALIDATE_SIZE(CWeaponInfo, 0x110); extern CWeaponInfo* aWeaponInfo; diff --git a/plugin_IV/game_IV/CWeather.h b/plugin_IV/game_IV/CWeather.h index f101d55e8..6fad364e8 100644 --- a/plugin_IV/game_IV/CWeather.h +++ b/plugin_IV/game_IV/CWeather.h @@ -31,3 +31,4 @@ class CWeather { static float& Wind; }; +VALIDATE_SIZE(CWeather, 0x1); diff --git a/plugin_IV/game_IV/CWorld.h b/plugin_IV/game_IV/CWorld.h index 531a38948..2be0c0d1e 100644 --- a/plugin_IV/game_IV/CWorld.h +++ b/plugin_IV/game_IV/CWorld.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CPlayerInfo.h" @@ -34,7 +33,19 @@ struct hitPoint { uint32_t field_11; uint32_t field_12; }; - +VALIDATE_OFFSET(hitPoint, hitEntity, 0x0); +VALIDATE_OFFSET(hitPoint, field_2, 0x4); +VALIDATE_OFFSET(hitPoint, hitPosition, 0x10); +VALIDATE_OFFSET(hitPoint, field_3, 0x1C); +VALIDATE_OFFSET(hitPoint, pos, 0x20); +VALIDATE_OFFSET(hitPoint, field_5, 0x2C); +VALIDATE_OFFSET(hitPoint, pos2, 0x30); +VALIDATE_OFFSET(hitPoint, field_7, 0x3C); +VALIDATE_OFFSET(hitPoint, field_8, 0x40); +VALIDATE_OFFSET(hitPoint, field_9, 0x44); +VALIDATE_OFFSET(hitPoint, field_10, 0x48); +VALIDATE_OFFSET(hitPoint, field_11, 0x4C); +VALIDATE_OFFSET(hitPoint, field_12, 0x50); VALIDATE_SIZE(hitPoint, 0x54); class CWorld { @@ -49,3 +60,4 @@ class CWorld { static void Add(CEntity* e, bool arg); static void Remove(CEntity* e, bool arg); }; +VALIDATE_SIZE(CWorld, 0x1); diff --git a/plugin_IV/game_IV/C_PcSave.h b/plugin_IV/game_IV/C_PcSave.h index 0304e9471..99869dd93 100644 --- a/plugin_IV/game_IV/C_PcSave.h +++ b/plugin_IV/game_IV/C_PcSave.h @@ -14,4 +14,5 @@ class C_PcSave { public: static int32_t LoadSlot(int32_t slot); static int32_t SaveSlot(int32_t slot); -}; \ No newline at end of file +}; +VALIDATE_SIZE(C_PcSave, 0x1); \ No newline at end of file diff --git a/plugin_IV/game_IV/T_CB_Generic.h b/plugin_IV/game_IV/T_CB_Generic.h index 492751120..e5e41fc4a 100644 --- a/plugin_IV/game_IV/T_CB_Generic.h +++ b/plugin_IV/game_IV/T_CB_Generic.h @@ -18,6 +18,7 @@ class T_CB_Generic_NoArgs : public CBaseDC { virtual void Execute() override; }; +VALIDATE_SIZE(T_CB_Generic_NoArgs, 0xC); template class T_CB_Generic_1Arg : public CBaseDC { diff --git a/plugin_IV/game_IV/audAmbientAudioEntity.h b/plugin_IV/game_IV/audAmbientAudioEntity.h index bbdc220df..99a64f92d 100644 --- a/plugin_IV/game_IV/audAmbientAudioEntity.h +++ b/plugin_IV/game_IV/audAmbientAudioEntity.h @@ -12,5 +12,6 @@ class audAmbientAudioEntity : public audGtaAudioEntity { public: }; +VALIDATE_SIZE(audAmbientAudioEntity, 0x54); extern audAmbientAudioEntity& g_AmbientAudioEntity; diff --git a/plugin_IV/game_IV/audFrontendAudioEntity.h b/plugin_IV/game_IV/audFrontendAudioEntity.h index 6aecca461..71469f29d 100644 --- a/plugin_IV/game_IV/audFrontendAudioEntity.h +++ b/plugin_IV/game_IV/audFrontendAudioEntity.h @@ -14,5 +14,6 @@ class audFrontendAudioEntity : public audGtaAudioEntity { void StopLoadingTune(bool arg1); void TriggerMissionCompleteAudioEvent(int32_t index); }; +VALIDATE_SIZE(audFrontendAudioEntity, 0x54); extern audFrontendAudioEntity& g_FrontendAudioEntity; diff --git a/plugin_IV/game_IV/audGtaAudioEntity.h b/plugin_IV/game_IV/audGtaAudioEntity.h index 65ab4eb80..f792ff315 100644 --- a/plugin_IV/game_IV/audGtaAudioEntity.h +++ b/plugin_IV/game_IV/audGtaAudioEntity.h @@ -20,5 +20,8 @@ class audGtaAudioEntity : public rage::audEntity { public: void ReportSoundEvent(const char* name, rage::audSoundInitParams* params, int32_t arg3, int32_t arg4, int32_t arg5); }; - +VALIDATE_OFFSET(audGtaAudioEntity, field_1, 0x8); +VALIDATE_OFFSET(audGtaAudioEntity, m_PlayerVehicle, 0x28); +VALIDATE_OFFSET(audGtaAudioEntity, field_3, 0x2C); +VALIDATE_OFFSET(audGtaAudioEntity, m_LoadingTune, 0x50); VALIDATE_SIZE(audGtaAudioEntity, 0x54); diff --git a/plugin_IV/game_IV/audLoopingSound.h b/plugin_IV/game_IV/audLoopingSound.h index d7eb82653..b9a5060a7 100644 --- a/plugin_IV/game_IV/audLoopingSound.h +++ b/plugin_IV/game_IV/audLoopingSound.h @@ -10,8 +10,5 @@ class audLoopingSound { public: - -public: - }; - +VALIDATE_SIZE(audLoopingSound, 0x1); \ No newline at end of file diff --git a/plugin_IV/game_IV/audNorthAudioEngine.h b/plugin_IV/game_IV/audNorthAudioEngine.h index e076e4354..c5931e8ef 100644 --- a/plugin_IV/game_IV/audNorthAudioEngine.h +++ b/plugin_IV/game_IV/audNorthAudioEngine.h @@ -12,3 +12,4 @@ class audNorthAudioEngine { public: }; +VALIDATE_SIZE(audNorthAudioEngine, 0x1); diff --git a/plugin_IV/game_IV/audRadioAudioEntity.h b/plugin_IV/game_IV/audRadioAudioEntity.h index e3fd729b4..8bbe52d81 100644 --- a/plugin_IV/game_IV/audRadioAudioEntity.h +++ b/plugin_IV/game_IV/audRadioAudioEntity.h @@ -52,5 +52,21 @@ class audRadioAudioEntity : public audGtaAudioEntity { static bool CanRetune(); }; +VALIDATE_OFFSET(audRadioAudioEntity, field_24, 0x54); +VALIDATE_OFFSET(audRadioAudioEntity, m_PlayerVehicleRadioState, 0x6C); +VALIDATE_OFFSET(audRadioAudioEntity, m_MobilePhoneRadioState, 0x70); +VALIDATE_OFFSET(audRadioAudioEntity, field_27, 0x74); +VALIDATE_OFFSET(audRadioAudioEntity, m_nIndex, 0x78); +VALIDATE_OFFSET(audRadioAudioEntity, field_29, 0x7C); +VALIDATE_OFFSET(audRadioAudioEntity, field_30, 0x80); +VALIDATE_OFFSET(audRadioAudioEntity, field_31, 0x84); +VALIDATE_OFFSET(audRadioAudioEntity, field_32, 0x85); +VALIDATE_OFFSET(audRadioAudioEntity, field_33, 0x86); +VALIDATE_OFFSET(audRadioAudioEntity, field_34, 0x87); +VALIDATE_OFFSET(audRadioAudioEntity, field_35, 0x88); +VALIDATE_OFFSET(audRadioAudioEntity, field_36, 0x89); +VALIDATE_OFFSET(audRadioAudioEntity, field_70, 0x8A); +VALIDATE_OFFSET(audRadioAudioEntity, field_94, 0xD0); +VALIDATE_SIZE(audRadioAudioEntity, 0xE8); extern audRadioAudioEntity& g_RadioAudioEntity; diff --git a/plugin_IV/game_IV/audRadioStation.h b/plugin_IV/game_IV/audRadioStation.h index 83d6e152f..0261801a9 100644 --- a/plugin_IV/game_IV/audRadioStation.h +++ b/plugin_IV/game_IV/audRadioStation.h @@ -32,5 +32,10 @@ class audRadioStation { static audRadioStation* GetStation(uint32_t index); static int32_t GetNumStations(); }; - +VALIDATE_OFFSET(audRadioStation, field_1, 0x0); +VALIDATE_OFFSET(audRadioStation, name, 0x17FC); +VALIDATE_OFFSET(audRadioStation, field_6140, 0x1814); +VALIDATE_OFFSET(audRadioStation, m_nIndex, 0x1919); +VALIDATE_OFFSET(audRadioStation, field_6400, 0x191A); +VALIDATE_OFFSET(audRadioStation, m_bFreeze, 0x1927); VALIDATE_SIZE(audRadioStation, 0x1928); diff --git a/plugin_IV/game_IV/audVehicleAudioEntity.h b/plugin_IV/game_IV/audVehicleAudioEntity.h index 49a4d8648..bf53af052 100644 --- a/plugin_IV/game_IV/audVehicleAudioEntity.h +++ b/plugin_IV/game_IV/audVehicleAudioEntity.h @@ -14,4 +14,6 @@ class audVehicleAudioEntity : public audGtaAudioEntity { uint8_t field_2886[2886]; }; +VALIDATE_OFFSET(audVehicleAudioEntity, field_2886, 0x54); +VALIDATE_SIZE(audVehicleAudioEntity, 0xB9C); diff --git a/plugin_IV/game_IV/audWeaponAudioEvent.h b/plugin_IV/game_IV/audWeaponAudioEvent.h index ce7636186..59f94456f 100644 --- a/plugin_IV/game_IV/audWeaponAudioEvent.h +++ b/plugin_IV/game_IV/audWeaponAudioEvent.h @@ -11,5 +11,6 @@ class audWeaponAudioEntity : public audGtaAudioEntity { public: }; +VALIDATE_SIZE(audWeaponAudioEntity, 0x54); extern audWeaponAudioEntity& g_WeaponAudioEntity; diff --git a/plugin_IV/game_IV/cHandlingDataMgr.h b/plugin_IV/game_IV/cHandlingDataMgr.h index 77506b9cb..6ee394470 100644 --- a/plugin_IV/game_IV/cHandlingDataMgr.h +++ b/plugin_IV/game_IV/cHandlingDataMgr.h @@ -67,7 +67,63 @@ struct tHandlingData { int32_t field_108; int32_t field_10C; }; - +VALIDATE_OFFSET(tHandlingData, m_vehicleIdentifier, 0x0); +VALIDATE_OFFSET(tHandlingData, m_fMass, 0x10); +VALIDATE_OFFSET(tHandlingData, m_fDragMult, 0x14); +VALIDATE_OFFSET(tHandlingData, field_28, 0x18); +VALIDATE_OFFSET(tHandlingData, field_1C, 0x1C); +VALIDATE_OFFSET(tHandlingData, m_vCentreOfMass, 0x20); +VALIDATE_OFFSET(tHandlingData, field_2C, 0x2C); +VALIDATE_OFFSET(tHandlingData, m_nPercentSubmerged, 0x30); +VALIDATE_OFFSET(tHandlingData, field_34, 0x34); +VALIDATE_OFFSET(tHandlingData, m_fDriveFront, 0x38); +VALIDATE_OFFSET(tHandlingData, m_fDriveRear, 0x3C); +VALIDATE_OFFSET(tHandlingData, m_nDriveGears, 0x40); +VALIDATE_OFFSET(tHandlingData, m_fDriveForce, 0x44); +VALIDATE_OFFSET(tHandlingData, m_fDriveInertia, 0x48); +VALIDATE_OFFSET(tHandlingData, field_4C, 0x4C); +VALIDATE_OFFSET(tHandlingData, m_fV, 0x50); +VALIDATE_OFFSET(tHandlingData, field_54, 0x54); +VALIDATE_OFFSET(tHandlingData, m_fBrakeForce, 0x74); +VALIDATE_OFFSET(tHandlingData, m_fBrakeFront, 0x78); +VALIDATE_OFFSET(tHandlingData, m_fBrakeRear, 0x7C); +VALIDATE_OFFSET(tHandlingData, m_fSteeringLock, 0x80); +VALIDATE_OFFSET(tHandlingData, m_fTractionCurveMax, 0x84); +VALIDATE_OFFSET(tHandlingData, field_88, 0x88); +VALIDATE_OFFSET(tHandlingData, m_fTractionCurveMin, 0x8C); +VALIDATE_OFFSET(tHandlingData, field_90, 0x90); +VALIDATE_OFFSET(tHandlingData, m_fTractionCurveLateral, 0x94); +VALIDATE_OFFSET(tHandlingData, field_98, 0x98); +VALIDATE_OFFSET(tHandlingData, m_fTractionCurveLongitudinal, 0x9C); +VALIDATE_OFFSET(tHandlingData, field_A0, 0xA0); +VALIDATE_OFFSET(tHandlingData, m_fTractionSpringDeltaMax, 0xA4); +VALIDATE_OFFSET(tHandlingData, field_A8, 0xA8); +VALIDATE_OFFSET(tHandlingData, m_fTractionFront, 0xAC); +VALIDATE_OFFSET(tHandlingData, m_fTractionRear, 0xB0); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionForce, 0xB4); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionCompDamp, 0xB8); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionReboundDamp, 0xBC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionUpperLimit, 0xC0); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionLowerLimit, 0xC4); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionRaise, 0xC8); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionFront, 0xCC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionRear, 0xD0); +VALIDATE_OFFSET(tHandlingData, m_fCollisionDamageMult, 0xD4); +VALIDATE_OFFSET(tHandlingData, m_fWeaponDamageMult, 0xD8); +VALIDATE_OFFSET(tHandlingData, m_fDeformationDamageMult, 0xDC); +VALIDATE_OFFSET(tHandlingData, m_fEngineDamageMult, 0xE0); +VALIDATE_OFFSET(tHandlingData, m_fSeatOffsetDist, 0xE4); +VALIDATE_OFFSET(tHandlingData, m_nMonetaryValue, 0xE8); +VALIDATE_OFFSET(tHandlingData, m_nModelFlags, 0xEC); +VALIDATE_OFFSET(tHandlingData, m_nHandlingFlags, 0xF0); +VALIDATE_OFFSET(tHandlingData, field_F4, 0xF4); +VALIDATE_OFFSET(tHandlingData, field_F5, 0xF5); +VALIDATE_OFFSET(tHandlingData, m_pBikeHandling, 0xF8); +VALIDATE_OFFSET(tHandlingData, m_pFlyingHandling, 0xFC); +VALIDATE_OFFSET(tHandlingData, m_pBoatHandling, 0x100); +VALIDATE_OFFSET(tHandlingData, field_104, 0x104); +VALIDATE_OFFSET(tHandlingData, field_108, 0x108); +VALIDATE_OFFSET(tHandlingData, field_10C, 0x10C); VALIDATE_SIZE(tHandlingData, 0x110); class cHandlingDataMgr { @@ -75,3 +131,4 @@ class cHandlingDataMgr { static int32_t GetHandlingId(const char* name); static tHandlingData* GetHandlingData(const char* name); }; +VALIDATE_SIZE(cHandlingDataMgr, 0x1); diff --git a/plugin_IV/game_IV/eModelHashes.h b/plugin_IV/game_IV/eModelHashes.h index 0ade55f86..39d5753a6 100644 --- a/plugin_IV/game_IV/eModelHashes.h +++ b/plugin_IV/game_IV/eModelHashes.h @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto IV) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once enum eModelHashes { diff --git a/plugin_IV/game_IV/phInstGta.h b/plugin_IV/game_IV/phInstGta.h index ece919623..e8c301224 100644 --- a/plugin_IV/game_IV/phInstGta.h +++ b/plugin_IV/game_IV/phInstGta.h @@ -15,3 +15,8 @@ class phInstGta : rage::phInst { int field_58; int field_5C; }; +VALIDATE_OFFSET(phInstGta, field_50, 0x50); +VALIDATE_OFFSET(phInstGta, field_54, 0x54); +VALIDATE_OFFSET(phInstGta, field_58, 0x58); +VALIDATE_OFFSET(phInstGta, field_5C, 0x5C); +VALIDATE_SIZE(phInstGta, 0x60); diff --git a/plugin_IV/game_IV/rage/BlockMap.h b/plugin_IV/game_IV/rage/BlockMap.h index c5728bfb3..4c3a5ace2 100644 --- a/plugin_IV/game_IV/rage/BlockMap.h +++ b/plugin_IV/game_IV/rage/BlockMap.h @@ -13,4 +13,5 @@ namespace rage { public: }; + VALIDATE_SIZE(BlockMap, 0x4); } diff --git a/plugin_IV/game_IV/rage/CPostFX.h b/plugin_IV/game_IV/rage/CPostFX.h index 4dfef880f..20fccfe37 100644 --- a/plugin_IV/game_IV/rage/CPostFX.h +++ b/plugin_IV/game_IV/rage/CPostFX.h @@ -88,6 +88,69 @@ namespace rage { return ms_pInstance; } }; - + VALIDATE_OFFSET(CPostFX, m_Width, 0x4); + VALIDATE_OFFSET(CPostFX, m_Height, 0x8); + VALIDATE_OFFSET(CPostFX, m_FSCopy, 0xC); + VALIDATE_OFFSET(CPostFX, m_FSCopy2, 0x10); + VALIDATE_OFFSET(CPostFX, m_Unknown, 0x14); + VALIDATE_OFFSET(CPostFX, m_Quarter, 0x18); + VALIDATE_OFFSET(CPostFX, m_Blur, 0x1C); + VALIDATE_OFFSET(CPostFX, m_Blur2, 0x20); + VALIDATE_OFFSET(CPostFX, m_Blur2Copy, 0x24); + VALIDATE_OFFSET(CPostFX, m_Lum0, 0x28); + VALIDATE_OFFSET(CPostFX, m_Lum1, 0x2C); + VALIDATE_OFFSET(CPostFX, m_Lum2, 0x30); + VALIDATE_OFFSET(CPostFX, m_CurrentLum, 0x34); + VALIDATE_OFFSET(CPostFX, m_AdaptedLum, 0x38); + VALIDATE_OFFSET(CPostFX, field_29, 0x48); + VALIDATE_OFFSET(CPostFX, field_30, 0x4C); + VALIDATE_OFFSET(CPostFX, field_31, 0x50); + VALIDATE_OFFSET(CPostFX, m_JitterTextureId, 0x54); + VALIDATE_OFFSET(CPostFX, field_33, 0x58); + VALIDATE_OFFSET(CPostFX, m_aStencilcopytexId, 0x5C); + VALIDATE_OFFSET(CPostFX, m_Shader, 0x60); + VALIDATE_OFFSET(CPostFX, m_PostFxTexture0Id, 0x64); + VALIDATE_OFFSET(CPostFX, m_PostFxTexture1Id, 0x68); + VALIDATE_OFFSET(CPostFX, m_PostFxTexture2Id, 0x6C); + VALIDATE_OFFSET(CPostFX, m_PostFxTextureV0Id, 0x70); + VALIDATE_OFFSET(CPostFX, m_PostFxTextureV1Id, 0x74); + VALIDATE_OFFSET(CPostFX, field_104, 0x78); + VALIDATE_OFFSET(CPostFX, field_105, 0x7C); + VALIDATE_OFFSET(CPostFX, field_106, 0x80); + VALIDATE_OFFSET(CPostFX, field_107, 0x84); + VALIDATE_OFFSET(CPostFX, field_108, 0x88); + VALIDATE_OFFSET(CPostFX, field_114, 0x8C); + VALIDATE_OFFSET(CPostFX, field_325, 0x260); + VALIDATE_OFFSET(CPostFX, m_useHighDOF, 0x264); + VALIDATE_OFFSET(CPostFX, field_400, 0x268); + VALIDATE_OFFSET(CPostFX, m_ExposureId, 0x26C); + VALIDATE_OFFSET(CPostFX, m_TexelSizeId, 0x270); + VALIDATE_OFFSET(CPostFX, m_ElapsedTimeId, 0x274); + VALIDATE_OFFSET(CPostFX, m_AdaptTimeId, 0x278); + VALIDATE_OFFSET(CPostFX, m_ToneMapParamsId, 0x27C); + VALIDATE_OFFSET(CPostFX, field_406, 0x280); + VALIDATE_OFFSET(CPostFX, m_NoiseParamsId, 0x284); + VALIDATE_OFFSET(CPostFX, m_ColorCorrectId, 0x288); + VALIDATE_OFFSET(CPostFX, m_ColorShiftId, 0x28C); + VALIDATE_OFFSET(CPostFX, m_deSatContrastGammaId, 0x290); + VALIDATE_OFFSET(CPostFX, m_AdaptedLumMinId, 0x294); + VALIDATE_OFFSET(CPostFX, m_AdaptedLumMaxId, 0x298); + VALIDATE_OFFSET(CPostFX, m_DOF_PROJId, 0x29C); + VALIDATE_OFFSET(CPostFX, m_DOF_PARAMSId, 0x2A0); + VALIDATE_OFFSET(CPostFX, m_DOF_BLURId, 0x2A4); + VALIDATE_OFFSET(CPostFX, m_DofBlurWeightId, 0x2A8); + VALIDATE_OFFSET(CPostFX, m_EAA_PARAMS2Id, 0x2AC); + VALIDATE_OFFSET(CPostFX, m_MB_MATRIXId, 0x2B0); + VALIDATE_OFFSET(CPostFX, m_gbufferTexture1Id, 0x2B4); + VALIDATE_OFFSET(CPostFX, m_gbufferTexture2Id, 0x2B8); + VALIDATE_OFFSET(CPostFX, m_gbufferTexture3Id, 0x2BC); + VALIDATE_OFFSET(CPostFX, m_gbufferStencilTextureId, 0x2C0); + VALIDATE_OFFSET(CPostFX, field_423, 0x2C4); + VALIDATE_OFFSET(CPostFX, m_PPPDirectionalMotionBlurLengthId, 0x2C8); + VALIDATE_OFFSET(CPostFX, m_GTACompositePostFxId, 0x2CC); + VALIDATE_OFFSET(CPostFX, field_426, 0x2D0); + VALIDATE_OFFSET(CPostFX, field_427, 0x2D4); + VALIDATE_OFFSET(CPostFX, field_428, 0x2D8); + VALIDATE_OFFSET(CPostFX, field_918, 0x2DC); VALIDATE_SIZE(CPostFX, 0x390); } diff --git a/plugin_IV/game_IV/rage/CTextureDecodeRequestDesc.h b/plugin_IV/game_IV/rage/CTextureDecodeRequestDesc.h index bbb76fcb8..e1cb290f5 100644 --- a/plugin_IV/game_IV/rage/CTextureDecodeRequestDesc.h +++ b/plugin_IV/game_IV/rage/CTextureDecodeRequestDesc.h @@ -23,7 +23,7 @@ class CTextureDecodeRequestDesc { UNKNOWN = 0x0, JPEG_BUFFER = 0x1, DDS_BUFFER = 0x2, - UNK_BUFFER3 = 0x3, + UNK_BUFFER3 = 0x3, UNK_BUFFER4 = 0x4, }; @@ -35,3 +35,11 @@ class CTextureDecodeRequestDesc { eDownscaleFactor m_JPEGScalingFactor; bool m_JPEGEncodeAsDXT; }; +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_TxdName, 0x0); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_TextureName, 0x4); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_Type, 0x8); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_BufferPtr, 0xC); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_BufferSize, 0x10); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_JPEGScalingFactor, 0x14); +VALIDATE_OFFSET(CTextureDecodeRequestDesc, m_JPEGEncodeAsDXT, 0x18); +VALIDATE_SIZE(CTextureDecodeRequestDesc, 0x1C); diff --git a/plugin_IV/game_IV/rage/Color32.h b/plugin_IV/game_IV/rage/Color32.h index a17ca8cd6..7468d511a 100644 --- a/plugin_IV/game_IV/rage/Color32.h +++ b/plugin_IV/game_IV/rage/Color32.h @@ -69,4 +69,9 @@ namespace rage { return *this; } }; + VALIDATE_OFFSET(Color32, b, 0x0); + VALIDATE_OFFSET(Color32, g, 0x1); + VALIDATE_OFFSET(Color32, r, 0x2); + VALIDATE_OFFSET(Color32, a, 0x3); + VALIDATE_SIZE(Color32, 0x4); } diff --git a/plugin_IV/game_IV/rage/Matrix34.h b/plugin_IV/game_IV/rage/Matrix34.h index 1a5abaa7e..8a55c7714 100644 --- a/plugin_IV/game_IV/rage/Matrix34.h +++ b/plugin_IV/game_IV/rage/Matrix34.h @@ -105,4 +105,9 @@ namespace rage { return result; } }; + VALIDATE_OFFSET(Matrix34, right, 0x0); + VALIDATE_OFFSET(Matrix34, up, 0xC); + VALIDATE_OFFSET(Matrix34, at, 0x18); + VALIDATE_OFFSET(Matrix34, pos, 0x24); + VALIDATE_SIZE(Matrix34, 0x30); } diff --git a/plugin_IV/game_IV/rage/Matrix44.h b/plugin_IV/game_IV/rage/Matrix44.h index c53e033f9..3a19730cd 100644 --- a/plugin_IV/game_IV/rage/Matrix44.h +++ b/plugin_IV/game_IV/rage/Matrix44.h @@ -245,6 +245,11 @@ namespace rage { return angles; } }; + VALIDATE_OFFSET(Matrix44, right, 0x0); + VALIDATE_OFFSET(Matrix44, up, 0x10); + VALIDATE_OFFSET(Matrix44, at, 0x20); + VALIDATE_OFFSET(Matrix44, pos, 0x30); + VALIDATE_SIZE(Matrix44, 0x40); static inline Vector3 operator*(const Matrix44& mat, const Vector3& vec) { return Vector3(mat.right.x * vec.x + mat.up.x * vec.y + mat.at.x * vec.z + mat.pos.x, diff --git a/plugin_IV/game_IV/rage/Quaternion.h b/plugin_IV/game_IV/rage/Quaternion.h index d1b6743a5..7f8c3df91 100644 --- a/plugin_IV/game_IV/rage/Quaternion.h +++ b/plugin_IV/game_IV/rage/Quaternion.h @@ -14,4 +14,9 @@ namespace rage { Quaternion(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {} }; + VALIDATE_OFFSET(Quaternion, x, 0x0); + VALIDATE_OFFSET(Quaternion, y, 0x4); + VALIDATE_OFFSET(Quaternion, z, 0x8); + VALIDATE_OFFSET(Quaternion, w, 0xC); + VALIDATE_SIZE(Quaternion, 0x10); } diff --git a/plugin_IV/game_IV/rage/Vector4.h b/plugin_IV/game_IV/rage/Vector4.h index 4fd86468c..1a05e1aae 100644 --- a/plugin_IV/game_IV/rage/Vector4.h +++ b/plugin_IV/game_IV/rage/Vector4.h @@ -116,6 +116,11 @@ namespace rage { this->w += y; } }; + VALIDATE_OFFSET(Vector4, x, 0x0); + VALIDATE_OFFSET(Vector4, y, 0x4); + VALIDATE_OFFSET(Vector4, z, 0x8); + VALIDATE_OFFSET(Vector4, w, 0xC); + VALIDATE_SIZE(Vector4, 0x10); static Vector3 operator+(const Vector3& v3, const Vector4& v4) { return Vector3(v3.x + v4.x, v3.y + v4.y, v3.z + v4.z); diff --git a/plugin_IV/game_IV/rage/atReferenceCounter.h b/plugin_IV/game_IV/rage/atReferenceCounter.h index 06c0848e1..06a04315f 100644 --- a/plugin_IV/game_IV/rage/atReferenceCounter.h +++ b/plugin_IV/game_IV/rage/atReferenceCounter.h @@ -12,4 +12,5 @@ namespace rage { class atReferenceCounter : datBase { }; + VALIDATE_SIZE(atReferenceCounter, 0x4); } diff --git a/plugin_IV/game_IV/rage/audController.h b/plugin_IV/game_IV/rage/audController.h index 14d2571cf..f802c936c 100644 --- a/plugin_IV/game_IV/rage/audController.h +++ b/plugin_IV/game_IV/rage/audController.h @@ -21,7 +21,13 @@ namespace rage { public: void Update(uint32_t timeInMs); }; - + VALIDATE_OFFSET(audController, field, 0x0); + VALIDATE_OFFSET(audController, m_EnvironmentListHead, 0xFA4); + VALIDATE_OFFSET(audController, field_6402, 0xFA6); + VALIDATE_OFFSET(audController, m_EnvironmentGroupList, 0x28A8); + VALIDATE_OFFSET(audController, field_8842, 0x30A8); + VALIDATE_OFFSET(audController, m_IsInitialized, 0x3230); + VALIDATE_OFFSET(audController, m_IsActive, 0x3231); VALIDATE_SIZE(audController, 0x3234); extern audController*& g_Controller; diff --git a/plugin_IV/game_IV/rage/audEntity.h b/plugin_IV/game_IV/rage/audEntity.h index 28b1e2567..5ed42ba95 100644 --- a/plugin_IV/game_IV/rage/audEntity.h +++ b/plugin_IV/game_IV/rage/audEntity.h @@ -26,4 +26,7 @@ namespace rage { public: void CreateSound_LocalReference(const char* name, rage::audSound* sound, audSoundInitParams* initParams, int32_t arg4, int32_t arg5, int32_t arg6); }; + VALIDATE_OFFSET(audEntity, m_ControllerEntityId, 0x4); + VALIDATE_OFFSET(audEntity, m_EntityVariableBlock, 0x6); + VALIDATE_SIZE(audEntity, 0x8); } diff --git a/plugin_IV/game_IV/rage/audSound.h b/plugin_IV/game_IV/rage/audSound.h index cf9bc29df..8c4f90e7c 100644 --- a/plugin_IV/game_IV/rage/audSound.h +++ b/plugin_IV/game_IV/rage/audSound.h @@ -15,4 +15,5 @@ namespace rage { public: void PrepareAndPlay(audWaveSlot* slot, bool allowLoad, int32_t timeLimit); }; + VALIDATE_SIZE(audSound, 0x1); } diff --git a/plugin_IV/game_IV/rage/audSoundInitParams.h b/plugin_IV/game_IV/rage/audSoundInitParams.h index dd5a1ea94..bad3f8afa 100644 --- a/plugin_IV/game_IV/rage/audSoundInitParams.h +++ b/plugin_IV/game_IV/rage/audSoundInitParams.h @@ -23,6 +23,13 @@ namespace rage { public: audSoundInitParams(); }; - + VALIDATE_OFFSET(audSoundInitParams, field_8, 0x0); + VALIDATE_OFFSET(audSoundInitParams, Position, 0xC); + VALIDATE_OFFSET(audSoundInitParams, field_1, 0x18); + VALIDATE_OFFSET(audSoundInitParams, TimerId, 0x38); + VALIDATE_OFFSET(audSoundInitParams, Volume, 0x3C); + VALIDATE_OFFSET(audSoundInitParams, Pan, 0x40); + VALIDATE_OFFSET(audSoundInitParams, field_61, 0x44); + VALIDATE_OFFSET(audSoundInitParams, field_62, 0x46); VALIDATE_SIZE(audSoundInitParams, 0x48); } diff --git a/plugin_IV/game_IV/rage/audWaveSlot.h b/plugin_IV/game_IV/rage/audWaveSlot.h index fb8539c4c..856219097 100644 --- a/plugin_IV/game_IV/rage/audWaveSlot.h +++ b/plugin_IV/game_IV/rage/audWaveSlot.h @@ -14,4 +14,5 @@ namespace rage { public: static audWaveSlot* FindWaveSlot(const char* name); }; + VALIDATE_SIZE(audWaveSlot, 0x1); } diff --git a/plugin_IV/game_IV/rage/crFrame.h b/plugin_IV/game_IV/rage/crFrame.h index 04dfa30af..0f409f9e2 100644 --- a/plugin_IV/game_IV/rage/crFrame.h +++ b/plugin_IV/game_IV/rage/crFrame.h @@ -16,4 +16,9 @@ namespace rage { int32_t field_8; sysArray field_C; }; + VALIDATE_OFFSET(crFrame, field_2, 0x0); + VALIDATE_OFFSET(crFrame, field_4, 0x4); + VALIDATE_OFFSET(crFrame, field_8, 0x8); + VALIDATE_OFFSET(crFrame, field_C, 0xC); + VALIDATE_SIZE(crFrame, 0x14); } diff --git a/plugin_IV/game_IV/rage/crFrameBuffer.h b/plugin_IV/game_IV/rage/crFrameBuffer.h index 66508b7eb..e26f1c162 100644 --- a/plugin_IV/game_IV/rage/crFrameBuffer.h +++ b/plugin_IV/game_IV/rage/crFrameBuffer.h @@ -16,4 +16,9 @@ namespace rage { int8_t field_20; int8_t field_21[3]; }; + VALIDATE_OFFSET(crFrameBuffer, field_14, 0x14); + VALIDATE_OFFSET(crFrameBuffer, gap_18, 0x18); + VALIDATE_OFFSET(crFrameBuffer, field_20, 0x20); + VALIDATE_OFFSET(crFrameBuffer, field_21, 0x21); + VALIDATE_SIZE(crFrameBuffer, 0x24); } diff --git a/plugin_IV/game_IV/rage/crmtObserver.h b/plugin_IV/game_IV/rage/crmtObserver.h index 969a6d8f7..f5095c859 100644 --- a/plugin_IV/game_IV/rage/crmtObserver.h +++ b/plugin_IV/game_IV/rage/crmtObserver.h @@ -15,4 +15,9 @@ namespace rage { int32_t field_8; int32_t field_C; }; + VALIDATE_OFFSET(crmtObserver, field_2, 0x0); + VALIDATE_OFFSET(crmtObserver, field_4, 0x4); + VALIDATE_OFFSET(crmtObserver, field_8, 0x8); + VALIDATE_OFFSET(crmtObserver, field_C, 0xC); + VALIDATE_SIZE(crmtObserver, 0x10); } diff --git a/plugin_IV/game_IV/rage/datBase.h b/plugin_IV/game_IV/rage/datBase.h index b90b9cfea..0ea792d01 100644 --- a/plugin_IV/game_IV/rage/datBase.h +++ b/plugin_IV/game_IV/rage/datBase.h @@ -14,4 +14,5 @@ namespace rage { public: virtual ~datBase() {} }; + VALIDATE_SIZE(datBase, 0x4); } diff --git a/plugin_IV/game_IV/rage/fiAssetManager.h b/plugin_IV/game_IV/rage/fiAssetManager.h index 5afe801dd..87eef406e 100644 --- a/plugin_IV/game_IV/rage/fiAssetManager.h +++ b/plugin_IV/game_IV/rage/fiAssetManager.h @@ -12,6 +12,8 @@ namespace rage { struct Entry { char folder[512]; }; + VALIDATE_OFFSET(Entry, folder, 0x0); + VALIDATE_SIZE(Entry, 0x200); class fiAssetManager { public: @@ -32,7 +34,12 @@ namespace rage { bool Exists(const char* base, const char* ext); uint8_t FullReadPath(char* dest, int maxLen, const char* base, const char* ext); }; - + VALIDATE_OFFSET(fiAssetManager, m_Paths, 0x0); + VALIDATE_OFFSET(fiAssetManager, m_Entries, 0x800); + VALIDATE_OFFSET(fiAssetManager, m_SP, 0x1800); + VALIDATE_OFFSET(fiAssetManager, m_PathCount, 0x1804); + VALIDATE_OFFSET(fiAssetManager, m_WritePath, 0x1808); + VALIDATE_OFFSET(fiAssetManager, m_WritePathIsWriteOnly, 0x180C); VALIDATE_SIZE(fiAssetManager, 0x1810); extern fiAssetManager& ASSET; diff --git a/plugin_IV/game_IV/rage/fiDevice.h b/plugin_IV/game_IV/rage/fiDevice.h index 7a1d25ccb..53546962b 100644 --- a/plugin_IV/game_IV/rage/fiDevice.h +++ b/plugin_IV/game_IV/rage/fiDevice.h @@ -13,4 +13,5 @@ namespace rage { public: rage::fiDevice* GetDevice(char* filename, char readOnly); }; + VALIDATE_SIZE(fiDevice, 0x1); } diff --git a/plugin_IV/game_IV/rage/fiStream.h b/plugin_IV/game_IV/rage/fiStream.h index 6d6a39105..7608c4363 100644 --- a/plugin_IV/game_IV/rage/fiStream.h +++ b/plugin_IV/game_IV/rage/fiStream.h @@ -24,6 +24,13 @@ namespace rage { public: }; - + VALIDATE_OFFSET(fiStream, m_Device, 0x0); + VALIDATE_OFFSET(fiStream, m_Handle, 0x4); + VALIDATE_OFFSET(fiStream, m_Name, 0x8); + VALIDATE_OFFSET(fiStream, m_Buffer, 0xA8); + VALIDATE_OFFSET(fiStream, m_Start, 0xAC); + VALIDATE_OFFSET(fiStream, m_Offset, 0xB0); + VALIDATE_OFFSET(fiStream, m_Length, 0xB4); + VALIDATE_OFFSET(fiStream, m_Size, 0xB8); VALIDATE_SIZE(fiStream, 0xBC); } diff --git a/plugin_IV/game_IV/rage/fwPool.h b/plugin_IV/game_IV/rage/fwPool.h index e32380ca0..79230687e 100644 --- a/plugin_IV/game_IV/rage/fwPool.h +++ b/plugin_IV/game_IV/rage/fwPool.h @@ -142,6 +142,13 @@ namespace rage { m_numSlotsUsed--; } }; + VALIDATE_OFFSET(fwBasePool, m_aStorage, 0x0); + VALIDATE_OFFSET(fwBasePool, m_aFlags, 0x4); + VALIDATE_OFFSET(fwBasePool, m_nSize, 0x8); + VALIDATE_OFFSET(fwBasePool, m_nStorageSize, 0xC); + VALIDATE_OFFSET(fwBasePool, m_nFirstFreeIndex, 0x10); + VALIDATE_OFFSET(fwBasePool, m_numSlotsUsed, 0x14); + VALIDATE_SIZE(fwBasePool, 0x18); template class fwPool : public fwBasePool { diff --git a/plugin_IV/game_IV/rage/fwRect.h b/plugin_IV/game_IV/rage/fwRect.h index e2d4bc3a9..3bfd31b4f 100644 --- a/plugin_IV/game_IV/rage/fwRect.h +++ b/plugin_IV/game_IV/rage/fwRect.h @@ -33,4 +33,9 @@ namespace rage { this->bottom += y; } }; + VALIDATE_OFFSET(fwRect, left, 0x0); + VALIDATE_OFFSET(fwRect, top, 0x4); + VALIDATE_OFFSET(fwRect, right, 0x8); + VALIDATE_OFFSET(fwRect, bottom, 0xC); + VALIDATE_SIZE(fwRect, 0x10); } diff --git a/plugin_IV/game_IV/rage/grcDevice.h b/plugin_IV/game_IV/rage/grcDevice.h index 93e9b4f89..ecedeb740 100644 --- a/plugin_IV/game_IV/rage/grcDevice.h +++ b/plugin_IV/game_IV/rage/grcDevice.h @@ -61,4 +61,5 @@ namespace rage { static int32_t& m_CurrentWidth; static int32_t& m_CurrentHeight; }; + VALIDATE_SIZE(grcDevice, 0x1); } diff --git a/plugin_IV/game_IV/rage/grcEffect.h b/plugin_IV/game_IV/rage/grcEffect.h index c2344ed4f..e460eda9c 100644 --- a/plugin_IV/game_IV/rage/grcEffect.h +++ b/plugin_IV/game_IV/rage/grcEffect.h @@ -16,4 +16,6 @@ namespace rage { public: uint8_t field_1[1080]; }; + VALIDATE_OFFSET(grcEffect, field_1, 0x0); + VALIDATE_SIZE(grcEffect, 0x438); } diff --git a/plugin_IV/game_IV/rage/grcImage.h b/plugin_IV/game_IV/rage/grcImage.h index cba02c03b..cd4221578 100644 --- a/plugin_IV/game_IV/rage/grcImage.h +++ b/plugin_IV/game_IV/rage/grcImage.h @@ -70,6 +70,24 @@ namespace rage { static grcImage* LoadDDS(const char* path); static grcImage* Load(const char* path); // dds only }; + VALIDATE_OFFSET(grcImage, m_Width, 0x0); + VALIDATE_OFFSET(grcImage, m_Height, 0x2); + VALIDATE_OFFSET(grcImage, m_Format, 0x4); + VALIDATE_OFFSET(grcImage, m_Type, 0x8); + VALIDATE_OFFSET(grcImage, m_Stride, 0xC); + VALIDATE_OFFSET(grcImage, m_Depth, 0xE); + VALIDATE_OFFSET(grcImage, m_StrideHi, 0xF); + VALIDATE_OFFSET(grcImage, m_Bits, 0x10); + VALIDATE_OFFSET(grcImage, m_Lut, 0x14); + VALIDATE_OFFSET(grcImage, m_Next, 0x18); + VALIDATE_OFFSET(grcImage, m_NextLayer, 0x1C); + VALIDATE_OFFSET(grcImage, m_RefCount, 0x20); + VALIDATE_OFFSET(grcImage, pad0, 0x24); + VALIDATE_OFFSET(grcImage, pad1, 0x28); + VALIDATE_OFFSET(grcImage, pad2, 0x2C); + VALIDATE_OFFSET(grcImage, m_ColorExp, 0x30); + VALIDATE_OFFSET(grcImage, m_ColorOfs, 0x3C); + VALIDATE_SIZE(grcImage, 0x48); } diff --git a/plugin_IV/game_IV/rage/grcRenderState.h b/plugin_IV/game_IV/rage/grcRenderState.h index 20629375e..d26cd94f7 100644 --- a/plugin_IV/game_IV/rage/grcRenderState.h +++ b/plugin_IV/game_IV/rage/grcRenderState.h @@ -84,6 +84,8 @@ namespace rage { float Float; }; }; - + VALIDATE_OFFSET(grcRenderState, State, 0x0); + VALIDATE_OFFSET(grcRenderState, Int, 0x4); + VALIDATE_OFFSET(grcRenderState, Float, 0x4); VALIDATE_SIZE(grcRenderState, 0x8); } diff --git a/plugin_IV/game_IV/rage/grcRenderTarget.h b/plugin_IV/game_IV/rage/grcRenderTarget.h index 115c9f245..e5c287535 100644 --- a/plugin_IV/game_IV/rage/grcRenderTarget.h +++ b/plugin_IV/game_IV/rage/grcRenderTarget.h @@ -28,6 +28,7 @@ namespace rage { plugin::CallVirtualMethod<0>(this, 0); } }; + VALIDATE_SIZE(grcRenderTarget, 0x28); class grcRenderTargetPC : public grcRenderTarget { public: @@ -35,4 +36,5 @@ namespace rage { return (grcTexturePC*)this; } }; + VALIDATE_SIZE(grcRenderTargetPC, 0x28); } diff --git a/plugin_IV/game_IV/rage/grcTexture.h b/plugin_IV/game_IV/rage/grcTexture.h index 1f56c60a1..9d29d2a39 100644 --- a/plugin_IV/game_IV/rage/grcTexture.h +++ b/plugin_IV/game_IV/rage/grcTexture.h @@ -45,7 +45,19 @@ namespace rage { } } }; - + VALIDATE_OFFSET(grcTexture, field_8, 0x8); + VALIDATE_OFFSET(grcTexture, m_nDepth, 0x9); + VALIDATE_OFFSET(grcTexture, m_RefCount, 0xA); + VALIDATE_OFFSET(grcTexture, field_C, 0xC); + VALIDATE_OFFSET(grcTexture, field_10, 0x10); + VALIDATE_OFFSET(grcTexture, m_Name, 0x14); + VALIDATE_OFFSET(grcTexture, m_pDirect3DTexture9, 0x18); + VALIDATE_OFFSET(grcTexture, m_Width, 0x1C); + VALIDATE_OFFSET(grcTexture, m_Height, 0x1E); + VALIDATE_OFFSET(grcTexture, m_Format, 0x20); + VALIDATE_OFFSET(grcTexture, m_nMipStride, 0x24); + VALIDATE_OFFSET(grcTexture, m_ImageType, 0x26); + VALIDATE_OFFSET(grcTexture, m_nMipCount, 0x27); VALIDATE_SIZE(grcTexture, 0x28); class grcTexturePC : public grcTexture { @@ -67,6 +79,5 @@ namespace rage { int32_t GetHeight() { return plugin::CallVirtualMethodAndReturn(this); } int32_t GetMipMapCount() { return plugin::CallVirtualMethodAndReturn(this); } }; - VALIDATE_SIZE(grcTexturePC, 0x50); } diff --git a/plugin_IV/game_IV/rage/grcTextureFactory.h b/plugin_IV/game_IV/rage/grcTextureFactory.h index d40b027b2..3dde24c56 100644 --- a/plugin_IV/game_IV/rage/grcTextureFactory.h +++ b/plugin_IV/game_IV/rage/grcTextureFactory.h @@ -85,6 +85,9 @@ namespace rage { public: virtual ~grcTextureFactory() {} }; + VALIDATE_OFFSET(grcTextureFactory, field_4, 0x4); + VALIDATE_OFFSET(grcTextureFactory, field_5, 0x5); + VALIDATE_SIZE(grcTextureFactory, 0x8); class grcTextureFactoryPC : public grcTextureFactory { private: @@ -153,6 +156,27 @@ namespace rage { return sm_Instance; } }; + VALIDATE_OFFSET(grcTextureFactoryPC, m_pRenderTargets, 0x8); + VALIDATE_OFFSET(grcTextureFactoryPC, field_14, 0x14); + VALIDATE_OFFSET(grcTextureFactoryPC, field_18, 0x18); + VALIDATE_OFFSET(grcTextureFactoryPC, field_1C, 0x1C); + VALIDATE_OFFSET(grcTextureFactoryPC, field_20, 0x20); + VALIDATE_OFFSET(grcTextureFactoryPC, field_24, 0x24); + VALIDATE_OFFSET(grcTextureFactoryPC, renderTargets, 0x28); + VALIDATE_OFFSET(grcTextureFactoryPC, field_38, 0x38); + VALIDATE_OFFSET(grcTextureFactoryPC, field_3C, 0x3C); + VALIDATE_OFFSET(grcTextureFactoryPC, field_40, 0x40); + VALIDATE_OFFSET(grcTextureFactoryPC, field_44, 0x44); + VALIDATE_OFFSET(grcTextureFactoryPC, m_pDepthStencilSurface, 0x48); + VALIDATE_OFFSET(grcTextureFactoryPC, field_4C, 0x4C); + VALIDATE_OFFSET(grcTextureFactoryPC, field_50, 0x50); + VALIDATE_OFFSET(grcTextureFactoryPC, field_54, 0x54); + VALIDATE_OFFSET(grcTextureFactoryPC, field_58, 0x58); + VALIDATE_OFFSET(grcTextureFactoryPC, field_5C, 0x5C); + VALIDATE_OFFSET(grcTextureFactoryPC, field_60, 0x60); + VALIDATE_OFFSET(grcTextureFactoryPC, field_64, 0x64); + VALIDATE_OFFSET(grcTextureFactoryPC, field_68, 0x68); + VALIDATE_OFFSET(grcTextureFactoryPC, field_6C, 0x6C); + VALIDATE_OFFSET(grcTextureFactoryPC, field_70, 0x70); + VALIDATE_SIZE(grcTextureFactoryPC, 0x74); } - -VALIDATE_SIZE(rage::grcTextureFactoryPC, 0x74); diff --git a/plugin_IV/game_IV/rage/grcVertexBuffer.h b/plugin_IV/game_IV/rage/grcVertexBuffer.h index dade20be1..b43edd990 100644 --- a/plugin_IV/game_IV/rage/grcVertexBuffer.h +++ b/plugin_IV/game_IV/rage/grcVertexBuffer.h @@ -20,10 +20,20 @@ namespace rage { float s; float t; }; + VALIDATE_OFFSET(VTX, x, 0x0); + VALIDATE_OFFSET(VTX, y, 0x4); + VALIDATE_OFFSET(VTX, z, 0x8); + VALIDATE_OFFSET(VTX, nx, 0xC); + VALIDATE_OFFSET(VTX, ny, 0x10); + VALIDATE_OFFSET(VTX, nz, 0x14); + VALIDATE_OFFSET(VTX, c, 0x18); + VALIDATE_OFFSET(VTX, s, 0x1C); + VALIDATE_OFFSET(VTX, t, 0x20); + VALIDATE_SIZE(VTX, 0x24); class grcVertexBuffer { public: }; - + VALIDATE_SIZE(grcVertexBuffer, 0x1); } diff --git a/plugin_IV/game_IV/rage/grcViewport.h b/plugin_IV/game_IV/rage/grcViewport.h index 40fad48f6..3f51f0052 100644 --- a/plugin_IV/game_IV/rage/grcViewport.h +++ b/plugin_IV/game_IV/rage/grcViewport.h @@ -90,4 +90,72 @@ namespace rage { static void SetCurrent(const grcViewport* viewport, bool regenDevice); }; + VALIDATE_OFFSET(grcViewport, m_World44, 0x0); + VALIDATE_OFFSET(grcViewport, m_ModelView, 0x40); + VALIDATE_OFFSET(grcViewport, m_Composite, 0x80); + VALIDATE_OFFSET(grcViewport, m_Camera44, 0xC0); + VALIDATE_OFFSET(grcViewport, m_View, 0x100); + VALIDATE_OFFSET(grcViewport, m_ViewInverse, 0x140); + VALIDATE_OFFSET(grcViewport, m_Projection, 0x180); + VALIDATE_OFFSET(grcViewport, m_LocalLRTB, 0x1C0); + VALIDATE_OFFSET(grcViewport, m_OrthoLRTB, 0x200); + VALIDATE_OFFSET(grcViewport, m_Window, 0x240); + VALIDATE_OFFSET(grcViewport, m_UnclippedWindow, 0x258); + VALIDATE_OFFSET(grcViewport, m_LastWidth, 0x270); + VALIDATE_OFFSET(grcViewport, m_LastHeight, 0x274); + VALIDATE_OFFSET(grcViewport, m_FovY, 0x278); + VALIDATE_OFFSET(grcViewport, m_DesiredAspect, 0x27C); + VALIDATE_OFFSET(grcViewport, m_ZClipNear, 0x280); + VALIDATE_OFFSET(grcViewport, m_ZClipFar, 0x284); + VALIDATE_OFFSET(grcViewport, m_ShearX, 0x288); + VALIDATE_OFFSET(grcViewport, m_ShearY, 0x28C); + VALIDATE_OFFSET(grcViewport, m_ScaleX, 0x290); + VALIDATE_OFFSET(grcViewport, m_ScaleY, 0x294); + VALIDATE_OFFSET(grcViewport, m_TanVFOV, 0x298); + VALIDATE_OFFSET(grcViewport, m_TanHFOV, 0x29C); + VALIDATE_OFFSET(grcViewport, field_2E0, 0x2A0); + VALIDATE_OFFSET(grcViewport, m_IsPerspective, 0x2B0); + VALIDATE_OFFSET(grcViewport, gap_2f1, 0x2B1); + VALIDATE_OFFSET(grcViewport, field_2F4, 0x2B4); + VALIDATE_OFFSET(grcViewport, field_2F8, 0x2B8); + VALIDATE_OFFSET(grcViewport, field_2FC, 0x2BC); + VALIDATE_OFFSET(grcViewport, m_FrustumClipPlanes, 0x2C0); + VALIDATE_OFFSET(grcViewport, field_360, 0x320); + VALIDATE_OFFSET(grcViewport, field_364, 0x324); + VALIDATE_OFFSET(grcViewport, field_368, 0x328); + VALIDATE_OFFSET(grcViewport, field_36C, 0x32C); + VALIDATE_OFFSET(grcViewport, field_370, 0x330); + VALIDATE_OFFSET(grcViewport, field_374, 0x334); + VALIDATE_OFFSET(grcViewport, field_378, 0x338); + VALIDATE_OFFSET(grcViewport, field_37C, 0x33C); + VALIDATE_OFFSET(grcViewport, field_380, 0x340); + VALIDATE_OFFSET(grcViewport, field_384, 0x344); + VALIDATE_OFFSET(grcViewport, field_388, 0x348); + VALIDATE_OFFSET(grcViewport, field_38C, 0x34C); + VALIDATE_OFFSET(grcViewport, field_390, 0x350); + VALIDATE_OFFSET(grcViewport, field_394, 0x354); + VALIDATE_OFFSET(grcViewport, field_398, 0x358); + VALIDATE_OFFSET(grcViewport, field_39C, 0x35C); + VALIDATE_OFFSET(grcViewport, field_3A0, 0x360); + VALIDATE_OFFSET(grcViewport, field_3A4, 0x364); + VALIDATE_OFFSET(grcViewport, field_3A8, 0x368); + VALIDATE_OFFSET(grcViewport, field_3AC, 0x36C); + VALIDATE_OFFSET(grcViewport, field_3B0, 0x370); + VALIDATE_OFFSET(grcViewport, field_3B4, 0x374); + VALIDATE_OFFSET(grcViewport, field_3B8, 0x378); + VALIDATE_OFFSET(grcViewport, field_3BC, 0x37C); + VALIDATE_OFFSET(grcViewport, field_3C0, 0x380); + VALIDATE_OFFSET(grcViewport, field_3C4, 0x384); + VALIDATE_OFFSET(grcViewport, field_3C8, 0x388); + VALIDATE_OFFSET(grcViewport, field_3CC, 0x38C); + VALIDATE_OFFSET(grcViewport, field_3D0, 0x390); + VALIDATE_OFFSET(grcViewport, field_3D4, 0x394); + VALIDATE_OFFSET(grcViewport, field_3D8, 0x398); + VALIDATE_OFFSET(grcViewport, field_3DC, 0x39C); + VALIDATE_OFFSET(grcViewport, mInvertZInProjectionMatrix, 0x3A0); + VALIDATE_OFFSET(grcViewport, field_3E1, 0x3A1); + VALIDATE_OFFSET(grcViewport, field_3E4, 0x3A4); + VALIDATE_OFFSET(grcViewport, field_3E8, 0x3A8); + VALIDATE_OFFSET(grcViewport, field_3EC, 0x3AC); + VALIDATE_SIZE(grcViewport, 0x3B0); } diff --git a/plugin_IV/game_IV/rage/grcWindow.h b/plugin_IV/game_IV/rage/grcWindow.h index 9d02bad89..a1de1f7b8 100644 --- a/plugin_IV/game_IV/rage/grcWindow.h +++ b/plugin_IV/game_IV/rage/grcWindow.h @@ -21,4 +21,11 @@ namespace rage { static int32_t& m_Width; static int32_t& m_Height; }; + VALIDATE_OFFSET(grcWindow, m_NormX, 0x0); + VALIDATE_OFFSET(grcWindow, m_NormY, 0x4); + VALIDATE_OFFSET(grcWindow, m_NormWidth, 0x8); + VALIDATE_OFFSET(grcWindow, m_NormHeight, 0xC); + VALIDATE_OFFSET(grcWindow, m_MinZ, 0x10); + VALIDATE_OFFSET(grcWindow, m_MaxZ, 0x14); + VALIDATE_SIZE(grcWindow, 0x18); } diff --git a/plugin_IV/game_IV/rage/grmShader.h b/plugin_IV/game_IV/rage/grmShader.h index 8481c06b8..a6ae9c50b 100644 --- a/plugin_IV/game_IV/rage/grmShader.h +++ b/plugin_IV/game_IV/rage/grmShader.h @@ -12,4 +12,5 @@ namespace rage { public: }; + VALIDATE_SIZE(grmShader, 0x1); } \ No newline at end of file diff --git a/plugin_IV/game_IV/rage/grmShaderFactory.h b/plugin_IV/game_IV/rage/grmShaderFactory.h index d462ee4bc..b5be48147 100644 --- a/plugin_IV/game_IV/rage/grmShaderFactory.h +++ b/plugin_IV/game_IV/rage/grmShaderFactory.h @@ -21,10 +21,12 @@ namespace rage { return sm_Instance; } }; + VALIDATE_SIZE(grmShaderFactory, 0x4); class grmShaderFactoryStandard : public grmShaderFactory { public: grmShader* Create(const char* name, int32_t arg2, int32_t arg3) { return plugin::CallVirtualMethodAndReturn(this, name, arg2, arg3); } }; + VALIDATE_SIZE(grmShaderFactoryStandard, 0x4); } diff --git a/plugin_IV/game_IV/rage/ioKeyboard.h b/plugin_IV/game_IV/rage/ioKeyboard.h index dafc8e74c..e045406aa 100644 --- a/plugin_IV/game_IV/rage/ioKeyboard.h +++ b/plugin_IV/game_IV/rage/ioKeyboard.h @@ -15,4 +15,5 @@ namespace rage { static uint8_t* sm_CurrentState; static int32_t& sm_Active; }; + VALIDATE_SIZE(ioKeyboard, 0x1); } diff --git a/plugin_IV/game_IV/rage/ioMapper.h b/plugin_IV/game_IV/rage/ioMapper.h index 8b7b87619..e10016b42 100644 --- a/plugin_IV/game_IV/rage/ioMapper.h +++ b/plugin_IV/game_IV/rage/ioMapper.h @@ -14,6 +14,8 @@ namespace rage { int m_PadIndex; uint8_t field_3[1968]; }; - + VALIDATE_OFFSET(ioMapper, m_Count, 0x0); + VALIDATE_OFFSET(ioMapper, m_PadIndex, 0x4); + VALIDATE_OFFSET(ioMapper, field_3, 0x8); VALIDATE_SIZE(ioMapper, 0x7B8); } diff --git a/plugin_IV/game_IV/rage/ioMouse.h b/plugin_IV/game_IV/rage/ioMouse.h index 99849c603..0323d756a 100644 --- a/plugin_IV/game_IV/rage/ioMouse.h +++ b/plugin_IV/game_IV/rage/ioMouse.h @@ -20,4 +20,5 @@ namespace rage { static int32_t& m_Buttons; }; + VALIDATE_SIZE(ioMouse, 0x1); } diff --git a/plugin_IV/game_IV/rage/ioSource.h b/plugin_IV/game_IV/rage/ioSource.h index 82310538a..8d25f5d2d 100644 --- a/plugin_IV/game_IV/rage/ioSource.h +++ b/plugin_IV/game_IV/rage/ioSource.h @@ -15,6 +15,9 @@ namespace rage { uint8_t field_3; uint8_t field_4; }; - + VALIDATE_OFFSET(ioSource, field_1, 0x0); + VALIDATE_OFFSET(ioSource, m_DeviceIndex, 0x1); + VALIDATE_OFFSET(ioSource, field_3, 0x2); + VALIDATE_OFFSET(ioSource, field_4, 0x3); VALIDATE_SIZE(ioSource, 0x4); } diff --git a/plugin_IV/game_IV/rage/ioValue.h b/plugin_IV/game_IV/rage/ioValue.h index ee199ea62..4ccf94d87 100644 --- a/plugin_IV/game_IV/rage/ioValue.h +++ b/plugin_IV/game_IV/rage/ioValue.h @@ -199,8 +199,8 @@ namespace rage { INPUT_VEH_MOVE_RIGHT_2, }; - class ioValue { - public: + class ioValue { + public: uint8_t field_1[2]; uint8_t m_nNewState; uint8_t m_nOldState; @@ -213,7 +213,11 @@ namespace rage { public: bool IsPressed(); bool IsDown(); - }; - - VALIDATE_SIZE(ioValue, 0x10); + }; + VALIDATE_OFFSET(ioValue, field_1, 0x4); + VALIDATE_OFFSET(ioValue, m_nNewState, 0x6); + VALIDATE_OFFSET(ioValue, m_nOldState, 0x7); + VALIDATE_OFFSET(ioValue, m_nIndex, 0x8); + VALIDATE_OFFSET(ioValue, field_9, 0xC); + VALIDATE_SIZE(ioValue, 0x10); } diff --git a/plugin_IV/game_IV/rage/pgBase.h b/plugin_IV/game_IV/rage/pgBase.h index 27d774084..7fd87e537 100644 --- a/plugin_IV/game_IV/rage/pgBase.h +++ b/plugin_IV/game_IV/rage/pgBase.h @@ -15,6 +15,6 @@ namespace rage { public: pgPtr blockMap; }; - + VALIDATE_OFFSET(pgBase, blockMap, 0x4); VALIDATE_SIZE(pgBase, 0x8); } diff --git a/plugin_IV/game_IV/rage/pgStreamableBase.h b/plugin_IV/game_IV/rage/pgStreamableBase.h index 60176eb00..1615ffb4d 100644 --- a/plugin_IV/game_IV/rage/pgStreamableBase.h +++ b/plugin_IV/game_IV/rage/pgStreamableBase.h @@ -13,4 +13,5 @@ namespace rage { public: }; + VALIDATE_SIZE(pgStreamableBase, 0x4); } diff --git a/plugin_IV/game_IV/rage/phCollider.h b/plugin_IV/game_IV/rage/phCollider.h index 66bf5d490..ed7ccee00 100644 --- a/plugin_IV/game_IV/rage/phCollider.h +++ b/plugin_IV/game_IV/rage/phCollider.h @@ -17,4 +17,7 @@ namespace rage { public: virtual ~phCollider() {} }; + VALIDATE_OFFSET(phCollider, field_100, 0x4); + VALIDATE_OFFSET(phCollider, m_vVelocity, 0x110); + VALIDATE_SIZE(phCollider, 0x11C); } diff --git a/plugin_IV/game_IV/rage/phConstrainedCollider.h b/plugin_IV/game_IV/rage/phConstrainedCollider.h index b6a5fd13e..dadd2e66f 100644 --- a/plugin_IV/game_IV/rage/phConstrainedCollider.h +++ b/plugin_IV/game_IV/rage/phConstrainedCollider.h @@ -13,4 +13,5 @@ namespace rage { public: }; + VALIDATE_SIZE(phConstrainedCollider, 0x11C); } diff --git a/plugin_IV/game_IV/rage/phInst.h b/plugin_IV/game_IV/rage/phInst.h index 13d48d3d8..da9b5fb4d 100644 --- a/plugin_IV/game_IV/rage/phInst.h +++ b/plugin_IV/game_IV/rage/phInst.h @@ -18,4 +18,10 @@ namespace rage { int32_t field_C; Matrix44 field_10; }; + VALIDATE_OFFSET(phInst, field_4, 0x4); + VALIDATE_OFFSET(phInst, field_8, 0x8); + VALIDATE_OFFSET(phInst, field_A, 0xA); + VALIDATE_OFFSET(phInst, field_C, 0xC); + VALIDATE_OFFSET(phInst, field_10, 0x10); + VALIDATE_SIZE(phInst, 0x50); } diff --git a/plugin_IV/game_IV/rage/ptxRule.h b/plugin_IV/game_IV/rage/ptxRule.h index c7d3f8ca1..122ef4241 100644 --- a/plugin_IV/game_IV/rage/ptxRule.h +++ b/plugin_IV/game_IV/rage/ptxRule.h @@ -12,4 +12,5 @@ namespace rage { class ptxRule : atReferenceCounter { }; + VALIDATE_SIZE(ptxRule, 0x4); } diff --git a/plugin_IV/game_IV/rage/ptxSprite.h b/plugin_IV/game_IV/rage/ptxSprite.h index 9b07f3466..00f441030 100644 --- a/plugin_IV/game_IV/rage/ptxSprite.h +++ b/plugin_IV/game_IV/rage/ptxSprite.h @@ -12,4 +12,5 @@ namespace rage { class ptxSprite : ptxRule { }; + VALIDATE_SIZE(ptxSprite, 0x4); } diff --git a/plugin_IV/game_IV/rage/scrProgram.h b/plugin_IV/game_IV/rage/scrProgram.h index c9dc8239a..9b0e77165 100644 --- a/plugin_IV/game_IV/rage/scrProgram.h +++ b/plugin_IV/game_IV/rage/scrProgram.h @@ -21,4 +21,10 @@ namespace rage { public: int32_t Release(); }; + VALIDATE_OFFSET(scrProgram, field_1, 0x8); + VALIDATE_OFFSET(scrProgram, field_2, 0xC); + VALIDATE_OFFSET(scrProgram, field_3, 0x10); + VALIDATE_OFFSET(scrProgram, field_4, 0x14); + VALIDATE_OFFSET(scrProgram, RefCount, 0x18); + VALIDATE_SIZE(scrProgram, 0x1C); } diff --git a/plugin_IV/game_IV/rage/scrThread.h b/plugin_IV/game_IV/rage/scrThread.h index b57147da0..74add3ed8 100644 --- a/plugin_IV/game_IV/rage/scrThread.h +++ b/plugin_IV/game_IV/rage/scrThread.h @@ -110,6 +110,18 @@ namespace rage { static scrThread* GetThread(scrThreadId id); static void RegisterCommand(uint32_t hashCode, void (*handler)()); }; + VALIDATE_OFFSET(scrThread, vt, 0x0); + VALIDATE_OFFSET(scrThread, m_Serialized, 0x4); + VALIDATE_OFFSET(scrThread, m_Stack, 0x5C); + VALIDATE_OFFSET(scrThread, m_iInstructionCount, 0x60); + VALIDATE_OFFSET(scrThread, m_argStructSize, 0x64); + VALIDATE_OFFSET(scrThread, m_argStructOffset, 0x68); + VALIDATE_OFFSET(scrThread, m_AbortReason, 0x6C); + VALIDATE_OFFSET(scrThread, field_150, 0x70); + VALIDATE_OFFSET(scrThread, m_bSafeForNetworkGame, 0x95); + VALIDATE_OFFSET(scrThread, field_151, 0x96); + VALIDATE_OFFSET(scrThread, m_bMiniGameScript, 0x99); + VALIDATE_SIZE(scrThread, 0x9C); typedef void (*scrCmd)(scrThread::Info*); diff --git a/plugin_IV/game_IV/rage/sysMemAllocator.h b/plugin_IV/game_IV/rage/sysMemAllocator.h index 9a5b83ba9..e579cfb35 100644 --- a/plugin_IV/game_IV/rage/sysMemAllocator.h +++ b/plugin_IV/game_IV/rage/sysMemAllocator.h @@ -16,4 +16,5 @@ namespace rage { virtual void* Allocate(size_t size, size_t align, int subAllocator) { plugin::CallVirtualMethod<2>(this, size, align, subAllocator); } virtual void Free(void* pointer) { plugin::CallVirtualMethod<3>(this, pointer); } }; + VALIDATE_SIZE(sysMemAllocator, 0x4); } diff --git a/plugin_IV/game_IV/rage/sysUseAllocator.h b/plugin_IV/game_IV/rage/sysUseAllocator.h index bededd062..8915e5040 100644 --- a/plugin_IV/game_IV/rage/sysUseAllocator.h +++ b/plugin_IV/game_IV/rage/sysUseAllocator.h @@ -12,4 +12,6 @@ namespace rage { public: uint32_t* ptr; }; + VALIDATE_OFFSET(sysUseAllocator, ptr, 0x0); + VALIDATE_SIZE(sysUseAllocator, 0x4); } diff --git a/plugin_iii_unreal/game_iii_unreal/CRect.h b/plugin_iii_unreal/game_iii_unreal/CRect.h index 6f31128e3..d823240f4 100644 --- a/plugin_iii_unreal/game_iii_unreal/CRect.h +++ b/plugin_iii_unreal/game_iii_unreal/CRect.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft 3 Unreal) header file + Plugin-SDK (Grand Theft Auto 3 Unreal) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -83,3 +83,8 @@ class CRect { bottom += b; } }; +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); +VALIDATE_SIZE(CRect, 0x10); diff --git a/plugin_sa/game_sa/AnimAssociationData.h b/plugin_sa/game_sa/AnimAssociationData.h index 85e4cccd3..445bea695 100644 --- a/plugin_sa/game_sa/AnimAssociationData.h +++ b/plugin_sa/game_sa/AnimAssociationData.h @@ -27,5 +27,16 @@ class PLUGIN_API AnimAssociationData { short m_nAnimId; unsigned short m_nFlags; }; - +VALIDATE_OFFSET(AnimAssociationData, m_link, 0x0); +VALIDATE_OFFSET(AnimAssociationData, m_nNumBlendNodes, 0x8); +VALIDATE_OFFSET(AnimAssociationData, m_nAnimGroup, 0xA); +VALIDATE_OFFSET(AnimAssociationData, m_pNodeArray, 0xC); +VALIDATE_OFFSET(AnimAssociationData, m_pHierarchy, 0x10); +VALIDATE_OFFSET(AnimAssociationData, m_fBlendAmount, 0x14); +VALIDATE_OFFSET(AnimAssociationData, m_fBlendDelta, 0x18); +VALIDATE_OFFSET(AnimAssociationData, m_fCurrentTime, 0x1C); +VALIDATE_OFFSET(AnimAssociationData, m_fSpeed, 0x20); +VALIDATE_OFFSET(AnimAssociationData, fTimeStep, 0x24); +VALIDATE_OFFSET(AnimAssociationData, m_nAnimId, 0x28); +VALIDATE_OFFSET(AnimAssociationData, m_nFlags, 0x2A); VALIDATE_SIZE(AnimAssociationData, 0x2C); diff --git a/plugin_sa/game_sa/AnimBlendFrameData.h b/plugin_sa/game_sa/AnimBlendFrameData.h index e216aac87..8c98aef1d 100644 --- a/plugin_sa/game_sa/AnimBlendFrameData.h +++ b/plugin_sa/game_sa/AnimBlendFrameData.h @@ -16,5 +16,8 @@ class PLUGIN_API AnimBlendFrameData { class IFrame *m_pIFrame; unsigned int m_nNodeId; }; - +VALIDATE_OFFSET(AnimBlendFrameData, m_nFlags, 0x0); +VALIDATE_OFFSET(AnimBlendFrameData, m_vecOffset, 0x4); +VALIDATE_OFFSET(AnimBlendFrameData, m_pIFrame, 0x10); +VALIDATE_OFFSET(AnimBlendFrameData, m_nNodeId, 0x14); VALIDATE_SIZE(AnimBlendFrameData, 0x18); diff --git a/plugin_sa/game_sa/BreakManager_c.h b/plugin_sa/game_sa/BreakManager_c.h index 78e5b7b61..debd82850 100644 --- a/plugin_sa/game_sa/BreakManager_c.h +++ b/plugin_sa/game_sa/BreakManager_c.h @@ -8,27 +8,33 @@ #include "PluginBase.h" #include "RenderWare.h" -struct BreakInfo_t { +/*struct BreakInfo_t { // TODO: unused type, invalid member types, use consistent naming uint32_t version; uint16_t numVerts; - float* verts; - float* texCoords; - uint8_t* preLitCols; + RwV3d* verts; + RwTexCoords* texCoords; + RwRGBA* preLitCols; uint16_t numTris; - uint16_t* vtxIndices; + BreakInfoTriangle* vtxIndices; uint16_t* groupId; uint16_t numGroups; RwTexture** pTexture; - char* texNames[32]; - char* texMaskNames[32]; + char* m_pTextureNames; + char* texMaskNames; float* matCols; }; +VALIDATE_SIZE(BreakInfo_t, 0x34); +*/ struct BreakTri_t { RwV3d m_verts[3]; RwTexCoords m_texCoords[3]; RwRGBA m_col[3]; }; +VALIDATE_OFFSET(BreakTri_t, m_verts, 0x0); +VALIDATE_OFFSET(BreakTri_t, m_texCoords, 0x24); +VALIDATE_OFFSET(BreakTri_t, m_col, 0x3C); +VALIDATE_SIZE(BreakTri_t, 0x48); struct BreakGroup_t { RwMatrix m_mat; @@ -43,6 +49,18 @@ struct BreakGroup_t { RwV3d m_spinAxis; int32_t m_timer; }; +VALIDATE_OFFSET(BreakGroup_t, m_mat, 0x0); +VALIDATE_OFFSET(BreakGroup_t, m_vel, 0x40); +VALIDATE_OFFSET(BreakGroup_t, m_atRest, 0x4C); +VALIDATE_OFFSET(BreakGroup_t, m_numTris, 0x4E); +VALIDATE_OFFSET(BreakGroup_t, m_tris, 0x50); +VALIDATE_OFFSET(BreakGroup_t, m_pTexture, 0x54); +VALIDATE_OFFSET(BreakGroup_t, m_restAxisId, 0x58); +VALIDATE_OFFSET(BreakGroup_t, m_restHeight, 0x5C); +VALIDATE_OFFSET(BreakGroup_t, m_spinSpeed, 0x60); +VALIDATE_OFFSET(BreakGroup_t, m_spinAxis, 0x64); +VALIDATE_OFFSET(BreakGroup_t, m_timer, 0x70); +VALIDATE_SIZE(BreakGroup_t, 0x74); struct BreakObject_c { uint8_t m_smashed; @@ -55,6 +73,16 @@ struct BreakObject_c { float m_groundZ; RwV3d m_groundNormal; }; +VALIDATE_OFFSET(BreakObject_c, m_smashed, 0x0); +VALIDATE_OFFSET(BreakObject_c, m_active, 0x1); +VALIDATE_OFFSET(BreakObject_c, m_produceSparks, 0x2); +VALIDATE_OFFSET(BreakObject_c, m_drawLast, 0x3); +VALIDATE_OFFSET(BreakObject_c, m_numGroups, 0x4); +VALIDATE_OFFSET(BreakObject_c, m_groups, 0x8); +VALIDATE_OFFSET(BreakObject_c, m_age, 0xC); +VALIDATE_OFFSET(BreakObject_c, m_groundZ, 0x10); +VALIDATE_OFFSET(BreakObject_c, m_groundNormal, 0x14); +VALIDATE_SIZE(BreakObject_c, 0x20); class BreakManager_c { public: @@ -67,5 +95,7 @@ class BreakManager_c { void ResetAll(); void Update(float timeStep); }; +VALIDATE_OFFSET(BreakManager_c, m_breakObjects, 0x0); +VALIDATE_SIZE(BreakManager_c, 0x800); extern BreakManager_c& g_breakMan; diff --git a/plugin_sa/game_sa/C2dEffect.h b/plugin_sa/game_sa/C2dEffect.h index f5023fa15..c0b093076 100644 --- a/plugin_sa/game_sa/C2dEffect.h +++ b/plugin_sa/game_sa/C2dEffect.h @@ -58,10 +58,31 @@ struct tEffectLight { int field_38; int field_3C; }; +VALIDATE_OFFSET(tEffectLight, m_color, 0x0); +VALIDATE_OFFSET(tEffectLight, m_fCoronaFarClip, 0x4); +VALIDATE_OFFSET(tEffectLight, m_fPointlightRange, 0x8); +VALIDATE_OFFSET(tEffectLight, m_fCoronaSize, 0xC); +VALIDATE_OFFSET(tEffectLight, m_fShadowSize, 0x10); +VALIDATE_OFFSET(tEffectLight, m_nFlags, 0x14); +VALIDATE_OFFSET(tEffectLight, m_nCoronaFlashType, 0x16); +VALIDATE_OFFSET(tEffectLight, m_bCoronaEnableReflection, 0x17); +VALIDATE_OFFSET(tEffectLight, m_nCoronaFlareType, 0x18); +VALIDATE_OFFSET(tEffectLight, m_nShadowColorMultiplier, 0x19); +VALIDATE_OFFSET(tEffectLight, m_nShadowZDistance, 0x1A); +VALIDATE_OFFSET(tEffectLight, offsetX, 0x1B); +VALIDATE_OFFSET(tEffectLight, offsetY, 0x1C); +VALIDATE_OFFSET(tEffectLight, offsetZ, 0x1D); +VALIDATE_OFFSET(tEffectLight, m_pCoronaTex, 0x20); +VALIDATE_OFFSET(tEffectLight, m_pShadowTex, 0x24); +VALIDATE_OFFSET(tEffectLight, field_38, 0x28); +VALIDATE_OFFSET(tEffectLight, field_3C, 0x2C); +VALIDATE_SIZE(tEffectLight, 0x30); struct tEffectParticle { char m_szName[24]; }; +VALIDATE_OFFSET(tEffectParticle, m_szName, 0x0); +VALIDATE_SIZE(tEffectParticle, 0x18); struct tEffectPedAttractor { RwV3d m_vecQueueDir; @@ -73,6 +94,15 @@ struct tEffectPedAttractor { unsigned char m_nFlags; char m_szScriptName[8]; }; +VALIDATE_OFFSET(tEffectPedAttractor, m_vecQueueDir, 0x0); +VALIDATE_OFFSET(tEffectPedAttractor, m_vecUseDir, 0xC); +VALIDATE_OFFSET(tEffectPedAttractor, m_vecForwardDir, 0x18); +VALIDATE_OFFSET(tEffectPedAttractor, m_nAttractorType, 0x24); +VALIDATE_OFFSET(tEffectPedAttractor, m_nPedExistingProbability, 0x25); +VALIDATE_OFFSET(tEffectPedAttractor, field_36, 0x26); +VALIDATE_OFFSET(tEffectPedAttractor, m_nFlags, 0x27); +VALIDATE_OFFSET(tEffectPedAttractor, m_szScriptName, 0x28); +VALIDATE_SIZE(tEffectPedAttractor, 0x30); struct tEffectEnEx { float m_fEnterAngle; @@ -87,6 +117,18 @@ struct tEffectEnEx { unsigned char m_nTimeOff; unsigned char m_nFlags2; }; +VALIDATE_OFFSET(tEffectEnEx, m_fEnterAngle, 0x0); +VALIDATE_OFFSET(tEffectEnEx, m_vecSize, 0x4); +VALIDATE_OFFSET(tEffectEnEx, m_vecExitPosn, 0x10); +VALIDATE_OFFSET(tEffectEnEx, m_fExitAngle, 0x1C); +VALIDATE_OFFSET(tEffectEnEx, m_nInteriorId, 0x20); +VALIDATE_OFFSET(tEffectEnEx, m_nFlags1, 0x22); +VALIDATE_OFFSET(tEffectEnEx, m_nSkyColor, 0x23); +VALIDATE_OFFSET(tEffectEnEx, m_szInteriorName, 0x24); +VALIDATE_OFFSET(tEffectEnEx, m_nTimeOn, 0x2C); +VALIDATE_OFFSET(tEffectEnEx, m_nTimeOff, 0x2D); +VALIDATE_OFFSET(tEffectEnEx, m_nFlags2, 0x2E); +VALIDATE_SIZE(tEffectEnEx, 0x30); struct tEffectRoadsign { RwV2d m_vecSize; @@ -98,6 +140,12 @@ struct tEffectRoadsign { char *m_pText; RpAtomic *m_pAtomic; }; +VALIDATE_OFFSET(tEffectRoadsign, m_vecSize, 0x0); +VALIDATE_OFFSET(tEffectRoadsign, m_afRotation, 0x8); +VALIDATE_OFFSET(tEffectRoadsign, m_nFlags, 0x14); +VALIDATE_OFFSET(tEffectRoadsign, m_pText, 0x18); +VALIDATE_OFFSET(tEffectRoadsign, m_pAtomic, 0x1C); +VALIDATE_SIZE(tEffectRoadsign, 0x20); struct tEffectCoverPoint { RwV2d m_vecDirection; @@ -106,6 +154,9 @@ struct tEffectCoverPoint { char _pad19[3]; public: }; +VALIDATE_OFFSET(tEffectCoverPoint, m_vecDirection, 0x0); +VALIDATE_OFFSET(tEffectCoverPoint, m_nType, 0x8); +VALIDATE_SIZE(tEffectCoverPoint, 0xC); struct tEffectEscalator { RwV3d m_vecBottom; @@ -116,6 +167,11 @@ struct tEffectEscalator { char _pad35[3]; public: }; +VALIDATE_OFFSET(tEffectEscalator, m_vecBottom, 0x0); +VALIDATE_OFFSET(tEffectEscalator, m_vecTop, 0xC); +VALIDATE_OFFSET(tEffectEscalator, m_vecEnd, 0x18); +VALIDATE_OFFSET(tEffectEscalator, m_nDirection, 0x24); +VALIDATE_SIZE(tEffectEscalator, 0x28); class PLUGIN_API C2dEffect { public: @@ -132,5 +188,13 @@ class PLUGIN_API C2dEffect { tEffectEscalator escalator; }; }; - +VALIDATE_OFFSET(C2dEffect, m_vecPosn, 0x0); +VALIDATE_OFFSET(C2dEffect, m_nType, 0xC); +VALIDATE_OFFSET(C2dEffect, light, 0x10); +VALIDATE_OFFSET(C2dEffect, particle, 0x10); +VALIDATE_OFFSET(C2dEffect, pedAttractor, 0x10); +VALIDATE_OFFSET(C2dEffect, enEx, 0x10); +VALIDATE_OFFSET(C2dEffect, roadsign, 0x10); +VALIDATE_OFFSET(C2dEffect, coverPoint, 0x10); +VALIDATE_OFFSET(C2dEffect, escalator, 0x10); VALIDATE_SIZE(C2dEffect, 0x40); diff --git a/plugin_sa/game_sa/C3dMarker.h b/plugin_sa/game_sa/C3dMarker.h index 3d112cf41..40daeb911 100644 --- a/plugin_sa/game_sa/C3dMarker.h +++ b/plugin_sa/game_sa/C3dMarker.h @@ -54,5 +54,27 @@ class PLUGIN_API C3dMarker { void SetZCoordinateIfNotUpToDate(float coordinate); void UpdateZCoordinate(CVector arg0, float arg1); }; - +VALIDATE_OFFSET(C3dMarker, m_mat, 0x0); +VALIDATE_OFFSET(C3dMarker, m_pAtomic, 0x48); +VALIDATE_OFFSET(C3dMarker, m_pMaterial, 0x4C); +VALIDATE_OFFSET(C3dMarker, m_nType, 0x50); +VALIDATE_OFFSET(C3dMarker, m_bIsUsed, 0x52); +VALIDATE_OFFSET(C3dMarker, m_bMustBeRenderedThisFrame, 0x53); +VALIDATE_OFFSET(C3dMarker, m_nIdentifier, 0x54); +VALIDATE_OFFSET(C3dMarker, m_colour, 0x58); +VALIDATE_OFFSET(C3dMarker, m_nPulsePeriod, 0x5C); +VALIDATE_OFFSET(C3dMarker, m_nRotateRate, 0x5E); +VALIDATE_OFFSET(C3dMarker, m_nStartTime, 0x60); +VALIDATE_OFFSET(C3dMarker, m_fPulseFraction, 0x64); +VALIDATE_OFFSET(C3dMarker, m_fStdSize, 0x68); +VALIDATE_OFFSET(C3dMarker, m_fSize, 0x6C); +VALIDATE_OFFSET(C3dMarker, m_fBrightness, 0x70); +VALIDATE_OFFSET(C3dMarker, m_fCameraRange, 0x74); +VALIDATE_OFFSET(C3dMarker, m_vecNormal, 0x78); +VALIDATE_OFFSET(C3dMarker, m_nLastMapReadX, 0x84); +VALIDATE_OFFSET(C3dMarker, m_nLastMapReadY, 0x86); +VALIDATE_OFFSET(C3dMarker, m_fLastMapReadResultZ, 0x88); +VALIDATE_OFFSET(C3dMarker, m_fRoofHeight, 0x8C); +VALIDATE_OFFSET(C3dMarker, m_vecLastPosition, 0x90); +VALIDATE_OFFSET(C3dMarker, m_nOnScreenTestTime, 0x9C); VALIDATE_SIZE(C3dMarker, 0xA0); diff --git a/plugin_sa/game_sa/C3dMarkers.h b/plugin_sa/game_sa/C3dMarkers.h index fdbcb781e..5abf607d6 100644 --- a/plugin_sa/game_sa/C3dMarkers.h +++ b/plugin_sa/game_sa/C3dMarkers.h @@ -18,7 +18,11 @@ struct tUser3dMarker { unsigned int m_nGreen; unsigned int m_nBlue; }; - +VALIDATE_OFFSET(tUser3dMarker, m_bIsUsed, 0x0); +VALIDATE_OFFSET(tUser3dMarker, m_vecPosition, 0x4); +VALIDATE_OFFSET(tUser3dMarker, m_nRed, 0x10); +VALIDATE_OFFSET(tUser3dMarker, m_nGreen, 0x14); +VALIDATE_OFFSET(tUser3dMarker, m_nBlue, 0x18); VALIDATE_SIZE(tUser3dMarker, 0x1C); struct tDirectionArrow { @@ -34,7 +38,14 @@ struct tDirectionArrow { unsigned int m_nBlue; unsigned int m_nAlpha; }; - +VALIDATE_OFFSET(tDirectionArrow, m_bIsUsed, 0x0); +VALIDATE_OFFSET(tDirectionArrow, m_vecPosition, 0x4); +VALIDATE_OFFSET(tDirectionArrow, m_fSize, 0x10); +VALIDATE_OFFSET(tDirectionArrow, m_vecDirection, 0x14); +VALIDATE_OFFSET(tDirectionArrow, m_nRed, 0x20); +VALIDATE_OFFSET(tDirectionArrow, m_nGreen, 0x24); +VALIDATE_OFFSET(tDirectionArrow, m_nBlue, 0x28); +VALIDATE_OFFSET(tDirectionArrow, m_nAlpha, 0x2C); VALIDATE_SIZE(tDirectionArrow, 0x30); extern unsigned int MAX_NUM_3DMARKERS; // default 32 @@ -81,6 +92,7 @@ class PLUGIN_API C3dMarkers { static int User3dMarkerSet(float x, float y, float z, int colour); static void User3dMarkersDraw(); }; +VALIDATE_SIZE(C3dMarkers, 0x1); // 'data' is a pointer to store atomic (RpAtomic **) RpAtomic* MarkerAtomicCB(RpAtomic* atomic, void* data); diff --git a/plugin_sa/game_sa/CAEAudioChannel.h b/plugin_sa/game_sa/CAEAudioChannel.h index 92377d0f7..c1efd6a4f 100644 --- a/plugin_sa/game_sa/CAEAudioChannel.h +++ b/plugin_sa/game_sa/CAEAudioChannel.h @@ -36,5 +36,30 @@ class PLUGIN_API CAEAudioChannel { char field_59[3]; unsigned long m_nBufferStatus; }; - +VALIDATE_OFFSET(CAEAudioChannel, vtable, 0x0); +VALIDATE_OFFSET(CAEAudioChannel, m_pDirectSound, 0x4); +VALIDATE_OFFSET(CAEAudioChannel, m_pDirectSoundBuffer, 0x8); +VALIDATE_OFFSET(CAEAudioChannel, m_pDirectSound3DBuffer, 0xC); +VALIDATE_OFFSET(CAEAudioChannel, gap10, 0x10); +VALIDATE_OFFSET(CAEAudioChannel, m_nFlags, 0x28); +VALIDATE_OFFSET(CAEAudioChannel, m_nLengthInBytes, 0x2C); +VALIDATE_OFFSET(CAEAudioChannel, field_30, 0x30); +VALIDATE_OFFSET(CAEAudioChannel, m_fVolume, 0x34); +VALIDATE_OFFSET(CAEAudioChannel, field_38, 0x38); +VALIDATE_OFFSET(CAEAudioChannel, field_39, 0x39); +VALIDATE_OFFSET(CAEAudioChannel, field_3A, 0x3A); +VALIDATE_OFFSET(CAEAudioChannel, m_nFrequency, 0x3C); +VALIDATE_OFFSET(CAEAudioChannel, m_nOriginalFrequency, 0x40); +VALIDATE_OFFSET(CAEAudioChannel, m_bLooped, 0x44); +VALIDATE_OFFSET(CAEAudioChannel, field_45, 0x45); +VALIDATE_OFFSET(CAEAudioChannel, field_46, 0x46); +VALIDATE_OFFSET(CAEAudioChannel, field_47, 0x48); +VALIDATE_OFFSET(CAEAudioChannel, field_49, 0x4A); +VALIDATE_OFFSET(CAEAudioChannel, field_4B, 0x4C); +VALIDATE_OFFSET(CAEAudioChannel, field_4F, 0x50); +VALIDATE_OFFSET(CAEAudioChannel, field_53, 0x54); +VALIDATE_OFFSET(CAEAudioChannel, m_nBitsPerSample, 0x56); +VALIDATE_OFFSET(CAEAudioChannel, field_57, 0x57); +VALIDATE_OFFSET(CAEAudioChannel, field_59, 0x58); +VALIDATE_OFFSET(CAEAudioChannel, m_nBufferStatus, 0x5C); VALIDATE_SIZE(CAEAudioChannel, 0x60); diff --git a/plugin_sa/game_sa/CAEAudioEntity.h b/plugin_sa/game_sa/CAEAudioEntity.h index 7b654caee..ff92c4f02 100644 --- a/plugin_sa/game_sa/CAEAudioEntity.h +++ b/plugin_sa/game_sa/CAEAudioEntity.h @@ -21,5 +21,6 @@ class PLUGIN_API CAEAudioEntity { // vtable void UpdateParameters(CAESound *sound, short arg2); }; - +VALIDATE_OFFSET(CAEAudioEntity, m_pEntity, 0x4); +VALIDATE_OFFSET(CAEAudioEntity, m_tempSound, 0x8); VALIDATE_SIZE(CAEAudioEntity, 0x7C); diff --git a/plugin_sa/game_sa/CAEAudioHardware.h b/plugin_sa/game_sa/CAEAudioHardware.h index b188d2f0b..50c90b71f 100644 --- a/plugin_sa/game_sa/CAEAudioHardware.h +++ b/plugin_sa/game_sa/CAEAudioHardware.h @@ -64,7 +64,53 @@ class PLUGIN_API CAEAudioHardware { public: int GetActiveTrackID(); }; - +VALIDATE_OFFSET(CAEAudioHardware, field_0, 0x0); +VALIDATE_OFFSET(CAEAudioHardware, m_bDisableEffectsLoading, 0x1); +VALIDATE_OFFSET(CAEAudioHardware, field_2, 0x2); +VALIDATE_OFFSET(CAEAudioHardware, field_3, 0x3); +VALIDATE_OFFSET(CAEAudioHardware, field_4, 0x4); +VALIDATE_OFFSET(CAEAudioHardware, m_nReverbEnvironment, 0x5); +VALIDATE_OFFSET(CAEAudioHardware, m_awChannelFlags, 0x6); +VALIDATE_OFFSET(CAEAudioHardware, field_86, 0x86); +VALIDATE_OFFSET(CAEAudioHardware, m_nReverbDepth, 0x88); +VALIDATE_OFFSET(CAEAudioHardware, m_wNumAvailableChannels, 0x8C); +VALIDATE_OFFSET(CAEAudioHardware, m_nNumChannels, 0x8E); +VALIDATE_OFFSET(CAEAudioHardware, m_anNumSoundsInSlot, 0x90); +VALIDATE_OFFSET(CAEAudioHardware, m_afChannelVolumes, 0x110); +VALIDATE_OFFSET(CAEAudioHardware, field_210, 0x210); +VALIDATE_OFFSET(CAEAudioHardware, m_afChannelsFrqScalingFactor, 0x310); +VALIDATE_OFFSET(CAEAudioHardware, m_fMusicMasterScalingFactor, 0x410); +VALIDATE_OFFSET(CAEAudioHardware, m_fEffectMasterScalingFactor, 0x414); +VALIDATE_OFFSET(CAEAudioHardware, m_fMusicFaderScalingFactor, 0x418); +VALIDATE_OFFSET(CAEAudioHardware, m_fEffectsFaderScalingFactor, 0x41C); +VALIDATE_OFFSET(CAEAudioHardware, m_fStreamFaderScalingFactor, 0x420); +VALIDATE_OFFSET(CAEAudioHardware, m_fNonStreamFaderScalingFactor, 0x424); +VALIDATE_OFFSET(CAEAudioHardware, field_428, 0x428); +VALIDATE_OFFSET(CAEAudioHardware, field_42C, 0x42C); +VALIDATE_OFFSET(CAEAudioHardware, m_aBankSlotIds, 0x430); +VALIDATE_OFFSET(CAEAudioHardware, m_aSoundTypes, 0x688); +VALIDATE_OFFSET(CAEAudioHardware, m_anVirtualChannelSoundLoopStartTimes, 0x8E0); +VALIDATE_OFFSET(CAEAudioHardware, m_anVirtualChannelSoundLengths, 0xB38); +VALIDATE_OFFSET(CAEAudioHardware, m_nBassSet, 0xD90); +VALIDATE_OFFSET(CAEAudioHardware, __pad1__, 0xD91); +VALIDATE_OFFSET(CAEAudioHardware, m_fBassEqGain, 0xD94); +VALIDATE_OFFSET(CAEAudioHardware, m_pMP3BankLoader, 0xD98); +VALIDATE_OFFSET(CAEAudioHardware, m_pMP3TrackLoader, 0xD9C); +VALIDATE_OFFSET(CAEAudioHardware, m_pDirectSound, 0xDA0); +VALIDATE_OFFSET(CAEAudioHardware, m_nSpeakerConfig, 0xDA4); +VALIDATE_OFFSET(CAEAudioHardware, m_n3dEffectsQueryResult, 0xDA8); +VALIDATE_OFFSET(CAEAudioHardware, m_dsCaps, 0xDAC); +VALIDATE_OFFSET(CAEAudioHardware, gap, 0xDB0); +VALIDATE_OFFSET(CAEAudioHardware, m_pDirectSound3dListener, 0xE0C); +VALIDATE_OFFSET(CAEAudioHardware, m_pStreamingChannel, 0xE10); +VALIDATE_OFFSET(CAEAudioHardware, m_streamThread, 0xE14); +VALIDATE_OFFSET(CAEAudioHardware, m_aChannels, 0xE64); +VALIDATE_OFFSET(CAEAudioHardware, field_F64, 0xF64); +VALIDATE_OFFSET(CAEAudioHardware, field_1004, 0x1004); +VALIDATE_OFFSET(CAEAudioHardware, field_1008, 0x1008); +VALIDATE_OFFSET(CAEAudioHardware, field_100C, 0x100C); +VALIDATE_OFFSET(CAEAudioHardware, field_1010, 0x1010); +VALIDATE_OFFSET(CAEAudioHardware, field_1014, 0x1014); VALIDATE_SIZE(CAEAudioHardware, 0x1018); extern CAEAudioHardware& AEAudioHardware; \ No newline at end of file diff --git a/plugin_sa/game_sa/CAECollisionAudioEntity.h b/plugin_sa/game_sa/CAECollisionAudioEntity.h index 4ea857f7c..ac72774f9 100644 --- a/plugin_sa/game_sa/CAECollisionAudioEntity.h +++ b/plugin_sa/game_sa/CAECollisionAudioEntity.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEAudioEntity.h" @@ -16,7 +15,11 @@ struct tCollisionAudioEntry { int field_C; int field_10; }; - +VALIDATE_OFFSET(tCollisionAudioEntry, field_0, 0x0); +VALIDATE_OFFSET(tCollisionAudioEntry, field_4, 0x4); +VALIDATE_OFFSET(tCollisionAudioEntry, field_8, 0x8); +VALIDATE_OFFSET(tCollisionAudioEntry, field_C, 0xC); +VALIDATE_OFFSET(tCollisionAudioEntry, field_10, 0x10); VALIDATE_SIZE(tCollisionAudioEntry, 0x14); class PLUGIN_API CAECollisionAudioEntity { @@ -28,5 +31,10 @@ class PLUGIN_API CAECollisionAudioEntity { DWORD field_204; tCollisionAudioEntry field_208[300]; }; - +VALIDATE_OFFSET(CAECollisionAudioEntity, audio, 0x0); +VALIDATE_OFFSET(CAECollisionAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAECollisionAudioEntity, field_200, 0x200); +VALIDATE_OFFSET(CAECollisionAudioEntity, field_202, 0x202); +VALIDATE_OFFSET(CAECollisionAudioEntity, field_204, 0x204); +VALIDATE_OFFSET(CAECollisionAudioEntity, field_208, 0x208); VALIDATE_SIZE(CAECollisionAudioEntity, 0x1978); diff --git a/plugin_sa/game_sa/CAECutsceneTrackManager.h b/plugin_sa/game_sa/CAECutsceneTrackManager.h index 6e12952be..42819d80c 100644 --- a/plugin_sa/game_sa/CAECutsceneTrackManager.h +++ b/plugin_sa/game_sa/CAECutsceneTrackManager.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" @@ -22,7 +21,8 @@ class PLUGIN_API CAECutsceneTrackManager { bool IsCutsceneTrackActive(); char GetCutsceneTrackStatus(); }; - +VALIDATE_OFFSET(CAECutsceneTrackManager, gap0, 0x0); +VALIDATE_OFFSET(CAECutsceneTrackManager, m_nStatus, 0x8); VALIDATE_SIZE(CAECutsceneTrackManager, 0xC); extern CAECutsceneTrackManager& AECutsceneTrackManager; diff --git a/plugin_sa/game_sa/CAEDoorAudioEntity.h b/plugin_sa/game_sa/CAEDoorAudioEntity.h index 46aa848d4..2325adca4 100644 --- a/plugin_sa/game_sa/CAEDoorAudioEntity.h +++ b/plugin_sa/game_sa/CAEDoorAudioEntity.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEAudioEntity.h" @@ -16,5 +15,8 @@ class PLUGIN_API CAEDoorAudioEntity { unsigned long field_80; unsigned long field_84; }; - +VALIDATE_OFFSET(CAEDoorAudioEntity, audio, 0x0); +VALIDATE_OFFSET(CAEDoorAudioEntity, m_nTime, 0x7C); +VALIDATE_OFFSET(CAEDoorAudioEntity, field_80, 0x80); +VALIDATE_OFFSET(CAEDoorAudioEntity, field_84, 0x84); VALIDATE_SIZE(CAEDoorAudioEntity, 0x88); diff --git a/plugin_sa/game_sa/CAEExplosionAudioEntity.h b/plugin_sa/game_sa/CAEExplosionAudioEntity.h index 20b3bffdb..6e34458d3 100644 --- a/plugin_sa/game_sa/CAEExplosionAudioEntity.h +++ b/plugin_sa/game_sa/CAEExplosionAudioEntity.h @@ -16,5 +16,5 @@ class PLUGIN_API CAEExplosionAudioEntity : public CAEAudioEntity { char _pad7D[3]; public: }; - +VALIDATE_OFFSET(CAEExplosionAudioEntity, field_7C, 0x7C); VALIDATE_SIZE(CAEExplosionAudioEntity, 0x80); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAEFireAudioEntity.h b/plugin_sa/game_sa/CAEFireAudioEntity.h index b1d40eb39..bccb5f92e 100644 --- a/plugin_sa/game_sa/CAEFireAudioEntity.h +++ b/plugin_sa/game_sa/CAEFireAudioEntity.h @@ -15,5 +15,7 @@ class CAEFireAudioEntity : public CAEAudioEntity { CAESound *field_80; class FxSystem_c *field_84; }; - +VALIDATE_OFFSET(CAEFireAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAEFireAudioEntity, field_80, 0x80); +VALIDATE_OFFSET(CAEFireAudioEntity, field_84, 0x84); VALIDATE_SIZE(CAEFireAudioEntity, 0x88); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAEFrontendAudioEntity.h b/plugin_sa/game_sa/CAEFrontendAudioEntity.h index 503a175f8..37e83b490 100644 --- a/plugin_sa/game_sa/CAEFrontendAudioEntity.h +++ b/plugin_sa/game_sa/CAEFrontendAudioEntity.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEAudioEntity.h" @@ -24,5 +23,16 @@ class PLUGIN_API CAEFrontendAudioEntity { unsigned long dword94; unsigned long dword98; }; - +VALIDATE_OFFSET(CAEFrontendAudioEntity, audio, 0x0); +VALIDATE_OFFSET(CAEFrontendAudioEntity, byte7C, 0x7C); +VALIDATE_OFFSET(CAEFrontendAudioEntity, byte7D, 0x7D); +VALIDATE_OFFSET(CAEFrontendAudioEntity, f7E, 0x7E); +VALIDATE_OFFSET(CAEFrontendAudioEntity, m_nNumBulletSounds, 0x80); +VALIDATE_OFFSET(CAEFrontendAudioEntity, bankId, 0x82); +VALIDATE_OFFSET(CAEFrontendAudioEntity, m_dwLastFrameGeneral, 0x84); +VALIDATE_OFFSET(CAEFrontendAudioEntity, m_dwLastFrameMissionComplete, 0x88); +VALIDATE_OFFSET(CAEFrontendAudioEntity, m_dwLastFrameBulletPass, 0x8C); +VALIDATE_OFFSET(CAEFrontendAudioEntity, m_dwLastTimeCarRespray, 0x90); +VALIDATE_OFFSET(CAEFrontendAudioEntity, dword94, 0x94); +VALIDATE_OFFSET(CAEFrontendAudioEntity, dword98, 0x98); VALIDATE_SIZE(CAEFrontendAudioEntity, 0x9C); diff --git a/plugin_sa/game_sa/CAEMP3BankLoader.h b/plugin_sa/game_sa/CAEMP3BankLoader.h index 010248d17..b2f0e81bd 100644 --- a/plugin_sa/game_sa/CAEMP3BankLoader.h +++ b/plugin_sa/game_sa/CAEMP3BankLoader.h @@ -14,7 +14,10 @@ class PLUGIN_API CBankHeader { int field_4; int m_nSoundHeadroom; }; - +VALIDATE_OFFSET(CBankHeader, m_nOffset, 0x0); +VALIDATE_OFFSET(CBankHeader, field_2, 0x2); +VALIDATE_OFFSET(CBankHeader, field_4, 0x4); +VALIDATE_OFFSET(CBankHeader, m_nSoundHeadroom, 0x8); VALIDATE_SIZE(CBankHeader, 0xC); class PLUGIN_API CBankSlotInfo { @@ -27,7 +30,13 @@ class PLUGIN_API CBankSlotInfo { short m_nNumSoundInfo; CBankHeader m_aSoundsHeader[400]; }; - +VALIDATE_OFFSET(CBankSlotInfo, m_nOffset, 0x0); +VALIDATE_OFFSET(CBankSlotInfo, m_nLength, 0x4); +VALIDATE_OFFSET(CBankSlotInfo, field_8, 0x8); +VALIDATE_OFFSET(CBankSlotInfo, field_C, 0xC); +VALIDATE_OFFSET(CBankSlotInfo, m_nBankId, 0x10); +VALIDATE_OFFSET(CBankSlotInfo, m_nNumSoundInfo, 0x12); +VALIDATE_OFFSET(CBankSlotInfo, m_aSoundsHeader, 0x14); VALIDATE_SIZE(CBankSlotInfo, 0x12D4); class PLUGIN_API CBankLkup { @@ -37,14 +46,17 @@ class PLUGIN_API CBankLkup { int m_nOffset; int m_nLength; }; - +VALIDATE_OFFSET(CBankLkup, m_nPakFileNumber, 0x0); +VALIDATE_OFFSET(CBankLkup, __pad0, 0x1); +VALIDATE_OFFSET(CBankLkup, m_nOffset, 0x4); +VALIDATE_OFFSET(CBankLkup, m_nLength, 0x8); VALIDATE_SIZE(CBankLkup, 0xC); class PLUGIN_API CBankSlotsInfos { public: CBankSlotInfo m_aInfos[45]; }; - +VALIDATE_OFFSET(CBankSlotsInfos, m_aInfos, 0x0); VALIDATE_SIZE(CBankSlotsInfos, 0x34F44); class PLUGIN_API CBankSlotBankAssignment { @@ -61,7 +73,17 @@ class PLUGIN_API CBankSlotBankAssignment { char m_nPakFileNumber; char __pad; }; - +VALIDATE_OFFSET(CBankSlotBankAssignment, m_pBankSlotInfo, 0x0); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nBankOffset, 0x4); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nBankLength, 0x8); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_pStreamOffset, 0xC); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_pStreamBuffer, 0x10); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_dwState, 0x14); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nBankId, 0x18); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nBankSlotId, 0x1A); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nNumSounds, 0x1C); +VALIDATE_OFFSET(CBankSlotBankAssignment, m_nPakFileNumber, 0x1E); +VALIDATE_OFFSET(CBankSlotBankAssignment, __pad, 0x1F); VALIDATE_SIZE(CBankSlotBankAssignment, 0x20); class PLUGIN_API CAEMP3BankLoader { @@ -85,5 +107,22 @@ class PLUGIN_API CAEMP3BankLoader { unsigned short m_nStreamNum; short m_nCurrentSfxInBankSlot[60]; }; - +VALIDATE_OFFSET(CAEMP3BankLoader, m_pBankSlotsInfos, 0x0); +VALIDATE_OFFSET(CAEMP3BankLoader, m_pBankLkups, 0x4); +VALIDATE_OFFSET(CAEMP3BankLoader, m_pPakFileName, 0x8); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nNumBankSlotsInfos, 0xC); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nNumBankLkup, 0xE); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nNumPakFiles, 0x10); +VALIDATE_OFFSET(CAEMP3BankLoader, __pad1, 0x12); +VALIDATE_OFFSET(CAEMP3BankLoader, m_bAudioFileInfoInitialized, 0x14); +VALIDATE_OFFSET(CAEMP3BankLoader, __pad2, 0x15); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nBankSlotsSize, 0x18); +VALIDATE_OFFSET(CAEMP3BankLoader, m_pBankSlots, 0x1C); +VALIDATE_OFFSET(CAEMP3BankLoader, m_pPakFilesStreamHandles, 0x20); +VALIDATE_OFFSET(CAEMP3BankLoader, m_aBankSlotBankAssignment, 0x24); +VALIDATE_OFFSET(CAEMP3BankLoader, field_664, 0x664); +VALIDATE_OFFSET(CAEMP3BankLoader, field_666, 0x666); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nNumBanksAssigned, 0x668); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nStreamNum, 0x66A); +VALIDATE_OFFSET(CAEMP3BankLoader, m_nCurrentSfxInBankSlot, 0x66C); VALIDATE_SIZE(CAEMP3BankLoader, 0x6E4); diff --git a/plugin_sa/game_sa/CAEPedAudioEntity.h b/plugin_sa/game_sa/CAEPedAudioEntity.h index eb00d35d5..37e33634b 100644 --- a/plugin_sa/game_sa/CAEPedAudioEntity.h +++ b/plugin_sa/game_sa/CAEPedAudioEntity.h @@ -33,5 +33,21 @@ class PLUGIN_API CAEPedAudioEntity : public CAEAudioEntity { float field_154; float field_158; }; - +VALIDATE_OFFSET(CAEPedAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAEPedAudioEntity, field_7D, 0x7D); +VALIDATE_OFFSET(CAEPedAudioEntity, field_7E, 0x7E); +VALIDATE_OFFSET(CAEPedAudioEntity, field_80, 0x80); +VALIDATE_OFFSET(CAEPedAudioEntity, field_84, 0x84); +VALIDATE_OFFSET(CAEPedAudioEntity, field_88, 0x88); +VALIDATE_OFFSET(CAEPedAudioEntity, field_8C, 0x8C); +VALIDATE_OFFSET(CAEPedAudioEntity, m_pPed, 0x94); +VALIDATE_OFFSET(CAEPedAudioEntity, field_98, 0x98); +VALIDATE_OFFSET(CAEPedAudioEntity, field_99, 0x99); +VALIDATE_OFFSET(CAEPedAudioEntity, field_9C, 0x9C); +VALIDATE_OFFSET(CAEPedAudioEntity, field_A0, 0xA0); +VALIDATE_OFFSET(CAEPedAudioEntity, field_A4, 0xA4); +VALIDATE_OFFSET(CAEPedAudioEntity, TwinLoopSoundEntity, 0xA8); +VALIDATE_OFFSET(CAEPedAudioEntity, field_150, 0x150); +VALIDATE_OFFSET(CAEPedAudioEntity, field_154, 0x154); +VALIDATE_OFFSET(CAEPedAudioEntity, field_158, 0x158); VALIDATE_SIZE(CAEPedAudioEntity, 0x15C); diff --git a/plugin_sa/game_sa/CAEPedSpeechAudioEntity.h b/plugin_sa/game_sa/CAEPedSpeechAudioEntity.h index 6059ccf1f..cbee8b8bb 100644 --- a/plugin_sa/game_sa/CAEPedSpeechAudioEntity.h +++ b/plugin_sa/game_sa/CAEPedSpeechAudioEntity.h @@ -49,5 +49,27 @@ class CAEPedSpeechAudioEntity : public CAEAudioEntity { void Initialise(CPed* ped); }; - +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_90, 0x90); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_91, 0x91); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_nVoiceType, 0x92); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_nVoiceID, 0x94); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_nVoiceGender, 0x96); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_98, 0x98); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_bEnableVocalType, 0x99); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_bMuted, 0x9A); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_nVocalEnableFlag, 0x9B); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_9C, 0x9C); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_9D, 0x9D); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_9E, 0x9E); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_9F, 0x9F); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_pSound, 0xA0); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_A4, 0xA4); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_A6, 0xA6); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_A8, 0xA8); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_AA, 0xAA); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_fVoiceVolume, 0xAC); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, m_nCurrentPhraseId, 0xB0); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_B2, 0xB2); +VALIDATE_OFFSET(CAEPedSpeechAudioEntity, field_B4, 0xB4); VALIDATE_SIZE(CAEPedSpeechAudioEntity, 0x100); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAEPedlessSpeechAudioEntity.h b/plugin_sa/game_sa/CAEPedlessSpeechAudioEntity.h index 9a21b283c..7d8d34a1c 100644 --- a/plugin_sa/game_sa/CAEPedlessSpeechAudioEntity.h +++ b/plugin_sa/game_sa/CAEPedlessSpeechAudioEntity.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEPedSpeechAudioEntity.h" @@ -13,5 +12,5 @@ class PLUGIN_API CAEPedlessSpeechAudioEntity { public: CAEPedSpeechAudioEntity pedSpeech; }; - +VALIDATE_OFFSET(CAEPedlessSpeechAudioEntity, pedSpeech, 0x0); VALIDATE_SIZE(CAEPedlessSpeechAudioEntity, 0x100); diff --git a/plugin_sa/game_sa/CAEPoliceScannerAudioEntity.h b/plugin_sa/game_sa/CAEPoliceScannerAudioEntity.h index b66b09015..830a44428 100644 --- a/plugin_sa/game_sa/CAEPoliceScannerAudioEntity.h +++ b/plugin_sa/game_sa/CAEPoliceScannerAudioEntity.h @@ -12,5 +12,4 @@ class PLUGIN_API CAEPoliceScannerAudioEntity : public CAEAudioEntity { public: }; - VALIDATE_SIZE(CAEPoliceScannerAudioEntity, 0x7C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAERadioTrackManager.h b/plugin_sa/game_sa/CAERadioTrackManager.h index b9f7175b3..c66eefd8c 100644 --- a/plugin_sa/game_sa/CAERadioTrackManager.h +++ b/plugin_sa/game_sa/CAERadioTrackManager.h @@ -26,7 +26,21 @@ struct PLUGIN_API tRadioSettings { char field_31; char m_musicTrackIndices[10]; }; - +VALIDATE_OFFSET(tRadioSettings, m_djIndex, 0x0); +VALIDATE_OFFSET(tRadioSettings, field_10, 0x10); +VALIDATE_OFFSET(tRadioSettings, trackId, 0x14); +VALIDATE_OFFSET(tRadioSettings, field_18, 0x18); +VALIDATE_OFFSET(tRadioSettings, trackPlayTime, 0x1C); +VALIDATE_OFFSET(tRadioSettings, trackLength, 0x20); +VALIDATE_OFFSET(tRadioSettings, field_24, 0x24); +VALIDATE_OFFSET(tRadioSettings, m_nCurrentRadioStation, 0x25); +VALIDATE_OFFSET(tRadioSettings, m_nBassSet, 0x26); +VALIDATE_OFFSET(tRadioSettings, _pad, 0x27); +VALIDATE_OFFSET(tRadioSettings, m_fBassGain, 0x28); +VALIDATE_OFFSET(tRadioSettings, currRadioBC_, 0x2C); +VALIDATE_OFFSET(tRadioSettings, field_30, 0x30); +VALIDATE_OFFSET(tRadioSettings, field_31, 0x31); +VALIDATE_OFFSET(tRadioSettings, m_musicTrackIndices, 0x32); VALIDATE_SIZE(tRadioSettings, 0x3C); struct PLUGIN_API tRadioStationData { @@ -45,12 +59,27 @@ struct PLUGIN_API tRadioStationData { char lastGameClockDays; int lastGameClockHours; }; - +VALIDATE_OFFSET(tRadioStationData, field_0, 0x0); +VALIDATE_OFFSET(tRadioStationData, field_4, 0x4); +VALIDATE_OFFSET(tRadioStationData, field_8, 0x8); +VALIDATE_OFFSET(tRadioStationData, m_nTimeRetuneStopped, 0xC); +VALIDATE_OFFSET(tRadioStationData, lastPlayingTime, 0x10); +VALIDATE_OFFSET(tRadioStationData, trackPlayTime, 0x14); +VALIDATE_OFFSET(tRadioStationData, field_18, 0x18); +VALIDATE_OFFSET(tRadioStationData, field_1C, 0x1C); +VALIDATE_OFFSET(tRadioStationData, field_20, 0x20); +VALIDATE_OFFSET(tRadioStationData, field_24, 0x24); +VALIDATE_OFFSET(tRadioStationData, field_25, 0x25); +VALIDATE_OFFSET(tRadioStationData, field_26, 0x26); +VALIDATE_OFFSET(tRadioStationData, lastGameClockDays, 0x27); +VALIDATE_OFFSET(tRadioStationData, lastGameClockHours, 0x28); VALIDATE_SIZE(tRadioStationData, 0x2C); struct PLUGIN_API tMusicTrackHistory { char m_indices[20]; }; +VALIDATE_OFFSET(tMusicTrackHistory, m_indices, 0x0); +VALIDATE_SIZE(tMusicTrackHistory, 0x14); class PLUGIN_API CAERadioTrackManager { public: @@ -101,6 +130,41 @@ class PLUGIN_API CAERadioTrackManager { // 11 structures static tMusicTrackHistory *m_nMusicTrackIndexHistory; }; +VALIDATE_OFFSET(CAERadioTrackManager, field_0, 0x0); +VALIDATE_OFFSET(CAERadioTrackManager, field_1, 0x1); +VALIDATE_OFFSET(CAERadioTrackManager, field_2, 0x2); +VALIDATE_OFFSET(CAERadioTrackManager, field_3, 0x3); +VALIDATE_OFFSET(CAERadioTrackManager, field_4, 0x4); +VALIDATE_OFFSET(CAERadioTrackManager, field_5, 0x5); +VALIDATE_OFFSET(CAERadioTrackManager, m_bRetuneJustStarted, 0x6); +VALIDATE_OFFSET(CAERadioTrackManager, m_bRadioAutoSelect, 0x7); +VALIDATE_OFFSET(CAERadioTrackManager, field_8, 0x8); +VALIDATE_OFFSET(CAERadioTrackManager, m_nMonthDay, 0x16); +VALIDATE_OFFSET(CAERadioTrackManager, m_nClockHours, 0x17); +VALIDATE_OFFSET(CAERadioTrackManager, m_anPlayerStats, 0x18); +VALIDATE_OFFSET(CAERadioTrackManager, m_nTimeRadioStationRetuned, 0x50); +VALIDATE_OFFSET(CAERadioTrackManager, m_nTimeToDisplayRadioName, 0x54); +VALIDATE_OFFSET(CAERadioTrackManager, field_58, 0x58); +VALIDATE_OFFSET(CAERadioTrackManager, field_5C, 0x5C); +VALIDATE_OFFSET(CAERadioTrackManager, field_60, 0x60); +VALIDATE_OFFSET(CAERadioTrackManager, field_64, 0x64); +VALIDATE_OFFSET(CAERadioTrackManager, field_68, 0x68); +VALIDATE_OFFSET(CAERadioTrackManager, m_nStationsListed, 0x6C); +VALIDATE_OFFSET(CAERadioTrackManager, m_nStationsListDown, 0x70); +VALIDATE_OFFSET(CAERadioTrackManager, field_74, 0x74); +VALIDATE_OFFSET(CAERadioTrackManager, field_78, 0x78); +VALIDATE_OFFSET(CAERadioTrackManager, field_7C, 0x7C); +VALIDATE_OFFSET(CAERadioTrackManager, field_80, 0x80); +VALIDATE_OFFSET(CAERadioTrackManager, field_84, 0x84); +VALIDATE_OFFSET(CAERadioTrackManager, m_TempSettings, 0x88); +VALIDATE_OFFSET(CAERadioTrackManager, m_Settings, 0xC4); +VALIDATE_OFFSET(CAERadioTrackManager, m_RadioStationsData, 0x100); +VALIDATE_OFFSET(CAERadioTrackManager, gap33C, 0x33C); +VALIDATE_OFFSET(CAERadioTrackManager, field_348, 0x348); +VALIDATE_OFFSET(CAERadioTrackManager, field_368, 0x368); +VALIDATE_OFFSET(CAERadioTrackManager, field_36C, 0x36C); +VALIDATE_OFFSET(CAERadioTrackManager, field_36D, 0x36D); +VALIDATE_SIZE(CAERadioTrackManager, 0x370); extern CAERadioTrackManager &AERadioTrackManager; diff --git a/plugin_sa/game_sa/CAEScriptAudioEntity.h b/plugin_sa/game_sa/CAEScriptAudioEntity.h index 543ebf18e..203db4cc1 100644 --- a/plugin_sa/game_sa/CAEScriptAudioEntity.h +++ b/plugin_sa/game_sa/CAEScriptAudioEntity.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEAudioEntity.h" @@ -27,5 +26,16 @@ class PLUGIN_API CAEScriptAudioEntity { CAEDoorAudioEntity field_114; CAEExplosionAudioEntity m_explosionAudio; }; - +VALIDATE_OFFSET(CAEScriptAudioEntity, audio, 0x0); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_7D, 0x7D); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_7E, 0x7E); +VALIDATE_OFFSET(CAEScriptAudioEntity, m_dwLastTimeHornPlayed, 0x80); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_84, 0x84); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_88, 0x88); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_8C, 0x8C); +VALIDATE_OFFSET(CAEScriptAudioEntity, wavLinks, 0x90); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_110, 0x110); +VALIDATE_OFFSET(CAEScriptAudioEntity, field_114, 0x114); +VALIDATE_OFFSET(CAEScriptAudioEntity, m_explosionAudio, 0x19C); VALIDATE_SIZE(CAEScriptAudioEntity, 0x21C); diff --git a/plugin_sa/game_sa/CAESound.h b/plugin_sa/game_sa/CAESound.h index 567e031af..13283508f 100644 --- a/plugin_sa/game_sa/CAESound.h +++ b/plugin_sa/game_sa/CAESound.h @@ -116,5 +116,36 @@ class PLUGIN_API CAESound { unsigned short environmentFlags, float arg11, short currPlayPosn); void UpdateParameters(short arg1); }; - +VALIDATE_OFFSET(CAESound, m_nBankSlotId, 0x0); +VALIDATE_OFFSET(CAESound, m_nSoundIdInSlot, 0x2); +VALIDATE_OFFSET(CAESound, m_pBaseAudio, 0x4); +VALIDATE_OFFSET(CAESound, m_pPhysicalEntity, 0x8); +VALIDATE_OFFSET(CAESound, m_nEvent, 0xC); +VALIDATE_OFFSET(CAESound, m_fMaxVolume, 0x10); +VALIDATE_OFFSET(CAESound, m_fVolume, 0x14); +VALIDATE_OFFSET(CAESound, m_fSoundDistance, 0x18); +VALIDATE_OFFSET(CAESound, m_fSpeed, 0x1C); +VALIDATE_OFFSET(CAESound, field_20, 0x20); +VALIDATE_OFFSET(CAESound, m_vecCurrPosn, 0x24); +VALIDATE_OFFSET(CAESound, m_vecPrevPosn, 0x30); +VALIDATE_OFFSET(CAESound, m_nLastFrameUpdate, 0x3C); +VALIDATE_OFFSET(CAESound, m_nCurrTimeUpdate, 0x40); +VALIDATE_OFFSET(CAESound, m_nPrevTimeUpdate, 0x44); +VALIDATE_OFFSET(CAESound, m_fCurrCamDist, 0x48); +VALIDATE_OFFSET(CAESound, m_fPrevCamDist, 0x4C); +VALIDATE_OFFSET(CAESound, m_fTimeScale, 0x50); +VALIDATE_OFFSET(CAESound, field_54, 0x54); +VALIDATE_OFFSET(CAESound, field_55, 0x55); +VALIDATE_OFFSET(CAESound, m_nEnvironmentFlags, 0x56); +VALIDATE_OFFSET(CAESound, m_nIsUsed, 0x58); +VALIDATE_OFFSET(CAESound, field_5A, 0x5A); +VALIDATE_OFFSET(CAESound, m_nCurrentPlayPosition, 0x5C); +VALIDATE_OFFSET(CAESound, field_5E, 0x5E); +VALIDATE_OFFSET(CAESound, m_fFinalVolume, 0x60); +VALIDATE_OFFSET(CAESound, m_fFrequency, 0x64); +VALIDATE_OFFSET(CAESound, m_nPlayingState, 0x68); +VALIDATE_OFFSET(CAESound, field_6A, 0x6A); +VALIDATE_OFFSET(CAESound, m_fSoundHeadRoom, 0x6C); +VALIDATE_OFFSET(CAESound, m_nSoundLength, 0x70); +VALIDATE_OFFSET(CAESound, field_72, 0x72); VALIDATE_SIZE(CAESound, 0x74); diff --git a/plugin_sa/game_sa/CAEStreamThread.h b/plugin_sa/game_sa/CAEStreamThread.h index f69a70bcd..e936512ac 100644 --- a/plugin_sa/game_sa/CAEStreamThread.h +++ b/plugin_sa/game_sa/CAEStreamThread.h @@ -39,5 +39,28 @@ class PLUGIN_API CAEStreamThread { int GetActiveTrackID(); }; - +VALIDATE_OFFSET(CAEStreamThread, hHandle, 0x0); +VALIDATE_OFFSET(CAEStreamThread, field_4, 0x4); +VALIDATE_OFFSET(CAEStreamThread, m_pStreamingChannel, 0x8); +VALIDATE_OFFSET(CAEStreamThread, m_pMp3TrackLoader, 0xC); +VALIDATE_OFFSET(CAEStreamThread, m_bActive, 0x10); +VALIDATE_OFFSET(CAEStreamThread, field_11, 0x11); +VALIDATE_OFFSET(CAEStreamThread, field_12, 0x12); +VALIDATE_OFFSET(CAEStreamThread, field_13, 0x13); +VALIDATE_OFFSET(CAEStreamThread, field_14, 0x14); +VALIDATE_OFFSET(CAEStreamThread, field_15, 0x15); +VALIDATE_OFFSET(CAEStreamThread, m_bTrackStopped, 0x16); +VALIDATE_OFFSET(CAEStreamThread, field_17, 0x17); +VALIDATE_OFFSET(CAEStreamThread, field_18, 0x18); +VALIDATE_OFFSET(CAEStreamThread, field_1C, 0x1C); +VALIDATE_OFFSET(CAEStreamThread, field_20, 0x20); +VALIDATE_OFFSET(CAEStreamThread, field_24, 0x24); +VALIDATE_OFFSET(CAEStreamThread, field_25, 0x25); +VALIDATE_OFFSET(CAEStreamThread, field_26, 0x26); +VALIDATE_OFFSET(CAEStreamThread, field_27, 0x27); +VALIDATE_OFFSET(CAEStreamThread, field_28, 0x28); +VALIDATE_OFFSET(CAEStreamThread, m_nTrackLenghtMs, 0x2C); +VALIDATE_OFFSET(CAEStreamThread, m_nActiveTrackID, 0x30); +VALIDATE_OFFSET(CAEStreamThread, m_nPlayingTrackID, 0x34); +VALIDATE_OFFSET(CAEStreamThread, m_criticalSection, 0x38); VALIDATE_SIZE(CAEStreamThread, 0x50); diff --git a/plugin_sa/game_sa/CAEStreamingChannel.h b/plugin_sa/game_sa/CAEStreamingChannel.h index 0c488a999..3121359f1 100644 --- a/plugin_sa/game_sa/CAEStreamingChannel.h +++ b/plugin_sa/game_sa/CAEStreamingChannel.h @@ -32,5 +32,25 @@ class PLUGIN_API CAEStreamingChannel { void* m_pSoundBuffer; // IDirectSoundBuffer unsigned long field_60094; }; - +VALIDATE_OFFSET(CAEStreamingChannel, base, 0x0); +VALIDATE_OFFSET(CAEStreamingChannel, field_60, 0x60); +VALIDATE_OFFSET(CAEStreamingChannel, field_61, 0x61); +VALIDATE_OFFSET(CAEStreamingChannel, field_62, 0x62); +VALIDATE_OFFSET(CAEStreamingChannel, field_63, 0x63); +VALIDATE_OFFSET(CAEStreamingChannel, field_64, 0x64); +VALIDATE_OFFSET(CAEStreamingChannel, m_bFxEnabled, 0x65); +VALIDATE_OFFSET(CAEStreamingChannel, field_66, 0x66); +VALIDATE_OFFSET(CAEStreamingChannel, field_67, 0x67); +VALIDATE_OFFSET(CAEStreamingChannel, field_68, 0x68); +VALIDATE_OFFSET(CAEStreamingChannel, field_6C, 0x6C); +VALIDATE_OFFSET(CAEStreamingChannel, field_6006C, 0x6006C); +VALIDATE_OFFSET(CAEStreamingChannel, m_pStreamingDecoder, 0x60070); +VALIDATE_OFFSET(CAEStreamingChannel, field_60074, 0x60074); +VALIDATE_OFFSET(CAEStreamingChannel, field_60078, 0x60078); +VALIDATE_OFFSET(CAEStreamingChannel, field_6007C, 0x6007C); +VALIDATE_OFFSET(CAEStreamingChannel, field_60084, 0x60084); +VALIDATE_OFFSET(CAEStreamingChannel, field_60088, 0x60088); +VALIDATE_OFFSET(CAEStreamingChannel, field_6008C, 0x6008C); +VALIDATE_OFFSET(CAEStreamingChannel, m_pSoundBuffer, 0x60090); +VALIDATE_OFFSET(CAEStreamingChannel, field_60094, 0x60094); VALIDATE_SIZE(CAEStreamingChannel, 0x60098); diff --git a/plugin_sa/game_sa/CAETwinLoopSoundEntity.h b/plugin_sa/game_sa/CAETwinLoopSoundEntity.h index 037cdafff..ef0ca4d3a 100644 --- a/plugin_sa/game_sa/CAETwinLoopSoundEntity.h +++ b/plugin_sa/game_sa/CAETwinLoopSoundEntity.h @@ -44,5 +44,17 @@ class PLUGIN_API CAETwinLoopSoundEntity : public CAEAudioEntity { short field_9E; CAESound *m_apSounds[2]; }; - +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_nBankSlotId, 0x7C); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_nSoundType, 0x7E); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_pBaseAudio, 0x84); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, field_88, 0x88); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, field_8A, 0x8A); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, field_8C, 0x8C); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_nPlayTimeMin, 0x8E); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_nPlayTimeMax, 0x90); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_nTimeToSwapSounds, 0x94); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_bPlayingFirstSound, 0x98); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_anStartingPlayPercentage, 0x9A); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, field_9E, 0x9E); +VALIDATE_OFFSET(CAETwinLoopSoundEntity, m_apSounds, 0xA0); VALIDATE_SIZE(CAETwinLoopSoundEntity, 0xA8); diff --git a/plugin_sa/game_sa/CAEVehicleAudioEntity.h b/plugin_sa/game_sa/CAEVehicleAudioEntity.h index 6a35ef061..147b68e4b 100644 --- a/plugin_sa/game_sa/CAEVehicleAudioEntity.h +++ b/plugin_sa/game_sa/CAEVehicleAudioEntity.h @@ -40,6 +40,9 @@ struct PLUGIN_API tEngineDummySlot { short m_nBankId; short m_nUsageCount; }; +VALIDATE_OFFSET(tEngineDummySlot, m_nBankId, 0x0); +VALIDATE_OFFSET(tEngineDummySlot, m_nUsageCount, 0x2); +VALIDATE_SIZE(tEngineDummySlot, 0x4); class PLUGIN_API cVehicleParams { public: @@ -69,14 +72,39 @@ class PLUGIN_API cVehicleParams { char field_47; int field_48; }; - +VALIDATE_OFFSET(cVehicleParams, m_nVehicleSubclass, 0x0); +VALIDATE_OFFSET(cVehicleParams, m_nVehicleClass, 0x4); +VALIDATE_OFFSET(cVehicleParams, field_8, 0x8); +VALIDATE_OFFSET(cVehicleParams, pad1, 0x9); +VALIDATE_OFFSET(cVehicleParams, field_C, 0xC); +VALIDATE_OFFSET(cVehicleParams, m_pVehicle, 0x10); +VALIDATE_OFFSET(cVehicleParams, m_pTransmission, 0x14); +VALIDATE_OFFSET(cVehicleParams, m_nModelType, 0x18); +VALIDATE_OFFSET(cVehicleParams, m_fVelocity, 0x1C); +VALIDATE_OFFSET(cVehicleParams, m_nGasState, 0x20); +VALIDATE_OFFSET(cVehicleParams, m_nBreakState, 0x22); +VALIDATE_OFFSET(cVehicleParams, m_fVelocityAbsolute, 0x24); +VALIDATE_OFFSET(cVehicleParams, m_fZVelocity, 0x28); +VALIDATE_OFFSET(cVehicleParams, m_fVelocityPercentage, 0x2C); +VALIDATE_OFFSET(cVehicleParams, field_30, 0x30); +VALIDATE_OFFSET(cVehicleParams, field_34, 0x34); +VALIDATE_OFFSET(cVehicleParams, m_nCurrentGear, 0x38); +VALIDATE_OFFSET(cVehicleParams, m_bHandbrakeOn, 0x39); +VALIDATE_OFFSET(cVehicleParams, pad2, 0x3A); +VALIDATE_OFFSET(cVehicleParams, m_fVelocityChangingPercentage, 0x3C); +VALIDATE_OFFSET(cVehicleParams, m_fWheelSpinForAudio, 0x40); +VALIDATE_OFFSET(cVehicleParams, m_nNumberOfGears, 0x44); +VALIDATE_OFFSET(cVehicleParams, m_nWheelsOnGround, 0x46); +VALIDATE_OFFSET(cVehicleParams, field_47, 0x47); +VALIDATE_OFFSET(cVehicleParams, field_48, 0x48); VALIDATE_SIZE(cVehicleParams, 0x4C); struct PLUGIN_API tVehicleSound { unsigned int m_nIndex; CAESound *m_pSound; }; - +VALIDATE_OFFSET(tVehicleSound, m_nIndex, 0x0); +VALIDATE_OFFSET(tVehicleSound, m_pSound, 0x4); VALIDATE_SIZE(tVehicleSound, 0x8); struct PLUGIN_API tVehicleAudioSettings { @@ -99,7 +127,24 @@ struct PLUGIN_API tVehicleAudioSettings { char _pad4[3]; float m_fHornVolumeDelta; }; - +VALIDATE_OFFSET(tVehicleAudioSettings, m_nVehicleSoundType, 0x0); +VALIDATE_OFFSET(tVehicleAudioSettings, _pad, 0x1); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nEngineOnSoundBankId, 0x2); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nEngineOffSoundBankId, 0x4); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nBassSetting, 0x6); +VALIDATE_OFFSET(tVehicleAudioSettings, _pad1, 0x7); +VALIDATE_OFFSET(tVehicleAudioSettings, m_fBassEq, 0x8); +VALIDATE_OFFSET(tVehicleAudioSettings, field_C, 0xC); +VALIDATE_OFFSET(tVehicleAudioSettings, m_bHornTon, 0x10); +VALIDATE_OFFSET(tVehicleAudioSettings, _pad2, 0x11); +VALIDATE_OFFSET(tVehicleAudioSettings, m_fHornHigh, 0x14); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nDoorSound, 0x18); +VALIDATE_OFFSET(tVehicleAudioSettings, field_19, 0x19); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nRadioID, 0x1A); +VALIDATE_OFFSET(tVehicleAudioSettings, m_nRadioType, 0x1B); +VALIDATE_OFFSET(tVehicleAudioSettings, vehTypeForAudio, 0x1C); +VALIDATE_OFFSET(tVehicleAudioSettings, _pad4, 0x1D); +VALIDATE_OFFSET(tVehicleAudioSettings, m_fHornVolumeDelta, 0x20); VALIDATE_SIZE(tVehicleAudioSettings, 0x24); class CPed; @@ -182,7 +227,74 @@ class PLUGIN_API CAEVehicleAudioEntity : public CAEAudioEntity { SUPPORTED_10US static tVehicleAudioSettings *&s_pVehicleAudioSettingsForRadio; SUPPORTED_10US static tEngineDummySlot(&s_DummyEngineSlots)[10]; // static tEngineDummySlot s_DummyEngineSlots[10] }; - +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_7C, 0x7C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_7E, 0x7E); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_settings, 0x80); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bEnabled, 0xA4); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bPlayerDriver, 0xA5); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bPlayerPassenger, 0xA6); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bVehicleRadioPaused, 0xA7); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bSoundsStopped, 0xA8); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nEngineState, 0xA9); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_AA, 0xAA); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_AB, 0xAB); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_AC, 0xAC); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bInhibitAccForLowSpeed, 0xB0); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_B1, 0xB1); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nRainDropCounter, 0xB2); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_B4, 0xB4); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_B6, 0xB6); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_B8, 0xB8); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_BC, 0xBC); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bDisableHeliEngineSounds, 0xBD); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_BE, 0xBE); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bSirenOrAlarmPlaying, 0xBF); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bHornPlaying, 0xC0); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_C1, 0xC1); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_fSirenVolume, 0xC4); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bModelWithSiren, 0xC8); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_C9, 0xC9); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nBoatHitWaveLastPlayedTime, 0xCC); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nTimeToInhibitAcc, 0xD0); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nTimeToInhibitCrz, 0xD4); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_fGeneralVehicleSoundVolume, 0xD8); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nEngineDecelerateSoundBankId, 0xDC); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nEngineAccelerateSoundBankId, 0xDE); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nEngineBankSlotId, 0xE0); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_E2, 0xE2); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_aEngineSounds, 0xE4); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_144, 0x144); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_148, 0x148); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_14A, 0x14A); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_14C, 0x14C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_14E, 0x14E); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_150, 0x150); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_154, 0x154); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nSkidSoundType, 0x156); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_158, 0x158); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nRoadNoiseSoundType, 0x15C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_15E, 0x15E); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pRoadNoiseSound, 0x160); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nFlatTyreSoundType, 0x164); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_166, 0x166); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pFlatTyreSound, 0x168); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_nReverseGearSoundType, 0x16C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_16E, 0x16E); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pReverseGearSound, 0x170); +VALIDATE_OFFSET(CAEVehicleAudioEntity, gap_174, 0x174); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pHornTonSound, 0x178); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pSirenSound, 0x17C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_pPoliceSirenSound, 0x180); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_skidSound, 0x184); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_22C, 0x22C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_230, 0x230); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_234, 0x234); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_238, 0x238); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_23C, 0x23C); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_240, 0x240); +VALIDATE_OFFSET(CAEVehicleAudioEntity, m_bNitroSoundPresent, 0x244); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_245, 0x245); +VALIDATE_OFFSET(CAEVehicleAudioEntity, field_248, 0x248); VALIDATE_SIZE(CAEVehicleAudioEntity, 0x24C); // indexes = (Vehicles modelid - 400) diff --git a/plugin_sa/game_sa/CAEWeaponAudioEntity.cpp b/plugin_sa/game_sa/CAEWeaponAudioEntity.cpp index 877d5a334..5ba6faf1a 100644 --- a/plugin_sa/game_sa/CAEWeaponAudioEntity.cpp +++ b/plugin_sa/game_sa/CAEWeaponAudioEntity.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CAEWeaponAudioEntity.h" diff --git a/plugin_sa/game_sa/CAEWeaponAudioEntity.h b/plugin_sa/game_sa/CAEWeaponAudioEntity.h index 8df46ac2f..228206737 100644 --- a/plugin_sa/game_sa/CAEWeaponAudioEntity.h +++ b/plugin_sa/game_sa/CAEWeaponAudioEntity.h @@ -53,5 +53,20 @@ class PLUGIN_API CAEWeaponAudioEntity : public CAEAudioEntity { void Initialise(); }; - +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_bPlayedMiniGunFireSound, 0x7C); +VALIDATE_OFFSET(CAEWeaponAudioEntity, field_7D, 0x7D); +VALIDATE_OFFSET(CAEWeaponAudioEntity, field_7E, 0x7E); +VALIDATE_OFFSET(CAEWeaponAudioEntity, field_7F, 0x7F); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_nChainsawSoundState, 0x80); +VALIDATE_OFFSET(CAEWeaponAudioEntity, field_81, 0x81); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwFlameThrowerLastPlayedTime, 0x84); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwSpraycanLastPlayedTime, 0x88); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwExtinguisherLastPlayedTime, 0x8C); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwMiniGunFireSoundPlayedTime, 0x90); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwTimeChainsaw, 0x94); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_dwTimeLastFired, 0x98); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_pSounds, 0x9C); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_bActive, 0xA0); +VALIDATE_OFFSET(CAEWeaponAudioEntity, field_A1, 0xA1); +VALIDATE_OFFSET(CAEWeaponAudioEntity, m_pPed, 0xA4); VALIDATE_SIZE(CAEWeaponAudioEntity, 0xA8); diff --git a/plugin_sa/game_sa/CAEWeatherAudioEntity.h b/plugin_sa/game_sa/CAEWeatherAudioEntity.h index 6a7376d6a..ef000989f 100644 --- a/plugin_sa/game_sa/CAEWeatherAudioEntity.h +++ b/plugin_sa/game_sa/CAEWeatherAudioEntity.h @@ -17,5 +17,5 @@ class CAEWeatherAudioEntity : public CAEAudioEntity { }; - +VALIDATE_OFFSET(CAEWeatherAudioEntity, m_nThunderFrequencyVariationCounter, 0x7C); VALIDATE_SIZE(CAEWeatherAudioEntity, 0x80); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAnimBlendAssocGroup.cpp b/plugin_sa/game_sa/CAnimBlendAssocGroup.cpp index 3338c4919..a878cbe1e 100644 --- a/plugin_sa/game_sa/CAnimBlendAssocGroup.cpp +++ b/plugin_sa/game_sa/CAnimBlendAssocGroup.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CAnimBlendAssocGroup.h" // Converted from thiscall void CAnimBlendAssocGroup::CAnimBlendAssocGroup(void) 0x4CDE70 CAnimBlendAssocGroup::CAnimBlendAssocGroup() { diff --git a/plugin_sa/game_sa/CAnimBlendAssocGroup.h b/plugin_sa/game_sa/CAnimBlendAssocGroup.h index 7b1467b7e..6a7e7fc8c 100644 --- a/plugin_sa/game_sa/CAnimBlendAssocGroup.h +++ b/plugin_sa/game_sa/CAnimBlendAssocGroup.h @@ -32,5 +32,9 @@ class CAnimBlendAssocGroup void InitEmptyAssociations(RpClump* pClump); ~CAnimBlendAssocGroup(); }; - +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_pAnimBlock, 0x0); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_pAssociations, 0x4); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nNumAnimations, 0x8); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nIdOffset, 0xC); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nGroupID, 0x10); VALIDATE_SIZE(CAnimBlendAssocGroup, 0x14); diff --git a/plugin_sa/game_sa/CAnimBlendAssociation.h b/plugin_sa/game_sa/CAnimBlendAssociation.h index 4e39f6dcb..a06ac7398 100644 --- a/plugin_sa/game_sa/CAnimBlendAssociation.h +++ b/plugin_sa/game_sa/CAnimBlendAssociation.h @@ -112,6 +112,22 @@ class PLUGIN_API CAnimBlendAssociation { SUPPORTED_10US bool UpdateTime(float unused1, float unused2); SUPPORTED_10US void UpdateTimeStep(float speedMult, float timeMult); }; +VALIDATE_OFFSET(CAnimBlendAssociation, vtable, 0x0); +VALIDATE_OFFSET(CAnimBlendAssociation, m_link, 0x4); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nNumBlendNodes, 0xC); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nAnimGroup, 0xE); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pNodeArray, 0x10); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pHierarchy, 0x14); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendAmount, 0x18); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendDelta, 0x1C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fCurrentTime, 0x20); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fSpeed, 0x24); +VALIDATE_OFFSET(CAnimBlendAssociation, fTimeStep, 0x28); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nAnimId, 0x2C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nFlags, 0x2E); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nCallbackType, 0x30); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pCallbackData, 0x38); +VALIDATE_SIZE(CAnimBlendAssociation, 0x3C); VTABLE_DESC(CAnimBlendAssociation, 0x85C6D0, 1); VALIDATE_SIZE(CAnimBlendAssociation, 0x3C); diff --git a/plugin_sa/game_sa/CAnimBlendClumpData.h b/plugin_sa/game_sa/CAnimBlendClumpData.h index efc862cd3..e01fc8ac8 100644 --- a/plugin_sa/game_sa/CAnimBlendClumpData.h +++ b/plugin_sa/game_sa/CAnimBlendClumpData.h @@ -29,7 +29,10 @@ class PLUGIN_API CAnimBlendClumpData { SUPPORTED_10US void LoadFramesIntoSPR(); SUPPORTED_10US void SetNumberOfBones(int numBones); }; - +VALIDATE_OFFSET(CAnimBlendClumpData, m_associationsList, 0x0); +VALIDATE_OFFSET(CAnimBlendClumpData, m_nNumFrames, 0x8); +VALIDATE_OFFSET(CAnimBlendClumpData, m_pvecPedPosition, 0xC); +VALIDATE_OFFSET(CAnimBlendClumpData, m_pFrames, 0x10); VALIDATE_SIZE(CAnimBlendClumpData, 0x14); #include "meta/meta.CAnimBlendClumpData.h" diff --git a/plugin_sa/game_sa/CAnimBlendHierarchy.cpp b/plugin_sa/game_sa/CAnimBlendHierarchy.cpp index d5d8892da..e9901828a 100644 --- a/plugin_sa/game_sa/CAnimBlendHierarchy.cpp +++ b/plugin_sa/game_sa/CAnimBlendHierarchy.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CAnimBlendHierarchy.h" // Converted from thiscall void* CAnimBlendHierarchy::AllocSequenceBlock(bool arg1) 0x4CF510 diff --git a/plugin_sa/game_sa/CAnimBlendHierarchy.h b/plugin_sa/game_sa/CAnimBlendHierarchy.h index 844d351a0..dbcbf421d 100644 --- a/plugin_sa/game_sa/CAnimBlendHierarchy.h +++ b/plugin_sa/game_sa/CAnimBlendHierarchy.h @@ -34,5 +34,12 @@ class CAnimBlendHierarchy { void Uncompress(); }; - +VALIDATE_OFFSET(CAnimBlendHierarchy, m_hashKey, 0x0); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_pSequences, 0x4); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_nSeqCount, 0x8); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_bRunningCompressed, 0xA); +VALIDATE_OFFSET(CAnimBlendHierarchy, field_B, 0xB); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_nAnimBlockId, 0xC); +VALIDATE_OFFSET(CAnimBlendHierarchy, m_fTotalTime, 0x10); +VALIDATE_OFFSET(CAnimBlendHierarchy, field_14, 0x14); VALIDATE_SIZE(CAnimBlendHierarchy, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAnimBlendNode.cpp b/plugin_sa/game_sa/CAnimBlendNode.cpp index eb3c10b7d..e81fa1599 100644 --- a/plugin_sa/game_sa/CAnimBlendNode.cpp +++ b/plugin_sa/game_sa/CAnimBlendNode.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CAnimBlendNode.h" // Converted from thiscall void CAnimBlendNode::CalcDeltas(void) 0x4D0190 diff --git a/plugin_sa/game_sa/CAnimBlendNode.h b/plugin_sa/game_sa/CAnimBlendNode.h index 8acc46406..addc609ea 100644 --- a/plugin_sa/game_sa/CAnimBlendNode.h +++ b/plugin_sa/game_sa/CAnimBlendNode.h @@ -36,5 +36,11 @@ class PLUGIN_API CAnimBlendNode { bool Update(CVector& Vector, CQuaternion& Qauternion, float arg3); bool UpdateCompressed(CVector& Vector, CQuaternion& Quaternion, float arg3); }; - +VALIDATE_OFFSET(CAnimBlendNode, field_0, 0x0); +VALIDATE_OFFSET(CAnimBlendNode, field_4, 0x4); +VALIDATE_OFFSET(CAnimBlendNode, field_8, 0x8); +VALIDATE_OFFSET(CAnimBlendNode, field_A, 0xA); +VALIDATE_OFFSET(CAnimBlendNode, field_C, 0xC); +VALIDATE_OFFSET(CAnimBlendNode, field_10, 0x10); +VALIDATE_OFFSET(CAnimBlendNode, m_pAnimBlendAssociation, 0x14); VALIDATE_SIZE(CAnimBlendNode, 0x18); diff --git a/plugin_sa/game_sa/CAnimBlendSequence.cpp b/plugin_sa/game_sa/CAnimBlendSequence.cpp index efb21190a..12ab1f5c6 100644 --- a/plugin_sa/game_sa/CAnimBlendSequence.cpp +++ b/plugin_sa/game_sa/CAnimBlendSequence.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CAnimBlendSequence.h" // Converted from thiscall void CAnimBlendSequence::CAnimBlendSequence(void) 0x4D0C10 diff --git a/plugin_sa/game_sa/CAnimBlendSequence.h b/plugin_sa/game_sa/CAnimBlendSequence.h index 5c1ea0e68..a4618914f 100644 --- a/plugin_sa/game_sa/CAnimBlendSequence.h +++ b/plugin_sa/game_sa/CAnimBlendSequence.h @@ -29,5 +29,8 @@ class PLUGIN_API CAnimBlendSequence { ~CAnimBlendSequence(); }; - +VALIDATE_OFFSET(CAnimBlendSequence, m_nHash, 0x0); +VALIDATE_OFFSET(CAnimBlendSequence, m_nFlags, 0x4); +VALIDATE_OFFSET(CAnimBlendSequence, m_nFrameCount, 0x6); +VALIDATE_OFFSET(CAnimBlendSequence, m_pFrames, 0x8); VALIDATE_SIZE(CAnimBlendSequence, 0xC); diff --git a/plugin_sa/game_sa/CAnimBlendStaticAssociation.h b/plugin_sa/game_sa/CAnimBlendStaticAssociation.h index 9cac04281..ef664183e 100644 --- a/plugin_sa/game_sa/CAnimBlendStaticAssociation.h +++ b/plugin_sa/game_sa/CAnimBlendStaticAssociation.h @@ -29,6 +29,13 @@ class PLUGIN_API CAnimBlendStaticAssociation { SUPPORTED_10US void FreeSequenceArray(); SUPPORTED_10US void Init(RpClump *clump, CAnimBlendHierarchy *hierarchy); }; +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_nNumBlendNodes, 0x4); +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_nAnimId, 0x6); +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_nAnimGroup, 0x8); +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_nFlags, 0xA); +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_pSequenceArray, 0xC); +VALIDATE_OFFSET(CAnimBlendStaticAssociation, m_pHeirarchy, 0x10); +VALIDATE_SIZE(CAnimBlendStaticAssociation, 0x14); VTABLE_DESC(CAnimBlendStaticAssociation, 0x85C6CC, 1); VALIDATE_SIZE(CAnimBlendStaticAssociation, 0x14); diff --git a/plugin_sa/game_sa/CAnimBlock.h b/plugin_sa/game_sa/CAnimBlock.h index f6c9e2f43..d6cf456c6 100644 --- a/plugin_sa/game_sa/CAnimBlock.h +++ b/plugin_sa/game_sa/CAnimBlock.h @@ -19,5 +19,11 @@ class PLUGIN_API CAnimBlock { int animationCount; int animationStyle; }; - -VALIDATE_SIZE(CAnimBlock,0x20); +VALIDATE_OFFSET(CAnimBlock, szName, 0x0); +VALIDATE_OFFSET(CAnimBlock, bLoaded, 0x10); +VALIDATE_OFFSET(CAnimBlock, pad, 0x11); +VALIDATE_OFFSET(CAnimBlock, usRefs, 0x12); +VALIDATE_OFFSET(CAnimBlock, startAnimation, 0x14); +VALIDATE_OFFSET(CAnimBlock, animationCount, 0x18); +VALIDATE_OFFSET(CAnimBlock, animationStyle, 0x1C); +VALIDATE_SIZE(CAnimBlock, 0x20); diff --git a/plugin_sa/game_sa/CAnimManager.cpp b/plugin_sa/game_sa/CAnimManager.cpp index 44f9e1a27..3fc53de46 100644 --- a/plugin_sa/game_sa/CAnimManager.cpp +++ b/plugin_sa/game_sa/CAnimManager.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CAnimManager.h" diff --git a/plugin_sa/game_sa/CAnimManager.h b/plugin_sa/game_sa/CAnimManager.h index 4423792bb..bc4348675 100644 --- a/plugin_sa/game_sa/CAnimManager.h +++ b/plugin_sa/game_sa/CAnimManager.h @@ -59,3 +59,4 @@ class PLUGIN_API CAnimManager { static int& ms_numAnimations; }; +VALIDATE_SIZE(CAnimManager, 0x1); diff --git a/plugin_sa/game_sa/CAnimatedBuilding.h b/plugin_sa/game_sa/CAnimatedBuilding.h index 3a485650d..8da9a7c9a 100644 --- a/plugin_sa/game_sa/CAnimatedBuilding.h +++ b/plugin_sa/game_sa/CAnimatedBuilding.h @@ -14,5 +14,4 @@ class CAnimatedBuilding : public CBuilding { public: CAnimatedBuilding(); }; - VALIDATE_SIZE(CAnimatedBuilding, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAnimationStyleDescriptor.h b/plugin_sa/game_sa/CAnimationStyleDescriptor.h index 2ce14bc51..edb0a972d 100644 --- a/plugin_sa/game_sa/CAnimationStyleDescriptor.h +++ b/plugin_sa/game_sa/CAnimationStyleDescriptor.h @@ -17,5 +17,10 @@ class PLUGIN_API CAnimationStyleDescriptor { void *animNames; void *animDesc; }; - +VALIDATE_OFFSET(CAnimationStyleDescriptor, groupName, 0x0); +VALIDATE_OFFSET(CAnimationStyleDescriptor, blockName, 0x10); +VALIDATE_OFFSET(CAnimationStyleDescriptor, field_20, 0x20); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animsCount, 0x24); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animNames, 0x28); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animDesc, 0x2C); VALIDATE_SIZE(CAnimationStyleDescriptor, 0x30); diff --git a/plugin_sa/game_sa/CAtomicModelInfo.h b/plugin_sa/game_sa/CAtomicModelInfo.h index 23dee2096..26996435d 100644 --- a/plugin_sa/game_sa/CAtomicModelInfo.h +++ b/plugin_sa/game_sa/CAtomicModelInfo.h @@ -16,5 +16,4 @@ class PLUGIN_API CAtomicModelInfo : public CBaseModelInfo { struct RpAtomic *GetAtomicFromDistance(float distance); }; - VALIDATE_SIZE(CAtomicModelInfo, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAttractorScanner.h b/plugin_sa/game_sa/CAttractorScanner.h index d58f334e0..59ba0b46d 100644 --- a/plugin_sa/game_sa/CAttractorScanner.h +++ b/plugin_sa/game_sa/CAttractorScanner.h @@ -21,5 +21,12 @@ class PLUGIN_API CAttractorScanner { int field_40[10]; int field_68[10]; }; - +VALIDATE_OFFSET(CAttractorScanner, field_0, 0x0); +VALIDATE_OFFSET(CAttractorScanner, _pad, 0x1); +VALIDATE_OFFSET(CAttractorScanner, field_4, 0x4); +VALIDATE_OFFSET(CAttractorScanner, m_pEffectInUse, 0x10); +VALIDATE_OFFSET(CAttractorScanner, field_14, 0x14); +VALIDATE_OFFSET(CAttractorScanner, field_18, 0x18); +VALIDATE_OFFSET(CAttractorScanner, field_40, 0x40); +VALIDATE_OFFSET(CAttractorScanner, field_68, 0x68); VALIDATE_SIZE(CAttractorScanner, 0x90); \ No newline at end of file diff --git a/plugin_sa/game_sa/CAudioEngine.h b/plugin_sa/game_sa/CAudioEngine.h index 212361903..034797358 100644 --- a/plugin_sa/game_sa/CAudioEngine.h +++ b/plugin_sa/game_sa/CAudioEngine.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CAEFrontendAudioEntity.h" @@ -63,7 +62,25 @@ class PLUGIN_API CAudioEngine { void SetMusicFaderScalingFactor(float value); void SetEffectsFaderScalingFactor(float value); }; - +VALIDATE_OFFSET(CAudioEngine, field_0, 0x0); +VALIDATE_OFFSET(CAudioEngine, field_1, 0x1); +VALIDATE_OFFSET(CAudioEngine, m_nCurrentRadiostationId, 0x2); +VALIDATE_OFFSET(CAudioEngine, field_3, 0x3); +VALIDATE_OFFSET(CAudioEngine, field_4, 0x4); +VALIDATE_OFFSET(CAudioEngine, field_8, 0x8); +VALIDATE_OFFSET(CAudioEngine, field_A0, 0xA0); +VALIDATE_OFFSET(CAudioEngine, field_A1, 0xA1); +VALIDATE_OFFSET(CAudioEngine, field_B0, 0xB0); +VALIDATE_OFFSET(CAudioEngine, field_B1, 0xB1); +VALIDATE_OFFSET(CAudioEngine, m_FrontendAudio, 0xB4); +VALIDATE_OFFSET(CAudioEngine, field_150, 0x150); +VALIDATE_OFFSET(CAudioEngine, field_1F8, 0x1F8); +VALIDATE_OFFSET(CAudioEngine, m_scriptAudio, 0x2A0); +VALIDATE_OFFSET(CAudioEngine, m_collisionAudio, 0x4BC); +VALIDATE_OFFSET(CAudioEngine, m_pWeaponAudio, 0x1E34); +VALIDATE_OFFSET(CAudioEngine, m_pedlessSpeechAudio, 0x1E38); +VALIDATE_OFFSET(CAudioEngine, field_1F38, 0x1F38); +VALIDATE_OFFSET(CAudioEngine, m_doorAudio, 0x1F50); VALIDATE_SIZE(CAudioEngine, 0x1FD8); extern CAudioEngine& AudioEngine; \ No newline at end of file diff --git a/plugin_sa/game_sa/CAudioLink.h b/plugin_sa/game_sa/CAudioLink.h index 43841ca39..425773328 100644 --- a/plugin_sa/game_sa/CAudioLink.h +++ b/plugin_sa/game_sa/CAudioLink.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "CVector.h" @@ -19,5 +18,10 @@ class PLUGIN_API CAudioLink { int m_nBankId; int m_nBankSlotId; }; - +VALIDATE_OFFSET(CAudioLink, m_vPosition, 0x0); +VALIDATE_OFFSET(CAudioLink, m_pEntity, 0xC); +VALIDATE_OFFSET(CAudioLink, field_10, 0x10); +VALIDATE_OFFSET(CAudioLink, m_nAudioEvent, 0x14); +VALIDATE_OFFSET(CAudioLink, m_nBankId, 0x18); +VALIDATE_OFFSET(CAudioLink, m_nBankSlotId, 0x1C); VALIDATE_SIZE(CAudioLink, 0x20); diff --git a/plugin_sa/game_sa/CAutoPilot.h b/plugin_sa/game_sa/CAutoPilot.h index 33d56eddf..ed46f34e8 100644 --- a/plugin_sa/game_sa/CAutoPilot.h +++ b/plugin_sa/game_sa/CAutoPilot.h @@ -73,5 +73,54 @@ class PLUGIN_API CAutoPilot { char field_95; short field_96; }; - +VALIDATE_OFFSET(CAutoPilot, m_currentAddress, 0x0); +VALIDATE_OFFSET(CAutoPilot, m_startingRouteNode, 0x4); +VALIDATE_OFFSET(CAutoPilot, field_8, 0x8); +VALIDATE_OFFSET(CAutoPilot, field_C, 0xC); +VALIDATE_OFFSET(CAutoPilot, m_nSpeedScaleFactor, 0x10); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentPathNodeInfo, 0x14); +VALIDATE_OFFSET(CAutoPilot, m_nNextPathNodeInfo, 0x16); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousPathNodeInfo, 0x18); +VALIDATE_OFFSET(CAutoPilot, field_1A, 0x1A); +VALIDATE_OFFSET(CAutoPilot, m_nTimeToStartMission, 0x1C); +VALIDATE_OFFSET(CAutoPilot, m_nTimeSwitchedToRealPhysics, 0x20); +VALIDATE_OFFSET(CAutoPilot, field_24, 0x24); +VALIDATE_OFFSET(CAutoPilot, _smthCurr, 0x25); +VALIDATE_OFFSET(CAutoPilot, _smthNext, 0x26); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentLane, 0x27); +VALIDATE_OFFSET(CAutoPilot, m_nNextLane, 0x28); +VALIDATE_OFFSET(CAutoPilot, m_nCarDrivingStyle, 0x29); +VALIDATE_OFFSET(CAutoPilot, m_nCarMission, 0x2A); +VALIDATE_OFFSET(CAutoPilot, m_nTempAction, 0x2B); +VALIDATE_OFFSET(CAutoPilot, m_nTempActionTime, 0x2C); +VALIDATE_OFFSET(CAutoPilot, _someStartTime, 0x30); +VALIDATE_OFFSET(CAutoPilot, field_34, 0x34); +VALIDATE_OFFSET(CAutoPilot, field_35, 0x35); +VALIDATE_OFFSET(CAutoPilot, field_36, 0x36); +VALIDATE_OFFSET(CAutoPilot, field_38, 0x38); +VALIDATE_OFFSET(CAutoPilot, m_fMaxTrafficSpeed, 0x3C); +VALIDATE_OFFSET(CAutoPilot, m_nCruiseSpeed, 0x40); +VALIDATE_OFFSET(CAutoPilot, field_41, 0x41); +VALIDATE_OFFSET(CAutoPilot, field_42, 0x42); +VALIDATE_OFFSET(CAutoPilot, field_44, 0x44); +VALIDATE_OFFSET(CAutoPilot, field_48, 0x48); +VALIDATE_OFFSET(CAutoPilot, heliThrustPower, 0x49); +VALIDATE_OFFSET(CAutoPilot, field_4A, 0x4A); +VALIDATE_OFFSET(CAutoPilot, m_nCarCtrlFlags, 0x4B); +VALIDATE_OFFSET(CAutoPilot, field_4C, 0x4C); +VALIDATE_OFFSET(CAutoPilot, m_nStraightLineDistance, 0x4D); +VALIDATE_OFFSET(CAutoPilot, field_4E, 0x4E); +VALIDATE_OFFSET(CAutoPilot, field_4F, 0x4F); +VALIDATE_OFFSET(CAutoPilot, field_50, 0x50); +VALIDATE_OFFSET(CAutoPilot, field_51, 0x51); +VALIDATE_OFFSET(CAutoPilot, field_52, 0x52); +VALIDATE_OFFSET(CAutoPilot, m_vecDestinationCoors, 0x5C); +VALIDATE_OFFSET(CAutoPilot, m_aPathFindNodesInfo, 0x68); +VALIDATE_OFFSET(CAutoPilot, m_nPathFindNodesCount, 0x88); +VALIDATE_OFFSET(CAutoPilot, field_8A, 0x8A); +VALIDATE_OFFSET(CAutoPilot, m_pTargetCar, 0x8C); +VALIDATE_OFFSET(CAutoPilot, m_pCarWeMakingSlowDownFor, 0x90); +VALIDATE_OFFSET(CAutoPilot, field_94, 0x94); +VALIDATE_OFFSET(CAutoPilot, field_95, 0x95); +VALIDATE_OFFSET(CAutoPilot, field_96, 0x96); VALIDATE_SIZE(CAutoPilot, 0x98); diff --git a/plugin_sa/game_sa/CAutomobile.h b/plugin_sa/game_sa/CAutomobile.h index 742e2b00c..a0272efeb 100644 --- a/plugin_sa/game_sa/CAutomobile.h +++ b/plugin_sa/game_sa/CAutomobile.h @@ -242,6 +242,65 @@ class CAutomobile : public CVehicle { void FireTruckControl(float arg0); bool HasCarStoppedBecauseOfLight(); }; +VALIDATE_OFFSET(CAutomobile, m_damageManager, 0x5A0); +VALIDATE_OFFSET(CAutomobile, m_doors, 0x5B8); +VALIDATE_OFFSET(CAutomobile, m_aCarNodes, 0x648); +VALIDATE_OFFSET(CAutomobile, m_panels, 0x6AC); +VALIDATE_OFFSET(CAutomobile, m_swingingChassis, 0x70C); +VALIDATE_OFFSET(CAutomobile, m_wheelColPoint, 0x724); +VALIDATE_OFFSET(CAutomobile, m_fWheelsSuspensionCompression, 0x7D4); +VALIDATE_OFFSET(CAutomobile, m_fWheelsSuspensionCompressionPrev, 0x7E4); +VALIDATE_OFFSET(CAutomobile, m_fWheelCounts, 0x7F4); +VALIDATE_OFFSET(CAutomobile, m_fBrakeCount, 0x804); +VALIDATE_OFFSET(CAutomobile, m_fIntertiaValue1, 0x808); +VALIDATE_OFFSET(CAutomobile, m_fIntertiaValue2, 0x80C); +VALIDATE_OFFSET(CAutomobile, m_wheelSkidmarkType, 0x810); +VALIDATE_OFFSET(CAutomobile, m_bWheelSkidmarkBloody, 0x820); +VALIDATE_OFFSET(CAutomobile, m_bWheelSkidmarkMuddy, 0x824); +VALIDATE_OFFSET(CAutomobile, m_fWheelRotation, 0x828); +VALIDATE_OFFSET(CAutomobile, m_fWheelPosition, 0x838); +VALIDATE_OFFSET(CAutomobile, m_fWheelSpeed, 0x848); +VALIDATE_OFFSET(CAutomobile, m_fWheelBurnoutSpeed, 0x858); +VALIDATE_OFFSET(CAutomobile, m_nAutomobileFlags, 0x868); +VALIDATE_OFFSET(CAutomobile, m_bDoingBurnout, 0x86A); +VALIDATE_OFFSET(CAutomobile, m_wMiscComponentAngle, 0x86C); +VALIDATE_OFFSET(CAutomobile, m_wMiscComponentAnglePrev, 0x86E); +VALIDATE_OFFSET(CAutomobile, m_dwBusDoorTimerEnd, 0x870); +VALIDATE_OFFSET(CAutomobile, m_dwBusDoorTimerStart, 0x874); +VALIDATE_OFFSET(CAutomobile, m_aSuspensionSpringLength, 0x878); +VALIDATE_OFFSET(CAutomobile, m_aSuspensionLineLength, 0x888); +VALIDATE_OFFSET(CAutomobile, m_fFrontHeightAboveRoad, 0x898); +VALIDATE_OFFSET(CAutomobile, m_fRearHeightAboveRoad, 0x89C); +VALIDATE_OFFSET(CAutomobile, m_fExtraTractionMult, 0x8A0); +VALIDATE_OFFSET(CAutomobile, m_fNitroValue, 0x8A4); +VALIDATE_OFFSET(CAutomobile, m_fAircraftGoToHeading, 0x8A8); +VALIDATE_OFFSET(CAutomobile, m_fRotationBalance, 0x8AC); +VALIDATE_OFFSET(CAutomobile, m_fMoveDirection, 0x8B0); +VALIDATE_OFFSET(CAutomobile, m_vecMoveForce, 0x8B4); +VALIDATE_OFFSET(CAutomobile, m_vecTurnForce, 0x8C0); +VALIDATE_OFFSET(CAutomobile, m_aDoorRotation, 0x8CC); +VALIDATE_OFFSET(CAutomobile, m_fBurningTimer, 0x8E4); +VALIDATE_OFFSET(CAutomobile, m_pWheelCollisionEntity, 0x8E8); +VALIDATE_OFFSET(CAutomobile, m_vWheelCollisionPos, 0x8F8); +VALIDATE_OFFSET(CAutomobile, m_pExplosionVictim, 0x928); +VALIDATE_OFFSET(CAutomobile, field_92C, 0x92C); +VALIDATE_OFFSET(CAutomobile, m_fLeftDoorOpenForDriveBys, 0x944); +VALIDATE_OFFSET(CAutomobile, m_fRightDoorOpenForDriveBys, 0x948); +VALIDATE_OFFSET(CAutomobile, m_fDoomVerticalRotation, 0x94C); +VALIDATE_OFFSET(CAutomobile, m_fDoomHorizontalRotation, 0x950); +VALIDATE_OFFSET(CAutomobile, m_fForcedOrientation, 0x954); +VALIDATE_OFFSET(CAutomobile, m_fPropRotate, 0x958); +VALIDATE_OFFSET(CAutomobile, m_fCumulativeDamage, 0x95C); +VALIDATE_OFFSET(CAutomobile, m_nNumContactWheels, 0x960); +VALIDATE_OFFSET(CAutomobile, m_nWheelsOnGround, 0x961); +VALIDATE_OFFSET(CAutomobile, m_nNumDriveWheelsOnGroundLastFrame, 0x962); +VALIDATE_OFFSET(CAutomobile, m_fGasPedalAudioRevs, 0x964); +VALIDATE_OFFSET(CAutomobile, m_wheelState, 0x968); +VALIDATE_OFFSET(CAutomobile, m_pNitroParticle, 0x978); +VALIDATE_OFFSET(CAutomobile, m_harvesterParticleCounter, 0x980); +VALIDATE_OFFSET(CAutomobile, m_fireParticleCounter, 0x981); +VALIDATE_OFFSET(CAutomobile, m_heliDustFxTimeConst, 0x984); +VALIDATE_SIZE(CAutomobile, 0x988); #pragma pack(pop) VALIDATE_OFFSET(CAutomobile, m_swingingChassis, 0x70C); diff --git a/plugin_sa/game_sa/CBaseModelInfo.h b/plugin_sa/game_sa/CBaseModelInfo.h index c319504c3..21250a28c 100644 --- a/plugin_sa/game_sa/CBaseModelInfo.h +++ b/plugin_sa/game_sa/CBaseModelInfo.h @@ -18,8 +18,10 @@ struct tTimeInfo unsigned char m_nTimeOff; signed short m_wOtherTimeModel; }; - -VALIDATE_SIZE(tTimeInfo, 4); +VALIDATE_OFFSET(tTimeInfo, m_nTimeOn, 0x0); +VALIDATE_OFFSET(tTimeInfo, m_nTimeOff, 0x1); +VALIDATE_OFFSET(tTimeInfo, m_wOtherTimeModel, 0x2); +VALIDATE_SIZE(tTimeInfo, 0x4); // originally an abstract class class PLUGIN_API CBaseModelInfo { @@ -117,5 +119,17 @@ class PLUGIN_API CBaseModelInfo { void SetOwnsColModel(int bOwns); void IncreaseAlpha(); }; - +VALIDATE_OFFSET(CBaseModelInfo, m_nKey, 0x4); +VALIDATE_OFFSET(CBaseModelInfo, m_nRefCount, 0x8); +VALIDATE_OFFSET(CBaseModelInfo, m_nTxdIndex, 0xA); +VALIDATE_OFFSET(CBaseModelInfo, m_nAlpha, 0xC); +VALIDATE_OFFSET(CBaseModelInfo, m_nNum2dEffects, 0xD); +VALIDATE_OFFSET(CBaseModelInfo, m_n2dEffectIndex, 0xE); +VALIDATE_OFFSET(CBaseModelInfo, m_nObjectInfoIndex, 0x10); +VALIDATE_OFFSET(CBaseModelInfo, m_nFlags, 0x12); +VALIDATE_OFFSET(CBaseModelInfo, m_pColModel, 0x14); +VALIDATE_OFFSET(CBaseModelInfo, m_fDrawDistance, 0x18); +VALIDATE_OFFSET(CBaseModelInfo, m_pRwObject, 0x1C); +VALIDATE_OFFSET(CBaseModelInfo, m_pRwClump, 0x1C); +VALIDATE_OFFSET(CBaseModelInfo, m_pRwAtomic, 0x1C); VALIDATE_SIZE(CBaseModelInfo, 0x20); diff --git a/plugin_sa/game_sa/CBike.h b/plugin_sa/game_sa/CBike.h index d0e527eee..384aea529 100644 --- a/plugin_sa/game_sa/CBike.h +++ b/plugin_sa/game_sa/CBike.h @@ -124,6 +124,53 @@ class CBike : public CVehicle{ void PlaceOnRoadProperly(); void GetCorrectedWorldDoorPosition(CVector& out, CVector arg1, CVector arg2); }; +VALIDATE_OFFSET(CBike, m_aBikeNodes, 0x5A0); +VALIDATE_OFFSET(CBike, m_bLeanMatrixCalculated, 0x5C8); +VALIDATE_OFFSET(CBike, m_mLeanMatrix, 0x5CC); +VALIDATE_OFFSET(CBike, m_nBikeFlags, 0x614); +VALIDATE_OFFSET(CBike, m_vecAveGroundNormal, 0x618); +VALIDATE_OFFSET(CBike, m_vecGroundRight, 0x624); +VALIDATE_OFFSET(CBike, m_vecOldSpeedForPlayback, 0x630); +VALIDATE_OFFSET(CBike, m_pBikeHandlingData, 0x63C); +VALIDATE_OFFSET(CBike, m_rideAnimData, 0x640); +VALIDATE_OFFSET(CBike, m_nWheelStatus, 0x65C); +VALIDATE_OFFSET(CBike, m_anWheelColPoint, 0x660); +VALIDATE_OFFSET(CBike, m_aWheelRatios, 0x710); +VALIDATE_OFFSET(CBike, m_aRatioHistory, 0x720); +VALIDATE_OFFSET(CBike, m_fWheelCounts, 0x730); +VALIDATE_OFFSET(CBike, m_fBrakeCount, 0x740); +VALIDATE_OFFSET(CBike, m_aWheelSkidmarkType, 0x744); +VALIDATE_OFFSET(CBike, m_bWheelBloody, 0x74C); +VALIDATE_OFFSET(CBike, m_bMoreSkidMarks, 0x74E); +VALIDATE_OFFSET(CBike, m_aWheelPitchAngles, 0x750); +VALIDATE_OFFSET(CBike, m_aWheelAngularVelocity, 0x758); +VALIDATE_OFFSET(CBike, m_aWheelSuspensionHeights, 0x760); +VALIDATE_OFFSET(CBike, m_aWheelOrigHeights, 0x768); +VALIDATE_OFFSET(CBike, m_fSuspensionLength, 0x770); +VALIDATE_OFFSET(CBike, m_fLineLength, 0x780); +VALIDATE_OFFSET(CBike, m_fHeightAboveRoad, 0x790); +VALIDATE_OFFSET(CBike, m_fExtraTractionMult, 0x794); +VALIDATE_OFFSET(CBike, m_fSwingArmLength, 0x798); +VALIDATE_OFFSET(CBike, m_fForkYOffset, 0x79C); +VALIDATE_OFFSET(CBike, m_fForkZOffset, 0x7A0); +VALIDATE_OFFSET(CBike, m_fSteerAngleTan, 0x7A4); +VALIDATE_OFFSET(CBike, m_nBrakesOn, 0x7A8); +VALIDATE_OFFSET(CBike, m_fNitroValue, 0x7AC); +VALIDATE_OFFSET(CBike, m_fBrakingSlide, 0x7B0); +VALIDATE_OFFSET(CBike, m_nFixLeftHand, 0x7B4); +VALIDATE_OFFSET(CBike, m_nFixRightHand, 0x7B5); +VALIDATE_OFFSET(CBike, m_nTestPedCollision, 0x7B6); +VALIDATE_OFFSET(CBike, m_fPrevSpeed, 0x7B8); +VALIDATE_OFFSET(CBike, m_fBurningTimer, 0x7BC); +VALIDATE_OFFSET(CBike, m_apWheelCollisionEntity, 0x7C0); +VALIDATE_OFFSET(CBike, m_avTouchPointsLocalSpace, 0x7D0); +VALIDATE_OFFSET(CBike, m_pDamager, 0x800); +VALIDATE_OFFSET(CBike, m_nNumContactWheels, 0x804); +VALIDATE_OFFSET(CBike, m_nNumWheelsOnGround, 0x805); +VALIDATE_OFFSET(CBike, m_nNumDriveWheelsOnGroundLastFrame, 0x806); +VALIDATE_OFFSET(CBike, m_fGasPedalAudioRevs, 0x808); +VALIDATE_OFFSET(CBike, m_wheelState, 0x80C); +VALIDATE_SIZE(CBike, 0x814); #pragma pack(pop) VALIDATE_OFFSET(CBike, m_bLeanMatrixCalculated, 0x5C8); diff --git a/plugin_sa/game_sa/CBirds.h b/plugin_sa/game_sa/CBirds.h index e04b7e06c..55e8cec51 100644 --- a/plugin_sa/game_sa/CBirds.h +++ b/plugin_sa/game_sa/CBirds.h @@ -33,7 +33,18 @@ class PLUGIN_API CBird { char _pad41[3]; public: }; - +VALIDATE_OFFSET(CBird, m_vecPosn, 0x0); +VALIDATE_OFFSET(CBird, m_vecCurrentVelocity, 0xC); +VALIDATE_OFFSET(CBird, m_vecVelocity, 0x18); +VALIDATE_OFFSET(CBird, m_fAngle, 0x24); +VALIDATE_OFFSET(CBird, field_28, 0x28); +VALIDATE_OFFSET(CBird, m_nWingSpeed, 0x2C); +VALIDATE_OFFSET(CBird, m_fSize, 0x30); +VALIDATE_OFFSET(CBird, m_fMaxBirdDistance, 0x34); +VALIDATE_OFFSET(CBird, field_38, 0x38); +VALIDATE_OFFSET(CBird, m_anPolyColors, 0x39); +VALIDATE_OFFSET(CBird, m_bCreated, 0x3F); +VALIDATE_OFFSET(CBird, m_bMustDoCurves, 0x40); VALIDATE_SIZE(CBird, 0x44); extern unsigned int MAX_BIRDS; // default: 6 @@ -52,6 +63,7 @@ class PLUGIN_API CBirds { static void Render(); static void HandleGunShot(CVector const* pointA, CVector const* pointB); }; +VALIDATE_SIZE(CBirds, 0x1); extern float *BIRD_CREATION_COORS_X; // { 0.0f, -1.0f, 2.0f, -3.0f, 1.0f, -2.0f } extern float *BIRD_CREATION_COORS_Y; // { 0.0f, -1.0f, -2.0f, 1.0f, 1.0f, -2.0f } diff --git a/plugin_sa/game_sa/CBmx.h b/plugin_sa/game_sa/CBmx.h index 15b602737..a392bd21d 100644 --- a/plugin_sa/game_sa/CBmx.h +++ b/plugin_sa/game_sa/CBmx.h @@ -47,5 +47,14 @@ class CBmx : public CBike { static void LaunchBunnyHopCB(CAnimBlendAssociation* blendAssoc, void* data); // data is a ptr to CBmx }; - +VALIDATE_OFFSET(CBmx, m_fBunnyHopCharge, 0x814); +VALIDATE_OFFSET(CBmx, field_818, 0x818); +VALIDATE_OFFSET(CBmx, m_fSprintLeanAngle, 0x81C); +VALIDATE_OFFSET(CBmx, field_820, 0x820); +VALIDATE_OFFSET(CBmx, m_fPedalAngleL, 0x824); +VALIDATE_OFFSET(CBmx, m_fPedalAngleR, 0x828); +VALIDATE_OFFSET(CBmx, m_fDistanceBetweenWheels, 0x82C); +VALIDATE_OFFSET(CBmx, m_fWheelsBalance, 0x830); +VALIDATE_OFFSET(CBmx, field_834, 0x834); +VALIDATE_OFFSET(CBmx, _pad, 0x835); VALIDATE_SIZE(CBmx, 0x838); diff --git a/plugin_sa/game_sa/CBoat.h b/plugin_sa/game_sa/CBoat.h index b248ef2cc..bc2f10850 100644 --- a/plugin_sa/game_sa/CBoat.h +++ b/plugin_sa/game_sa/CBoat.h @@ -88,7 +88,29 @@ class CBoat : public CVehicle { static void CheckForSkippingCalculations(); static void FillBoatList(); }; - +VALIDATE_OFFSET(CBoat, m_fMovingHiRotation, 0x5A0); +VALIDATE_OFFSET(CBoat, m_fPropSpeed, 0x5A4); +VALIDATE_OFFSET(CBoat, m_fPropRotation, 0x5A8); +VALIDATE_OFFSET(CBoat, m_nBoatFlags, 0x5AC); +VALIDATE_OFFSET(CBoat, m_aBoatNodes, 0x5B0); +VALIDATE_OFFSET(CBoat, m_boatFlap, 0x5E0); +VALIDATE_OFFSET(CBoat, m_pBoatHandling, 0x5F8); +VALIDATE_OFFSET(CBoat, m_fAnchoredAngle, 0x5FC); +VALIDATE_OFFSET(CBoat, m_nAttackPlayerTime, 0x600); +VALIDATE_OFFSET(CBoat, field_604, 0x604); +VALIDATE_OFFSET(CBoat, m_fBurningTimer, 0x608); +VALIDATE_OFFSET(CBoat, m_pWhoDestroyedMe, 0x60C); +VALIDATE_OFFSET(CBoat, m_vecBoatMoveForce, 0x610); +VALIDATE_OFFSET(CBoat, m_vecBoatTurnForce, 0x61C); +VALIDATE_OFFSET(CBoat, m_apPropSplashFx, 0x628); +VALIDATE_OFFSET(CBoat, m_vecWaterDamping, 0x630); +VALIDATE_OFFSET(CBoat, field_63C, 0x63C); +VALIDATE_OFFSET(CBoat, m_nPadNumber, 0x63D); +VALIDATE_OFFSET(CBoat, m_fWaterResistance, 0x640); +VALIDATE_OFFSET(CBoat, m_nNumWaterTrailPoints, 0x644); +VALIDATE_OFFSET(CBoat, m_avecWakePoints, 0x648); +VALIDATE_OFFSET(CBoat, m_afWakePointLifeTime, 0x748); +VALIDATE_OFFSET(CBoat, m_anWakePointIntensity, 0x7C8); VALIDATE_SIZE(CBoat, 0x7E8); extern float &fShapeLength; // 0.4 diff --git a/plugin_sa/game_sa/CBouncingPanel.h b/plugin_sa/game_sa/CBouncingPanel.h index ab9fed9f1..6a2034469 100644 --- a/plugin_sa/game_sa/CBouncingPanel.h +++ b/plugin_sa/game_sa/CBouncingPanel.h @@ -29,5 +29,9 @@ class PLUGIN_API CBouncingPanel { void SetPanel(short frameId, short axis, float angleLimit); void ProcessPanel(CVehicle* vehicle, RwFrame* frame, CVector arg2, CVector arg3, float arg4, float arg5); }; - +VALIDATE_OFFSET(CBouncingPanel, m_nFrameId, 0x0); +VALIDATE_OFFSET(CBouncingPanel, m_nAxis, 0x2); +VALIDATE_OFFSET(CBouncingPanel, m_fAngleLimit, 0x4); +VALIDATE_OFFSET(CBouncingPanel, m_vecRotation, 0x8); +VALIDATE_OFFSET(CBouncingPanel, m_vecPos, 0x14); VALIDATE_SIZE(CBouncingPanel, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CBoundingBox.h b/plugin_sa/game_sa/CBoundingBox.h index ca38dfad0..8500962b8 100644 --- a/plugin_sa/game_sa/CBoundingBox.h +++ b/plugin_sa/game_sa/CBoundingBox.h @@ -15,5 +15,4 @@ class CBoundingBox : public CBox { CBoundingBox(plugin::dummy_func_t) {} }; - VALIDATE_SIZE(CBoundingBox, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/CBox.h b/plugin_sa/game_sa/CBox.h index d6bb8616c..d25e374aa 100644 --- a/plugin_sa/game_sa/CBox.h +++ b/plugin_sa/game_sa/CBox.h @@ -18,5 +18,6 @@ class CBox { // updates box corners, like (if left>right then swap(left, right)) void Recalc(); }; - +VALIDATE_OFFSET(CBox, m_vecMin, 0x0); +VALIDATE_OFFSET(CBox, m_vecMax, 0xC); VALIDATE_SIZE(CBox, 0x18); diff --git a/plugin_sa/game_sa/CBrightLights.h b/plugin_sa/game_sa/CBrightLights.h index 1340e6f9b..2b806cfe3 100644 --- a/plugin_sa/game_sa/CBrightLights.h +++ b/plugin_sa/game_sa/CBrightLights.h @@ -28,7 +28,15 @@ struct tBrightLight { char field_36; char field_37; }; - +VALIDATE_OFFSET(tBrightLight, m_vecPosition, 0x0); +VALIDATE_OFFSET(tBrightLight, m_vecRight, 0xC); +VALIDATE_OFFSET(tBrightLight, m_vecTop, 0x18); +VALIDATE_OFFSET(tBrightLight, m_vecAt, 0x24); +VALIDATE_OFFSET(tBrightLight, m_fDistanceToCamera, 0x30); +VALIDATE_OFFSET(tBrightLight, m_nColor, 0x34); +VALIDATE_OFFSET(tBrightLight, field_35, 0x35); +VALIDATE_OFFSET(tBrightLight, field_36, 0x36); +VALIDATE_OFFSET(tBrightLight, field_37, 0x37); VALIDATE_SIZE(tBrightLight, 0x38); extern unsigned int MAX_NUM_BRIGHTLIGHTS; // default 32 @@ -42,4 +50,5 @@ class PLUGIN_API CBrightLights { static void Render(); static void RegisterOne(CVector posn, CVector top, CVector right, CVector at, unsigned char color, unsigned char arg5, unsigned char arg6, unsigned char arg7); static void Init(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CBrightLights, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CBuilding.h b/plugin_sa/game_sa/CBuilding.h index 5291eb088..01085c8c3 100644 --- a/plugin_sa/game_sa/CBuilding.h +++ b/plugin_sa/game_sa/CBuilding.h @@ -18,5 +18,4 @@ class CBuilding : public CEntity { static void operator delete(void* data); CBuilding(); }; - VALIDATE_SIZE(CBuilding, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CBulletInfo.h b/plugin_sa/game_sa/CBulletInfo.h index 501dbf99f..cadbdb897 100644 --- a/plugin_sa/game_sa/CBulletInfo.h +++ b/plugin_sa/game_sa/CBulletInfo.h @@ -32,7 +32,13 @@ class PLUGIN_API CBulletInfo { static bool AddBullet(CEntity* creator, eWeaponType weaponType, CVector position, CVector velocity); static void Update(); }; - +VALIDATE_OFFSET(CBulletInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CBulletInfo, m_pCreator, 0x4); +VALIDATE_OFFSET(CBulletInfo, m_nDestroyTime, 0x8); +VALIDATE_OFFSET(CBulletInfo, m_bExists, 0xC); +VALIDATE_OFFSET(CBulletInfo, m_vecPosition, 0x10); +VALIDATE_OFFSET(CBulletInfo, m_vecVelocity, 0x1C); +VALIDATE_OFFSET(CBulletInfo, m_nDamage, 0x28); VALIDATE_SIZE(CBulletInfo, 0x2C); extern unsigned int MAX_BULLET_INFOS; // default 8 diff --git a/plugin_sa/game_sa/CBulletTrace.h b/plugin_sa/game_sa/CBulletTrace.h index c0a3d01df..d78c1ad9e 100644 --- a/plugin_sa/game_sa/CBulletTrace.h +++ b/plugin_sa/game_sa/CBulletTrace.h @@ -26,5 +26,11 @@ class PLUGIN_API CBulletTrace { void Update(); }; - +VALIDATE_OFFSET(CBulletTrace, m_vecStart, 0x0); +VALIDATE_OFFSET(CBulletTrace, m_vecEnd, 0xC); +VALIDATE_OFFSET(CBulletTrace, m_bExists, 0x18); +VALIDATE_OFFSET(CBulletTrace, m_nCreationTime, 0x1C); +VALIDATE_OFFSET(CBulletTrace, m_nLifeTime, 0x20); +VALIDATE_OFFSET(CBulletTrace, m_fRadius, 0x24); +VALIDATE_OFFSET(CBulletTrace, m_nTransparency, 0x28); VALIDATE_SIZE(CBulletTrace, 0x2C); diff --git a/plugin_sa/game_sa/CBulletTraces.h b/plugin_sa/game_sa/CBulletTraces.h index baa11697b..871c39574 100644 --- a/plugin_sa/game_sa/CBulletTraces.h +++ b/plugin_sa/game_sa/CBulletTraces.h @@ -21,3 +21,4 @@ class PLUGIN_API CBulletTraces { static void Update(); static void Init(); }; +VALIDATE_SIZE(CBulletTraces, 0x1); diff --git a/plugin_sa/game_sa/CCam.h b/plugin_sa/game_sa/CCam.h index dc0e9516b..b2d6cb2f0 100644 --- a/plugin_sa/game_sa/CCam.h +++ b/plugin_sa/game_sa/CCam.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "eCamMode.h" #include "CVector.h" @@ -128,5 +127,110 @@ class PLUGIN_API CCam { CPed *m_pLastPedLookedAt; bool m_bFirstPersonRunAboutActive; }; - +VALIDATE_OFFSET(CCam, m_bBelowMinDist, 0x0); +VALIDATE_OFFSET(CCam, m_bBehindPlayerDesired, 0x1); +VALIDATE_OFFSET(CCam, m_bCamLookingAtVector, 0x2); +VALIDATE_OFFSET(CCam, m_bCollisionChecksOn, 0x3); +VALIDATE_OFFSET(CCam, m_bFixingBeta, 0x4); +VALIDATE_OFFSET(CCam, m_bTheHeightFixerVehicleIsATrain, 0x5); +VALIDATE_OFFSET(CCam, m_bLookBehindCamWasInFront, 0x6); +VALIDATE_OFFSET(CCam, m_bLookingBehind, 0x7); +VALIDATE_OFFSET(CCam, m_bLookingLeft, 0x8); +VALIDATE_OFFSET(CCam, m_bLookingRight, 0x9); +VALIDATE_OFFSET(CCam, m_bResetStatics, 0xA); +VALIDATE_OFFSET(CCam, m_bRotating, 0xB); +VALIDATE_OFFSET(CCam, m_nMode, 0xC); +VALIDATE_OFFSET(CCam, m_nFinishTime, 0x10); +VALIDATE_OFFSET(CCam, m_nDoCollisionChecksOnFrameNum, 0x14); +VALIDATE_OFFSET(CCam, m_nDoCollisionCheckEveryNumOfFrames, 0x18); +VALIDATE_OFFSET(CCam, m_nFrameNumWereAt, 0x1C); +VALIDATE_OFFSET(CCam, m_nRunningVectorArrayPos, 0x20); +VALIDATE_OFFSET(CCam, m_nRunningVectorCounter, 0x24); +VALIDATE_OFFSET(CCam, m_nDirectionWasLooking, 0x28); +VALIDATE_OFFSET(CCam, m_fMaxRoleAngle, 0x2C); +VALIDATE_OFFSET(CCam, m_fRoll, 0x30); +VALIDATE_OFFSET(CCam, m_fRollSpeed, 0x34); +VALIDATE_OFFSET(CCam, m_fSyphonModeTargetZOffSet, 0x38); +VALIDATE_OFFSET(CCam, m_fAmountFractionObscured, 0x3C); +VALIDATE_OFFSET(CCam, m_fAlphaSpeedOverOneFrame, 0x40); +VALIDATE_OFFSET(CCam, m_fBetaSpeedOverOneFrame, 0x44); +VALIDATE_OFFSET(CCam, m_fBufferedTargetBeta, 0x48); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientation, 0x4C); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientationSpeed, 0x50); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeight, 0x54); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeightSpeed, 0x58); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffset, 0x5C); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffsetSpeed, 0x60); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffset, 0x64); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffsetSpeed, 0x68); +VALIDATE_OFFSET(CCam, m_fDimensionOfHighestNearCar, 0x6C); +VALIDATE_OFFSET(CCam, m_fDistanceBeforeChanges, 0x70); +VALIDATE_OFFSET(CCam, m_fFovSpeedOverOneFrame, 0x74); +VALIDATE_OFFSET(CCam, m_fMinDistAwayFromCamWhenInterPolating, 0x78); +VALIDATE_OFFSET(CCam, m_fPedBetweenCameraHeightOffset, 0x7C); +VALIDATE_OFFSET(CCam, m_fPlayerInFrontSyphonAngleOffSet, 0x80); +VALIDATE_OFFSET(CCam, m_fRadiusForDead, 0x84); +VALIDATE_OFFSET(CCam, m_fRealGroundDist, 0x88); +VALIDATE_OFFSET(CCam, m_fTargetBeta, 0x8C); +VALIDATE_OFFSET(CCam, m_fTimeElapsedFloat, 0x90); +VALIDATE_OFFSET(CCam, m_fTilt, 0x94); +VALIDATE_OFFSET(CCam, m_fTiltSpeed, 0x98); +VALIDATE_OFFSET(CCam, m_fTransitionBeta, 0x9C); +VALIDATE_OFFSET(CCam, m_fTrueBeta, 0xA0); +VALIDATE_OFFSET(CCam, m_fTrueAlpha, 0xA4); +VALIDATE_OFFSET(CCam, m_fInitialPlayerOrientation, 0xA8); +VALIDATE_OFFSET(CCam, m_fVerticalAngle, 0xAC); +VALIDATE_OFFSET(CCam, m_fAlphaSpeed, 0xB0); +VALIDATE_OFFSET(CCam, m_fFOV, 0xB4); +VALIDATE_OFFSET(CCam, m_fFOVSpeed, 0xB8); +VALIDATE_OFFSET(CCam, m_fHorizontalAngle, 0xBC); +VALIDATE_OFFSET(CCam, m_fBetaSpeed, 0xC0); +VALIDATE_OFFSET(CCam, m_fDistance, 0xC4); +VALIDATE_OFFSET(CCam, m_fDistanceSpeed, 0xC8); +VALIDATE_OFFSET(CCam, m_fCaMinDistance, 0xCC); +VALIDATE_OFFSET(CCam, m_fCaMaxDistance, 0xD0); +VALIDATE_OFFSET(CCam, m_fSpeedVar, 0xD4); +VALIDATE_OFFSET(CCam, m_fCameraHeightMultiplier, 0xD8); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundOne, 0xDC); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundTwo, 0xE0); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundThree, 0xE4); +VALIDATE_OFFSET(CCam, m_fTargetZoomOneZExtra, 0xE8); +VALIDATE_OFFSET(CCam, m_fTargetZoomTwoZExtra, 0xEC); +VALIDATE_OFFSET(CCam, m_fTargetZoomTwoInteriorZExtra, 0xF0); +VALIDATE_OFFSET(CCam, m_fTargetZoomThreeZExtra, 0xF4); +VALIDATE_OFFSET(CCam, m_fTargetZoomZCloseIn, 0xF8); +VALIDATE_OFFSET(CCam, m_fMinRealGroundDist, 0xFC); +VALIDATE_OFFSET(CCam, m_fTargetCloseInDist, 0x100); +VALIDATE_OFFSET(CCam, m_fBeta_Targeting, 0x104); +VALIDATE_OFFSET(CCam, m_fX_Targetting, 0x108); +VALIDATE_OFFSET(CCam, m_fY_Targetting, 0x10C); +VALIDATE_OFFSET(CCam, m_pCarWeAreFocussingOn, 0x110); +VALIDATE_OFFSET(CCam, m_pCarWeAreFocussingOnI, 0x114); +VALIDATE_OFFSET(CCam, m_fCamBumpedHorz, 0x118); +VALIDATE_OFFSET(CCam, m_fCamBumpedVert, 0x11C); +VALIDATE_OFFSET(CCam, m_nCamBumpedTime, 0x120); +VALIDATE_OFFSET(CCam, m_vecSourceSpeedOverOneFrame, 0x124); +VALIDATE_OFFSET(CCam, m_vecTargetSpeedOverOneFrame, 0x130); +VALIDATE_OFFSET(CCam, m_vecUpOverOneFrame, 0x13C); +VALIDATE_OFFSET(CCam, m_vecTargetCoorsForFudgeInter, 0x148); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeVector, 0x154); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeSource, 0x160); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeUpOffSet, 0x16C); +VALIDATE_OFFSET(CCam, m_vecLastAboveWaterCamPosition, 0x178); +VALIDATE_OFFSET(CCam, m_vecBufferedPlayerBodyOffset, 0x184); +VALIDATE_OFFSET(CCam, m_vecFront, 0x190); +VALIDATE_OFFSET(CCam, m_vecSource, 0x19C); +VALIDATE_OFFSET(CCam, m_vecSourceBeforeLookBehind, 0x1A8); +VALIDATE_OFFSET(CCam, m_vecUp, 0x1B4); +VALIDATE_OFFSET(CCam, m_avecPreviousVectors, 0x1C0); +VALIDATE_OFFSET(CCam, m_avecTargetHistoryPos, 0x1D8); +VALIDATE_OFFSET(CCam, m_anTargetHistoryTime, 0x208); +VALIDATE_OFFSET(CCam, m_nCurrentHistoryPoints, 0x218); +VALIDATE_OFFSET(CCam, m_pCamTargetEntity, 0x21C); +VALIDATE_OFFSET(CCam, m_fCameraDistance, 0x220); +VALIDATE_OFFSET(CCam, m_fIdealAlpha, 0x224); +VALIDATE_OFFSET(CCam, m_fPlayerVelocity, 0x228); +VALIDATE_OFFSET(CCam, m_pLastCarEntered, 0x22C); +VALIDATE_OFFSET(CCam, m_pLastPedLookedAt, 0x230); +VALIDATE_OFFSET(CCam, m_bFirstPersonRunAboutActive, 0x234); VALIDATE_SIZE(CCam, 0x238); diff --git a/plugin_sa/game_sa/CCamPathSplines.h b/plugin_sa/game_sa/CCamPathSplines.h index c24a00702..5249e13b4 100644 --- a/plugin_sa/game_sa/CCamPathSplines.h +++ b/plugin_sa/game_sa/CCamPathSplines.h @@ -14,5 +14,5 @@ class PLUGIN_API CCamPathSplines public: float *m_pArrPathData; }; - -VALIDATE_SIZE(CCamPathSplines, 4); \ No newline at end of file +VALIDATE_OFFSET(CCamPathSplines, m_pArrPathData, 0x0); +VALIDATE_SIZE(CCamPathSplines, 0x4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCamera.cpp b/plugin_sa/game_sa/CCamera.cpp index eddae10a6..ac3c8facd 100644 --- a/plugin_sa/game_sa/CCamera.cpp +++ b/plugin_sa/game_sa/CCamera.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCamera.h" diff --git a/plugin_sa/game_sa/CCamera.h b/plugin_sa/game_sa/CCamera.h index c2211bc37..723de6270 100644 --- a/plugin_sa/game_sa/CCamera.h +++ b/plugin_sa/game_sa/CCamera.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPlaceable.h" #include "CCam.h" @@ -475,6 +474,271 @@ class PLUGIN_API CCamera : public CPlaceable { SUPPORTED_10US static void SetColVarsPed(int pedtype, int nCamPedZoom); SUPPORTED_10US static void SetColVarsVehicle(int vehicletype, int CamVehicleZoom); }; +VALIDATE_OFFSET(CCamera, m_bAboveGroundTrainNodesLoaded, 0x18); +VALIDATE_OFFSET(CCamera, m_bBelowGroundTrainNodesLoaded, 0x19); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyBehind, 0x1A); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyInFront, 0x1B); +VALIDATE_OFFSET(CCamera, m_bCameraJustRestored, 0x1C); +VALIDATE_OFFSET(CCamera, m_bcutsceneFinished, 0x1D); +VALIDATE_OFFSET(CCamera, m_bCullZoneChecksOn, 0x1E); +VALIDATE_OFFSET(CCamera, m_bFirstPersonBeingUsed, 0x1F); +VALIDATE_OFFSET(CCamera, m_bJustJumpedOutOf1stPersonBecauseOfTarget, 0x20); +VALIDATE_OFFSET(CCamera, m_bIdleOn, 0x21); +VALIDATE_OFFSET(CCamera, m_bInATunnelAndABigVehicle, 0x22); +VALIDATE_OFFSET(CCamera, m_bInitialNodeFound, 0x23); +VALIDATE_OFFSET(CCamera, m_bInitialNoNodeStaticsSet, 0x24); +VALIDATE_OFFSET(CCamera, m_bIgnoreFadingStuffForMusic, 0x25); +VALIDATE_OFFSET(CCamera, m_bPlayerIsInGarage, 0x26); +VALIDATE_OFFSET(CCamera, m_bPlayerWasOnBike, 0x27); +VALIDATE_OFFSET(CCamera, m_bJustCameOutOfGarage, 0x28); +VALIDATE_OFFSET(CCamera, m_bJustInitalised, 0x29); +VALIDATE_OFFSET(CCamera, m_bJust_Switched, 0x2A); +VALIDATE_OFFSET(CCamera, m_bLookingAtPlayer, 0x2B); +VALIDATE_OFFSET(CCamera, m_bLookingAtVector, 0x2C); +VALIDATE_OFFSET(CCamera, m_bMoveCamToAvoidGeom, 0x2D); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicPedCamOn, 0x2E); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicCarCamOn, 0x2F); +VALIDATE_OFFSET(CCamera, m_bRestoreByJumpCut, 0x30); +VALIDATE_OFFSET(CCamera, m_bUseNearClipScript, 0x31); +VALIDATE_OFFSET(CCamera, m_bStartInterScript, 0x32); +VALIDATE_OFFSET(CCamera, m_bStartingSpline, 0x33); +VALIDATE_OFFSET(CCamera, m_bTargetJustBeenOnTrain, 0x34); +VALIDATE_OFFSET(CCamera, m_bTargetJustCameOffTrain, 0x35); +VALIDATE_OFFSET(CCamera, m_bUseSpecialFovTrain, 0x36); +VALIDATE_OFFSET(CCamera, m_bUseTransitionBeta, 0x37); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValuePed, 0x38); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValueCar, 0x39); +VALIDATE_OFFSET(CCamera, m_bWaitForInterpolToFinish, 0x3A); +VALIDATE_OFFSET(CCamera, m_bItsOkToLookJustAtThePlayer, 0x3B); +VALIDATE_OFFSET(CCamera, m_bWantsToSwitchWidescreenOff, 0x3C); +VALIDATE_OFFSET(CCamera, m_bWideScreenOn, 0x3D); +VALIDATE_OFFSET(CCamera, m_b1rstPersonRunCloseToAWall, 0x3E); +VALIDATE_OFFSET(CCamera, m_bHeadBob, 0x3F); +VALIDATE_OFFSET(CCamera, m_bVehicleSuspenHigh, 0x40); +VALIDATE_OFFSET(CCamera, m_bEnable1rstPersonCamCntrlsScript, 0x41); +VALIDATE_OFFSET(CCamera, m_bAllow1rstPersonWeaponsCamera, 0x42); +VALIDATE_OFFSET(CCamera, m_bCooperativeCamMode, 0x43); +VALIDATE_OFFSET(CCamera, m_bAllowShootingWith2PlayersInCar, 0x44); +VALIDATE_OFFSET(CCamera, m_bDisableFirstPersonInCar, 0x45); +VALIDATE_OFFSET(CCamera, m_nModeForTwoPlayersSeparateCars, 0x46); +VALIDATE_OFFSET(CCamera, m_nModeForTwoPlayersSameCarShootingAllowed, 0x48); +VALIDATE_OFFSET(CCamera, m_nModeForTwoPlayersSameCarShootingNotAllowed, 0x4A); +VALIDATE_OFFSET(CCamera, m_nModeForTwoPlayersNotBothInCar, 0x4C); +VALIDATE_OFFSET(CCamera, m_bGarageFixedCamPositionSet, 0x4E); +VALIDATE_OFFSET(CCamera, m_bDoingSpecialInterPolation, 0x4F); +VALIDATE_OFFSET(CCamera, m_bScriptParametersSetForInterPol, 0x50); +VALIDATE_OFFSET(CCamera, m_bFading, 0x51); +VALIDATE_OFFSET(CCamera, m_bMusicFading, 0x52); +VALIDATE_OFFSET(CCamera, m_bMusicFadedOut, 0x53); +VALIDATE_OFFSET(CCamera, m_bFailedCullZoneTestPreviously, 0x54); +VALIDATE_OFFSET(CCamera, m_bFadeTargetIsSplashScreen, 0x55); +VALIDATE_OFFSET(CCamera, m_bWorldViewerBeingUsed, 0x56); +VALIDATE_OFFSET(CCamera, m_bTransitionJUSTStarted, 0x57); +VALIDATE_OFFSET(CCamera, m_bTransitionState, 0x58); +VALIDATE_OFFSET(CCamera, m_nActiveCam, 0x59); +VALIDATE_OFFSET(CCamera, m_nCamShakeStart, 0x5C); +VALIDATE_OFFSET(CCamera, m_nFirstPersonCamLastInputTime, 0x60); +VALIDATE_OFFSET(CCamera, m_nLongestTimeInMill, 0x64); +VALIDATE_OFFSET(CCamera, m_nNumberOfTrainCamNodes, 0x68); +VALIDATE_OFFSET(CCamera, m_nTimeLastChange, 0x6C); +VALIDATE_OFFSET(CCamera, m_nTimeWeLeftIdle_StillNoInput, 0x70); +VALIDATE_OFFSET(CCamera, m_nTimeWeEnteredIdle, 0x74); +VALIDATE_OFFSET(CCamera, m_nTimeTransitionStart, 0x78); +VALIDATE_OFFSET(CCamera, m_nTransitionDuration, 0x7C); +VALIDATE_OFFSET(CCamera, m_nTransitionDurationTargetCoors, 0x80); +VALIDATE_OFFSET(CCamera, m_nBlurBlue, 0x84); +VALIDATE_OFFSET(CCamera, m_nBlurGreen, 0x88); +VALIDATE_OFFSET(CCamera, m_nBlurRed, 0x8C); +VALIDATE_OFFSET(CCamera, m_nBlurType, 0x90); +VALIDATE_OFFSET(CCamera, m_nWorkOutSpeedThisNumFrames, 0x94); +VALIDATE_OFFSET(CCamera, m_nNumFramesSoFar, 0x98); +VALIDATE_OFFSET(CCamera, m_nCurrentTrainCamNode, 0x9C); +VALIDATE_OFFSET(CCamera, m_nMotionBlur, 0xA0); +VALIDATE_OFFSET(CCamera, m_nMotionBlurAddAlpha, 0xA4); +VALIDATE_OFFSET(CCamera, m_nCheckCullZoneThisNumFrames, 0xA8); +VALIDATE_OFFSET(CCamera, m_nZoneCullFrameNumWereAt, 0xAC); +VALIDATE_OFFSET(CCamera, m_nWhoIsInControlOfTheCamera, 0xB0); +VALIDATE_OFFSET(CCamera, m_nCarZoom, 0xB4); +VALIDATE_OFFSET(CCamera, m_fCarZoomBase, 0xB8); +VALIDATE_OFFSET(CCamera, m_fCarZoomTotal, 0xBC); +VALIDATE_OFFSET(CCamera, m_fCarZoomSmoothed, 0xC0); +VALIDATE_OFFSET(CCamera, m_fCarZoomValueScript, 0xC4); +VALIDATE_OFFSET(CCamera, m_nPedZoom, 0xC8); +VALIDATE_OFFSET(CCamera, m_fPedZoomBase, 0xCC); +VALIDATE_OFFSET(CCamera, m_fPedZoomTotal, 0xD0); +VALIDATE_OFFSET(CCamera, m_fPedZoomSmoothed, 0xD4); +VALIDATE_OFFSET(CCamera, m_fPedZoomValueScript, 0xD8); +VALIDATE_OFFSET(CCamera, m_fCamFrontXNorm, 0xDC); +VALIDATE_OFFSET(CCamera, m_fCamFrontYNorm, 0xE0); +VALIDATE_OFFSET(CCamera, m_fDistanceToWater, 0xE4); +VALIDATE_OFFSET(CCamera, m_fHeightOfNearestWater, 0xE8); +VALIDATE_OFFSET(CCamera, m_fFOVDuringInter, 0xEC); +VALIDATE_OFFSET(CCamera, m_fLODDistMultiplier, 0xF0); +VALIDATE_OFFSET(CCamera, m_fGenerationDistMultiplier, 0xF4); +VALIDATE_OFFSET(CCamera, m_fAlphaSpeedAtStartInter, 0xF8); +VALIDATE_OFFSET(CCamera, m_fAlphaWhenInterPol, 0xFC); +VALIDATE_OFFSET(CCamera, m_fAlphaDuringInterPol, 0x100); +VALIDATE_OFFSET(CCamera, m_fBetaDuringInterPol, 0x104); +VALIDATE_OFFSET(CCamera, m_fBetaSpeedAtStartInter, 0x108); +VALIDATE_OFFSET(CCamera, m_fBetaWhenInterPol, 0x10C); +VALIDATE_OFFSET(CCamera, m_fFOVWhenInterPol, 0x110); +VALIDATE_OFFSET(CCamera, m_fFOVSpeedAtStartInter, 0x114); +VALIDATE_OFFSET(CCamera, m_fStartingBetaForInterPol, 0x118); +VALIDATE_OFFSET(CCamera, m_fStartingAlphaForInterPol, 0x11C); +VALIDATE_OFFSET(CCamera, m_fPedOrientForBehindOrInFront, 0x120); +VALIDATE_OFFSET(CCamera, m_fCameraAverageSpeed, 0x124); +VALIDATE_OFFSET(CCamera, m_fCameraSpeedSoFar, 0x128); +VALIDATE_OFFSET(CCamera, m_fCamShakeForce, 0x12C); +VALIDATE_OFFSET(CCamera, m_fFovForTrain, 0x130); +VALIDATE_OFFSET(CCamera, m_fFOV_Wide_Screen, 0x134); +VALIDATE_OFFSET(CCamera, m_fNearClipScript, 0x138); +VALIDATE_OFFSET(CCamera, m_fOldBetaDiff, 0x13C); +VALIDATE_OFFSET(CCamera, m_fPositionAlongSpline, 0x140); +VALIDATE_OFFSET(CCamera, m_fScreenReductionPercentage, 0x144); +VALIDATE_OFFSET(CCamera, m_fScreenReductionSpeed, 0x148); +VALIDATE_OFFSET(CCamera, m_fAlphaForPlayerAnim1rstPerson, 0x14C); +VALIDATE_OFFSET(CCamera, m_fOrientation, 0x150); +VALIDATE_OFFSET(CCamera, m_fPlayerExhaustion, 0x154); +VALIDATE_OFFSET(CCamera, m_fSoundDistUp, 0x158); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsRead, 0x15C); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsReadOld, 0x160); +VALIDATE_OFFSET(CCamera, m_fAvoidTheGeometryProbsTimer, 0x164); +VALIDATE_OFFSET(CCamera, m_nAvoidTheGeometryProbsDirn, 0x168); +VALIDATE_OFFSET(CCamera, m_fWideScreenReductionAmount, 0x16C); +VALIDATE_OFFSET(CCamera, m_fStartingFOVForInterPol, 0x170); +VALIDATE_OFFSET(CCamera, m_aCams, 0x174); +VALIDATE_OFFSET(CCamera, m_pToGarageWeAreIn, 0x81C); +VALIDATE_OFFSET(CCamera, m_pToGarageWeAreInForHackAvoidFirstPerson, 0x820); +VALIDATE_OFFSET(CCamera, m_PlayerMode, 0x824); +VALIDATE_OFFSET(CCamera, m_PlayerWeaponMode, 0x830); +VALIDATE_OFFSET(CCamera, m_vecPreviousCameraPosition, 0x83C); +VALIDATE_OFFSET(CCamera, m_vecRealPreviousCameraPosition, 0x848); +VALIDATE_OFFSET(CCamera, m_vecAimingTargetCoors, 0x854); +VALIDATE_OFFSET(CCamera, m_vecFixedModeVector, 0x860); +VALIDATE_OFFSET(CCamera, m_vecFixedModeSource, 0x86C); +VALIDATE_OFFSET(CCamera, m_vecFixedModeUpOffSet, 0x878); +VALIDATE_OFFSET(CCamera, m_vecCutSceneOffset, 0x884); +VALIDATE_OFFSET(CCamera, m_vecStartingSourceForInterPol, 0x890); +VALIDATE_OFFSET(CCamera, m_vecStartingTargetForInterPol, 0x89C); +VALIDATE_OFFSET(CCamera, m_vecStartingUpForInterPol, 0x8A8); +VALIDATE_OFFSET(CCamera, m_vecSourceSpeedAtStartInter, 0x8B4); +VALIDATE_OFFSET(CCamera, m_vecTargetSpeedAtStartInter, 0x8C0); +VALIDATE_OFFSET(CCamera, m_vecUpSpeedAtStartInter, 0x8CC); +VALIDATE_OFFSET(CCamera, m_vecSourceWhenInterPol, 0x8D8); +VALIDATE_OFFSET(CCamera, m_vecTargetWhenInterPol, 0x8E4); +VALIDATE_OFFSET(CCamera, m_vecUpWhenInterPol, 0x8F0); +VALIDATE_OFFSET(CCamera, m_vecClearGeometryVec, 0x8FC); +VALIDATE_OFFSET(CCamera, m_vecGameCamPos, 0x908); +VALIDATE_OFFSET(CCamera, m_vecSourceDuringInter, 0x914); +VALIDATE_OFFSET(CCamera, m_vecTargetDuringInter, 0x920); +VALIDATE_OFFSET(CCamera, m_vecUpDuringInter, 0x92C); +VALIDATE_OFFSET(CCamera, m_vecAttachedCamOffset, 0x938); +VALIDATE_OFFSET(CCamera, m_vecAttachedCamLookAt, 0x944); +VALIDATE_OFFSET(CCamera, m_fAttachedCamAngle, 0x950); +VALIDATE_OFFSET(CCamera, m_pRwCamera, 0x954); +VALIDATE_OFFSET(CCamera, m_pTargetEntity, 0x958); +VALIDATE_OFFSET(CCamera, m_pAttachedEntity, 0x95C); +VALIDATE_OFFSET(CCamera, m_aPathArray, 0x960); +VALIDATE_OFFSET(CCamera, m_bMirrorActive, 0x970); +VALIDATE_OFFSET(CCamera, m_bResetOldMatrix, 0x971); +VALIDATE_OFFSET(CCamera, m_mCameraMatrix, 0x974); +VALIDATE_OFFSET(CCamera, m_mCameraMatrixOld, 0x9BC); +VALIDATE_OFFSET(CCamera, m_mViewMatrix, 0xA04); +VALIDATE_OFFSET(CCamera, m_mMatInverse, 0xA4C); +VALIDATE_OFFSET(CCamera, m_mMatMirrorInverse, 0xA94); +VALIDATE_OFFSET(CCamera, m_mMatMirror, 0xADC); +VALIDATE_OFFSET(CCamera, m_avecFrustumNormals, 0xB24); +VALIDATE_OFFSET(CCamera, m_avecFrustumWorldNormals, 0xB54); +VALIDATE_OFFSET(CCamera, m_avecFrustumWorldNormals_Mirror, 0xB84); +VALIDATE_OFFSET(CCamera, m_fFrustumPlaneOffsets, 0xBB4); +VALIDATE_OFFSET(CCamera, m_fFrustumPlaneOffsets_Mirror, 0xBC4); +VALIDATE_OFFSET(CCamera, m_vecRightFrustumNormal, 0xBD4); +VALIDATE_OFFSET(CCamera, m_vecBottomFrustumNormal, 0xBE0); +VALIDATE_OFFSET(CCamera, m_vecTopFrustumNormal, 0xBEC); +VALIDATE_OFFSET(CCamera, field_BF8, 0xBF8); +VALIDATE_OFFSET(CCamera, m_fFadeAlpha, 0xBFC); +VALIDATE_OFFSET(CCamera, m_fEffectsFaderScalingFactor, 0xC00); +VALIDATE_OFFSET(CCamera, m_fFadeDuration, 0xC04); +VALIDATE_OFFSET(CCamera, m_fTimeToFadeMusic, 0xC08); +VALIDATE_OFFSET(CCamera, m_fTimeToWaitToFadeMusic, 0xC0C); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopMoving, 0xC10); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopCatchUp, 0xC14); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopMovingTarget, 0xC18); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopCatchUpTarget, 0xC1C); +VALIDATE_OFFSET(CCamera, m_fGaitSwayBuffer, 0xC20); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToStopMoving, 0xC24); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToCatchUp, 0xC28); +VALIDATE_OFFSET(CCamera, m_nScriptTimeForInterPolation, 0xC2C); +VALIDATE_OFFSET(CCamera, m_nFadeInOutFlag, 0xC30); +VALIDATE_OFFSET(CCamera, m_nModeObbeCamIsInForCar, 0xC34); +VALIDATE_OFFSET(CCamera, m_nModeToGoTo, 0xC38); +VALIDATE_OFFSET(CCamera, m_nMusicFadingDirection, 0xC3A); +VALIDATE_OFFSET(CCamera, m_nTypeOfSwitch, 0xC3C); +VALIDATE_OFFSET(CCamera, m_nFadeStartTime, 0xC40); +VALIDATE_OFFSET(CCamera, m_nFadeTimeStartedMusic, 0xC44); +VALIDATE_OFFSET(CCamera, m_nExtraEntitiesCount, 0xC48); +VALIDATE_OFFSET(CCamera, m_pExtraEntity, 0xC4C); +VALIDATE_OFFSET(CCamera, m_fDuckCamMotionFactor, 0xC54); +VALIDATE_OFFSET(CCamera, m_fDuckAimCamMotionFactor, 0xC58); +VALIDATE_OFFSET(CCamera, m_fTrackLinearStartTime, 0xC5C); +VALIDATE_OFFSET(CCamera, m_fTrackLinearEndTime, 0xC60); +VALIDATE_OFFSET(CCamera, m_vecTrackLinearEndPoint, 0xC64); +VALIDATE_OFFSET(CCamera, m_vecTrackLinearStartPoint, 0xC70); +VALIDATE_OFFSET(CCamera, m_bTrackLinearWithEase, 0xC7C); +VALIDATE_OFFSET(CCamera, field_C7D, 0xC7D); +VALIDATE_OFFSET(CCamera, field_C7E, 0xC7E); +VALIDATE_OFFSET(CCamera, field_C7F, 0xC7F); +VALIDATE_OFFSET(CCamera, m_vecTrackLinear, 0xC80); +VALIDATE_OFFSET(CCamera, m_bVecTrackLinearProcessed, 0xC8C); +VALIDATE_OFFSET(CCamera, field_C8D, 0xC8D); +VALIDATE_OFFSET(CCamera, field_C8E, 0xC8E); +VALIDATE_OFFSET(CCamera, field_C8F, 0xC8F); +VALIDATE_OFFSET(CCamera, m_fShakeIntensity, 0xC90); +VALIDATE_OFFSET(CCamera, m_fStartShakeTime, 0xC94); +VALIDATE_OFFSET(CCamera, m_fEndShakeTime, 0xC98); +VALIDATE_OFFSET(CCamera, field_C9C, 0xC9C); +VALIDATE_OFFSET(CCamera, m_nShakeType, 0xCA0); +VALIDATE_OFFSET(CCamera, m_fStartZoomTime, 0xCA4); +VALIDATE_OFFSET(CCamera, m_fEndZoomTime, 0xCA8); +VALIDATE_OFFSET(CCamera, m_fZoomInFactor, 0xCAC); +VALIDATE_OFFSET(CCamera, m_fZoomOutFactor, 0xCB0); +VALIDATE_OFFSET(CCamera, m_nZoomMode, 0xCB4); +VALIDATE_OFFSET(CCamera, m_bFOVLerpProcessed, 0xCB5); +VALIDATE_OFFSET(CCamera, field_CB6, 0xCB6); +VALIDATE_OFFSET(CCamera, field_CB7, 0xCB7); +VALIDATE_OFFSET(CCamera, m_fFOVNew, 0xCB8); +VALIDATE_OFFSET(CCamera, m_fMoveLinearStartTime, 0xCBC); +VALIDATE_OFFSET(CCamera, m_fMoveLinearEndTime, 0xCC0); +VALIDATE_OFFSET(CCamera, m_vecMoveLinearPosnStart, 0xCC4); +VALIDATE_OFFSET(CCamera, m_vecMoveLinearPosnEnd, 0xCD0); +VALIDATE_OFFSET(CCamera, m_bMoveLinearWithEase, 0xCDC); +VALIDATE_OFFSET(CCamera, field_CDD, 0xCDD); +VALIDATE_OFFSET(CCamera, field_CDE, 0xCDE); +VALIDATE_OFFSET(CCamera, field_CDF, 0xCDF); +VALIDATE_OFFSET(CCamera, m_vecMoveLinear, 0xCE0); +VALIDATE_OFFSET(CCamera, m_bVecMoveLinearProcessed, 0xCEC); +VALIDATE_OFFSET(CCamera, m_bBlockZoom, 0xCED); +VALIDATE_OFFSET(CCamera, m_bCameraPersistPosition, 0xCEE); +VALIDATE_OFFSET(CCamera, m_bCameraPersistTrack, 0xCEF); +VALIDATE_OFFSET(CCamera, m_bCinemaCamera, 0xCF0); +VALIDATE_OFFSET(CCamera, field_CF1, 0xCF1); +VALIDATE_OFFSET(CCamera, field_CF2, 0xCF2); +VALIDATE_OFFSET(CCamera, field_CF3, 0xCF3); +VALIDATE_OFFSET(CCamera, m_aCamTweak, 0xCF4); +VALIDATE_OFFSET(CCamera, m_bCameraVehicleTweaksInitialized, 0xD44); +VALIDATE_OFFSET(CCamera, m_fCurrentTweakDistance, 0xD48); +VALIDATE_OFFSET(CCamera, m_fCurrentTweakAltitude, 0xD4C); +VALIDATE_OFFSET(CCamera, m_fCurrentTweakAngle, 0xD50); +VALIDATE_OFFSET(CCamera, m_nCurrentTweakModelIndex, 0xD54); +VALIDATE_OFFSET(CCamera, field_D58, 0xD58); +VALIDATE_OFFSET(CCamera, field_D5C, 0xD5C); +VALIDATE_OFFSET(CCamera, field_D60, 0xD60); +VALIDATE_OFFSET(CCamera, field_D64, 0xD64); +VALIDATE_OFFSET(CCamera, field_D68, 0xD68); +VALIDATE_OFFSET(CCamera, field_D6C, 0xD6C); +VALIDATE_OFFSET(CCamera, field_D70, 0xD70); +VALIDATE_OFFSET(CCamera, field_D74, 0xD74); +VALIDATE_SIZE(CCamera, 0xD78); VTABLE_DESC(CCamera, 0x8630E8, 1); diff --git a/plugin_sa/game_sa/CCarAI.cpp b/plugin_sa/game_sa/CCarAI.cpp index ad0b9f194..8cf592172 100644 --- a/plugin_sa/game_sa/CCarAI.cpp +++ b/plugin_sa/game_sa/CCarAI.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CCarAI.h" // Converted from cdecl void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle *pVehicle) 0x41BFA0 diff --git a/plugin_sa/game_sa/CCarAI.h b/plugin_sa/game_sa/CCarAI.h index fe96922b8..d1a556db5 100644 --- a/plugin_sa/game_sa/CCarAI.h +++ b/plugin_sa/game_sa/CCarAI.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -30,4 +30,5 @@ class PLUGIN_API CCarAI static void UpdateCarAI(CVehicle* pVehicle); static char FindPoliceCarMissionForWantedLevel(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCarAI, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCarCtrl.h b/plugin_sa/game_sa/CCarCtrl.h index d3bca183e..92998555a 100644 --- a/plugin_sa/game_sa/CCarCtrl.h +++ b/plugin_sa/game_sa/CCarCtrl.h @@ -147,4 +147,5 @@ class PLUGIN_API CCarCtrl static void WeaveThroughCarsSectorList(CPtrList& PtrList, CVehicle* pVehicle, CPhysical* pPhysical, float arg4, float arg5, float arg6, float arg7, float* arg8, float* arg9); static void WeaveThroughObjectsSectorList(CPtrList& PtrList, CVehicle* pVehicle, float arg3, float arg4, float arg5, float arg6, float* arg7, float* arg8); static void WeaveThroughPedsSectorList(CPtrList& PtrList, CVehicle* pVehicle, CPhysical* pPhysical, float arg4, float arg5, float arg6, float arg7, float* arg8, float* arg9); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCarCtrl, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCarEnterExit.h b/plugin_sa/game_sa/CCarEnterExit.h index b7adefa12..1c1c90a02 100644 --- a/plugin_sa/game_sa/CCarEnterExit.h +++ b/plugin_sa/game_sa/CCarEnterExit.h @@ -58,5 +58,6 @@ class PLUGIN_API CCarEnterExit { SUPPORTED_10US static void SetAnimOffsetForEnterOrExitVehicle(); SUPPORTED_10US static void SetPedInCarDirect(CPed *ped, CVehicle *vehicle, int seatNumber, bool bAsDriver); }; +VALIDATE_SIZE(CCarEnterExit, 0x1); #include "meta/meta.CCarEnterExit.h" diff --git a/plugin_sa/game_sa/CCarGenerator.cpp b/plugin_sa/game_sa/CCarGenerator.cpp index 07adcc7af..df859e8f0 100644 --- a/plugin_sa/game_sa/CCarGenerator.cpp +++ b/plugin_sa/game_sa/CCarGenerator.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCarGenerator.h" diff --git a/plugin_sa/game_sa/CCarGenerator.h b/plugin_sa/game_sa/CCarGenerator.h index 0708f0b41..b476c29b5 100644 --- a/plugin_sa/game_sa/CCarGenerator.h +++ b/plugin_sa/game_sa/CCarGenerator.h @@ -58,7 +58,21 @@ class PLUGIN_API CCarGenerator { //! unused SUPPORTED_10US static CCarGenerator *Get(unsigned short index); }; - +VALIDATE_OFFSET(CCarGenerator, m_nModelId, 0x0); +VALIDATE_OFFSET(CCarGenerator, m_nColor1, 0x2); +VALIDATE_OFFSET(CCarGenerator, m_nColor2, 0x3); +VALIDATE_OFFSET(CCarGenerator, m_vecPosn, 0x4); +VALIDATE_OFFSET(CCarGenerator, m_nAngle, 0xA); +VALIDATE_OFFSET(CCarGenerator, m_nAlarm, 0xB); +VALIDATE_OFFSET(CCarGenerator, m_nDoorLock, 0xC); +VALIDATE_OFFSET(CCarGenerator, m_nFlags, 0xD); +VALIDATE_OFFSET(CCarGenerator, m_nMinDelay, 0xE); +VALIDATE_OFFSET(CCarGenerator, m_nMaxDelay, 0x10); +VALIDATE_OFFSET(CCarGenerator, m_nNextGenTime, 0x14); +VALIDATE_OFFSET(CCarGenerator, m_nVehicleHandle, 0x18); +VALIDATE_OFFSET(CCarGenerator, m_nGenerateCount, 0x1A); +VALIDATE_OFFSET(CCarGenerator, m_nIplId, 0x1C); +VALIDATE_OFFSET(CCarGenerator, m_bIsUsed, 0x1D); VALIDATE_SIZE(CCarGenerator, 0x20); #include "meta/meta.CCarGenerator.h" \ No newline at end of file diff --git a/plugin_sa/game_sa/CCarPathLink.h b/plugin_sa/game_sa/CCarPathLink.h index b6579d9a6..e03c1c1ef 100644 --- a/plugin_sa/game_sa/CCarPathLink.h +++ b/plugin_sa/game_sa/CCarPathLink.h @@ -28,7 +28,11 @@ class PLUGIN_API CCarPathLink { SUPPORTED_10US float OneWayLaneOffset(); }; - +VALIDATE_OFFSET(CCarPathLink, m_vecPosn, 0x0); +VALIDATE_OFFSET(CCarPathLink, m_address, 0x4); +VALIDATE_OFFSET(CCarPathLink, m_nDirX, 0x8); +VALIDATE_OFFSET(CCarPathLink, m_nDirY, 0x9); +VALIDATE_OFFSET(CCarPathLink, m_nPathNodeWidth, 0xA); VALIDATE_SIZE(CCarPathLink, 0xE); #include "meta/meta.CCarPathLink.h" diff --git a/plugin_sa/game_sa/CCarPathLinkAddress.h b/plugin_sa/game_sa/CCarPathLinkAddress.h index 733d1c31b..566513079 100644 --- a/plugin_sa/game_sa/CCarPathLinkAddress.h +++ b/plugin_sa/game_sa/CCarPathLinkAddress.h @@ -13,5 +13,4 @@ class PLUGIN_API CCarPathLinkAddress { short m_nCarPathLinkId : 10; short m_nAreaId : 6; }; - VALIDATE_SIZE(CCarPathLinkAddress, 0x2); diff --git a/plugin_sa/game_sa/CCheat.h b/plugin_sa/game_sa/CCheat.h index 42bab8fdf..d92a05696 100644 --- a/plugin_sa/game_sa/CCheat.h +++ b/plugin_sa/game_sa/CCheat.h @@ -192,5 +192,6 @@ class PLUGIN_API CCheat { SUPPORTED_10US static void ResetCheats(); }; +VALIDATE_SIZE(CCheat, 0x1); #include "meta/meta.CCheat.h" diff --git a/plugin_sa/game_sa/CCheckpoint.h b/plugin_sa/game_sa/CCheckpoint.h index 72c8459e8..6389653e3 100644 --- a/plugin_sa/game_sa/CCheckpoint.h +++ b/plugin_sa/game_sa/CCheckpoint.h @@ -27,5 +27,17 @@ class PLUGIN_API CCheckpoint { void Render(); }; - +VALIDATE_OFFSET(CCheckpoint, m_nType, 0x0); +VALIDATE_OFFSET(CCheckpoint, m_bIsUsed, 0x2); +VALIDATE_OFFSET(CCheckpoint, m_bMustBeRenderedThisFrame, 0x3); +VALIDATE_OFFSET(CCheckpoint, m_nIdentifier, 0x4); +VALIDATE_OFFSET(CCheckpoint, m_colour, 0x8); +VALIDATE_OFFSET(CCheckpoint, m_nPulsePeriod, 0xC); +VALIDATE_OFFSET(CCheckpoint, m_nRotateRate, 0xE); +VALIDATE_OFFSET(CCheckpoint, m_vecPosition, 0x10); +VALIDATE_OFFSET(CCheckpoint, m_vecDirection, 0x1C); +VALIDATE_OFFSET(CCheckpoint, m_fPulseFraction, 0x28); +VALIDATE_OFFSET(CCheckpoint, m_fSize, 0x2C); +VALIDATE_OFFSET(CCheckpoint, m_fDistanceToPlayer, 0x30); +VALIDATE_OFFSET(CCheckpoint, m_multiSize, 0x34); VALIDATE_SIZE(CCheckpoint, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCheckpoints.h b/plugin_sa/game_sa/CCheckpoints.h index 46c4ffd60..464c9ad98 100644 --- a/plugin_sa/game_sa/CCheckpoints.h +++ b/plugin_sa/game_sa/CCheckpoints.h @@ -24,4 +24,5 @@ class PLUGIN_API CCheckpoints { static void Shutdown(); static void Update(); static void UpdatePos(unsigned int id, CVector& posn); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCheckpoints, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCivilianPed.h b/plugin_sa/game_sa/CCivilianPed.h index d261202c3..264f52a24 100644 --- a/plugin_sa/game_sa/CCivilianPed.h +++ b/plugin_sa/game_sa/CCivilianPed.h @@ -13,5 +13,4 @@ class PLUGIN_API CCivilianPed : public CPed { public: CCivilianPed(ePedType pedType, unsigned int modelIndex); }; - VALIDATE_SIZE(CCivilianPed, 0x79C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CClock.h b/plugin_sa/game_sa/CClock.h index 42855e1c0..636109052 100644 --- a/plugin_sa/game_sa/CClock.h +++ b/plugin_sa/game_sa/CClock.h @@ -47,5 +47,6 @@ class PLUGIN_API CClock { //! Updates a time SUPPORTED_10US static void Update(); }; +VALIDATE_SIZE(CClock, 0x1); #include "meta/meta.CClock.h" diff --git a/plugin_sa/game_sa/CClothes.cpp b/plugin_sa/game_sa/CClothes.cpp index 657c099c0..049950823 100644 --- a/plugin_sa/game_sa/CClothes.cpp +++ b/plugin_sa/game_sa/CClothes.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CClothes.h" // Converted from cdecl void CClothes::ConstructPedModel(uint modelid,CPedClothesDesc &newclothes,CPedClothesDesc const*oldclothes,bool bCutscenePlayer) 0x5A81E0 diff --git a/plugin_sa/game_sa/CClothes.h b/plugin_sa/game_sa/CClothes.h index 06c3e50a1..7d0a1a9fe 100644 --- a/plugin_sa/game_sa/CClothes.h +++ b/plugin_sa/game_sa/CClothes.h @@ -26,3 +26,4 @@ class PLUGIN_API CClothes static eClothesTexturePart GetDependentTexture(int eClothesModelPart); static int GetDefaultPlayerMotionGroup(); }; +VALIDATE_SIZE(CClothes, 0x1); diff --git a/plugin_sa/game_sa/CClothesBuilder.cpp b/plugin_sa/game_sa/CClothesBuilder.cpp index 068f680ac..08b0839d9 100644 --- a/plugin_sa/game_sa/CClothesBuilder.cpp +++ b/plugin_sa/game_sa/CClothesBuilder.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CClothesBuilder.h" // Converted from cdecl void CClothesBuilder::BlendTextures(RwTexture *texture,RwTexture *texture,RwTexture *texture,float factorA,float factorB,float factorC,int arg7,RwTexture *texture) 0x5A5BC0 diff --git a/plugin_sa/game_sa/CClothesBuilder.h b/plugin_sa/game_sa/CClothesBuilder.h index b47d21b08..40f6846a9 100644 --- a/plugin_sa/game_sa/CClothesBuilder.h +++ b/plugin_sa/game_sa/CClothesBuilder.h @@ -1,4 +1,3 @@ - /* Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here @@ -42,3 +41,4 @@ class PLUGIN_API CClothesBuilder static bool AddColour(RwRGBA* color); static void FillPalette(RwRGBA* color); }; +VALIDATE_SIZE(CClothesBuilder, 0x1); diff --git a/plugin_sa/game_sa/CClouds.h b/plugin_sa/game_sa/CClouds.h index 66c8b6aa8..fa5cd44d9 100644 --- a/plugin_sa/game_sa/CClouds.h +++ b/plugin_sa/game_sa/CClouds.h @@ -26,6 +26,16 @@ struct tMovingFog { int field_27B4[12]; unsigned int m_nPrimIndices[6]; }; +VALIDATE_OFFSET(tMovingFog, m_bFogSlots, 0x0); +VALIDATE_OFFSET(tMovingFog, m_vecPosn, 0x160); +VALIDATE_OFFSET(tMovingFog, m_fSize, 0x11C8); +VALIDATE_OFFSET(tMovingFog, m_fIntensity, 0x1740); +VALIDATE_OFFSET(tMovingFog, m_fMaxIntensity, 0x1CB8); +VALIDATE_OFFSET(tMovingFog, m_vecWind, 0x2230); +VALIDATE_OFFSET(tMovingFog, m_fSpeed, 0x223C); +VALIDATE_OFFSET(tMovingFog, field_27B4, 0x27B4); +VALIDATE_OFFSET(tMovingFog, m_nPrimIndices, 0x27E4); +VALIDATE_SIZE(tMovingFog, 0x27FC); struct tVolumetricClouds { char m_bSlots[180]; @@ -41,6 +51,19 @@ struct tVolumetricClouds { float m_fCloudUCoords[18]; float m_fCloudVCoords[18]; }; +VALIDATE_OFFSET(tVolumetricClouds, m_bSlots, 0x0); +VALIDATE_OFFSET(tVolumetricClouds, m_bInsideVisibilityRange, 0xB4); +VALIDATE_OFFSET(tVolumetricClouds, field_168, 0x168); +VALIDATE_OFFSET(tVolumetricClouds, field_9D8, 0x9D8); +VALIDATE_OFFSET(tVolumetricClouds, m_nHeight, 0x1248); +VALIDATE_OFFSET(tVolumetricClouds, m_pTex, 0x1518); +VALIDATE_OFFSET(tVolumetricClouds, m_vecCloudsSpace, 0x151C); +VALIDATE_OFFSET(tVolumetricClouds, m_fCloudXCoords, 0x1540); +VALIDATE_OFFSET(tVolumetricClouds, m_fCloudYCoords, 0x1588); +VALIDATE_OFFSET(tVolumetricClouds, m_fCloudZCoords, 0x15D0); +VALIDATE_OFFSET(tVolumetricClouds, m_fCloudUCoords, 0x1618); +VALIDATE_OFFSET(tVolumetricClouds, m_fCloudVCoords, 0x1660); +VALIDATE_SIZE(tVolumetricClouds, 0x16A8); class PLUGIN_API CClouds { public: @@ -79,6 +102,7 @@ class PLUGIN_API CClouds { static void MovingFog_Update(); static void MovingFogRender(); }; +VALIDATE_SIZE(CClouds, 0x1); extern unsigned char *RAINBOW_LINES_COLOR_RED; // RAINBOW_LINES_COLOR_RED[6] = { 30, 30, 30, 10, 0, 15 } extern unsigned char *RAINBOW_LINES_COLOR_GREEN; // RAINBOW_LINES_COLOR_GREEN[6] = { 0, 15, 30, 30, 0, 0 } diff --git a/plugin_sa/game_sa/CClumpModelInfo.h b/plugin_sa/game_sa/CClumpModelInfo.h index 8e19d3acd..356668e76 100644 --- a/plugin_sa/game_sa/CClumpModelInfo.h +++ b/plugin_sa/game_sa/CClumpModelInfo.h @@ -40,5 +40,6 @@ class PLUGIN_API CClumpModelInfo : public CBaseModelInfo { static void FillFrameArray(RpClump *clump, RwFrame **frames); void SetFrameIds(RwObjectNameIdAssocation* data); }; - +VALIDATE_OFFSET(CClumpModelInfo, m_animFileName, 0x20); +VALIDATE_OFFSET(CClumpModelInfo, m_dwAnimFileIndex, 0x20); VALIDATE_SIZE(CClumpModelInfo, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColAccel.h b/plugin_sa/game_sa/CColAccel.h index d305a3d16..6d1b01b32 100644 --- a/plugin_sa/game_sa/CColAccel.h +++ b/plugin_sa/game_sa/CColAccel.h @@ -11,3 +11,4 @@ class CColAccel { public: bool IsCacheLoading(); }; +VALIDATE_SIZE(CColAccel, 0x1); diff --git a/plugin_sa/game_sa/CColBox.h b/plugin_sa/game_sa/CColBox.h index e529f9df2..8390af2de 100644 --- a/plugin_sa/game_sa/CColBox.h +++ b/plugin_sa/game_sa/CColBox.h @@ -19,5 +19,8 @@ class CColBox : public CBox { void Set(CVector const& sup, CVector const& inf, unsigned char material , unsigned char flags, unsigned char lighting); void operator=(CColBox const& right); }; - +VALIDATE_OFFSET(CColBox, m_nMaterial, 0x18); +VALIDATE_OFFSET(CColBox, m_nFlags, 0x19); +VALIDATE_OFFSET(CColBox, m_nLighting, 0x1A); +VALIDATE_OFFSET(CColBox, m_nLight, 0x1B); VALIDATE_SIZE(CColBox, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColDisk.h b/plugin_sa/game_sa/CColDisk.h index ab4569b2a..f7565daba 100644 --- a/plugin_sa/game_sa/CColDisk.h +++ b/plugin_sa/game_sa/CColDisk.h @@ -23,5 +23,11 @@ class CColDisk { void Set(float startRadius, CVector const& start, CVector const& end, float endRadius, unsigned char material, unsigned char pieceType, unsigned char lighting); }; - +VALIDATE_OFFSET(CColDisk, m_vecStart, 0x0); +VALIDATE_OFFSET(CColDisk, m_fStartRadius, 0xC); +VALIDATE_OFFSET(CColDisk, m_nMaterial, 0x10); +VALIDATE_OFFSET(CColDisk, m_nPiece, 0x11); +VALIDATE_OFFSET(CColDisk, m_nLighting, 0x12); +VALIDATE_OFFSET(CColDisk, m_vecEnd, 0x14); +VALIDATE_OFFSET(CColDisk, m_fEndRadius, 0x20); VALIDATE_SIZE(CColDisk, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColLine.h b/plugin_sa/game_sa/CColLine.h index ca7c1520a..93cb98650 100644 --- a/plugin_sa/game_sa/CColLine.h +++ b/plugin_sa/game_sa/CColLine.h @@ -19,5 +19,8 @@ class CColLine { CColLine(CVector const& start, CVector const& end); void Set(CVector const& start, CVector const& end); }; - +VALIDATE_OFFSET(CColLine, m_vecStart, 0x0); +VALIDATE_OFFSET(CColLine, m_fStartSize, 0xC); +VALIDATE_OFFSET(CColLine, m_vecEnd, 0x10); +VALIDATE_OFFSET(CColLine, m_fEndSize, 0x1C); VALIDATE_SIZE(CColLine, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColModel.h b/plugin_sa/game_sa/CColModel.h index 19ed70ea1..99cbeb1be 100644 --- a/plugin_sa/game_sa/CColModel.h +++ b/plugin_sa/game_sa/CColModel.h @@ -41,5 +41,9 @@ class CColModel { static void* operator new(unsigned int size); static void operator delete(void* data); }; - +VALIDATE_OFFSET(CColModel, m_boundBox, 0x0); +VALIDATE_OFFSET(CColModel, m_boundSphere, 0x18); +VALIDATE_OFFSET(CColModel, m_nColSlot, 0x28); +VALIDATE_OFFSET(CColModel, m_nFlags, 0x29); +VALIDATE_OFFSET(CColModel, m_pColData, 0x2C); VALIDATE_SIZE(CColModel, 0x30); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColPoint.h b/plugin_sa/game_sa/CColPoint.h index a9ad130a3..9a1dc43e6 100644 --- a/plugin_sa/game_sa/CColPoint.h +++ b/plugin_sa/game_sa/CColPoint.h @@ -14,6 +14,7 @@ struct PLUGIN_API tColLighting unsigned char day : 4; unsigned char night : 4; }; +VALIDATE_SIZE(tColLighting, 0x1); class PLUGIN_API CColPoint { @@ -42,5 +43,15 @@ class PLUGIN_API CColPoint { void operator=(CColPoint const& right); }; - +VALIDATE_OFFSET(CColPoint, m_vecPoint, 0x0); +VALIDATE_OFFSET(CColPoint, field_C, 0xC); +VALIDATE_OFFSET(CColPoint, m_vecNormal, 0x10); +VALIDATE_OFFSET(CColPoint, field_1C, 0x1C); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeA, 0x20); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeA, 0x21); +VALIDATE_OFFSET(CColPoint, m_nLightingA, 0x22); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeB, 0x24); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeB, 0x25); +VALIDATE_OFFSET(CColPoint, m_nLightingB, 0x26); +VALIDATE_OFFSET(CColPoint, m_fDepth, 0x28); VALIDATE_SIZE(CColPoint, 0x2C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColSphere.h b/plugin_sa/game_sa/CColSphere.h index 82d85d048..918454b3c 100644 --- a/plugin_sa/game_sa/CColSphere.h +++ b/plugin_sa/game_sa/CColSphere.h @@ -19,5 +19,8 @@ class CColSphere : public CSphere { void Set(float radius, CVector const& center, unsigned char material , unsigned char flags, unsigned char lighting); bool IntersectRay(CVector const& rayStart, CVector const& rayEnd, CVector& intPoint1, CVector& intPoint2); }; - +VALIDATE_OFFSET(CColSphere, m_nMaterial, 0x10); +VALIDATE_OFFSET(CColSphere, m_nFlags, 0x11); +VALIDATE_OFFSET(CColSphere, m_nLighting, 0x12); +VALIDATE_OFFSET(CColSphere, m_nLight, 0x13); VALIDATE_SIZE(CColSphere, 0x14); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColStore.h b/plugin_sa/game_sa/CColStore.h index a05c726a9..42bde9194 100644 --- a/plugin_sa/game_sa/CColStore.h +++ b/plugin_sa/game_sa/CColStore.h @@ -21,6 +21,15 @@ struct ColDef { bool m_bProcedural; bool m_bInterior; }; +VALIDATE_OFFSET(ColDef, m_Area, 0x0); +VALIDATE_OFFSET(ColDef, name, 0x10); +VALIDATE_OFFSET(ColDef, m_nModelIdStart, 0x22); +VALIDATE_OFFSET(ColDef, m_nModelIdEnd, 0x24); +VALIDATE_OFFSET(ColDef, m_nRefCount, 0x26); +VALIDATE_OFFSET(ColDef, m_bActive, 0x28); +VALIDATE_OFFSET(ColDef, m_bCollisionIsRequired, 0x29); +VALIDATE_OFFSET(ColDef, m_bProcedural, 0x2A); +VALIDATE_OFFSET(ColDef, m_bInterior, 0x2B); VALIDATE_SIZE(ColDef, 0x2C); typedef CPool CColPool; @@ -57,4 +66,5 @@ class CColStore { static void RemoveRef(int colNum); static void RequestCollision(const CVector& pos, int areaCode); static void SetCollisionRequired(const CVector& pos, int areaCode); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CColStore, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColTriangle.h b/plugin_sa/game_sa/CColTriangle.h index 7784c9cd0..10b6439a3 100644 --- a/plugin_sa/game_sa/CColTriangle.h +++ b/plugin_sa/game_sa/CColTriangle.h @@ -16,5 +16,9 @@ class CColTriangle { unsigned char m_nMaterial; unsigned char m_nLight; }; - -VALIDATE_SIZE(CColTriangle, 8); \ No newline at end of file +VALIDATE_OFFSET(CColTriangle, m_nVertA, 0x0); +VALIDATE_OFFSET(CColTriangle, m_nVertB, 0x2); +VALIDATE_OFFSET(CColTriangle, m_nVertC, 0x4); +VALIDATE_OFFSET(CColTriangle, m_nMaterial, 0x6); +VALIDATE_OFFSET(CColTriangle, m_nLight, 0x7); +VALIDATE_SIZE(CColTriangle, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CColTrianglePlane.h b/plugin_sa/game_sa/CColTrianglePlane.h index 0ff0c82b9..9e9a907bc 100644 --- a/plugin_sa/game_sa/CColTrianglePlane.h +++ b/plugin_sa/game_sa/CColTrianglePlane.h @@ -20,5 +20,7 @@ class CColTrianglePlane { void GetNormal(CVector &out); void Set(CompressedVector const* vertices, CColTriangle & triangle); }; - +VALIDATE_OFFSET(CColTrianglePlane, m_normal, 0x0); +VALIDATE_OFFSET(CColTrianglePlane, m_nDistance, 0x6); +VALIDATE_OFFSET(CColTrianglePlane, m_nOrientation, 0x8); VALIDATE_SIZE(CColTrianglePlane, 0xA); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCollision.h b/plugin_sa/game_sa/CCollision.h index c1aa12eea..6371a3b7b 100644 --- a/plugin_sa/game_sa/CCollision.h +++ b/plugin_sa/game_sa/CCollision.h @@ -77,6 +77,7 @@ class CCollision { static bool BuildCacheOfCameraCollision(CColSphere* sphere1, CColSphere* sphere2); static bool CameraConeCastVsWorldCollision(CColSphere* sphere1, CColSphere* sphere2, float* arg2, float arg3); }; +VALIDATE_SIZE(CCollision, 0x1); void CalculateColPointInsideBox(CBox const& box, CVector const& point, CColPoint& colPoint); bool ProcessDiscCollision(CColPoint& colPoint1, CMatrix const& mat, CColDisk const& disk, CColPoint& colPoint2, bool& arg4, float& arg5, CColPoint& colPoint3); diff --git a/plugin_sa/game_sa/CCollisionData.h b/plugin_sa/game_sa/CCollisionData.h index 48cc6b1a6..11d0d84a0 100644 --- a/plugin_sa/game_sa/CCollisionData.h +++ b/plugin_sa/game_sa/CCollisionData.h @@ -53,5 +53,20 @@ class CCollisionData { void SetLinkPtr(CLink *link); CLink *GetLinkPtr(); }; - +VALIDATE_OFFSET(CCollisionData, m_nNumSpheres, 0x0); +VALIDATE_OFFSET(CCollisionData, m_nNumBoxes, 0x2); +VALIDATE_OFFSET(CCollisionData, m_nNumTriangles, 0x4); +VALIDATE_OFFSET(CCollisionData, m_nNumLines, 0x6); +VALIDATE_OFFSET(CCollisionData, m_nFlags, 0x7); +VALIDATE_OFFSET(CCollisionData, m_pSpheres, 0x8); +VALIDATE_OFFSET(CCollisionData, m_pBoxes, 0xC); +VALIDATE_OFFSET(CCollisionData, m_pLines, 0x10); +VALIDATE_OFFSET(CCollisionData, m_pDisks, 0x10); +VALIDATE_OFFSET(CCollisionData, m_pVertices, 0x14); +VALIDATE_OFFSET(CCollisionData, m_pTriangles, 0x18); +VALIDATE_OFFSET(CCollisionData, m_pTrianglePlanes, 0x1C); +VALIDATE_OFFSET(CCollisionData, m_nNumShadowTriangles, 0x20); +VALIDATE_OFFSET(CCollisionData, m_nNumShadowVertices, 0x24); +VALIDATE_OFFSET(CCollisionData, m_pShadowVertices, 0x28); +VALIDATE_OFFSET(CCollisionData, m_pShadowTriangles, 0x2C); VALIDATE_SIZE(CCollisionData, 0x30); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCollisionEventScanner.h b/plugin_sa/game_sa/CCollisionEventScanner.h index c113cd955..88753cd2e 100644 --- a/plugin_sa/game_sa/CCollisionEventScanner.h +++ b/plugin_sa/game_sa/CCollisionEventScanner.h @@ -17,4 +17,5 @@ class PLUGIN_API CCollisionEventScanner { void ScanForCollisionEvents(CPed* victim, CEventGroup* eventGroup); }; +VALIDATE_OFFSET(CCollisionEventScanner, m_bAlreadyHitByCar, 0x0); VALIDATE_SIZE(CCollisionEventScanner, 0x1); diff --git a/plugin_sa/game_sa/CColourSet.h b/plugin_sa/game_sa/CColourSet.h index f4eaad1df..f585a6a72 100644 --- a/plugin_sa/game_sa/CColourSet.h +++ b/plugin_sa/game_sa/CColourSet.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class PLUGIN_API CColourSet { @@ -68,5 +67,57 @@ class PLUGIN_API CColourSet { CColourSet(int weatherId, int timeId); void Interpolate(CColourSet* a, CColourSet* b, float factor_a, float factor_b, bool bIgnoreSky); }; - +VALIDATE_OFFSET(CColourSet, m_fAmbientRed, 0x0); +VALIDATE_OFFSET(CColourSet, m_fAmbientGreen, 0x4); +VALIDATE_OFFSET(CColourSet, m_fAmbientBlue, 0x8); +VALIDATE_OFFSET(CColourSet, m_fAmbientRed_Obj, 0xC); +VALIDATE_OFFSET(CColourSet, m_fAmbientGreen_Obj, 0x10); +VALIDATE_OFFSET(CColourSet, m_fAmbientBlue_Obj, 0x14); +VALIDATE_OFFSET(CColourSet, m_fDirectionalRed, 0x18); +VALIDATE_OFFSET(CColourSet, m_fDirectionalGreen, 0x1C); +VALIDATE_OFFSET(CColourSet, m_fDirectionalBlue, 0x20); +VALIDATE_OFFSET(CColourSet, m_nSkyTopRed, 0x24); +VALIDATE_OFFSET(CColourSet, m_nSkyTopGreen, 0x26); +VALIDATE_OFFSET(CColourSet, m_nSkyTopBlue, 0x28); +VALIDATE_OFFSET(CColourSet, m_nSkyBottomRed, 0x2A); +VALIDATE_OFFSET(CColourSet, m_nSkyBottomGreen, 0x2C); +VALIDATE_OFFSET(CColourSet, m_nSkyBottomBlue, 0x2E); +VALIDATE_OFFSET(CColourSet, m_nSunCoreRed, 0x30); +VALIDATE_OFFSET(CColourSet, m_nSunCoreGreen, 0x32); +VALIDATE_OFFSET(CColourSet, m_nSunCoreBlue, 0x34); +VALIDATE_OFFSET(CColourSet, m_nSunCoronaRed, 0x36); +VALIDATE_OFFSET(CColourSet, m_nSunCoronaGreen, 0x38); +VALIDATE_OFFSET(CColourSet, m_nSunCoronaBlue, 0x3A); +VALIDATE_OFFSET(CColourSet, m_fSunSize, 0x3C); +VALIDATE_OFFSET(CColourSet, m_fSpriteSize, 0x40); +VALIDATE_OFFSET(CColourSet, m_fSpriteBrightness, 0x44); +VALIDATE_OFFSET(CColourSet, m_nShadowStrength, 0x48); +VALIDATE_OFFSET(CColourSet, m_nLightShadowStrength, 0x4A); +VALIDATE_OFFSET(CColourSet, m_nPoleShadowStrength, 0x4C); +VALIDATE_OFFSET(CColourSet, m_fFarClip, 0x50); +VALIDATE_OFFSET(CColourSet, m_fFogStart, 0x54); +VALIDATE_OFFSET(CColourSet, m_fLightsOnGroundBrightness, 0x58); +VALIDATE_OFFSET(CColourSet, m_nLowCloudsRed, 0x5C); +VALIDATE_OFFSET(CColourSet, m_nLowCloudsGreen, 0x5E); +VALIDATE_OFFSET(CColourSet, m_nLowCloudsBlue, 0x60); +VALIDATE_OFFSET(CColourSet, m_nFluffyCloudsBottomRed, 0x62); +VALIDATE_OFFSET(CColourSet, m_nFluffyCloudsBottomGreen, 0x64); +VALIDATE_OFFSET(CColourSet, m_nFluffyCloudsBottomBlue, 0x66); +VALIDATE_OFFSET(CColourSet, m_fWaterRed, 0x68); +VALIDATE_OFFSET(CColourSet, m_fWaterGreen, 0x6C); +VALIDATE_OFFSET(CColourSet, m_fWaterBlue, 0x70); +VALIDATE_OFFSET(CColourSet, m_fWaterAlpha, 0x74); +VALIDATE_OFFSET(CColourSet, m_fPostFx1Red, 0x78); +VALIDATE_OFFSET(CColourSet, m_fPostFx1Green, 0x7C); +VALIDATE_OFFSET(CColourSet, m_fPostFx1Blue, 0x80); +VALIDATE_OFFSET(CColourSet, m_fPostFx1Alpha, 0x84); +VALIDATE_OFFSET(CColourSet, m_fPostFx2Red, 0x88); +VALIDATE_OFFSET(CColourSet, m_fPostFx2Green, 0x8C); +VALIDATE_OFFSET(CColourSet, m_fPostFx2Blue, 0x90); +VALIDATE_OFFSET(CColourSet, m_fPostFx2Alpha, 0x94); +VALIDATE_OFFSET(CColourSet, m_fCloudAlpha, 0x98); +VALIDATE_OFFSET(CColourSet, m_nHighLightMinIntensity, 0x9C); +VALIDATE_OFFSET(CColourSet, m_nWaterFogAlpha, 0xA0); +VALIDATE_OFFSET(CColourSet, m_fIllumination, 0xA4); +VALIDATE_OFFSET(CColourSet, m_fLodDistMult, 0xA8); VALIDATE_SIZE(CColourSet, 0xAC); diff --git a/plugin_sa/game_sa/CControllerConfigManager.h b/plugin_sa/game_sa/CControllerConfigManager.h index ec0022e1f..3426a70d4 100644 --- a/plugin_sa/game_sa/CControllerConfigManager.h +++ b/plugin_sa/game_sa/CControllerConfigManager.h @@ -82,11 +82,16 @@ class PLUGIN_API CControllerKey { unsigned int keyCode; unsigned int priority; }; +VALIDATE_OFFSET(CControllerKey, keyCode, 0x0); +VALIDATE_OFFSET(CControllerKey, priority, 0x4); +VALIDATE_SIZE(CControllerKey, 0x8); class PLUGIN_API CControllerAction { public: CControllerKey keys[4]; }; +VALIDATE_OFFSET(CControllerAction, keys, 0x0); +VALIDATE_SIZE(CControllerAction, 0x20); class PLUGIN_API CControllerConfigManager { public: @@ -110,7 +115,19 @@ class PLUGIN_API CControllerConfigManager { bool GetIsKeyboardKeyJustDown(RsKeyCodes key); void ResetSettingOrder(e_ControllerAction action); }; - +VALIDATE_OFFSET(CControllerConfigManager, field_0, 0x0); +VALIDATE_OFFSET(CControllerConfigManager, field_1, 0x1); +VALIDATE_OFFSET(CControllerConfigManager, field_2, 0x2); +VALIDATE_OFFSET(CControllerConfigManager, field_3, 0x3); +VALIDATE_OFFSET(CControllerConfigManager, m_prevPadState, 0x4); +VALIDATE_OFFSET(CControllerConfigManager, m_currPadState, 0x114); +VALIDATE_OFFSET(CControllerConfigManager, m_aszEventNames, 0x224); +VALIDATE_OFFSET(CControllerConfigManager, field_B5C, 0xB5C); +VALIDATE_OFFSET(CControllerConfigManager, _pad1, 0xB6D); +VALIDATE_OFFSET(CControllerConfigManager, m_actions, 0xB70); +VALIDATE_OFFSET(CControllerConfigManager, field_12D0, 0x12D0); +VALIDATE_OFFSET(CControllerConfigManager, field_12E0, 0x12E0); +VALIDATE_OFFSET(CControllerConfigManager, _pad2, 0x12E1); VALIDATE_SIZE(CControllerConfigManager, 0x12E4); extern PLUGIN_API CControllerConfigManager &ControlsManager; diff --git a/plugin_sa/game_sa/CCopPed.h b/plugin_sa/game_sa/CCopPed.h index 85491c5d2..1aaeff170 100644 --- a/plugin_sa/game_sa/CCopPed.h +++ b/plugin_sa/game_sa/CCopPed.h @@ -32,5 +32,11 @@ class PLUGIN_API CCopPed : public CPed { void RemoveCriminalToKill(CPed* likeUnused, int criminalIdx); void ClearCriminalsToKill(); }; - +VALIDATE_OFFSET(CCopPed, field_79C, 0x79C); +VALIDATE_OFFSET(CCopPed, field_79D, 0x79D); +VALIDATE_OFFSET(CCopPed, m_copType, 0x7A0); +VALIDATE_OFFSET(CCopPed, field_7A4, 0x7A4); +VALIDATE_OFFSET(CCopPed, m_pCopPartner, 0x7A8); +VALIDATE_OFFSET(CCopPed, m_apCriminalsToKill, 0x7AC); +VALIDATE_OFFSET(CCopPed, field_7C0, 0x7C0); VALIDATE_SIZE(CCopPed, 0x7C4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCoronas.h b/plugin_sa/game_sa/CCoronas.h index 568f26235..8cc3047e8 100644 --- a/plugin_sa/game_sa/CCoronas.h +++ b/plugin_sa/game_sa/CCoronas.h @@ -54,6 +54,7 @@ class PLUGIN_API CCoronas { // Draw sun (Moon went to CClouds since SA) static void DoSunAndMoon(); }; +VALIDATE_SIZE(CCoronas, 0x1); extern unsigned int MAX_CORONAS; extern RwTexture **gpCoronaTexture; \ No newline at end of file diff --git a/plugin_sa/game_sa/CCover.h b/plugin_sa/game_sa/CCover.h index c2a5dd65a..4fffd3b71 100644 --- a/plugin_sa/game_sa/CCover.h +++ b/plugin_sa/game_sa/CCover.h @@ -39,5 +39,6 @@ class PLUGIN_API CCover { SUPPORTED_10US static bool ShouldThisBuildingHaveItsCoverPointsCreated(CBuilding *building); SUPPORTED_10US static void Update(); }; +VALIDATE_SIZE(CCover, 0x1); #include "meta/meta.CCover.h" diff --git a/plugin_sa/game_sa/CCoverPoint.h b/plugin_sa/game_sa/CCoverPoint.h index a7d3911e3..ad1005394 100644 --- a/plugin_sa/game_sa/CCoverPoint.h +++ b/plugin_sa/game_sa/CCoverPoint.h @@ -28,7 +28,12 @@ class PLUGIN_API CCoverPoint { SUPPORTED_10US void ReleaseCoverPointForPed(CPed *ped); SUPPORTED_10US void ReserveCoverPointForPed(CPed *ped); }; - +VALIDATE_OFFSET(CCoverPoint, m_nMaxPedsInCover, 0x0); +VALIDATE_OFFSET(CCoverPoint, m_nCoverType, 0x1); +VALIDATE_OFFSET(CCoverPoint, m_nDirection, 0x2); +VALIDATE_OFFSET(CCoverPoint, m_vecOffset, 0x4); +VALIDATE_OFFSET(CCoverPoint, m_pCoverEntity, 0x10); +VALIDATE_OFFSET(CCoverPoint, m_apCoveredPeds, 0x14); VALIDATE_SIZE(CCoverPoint, 0x1C); #include "meta/meta.CCoverPoint.h" diff --git a/plugin_sa/game_sa/CCredits.h b/plugin_sa/game_sa/CCredits.h index e56f3f632..7ec5751c1 100644 --- a/plugin_sa/game_sa/CCredits.h +++ b/plugin_sa/game_sa/CCredits.h @@ -20,3 +20,4 @@ class PLUGIN_API CCredits { static void Start(); static void Stop(); }; +VALIDATE_SIZE(CCredits, 0x1); diff --git a/plugin_sa/game_sa/CCreepingFire.h b/plugin_sa/game_sa/CCreepingFire.h index 72af25484..7fa205e0b 100644 --- a/plugin_sa/game_sa/CCreepingFire.h +++ b/plugin_sa/game_sa/CCreepingFire.h @@ -17,4 +17,5 @@ class PLUGIN_API CCreepingFire { static bool TryToStartFireAtCoors(CVector posn, signed char numGenerations, _IGNORED_ bool arg2, bool scriptFire, float zDistance); static void SetReadyToBurn(); static void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCreepingFire, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCrimeBeingQd.h b/plugin_sa/game_sa/CCrimeBeingQd.h index 4811d1bb8..946da3edd 100644 --- a/plugin_sa/game_sa/CCrimeBeingQd.h +++ b/plugin_sa/game_sa/CCrimeBeingQd.h @@ -22,5 +22,10 @@ class PLUGIN_API CCrimeBeingQd { char _pad1A[2]; public: }; - +VALIDATE_OFFSET(CCrimeBeingQd, m_nCrimeType, 0x0); +VALIDATE_OFFSET(CCrimeBeingQd, m_nCrimeID, 0x4); +VALIDATE_OFFSET(CCrimeBeingQd, m_nTimeOfQing, 0x8); +VALIDATE_OFFSET(CCrimeBeingQd, m_vecCoors, 0xC); +VALIDATE_OFFSET(CCrimeBeingQd, m_bAlreadyReported, 0x18); +VALIDATE_OFFSET(CCrimeBeingQd, m_bPoliceDontReallyCare, 0x19); VALIDATE_SIZE(CCrimeBeingQd, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCullZones.cpp b/plugin_sa/game_sa/CCullZones.cpp index 003f21a97..34bc2012d 100644 --- a/plugin_sa/game_sa/CCullZones.cpp +++ b/plugin_sa/game_sa/CCullZones.cpp @@ -1,4 +1,4 @@ - /* +/* Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk diff --git a/plugin_sa/game_sa/CCullZones.h b/plugin_sa/game_sa/CCullZones.h index 1e069452d..53681420d 100644 --- a/plugin_sa/game_sa/CCullZones.h +++ b/plugin_sa/game_sa/CCullZones.h @@ -53,7 +53,14 @@ struct CZoneDef { bool IsPointWithin(const CVector& point); }; - +VALIDATE_OFFSET(CZoneDef, x1, 0x0); +VALIDATE_OFFSET(CZoneDef, y1, 0x2); +VALIDATE_OFFSET(CZoneDef, x2, 0x4); +VALIDATE_OFFSET(CZoneDef, y2, 0x6); +VALIDATE_OFFSET(CZoneDef, x3, 0x8); +VALIDATE_OFFSET(CZoneDef, y3, 0xA); +VALIDATE_OFFSET(CZoneDef, z1, 0xC); +VALIDATE_OFFSET(CZoneDef, z2, 0xE); VALIDATE_SIZE(CZoneDef, 0x10); struct CCullZoneReflection { @@ -64,14 +71,20 @@ struct CCullZoneReflection { char vz; unsigned char flags; }; - +VALIDATE_OFFSET(CCullZoneReflection, zoneDef, 0x0); +VALIDATE_OFFSET(CCullZoneReflection, cm, 0x10); +VALIDATE_OFFSET(CCullZoneReflection, vx, 0x14); +VALIDATE_OFFSET(CCullZoneReflection, vy, 0x15); +VALIDATE_OFFSET(CCullZoneReflection, vz, 0x16); +VALIDATE_OFFSET(CCullZoneReflection, flags, 0x17); VALIDATE_SIZE(CCullZoneReflection, 0x18); struct CCullZone { CZoneDef zoneDef; eZoneAttributes flags; }; - +VALIDATE_OFFSET(CCullZone, zoneDef, 0x0); +VALIDATE_OFFSET(CCullZone, flags, 0x10); VALIDATE_SIZE(CCullZone, 0x12); class CCullZones { @@ -111,3 +124,4 @@ class CCullZones { static CCullZone* FindZoneWithStairsAttributeForPlayer(); static eZoneAttributes FindAttributesForCoors(CVector pos); }; +VALIDATE_SIZE(CCullZones, 0x1); diff --git a/plugin_sa/game_sa/CCustomCarEnvMapPipeline.cpp b/plugin_sa/game_sa/CCustomCarEnvMapPipeline.cpp index c99710302..e08443679 100644 --- a/plugin_sa/game_sa/CCustomCarEnvMapPipeline.cpp +++ b/plugin_sa/game_sa/CCustomCarEnvMapPipeline.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCustomCarEnvMapPipeline.h" diff --git a/plugin_sa/game_sa/CCustomCarEnvMapPipeline.h b/plugin_sa/game_sa/CCustomCarEnvMapPipeline.h index 9e88f5638..a047a5a93 100644 --- a/plugin_sa/game_sa/CCustomCarEnvMapPipeline.h +++ b/plugin_sa/game_sa/CCustomCarEnvMapPipeline.h @@ -22,6 +22,13 @@ struct CustomEnvMapPipeMaterialData short renderFrameCounter; void *texture; }; +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, scaleX, 0x0); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, scaleY, 0x1); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, transSclX, 0x2); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, transSclY, 0x3); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, shininess, 0x4); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, renderFrameCounter, 0x6); +VALIDATE_OFFSET(CustomEnvMapPipeMaterialData, texture, 0x8); VALIDATE_SIZE(CustomEnvMapPipeMaterialData, 0xC); struct CustomEnvMapPipeAtomicData @@ -30,6 +37,9 @@ struct CustomEnvMapPipeAtomicData float posx; float posy; }; +VALIDATE_OFFSET(CustomEnvMapPipeAtomicData, lastTrans, 0x0); +VALIDATE_OFFSET(CustomEnvMapPipeAtomicData, posx, 0x4); +VALIDATE_OFFSET(CustomEnvMapPipeAtomicData, posy, 0x8); VALIDATE_SIZE(CustomEnvMapPipeAtomicData, 0xC); struct CustomSpecMapPipeMaterialData @@ -37,6 +47,8 @@ struct CustomSpecMapPipeMaterialData float specularity; void *texture; }; +VALIDATE_OFFSET(CustomSpecMapPipeMaterialData, specularity, 0x0); +VALIDATE_OFFSET(CustomSpecMapPipeMaterialData, texture, 0x4); VALIDATE_SIZE(CustomSpecMapPipeMaterialData, 0x8); class PLUGIN_API CCustomCarEnvMapPipeline { @@ -80,4 +92,5 @@ class PLUGIN_API CCustomCarEnvMapPipeline { static CPool *&m_gSpecMapPipeMatDataPool; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CCustomCarEnvMapPipeline, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCustomCarPlateMgr.h b/plugin_sa/game_sa/CCustomCarPlateMgr.h index 0c1c7416a..c25ccc0ad 100644 --- a/plugin_sa/game_sa/CCustomCarPlateMgr.h +++ b/plugin_sa/game_sa/CCustomCarPlateMgr.h @@ -32,6 +32,7 @@ class PLUGIN_API CCustomCarPlateMgr { static RpMaterial* SetupMaterialPlateTexture(RpMaterial* material, char* plateText, unsigned char plateType); static RpMaterial* SetupClump(RpClump* clump, char* plateText, unsigned char plateType); }; +VALIDATE_SIZE(CCustomCarPlateMgr, 0x1); extern unsigned char *&CharsetLockedData; extern RpMaterial *&CurrentLicensePlateMaterial; diff --git a/plugin_sa/game_sa/CCutsceneMgr.h b/plugin_sa/game_sa/CCutsceneMgr.h index d5b4c026d..21201242d 100644 --- a/plugin_sa/game_sa/CCutsceneMgr.h +++ b/plugin_sa/game_sa/CCutsceneMgr.h @@ -26,17 +26,35 @@ struct tCutsceneParticleEffect { char _pad6A[2]; public: }; +VALIDATE_OFFSET(tCutsceneParticleEffect, m_szEffectName, 0x0); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_pFxSystem, 0x20); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_nStartTime, 0x24); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_nEndTime, 0x28); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_nObjectId, 0x2C); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_szObjectPart, 0x30); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_vecPosn, 0x50); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_vecDirection, 0x5C); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_bPlaying, 0x68); +VALIDATE_OFFSET(tCutsceneParticleEffect, m_bStopped, 0x69); +VALIDATE_SIZE(tCutsceneParticleEffect, 0x6C); struct tCutsceneAttachment { int m_nCutscenePedObjectId; int m_nCutsceneAttachmentObjectId; int m_nBoneId; }; +VALIDATE_OFFSET(tCutsceneAttachment, m_nCutscenePedObjectId, 0x0); +VALIDATE_OFFSET(tCutsceneAttachment, m_nCutsceneAttachmentObjectId, 0x4); +VALIDATE_OFFSET(tCutsceneAttachment, m_nBoneId, 0x8); +VALIDATE_SIZE(tCutsceneAttachment, 0xC); struct tCutsceneRemoval { CVector m_vecPosn; char m_szObjectName[32]; }; +VALIDATE_OFFSET(tCutsceneRemoval, m_vecPosn, 0x0); +VALIDATE_OFFSET(tCutsceneRemoval, m_szObjectName, 0xC); +VALIDATE_SIZE(tCutsceneRemoval, 0x2C); extern unsigned int MAX_NUM_CUTSCENE_OBJECTS; // default: 50 extern unsigned int MAX_NUM_CUTSCENE_PARTICLE_EFFECTS; // default: 8 @@ -129,6 +147,7 @@ class PLUGIN_API CCutsceneMgr { static void Update(); static void Update_overlay(); }; +VALIDATE_SIZE(CCutsceneMgr, 0x1); short FindCutsceneAudioTrackId(char const* cutsceneName); void UpdateCutsceneObjectBoundingBox(RpClump* clump, int modelId); \ No newline at end of file diff --git a/plugin_sa/game_sa/CCutsceneObject.h b/plugin_sa/game_sa/CCutsceneObject.h index 3b01adf27..84245b918 100644 --- a/plugin_sa/game_sa/CCutsceneObject.h +++ b/plugin_sa/game_sa/CCutsceneObject.h @@ -19,5 +19,9 @@ class PLUGIN_API CCutsceneObject : public CObject { CVector m_vWorldPosition; CVector m_vForce; }; - +VALIDATE_OFFSET(CCutsceneObject, m_pAttachTo, 0x17C); +VALIDATE_OFFSET(CCutsceneObject, m_nAttachBone, 0x17C); +VALIDATE_OFFSET(CCutsceneObject, m_pAttachmentObject, 0x180); +VALIDATE_OFFSET(CCutsceneObject, m_vWorldPosition, 0x184); +VALIDATE_OFFSET(CCutsceneObject, m_vForce, 0x190); VALIDATE_SIZE(CCutsceneObject, 0x19C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDamageAtomicModelInfo.h b/plugin_sa/game_sa/CDamageAtomicModelInfo.h index 5c2a00d30..64a57bf5d 100644 --- a/plugin_sa/game_sa/CDamageAtomicModelInfo.h +++ b/plugin_sa/game_sa/CDamageAtomicModelInfo.h @@ -14,4 +14,5 @@ class CDamageAtomicModelInfo : public CAtomicModelInfo { static bool& ms_bCreateDamagedVersion; }; +VALIDATE_OFFSET(CDamageAtomicModelInfo, m_pDamagedAtomic, 0x20); VALIDATE_SIZE(CDamageAtomicModelInfo, 0x24); diff --git a/plugin_sa/game_sa/CDamageManager.h b/plugin_sa/game_sa/CDamageManager.h index ef94516cf..54c92fa77 100644 --- a/plugin_sa/game_sa/CDamageManager.h +++ b/plugin_sa/game_sa/CDamageManager.h @@ -155,5 +155,20 @@ class PLUGIN_API CDamageManager { int GetCarNodeIndexFromDoor(eDoors door); void Reset(); }; - +VALIDATE_OFFSET(CDamageManager, m_fWheelDamageEffect, 0x0); +VALIDATE_OFFSET(CDamageManager, m_nEngineStatus, 0x4); +VALIDATE_OFFSET(CDamageManager, m_anWheelsStatus, 0x5); +VALIDATE_OFFSET(CDamageManager, m_nRightRearWheelsStatus, 0x5); +VALIDATE_OFFSET(CDamageManager, m_nRightFrontWheelsStatus, 0x6); +VALIDATE_OFFSET(CDamageManager, m_nLeftRearWheelsStatus, 0x7); +VALIDATE_OFFSET(CDamageManager, m_nLeftFrontWheelsStatus, 0x8); +VALIDATE_OFFSET(CDamageManager, m_anDoorsStatus, 0x9); +VALIDATE_OFFSET(CDamageManager, m_nBonnetStatus, 0x9); +VALIDATE_OFFSET(CDamageManager, m_nBootStatus, 0xA); +VALIDATE_OFFSET(CDamageManager, m_nLeftFrontDoorStatus, 0xB); +VALIDATE_OFFSET(CDamageManager, m_nRightFrontDoorStatus, 0xC); +VALIDATE_OFFSET(CDamageManager, m_nLeftRearDoorStatus, 0xD); +VALIDATE_OFFSET(CDamageManager, m_nRightRearDoorStatus, 0xE); +VALIDATE_OFFSET(CDamageManager, m_nLightsStatus, 0x10); +VALIDATE_OFFSET(CDamageManager, m_nPanelsStatus, 0x14); VALIDATE_SIZE(CDamageManager, 0x18); diff --git a/plugin_sa/game_sa/CDarkel.h b/plugin_sa/game_sa/CDarkel.h index 2cc10ee81..e21dc4691 100644 --- a/plugin_sa/game_sa/CDarkel.h +++ b/plugin_sa/game_sa/CDarkel.h @@ -40,3 +40,4 @@ class PLUGIN_API CDarkel { static void RegisterKillByPlayer(CPed const* pKilledPed, eWeaponType damageWeaponID, bool bHeadShotted, int arg4); static void RegisterCarBlownUpByPlayer(CVehicle* pVehicle, int arg2); }; +VALIDATE_SIZE(CDarkel, 0x1); diff --git a/plugin_sa/game_sa/CDate.h b/plugin_sa/game_sa/CDate.h index a91abe41e..a8999f478 100644 --- a/plugin_sa/game_sa/CDate.h +++ b/plugin_sa/game_sa/CDate.h @@ -25,7 +25,12 @@ class PLUGIN_API CDate { SUPPORTED_10US void PopulateDateFields(char const &seconds, char const &minutes, char const &hours, char const &day, char const &month, short year); }; - +VALIDATE_OFFSET(CDate, seconds, 0x0); +VALIDATE_OFFSET(CDate, minutes, 0x4); +VALIDATE_OFFSET(CDate, hours, 0x8); +VALIDATE_OFFSET(CDate, day, 0xC); +VALIDATE_OFFSET(CDate, month, 0x10); +VALIDATE_OFFSET(CDate, year, 0x14); VALIDATE_SIZE(CDate, 0x18); #include "meta/meta.CDate.h" diff --git a/plugin_sa/game_sa/CDecision.h b/plugin_sa/game_sa/CDecision.h index 3b870f062..f3d2e3f3b 100644 --- a/plugin_sa/game_sa/CDecision.h +++ b/plugin_sa/game_sa/CDecision.h @@ -18,6 +18,8 @@ struct DecisionContext onFoot(onFoot), inVehicle(inVehicle) {} }; +VALIDATE_OFFSET(DecisionContext, onFoot, 0x0); +VALIDATE_OFFSET(DecisionContext, inVehicle, 0x1); VALIDATE_SIZE(DecisionContext, 0x2); struct DecisionChances @@ -34,6 +36,10 @@ struct DecisionChances toNeutral(toNeutral), toPlayer(toPlayer), toFriend(toFriend), toEnemy(toEnemy) {} }; +VALIDATE_OFFSET(DecisionChances, toNeutral, 0x0); +VALIDATE_OFFSET(DecisionChances, toPlayer, 0x1); +VALIDATE_OFFSET(DecisionChances, toFriend, 0x2); +VALIDATE_OFFSET(DecisionChances, toEnemy, 0x3); VALIDATE_SIZE(DecisionChances, 0x4); class PLUGIN_API CDecision { @@ -46,4 +52,7 @@ class PLUGIN_API CDecision { CDecision(); }; +VALIDATE_OFFSET(CDecision, task, 0x0); +VALIDATE_OFFSET(CDecision, chances, 0x18); +VALIDATE_OFFSET(CDecision, context, 0x30); VALIDATE_SIZE(CDecision, 0x3C); diff --git a/plugin_sa/game_sa/CDecisionMaker.h b/plugin_sa/game_sa/CDecisionMaker.h index 5cb7d2107..fb9889cf1 100644 --- a/plugin_sa/game_sa/CDecisionMaker.h +++ b/plugin_sa/game_sa/CDecisionMaker.h @@ -15,4 +15,5 @@ class PLUGIN_API CDecisionMaker { CDecisionMaker(); }; -VALIDATE_SIZE(CDecisionMaker, 0x99C); +VALIDATE_OFFSET(CDecisionMaker, m_decision, 0x0); +VALIDATE_SIZE(CDecisionMaker, 0x99C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDecisionMakerTypes.h b/plugin_sa/game_sa/CDecisionMakerTypes.h index e14ec152a..9f08c8f2f 100644 --- a/plugin_sa/game_sa/CDecisionMakerTypes.h +++ b/plugin_sa/game_sa/CDecisionMakerTypes.h @@ -74,3 +74,12 @@ class CDecisionMakerTypes { CDecisionMaker m_DefaultRandomPedGroupDecisionMaker; CDecisionMaker m_DefaultMissionPedGroupDecisionMaker; }; +VALIDATE_OFFSET(CDecisionMakerTypes, m_NoOfDecisionMakers, 0x0); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DecisionMakers, 0x4); +VALIDATE_OFFSET(CDecisionMakerTypes, m_EventIndices, 0xC034); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DefaultRandomPedDecisionMaker, 0xC1B4); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DefaultMissionPedDecisionMaker, 0xCB50); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DefaultPlayerPedDecisionMaker, 0xD4EC); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DefaultRandomPedGroupDecisionMaker, 0xDE88); +VALIDATE_OFFSET(CDecisionMakerTypes, m_DefaultMissionPedGroupDecisionMaker, 0xE824); +VALIDATE_SIZE(CDecisionMakerTypes, 0xF1C0); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDecisionSimple.h b/plugin_sa/game_sa/CDecisionSimple.h index 7e6fb0b90..86975b472 100644 --- a/plugin_sa/game_sa/CDecisionSimple.h +++ b/plugin_sa/game_sa/CDecisionSimple.h @@ -17,5 +17,7 @@ class PLUGIN_API CDecisionSimple { void MakeDecision(int taskType, short& outTaskType, int& outDecisionIndex); void SetDefault(); }; - +VALIDATE_OFFSET(CDecisionSimple, m_anTasks, 0x0); +VALIDATE_OFFSET(CDecisionSimple, m_afChances, 0x18); +VALIDATE_OFFSET(CDecisionSimple, m_nCount, 0x30); VALIDATE_SIZE(CDecisionSimple, 0x34); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDirectory.h b/plugin_sa/game_sa/CDirectory.h index 59c3a435d..b8c7051c2 100644 --- a/plugin_sa/game_sa/CDirectory.h +++ b/plugin_sa/game_sa/CDirectory.h @@ -39,6 +39,10 @@ class PLUGIN_API CDirectory { DirectoryInfo* FindItem(char const* name, unsigned int& outOffset, unsigned int& outStreamingSize); DirectoryInfo* FindItem(unsigned int key, unsigned int& outOffset, unsigned int& outStreamingSize); }; - +VALIDATE_OFFSET(CDirectory, m_pEntries, 0x0); +VALIDATE_OFFSET(CDirectory, m_nCapacity, 0x4); +VALIDATE_OFFSET(CDirectory, m_nNumEntries, 0x8); +VALIDATE_OFFSET(CDirectory, m_bOwnsEntries, 0xC); VALIDATE_SIZE(CDirectory, 0x10); + VALIDATE_SIZE(CDirectory::DirectoryInfo, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDoor.h b/plugin_sa/game_sa/CDoor.h index fa67c30a9..f29d8a2b2 100644 --- a/plugin_sa/game_sa/CDoor.h +++ b/plugin_sa/game_sa/CDoor.h @@ -40,5 +40,12 @@ class PLUGIN_API CDoor { bool IsClosed(); bool IsFullyOpen(); }; - +VALIDATE_OFFSET(CDoor, m_fOpenAngle, 0x0); +VALIDATE_OFFSET(CDoor, m_fClosedAngle, 0x4); +VALIDATE_OFFSET(CDoor, m_nDirn, 0x8); +VALIDATE_OFFSET(CDoor, m_nAxis, 0xA); +VALIDATE_OFFSET(CDoor, m_nDoorState, 0xB); +VALIDATE_OFFSET(CDoor, m_fAngle, 0xC); +VALIDATE_OFFSET(CDoor, m_fPrevAngle, 0x10); +VALIDATE_OFFSET(CDoor, m_fAngVel, 0x14); VALIDATE_SIZE(CDoor, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDraw.h b/plugin_sa/game_sa/CDraw.h index 4a3fca704..f8525434e 100644 --- a/plugin_sa/game_sa/CDraw.h +++ b/plugin_sa/game_sa/CDraw.h @@ -21,4 +21,5 @@ class PLUGIN_API CDraw { static void SetFOV(float fovValue); static float CalculateAspectRatio(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CDraw, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDummy.h b/plugin_sa/game_sa/CDummy.h index 58cfc7a4e..f504f1d4a 100644 --- a/plugin_sa/game_sa/CDummy.h +++ b/plugin_sa/game_sa/CDummy.h @@ -12,6 +12,7 @@ class PLUGIN_API CDummy : public CEntity { public: }; +VALIDATE_SIZE(CDummy, 0x38); VALIDATE_SIZE(CDummy, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDummyObject.h b/plugin_sa/game_sa/CDummyObject.h index e30842f1b..1adc4bdaa 100644 --- a/plugin_sa/game_sa/CDummyObject.h +++ b/plugin_sa/game_sa/CDummyObject.h @@ -12,6 +12,7 @@ class PLUGIN_API CDummyObject : public CDummy { public: }; +VALIDATE_SIZE(CDummyObject, 0x38); VALIDATE_SIZE(CDummyObject, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CDummyPed.h b/plugin_sa/game_sa/CDummyPed.h index 1ac848e78..f7a468b19 100644 --- a/plugin_sa/game_sa/CDummyPed.h +++ b/plugin_sa/game_sa/CDummyPed.h @@ -8,10 +8,7 @@ #include "PluginBase.h" #include "CDummy.h" - class PLUGIN_API CDummyPed : public CDummy { public: }; - - VALIDATE_SIZE(CDummyPed, 0x38); \ No newline at end of file diff --git a/plugin_sa/game_sa/CEmergencyPed.h b/plugin_sa/game_sa/CEmergencyPed.h index 3b41306d0..b6a4c41c7 100644 --- a/plugin_sa/game_sa/CEmergencyPed.h +++ b/plugin_sa/game_sa/CEmergencyPed.h @@ -18,5 +18,4 @@ class PLUGIN_API CEmergencyPed : public CPed void ProcessControl(); }; - VALIDATE_SIZE(CEmergencyPed, 0x79C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CEntity.h b/plugin_sa/game_sa/CEntity.h index 27340f650..30106db4a 100644 --- a/plugin_sa/game_sa/CEntity.h +++ b/plugin_sa/game_sa/CEntity.h @@ -150,7 +150,20 @@ class PLUGIN_API CEntity : public CPlaceable { return col ? col->m_boundSphere.m_fRadius : 0.0f; } }; - +VALIDATE_OFFSET(CEntity, m_pRwObject, 0x18); +VALIDATE_OFFSET(CEntity, m_pRwClump, 0x18); +VALIDATE_OFFSET(CEntity, m_pRwAtomic, 0x18); +VALIDATE_OFFSET(CEntity, m_nRandomSeed, 0x20); +VALIDATE_OFFSET(CEntity, m_nModelIndex, 0x22); +VALIDATE_OFFSET(CEntity, m_pReferences, 0x24); +VALIDATE_OFFSET(CEntity, m_pStreamingLink, 0x28); +VALIDATE_OFFSET(CEntity, m_nScanCode, 0x2C); +VALIDATE_OFFSET(CEntity, m_nIplIndex, 0x2E); +VALIDATE_OFFSET(CEntity, m_nAreaCode, 0x2F); +VALIDATE_OFFSET(CEntity, m_nLodIndex, 0x30); +VALIDATE_OFFSET(CEntity, m_pLod, 0x30); +VALIDATE_OFFSET(CEntity, m_nNumLodChildren, 0x34); +VALIDATE_OFFSET(CEntity, m_nNumLodChildrenRendered, 0x35); VALIDATE_SIZE(CEntity, 0x38); PLUGIN_API bool IsEntityPointerValid(CEntity* entity); diff --git a/plugin_sa/game_sa/CEntityScanner.h b/plugin_sa/game_sa/CEntityScanner.h index b44749e81..2385a1f46 100644 --- a/plugin_sa/game_sa/CEntityScanner.h +++ b/plugin_sa/game_sa/CEntityScanner.h @@ -17,5 +17,8 @@ class PLUGIN_API CEntityScanner { class CEntity *m_apEntities[16]; int field_4C; }; - +VALIDATE_OFFSET(CEntityScanner, field_4, 0x4); +VALIDATE_OFFSET(CEntityScanner, m_nCount, 0x8); +VALIDATE_OFFSET(CEntityScanner, m_apEntities, 0xC); +VALIDATE_OFFSET(CEntityScanner, field_4C, 0x4C); VALIDATE_SIZE(CEntityScanner, 0x50); diff --git a/plugin_sa/game_sa/CEntryExit.h b/plugin_sa/game_sa/CEntryExit.h index 356f01bfd..17aee872e 100644 --- a/plugin_sa/game_sa/CEntryExit.h +++ b/plugin_sa/game_sa/CEntryExit.h @@ -66,7 +66,19 @@ class PLUGIN_API CEntryExit { SUPPORTED_10US bool TransitionStarted(CPed *player); SUPPORTED_10US void WarpGangWithPlayer(CPed *player); }; - +VALIDATE_OFFSET(CEntryExit, m_szName, 0x0); +VALIDATE_OFFSET(CEntryExit, m_recEntrance, 0x8); +VALIDATE_OFFSET(CEntryExit, m_fEntranceZ, 0x18); +VALIDATE_OFFSET(CEntryExit, m_fEntranceAngle, 0x1C); +VALIDATE_OFFSET(CEntryExit, m_vecExitPos, 0x20); +VALIDATE_OFFSET(CEntryExit, m_fExitAngle, 0x2C); +VALIDATE_OFFSET(CEntryExit, m_nFlags, 0x30); +VALIDATE_OFFSET(CEntryExit, m_nArea, 0x32); +VALIDATE_OFFSET(CEntryExit, m_nSkyColor, 0x33); +VALIDATE_OFFSET(CEntryExit, m_nTimeOn, 0x34); +VALIDATE_OFFSET(CEntryExit, m_nTimeOff, 0x35); +VALIDATE_OFFSET(CEntryExit, m_nNumberOfPeds, 0x36); +VALIDATE_OFFSET(CEntryExit, m_pLink, 0x38); VALIDATE_SIZE(CEntryExit, 0x3C); #include "meta/meta.CEntryExit.h" diff --git a/plugin_sa/game_sa/CEntryExitManager.h b/plugin_sa/game_sa/CEntryExitManager.h index 7946a9cfc..d6cbefe5c 100644 --- a/plugin_sa/game_sa/CEntryExitManager.h +++ b/plugin_sa/game_sa/CEntryExitManager.h @@ -56,5 +56,6 @@ class PLUGIN_API CEntryExitManager { SUPPORTED_10US static void Update(); SUPPORTED_10US static bool WeAreInInteriorTransition(); }; +VALIDATE_SIZE(CEntryExitManager, 0x1); #include "meta/meta.CEntryExitManager.h" diff --git a/plugin_sa/game_sa/CEventGroup.h b/plugin_sa/game_sa/CEventGroup.h index 56d32df0b..e2c7a9b7f 100644 --- a/plugin_sa/game_sa/CEventGroup.h +++ b/plugin_sa/game_sa/CEventGroup.h @@ -16,5 +16,7 @@ class PLUGIN_API CEventGroup { unsigned int m_dwCount; void *m_apEvents[16]; }; - +VALIDATE_OFFSET(CEventGroup, m_pPed, 0x4); +VALIDATE_OFFSET(CEventGroup, m_dwCount, 0x8); +VALIDATE_OFFSET(CEventGroup, m_apEvents, 0xC); VALIDATE_SIZE(CEventGroup, 0x4C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CEventHandler.h b/plugin_sa/game_sa/CEventHandler.h index 2e800ced2..05c2d8193 100644 --- a/plugin_sa/game_sa/CEventHandler.h +++ b/plugin_sa/game_sa/CEventHandler.h @@ -26,5 +26,19 @@ class PLUGIN_API CEventHandler { int field_2C; int field_30; }; - +VALIDATE_OFFSET(CEventHandler, m_pPed, 0x0); +VALIDATE_OFFSET(CEventHandler, field_4, 0x4); +VALIDATE_OFFSET(CEventHandler, field_8, 0x8); +VALIDATE_OFFSET(CEventHandler, field_C, 0xC); +VALIDATE_OFFSET(CEventHandler, field_10, 0x10); +VALIDATE_OFFSET(CEventHandler, field_14, 0x14); +VALIDATE_OFFSET(CEventHandler, field_18, 0x18); +VALIDATE_OFFSET(CEventHandler, field_1C, 0x1C); +VALIDATE_OFFSET(CEventHandler, field_1D, 0x1D); +VALIDATE_OFFSET(CEventHandler, field_1E, 0x1E); +VALIDATE_OFFSET(CEventHandler, field_20, 0x20); +VALIDATE_OFFSET(CEventHandler, field_24, 0x24); +VALIDATE_OFFSET(CEventHandler, field_28, 0x28); +VALIDATE_OFFSET(CEventHandler, field_2C, 0x2C); +VALIDATE_OFFSET(CEventHandler, field_30, 0x30); VALIDATE_SIZE(CEventHandler, 0x34); \ No newline at end of file diff --git a/plugin_sa/game_sa/CEventScanner.h b/plugin_sa/game_sa/CEventScanner.h index 9d98c585b..1051e68d7 100644 --- a/plugin_sa/game_sa/CEventScanner.h +++ b/plugin_sa/game_sa/CEventScanner.h @@ -24,5 +24,15 @@ class PLUGIN_API CEventScanner { CTaskTimer field_BC; CTaskTimer field_C8; }; - +VALIDATE_OFFSET(CEventScanner, field_0, 0x0); +VALIDATE_OFFSET(CEventScanner, field_4, 0x4); +VALIDATE_OFFSET(CEventScanner, field_10, 0x10); +VALIDATE_OFFSET(CEventScanner, m_attractorScanner, 0x1C); +VALIDATE_OFFSET(CEventScanner, field_AC, 0xAC); +VALIDATE_OFFSET(CEventScanner, field_B8, 0xB8); +VALIDATE_OFFSET(CEventScanner, field_B9, 0xB9); +VALIDATE_OFFSET(CEventScanner, field_BA, 0xBA); +VALIDATE_OFFSET(CEventScanner, field_BB, 0xBB); +VALIDATE_OFFSET(CEventScanner, field_BC, 0xBC); +VALIDATE_OFFSET(CEventScanner, field_C8, 0xC8); VALIDATE_SIZE(CEventScanner, 0xD4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CExplosion.h b/plugin_sa/game_sa/CExplosion.h index 21066fc6c..246111eda 100644 --- a/plugin_sa/game_sa/CExplosion.h +++ b/plugin_sa/game_sa/CExplosion.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" #include "CAEExplosionAudioEntity.h" @@ -66,7 +65,25 @@ class PLUGIN_API CExplosion { static bool AddExplosion(CEntity* victim, CEntity* creator, eExplosionType explosionType, CVector posn, unsigned int time, unsigned char makeSound, float camShake, unsigned char visibility); static void Update(); }; - +VALIDATE_OFFSET(CExplosion, m_nType, 0x0); +VALIDATE_OFFSET(CExplosion, m_vecPosition, 0x4); +VALIDATE_OFFSET(CExplosion, m_fRadius, 0x10); +VALIDATE_OFFSET(CExplosion, m_fPropagationRate, 0x14); +VALIDATE_OFFSET(CExplosion, m_pCreator, 0x18); +VALIDATE_OFFSET(CExplosion, m_pVictim, 0x1C); +VALIDATE_OFFSET(CExplosion, m_nExpireTime, 0x20); +VALIDATE_OFFSET(CExplosion, m_fDamagePercentage, 0x24); +VALIDATE_OFFSET(CExplosion, m_bIsActive, 0x28); +VALIDATE_OFFSET(CExplosion, m_nActiveCounter, 0x29); +VALIDATE_OFFSET(CExplosion, m_bMakeSound, 0x2A); +VALIDATE_OFFSET(CExplosion, m_nCreatedTime, 0x2C); +VALIDATE_OFFSET(CExplosion, m_nParticlesExpireTime, 0x30); +VALIDATE_OFFSET(CExplosion, m_fVisibleDistance, 0x34); +VALIDATE_OFFSET(CExplosion, m_fGroundZ, 0x38); +VALIDATE_OFFSET(CExplosion, m_nFuelTimer, 0x3C); +VALIDATE_OFFSET(CExplosion, m_vecFuelDirection, 0x40); +VALIDATE_OFFSET(CExplosion, m_fFuelOffsetDistance, 0x64); +VALIDATE_OFFSET(CExplosion, m_fFuelSpeed, 0x70); VALIDATE_SIZE(CExplosion, 0x7C); extern unsigned int MAX_EXPLOSIONS; // default 16 diff --git a/plugin_sa/game_sa/CFileCarGenerator.h b/plugin_sa/game_sa/CFileCarGenerator.h index 54bb75642..43fca85a3 100644 --- a/plugin_sa/game_sa/CFileCarGenerator.h +++ b/plugin_sa/game_sa/CFileCarGenerator.h @@ -41,6 +41,17 @@ class PLUGIN_API CFileCarGenerator { public: unsigned short m_nMaxDelay; }; +VALIDATE_OFFSET(CFileCarGenerator, m_vecPosn, 0x0); +VALIDATE_OFFSET(CFileCarGenerator, m_fAngle, 0xC); +VALIDATE_OFFSET(CFileCarGenerator, m_nModelId, 0x10); +VALIDATE_OFFSET(CFileCarGenerator, m_nColor1, 0x14); +VALIDATE_OFFSET(CFileCarGenerator, m_nColor2, 0x18); +VALIDATE_OFFSET(CFileCarGenerator, m_nFlags, 0x1C); +VALIDATE_OFFSET(CFileCarGenerator, m_nAlarm, 0x20); +VALIDATE_OFFSET(CFileCarGenerator, m_nDoorLock, 0x24); +VALIDATE_OFFSET(CFileCarGenerator, m_nMinDelay, 0x28); +VALIDATE_OFFSET(CFileCarGenerator, m_nMaxDelay, 0x2C); +VALIDATE_SIZE(CFileCarGenerator, 0x2E); #pragma pack(pop) VALIDATE_SIZE(CFileCarGenerator, 0x2E); diff --git a/plugin_sa/game_sa/CFileLoader.h b/plugin_sa/game_sa/CFileLoader.h index 5ec8058cd..51cca9e57 100644 --- a/plugin_sa/game_sa/CFileLoader.h +++ b/plugin_sa/game_sa/CFileLoader.h @@ -75,6 +75,7 @@ class PLUGIN_API CFileLoader { SUPPORTED_10US static RpAtomic *SetRelatedModelInfoCB(RpAtomic *atomic, void *data); SUPPORTED_10US static bool StartLoadClumpFile(RwStream *stream, unsigned int modelIndex); }; +VALIDATE_SIZE(CFileLoader, 0x1); //! global variable to be used in a callback SUPPORTED_10US extern unsigned int &gAtomicModelId; diff --git a/plugin_sa/game_sa/CFileMgr.h b/plugin_sa/game_sa/CFileMgr.h index 29d90c870..5d0a830c6 100644 --- a/plugin_sa/game_sa/CFileMgr.h +++ b/plugin_sa/game_sa/CFileMgr.h @@ -36,4 +36,5 @@ class PLUGIN_API CFileMgr static int GetFileLength(FILESTREAM file); static int Tell(FILESTREAM file); static bool GetErrorReadWrite(FILESTREAM file); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CFileMgr, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CFileObjectInstance.h b/plugin_sa/game_sa/CFileObjectInstance.h index eed732bc2..d6d9f0f5a 100644 --- a/plugin_sa/game_sa/CFileObjectInstance.h +++ b/plugin_sa/game_sa/CFileObjectInstance.h @@ -29,5 +29,9 @@ class PLUGIN_API CFileObjectInstance { }; int m_nLodInstanceIndex; // -1 - without LOD model }; - +VALIDATE_OFFSET(CFileObjectInstance, m_vecPosition, 0x0); +VALIDATE_OFFSET(CFileObjectInstance, m_qRotation, 0xC); +VALIDATE_OFFSET(CFileObjectInstance, m_nModelId, 0x1C); +VALIDATE_OFFSET(CFileObjectInstance, m_nInstanceType, 0x20); +VALIDATE_OFFSET(CFileObjectInstance, m_nLodInstanceIndex, 0x24); VALIDATE_SIZE(CFileObjectInstance, 0x28); \ No newline at end of file diff --git a/plugin_sa/game_sa/CFire.h b/plugin_sa/game_sa/CFire.h index 9f947417f..891c39af6 100644 --- a/plugin_sa/game_sa/CFire.h +++ b/plugin_sa/game_sa/CFire.h @@ -42,5 +42,14 @@ class PLUGIN_API CFire { void Extinguish(); void ProcessFire(); }; - +VALIDATE_OFFSET(CFire, m_nFlags, 0x0); +VALIDATE_OFFSET(CFire, m_nScriptReferenceIndex, 0x2); +VALIDATE_OFFSET(CFire, m_vecPosition, 0x4); +VALIDATE_OFFSET(CFire, m_pEntityTarget, 0x10); +VALIDATE_OFFSET(CFire, m_pEntityCreator, 0x14); +VALIDATE_OFFSET(CFire, m_nTimeToBurn, 0x18); +VALIDATE_OFFSET(CFire, m_fStrength, 0x1C); +VALIDATE_OFFSET(CFire, m_nNumGenerationsAllowed, 0x20); +VALIDATE_OFFSET(CFire, m_nRemovalDist, 0x21); +VALIDATE_OFFSET(CFire, m_pFxSystem, 0x24); VALIDATE_SIZE(CFire, 0x28); \ No newline at end of file diff --git a/plugin_sa/game_sa/CFireManager.h b/plugin_sa/game_sa/CFireManager.h index 454eb8f62..263502857 100644 --- a/plugin_sa/game_sa/CFireManager.h +++ b/plugin_sa/game_sa/CFireManager.h @@ -41,7 +41,8 @@ class PLUGIN_API CFireManager { int StartScriptFire(CVector const& point, CEntity* target, _IGNORED_ float arg2, _IGNORED_ unsigned char arg3, signed char numGenerations, int size); void Update(); }; - +VALIDATE_OFFSET(CFireManager, m_aFires, 0x0); +VALIDATE_OFFSET(CFireManager, m_nMaxFireGenerationsAllowed, 0x960); VALIDATE_SIZE(CFireManager, 0x964); extern CFireManager &gFireManager; \ No newline at end of file diff --git a/plugin_sa/game_sa/CFont.h b/plugin_sa/game_sa/CFont.h index d3ec3750f..68cc576fb 100644 --- a/plugin_sa/game_sa/CFont.h +++ b/plugin_sa/game_sa/CFont.h @@ -19,6 +19,10 @@ struct PLUGIN_API tFontData { char m_spaceValue; char m_unpropValue; }; +VALIDATE_OFFSET(tFontData, m_propValues, 0x0); +VALIDATE_OFFSET(tFontData, m_spaceValue, 0xD0); +VALIDATE_OFFSET(tFontData, m_unpropValue, 0xD1); +VALIDATE_SIZE(tFontData, 0xD2); enum PLUGIN_API eFontAlignment : unsigned char { ALIGN_CENTER, @@ -51,6 +55,22 @@ class CFontRenderState { int16_t Style; int8_t EdgeAmount; }; +VALIDATE_OFFSET(CFontRenderState, id, 0x0); +VALIDATE_OFFSET(CFontRenderState, x, 0x4); +VALIDATE_OFFSET(CFontRenderState, y, 0x8); +VALIDATE_OFFSET(CFontRenderState, ScaleX, 0xC); +VALIDATE_OFFSET(CFontRenderState, ScaleY, 0x10); +VALIDATE_OFFSET(CFontRenderState, Colour, 0x14); +VALIDATE_OFFSET(CFontRenderState, PixelsToAdd, 0x18); +VALIDATE_OFFSET(CFontRenderState, Slope, 0x1C); +VALIDATE_OFFSET(CFontRenderState, SlopeRefX, 0x20); +VALIDATE_OFFSET(CFontRenderState, SlopeRefY, 0x24); +VALIDATE_OFFSET(CFontRenderState, Shadow, 0x28); +VALIDATE_OFFSET(CFontRenderState, ExtraFont, 0x29); +VALIDATE_OFFSET(CFontRenderState, Proportional, 0x2A); +VALIDATE_OFFSET(CFontRenderState, Style, 0x2C); +VALIDATE_OFFSET(CFontRenderState, EdgeAmount, 0x2E); +VALIDATE_SIZE(CFontRenderState, 0x30); class PLUGIN_API CFont { public: @@ -149,5 +169,6 @@ class PLUGIN_API CFont { static void PrintString(float x, float y, const char *text); static void PrintStringFromBottom(float x, float y, const char *text); }; +VALIDATE_SIZE(CFont, 0x1); extern tFontData *gFontData; \ No newline at end of file diff --git a/plugin_sa/game_sa/CForbiddenArea.h b/plugin_sa/game_sa/CForbiddenArea.h index 7663af457..50b60012c 100644 --- a/plugin_sa/game_sa/CForbiddenArea.h +++ b/plugin_sa/game_sa/CForbiddenArea.h @@ -22,5 +22,12 @@ class PLUGIN_API CForbiddenArea { char _pad1A[2]; public: }; - +VALIDATE_OFFSET(CForbiddenArea, m_fX1, 0x0); +VALIDATE_OFFSET(CForbiddenArea, m_fX2, 0x4); +VALIDATE_OFFSET(CForbiddenArea, m_fY1, 0x8); +VALIDATE_OFFSET(CForbiddenArea, m_fY2, 0xC); +VALIDATE_OFFSET(CForbiddenArea, m_fZ1, 0x10); +VALIDATE_OFFSET(CForbiddenArea, m_fZ2, 0x14); +VALIDATE_OFFSET(CForbiddenArea, m_bEnable, 0x18); +VALIDATE_OFFSET(CForbiddenArea, m_nType, 0x19); VALIDATE_SIZE(CForbiddenArea, 0x1C); diff --git a/plugin_sa/game_sa/CFormation.h b/plugin_sa/game_sa/CFormation.h index 2aceab568..27ed57afa 100644 --- a/plugin_sa/game_sa/CFormation.h +++ b/plugin_sa/game_sa/CFormation.h @@ -33,5 +33,6 @@ class PLUGIN_API CFormation { SUPPORTED_10US static bool ReturnDestinationForPed(CPed *ped, CVector *pos); SUPPORTED_10US static int ReturnTargetPedForPed(CPed *ped, CPed **pOutTargetPed); }; +VALIDATE_SIZE(CFormation, 0x1); #include "meta/meta.CFormation.h" diff --git a/plugin_sa/game_sa/CGame.h b/plugin_sa/game_sa/CGame.h index 97334273e..c634f988f 100644 --- a/plugin_sa/game_sa/CGame.h +++ b/plugin_sa/game_sa/CGame.h @@ -46,6 +46,7 @@ class PLUGIN_API CGame { SUPPORTED_10US static void ShutdownRenderWare(); SUPPORTED_10US static void TidyUpMemory(bool a1, bool clearD3Dmem); }; +VALIDATE_SIZE(CGame, 0x1); SUPPORTED_10US extern int &gameTxdSlot; extern int &gGameState; diff --git a/plugin_sa/game_sa/CGameLogic.h b/plugin_sa/game_sa/CGameLogic.h index 9300fd1ad..21289c292 100644 --- a/plugin_sa/game_sa/CGameLogic.h +++ b/plugin_sa/game_sa/CGameLogic.h @@ -41,3 +41,4 @@ class PLUGIN_API CGameLogic { static void Save(); static void Load(); }; +VALIDATE_SIZE(CGameLogic, 0x1); diff --git a/plugin_sa/game_sa/CGamma.h b/plugin_sa/game_sa/CGamma.h index c6e812d99..60798097e 100644 --- a/plugin_sa/game_sa/CGamma.h +++ b/plugin_sa/game_sa/CGamma.h @@ -18,7 +18,10 @@ class PLUGIN_API CGamma void SetGamma(float arg1, char arg2); }; - +VALIDATE_OFFSET(CGamma, field_0, 0x0); +VALIDATE_OFFSET(CGamma, field_4, 0x4); +VALIDATE_OFFSET(CGamma, field_8, 0x8); +VALIDATE_OFFSET(CGamma, field_C, 0xC); VALIDATE_SIZE(CGamma, 0x10); extern PLUGIN_API CGamma γ \ No newline at end of file diff --git a/plugin_sa/game_sa/CGangInfo.h b/plugin_sa/game_sa/CGangInfo.h index b3d27d126..d54bf274a 100644 --- a/plugin_sa/game_sa/CGangInfo.h +++ b/plugin_sa/game_sa/CGangInfo.h @@ -15,7 +15,8 @@ class PLUGIN_API CGangInfo { signed char m_nPedModelOverride; int m_nGangWeapons[3]; }; - +VALIDATE_OFFSET(CGangInfo, m_nPedModelOverride, 0x0); +VALIDATE_OFFSET(CGangInfo, m_nGangWeapons, 0x4); VALIDATE_SIZE(CGangInfo, 0x10); #include "meta/meta.CGangInfo.h" diff --git a/plugin_sa/game_sa/CGangWars.h b/plugin_sa/game_sa/CGangWars.h index d3ae2fe1f..88ac89e32 100644 --- a/plugin_sa/game_sa/CGangWars.h +++ b/plugin_sa/game_sa/CGangWars.h @@ -97,5 +97,6 @@ class PLUGIN_API CGangWars { SUPPORTED_10US static void Update(); SUPPORTED_10US static void UpdateTerritoryUnderControlPercentage(); }; +VALIDATE_SIZE(CGangWars, 0x1); #include "meta/meta.CGangWars.h" diff --git a/plugin_sa/game_sa/CGangWarsSaveStructure.h b/plugin_sa/game_sa/CGangWarsSaveStructure.h index 147773a3d..5786610df 100644 --- a/plugin_sa/game_sa/CGangWarsSaveStructure.h +++ b/plugin_sa/game_sa/CGangWarsSaveStructure.h @@ -39,7 +39,24 @@ class PLUGIN_API CGangWarsSaveStructure { SUPPORTED_10US void Construct(); SUPPORTED_10US void Extract(); }; - +VALIDATE_OFFSET(CGangWarsSaveStructure, bGangWarsActive, 0x0); +VALIDATE_OFFSET(CGangWarsSaveStructure, State, 0x4); +VALIDATE_OFFSET(CGangWarsSaveStructure, TimeStarted, 0x8); +VALIDATE_OFFSET(CGangWarsSaveStructure, GangWarZoneInfoIndex, 0xC); +VALIDATE_OFFSET(CGangWarsSaveStructure, GangWarNavigationZoneIndex, 0x10); +VALIDATE_OFFSET(CGangWarsSaveStructure, CoorsOfPlayerAtStartOfWar, 0x14); +VALIDATE_OFFSET(CGangWarsSaveStructure, Gang1, 0x20); +VALIDATE_OFFSET(CGangWarsSaveStructure, Gang2, 0x24); +VALIDATE_OFFSET(CGangWarsSaveStructure, WarFerocity, 0x28); +VALIDATE_OFFSET(CGangWarsSaveStructure, LastTimeInArea, 0x2C); +VALIDATE_OFFSET(CGangWarsSaveStructure, State2, 0x30); +VALIDATE_OFFSET(CGangWarsSaveStructure, TimeTillNextAttack, 0x34); +VALIDATE_OFFSET(CGangWarsSaveStructure, PointOfAttack, 0x38); +VALIDATE_OFFSET(CGangWarsSaveStructure, FightTimer, 0x44); +VALIDATE_OFFSET(CGangWarsSaveStructure, RadarBlip, 0x48); +VALIDATE_OFFSET(CGangWarsSaveStructure, bPlayerIsCloseby, 0x4C); +VALIDATE_OFFSET(CGangWarsSaveStructure, TerritoryUnderControlPercentage, 0x50); +VALIDATE_OFFSET(CGangWarsSaveStructure, Difficulty, 0x54); VALIDATE_SIZE(CGangWarsSaveStructure, 0x58); #include "meta/meta.CGangWarsSaveStructure.h" diff --git a/plugin_sa/game_sa/CGangs.h b/plugin_sa/game_sa/CGangs.h index 3ca1f580a..67e35a3d0 100644 --- a/plugin_sa/game_sa/CGangs.h +++ b/plugin_sa/game_sa/CGangs.h @@ -27,5 +27,6 @@ class PLUGIN_API CGangs { //! unused SUPPORTED_10US static void SetWillAttackPlayerWithCops(ePedType gangID, bool bAttackPlayerWithCops); }; +VALIDATE_SIZE(CGangs, 0x1); #include "meta/meta.CGangs.h" diff --git a/plugin_sa/game_sa/CGarages.h b/plugin_sa/game_sa/CGarages.h index f028ec83d..ca74f3a40 100644 --- a/plugin_sa/game_sa/CGarages.h +++ b/plugin_sa/game_sa/CGarages.h @@ -19,4 +19,5 @@ class PLUGIN_API CGarages static bool Load(); static bool Save(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CGarages, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CGeneral.h b/plugin_sa/game_sa/CGeneral.h index e9fa79e58..fc758b0c2 100644 --- a/plugin_sa/game_sa/CGeneral.h +++ b/plugin_sa/game_sa/CGeneral.h @@ -22,4 +22,5 @@ class PLUGIN_API CGeneral { static float GetRandomNumberInRange(float min, float max); // returns random float in range [min;max) static uint32_t GetRandomNumber(); static void CamShakeNoPos(CCamera *camera, float strength); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CGeneral, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CGenericGameStorage.h b/plugin_sa/game_sa/CGenericGameStorage.h index 18b537dab..84568b1a0 100644 --- a/plugin_sa/game_sa/CGenericGameStorage.h +++ b/plugin_sa/game_sa/CGenericGameStorage.h @@ -46,12 +46,13 @@ enum PLUGIN_API eSaveLoadError { struct PLUGIN_API tSlotSaveDate { char m_sSavedGameDateAndTime[70]; }; +VALIDATE_OFFSET(tSlotSaveDate, m_sSavedGameDateAndTime, 0x0); +VALIDATE_SIZE(tSlotSaveDate, 0x46); struct PLUGIN_API tSlotFileName { char m_sSavedGameName[260]; }; - -VALIDATE_SIZE(tSlotSaveDate, 0x46); +VALIDATE_OFFSET(tSlotFileName, m_sSavedGameName, 0x0); VALIDATE_SIZE(tSlotFileName, 0x104); class PLUGIN_API CGenericGameStorage { @@ -101,7 +102,6 @@ class PLUGIN_API CGenericGameStorage { SUPPORTED_10US static bool _LoadDataFromWorkBuffer(void *pData, int size); SUPPORTED_10US static bool _SaveDataToWorkBuffer(void *pData, int Size); }; - - +VALIDATE_SIZE(CGenericGameStorage, 0x1); #include "meta/meta.CGenericGameStorage.h" diff --git a/plugin_sa/game_sa/CGridRef.h b/plugin_sa/game_sa/CGridRef.h index 94a722fbe..877ddbdd2 100644 --- a/plugin_sa/game_sa/CGridRef.h +++ b/plugin_sa/game_sa/CGridRef.h @@ -17,6 +17,7 @@ class PLUGIN_API CGridRef { SUPPORTED_10US static void GetGridRefPositions(unsigned char *outSectorX, unsigned char *outSectorY); SUPPORTED_10US static void Init(); }; +VALIDATE_SIZE(CGridRef, 0x1); SUPPORTED_10US extern char(&GridRefList)[10][10][32]; // char GridRefList[10][10][32] diff --git a/plugin_sa/game_sa/CHandObject.h b/plugin_sa/game_sa/CHandObject.h index 3d7627631..e08d25d4f 100644 --- a/plugin_sa/game_sa/CHandObject.h +++ b/plugin_sa/game_sa/CHandObject.h @@ -15,7 +15,9 @@ class PLUGIN_API CHandObject : public CObject { unsigned int m_nBoneIndex; RwTexture *m_pTexture; bool m_bUpdatedMatricesArray; - char _pad[3]; }; - +VALIDATE_OFFSET(CHandObject, m_pPed, 0x17C); +VALIDATE_OFFSET(CHandObject, m_nBoneIndex, 0x180); +VALIDATE_OFFSET(CHandObject, m_pTexture, 0x184); +VALIDATE_OFFSET(CHandObject, m_bUpdatedMatricesArray, 0x188); VALIDATE_SIZE(CHandObject, 0x18C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CHeli.h b/plugin_sa/game_sa/CHeli.h index dd17ef13e..d5f4eba2c 100644 --- a/plugin_sa/game_sa/CHeli.h +++ b/plugin_sa/game_sa/CHeli.h @@ -46,7 +46,15 @@ struct tHeliLight { char _pad[2]; CVector field_28[3]; }; - +VALIDATE_OFFSET(tHeliLight, m_vecOrigin, 0x0); +VALIDATE_OFFSET(tHeliLight, m_vecTarget, 0xC); +VALIDATE_OFFSET(tHeliLight, m_fTargetRadius, 0x18); +VALIDATE_OFFSET(tHeliLight, m_fPower, 0x1C); +VALIDATE_OFFSET(tHeliLight, m_nCoronaIndex, 0x20); +VALIDATE_OFFSET(tHeliLight, field_24, 0x24); +VALIDATE_OFFSET(tHeliLight, m_bDrawShadow, 0x25); +VALIDATE_OFFSET(tHeliLight, _pad, 0x26); +VALIDATE_OFFSET(tHeliLight, field_28, 0x28); VALIDATE_SIZE(tHeliLight, 0x4C); class CHeli : public CAutomobile { @@ -110,5 +118,35 @@ class CHeli : public CAutomobile { static void UpdateHelis(); static void RenderAllHeliSearchLights(); }; - +VALIDATE_OFFSET(CHeli, m_nHeliFlags, 0x988); +VALIDATE_OFFSET(CHeli, _pad1, 0x989); +VALIDATE_OFFSET(CHeli, m_fLeftRightSkid, 0x98C); +VALIDATE_OFFSET(CHeli, m_fSteeringUpDown, 0x990); +VALIDATE_OFFSET(CHeli, m_fSteeringLeftRight, 0x994); +VALIDATE_OFFSET(CHeli, m_fAccelerationBreakStatus, 0x998); +VALIDATE_OFFSET(CHeli, field_99C, 0x99C); +VALIDATE_OFFSET(CHeli, m_fRotorZ, 0x9A0); +VALIDATE_OFFSET(CHeli, m_fSecondRotorZ, 0x9A4); +VALIDATE_OFFSET(CHeli, m_fMaxAltitude, 0x9A8); +VALIDATE_OFFSET(CHeli, field_9AC, 0x9AC); +VALIDATE_OFFSET(CHeli, m_fMinAltitude, 0x9B0); +VALIDATE_OFFSET(CHeli, field_9B4, 0x9B4); +VALIDATE_OFFSET(CHeli, field_9B8, 0x9B8); +VALIDATE_OFFSET(CHeli, m_nNumSwatOccupants, 0x9B9); +VALIDATE_OFFSET(CHeli, m_anSwatIDs, 0x9BA); +VALIDATE_OFFSET(CHeli, _pad2, 0x9BE); +VALIDATE_OFFSET(CHeli, field_9C0, 0x9C0); +VALIDATE_OFFSET(CHeli, field_9D0, 0x9D0); +VALIDATE_OFFSET(CHeli, m_pParticlesList, 0x9D4); +VALIDATE_OFFSET(CHeli, field_9D8, 0x9D8); +VALIDATE_OFFSET(CHeli, field_9F0, 0x9F0); +VALIDATE_OFFSET(CHeli, m_vecSearchLightTarget, 0x9F4); +VALIDATE_OFFSET(CHeli, m_fSearchLightIntensity, 0xA00); +VALIDATE_OFFSET(CHeli, field_A04, 0xA04); +VALIDATE_OFFSET(CHeli, field_A08, 0xA08); +VALIDATE_OFFSET(CHeli, m_ppGunflashFx, 0xA0C); +VALIDATE_OFFSET(CHeli, m_nFiringMultiplier, 0xA10); +VALIDATE_OFFSET(CHeli, m_bSearchLightEnabled, 0xA11); +VALIDATE_OFFSET(CHeli, _pad3, 0xA12); +VALIDATE_OFFSET(CHeli, field_A14, 0xA14); VALIDATE_SIZE(CHeli, 0xA18); diff --git a/plugin_sa/game_sa/CHud.h b/plugin_sa/game_sa/CHud.h index beedef97f..b03b9161d 100644 --- a/plugin_sa/game_sa/CHud.h +++ b/plugin_sa/game_sa/CHud.h @@ -127,6 +127,7 @@ class PLUGIN_API CHud { static void RenderBreathBar(int playerId, int x, int y); static void RenderHealthBar(int playerId, int x, int y); }; +VALIDATE_SIZE(CHud, 0x1); extern short &TimerMainCounterHideState; extern bool &TimerMainCounterWasDisplayed; diff --git a/plugin_sa/game_sa/CHudColours.h b/plugin_sa/game_sa/CHudColours.h index d5502c4c8..70fad8674 100644 --- a/plugin_sa/game_sa/CHudColours.h +++ b/plugin_sa/game_sa/CHudColours.h @@ -34,9 +34,11 @@ class PLUGIN_API CHudColour public: unsigned char red, green, blue, alpha; }; - - -VALIDATE_SIZE(CHudColour, 4); +VALIDATE_OFFSET(CHudColour, red, 0x0); +VALIDATE_OFFSET(CHudColour, green, 0x1); +VALIDATE_OFFSET(CHudColour, blue, 0x2); +VALIDATE_OFFSET(CHudColour, alpha, 0x3); +VALIDATE_SIZE(CHudColour, 0x4); class PLUGIN_API CHudColours @@ -59,6 +61,8 @@ class PLUGIN_API CHudColours // get color RGBA. "color" parameter - index of color in the table, see eHudColours enum. CRGBA GetRGBA(unsigned char color); }; +VALIDATE_OFFSET(CHudColours, m_aColours, 0x0); +VALIDATE_SIZE(CHudColours, 0x3C); VALIDATE_SIZE(CHudColours, 0x3C); diff --git a/plugin_sa/game_sa/CIniFile.h b/plugin_sa/game_sa/CIniFile.h index a38979665..bb7b10bc5 100644 --- a/plugin_sa/game_sa/CIniFile.h +++ b/plugin_sa/game_sa/CIniFile.h @@ -14,4 +14,5 @@ class PLUGIN_API CIniFile { static float &PedNumberMultiplier; static float &CarNumberMultiplier; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CIniFile, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CIplStore.h b/plugin_sa/game_sa/CIplStore.h index 34fc84a70..2a204b921 100644 --- a/plugin_sa/game_sa/CIplStore.h +++ b/plugin_sa/game_sa/CIplStore.h @@ -52,6 +52,7 @@ class PLUGIN_API CIplStore { static int SetupRelatedIpls(char const* iplName, int entityArraysIndex, CEntity** instances); static void Shutdown(); }; +VALIDATE_SIZE(CIplStore, 0x1); extern unsigned int MAX_IPL_ENTITY_INDEX_ARRAYS; // default 40 extern unsigned int MAX_IPL_INSTANCES; // default 1000 diff --git a/plugin_sa/game_sa/CKeyGen.h b/plugin_sa/game_sa/CKeyGen.h index a916ec30e..b5d6a784f 100644 --- a/plugin_sa/game_sa/CKeyGen.h +++ b/plugin_sa/game_sa/CKeyGen.h @@ -16,4 +16,5 @@ class CKeyGen { static unsigned int GetKey(char const* str); static unsigned int GetUppercaseKey(char const* str); static unsigned int AppendStringToKey(unsigned int key, char const* str); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CKeyGen, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLines.h b/plugin_sa/game_sa/CLines.h index 12ad8dc5f..8b748e696 100644 --- a/plugin_sa/game_sa/CLines.h +++ b/plugin_sa/game_sa/CLines.h @@ -13,4 +13,5 @@ class CLines { static void RenderLineNoClipping(float startX, float startY, float startZ, float endX, float endY, float endZ, uint32_t startColor, uint32_t endColor); static void RenderLineWithClipping(float startX, float startY, float startZ, float endX, float endY, float endZ, uint32_t startColor, uint32_t endColor); static void ImmediateLine2D(int32_t startX, int32_t startY, int32_t endX, int32_t endY, uint8_t startR, uint8_t startG, uint8_t startB, uint8_t startA, uint8_t endR, uint8_t endG, uint8_t endB, uint8_t endA); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CLines, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLink.h b/plugin_sa/game_sa/CLink.h index a2e6bfe77..d01dcff8f 100644 --- a/plugin_sa/game_sa/CLink.h +++ b/plugin_sa/game_sa/CLink.h @@ -15,5 +15,4 @@ class CLink { CLink* prev; CLink* next; }; - VALIDATE_SIZE(CLink, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLoadedCarGroup.h b/plugin_sa/game_sa/CLoadedCarGroup.h index ac7591b88..655904216 100644 --- a/plugin_sa/game_sa/CLoadedCarGroup.h +++ b/plugin_sa/game_sa/CLoadedCarGroup.h @@ -21,5 +21,6 @@ class PLUGIN_API CLoadedCarGroup { void Clear(); void AddMember(int member); }; - +VALIDATE_OFFSET(CLoadedCarGroup, m_members, 0x0); +VALIDATE_OFFSET(CLoadedCarGroup, field_2C, 0x2C); VALIDATE_SIZE(CLoadedCarGroup, 0x2E); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLoadingScreen.cpp b/plugin_sa/game_sa/CLoadingScreen.cpp index 4bbfff3ab..04f552c10 100644 --- a/plugin_sa/game_sa/CLoadingScreen.cpp +++ b/plugin_sa/game_sa/CLoadingScreen.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CLoadingScreen.h" int &CLoadingScreen::m_currDisplayedSplash = *(int*)0x8D093C; diff --git a/plugin_sa/game_sa/CLoadingScreen.h b/plugin_sa/game_sa/CLoadingScreen.h index 3a0ceb849..344f99b7c 100644 --- a/plugin_sa/game_sa/CLoadingScreen.h +++ b/plugin_sa/game_sa/CLoadingScreen.h @@ -55,4 +55,5 @@ class PLUGIN_API CLoadingScreen { static void DoPCScreenChange(unsigned int bFinish); static void NewChunkLoaded(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CLoadingScreen, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLocalisation.h b/plugin_sa/game_sa/CLocalisation.h index c11ef7ac8..7254887cc 100644 --- a/plugin_sa/game_sa/CLocalisation.h +++ b/plugin_sa/game_sa/CLocalisation.h @@ -32,4 +32,5 @@ class PLUGIN_API CLocalisation { static bool &nastyGame; static bool &germanGame; static bool &frenchGame; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CLocalisation, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLodAtomicModelInfo.h b/plugin_sa/game_sa/CLodAtomicModelInfo.h index 814cb259d..c87a73b75 100644 --- a/plugin_sa/game_sa/CLodAtomicModelInfo.h +++ b/plugin_sa/game_sa/CLodAtomicModelInfo.h @@ -13,5 +13,6 @@ class PLUGIN_API CLodAtomicModelInfo : public CAtomicModelInfo { int16_t m_numChildren; int16_t m_numChildrenRendered; }; - +VALIDATE_OFFSET(CLodAtomicModelInfo, m_numChildren, 0x20); +VALIDATE_OFFSET(CLodAtomicModelInfo, m_numChildrenRendered, 0x22); VALIDATE_SIZE(CLodAtomicModelInfo, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/CLodTimeModelInfo.h b/plugin_sa/game_sa/CLodTimeModelInfo.h index e86911edf..72e3e79a5 100644 --- a/plugin_sa/game_sa/CLodTimeModelInfo.h +++ b/plugin_sa/game_sa/CLodTimeModelInfo.h @@ -13,5 +13,5 @@ class PLUGIN_API CLodTimeModelInfo : public CLodAtomicModelInfo { public: tTimeInfo m_lodTimeInfo; }; - +VALIDATE_OFFSET(CLodTimeModelInfo, m_lodTimeInfo, 0x24); VALIDATE_SIZE(CLodTimeModelInfo, 0x28); \ No newline at end of file diff --git a/plugin_sa/game_sa/CMatrix.h b/plugin_sa/game_sa/CMatrix.h index 12b8f76b7..36c86e290 100644 --- a/plugin_sa/game_sa/CMatrix.h +++ b/plugin_sa/game_sa/CMatrix.h @@ -79,7 +79,16 @@ class CMatrix { CVector& GetPosition() { return pos; } const CVector& GetPosition() const { return pos; } }; - +VALIDATE_OFFSET(CMatrix, right, 0x0); +VALIDATE_OFFSET(CMatrix, flags, 0xC); +VALIDATE_OFFSET(CMatrix, up, 0x10); +VALIDATE_OFFSET(CMatrix, pad1, 0x1C); +VALIDATE_OFFSET(CMatrix, at, 0x20); +VALIDATE_OFFSET(CMatrix, pad2, 0x2C); +VALIDATE_OFFSET(CMatrix, pos, 0x30); +VALIDATE_OFFSET(CMatrix, pad3, 0x3C); +VALIDATE_OFFSET(CMatrix, m_pAttachMatrix, 0x40); +VALIDATE_OFFSET(CMatrix, m_bOwnsAttachedMatrix, 0x44); VALIDATE_SIZE(CMatrix, 0x48); CMatrix operator*(CMatrix const&a, CMatrix const&b); diff --git a/plugin_sa/game_sa/CMatrixLink.h b/plugin_sa/game_sa/CMatrixLink.h index 17d0a5f11..c5bfc965a 100644 --- a/plugin_sa/game_sa/CMatrixLink.h +++ b/plugin_sa/game_sa/CMatrixLink.h @@ -22,7 +22,9 @@ class PLUGIN_API CMatrixLink : public CMatrix { SUPPORTED_10US void Insert(CMatrixLink *where); SUPPORTED_10US void Remove(); }; - +VALIDATE_OFFSET(CMatrixLink, m_pOwner, 0x48); +VALIDATE_OFFSET(CMatrixLink, m_pPrev, 0x4C); +VALIDATE_OFFSET(CMatrixLink, m_pNext, 0x50); VALIDATE_SIZE(CMatrixLink, 0x54); #include "meta/meta.CMatrixLink.h" diff --git a/plugin_sa/game_sa/CMentalState.h b/plugin_sa/game_sa/CMentalState.h index 51996a310..fbcf29baf 100644 --- a/plugin_sa/game_sa/CMentalState.h +++ b/plugin_sa/game_sa/CMentalState.h @@ -29,4 +29,11 @@ class PLUGIN_API CMentalState { void IncrementAnger(int anger); void Process(); }; +VALIDATE_OFFSET(CMentalState, m_AngerAtPlayer, 0x0); +VALIDATE_OFFSET(CMentalState, m_LastAngerAtPlayer, 0x1); +VALIDATE_OFFSET(CMentalState, m_AngerTimer, 0x4); +VALIDATE_OFFSET(CMentalState, m_pedHealth, 0x10); +VALIDATE_OFFSET(CMentalState, m_oldPedHealth, 0x11); +VALIDATE_OFFSET(CMentalState, m_vehicleHealth, 0x12); +VALIDATE_OFFSET(CMentalState, m_oldVehicleHealth, 0x13); VALIDATE_SIZE(CMentalState, 0x14); diff --git a/plugin_sa/game_sa/CMenuManager.h b/plugin_sa/game_sa/CMenuManager.h index 49878efed..d29be5d3e 100644 --- a/plugin_sa/game_sa/CMenuManager.h +++ b/plugin_sa/game_sa/CMenuManager.h @@ -192,6 +192,11 @@ struct PLUGIN_API CMenuScreen { unsigned char m_nAlign; } m_aEntries[NUM_ENTRIES]; }; +VALIDATE_OFFSET(CMenuScreen, m_ScreenName, 0x0); +VALIDATE_OFFSET(CMenuScreen, m_nPreviousPage, 0x8); +VALIDATE_OFFSET(CMenuScreen, m_nParentEntry, 0x9); +VALIDATE_OFFSET(CMenuScreen, m_aEntries, 0xA); +VALIDATE_SIZE(CMenuScreen, 0xE2); #pragma pack(push,1) class PLUGIN_API CMenuManager { @@ -447,6 +452,182 @@ class PLUGIN_API CMenuManager { void RequestFrontEndShutDown(); void RequestFrontEndStartUp(); }; +VALIDATE_OFFSET(CMenuManager, m_nStatsScrollDir, 0x0); +VALIDATE_OFFSET(CMenuManager, field_1, 0x1); +VALIDATE_OFFSET(CMenuManager, m_fStatsScrollSpeed, 0x4); +VALIDATE_OFFSET(CMenuManager, field_8, 0x8); +VALIDATE_OFFSET(CMenuManager, field_9, 0x9); +VALIDATE_OFFSET(CMenuManager, m_bPrefsUseVibration, 0x20); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowHud, 0x21); +VALIDATE_OFFSET(CMenuManager, field_22, 0x22); +VALIDATE_OFFSET(CMenuManager, m_nPrefsRadarMode, 0x24); +VALIDATE_OFFSET(CMenuManager, field_28, 0x28); +VALIDATE_OFFSET(CMenuManager, m_nTargetBlipIndex, 0x2C); +VALIDATE_OFFSET(CMenuManager, n_nMenuSystemPanelId, 0x30); +VALIDATE_OFFSET(CMenuManager, field_31, 0x31); +VALIDATE_OFFSET(CMenuManager, m_bShutDownFrontEndRequested, 0x32); +VALIDATE_OFFSET(CMenuManager, m_bStartUpFrontEndRequested, 0x33); +VALIDATE_OFFSET(CMenuManager, m_bMenuAccessWidescreen, 0x34); +VALIDATE_OFFSET(CMenuManager, field_35, 0x35); +VALIDATE_OFFSET(CMenuManager, field_36, 0x36); +VALIDATE_OFFSET(CMenuManager, m_nKeyPressedCode, 0x38); +VALIDATE_OFFSET(CMenuManager, m_nPrefsBrightness, 0x3C); +VALIDATE_OFFSET(CMenuManager, m_fPrefsLOD, 0x40); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowSubtitles, 0x44); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowLocations, 0x45); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowContacts, 0x46); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowMission, 0x47); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowOther, 0x48); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowGangArea, 0x49); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowLegends, 0x4A); +VALIDATE_OFFSET(CMenuManager, m_bPrefsUseWideScreen, 0x4B); +VALIDATE_OFFSET(CMenuManager, m_bPrefsVsync, 0x4C); +VALIDATE_OFFSET(CMenuManager, m_bPrefsRadioAutoSelect, 0x4D); +VALIDATE_OFFSET(CMenuManager, field_4E, 0x4E); +VALIDATE_OFFSET(CMenuManager, m_nPrefsSfxVolume, 0x4F); +VALIDATE_OFFSET(CMenuManager, m_nPrefsMusicVolume, 0x50); +VALIDATE_OFFSET(CMenuManager, m_bPrefsRadioEq, 0x51); +VALIDATE_OFFSET(CMenuManager, m_nPrefsRadioStation, 0x52); +VALIDATE_OFFSET(CMenuManager, m_bRecheckNumPhotos, 0x53); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuEntry, 0x54); +VALIDATE_OFFSET(CMenuManager, m_bQuitGameNoCD, 0x58); +VALIDATE_OFFSET(CMenuManager, m_bDrawRadarOrMap, 0x59); +VALIDATE_OFFSET(CMenuManager, m_bAllowNavigation, 0x5A); +VALIDATE_OFFSET(CMenuManager, m_bStreamingDone, 0x5B); +VALIDATE_OFFSET(CMenuManager, m_bMenuActive, 0x5C); +VALIDATE_OFFSET(CMenuManager, m_bWantToRestart, 0x5D); +VALIDATE_OFFSET(CMenuManager, m_bFirstTime, 0x5E); +VALIDATE_OFFSET(CMenuManager, m_bSaveMenuActive, 0x5F); +VALIDATE_OFFSET(CMenuManager, m_bWantToLoad, 0x60); +VALIDATE_OFFSET(CMenuManager, field_61, 0x61); +VALIDATE_OFFSET(CMenuManager, m_fMapZoom, 0x64); +VALIDATE_OFFSET(CMenuManager, m_fMapBaseX, 0x68); +VALIDATE_OFFSET(CMenuManager, m_fMapBaseY, 0x6C); +VALIDATE_OFFSET(CMenuManager, m_vMousePos, 0x70); +VALIDATE_OFFSET(CMenuManager, m_bStandardInput, 0x78); +VALIDATE_OFFSET(CMenuManager, field_79, 0x79); +VALIDATE_OFFSET(CMenuManager, m_nTitleLanguage, 0x7C); +VALIDATE_OFFSET(CMenuManager, m_nTextLanguage, 0x80); +VALIDATE_OFFSET(CMenuManager, m_nPrefsLanguage, 0x84); +VALIDATE_OFFSET(CMenuManager, m_nPrefsPrevLanguage, 0x85); +VALIDATE_OFFSET(CMenuManager, field_86, 0x86); +VALIDATE_OFFSET(CMenuManager, field_88, 0x88); +VALIDATE_OFFSET(CMenuManager, m_bLanguageLoaded, 0x8C); +VALIDATE_OFFSET(CMenuManager, field_8D, 0x8D); +VALIDATE_OFFSET(CMenuManager, field_90, 0x90); +VALIDATE_OFFSET(CMenuManager, field_94, 0x94); +VALIDATE_OFFSET(CMenuManager, m_pJPegBuffer, 0x98); +VALIDATE_OFFSET(CMenuManager, field_9C, 0x9C); +VALIDATE_OFFSET(CMenuManager, field_AC, 0xAC); +VALIDATE_OFFSET(CMenuManager, m_nPrefsRadioMode, 0xB0); +VALIDATE_OFFSET(CMenuManager, m_bPrefsInvertPadX1, 0xB1); +VALIDATE_OFFSET(CMenuManager, m_bPrefsInvertPadY1, 0xB2); +VALIDATE_OFFSET(CMenuManager, m_bPrefsInvertPadX2, 0xB3); +VALIDATE_OFFSET(CMenuManager, m_bPrefsInvertPadY2, 0xB4); +VALIDATE_OFFSET(CMenuManager, m_bPrefsSwapPadAxis1, 0xB5); +VALIDATE_OFFSET(CMenuManager, m_bPrefsSwapPadAxis2, 0xB6); +VALIDATE_OFFSET(CMenuManager, m_bInVehicleControlsScreen, 0xB7); +VALIDATE_OFFSET(CMenuManager, m_bShowMouse, 0xB8); +VALIDATE_OFFSET(CMenuManager, field_B9, 0xB9); +VALIDATE_OFFSET(CMenuManager, m_nMousePosX, 0xBC); +VALIDATE_OFFSET(CMenuManager, m_nMousePosY, 0xC0); +VALIDATE_OFFSET(CMenuManager, m_bPrefsMipMapping, 0xC4); +VALIDATE_OFFSET(CMenuManager, m_bPrefsTracksAutoScan, 0xC5); +VALIDATE_OFFSET(CMenuManager, field_C6, 0xC6); +VALIDATE_OFFSET(CMenuManager, m_nPrefsAntiAliasing, 0xC8); +VALIDATE_OFFSET(CMenuManager, m_nPrefsAntiAliasingDisp, 0xCC); +VALIDATE_OFFSET(CMenuManager, m_nController, 0xD0); +VALIDATE_OFFSET(CMenuManager, field_D1, 0xD1); +VALIDATE_OFFSET(CMenuManager, m_nPrefsVideoMode, 0xD4); +VALIDATE_OFFSET(CMenuManager, m_nDisplayVideoMode, 0xD8); +VALIDATE_OFFSET(CMenuManager, field_DC, 0xDC); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosX, 0xE0); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosY, 0xE4); +VALIDATE_OFFSET(CMenuManager, m_bPrefsSavePhotos, 0xE8); +VALIDATE_OFFSET(CMenuManager, m_bGameNotLoaded, 0xE9); +VALIDATE_OFFSET(CMenuManager, m_nPlayerNumber, 0xEA); +VALIDATE_OFFSET(CMenuManager, m_bReinitLanguageSettings, 0xEB); +VALIDATE_OFFSET(CMenuManager, field_EC, 0xEC); +VALIDATE_OFFSET(CMenuManager, pControlEdit, 0xF0); +VALIDATE_OFFSET(CMenuManager, m_bOnlySaveMenu, 0xF4); +VALIDATE_OFFSET(CMenuManager, field_F5, 0xF5); +VALIDATE_OFFSET(CMenuManager, FrontEndSprites, 0xF8); +VALIDATE_OFFSET(CMenuManager, m_bTexturesLoaded, 0x15C); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuPage, 0x15D); +VALIDATE_OFFSET(CMenuManager, m_nPreviousMenuPage, 0x15E); +VALIDATE_OFFSET(CMenuManager, m_nSelectedSaveGame, 0x15F); +VALIDATE_OFFSET(CMenuManager, m_nSelectedMissionPack, 0x160); +VALIDATE_OFFSET(CMenuManager, m_MissionPacks, 0x161); +VALIDATE_OFFSET(CMenuManager, m_bChangeVideoMode, 0x1ADE); +VALIDATE_OFFSET(CMenuManager, field_1ADF, 0x1ADF); +VALIDATE_OFFSET(CMenuManager, field_1AE0, 0x1AE0); +VALIDATE_OFFSET(CMenuManager, field_1AE4, 0x1AE4); +VALIDATE_OFFSET(CMenuManager, field_1AE8, 0x1AE8); +VALIDATE_OFFSET(CMenuManager, m_bAudioRetuneInProgress, 0x1AE9); +VALIDATE_OFFSET(CMenuManager, field_1AEA, 0x1AEA); +VALIDATE_OFFSET(CMenuManager, m_bScanningUserTracks, 0x1AEB); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextFadingAlpha, 0x1AEC); +VALIDATE_OFFSET(CMenuManager, field_1AF0, 0x1AF0); +VALIDATE_OFFSET(CMenuManager, field_1AF1, 0x1AF1); +VALIDATE_OFFSET(CMenuManager, field_1AF2, 0x1AF2); +VALIDATE_OFFSET(CMenuManager, field_1AF3, 0x1AF3); +VALIDATE_OFFSET(CMenuManager, field_1AF4, 0x1AF4); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosX, 0x1AF8); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosY, 0x1AFC); +VALIDATE_OFFSET(CMenuManager, m_nHoverOption, 0x1B00); +VALIDATE_OFFSET(CMenuManager, field_1B04, 0x1B04); +VALIDATE_OFFSET(CMenuManager, field_1B08, 0x1B08); +VALIDATE_OFFSET(CMenuManager, field_1B09, 0x1B09); +VALIDATE_OFFSET(CMenuManager, field_1B0A, 0x1B0A); +VALIDATE_OFFSET(CMenuManager, field_1B0B, 0x1B0B); +VALIDATE_OFFSET(CMenuManager, field_1B0C, 0x1B0C); +VALIDATE_OFFSET(CMenuManager, field_1B10, 0x1B10); +VALIDATE_OFFSET(CMenuManager, field_1B11, 0x1B11); +VALIDATE_OFFSET(CMenuManager, field_1B12, 0x1B12); +VALIDATE_OFFSET(CMenuManager, field_1B13, 0x1B13); +VALIDATE_OFFSET(CMenuManager, field_1B14, 0x1B14); +VALIDATE_OFFSET(CMenuManager, field_1B15, 0x1B15); +VALIDATE_OFFSET(CMenuManager, field_1B16, 0x1B16); +VALIDATE_OFFSET(CMenuManager, field_1B17, 0x1B17); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextIndex, 0x1B18); +VALIDATE_OFFSET(CMenuManager, field_1B1C, 0x1B1C); +VALIDATE_OFFSET(CMenuManager, m_nTexturesRound, 0x1B20); +VALIDATE_OFFSET(CMenuManager, m_nNumberOfMenuOptions, 0x1B21); +VALIDATE_OFFSET(CMenuManager, field_1B22, 0x1B22); +VALIDATE_OFFSET(CMenuManager, m_nStatBarPerformanceTimer, 0x1B24); +VALIDATE_OFFSET(CMenuManager, m_bUpdateMap, 0x1B28); +VALIDATE_OFFSET(CMenuManager, field_1B29, 0x1B29); +VALIDATE_OFFSET(CMenuManager, field_1B2A, 0x1B2A); +VALIDATE_OFFSET(CMenuManager, m_nMapTimer, 0x1B2C); +VALIDATE_OFFSET(CMenuManager, m_nBriefHistoryTimer, 0x1B30); +VALIDATE_OFFSET(CMenuManager, m_nSavedPlayerControlsDisabledFlag, 0x1B34); +VALIDATE_OFFSET(CMenuManager, field_1B36, 0x1B36); +VALIDATE_OFFSET(CMenuManager, field_1B38, 0x1B38); +VALIDATE_OFFSET(CMenuManager, field_1B3C, 0x1B3C); +VALIDATE_OFFSET(CMenuManager, field_1B3D, 0x1B3D); +VALIDATE_OFFSET(CMenuManager, field_1B3E, 0x1B3E); +VALIDATE_OFFSET(CMenuManager, field_1B3F, 0x1B3F); +VALIDATE_OFFSET(CMenuManager, field_1B40, 0x1B40); +VALIDATE_OFFSET(CMenuManager, m_bExitMenu, 0x1B44); +VALIDATE_OFFSET(CMenuManager, field_1B45, 0x1B45); +VALIDATE_OFFSET(CMenuManager, field_1B46, 0x1B46); +VALIDATE_OFFSET(CMenuManager, field_1B48, 0x1B48); +VALIDATE_OFFSET(CMenuManager, field_1B4C, 0x1B4C); +VALIDATE_OFFSET(CMenuManager, m_nBackgroundSprite, 0x1B50); +VALIDATE_OFFSET(CMenuManager, field_1B51, 0x1B51); +VALIDATE_OFFSET(CMenuManager, field_1B52, 0x1B52); +VALIDATE_OFFSET(CMenuManager, field_1B54, 0x1B54); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextFadingTimer, 0x1B58); +VALIDATE_OFFSET(CMenuManager, field_1B5C, 0x1B5C); +VALIDATE_OFFSET(CMenuManager, field_1B5D, 0x1B5D); +VALIDATE_OFFSET(CMenuManager, field_1B5E, 0x1B5E); +VALIDATE_OFFSET(CMenuManager, field_1B60, 0x1B60); +VALIDATE_OFFSET(CMenuManager, field_1B64, 0x1B64); +VALIDATE_OFFSET(CMenuManager, m_nTimeSlideLeftMove, 0x1B68); +VALIDATE_OFFSET(CMenuManager, m_nTimeSlideRightMove, 0x1B6C); +VALIDATE_OFFSET(CMenuManager, field_1B70, 0x1B70); +VALIDATE_OFFSET(CMenuManager, field_1B74, 0x1B74); +VALIDATE_SIZE(CMenuManager, 0x1B78); #pragma pack(pop) VALIDATE_SIZE(CMenuManager, 0x1B78); diff --git a/plugin_sa/game_sa/CMenuSystem.h b/plugin_sa/game_sa/CMenuSystem.h index 7a7013744..a9a477bb5 100644 --- a/plugin_sa/game_sa/CMenuSystem.h +++ b/plugin_sa/game_sa/CMenuSystem.h @@ -44,7 +44,25 @@ class PLUGIN_API tMenuPanel char _pad2; public: }; - +VALIDATE_OFFSET(tMenuPanel, m_anUsedCarColors, 0x0); +VALIDATE_OFFSET(tMenuPanel, m_nType, 0x40); +VALIDATE_OFFSET(tMenuPanel, m_aaacRowTitles, 0x41); +VALIDATE_OFFSET(tMenuPanel, m_aadwNumberInRowTitle, 0x224); +VALIDATE_OFFSET(tMenuPanel, m_aadw2ndNumberInRowTitle, 0x2E4); +VALIDATE_OFFSET(tMenuPanel, m_aacColumnHeaders, 0x3A4); +VALIDATE_OFFSET(tMenuPanel, m_acTitle, 0x3CC); +VALIDATE_OFFSET(tMenuPanel, m_abRowSelectable, 0x3D6); +VALIDATE_OFFSET(tMenuPanel, m_abRowAlreadyBought, 0x3E2); +VALIDATE_OFFSET(tMenuPanel, m_anColumnAlignment, 0x3EE); +VALIDATE_OFFSET(tMenuPanel, m_anColumnHeaderAlignment, 0x3F2); +VALIDATE_OFFSET(tMenuPanel, m_nNumRows, 0x3F6); +VALIDATE_OFFSET(tMenuPanel, m_nNumColumns, 0x3F7); +VALIDATE_OFFSET(tMenuPanel, m_abColumnInteractive, 0x3F8); +VALIDATE_OFFSET(tMenuPanel, m_afColumnWidth, 0x3FC); +VALIDATE_OFFSET(tMenuPanel, m_vPosn, 0x40C); +VALIDATE_OFFSET(tMenuPanel, m_bColumnBackground, 0x414); +VALIDATE_OFFSET(tMenuPanel, m_nSelectedRow, 0x415); +VALIDATE_OFFSET(tMenuPanel, m_nAcceptedRow, 0x416); VALIDATE_SIZE(tMenuPanel, 0x418); class PLUGIN_API CMenuSystem @@ -80,5 +98,6 @@ class PLUGIN_API CMenuSystem static void SetHeaderOrientation(unsigned char panelId, unsigned char columnId, eFontAlignment alignment); static void SwitchOffMenu(unsigned char panelId); }; +VALIDATE_SIZE(CMenuSystem, 0x1); extern tMenuPanel **MenuNumber; // tMenuPanel MenuNumber[2] \ No newline at end of file diff --git a/plugin_sa/game_sa/CMessages.h b/plugin_sa/game_sa/CMessages.h index c4e3a72c2..07faa0623 100644 --- a/plugin_sa/game_sa/CMessages.h +++ b/plugin_sa/game_sa/CMessages.h @@ -23,25 +23,38 @@ enum eMessageStyle : unsigned short struct tMessage { char* m_pText; unsigned short m_wFlag; - char _pad1[2]; unsigned int m_dwTime; unsigned int m_dwStartTime; int m_dwNumber[6]; - char *m_pString; + char* m_pString; unsigned char m_bPreviousBrief; - char _pad2[3]; }; +VALIDATE_OFFSET(tMessage, m_pText, 0x0); +VALIDATE_OFFSET(tMessage, m_wFlag, 0x4); +VALIDATE_OFFSET(tMessage, m_dwTime, 0x8); +VALIDATE_OFFSET(tMessage, m_dwStartTime, 0xC); +VALIDATE_OFFSET(tMessage, m_dwNumber, 0x10); +VALIDATE_OFFSET(tMessage, m_pString, 0x28); +VALIDATE_OFFSET(tMessage, m_bPreviousBrief, 0x2C); +VALIDATE_SIZE(tMessage, 0x30); struct tBigMessage { tMessage m_Current; tMessage m_Stack[3]; }; +VALIDATE_OFFSET(tBigMessage, m_Current, 0x0); +VALIDATE_OFFSET(tBigMessage, m_Stack, 0x30); +VALIDATE_SIZE(tBigMessage, 0xC0); struct tPreviousBrief { char* m_pText; int m_nNumber[6]; char* m_pString; }; +VALIDATE_OFFSET(tPreviousBrief, m_pText, 0x0); +VALIDATE_OFFSET(tPreviousBrief, m_nNumber, 0x4); +VALIDATE_OFFSET(tPreviousBrief, m_pString, 0x1C); +VALIDATE_SIZE(tPreviousBrief, 0x20); class PLUGIN_API CMessages { public: @@ -105,3 +118,4 @@ class PLUGIN_API CMessages { // Adds big message to queue , see eMessageStyle static void AddBigMessageQ(const char* text, unsigned int time, unsigned short style); }; +VALIDATE_SIZE(CMessages, 0x1); diff --git a/plugin_sa/game_sa/CMirrors.h b/plugin_sa/game_sa/CMirrors.h index 039204e23..55bab452e 100644 --- a/plugin_sa/game_sa/CMirrors.h +++ b/plugin_sa/game_sa/CMirrors.h @@ -28,6 +28,7 @@ class PLUGIN_API CMirrors { static void RenderMirrorBuffer(); static void ShutDown(); }; +VALIDATE_SIZE(CMirrors, 0x1); extern bool &bFudgeNow; extern float *Screens8Track; // float Screens8Track[24] \ No newline at end of file diff --git a/plugin_sa/game_sa/CMissionCleanup.h b/plugin_sa/game_sa/CMissionCleanup.h index 3f23d0484..e1d3fa1ef 100644 --- a/plugin_sa/game_sa/CMissionCleanup.h +++ b/plugin_sa/game_sa/CMissionCleanup.h @@ -39,6 +39,9 @@ struct PLUGIN_API tMissionCleanupEntity char __pad[3]; int handle; }; +VALIDATE_OFFSET(tMissionCleanupEntity, type, 0x0); +VALIDATE_OFFSET(tMissionCleanupEntity, __pad, 0x1); +VALIDATE_OFFSET(tMissionCleanupEntity, handle, 0x4); VALIDATE_SIZE(tMissionCleanupEntity, 0x8); @@ -71,5 +74,6 @@ class PLUGIN_API CMissionCleanup // Checks if collision has loaded for mission objects void CheckIfCollisionHasLoadedForMissionObjects(); }; - +VALIDATE_OFFSET(CMissionCleanup, m_Objects, 0x0); +VALIDATE_OFFSET(CMissionCleanup, m_Count, 0x258); VALIDATE_SIZE(CMissionCleanup, 0x25C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CModelInfo.h b/plugin_sa/game_sa/CModelInfo.h index 25d74a04d..ea50191c3 100644 --- a/plugin_sa/game_sa/CModelInfo.h +++ b/plugin_sa/game_sa/CModelInfo.h @@ -65,4 +65,5 @@ class PLUGIN_API CModelInfo static bool IsQuadBikeModel(int modelId); static bool IsTrailerModel(int modelId); static bool IsTrainModel(int modelId); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CModelInfo, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CModelInfoAccelerator.h b/plugin_sa/game_sa/CModelInfoAccelerator.h index c8ad6f735..6dd5c1f8d 100644 --- a/plugin_sa/game_sa/CModelInfoAccelerator.h +++ b/plugin_sa/game_sa/CModelInfoAccelerator.h @@ -29,5 +29,9 @@ class PLUGIN_API CModelInfoAccelerator { void EndOfLoadPhase(); bool Begin(char* filePath); }; - +VALIDATE_OFFSET(CModelInfoAccelerator, m_pIDs, 0x0); +VALIDATE_OFFSET(CModelInfoAccelerator, m_nNumIDs, 0x4); +VALIDATE_OFFSET(CModelInfoAccelerator, m_szFilePath, 0x6); +VALIDATE_OFFSET(CModelInfoAccelerator, field_1A, 0x1A); +VALIDATE_OFFSET(CModelInfoAccelerator, m_bFileRead, 0x1B); VALIDATE_SIZE(CModelInfoAccelerator, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CMonsterTruck.h b/plugin_sa/game_sa/CMonsterTruck.h index dd084ef6a..65d9915ff 100644 --- a/plugin_sa/game_sa/CMonsterTruck.h +++ b/plugin_sa/game_sa/CMonsterTruck.h @@ -52,7 +52,11 @@ class CMonsterTruck : public CAutomobile { void ExtendSuspension(); }; - +VALIDATE_OFFSET(CMonsterTruck, field_988, 0x988); +VALIDATE_OFFSET(CMonsterTruck, field_98C, 0x98C); +VALIDATE_OFFSET(CMonsterTruck, field_990, 0x990); +VALIDATE_OFFSET(CMonsterTruck, field_994, 0x994); +VALIDATE_OFFSET(CMonsterTruck, field_998, 0x998); VALIDATE_SIZE(CMonsterTruck, 0x99C); extern float& fWheelExtensionRate; // 0.1 \ No newline at end of file diff --git a/plugin_sa/game_sa/CMotionBlurStreaks.h b/plugin_sa/game_sa/CMotionBlurStreaks.h index bc8f06efe..eb424f6ab 100644 --- a/plugin_sa/game_sa/CMotionBlurStreaks.h +++ b/plugin_sa/game_sa/CMotionBlurStreaks.h @@ -18,4 +18,5 @@ class CMotionBlurStreaks { static void Render(); static void RegisterStreak(unsigned int id, unsigned char red, unsigned char green, unsigned char blue, CVector leftPoint, CVector rightPoint); static void Init(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CMotionBlurStreaks, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CNodeAddress.h b/plugin_sa/game_sa/CNodeAddress.h index cc33c8cae..87712ca2d 100644 --- a/plugin_sa/game_sa/CNodeAddress.h +++ b/plugin_sa/game_sa/CNodeAddress.h @@ -43,5 +43,6 @@ class PLUGIN_API CNodeAddress { return m_nAreaId != rhs.m_nAreaId || m_nNodeId != rhs.m_nNodeId; } }; - +VALIDATE_OFFSET(CNodeAddress, m_nAreaId, 0x0); +VALIDATE_OFFSET(CNodeAddress, m_nNodeId, 0x2); VALIDATE_SIZE(CNodeAddress, 0x4); diff --git a/plugin_sa/game_sa/CObject.h b/plugin_sa/game_sa/CObject.h index 7a0a59253..723fee0fe 100644 --- a/plugin_sa/game_sa/CObject.h +++ b/plugin_sa/game_sa/CObject.h @@ -133,7 +133,30 @@ class CObject : public CPhysical { static void DeleteAllMissionObjects(); static void DeleteAllTempObjectsInArea(CVector point, float radius); }; - +VALIDATE_OFFSET(CObject, m_pControlCodeList, 0x138); +VALIDATE_OFFSET(CObject, m_nObjectType, 0x13C); +VALIDATE_OFFSET(CObject, m_nBonusValue, 0x13D); +VALIDATE_OFFSET(CObject, m_wCostValue, 0x13E); +VALIDATE_OFFSET(CObject, m_nObjectFlags, 0x140); +VALIDATE_OFFSET(CObject, m_nColDamageEffect, 0x144); +VALIDATE_OFFSET(CObject, m_nStoredColDamageEffect, 0x145); +VALIDATE_OFFSET(CObject, field_146, 0x146); +VALIDATE_OFFSET(CObject, m_nGarageDoorGarageIndex, 0x147); +VALIDATE_OFFSET(CObject, m_nLastWeaponDamage, 0x148); +VALIDATE_OFFSET(CObject, m_nRefModelIndex, 0x14A); +VALIDATE_OFFSET(CObject, m_nCarColor, 0x14C); +VALIDATE_OFFSET(CObject, m_dwRemovalTime, 0x150); +VALIDATE_OFFSET(CObject, m_fHealth, 0x154); +VALIDATE_OFFSET(CObject, m_fDoorStartAngle, 0x158); +VALIDATE_OFFSET(CObject, m_fScale, 0x15C); +VALIDATE_OFFSET(CObject, m_pObjectInfo, 0x160); +VALIDATE_OFFSET(CObject, m_pFire, 0x164); +VALIDATE_OFFSET(CObject, m_wScriptTriggerIndex, 0x168); +VALIDATE_OFFSET(CObject, m_wRemapTxd, 0x16A); +VALIDATE_OFFSET(CObject, m_pRemapTexture, 0x16C); +VALIDATE_OFFSET(CObject, m_pDummyObject, 0x170); +VALIDATE_OFFSET(CObject, m_dwBurnTime, 0x174); +VALIDATE_OFFSET(CObject, m_fBurnDamage, 0x178); VALIDATE_SIZE(CObject, 0x17C); bool IsObjectPointerValid_NotInWorld(CObject* object); diff --git a/plugin_sa/game_sa/CObjectData.cpp b/plugin_sa/game_sa/CObjectData.cpp index fc1fb60cf..2d9f403de 100644 --- a/plugin_sa/game_sa/CObjectData.cpp +++ b/plugin_sa/game_sa/CObjectData.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_sa/game_sa/CObjectData.h b/plugin_sa/game_sa/CObjectData.h index 766788e7a..95922cef1 100644 --- a/plugin_sa/game_sa/CObjectData.h +++ b/plugin_sa/game_sa/CObjectData.h @@ -12,3 +12,4 @@ class CObjectData { public: static CObjectInfo* ms_aObjectInfo; // 160 }; +VALIDATE_SIZE(CObjectData, 0x1); diff --git a/plugin_sa/game_sa/CObjectInfo.h b/plugin_sa/game_sa/CObjectInfo.h index c850ea507..d855ebb7d 100644 --- a/plugin_sa/game_sa/CObjectInfo.h +++ b/plugin_sa/game_sa/CObjectInfo.h @@ -32,5 +32,23 @@ class PLUGIN_API CObjectInfo { unsigned int m_nGunBreakMode; unsigned int m_nSparksOnImpact; }; - +VALIDATE_OFFSET(CObjectInfo, m_fMass, 0x0); +VALIDATE_OFFSET(CObjectInfo, m_fTurnMass, 0x4); +VALIDATE_OFFSET(CObjectInfo, m_fAirResistance, 0x8); +VALIDATE_OFFSET(CObjectInfo, m_fElasticity, 0xC); +VALIDATE_OFFSET(CObjectInfo, m_fBuoyancyConstant, 0x10); +VALIDATE_OFFSET(CObjectInfo, m_fUprootLimit, 0x14); +VALIDATE_OFFSET(CObjectInfo, m_fColDamageMultiplier, 0x18); +VALIDATE_OFFSET(CObjectInfo, m_nColDamageEffect, 0x1C); +VALIDATE_OFFSET(CObjectInfo, m_nSpecialColResponseCase, 0x1D); +VALIDATE_OFFSET(CObjectInfo, m_nCameraAvoidObject, 0x1E); +VALIDATE_OFFSET(CObjectInfo, m_bCausesExplosion, 0x1F); +VALIDATE_OFFSET(CObjectInfo, m_nFxType, 0x20); +VALIDATE_OFFSET(CObjectInfo, m_vFxOffset, 0x24); +VALIDATE_OFFSET(CObjectInfo, m_pFxSystem, 0x30); +VALIDATE_OFFSET(CObjectInfo, m_fSmashMultiplier, 0x34); +VALIDATE_OFFSET(CObjectInfo, m_vecBreakVelocity, 0x38); +VALIDATE_OFFSET(CObjectInfo, m_fBreakVelocityRand, 0x44); +VALIDATE_OFFSET(CObjectInfo, m_nGunBreakMode, 0x48); +VALIDATE_OFFSET(CObjectInfo, m_nSparksOnImpact, 0x4C); VALIDATE_SIZE(CObjectInfo, 0x50); \ No newline at end of file diff --git a/plugin_sa/game_sa/COctTree.h b/plugin_sa/game_sa/COctTree.h index 37aeb460a..42a43c3c5 100644 --- a/plugin_sa/game_sa/COctTree.h +++ b/plugin_sa/game_sa/COctTree.h @@ -50,7 +50,12 @@ class PLUGIN_API COctTree { private: virtual void virtual_dummy() {} }; - +VALIDATE_OFFSET(COctTree, level, 0x4); +VALIDATE_OFFSET(COctTree, lastStep, 0x8); +VALIDATE_OFFSET(COctTree, childrens, 0xA); +VALIDATE_OFFSET(COctTree, redComponent, 0x1C); +VALIDATE_OFFSET(COctTree, greenComponent, 0x20); +VALIDATE_OFFSET(COctTree, blueComponent, 0x24); VALIDATE_SIZE(COctTree, 0x28); extern COctTree *&gpTmpOctTree; \ No newline at end of file diff --git a/plugin_sa/game_sa/COctTreeBase.h b/plugin_sa/game_sa/COctTreeBase.h index 1f6cc25aa..2c3b78922 100644 --- a/plugin_sa/game_sa/COctTreeBase.h +++ b/plugin_sa/game_sa/COctTreeBase.h @@ -19,5 +19,6 @@ class PLUGIN_API COctTreeBase : public COctTree { bool Insert(unsigned char colorRed, unsigned char colorGreen, unsigned char colorBlue); void ReduceBranches(int newBranchesCount); }; - +VALIDATE_OFFSET(COctTreeBase, numBranches, 0x28); +VALIDATE_OFFSET(COctTreeBase, hasTransparentPixels, 0x2C); VALIDATE_SIZE(COctTreeBase, 0x30); diff --git a/plugin_sa/game_sa/COnscreenCounterEntry.h b/plugin_sa/game_sa/COnscreenCounterEntry.h index 493768463..50ecccd5e 100644 --- a/plugin_sa/game_sa/COnscreenCounterEntry.h +++ b/plugin_sa/game_sa/COnscreenCounterEntry.h @@ -24,6 +24,14 @@ class PLUGIN_API COnscreenCounterEntry { //! unused SUPPORTED_10US void SetColourID(unsigned char ColourID); }; +VALIDATE_OFFSET(COnscreenCounterEntry, m_nVarId, 0x0); +VALIDATE_OFFSET(COnscreenCounterEntry, m_nMaxVarValue, 0x4); +VALIDATE_OFFSET(COnscreenCounterEntry, m_szDescriptionTextKey, 0x8); +VALIDATE_OFFSET(COnscreenCounterEntry, m_nType, 0x12); +VALIDATE_OFFSET(COnscreenCounterEntry, m_szDisplayedText, 0x14); +VALIDATE_OFFSET(COnscreenCounterEntry, m_bEnabled, 0x3E); +VALIDATE_OFFSET(COnscreenCounterEntry, m_bFlashWhenFirstDisplayed, 0x3F); +VALIDATE_OFFSET(COnscreenCounterEntry, m_nColourId, 0x40); VALIDATE_SIZE(COnscreenCounterEntry, 0x44); #include "meta/meta.COnscreenCounterEntry.h" diff --git a/plugin_sa/game_sa/COnscreenTimer.h b/plugin_sa/game_sa/COnscreenTimer.h index 35390ceb3..18ab017a6 100644 --- a/plugin_sa/game_sa/COnscreenTimer.h +++ b/plugin_sa/game_sa/COnscreenTimer.h @@ -31,6 +31,10 @@ class PLUGIN_API COnscreenTimer { SUPPORTED_10US void SetCounterColourID(unsigned int varID, unsigned char ColourID); SUPPORTED_10US void SetCounterFlashWhenFirstDisplayed(unsigned int varId, unsigned char bFlashWhenFirstDisplayed); }; +VALIDATE_OFFSET(COnscreenTimer, m_Clock, 0x0); +VALIDATE_OFFSET(COnscreenTimer, m_aCounters, 0x40); +VALIDATE_OFFSET(COnscreenTimer, m_bDisplay, 0x150); +VALIDATE_OFFSET(COnscreenTimer, m_bPaused, 0x151); VALIDATE_SIZE(COnscreenTimer, 0x154); #include "meta/meta.COnscreenTimer.h" diff --git a/plugin_sa/game_sa/COnscreenTimerEntry.h b/plugin_sa/game_sa/COnscreenTimerEntry.h index bfa3979d0..a6528be71 100644 --- a/plugin_sa/game_sa/COnscreenTimerEntry.h +++ b/plugin_sa/game_sa/COnscreenTimerEntry.h @@ -21,5 +21,11 @@ class PLUGIN_API COnscreenTimerEntry { //! unused SUPPORTED_10US void ProcessForDisplayClock(); }; +VALIDATE_OFFSET(COnscreenTimerEntry, m_nVarId, 0x0); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szDescriptionTextKey, 0x4); +VALIDATE_OFFSET(COnscreenTimerEntry, m_szDisplayedText, 0xE); +VALIDATE_OFFSET(COnscreenTimerEntry, m_bEnabled, 0x38); +VALIDATE_OFFSET(COnscreenTimerEntry, m_nTimerDirection, 0x39); +VALIDATE_OFFSET(COnscreenTimerEntry, m_nClockBeepCountdownSecs, 0x3C); VALIDATE_SIZE(COnscreenTimerEntry, 0x40); #include "meta/meta.COnscreenTimerEntry.h" diff --git a/plugin_sa/game_sa/CPad.h b/plugin_sa/game_sa/CPad.h index d35caaf96..76320af5f 100644 --- a/plugin_sa/game_sa/CPad.h +++ b/plugin_sa/game_sa/CPad.h @@ -42,6 +42,31 @@ class CControllerState { signed short m_bVehicleMouseLook; signed short m_bRadioTrackSkip; }; +VALIDATE_OFFSET(CControllerState, LeftStickX, 0x0); +VALIDATE_OFFSET(CControllerState, LeftStickY, 0x2); +VALIDATE_OFFSET(CControllerState, RightStickX, 0x4); +VALIDATE_OFFSET(CControllerState, RightStickY, 0x6); +VALIDATE_OFFSET(CControllerState, LeftShoulder1, 0x8); +VALIDATE_OFFSET(CControllerState, LeftShoulder2, 0xA); +VALIDATE_OFFSET(CControllerState, RightShoulder1, 0xC); +VALIDATE_OFFSET(CControllerState, RightShoulder2, 0xE); +VALIDATE_OFFSET(CControllerState, DPadUp, 0x10); +VALIDATE_OFFSET(CControllerState, DPadDown, 0x12); +VALIDATE_OFFSET(CControllerState, DPadLeft, 0x14); +VALIDATE_OFFSET(CControllerState, DPadRight, 0x16); +VALIDATE_OFFSET(CControllerState, Start, 0x18); +VALIDATE_OFFSET(CControllerState, Select, 0x1A); +VALIDATE_OFFSET(CControllerState, ButtonSquare, 0x1C); +VALIDATE_OFFSET(CControllerState, ButtonTriangle, 0x1E); +VALIDATE_OFFSET(CControllerState, ButtonCross, 0x20); +VALIDATE_OFFSET(CControllerState, ButtonCircle, 0x22); +VALIDATE_OFFSET(CControllerState, ShockButtonL, 0x24); +VALIDATE_OFFSET(CControllerState, ShockButtonR, 0x26); +VALIDATE_OFFSET(CControllerState, m_bChatIndicated, 0x28); +VALIDATE_OFFSET(CControllerState, m_bPedWalk, 0x2A); +VALIDATE_OFFSET(CControllerState, m_bVehicleMouseLook, 0x2C); +VALIDATE_OFFSET(CControllerState, m_bRadioTrackSkip, 0x2E); +VALIDATE_SIZE(CControllerState, 0x30); VALIDATE_SIZE(CControllerState, 0x30); @@ -61,7 +86,17 @@ class CMouseControllerState { float x; float y; }; - +VALIDATE_OFFSET(CMouseControllerState, lmb, 0x0); +VALIDATE_OFFSET(CMouseControllerState, rmb, 0x1); +VALIDATE_OFFSET(CMouseControllerState, mmb, 0x2); +VALIDATE_OFFSET(CMouseControllerState, wheelUp, 0x3); +VALIDATE_OFFSET(CMouseControllerState, wheelDown, 0x4); +VALIDATE_OFFSET(CMouseControllerState, bmx1, 0x5); +VALIDATE_OFFSET(CMouseControllerState, bmx2, 0x6); +VALIDATE_OFFSET(CMouseControllerState, __align, 0x7); +VALIDATE_OFFSET(CMouseControllerState, z, 0x8); +VALIDATE_OFFSET(CMouseControllerState, x, 0xC); +VALIDATE_OFFSET(CMouseControllerState, y, 0x10); VALIDATE_SIZE(CMouseControllerState, 0x14); @@ -114,7 +149,52 @@ class CKeyboardState { short rwin; short apps; }; - +VALIDATE_OFFSET(CKeyboardState, FKeys, 0x0); +VALIDATE_OFFSET(CKeyboardState, standardKeys, 0x18); +VALIDATE_OFFSET(CKeyboardState, esc, 0x218); +VALIDATE_OFFSET(CKeyboardState, insert, 0x21A); +VALIDATE_OFFSET(CKeyboardState, del, 0x21C); +VALIDATE_OFFSET(CKeyboardState, home, 0x21E); +VALIDATE_OFFSET(CKeyboardState, end, 0x220); +VALIDATE_OFFSET(CKeyboardState, pgup, 0x222); +VALIDATE_OFFSET(CKeyboardState, pgdn, 0x224); +VALIDATE_OFFSET(CKeyboardState, up, 0x226); +VALIDATE_OFFSET(CKeyboardState, down, 0x228); +VALIDATE_OFFSET(CKeyboardState, left, 0x22A); +VALIDATE_OFFSET(CKeyboardState, right, 0x22C); +VALIDATE_OFFSET(CKeyboardState, scroll, 0x22E); +VALIDATE_OFFSET(CKeyboardState, pause, 0x230); +VALIDATE_OFFSET(CKeyboardState, numlock, 0x232); +VALIDATE_OFFSET(CKeyboardState, div, 0x234); +VALIDATE_OFFSET(CKeyboardState, mul, 0x236); +VALIDATE_OFFSET(CKeyboardState, sub, 0x238); +VALIDATE_OFFSET(CKeyboardState, add, 0x23A); +VALIDATE_OFFSET(CKeyboardState, enter, 0x23C); +VALIDATE_OFFSET(CKeyboardState, decimal, 0x23E); +VALIDATE_OFFSET(CKeyboardState, num1, 0x240); +VALIDATE_OFFSET(CKeyboardState, num2, 0x242); +VALIDATE_OFFSET(CKeyboardState, num3, 0x244); +VALIDATE_OFFSET(CKeyboardState, num4, 0x246); +VALIDATE_OFFSET(CKeyboardState, num5, 0x248); +VALIDATE_OFFSET(CKeyboardState, num6, 0x24A); +VALIDATE_OFFSET(CKeyboardState, num7, 0x24C); +VALIDATE_OFFSET(CKeyboardState, num8, 0x24E); +VALIDATE_OFFSET(CKeyboardState, num9, 0x250); +VALIDATE_OFFSET(CKeyboardState, num0, 0x252); +VALIDATE_OFFSET(CKeyboardState, back, 0x254); +VALIDATE_OFFSET(CKeyboardState, tab, 0x256); +VALIDATE_OFFSET(CKeyboardState, capslock, 0x258); +VALIDATE_OFFSET(CKeyboardState, extenter, 0x25A); +VALIDATE_OFFSET(CKeyboardState, lshift, 0x25C); +VALIDATE_OFFSET(CKeyboardState, rshift, 0x25E); +VALIDATE_OFFSET(CKeyboardState, shift, 0x260); +VALIDATE_OFFSET(CKeyboardState, lctrl, 0x262); +VALIDATE_OFFSET(CKeyboardState, rctrl, 0x264); +VALIDATE_OFFSET(CKeyboardState, lmenu, 0x266); +VALIDATE_OFFSET(CKeyboardState, rmenu, 0x268); +VALIDATE_OFFSET(CKeyboardState, lwin, 0x26A); +VALIDATE_OFFSET(CKeyboardState, rwin, 0x26C); +VALIDATE_OFFSET(CKeyboardState, apps, 0x26E); VALIDATE_SIZE(CKeyboardState, 0x270); @@ -244,5 +324,32 @@ class CPad { static void UpdatePads(); static void ClearMouseHistory(); }; - +VALIDATE_OFFSET(CPad, NewState, 0x0); +VALIDATE_OFFSET(CPad, OldState, 0x30); +VALIDATE_OFFSET(CPad, SteeringLeftRightBuffer, 0x60); +VALIDATE_OFFSET(CPad, DrunkDrivingBufferUsed, 0x74); +VALIDATE_OFFSET(CPad, PCTempKeyState, 0x78); +VALIDATE_OFFSET(CPad, PCTempJoyState, 0xA8); +VALIDATE_OFFSET(CPad, PCTempMouseState, 0xD8); +VALIDATE_OFFSET(CPad, Phase, 0x108); +VALIDATE_OFFSET(CPad, Mode, 0x10A); +VALIDATE_OFFSET(CPad, ShakeDur, 0x10C); +VALIDATE_OFFSET(CPad, DisablePlayerControls, 0x10E); +VALIDATE_OFFSET(CPad, ShakeFreq, 0x110); +VALIDATE_OFFSET(CPad, bHornHistory, 0x111); +VALIDATE_OFFSET(CPad, iCurrHornHistory, 0x116); +VALIDATE_OFFSET(CPad, JustOutOfFrontEnd, 0x117); +VALIDATE_OFFSET(CPad, bApplyBrakes, 0x118); +VALIDATE_OFFSET(CPad, bDisablePlayerEnterCar, 0x119); +VALIDATE_OFFSET(CPad, bDisablePlayerDuck, 0x11A); +VALIDATE_OFFSET(CPad, bDisablePlayerFireWeapon, 0x11B); +VALIDATE_OFFSET(CPad, bDisablePlayerFireWeaponWithL1, 0x11C); +VALIDATE_OFFSET(CPad, bDisablePlayerCycleWeapon, 0x11D); +VALIDATE_OFFSET(CPad, bDisablePlayerJump, 0x11E); +VALIDATE_OFFSET(CPad, bDisablePlayerDisplayVitalStats, 0x11F); +VALIDATE_OFFSET(CPad, LastTimeTouched, 0x120); +VALIDATE_OFFSET(CPad, AverageWeapon, 0x124); +VALIDATE_OFFSET(CPad, AverageEntries, 0x128); +VALIDATE_OFFSET(CPad, NoShakeBeforeThis, 0x12C); +VALIDATE_OFFSET(CPad, NoShakeFreq, 0x130); VALIDATE_SIZE(CPad, 0x134); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPathFind.h b/plugin_sa/game_sa/CPathFind.h index af1d4f281..25791bc48 100644 --- a/plugin_sa/game_sa/CPathFind.h +++ b/plugin_sa/game_sa/CPathFind.h @@ -63,6 +63,31 @@ class PLUGIN_API CPathFind bool Load(); bool Save(); }; +VALIDATE_OFFSET(CPathFind, info, 0x0); +VALIDATE_OFFSET(CPathFind, m_apNodesSearchLists, 0x4); +VALIDATE_OFFSET(CPathFind, m_pPathNodes, 0x804); +VALIDATE_OFFSET(CPathFind, m_pNaviNodes, 0x924); +VALIDATE_OFFSET(CPathFind, m_pNodeLinks, 0xA44); +VALIDATE_OFFSET(CPathFind, m_pLinkLengths, 0xB64); +VALIDATE_OFFSET(CPathFind, m_pPathIntersections, 0xC84); +VALIDATE_OFFSET(CPathFind, m_pNaviLinks, 0xDA4); +VALIDATE_OFFSET(CPathFind, field_EA4, 0xEA4); +VALIDATE_OFFSET(CPathFind, m_dwNumNodes, 0xFA4); +VALIDATE_OFFSET(CPathFind, m_dwNumVehicleNodes, 0x10C4); +VALIDATE_OFFSET(CPathFind, m_dwNumPedNodes, 0x11E4); +VALIDATE_OFFSET(CPathFind, m_dwNumCarPathLinks, 0x1304); +VALIDATE_OFFSET(CPathFind, m_dwNumAddresses, 0x1424); +VALIDATE_OFFSET(CPathFind, field_1544, 0x1544); +VALIDATE_OFFSET(CPathFind, m_dwTotalNumNodesInSearchList, 0x3544); +VALIDATE_OFFSET(CPathFind, char3548, 0x3548); +VALIDATE_OFFSET(CPathFind, m_dwNumForbiddenAreas, 0x3568); +VALIDATE_OFFSET(CPathFind, m_aForbiddenAreas, 0x356C); +VALIDATE_OFFSET(CPathFind, m_bForbiddenForScriptedCarsEnabled, 0x3C6C); +VALIDATE_OFFSET(CPathFind, _padding, 0x3C6D); +VALIDATE_OFFSET(CPathFind, m_fForbiddenForScrCarsX1, 0x3C70); +VALIDATE_OFFSET(CPathFind, m_fForbiddenForScrCarsX2, 0x3C74); +VALIDATE_OFFSET(CPathFind, m_fForbiddenForScrCarsY1, 0x3C78); +VALIDATE_OFFSET(CPathFind, m_fForbiddenForScrCarsY2, 0x3C7C); VALIDATE_SIZE(CPathFind, 0x3C80); extern PLUGIN_API CPathFind& ThePaths; diff --git a/plugin_sa/game_sa/CPathIntersectionInfo.h b/plugin_sa/game_sa/CPathIntersectionInfo.h index 6ae39149c..4fac4be7b 100644 --- a/plugin_sa/game_sa/CPathIntersectionInfo.h +++ b/plugin_sa/game_sa/CPathIntersectionInfo.h @@ -13,5 +13,4 @@ class PLUGIN_API CPathIntersectionInfo { unsigned char m_bRoadCross : 1; unsigned char m_bPedTrafficLight : 1; }; - VALIDATE_SIZE(CPathIntersectionInfo, 0x1); diff --git a/plugin_sa/game_sa/CPathNode.h b/plugin_sa/game_sa/CPathNode.h index 73b8e2a08..8000a1eb1 100644 --- a/plugin_sa/game_sa/CPathNode.h +++ b/plugin_sa/game_sa/CPathNode.h @@ -41,7 +41,15 @@ class PLUGIN_API CPathNode { SUPPORTED_10US CVector GetNodeCoors(); }; - +VALIDATE_OFFSET(CPathNode, ptr, 0x0); +VALIDATE_OFFSET(CPathNode, ptr2, 0x4); +VALIDATE_OFFSET(CPathNode, m_vecPosn, 0x8); +VALIDATE_OFFSET(CPathNode, m_nSearchList, 0xE); +VALIDATE_OFFSET(CPathNode, m_nBaseLinkId, 0x10); +VALIDATE_OFFSET(CPathNode, m_nAreaId, 0x12); +VALIDATE_OFFSET(CPathNode, m_nNodeId, 0x14); +VALIDATE_OFFSET(CPathNode, m_nPathWidth, 0x16); +VALIDATE_OFFSET(CPathNode, m_nFloodFill, 0x17); VALIDATE_SIZE(CPathNode, 0x1C); #include "meta/meta.CPathNode.h" diff --git a/plugin_sa/game_sa/CPed.h b/plugin_sa/game_sa/CPed.h index b9fef4cf0..d5f98574c 100644 --- a/plugin_sa/game_sa/CPed.h +++ b/plugin_sa/game_sa/CPed.h @@ -440,7 +440,97 @@ class PLUGIN_API CPed : public CPhysical { static void* operator new(unsigned int size); static void operator delete(void* data); }; - +VALIDATE_OFFSET(CPed, m_pedAudio, 0x138); +VALIDATE_OFFSET(CPed, m_pedSpeech, 0x294); +VALIDATE_OFFSET(CPed, m_weaponAudio, 0x394); +VALIDATE_OFFSET(CPed, field_43C, 0x43C); +VALIDATE_OFFSET(CPed, m_roadRageWith, 0x460); +VALIDATE_OFFSET(CPed, field_464, 0x464); +VALIDATE_OFFSET(CPed, field_468, 0x468); +VALIDATE_OFFSET(CPed, m_pIntelligence, 0x47C); +VALIDATE_OFFSET(CPed, m_pPlayerData, 0x480); +VALIDATE_OFFSET(CPed, m_nCreatedBy, 0x484); +VALIDATE_OFFSET(CPed, field_485, 0x485); +VALIDATE_OFFSET(CPed, m_apBones, 0x488); +VALIDATE_OFFSET(CPed, m_nAnimGroup, 0x4D4); +VALIDATE_OFFSET(CPed, m_vecAnimMovingShiftLocal, 0x4D8); +VALIDATE_OFFSET(CPed, m_acquaintance, 0x4E0); +VALIDATE_OFFSET(CPed, m_pWeaponObject, 0x4F4); +VALIDATE_OFFSET(CPed, m_pGunflashObject, 0x4F8); +VALIDATE_OFFSET(CPed, m_pGogglesObject, 0x4FC); +VALIDATE_OFFSET(CPed, m_pGogglesState, 0x500); +VALIDATE_OFFSET(CPed, m_nWeaponGunflashAlphaMP1, 0x504); +VALIDATE_OFFSET(CPed, m_nWeaponGunFlashAlphaProgMP1, 0x506); +VALIDATE_OFFSET(CPed, m_nWeaponGunflashAlphaMP2, 0x508); +VALIDATE_OFFSET(CPed, m_nWeaponGunFlashAlphaProgMP2, 0x50A); +VALIDATE_OFFSET(CPed, m_pedIK, 0x50C); +VALIDATE_OFFSET(CPed, m_nAntiSpazTimer, 0x52C); +VALIDATE_OFFSET(CPed, m_ePedState, 0x530); +VALIDATE_OFFSET(CPed, m_nMoveState, 0x534); +VALIDATE_OFFSET(CPed, m_nSwimmingMoveState, 0x538); +VALIDATE_OFFSET(CPed, field_53C, 0x53C); +VALIDATE_OFFSET(CPed, m_fHealth, 0x540); +VALIDATE_OFFSET(CPed, m_fMaxHealth, 0x544); +VALIDATE_OFFSET(CPed, m_fArmour, 0x548); +VALIDATE_OFFSET(CPed, m_nTimeTillWeNeedThisPed, 0x54C); +VALIDATE_OFFSET(CPed, m_vecAnimMovingShift, 0x550); +VALIDATE_OFFSET(CPed, m_fHeadingCurrent, 0x558); +VALIDATE_OFFSET(CPed, m_fHeadingGoal, 0x55C); +VALIDATE_OFFSET(CPed, m_fHeadingChangeRate, 0x560); +VALIDATE_OFFSET(CPed, m_fMoveAnim, 0x564); +VALIDATE_OFFSET(CPed, m_standingOnEntity, 0x568); +VALIDATE_OFFSET(CPed, field_56C, 0x56C); +VALIDATE_OFFSET(CPed, field_578, 0x578); +VALIDATE_OFFSET(CPed, m_pContactEntity, 0x584); +VALIDATE_OFFSET(CPed, field_588, 0x588); +VALIDATE_OFFSET(CPed, m_pVehicle, 0x58C); +VALIDATE_OFFSET(CPed, m_VehDeadInFrontOf, 0x590); +VALIDATE_OFFSET(CPed, field_594, 0x594); +VALIDATE_OFFSET(CPed, m_nPedType, 0x598); +VALIDATE_OFFSET(CPed, m_pStats, 0x59C); +VALIDATE_OFFSET(CPed, m_aWeapons, 0x5A0); +VALIDATE_OFFSET(CPed, m_nSavedWeapon, 0x70C); +VALIDATE_OFFSET(CPed, m_nDelayedWeapon, 0x710); +VALIDATE_OFFSET(CPed, m_nDelayedWeaponAmmo, 0x714); +VALIDATE_OFFSET(CPed, m_nSelectedWepSlot, 0x718); +VALIDATE_OFFSET(CPed, m_nWeaponShootingRate, 0x719); +VALIDATE_OFFSET(CPed, m_nWeaponAccuracy, 0x71A); +VALIDATE_OFFSET(CPed, m_pTargetedObject, 0x71C); +VALIDATE_OFFSET(CPed, field_720, 0x720); +VALIDATE_OFFSET(CPed, field_724, 0x724); +VALIDATE_OFFSET(CPed, field_728, 0x728); +VALIDATE_OFFSET(CPed, m_nWeaponSkill, 0x72C); +VALIDATE_OFFSET(CPed, m_nFightingStyle, 0x72D); +VALIDATE_OFFSET(CPed, m_nAllowedAttackMoves, 0x72E); +VALIDATE_OFFSET(CPed, field_72F, 0x72F); +VALIDATE_OFFSET(CPed, m_pFire, 0x730); +VALIDATE_OFFSET(CPed, m_fireDmgMult, 0x734); +VALIDATE_OFFSET(CPed, m_pLookTarget, 0x738); +VALIDATE_OFFSET(CPed, m_fLookDirection, 0x73C); +VALIDATE_OFFSET(CPed, m_nWeaponModelId, 0x740); +VALIDATE_OFFSET(CPed, m_nUnconsciousTimer, 0x744); +VALIDATE_OFFSET(CPed, m_nLookTime, 0x748); +VALIDATE_OFFSET(CPed, m_nAttackTimer, 0x74C); +VALIDATE_OFFSET(CPed, m_nDeathTime, 0x750); +VALIDATE_OFFSET(CPed, m_nBodypartToRemove, 0x754); +VALIDATE_OFFSET(CPed, field_755, 0x755); +VALIDATE_OFFSET(CPed, m_nMoneyCount, 0x756); +VALIDATE_OFFSET(CPed, m_Wobble, 0x758); +VALIDATE_OFFSET(CPed, m_WobbleSpeed, 0x75C); +VALIDATE_OFFSET(CPed, m_nLastWeaponDamage, 0x760); +VALIDATE_OFFSET(CPed, m_pLastEntityDamage, 0x764); +VALIDATE_OFFSET(CPed, field_768, 0x768); +VALIDATE_OFFSET(CPed, m_vecTurretOffset, 0x76C); +VALIDATE_OFFSET(CPed, m_fTurretAngleA, 0x778); +VALIDATE_OFFSET(CPed, m_fTurretAngleB, 0x77C); +VALIDATE_OFFSET(CPed, m_nTurretPosnMode, 0x780); +VALIDATE_OFFSET(CPed, m_nTurretAmmo, 0x784); +VALIDATE_OFFSET(CPed, m_pCoverPoint, 0x788); +VALIDATE_OFFSET(CPed, m_pEnex, 0x78C); +VALIDATE_OFFSET(CPed, m_fRemovalDistMultiplier, 0x790); +VALIDATE_OFFSET(CPed, m_StreamedScriptBrainToLoad, 0x794); +VALIDATE_OFFSET(CPed, field_796, 0x796); +VALIDATE_OFFSET(CPed, field_798, 0x798); VALIDATE_SIZE(CPed, 0x79C); bool IsPedPointerValid(CPed* ped); diff --git a/plugin_sa/game_sa/CPedAcquaintance.h b/plugin_sa/game_sa/CPedAcquaintance.h index 35a4b36f8..39a669332 100644 --- a/plugin_sa/game_sa/CPedAcquaintance.h +++ b/plugin_sa/game_sa/CPedAcquaintance.h @@ -16,5 +16,9 @@ class PLUGIN_API CPedAcquaintance { unsigned int m_nDislike; unsigned int m_nHate; }; - +VALIDATE_OFFSET(CPedAcquaintance, m_nRespect, 0x0); +VALIDATE_OFFSET(CPedAcquaintance, m_nLike, 0x4); +VALIDATE_OFFSET(CPedAcquaintance, m_nIgnore, 0x8); +VALIDATE_OFFSET(CPedAcquaintance, m_nDislike, 0xC); +VALIDATE_OFFSET(CPedAcquaintance, m_nHate, 0x10); VALIDATE_SIZE(CPedAcquaintance, 0x14); diff --git a/plugin_sa/game_sa/CPedClothesDesc.cpp b/plugin_sa/game_sa/CPedClothesDesc.cpp index 8f3c2d97e..24e29b8a3 100644 --- a/plugin_sa/game_sa/CPedClothesDesc.cpp +++ b/plugin_sa/game_sa/CPedClothesDesc.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file + Plugin-SDK (Grand Theft Auto San Andreas) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CPedClothesDesc.h" diff --git a/plugin_sa/game_sa/CPedClothesDesc.h b/plugin_sa/game_sa/CPedClothesDesc.h index 2e40fd46f..733a4e93c 100644 --- a/plugin_sa/game_sa/CPedClothesDesc.h +++ b/plugin_sa/game_sa/CPedClothesDesc.h @@ -27,5 +27,8 @@ class PLUGIN_API CPedClothesDesc { void SetTextureAndModel(unsigned int texture, unsigned int model, int eClothesTexturePart); void SetTextureAndModel(char const* texturename, char const* modelname, int eClothesTexturePart); }; - +VALIDATE_OFFSET(CPedClothesDesc, m_anModelKeys, 0x0); +VALIDATE_OFFSET(CPedClothesDesc, m_anTextureKeys, 0x28); +VALIDATE_OFFSET(CPedClothesDesc, m_fFatStat, 0x70); +VALIDATE_OFFSET(CPedClothesDesc, m_fMuscleStat, 0x74); VALIDATE_SIZE(CPedClothesDesc, 0x78); diff --git a/plugin_sa/game_sa/CPedDamageResponse.h b/plugin_sa/game_sa/CPedDamageResponse.h index 993101c93..a51b82fb1 100644 --- a/plugin_sa/game_sa/CPedDamageResponse.h +++ b/plugin_sa/game_sa/CPedDamageResponse.h @@ -1,5 +1,10 @@ +/* + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once - #include "PluginBase.h" class CPedDamageResponse { @@ -20,5 +25,10 @@ class CPedDamageResponse { m_bCheckIfAffectsPed = false; } }; - +VALIDATE_OFFSET(CPedDamageResponse, m_fDamageHealth, 0x0); +VALIDATE_OFFSET(CPedDamageResponse, m_fDamageArmor, 0x4); +VALIDATE_OFFSET(CPedDamageResponse, m_bHealthZero, 0x8); +VALIDATE_OFFSET(CPedDamageResponse, m_bForceDeath, 0x9); +VALIDATE_OFFSET(CPedDamageResponse, m_bDamageCalculated, 0xA); +VALIDATE_OFFSET(CPedDamageResponse, m_bCheckIfAffectsPed, 0xB); VALIDATE_SIZE(CPedDamageResponse, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPedDamageResponseCalculator.h b/plugin_sa/game_sa/CPedDamageResponseCalculator.h index 14a46633a..7ca5e1b00 100644 --- a/plugin_sa/game_sa/CPedDamageResponseCalculator.h +++ b/plugin_sa/game_sa/CPedDamageResponseCalculator.h @@ -33,5 +33,9 @@ class PLUGIN_API CPedDamageResponseCalculator void ComputeWillKillPed(CPed* ped, CPedDamageResponse& response, bool bSpeak); void ComputeDamageResponse(CPed* ped, CPedDamageResponse& response, bool bSpeak); }; - +VALIDATE_OFFSET(CPedDamageResponseCalculator, m_pDamager, 0x0); +VALIDATE_OFFSET(CPedDamageResponseCalculator, m_fDamageFactor, 0x4); +VALIDATE_OFFSET(CPedDamageResponseCalculator, m_bodyPart, 0x8); +VALIDATE_OFFSET(CPedDamageResponseCalculator, m_weaponType, 0xC); +VALIDATE_OFFSET(CPedDamageResponseCalculator, m_bSpeak, 0x10); VALIDATE_SIZE(CPedDamageResponseCalculator, 0x14); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPedGroup.h b/plugin_sa/game_sa/CPedGroup.h index 7e5f18c8a..0e8e5987a 100644 --- a/plugin_sa/game_sa/CPedGroup.h +++ b/plugin_sa/game_sa/CPedGroup.h @@ -37,7 +37,11 @@ class PLUGIN_API CPedGroup { SUPPORTED_10US void RemoveAllFollowers(); SUPPORTED_10US void Teleport(CVector const *Pos); }; - +VALIDATE_OFFSET(CPedGroup, field_0, 0x0); +VALIDATE_OFFSET(CPedGroup, m_bMembersEnterLeadersVehicle, 0x4); +VALIDATE_OFFSET(CPedGroup, m_groupMembership, 0x8); +VALIDATE_OFFSET(CPedGroup, m_fSeparationRange, 0x30); +VALIDATE_OFFSET(CPedGroup, m_groupIntelligence, 0x34); VALIDATE_SIZE(CPedGroup, 0x2D4); #include "meta/meta.CPedGroup.h" diff --git a/plugin_sa/game_sa/CPedGroupIntelligence.h b/plugin_sa/game_sa/CPedGroupIntelligence.h index a8df8d07a..29be85cd1 100644 --- a/plugin_sa/game_sa/CPedGroupIntelligence.h +++ b/plugin_sa/game_sa/CPedGroupIntelligence.h @@ -65,7 +65,16 @@ class PLUGIN_API CPedGroupIntelligence { SUPPORTED_10US void SetScriptCommandTask(CPed *ped, CTask const *task); SUPPORTED_10US void SetTask(CPed *ped, CTask const *task, CPedTaskPair *taskpair, int arg5, bool arg6); }; - +VALIDATE_OFFSET(CPedGroupIntelligence, m_pPedGroup, 0x0); +VALIDATE_OFFSET(CPedGroupIntelligence, m_pGroupEventHandler, 0x4); +VALIDATE_OFFSET(CPedGroupIntelligence, m_pEventGroupEvent, 0x8); +VALIDATE_OFFSET(CPedGroupIntelligence, m_groupTasks, 0xC); +VALIDATE_OFFSET(CPedGroupIntelligence, gap288, 0x288); +VALIDATE_OFFSET(CPedGroupIntelligence, m_pPedGroupDefaultTaskAllocator, 0x28C); +VALIDATE_OFFSET(CPedGroupIntelligence, m_pPrimaryTaskAllocator, 0x290); +VALIDATE_OFFSET(CPedGroupIntelligence, m_pEventResponseTaskAllocator, 0x294); +VALIDATE_OFFSET(CPedGroupIntelligence, m_dwDecisionMakerType, 0x298); +VALIDATE_OFFSET(CPedGroupIntelligence, field_29C, 0x29C); VALIDATE_SIZE(CPedGroupIntelligence, 0x2A0); #include "meta/meta.CPedGroupIntelligence.h" diff --git a/plugin_sa/game_sa/CPedGroupMembership.h b/plugin_sa/game_sa/CPedGroupMembership.h index aad398925..d8600448b 100644 --- a/plugin_sa/game_sa/CPedGroupMembership.h +++ b/plugin_sa/game_sa/CPedGroupMembership.h @@ -43,7 +43,9 @@ class PLUGIN_API CPedGroupMembership { SUPPORTED_10US static signed int GetObjectForPedToHold(); }; - +VALIDATE_OFFSET(CPedGroupMembership, m_pPedGroup, 0x0); +VALIDATE_OFFSET(CPedGroupMembership, m_apMembers, 0x4); +VALIDATE_OFFSET(CPedGroupMembership, m_fMaxSeparation, 0x24); VALIDATE_SIZE(CPedGroupMembership, 0x28); #include "meta/meta.CPedGroupMembership.h" diff --git a/plugin_sa/game_sa/CPedGroupPlacer.h b/plugin_sa/game_sa/CPedGroupPlacer.h index 10dc26325..c80bd1224 100644 --- a/plugin_sa/game_sa/CPedGroupPlacer.h +++ b/plugin_sa/game_sa/CPedGroupPlacer.h @@ -31,5 +31,6 @@ class PLUGIN_API CPedGroupPlacer { SUPPORTED_10US bool PlaceGroup(ePedType pedtype, int numOfPeds, CVector const *origin, int nGroupPlacerType); SUPPORTED_10US bool PlaceRandomGroup(ePedType pedtype, int numOfPeds, CVector *origin, int unused); }; +VALIDATE_SIZE(CPedGroupPlacer, 0x1); #include "meta/meta.CPedGroupPlacer.h" diff --git a/plugin_sa/game_sa/CPedGroups.h b/plugin_sa/game_sa/CPedGroups.h index 14b1d9331..6a8dcb855 100644 --- a/plugin_sa/game_sa/CPedGroups.h +++ b/plugin_sa/game_sa/CPedGroups.h @@ -32,5 +32,6 @@ class PLUGIN_API CPedGroups { SUPPORTED_10US static void RemoveAllFollowersFromGroup(int groupID); SUPPORTED_10US static void RemoveGroup(int groupID); }; +VALIDATE_SIZE(CPedGroups, 0x1); #include "meta/meta.CPedGroups.h" diff --git a/plugin_sa/game_sa/CPedIK.cpp b/plugin_sa/game_sa/CPedIK.cpp index 71acdd01b..f5d3d29a5 100644 --- a/plugin_sa/game_sa/CPedIK.cpp +++ b/plugin_sa/game_sa/CPedIK.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CPedIK.h" // Converted from thiscall void CPedIK::RotateTorso(AnimBlendFrameData *bone,LimbOrientation &orientation,bool flag) 0x5FDDB0 diff --git a/plugin_sa/game_sa/CPedIK.h b/plugin_sa/game_sa/CPedIK.h index e24cb0588..8579295b5 100644 --- a/plugin_sa/game_sa/CPedIK.h +++ b/plugin_sa/game_sa/CPedIK.h @@ -27,6 +27,8 @@ struct LimbOrientation float m_fYaw; float m_fPitch; }; +VALIDATE_OFFSET(LimbOrientation, m_fYaw, 0x0); +VALIDATE_OFFSET(LimbOrientation, m_fPitch, 0x4); VALIDATE_SIZE(LimbOrientation, 0x8); @@ -37,6 +39,12 @@ struct LimbMovementInfo float maxPitch, minPitch; float pitchD; }; +VALIDATE_OFFSET(LimbMovementInfo, maxYaw, 0x0); +VALIDATE_OFFSET(LimbMovementInfo, minYaw, 0x4); +VALIDATE_OFFSET(LimbMovementInfo, yawD, 0x8); +VALIDATE_OFFSET(LimbMovementInfo, maxPitch, 0xC); +VALIDATE_OFFSET(LimbMovementInfo, minPitch, 0x10); +VALIDATE_OFFSET(LimbMovementInfo, pitchD, 0x14); VALIDATE_SIZE(LimbMovementInfo, 0x18); class PLUGIN_API CPedIK { @@ -71,5 +79,11 @@ class PLUGIN_API CPedIK { float fNormalize); }; - +VALIDATE_OFFSET(CPedIK, m_pPed, 0x0); +VALIDATE_OFFSET(CPedIK, m_TorsoOrien, 0x4); +VALIDATE_OFFSET(CPedIK, m_fSlopePitch, 0xC); +VALIDATE_OFFSET(CPedIK, m_fSlopePitchLimitMult, 0x10); +VALIDATE_OFFSET(CPedIK, m_fSlopeRoll, 0x14); +VALIDATE_OFFSET(CPedIK, m_fBodyRoll, 0x18); +VALIDATE_OFFSET(CPedIK, m_nFlags, 0x1C); VALIDATE_SIZE(CPedIK, 0x20); diff --git a/plugin_sa/game_sa/CPedIntelligence.h b/plugin_sa/game_sa/CPedIntelligence.h index 83d95fa18..87f3a0f32 100644 --- a/plugin_sa/game_sa/CPedIntelligence.h +++ b/plugin_sa/game_sa/CPedIntelligence.h @@ -110,5 +110,30 @@ class PLUGIN_API CPedIntelligence { void Process(); static void operator delete(void* arg1); }; - +VALIDATE_OFFSET(CPedIntelligence, m_pPed, 0x0); +VALIDATE_OFFSET(CPedIntelligence, m_TaskMgr, 0x4); +VALIDATE_OFFSET(CPedIntelligence, m_eventHandler, 0x34); +VALIDATE_OFFSET(CPedIntelligence, m_eventGroup, 0x68); +VALIDATE_OFFSET(CPedIntelligence, m_nDecisionMakerType, 0xB4); +VALIDATE_OFFSET(CPedIntelligence, m_nDecisionMakerTypeInGroup, 0xB8); +VALIDATE_OFFSET(CPedIntelligence, m_fHearingRange, 0xBC); +VALIDATE_OFFSET(CPedIntelligence, m_fSeeingRange, 0xC0); +VALIDATE_OFFSET(CPedIntelligence, m_nDmNumPedsToScan, 0xC4); +VALIDATE_OFFSET(CPedIntelligence, m_fDmRadius, 0xC8); +VALIDATE_OFFSET(CPedIntelligence, m_FollowNodeThresholdDistance, 0xCC); +VALIDATE_OFFSET(CPedIntelligence, m_NextEventResponseSequence, 0xD0); +VALIDATE_OFFSET(CPedIntelligence, m_nEventId, 0xD1); +VALIDATE_OFFSET(CPedIntelligence, m_nEventPriority, 0xD2); +VALIDATE_OFFSET(CPedIntelligence, field_D3, 0xD3); +VALIDATE_OFFSET(CPedIntelligence, m_vehicleScanner, 0xD4); +VALIDATE_OFFSET(CPedIntelligence, m_pedScanner, 0x124); +VALIDATE_OFFSET(CPedIntelligence, m_mentalState, 0x174); +VALIDATE_OFFSET(CPedIntelligence, field_188, 0x188); +VALIDATE_OFFSET(CPedIntelligence, m_eventScanner, 0x18C); +VALIDATE_OFFSET(CPedIntelligence, m_collisionScanner, 0x260); +VALIDATE_OFFSET(CPedIntelligence, m_pedStuckChecker, 0x264); +VALIDATE_OFFSET(CPedIntelligence, m_AnotherStaticCounter, 0x274); +VALIDATE_OFFSET(CPedIntelligence, m_StaticCounter, 0x278); +VALIDATE_OFFSET(CPedIntelligence, m_vecLastPedPosDuringDamageEntity, 0x27C); +VALIDATE_OFFSET(CPedIntelligence, m_apInterestingEntities, 0x288); VALIDATE_SIZE(CPedIntelligence, 0x294); diff --git a/plugin_sa/game_sa/CPedList.h b/plugin_sa/game_sa/CPedList.h index a2ba7726e..5cc6a1633 100644 --- a/plugin_sa/game_sa/CPedList.h +++ b/plugin_sa/game_sa/CPedList.h @@ -24,7 +24,8 @@ class PLUGIN_API CPedList { SUPPORTED_10US void RemovePedsAttackingPedType(int pedtype); SUPPORTED_10US void RemovePedsThatDontListenToPlayer(); }; - +VALIDATE_OFFSET(CPedList, m_nCount, 0x0); +VALIDATE_OFFSET(CPedList, m_apPeds, 0x4); VALIDATE_SIZE(CPedList, 0x7C); #include "meta/meta.CPedList.h" diff --git a/plugin_sa/game_sa/CPedModelInfo.h b/plugin_sa/game_sa/CPedModelInfo.h index c31bd293b..594af753a 100644 --- a/plugin_sa/game_sa/CPedModelInfo.h +++ b/plugin_sa/game_sa/CPedModelInfo.h @@ -27,5 +27,17 @@ class PLUGIN_API CPedModelInfo : public CClumpModelInfo { short m_nVoice2; short m_nVoiceId; }; - +VALIDATE_OFFSET(CPedModelInfo, m_nAnimType, 0x24); +VALIDATE_OFFSET(CPedModelInfo, m_nPedType, 0x28); +VALIDATE_OFFSET(CPedModelInfo, m_nStatType, 0x2C); +VALIDATE_OFFSET(CPedModelInfo, m_nCarsCanDriveMask, 0x30); +VALIDATE_OFFSET(CPedModelInfo, m_nPedFlags, 0x32); +VALIDATE_OFFSET(CPedModelInfo, m_pHitColModel, 0x34); +VALIDATE_OFFSET(CPedModelInfo, m_nRadio1, 0x38); +VALIDATE_OFFSET(CPedModelInfo, m_nRadio2, 0x39); +VALIDATE_OFFSET(CPedModelInfo, m_nRace, 0x3A); +VALIDATE_OFFSET(CPedModelInfo, m_nPedAudioType, 0x3C); +VALIDATE_OFFSET(CPedModelInfo, m_nVoice1, 0x3E); +VALIDATE_OFFSET(CPedModelInfo, m_nVoice2, 0x40); +VALIDATE_OFFSET(CPedModelInfo, m_nVoiceId, 0x42); VALIDATE_SIZE(CPedModelInfo, 0x44); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPedPlacement.h b/plugin_sa/game_sa/CPedPlacement.h index 43cc91c1c..7bdd13e53 100644 --- a/plugin_sa/game_sa/CPedPlacement.h +++ b/plugin_sa/game_sa/CPedPlacement.h @@ -19,5 +19,6 @@ class PLUGIN_API CPedPlacement { SUPPORTED_10US static CVehicle *IsPositionClearOfCars(CVector const *pos); SUPPORTED_10US static CVehicle *IsPositionClearOfCars(CPed const *ped); }; +VALIDATE_SIZE(CPedPlacement, 0x1); #include "meta/meta.CPedPlacement.h" diff --git a/plugin_sa/game_sa/CPedStuckChecker.h b/plugin_sa/game_sa/CPedStuckChecker.h index 7b67b2d4c..8a8247b7c 100644 --- a/plugin_sa/game_sa/CPedStuckChecker.h +++ b/plugin_sa/game_sa/CPedStuckChecker.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) source file + Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once - #include "CVector.h" class CPed; @@ -33,4 +32,7 @@ class PLUGIN_API CPedStuckChecker { auto GetState() const { return m_state; } }; +VALIDATE_OFFSET(CPedStuckChecker, m_lastNonStuckPoint, 0x0); +VALIDATE_OFFSET(CPedStuckChecker, m_radius, 0xC); +VALIDATE_OFFSET(CPedStuckChecker, m_state, 0xE); VALIDATE_SIZE(CPedStuckChecker, 0x10); diff --git a/plugin_sa/game_sa/CPedTaskPair.h b/plugin_sa/game_sa/CPedTaskPair.h index 362731aa1..6090f571c 100644 --- a/plugin_sa/game_sa/CPedTaskPair.h +++ b/plugin_sa/game_sa/CPedTaskPair.h @@ -19,7 +19,9 @@ class PLUGIN_API CPedTaskPair { SUPPORTED_10US void Flush(); }; - +VALIDATE_OFFSET(CPedTaskPair, m_pPed, 0x0); +VALIDATE_OFFSET(CPedTaskPair, m_pTask, 0x4); +VALIDATE_OFFSET(CPedTaskPair, field_8, 0x8); VALIDATE_SIZE(CPedTaskPair, 0xC); #include "meta/meta.CPedTaskPair.h" diff --git a/plugin_sa/game_sa/CPedType.cpp b/plugin_sa/game_sa/CPedType.cpp index ce918bf1a..1fd4a5bb6 100644 --- a/plugin_sa/game_sa/CPedType.cpp +++ b/plugin_sa/game_sa/CPedType.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) Source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPedType.h" diff --git a/plugin_sa/game_sa/CPedType.h b/plugin_sa/game_sa/CPedType.h index 60035ce5e..e0749efb8 100644 --- a/plugin_sa/game_sa/CPedType.h +++ b/plugin_sa/game_sa/CPedType.h @@ -16,4 +16,5 @@ class CPedType { static void Load(); static void Save(); }; +VALIDATE_SIZE(CPedType, 0x1); diff --git a/plugin_sa/game_sa/CPhysical.h b/plugin_sa/game_sa/CPhysical.h index b8dd1d31b..41f7fb120 100644 --- a/plugin_sa/game_sa/CPhysical.h +++ b/plugin_sa/game_sa/CPhysical.h @@ -156,5 +156,41 @@ class CPhysical : public CEntity { bool CheckCollision(); bool CheckCollision_SimpleCar(); }; - +VALIDATE_OFFSET(CPhysical, field_38, 0x38); +VALIDATE_OFFSET(CPhysical, m_nLastCollisionTime, 0x3C); +VALIDATE_OFFSET(CPhysical, m_vecMoveSpeed, 0x44); +VALIDATE_OFFSET(CPhysical, m_vecTurnSpeed, 0x50); +VALIDATE_OFFSET(CPhysical, m_vecFrictionMoveSpeed, 0x5C); +VALIDATE_OFFSET(CPhysical, m_vecFrictionTurnSpeed, 0x68); +VALIDATE_OFFSET(CPhysical, m_vecForce, 0x74); +VALIDATE_OFFSET(CPhysical, m_vecTorque, 0x80); +VALIDATE_OFFSET(CPhysical, m_fMass, 0x8C); +VALIDATE_OFFSET(CPhysical, m_fTurnMass, 0x90); +VALIDATE_OFFSET(CPhysical, m_fVelocityFrequency, 0x94); +VALIDATE_OFFSET(CPhysical, m_fAirResistance, 0x98); +VALIDATE_OFFSET(CPhysical, m_fElasticity, 0x9C); +VALIDATE_OFFSET(CPhysical, m_fBuoyancyConstant, 0xA0); +VALIDATE_OFFSET(CPhysical, m_vecCentreOfMass, 0xA4); +VALIDATE_OFFSET(CPhysical, m_pCollisionList, 0xB0); +VALIDATE_OFFSET(CPhysical, m_pMovingList, 0xB4); +VALIDATE_OFFSET(CPhysical, m_nFakePhysics, 0xB8); +VALIDATE_OFFSET(CPhysical, m_nNumEntitiesCollided, 0xB9); +VALIDATE_OFFSET(CPhysical, m_nContactSurface, 0xBA); +VALIDATE_OFFSET(CPhysical, field_BB, 0xBB); +VALIDATE_OFFSET(CPhysical, m_apCollidedEntities, 0xBC); +VALIDATE_OFFSET(CPhysical, m_fMovingSpeed, 0xD4); +VALIDATE_OFFSET(CPhysical, m_fDamageIntensity, 0xD8); +VALIDATE_OFFSET(CPhysical, m_pDamageEntity, 0xDC); +VALIDATE_OFFSET(CPhysical, m_vecLastCollisionImpactVelocity, 0xE0); +VALIDATE_OFFSET(CPhysical, m_vecLastCollisionPosn, 0xEC); +VALIDATE_OFFSET(CPhysical, m_nPieceType, 0xF8); +VALIDATE_OFFSET(CPhysical, field_FA, 0xFA); +VALIDATE_OFFSET(CPhysical, m_pAttachedTo, 0xFC); +VALIDATE_OFFSET(CPhysical, m_vecAttachOffset, 0x100); +VALIDATE_OFFSET(CPhysical, m_vecAttachedEntityPosn, 0x10C); +VALIDATE_OFFSET(CPhysical, m_qAttachedEntityRotation, 0x118); +VALIDATE_OFFSET(CPhysical, m_pEntityIgnoredCollision, 0x128); +VALIDATE_OFFSET(CPhysical, m_fContactSurfaceBrightness, 0x12C); +VALIDATE_OFFSET(CPhysical, m_fDynamicLighting, 0x130); +VALIDATE_OFFSET(CPhysical, m_pShadowData, 0x134); VALIDATE_SIZE(CPhysical, 0x138); diff --git a/plugin_sa/game_sa/CPickup.h b/plugin_sa/game_sa/CPickup.h index 2c732b10f..206970fdc 100644 --- a/plugin_sa/game_sa/CPickup.h +++ b/plugin_sa/game_sa/CPickup.h @@ -102,5 +102,14 @@ class CPickup { static void FindTextIndexForString(char* message); static char const *FindStringForTextIndex(int index); }; - -VALIDATE_SIZE(CPickup, 0x20); \ No newline at end of file +VALIDATE_OFFSET(CPickup, m_fRevenueValue, 0x0); +VALIDATE_OFFSET(CPickup, m_pObject, 0x4); +VALIDATE_OFFSET(CPickup, m_nAmmo, 0x8); +VALIDATE_OFFSET(CPickup, m_nRegenerationTime, 0xC); +VALIDATE_OFFSET(CPickup, m_vecPos, 0x10); +VALIDATE_OFFSET(CPickup, m_nMoneyPerDay, 0x16); +VALIDATE_OFFSET(CPickup, m_nModelIndex, 0x18); +VALIDATE_OFFSET(CPickup, m_nReferenceIndex, 0x1A); +VALIDATE_OFFSET(CPickup, m_nPickupType, 0x1C); +VALIDATE_OFFSET(CPickup, m_nFlags, 0x1D); +VALIDATE_SIZE(CPickup, 0x20); diff --git a/plugin_sa/game_sa/CPickups.h b/plugin_sa/game_sa/CPickups.h index 01566f1e9..106afcfe1 100644 --- a/plugin_sa/game_sa/CPickups.h +++ b/plugin_sa/game_sa/CPickups.h @@ -80,6 +80,7 @@ class CPickups { // returns weapon type (see eWeaponType) static int WeaponForModel(int modelId); }; +VALIDATE_SIZE(CPickups, 0x1); extern int &CollectPickupBuffer; diff --git a/plugin_sa/game_sa/CPlaceable.h b/plugin_sa/game_sa/CPlaceable.h index ac5ab0ce0..3c03e4a90 100644 --- a/plugin_sa/game_sa/CPlaceable.h +++ b/plugin_sa/game_sa/CPlaceable.h @@ -53,5 +53,6 @@ class PLUGIN_API CPlaceable { inline const CVector& GetPosition() const { return m_matrix ? m_matrix->GetPosition() : m_placement.m_vPosn; } inline CVector& GetPosition() { return m_matrix ? m_matrix->GetPosition() : m_placement.m_vPosn; } }; - +VALIDATE_OFFSET(CPlaceable, m_placement, 0x4); +VALIDATE_OFFSET(CPlaceable, m_matrix, 0x14); VALIDATE_SIZE(CPlaceable, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPlane.h b/plugin_sa/game_sa/CPlane.h index c88cc2ba0..d8b4343ca 100644 --- a/plugin_sa/game_sa/CPlane.h +++ b/plugin_sa/game_sa/CPlane.h @@ -100,7 +100,34 @@ class CPlane : public CAutomobile { static float& PLANE_MAX_PROP_SPEED; static float& PLANE_ROC_PROP_SPEED; }; - +VALIDATE_OFFSET(CPlane, field_988, 0x988); +VALIDATE_OFFSET(CPlane, field_98C, 0x98C); +VALIDATE_OFFSET(CPlane, field_990, 0x990); +VALIDATE_OFFSET(CPlane, field_994, 0x994); +VALIDATE_OFFSET(CPlane, field_998, 0x998); +VALIDATE_OFFSET(CPlane, field_99C, 0x99C); +VALIDATE_OFFSET(CPlane, field_9A0, 0x9A0); +VALIDATE_OFFSET(CPlane, field_9A4, 0x9A4); +VALIDATE_OFFSET(CPlane, field_9A8, 0x9A8); +VALIDATE_OFFSET(CPlane, field_9AC, 0x9AC); +VALIDATE_OFFSET(CPlane, field_9B0, 0x9B0); +VALIDATE_OFFSET(CPlane, field_9B4, 0x9B4); +VALIDATE_OFFSET(CPlane, field_9B8, 0x9B8); +VALIDATE_OFFSET(CPlane, field_9BC, 0x9BC); +VALIDATE_OFFSET(CPlane, m_nStartedFlyingTime, 0x9C0); +VALIDATE_OFFSET(CPlane, field_9C4, 0x9C4); +VALIDATE_OFFSET(CPlane, field_9C8, 0x9C8); +VALIDATE_OFFSET(CPlane, m_fLandingGearStatus, 0x9CC); +VALIDATE_OFFSET(CPlane, field_9D0, 0x9D0); +VALIDATE_OFFSET(CPlane, m_pGunParticles, 0x9D4); +VALIDATE_OFFSET(CPlane, m_nFiringMultiplier, 0x9D8); +VALIDATE_OFFSET(CPlane, field_9DC, 0x9DC); +VALIDATE_OFFSET(CPlane, field_9E0, 0x9E0); +VALIDATE_OFFSET(CPlane, field_9E4, 0x9E4); +VALIDATE_OFFSET(CPlane, m_apJettrusParticles, 0x9E8); +VALIDATE_OFFSET(CPlane, m_pSmokeParticle, 0x9F8); +VALIDATE_OFFSET(CPlane, m_nSmokeTimer, 0x9FC); +VALIDATE_OFFSET(CPlane, m_bSmokeEjectorEnabled, 0xA00); VALIDATE_SIZE(CPlane, 0xA04); extern float &HARRIER_NOZZLE_ROTATERATE; diff --git a/plugin_sa/game_sa/CPlaneTrail.h b/plugin_sa/game_sa/CPlaneTrail.h index a7f05840c..389b69739 100644 --- a/plugin_sa/game_sa/CPlaneTrail.h +++ b/plugin_sa/game_sa/CPlaneTrail.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" #include "CVector.h" @@ -16,5 +17,6 @@ class PLUGIN_API CPlaneTrail { void Render(float intensity); void RegisterPoint(CVector point); }; - +VALIDATE_OFFSET(CPlaneTrail, m_avecPosn, 0x0); +VALIDATE_OFFSET(CPlaneTrail, m_anTime, 0xC0); VALIDATE_SIZE(CPlaneTrail, 0x100); diff --git a/plugin_sa/game_sa/CPlaneTrails.h b/plugin_sa/game_sa/CPlaneTrails.h index 2ef3a89c4..c33cdb6df 100644 --- a/plugin_sa/game_sa/CPlaneTrails.h +++ b/plugin_sa/game_sa/CPlaneTrails.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" #include "CPlaneTrail.h" @@ -18,4 +19,5 @@ class PLUGIN_API CPlaneTrails static void Init(); static void Update(); static void RegisterPoint(CVector point, unsigned int trailIndex); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPlaneTrails, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPlantMgr.h b/plugin_sa/game_sa/CPlantMgr.h index b2c4972bf..2fed6b40e 100644 --- a/plugin_sa/game_sa/CPlantMgr.h +++ b/plugin_sa/game_sa/CPlantMgr.h @@ -24,11 +24,27 @@ struct CPlantSurfPropPlantData { float m_fWindBendScale; float m_fWindBendVar; }; +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_nModelID, 0x0); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_nTextureID, 0x2); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_rgbaColor, 0x4); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_nIntensity, 0x8); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_nIntensityVar, 0x9); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fScaleXY, 0xC); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fScaleZ, 0x10); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fScaleVarXY, 0x14); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fScaleVarZ, 0x18); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fDensity, 0x1C); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fWindBendScale, 0x20); +VALIDATE_OFFSET(CPlantSurfPropPlantData, m_fWindBendVar, 0x24); +VALIDATE_SIZE(CPlantSurfPropPlantData, 0x28); struct CPlantSurfProp { uint16_t m_nPlantSlotID; CPlantSurfPropPlantData m_PlantData[3]; }; +VALIDATE_OFFSET(CPlantSurfProp, m_nPlantSlotID, 0x0); +VALIDATE_OFFSET(CPlantSurfProp, m_PlantData, 0x4); +VALIDATE_SIZE(CPlantSurfProp, 0x7C); struct CPlantLocTri { CVector m_V1; @@ -47,14 +63,33 @@ struct CPlantLocTri { CPlantLocTri* m_pNextTri; CPlantLocTri* m_pPrevTri; }; +VALIDATE_OFFSET(CPlantLocTri, m_V1, 0x0); +VALIDATE_OFFSET(CPlantLocTri, m_V2, 0xC); +VALIDATE_OFFSET(CPlantLocTri, m_V3, 0x18); +VALIDATE_OFFSET(CPlantLocTri, m_Center, 0x24); +VALIDATE_OFFSET(CPlantLocTri, m_SphereRadius, 0x30); +VALIDATE_OFFSET(CPlantLocTri, m_Seed, 0x34); +VALIDATE_OFFSET(CPlantLocTri, m_nMaxNumPlants, 0x40); +VALIDATE_OFFSET(CPlantLocTri, m_nSurfaceType, 0x46); +VALIDATE_OFFSET(CPlantLocTri, m_nLighting, 0x47); +VALIDATE_OFFSET(CPlantLocTri, m_pNextTri, 0x4C); +VALIDATE_OFFSET(CPlantLocTri, m_pPrevTri, 0x50); +VALIDATE_SIZE(CPlantLocTri, 0x54); -class CPlantColEntEntry { +struct CPlantColEntEntry +{ CEntity* m_pEntity; CPlantLocTri** m_LocTriArray; uint16_t m_nNumTris; CPlantColEntEntry* m_pNextEntry; CPlantColEntEntry* m_pPrevEntry; }; +VALIDATE_OFFSET(CPlantColEntEntry, m_pEntity, 0x0); +VALIDATE_OFFSET(CPlantColEntEntry, m_LocTriArray, 0x4); +VALIDATE_OFFSET(CPlantColEntEntry, m_nNumTris, 0x8); +VALIDATE_OFFSET(CPlantColEntEntry, m_pNextEntry, 0xC); +VALIDATE_OFFSET(CPlantColEntEntry, m_pPrevEntry, 0x10); +VALIDATE_SIZE(CPlantColEntEntry, 0x14); class CPlantMgr { public: @@ -73,3 +108,4 @@ class CPlantMgr { static bool ReloadConfig(); static bool Initialise(); }; +VALIDATE_SIZE(CPlantMgr, 0x1); diff --git a/plugin_sa/game_sa/CPlayerData.h b/plugin_sa/game_sa/CPlayerData.h index d39c708a1..84960c0fa 100644 --- a/plugin_sa/game_sa/CPlayerData.h +++ b/plugin_sa/game_sa/CPlayerData.h @@ -91,5 +91,51 @@ class PLUGIN_API CPlayerData { CPed *m_pCurrentProstitutePed; CPed *m_pLastProstituteShagged; }; - +VALIDATE_OFFSET(CPlayerData, m_pWanted, 0x0); +VALIDATE_OFFSET(CPlayerData, m_pPedClothesDesc, 0x4); +VALIDATE_OFFSET(CPlayerData, m_pArrestingCop, 0x8); +VALIDATE_OFFSET(CPlayerData, m_vecFightMovement, 0xC); +VALIDATE_OFFSET(CPlayerData, m_fMoveBlendRatio, 0x14); +VALIDATE_OFFSET(CPlayerData, m_fTimeCanRun, 0x18); +VALIDATE_OFFSET(CPlayerData, m_fMoveSpeed, 0x1C); +VALIDATE_OFFSET(CPlayerData, m_nChosenWeapon, 0x20); +VALIDATE_OFFSET(CPlayerData, m_nCarDangerCounter, 0x21); +VALIDATE_OFFSET(CPlayerData, m_nStandStillTimer, 0x24); +VALIDATE_OFFSET(CPlayerData, m_nHitAnimDelayTimer, 0x28); +VALIDATE_OFFSET(CPlayerData, m_fAttackButtonCounter, 0x2C); +VALIDATE_OFFSET(CPlayerData, m_pDangerCar, 0x30); +VALIDATE_OFFSET(CPlayerData, m_nPlayerGroup, 0x38); +VALIDATE_OFFSET(CPlayerData, m_nAdrenalineEndTime, 0x3C); +VALIDATE_OFFSET(CPlayerData, m_nDrunkenness, 0x40); +VALIDATE_OFFSET(CPlayerData, m_nFadeDrunkenness, 0x41); +VALIDATE_OFFSET(CPlayerData, m_nDrugLevel, 0x42); +VALIDATE_OFFSET(CPlayerData, m_nScriptLimitToGangSize, 0x43); +VALIDATE_OFFSET(CPlayerData, m_fBreath, 0x44); +VALIDATE_OFFSET(CPlayerData, m_nMeleeWeaponAnimReferenced, 0x48); +VALIDATE_OFFSET(CPlayerData, m_nMeleeWeaponAnimReferencedExtra, 0x4C); +VALIDATE_OFFSET(CPlayerData, m_fFPSMoveHeading, 0x50); +VALIDATE_OFFSET(CPlayerData, m_fLookPitch, 0x54); +VALIDATE_OFFSET(CPlayerData, m_fSkateBoardSpeed, 0x58); +VALIDATE_OFFSET(CPlayerData, m_fSkateBoardLean, 0x5C); +VALIDATE_OFFSET(CPlayerData, m_pSpecialAtomic, 0x60); +VALIDATE_OFFSET(CPlayerData, m_fGunSpinSpeed, 0x64); +VALIDATE_OFFSET(CPlayerData, m_fGunSpinAngle, 0x68); +VALIDATE_OFFSET(CPlayerData, m_nLastTimeFiring, 0x6C); +VALIDATE_OFFSET(CPlayerData, m_nTargetBone, 0x70); +VALIDATE_OFFSET(CPlayerData, m_vecTargetBoneOffset, 0x74); +VALIDATE_OFFSET(CPlayerData, m_nBusFaresCollected, 0x80); +VALIDATE_OFFSET(CPlayerData, m_bPlayerSprintDisabled, 0x84); +VALIDATE_OFFSET(CPlayerData, m_bDontAllowWeaponChange, 0x85); +VALIDATE_OFFSET(CPlayerData, m_bForceInteriorLighting, 0x86); +VALIDATE_OFFSET(CPlayerData, m_nPadDownPressedInMilliseconds, 0x88); +VALIDATE_OFFSET(CPlayerData, m_nPadUpPressedInMilliseconds, 0x8A); +VALIDATE_OFFSET(CPlayerData, m_nWetness, 0x8C); +VALIDATE_OFFSET(CPlayerData, m_bPlayersGangActive, 0x8D); +VALIDATE_OFFSET(CPlayerData, m_nWaterCoverPerc, 0x8E); +VALIDATE_OFFSET(CPlayerData, m_fWaterHeight, 0x90); +VALIDATE_OFFSET(CPlayerData, m_nFireHSMissilePressedTime, 0x94); +VALIDATE_OFFSET(CPlayerData, m_LastHSMissileTarget, 0x98); +VALIDATE_OFFSET(CPlayerData, m_nModelIndexOfLastBuildingShot, 0x9C); +VALIDATE_OFFSET(CPlayerData, m_pCurrentProstitutePed, 0xA4); +VALIDATE_OFFSET(CPlayerData, m_pLastProstituteShagged, 0xA8); VALIDATE_SIZE(CPlayerData, 0xAC); diff --git a/plugin_sa/game_sa/CPlayerInfo.cpp b/plugin_sa/game_sa/CPlayerInfo.cpp index f054ba176..375725276 100644 --- a/plugin_sa/game_sa/CPlayerInfo.cpp +++ b/plugin_sa/game_sa/CPlayerInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) Source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPlayerInfo.h" diff --git a/plugin_sa/game_sa/CPlayerInfo.h b/plugin_sa/game_sa/CPlayerInfo.h index 8b50b0267..9a33179d8 100644 --- a/plugin_sa/game_sa/CPlayerInfo.h +++ b/plugin_sa/game_sa/CPlayerInfo.h @@ -110,5 +110,65 @@ class PLUGIN_API CPlayerInfo { bool Save(); }; - +VALIDATE_OFFSET(CPlayerInfo, m_pPed, 0x0); +VALIDATE_OFFSET(CPlayerInfo, m_PlayerData, 0x4); +VALIDATE_OFFSET(CPlayerInfo, m_pRemoteVehicle, 0xB0); +VALIDATE_OFFSET(CPlayerInfo, m_pSpecCar, 0xB4); +VALIDATE_OFFSET(CPlayerInfo, m_nMoney, 0xB8); +VALIDATE_OFFSET(CPlayerInfo, m_nDisplayMoney, 0xBC); +VALIDATE_OFFSET(CPlayerInfo, m_nCollectablesPickedUp, 0xC0); +VALIDATE_OFFSET(CPlayerInfo, m_nTotalNumCollectables, 0xC4); +VALIDATE_OFFSET(CPlayerInfo, m_nLastBumpPlayerCarTimer, 0xC8); +VALIDATE_OFFSET(CPlayerInfo, m_nTaxiTimer, 0xCC); +VALIDATE_OFFSET(CPlayerInfo, m_nVehicleTimeCounter, 0xD0); +VALIDATE_OFFSET(CPlayerInfo, m_bTaxiTimerScore, 0xD4); +VALIDATE_OFFSET(CPlayerInfo, m_bTryingToExitCar, 0xD5); +VALIDATE_OFFSET(CPlayerInfo, m_pLastTargetVehicle, 0xD8); +VALIDATE_OFFSET(CPlayerInfo, m_nPlayerState, 0xDC); +VALIDATE_OFFSET(CPlayerInfo, m_bAfterRemoteVehicleExplosion, 0xDD); +VALIDATE_OFFSET(CPlayerInfo, m_bCreateRemoteVehicleExplosion, 0xDE); +VALIDATE_OFFSET(CPlayerInfo, m_bFadeAfterRemoteVehicleExplosion, 0xDF); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeOfRemoteVehicleExplosion, 0xE0); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeEnergyLost, 0xE4); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeArmourLost, 0xE8); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeBigGunFired, 0xEC); +VALIDATE_OFFSET(CPlayerInfo, m_nTimesUpsideDownInARow, 0xF0); +VALIDATE_OFFSET(CPlayerInfo, m_nTimesStuckInARow, 0xF4); +VALIDATE_OFFSET(CPlayerInfo, m_nCarTwoWheelCounter, 0xF8); +VALIDATE_OFFSET(CPlayerInfo, m_fCarTwoWheelDist, 0xFC); +VALIDATE_OFFSET(CPlayerInfo, m_nCarLess3WheelCounter, 0x100); +VALIDATE_OFFSET(CPlayerInfo, m_nBikeRearWheelCounter, 0x104); +VALIDATE_OFFSET(CPlayerInfo, m_fBikeRearWheelDist, 0x108); +VALIDATE_OFFSET(CPlayerInfo, m_nBikeFrontWheelCounter, 0x10C); +VALIDATE_OFFSET(CPlayerInfo, m_fBikeFrontWheelDist, 0x110); +VALIDATE_OFFSET(CPlayerInfo, m_nTempBufferCounter, 0x114); +VALIDATE_OFFSET(CPlayerInfo, m_nBestCarTwoWheelsTimeMs, 0x118); +VALIDATE_OFFSET(CPlayerInfo, m_fBestCarTwoWheelsDistM, 0x11C); +VALIDATE_OFFSET(CPlayerInfo, m_nBestBikeWheelieTimeMs, 0x120); +VALIDATE_OFFSET(CPlayerInfo, m_fBestBikeWheelieDistM, 0x124); +VALIDATE_OFFSET(CPlayerInfo, m_nBestBikeStoppieTimeMs, 0x128); +VALIDATE_OFFSET(CPlayerInfo, m_fBestBikeStoppieDistM, 0x12C); +VALIDATE_OFFSET(CPlayerInfo, m_nCarDensityForCurrentZone, 0x130); +VALIDATE_OFFSET(CPlayerInfo, m_fRoadDensityAroundPlayer, 0x134); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeOfLastCarExplosionCaused, 0x138); +VALIDATE_OFFSET(CPlayerInfo, m_nExplosionMultiplier, 0x13C); +VALIDATE_OFFSET(CPlayerInfo, m_nHavocCaused, 0x140); +VALIDATE_OFFSET(CPlayerInfo, m_nNumHoursDidntEat, 0x144); +VALIDATE_OFFSET(CPlayerInfo, m_fCurrentChaseValue, 0x148); +VALIDATE_OFFSET(CPlayerInfo, m_bDoesNotGetTired, 0x14C); +VALIDATE_OFFSET(CPlayerInfo, m_bFastReload, 0x14D); +VALIDATE_OFFSET(CPlayerInfo, m_bFireProof, 0x14E); +VALIDATE_OFFSET(CPlayerInfo, m_nMaxHealth, 0x14F); +VALIDATE_OFFSET(CPlayerInfo, m_nMaxArmour, 0x150); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfJailFree, 0x151); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfHospitalFree, 0x152); +VALIDATE_OFFSET(CPlayerInfo, m_bCanDoDriveBy, 0x153); +VALIDATE_OFFSET(CPlayerInfo, m_nBustedAudioStatus, 0x154); +VALIDATE_OFFSET(CPlayerInfo, m_nLastBustMessageNumber, 0x156); +VALIDATE_OFFSET(CPlayerInfo, m_nCrosshairActivated, 0x158); +VALIDATE_OFFSET(CPlayerInfo, m_vecCrosshairTarget, 0x15C); +VALIDATE_OFFSET(CPlayerInfo, m_szSkinName, 0x164); +VALIDATE_OFFSET(CPlayerInfo, m_pSkinTexture, 0x184); +VALIDATE_OFFSET(CPlayerInfo, m_bParachuteReferenced, 0x188); +VALIDATE_OFFSET(CPlayerInfo, m_nRequireParachuteTimer, 0x18C); VALIDATE_SIZE(CPlayerInfo, 0x190); diff --git a/plugin_sa/game_sa/CPlayerPed.h b/plugin_sa/game_sa/CPlayerPed.h index 041f919b6..4148d10b0 100644 --- a/plugin_sa/game_sa/CPlayerPed.h +++ b/plugin_sa/game_sa/CPlayerPed.h @@ -95,7 +95,8 @@ class CPlayerPed : public CPed { static bool PedCanBeTargettedVehicleWise(CPed* ped); static void SetupPlayerPed(int playerId); }; - +VALIDATE_OFFSET(CPlayerPed, m_pPlayerTargettedPed, 0x79C); +VALIDATE_OFFSET(CPlayerPed, field_7A0, 0x7A0); VALIDATE_SIZE(CPlayerPed, 0x7A4); extern char *abTempNeverLeavesGroup; // char abTempNeverLeavesGroup[7]; diff --git a/plugin_sa/game_sa/CPointLights.h b/plugin_sa/game_sa/CPointLights.h index edcf3d735..60fd8172c 100644 --- a/plugin_sa/game_sa/CPointLights.h +++ b/plugin_sa/game_sa/CPointLights.h @@ -33,7 +33,16 @@ class CPointLight { private: char _pad0; }; - +VALIDATE_OFFSET(CPointLight, m_vecPosn, 0x0); +VALIDATE_OFFSET(CPointLight, m_vecDirection, 0xC); +VALIDATE_OFFSET(CPointLight, m_fRange, 0x18); +VALIDATE_OFFSET(CPointLight, m_fColorRed, 0x1C); +VALIDATE_OFFSET(CPointLight, m_fColorGreen, 0x20); +VALIDATE_OFFSET(CPointLight, m_fColorBlue, 0x24); +VALIDATE_OFFSET(CPointLight, m_pEntityToLight, 0x28); +VALIDATE_OFFSET(CPointLight, m_nType, 0x2C); +VALIDATE_OFFSET(CPointLight, m_nFogType, 0x2D); +VALIDATE_OFFSET(CPointLight, m_bGenerateShadows, 0x2E); VALIDATE_SIZE(CPointLight, 0x30); class CPointLights { @@ -59,5 +68,6 @@ class CPointLights { static void AddLight(unsigned char lightType, CVector point, CVector direction, float radius, float red, float green, float blue, unsigned char fogType, bool generateExtraShadows, CEntity* entityAffected); static void RenderFogEffect(); }; +VALIDATE_SIZE(CPointLights, 0x1); extern unsigned int MAX_POINTLIGHTS; // default: 32 \ No newline at end of file diff --git a/plugin_sa/game_sa/CPointList.h b/plugin_sa/game_sa/CPointList.h index a9c6785d7..52f1cbbfe 100644 --- a/plugin_sa/game_sa/CPointList.h +++ b/plugin_sa/game_sa/CPointList.h @@ -17,7 +17,9 @@ class PLUGIN_API CPointList { SUPPORTED_10US void Empty(); }; - +VALIDATE_OFFSET(CPointList, m_nCount, 0x0); +VALIDATE_OFFSET(CPointList, m_avCoords, 0x4); +VALIDATE_OFFSET(CPointList, m_abUsedCoords, 0x124); VALIDATE_SIZE(CPointList, 0x13C); #include "meta/meta.CPointList.h" diff --git a/plugin_sa/game_sa/CPolyBunch.h b/plugin_sa/game_sa/CPolyBunch.h index 0b2096109..595b4c0dd 100644 --- a/plugin_sa/game_sa/CPolyBunch.h +++ b/plugin_sa/game_sa/CPolyBunch.h @@ -17,5 +17,9 @@ class CPolyBunch { char m_aU[7]; char m_aV[7]; }; - +VALIDATE_OFFSET(CPolyBunch, m_avecPosn, 0x0); +VALIDATE_OFFSET(CPolyBunch, m_pNext, 0x54); +VALIDATE_OFFSET(CPolyBunch, m_wNumVerts, 0x58); +VALIDATE_OFFSET(CPolyBunch, m_aU, 0x5A); +VALIDATE_OFFSET(CPolyBunch, m_aV, 0x61); VALIDATE_SIZE(CPolyBunch, 0x68); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPools.h b/plugin_sa/game_sa/CPools.h index bb3c5036b..2965d4730 100644 --- a/plugin_sa/game_sa/CPools.h +++ b/plugin_sa/game_sa/CPools.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPool.h" #include "CCopPed.h" @@ -64,4 +63,5 @@ class CPools { // returns "true" static bool SaveVehiclePool(); static void ShutDown(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPools, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPopCycle.cpp b/plugin_sa/game_sa/CPopCycle.cpp index d9271bb85..05cb2f005 100644 --- a/plugin_sa/game_sa/CPopCycle.cpp +++ b/plugin_sa/game_sa/CPopCycle.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPopCycle.h" diff --git a/plugin_sa/game_sa/CPopCycle.h b/plugin_sa/game_sa/CPopCycle.h index e6231deae..8682c6b07 100644 --- a/plugin_sa/game_sa/CPopCycle.h +++ b/plugin_sa/game_sa/CPopCycle.h @@ -154,4 +154,5 @@ class PLUGIN_API CPopCycle static void UpdateDealerStrengths(); static void UpdatePercentages(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPopCycle, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPopulation.h b/plugin_sa/game_sa/CPopulation.h index befabf3b3..88e092e0d 100644 --- a/plugin_sa/game_sa/CPopulation.h +++ b/plugin_sa/game_sa/CPopulation.h @@ -30,6 +30,10 @@ struct tPedGroupTranslationData { int field_4; int field_8; }; +VALIDATE_OFFSET(tPedGroupTranslationData, pedGroupId, 0x0); +VALIDATE_OFFSET(tPedGroupTranslationData, field_4, 0x4); +VALIDATE_OFFSET(tPedGroupTranslationData, field_8, 0x8); +VALIDATE_SIZE(tPedGroupTranslationData, 0xC); class PLUGIN_API CPopulation { public: @@ -171,4 +175,5 @@ class PLUGIN_API CPopulation { static void ConvertAllObjectsToDummyObjects(); static void PopulateInterior(int numPeds, CVector posn); static void Update(bool generatePeds); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPopulation, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPostEffects.h b/plugin_sa/game_sa/CPostEffects.h index 034d1acb2..67f23206e 100644 --- a/plugin_sa/game_sa/CPostEffects.h +++ b/plugin_sa/game_sa/CPostEffects.h @@ -194,3 +194,4 @@ class CPostEffects { RwTextureFilterMode textureFilter; }; }; +VALIDATE_SIZE(CPostEffects, 0x1); diff --git a/plugin_sa/game_sa/CProjectile.h b/plugin_sa/game_sa/CProjectile.h index bafc56bbe..af478db23 100644 --- a/plugin_sa/game_sa/CProjectile.h +++ b/plugin_sa/game_sa/CProjectile.h @@ -13,5 +13,4 @@ class PLUGIN_API CProjectile : public CObject { public: CProjectile(int index); }; - VALIDATE_SIZE(CProjectile, 0x17C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CProjectileInfo.h b/plugin_sa/game_sa/CProjectileInfo.h index ea18c874e..ca74a8c67 100644 --- a/plugin_sa/game_sa/CProjectileInfo.h +++ b/plugin_sa/game_sa/CProjectileInfo.h @@ -40,6 +40,14 @@ class PLUGIN_API CProjectileInfo { static void RemoveAllProjectiles(); static bool RemoveIfThisIsAProjectile(CObject* object); }; +VALIDATE_OFFSET(CProjectileInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CProjectileInfo, m_pCreator, 0x4); +VALIDATE_OFFSET(CProjectileInfo, m_pVictim, 0x8); +VALIDATE_OFFSET(CProjectileInfo, m_nDestroyTime, 0xC); +VALIDATE_OFFSET(CProjectileInfo, m_bActive, 0x10); +VALIDATE_OFFSET(CProjectileInfo, m_vecLastPosn, 0x14); +VALIDATE_OFFSET(CProjectileInfo, m_pFxSystem, 0x20); +VALIDATE_SIZE(CProjectileInfo, 0x24); extern unsigned int MAX_PROJECTILE_INFOS; // default 32 extern CProjectileInfo *gaProjectileInfo; // CProjectileInfo gaProjectileInfo[MAX_PROJECTILE_INFOS] \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrList.h b/plugin_sa/game_sa/CPtrList.h index efa5ff477..874d6140b 100644 --- a/plugin_sa/game_sa/CPtrList.h +++ b/plugin_sa/game_sa/CPtrList.h @@ -50,5 +50,4 @@ class PLUGIN_API CPtrList { */ }; - -VALIDATE_SIZE(CPtrList, 4); \ No newline at end of file +VALIDATE_SIZE(CPtrList, 0x4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrListDoubleLink.h b/plugin_sa/game_sa/CPtrListDoubleLink.h index 459ecf289..23e8cd4ed 100644 --- a/plugin_sa/game_sa/CPtrListDoubleLink.h +++ b/plugin_sa/game_sa/CPtrListDoubleLink.h @@ -23,5 +23,4 @@ class PLUGIN_API CPtrListDoubleLink : public CPtrList { void AddItem(void* item); void DeleteItem(void* item); }; - -VALIDATE_SIZE(CPtrListDoubleLink, 4); \ No newline at end of file +VALIDATE_SIZE(CPtrListDoubleLink, 0x4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrListSingleLink.h b/plugin_sa/game_sa/CPtrListSingleLink.h index c4e11c915..6b2f785ab 100644 --- a/plugin_sa/game_sa/CPtrListSingleLink.h +++ b/plugin_sa/game_sa/CPtrListSingleLink.h @@ -23,5 +23,4 @@ class PLUGIN_API CPtrListSingleLink : public CPtrList { void AddItem(void* item); void DeleteItem(void* item); }; - -VALIDATE_SIZE(CPtrListSingleLink, 4); \ No newline at end of file +VALIDATE_SIZE(CPtrListSingleLink, 0x4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrNode.h b/plugin_sa/game_sa/CPtrNode.h index 71452f32b..8372b1686 100644 --- a/plugin_sa/game_sa/CPtrNode.h +++ b/plugin_sa/game_sa/CPtrNode.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -14,5 +14,6 @@ class PLUGIN_API CPtrNode { inline CPtrNode(void* item) : m_pVoid(item) {} }; - -VALIDATE_SIZE(CPtrNode, 8); \ No newline at end of file +VALIDATE_OFFSET(CPtrNode, m_pVoid, 0x0); +VALIDATE_OFFSET(CPtrNode, m_pNext, 0x4); +VALIDATE_SIZE(CPtrNode, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrNodeDoubleLink.h b/plugin_sa/game_sa/CPtrNodeDoubleLink.h index 043ba5986..ab95ed5a0 100644 --- a/plugin_sa/game_sa/CPtrNodeDoubleLink.h +++ b/plugin_sa/game_sa/CPtrNodeDoubleLink.h @@ -19,5 +19,7 @@ class PLUGIN_API CPtrNodeDoubleLink { static void* operator new(unsigned int size); static void operator delete(void* data); }; - +VALIDATE_OFFSET(CPtrNodeDoubleLink, pItem, 0x0); +VALIDATE_OFFSET(CPtrNodeDoubleLink, pNext, 0x4); +VALIDATE_OFFSET(CPtrNodeDoubleLink, pPrev, 0x8); VALIDATE_SIZE(CPtrNodeDoubleLink, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CPtrNodeSingleLink.h b/plugin_sa/game_sa/CPtrNodeSingleLink.h index 9e38e3168..f30301e12 100644 --- a/plugin_sa/game_sa/CPtrNodeSingleLink.h +++ b/plugin_sa/game_sa/CPtrNodeSingleLink.h @@ -18,5 +18,6 @@ class PLUGIN_API CPtrNodeSingleLink { static void* operator new(unsigned int size); static void operator delete(void* data); }; - -VALIDATE_SIZE(CPtrNodeSingleLink, 8); \ No newline at end of file +VALIDATE_OFFSET(CPtrNodeSingleLink, pItem, 0x0); +VALIDATE_OFFSET(CPtrNodeSingleLink, pNext, 0x4); +VALIDATE_SIZE(CPtrNodeSingleLink, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CQuadBike.h b/plugin_sa/game_sa/CQuadBike.h index 098caa8c6..74e288d1d 100644 --- a/plugin_sa/game_sa/CQuadBike.h +++ b/plugin_sa/game_sa/CQuadBike.h @@ -51,7 +51,13 @@ class CQuadBike : public CAutomobile { CQuadBike(int modelIndex, unsigned char createdBy); }; - +VALIDATE_OFFSET(CQuadBike, m_pHandling, 0x988); +VALIDATE_OFFSET(CQuadBike, m_rideAnimData, 0x98C); +VALIDATE_OFFSET(CQuadBike, field_9A8, 0x9A8); +VALIDATE_OFFSET(CQuadBike, field_9AC, 0x9AC); +VALIDATE_OFFSET(CQuadBike, field_9B0, 0x9B0); +VALIDATE_OFFSET(CQuadBike, field_9B4, 0x9B4); +VALIDATE_OFFSET(CQuadBike, m_nQuadFlags, 0x9B8); VALIDATE_SIZE(CQuadBike, 0x9BC); extern bool& bDoQuadDamping; // true diff --git a/plugin_sa/game_sa/CQuadTreeNode.h b/plugin_sa/game_sa/CQuadTreeNode.h index 16d69248b..11abb94d7 100644 --- a/plugin_sa/game_sa/CQuadTreeNode.h +++ b/plugin_sa/game_sa/CQuadTreeNode.h @@ -58,5 +58,8 @@ class PLUGIN_API CQuadTreeNode { static void* operator new(unsigned int size); }; - +VALIDATE_OFFSET(CQuadTreeNode, rect, 0x0); +VALIDATE_OFFSET(CQuadTreeNode, itemList, 0x10); +VALIDATE_OFFSET(CQuadTreeNode, childrens, 0x14); +VALIDATE_OFFSET(CQuadTreeNode, level, 0x24); VALIDATE_SIZE(CQuadTreeNode, 0x28); \ No newline at end of file diff --git a/plugin_sa/game_sa/CQuaternion.h b/plugin_sa/game_sa/CQuaternion.h index bb94e765f..1a3200f9b 100644 --- a/plugin_sa/game_sa/CQuaternion.h +++ b/plugin_sa/game_sa/CQuaternion.h @@ -72,5 +72,6 @@ class PLUGIN_API CQuaternion { // Normalises a quat void Normalise(); }; - +VALIDATE_OFFSET(CQuaternion, imag, 0x0); +VALIDATE_OFFSET(CQuaternion, real, 0xC); VALIDATE_SIZE(CQuaternion, 0x10); diff --git a/plugin_sa/game_sa/CQueuedMode.h b/plugin_sa/game_sa/CQueuedMode.h index 9563c78c1..0ed71f310 100644 --- a/plugin_sa/game_sa/CQueuedMode.h +++ b/plugin_sa/game_sa/CQueuedMode.h @@ -15,5 +15,8 @@ class PLUGIN_API CQueuedMode { unsigned short m_nMinZoom; unsigned short m_nMaxZoom; }; - +VALIDATE_OFFSET(CQueuedMode, m_nMode, 0x0); +VALIDATE_OFFSET(CQueuedMode, m_fDuration, 0x4); +VALIDATE_OFFSET(CQueuedMode, m_nMinZoom, 0x8); +VALIDATE_OFFSET(CQueuedMode, m_nMaxZoom, 0xA); VALIDATE_SIZE(CQueuedMode, 0xC); diff --git a/plugin_sa/game_sa/CRadar.h b/plugin_sa/game_sa/CRadar.h index f8b4cb67e..59cecd55b 100644 --- a/plugin_sa/game_sa/CRadar.h +++ b/plugin_sa/game_sa/CRadar.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" #include "CRGBA.h" @@ -129,8 +128,9 @@ struct tBlipHandle { unsigned short arrayIndex; unsigned short number; }; - -VALIDATE_SIZE(tBlipHandle, 4); +VALIDATE_OFFSET(tBlipHandle, arrayIndex, 0x0); +VALIDATE_OFFSET(tBlipHandle, number, 0x2); +VALIDATE_SIZE(tBlipHandle, 0x4); struct airstrip_info { float x; @@ -138,7 +138,10 @@ struct airstrip_info { float direction; // angle float radius; // not sure }; - +VALIDATE_OFFSET(airstrip_info, x, 0x0); +VALIDATE_OFFSET(airstrip_info, y, 0x4); +VALIDATE_OFFSET(airstrip_info, direction, 0x8); +VALIDATE_OFFSET(airstrip_info, radius, 0xC); VALIDATE_SIZE(airstrip_info, 0x10); @@ -161,7 +164,14 @@ struct tRadarTrace { unsigned char m_nBlipDisplay : 2; // see eBlipDisplay unsigned char m_nBlipType : 4; // see eBlipType }; - +VALIDATE_OFFSET(tRadarTrace, m_nColour, 0x0); +VALIDATE_OFFSET(tRadarTrace, m_nEntityHandle, 0x4); +VALIDATE_OFFSET(tRadarTrace, m_vecPos, 0x8); +VALIDATE_OFFSET(tRadarTrace, m_nCounter, 0x14); +VALIDATE_OFFSET(tRadarTrace, m_fSphereRadius, 0x18); +VALIDATE_OFFSET(tRadarTrace, m_nBlipSize, 0x1C); +VALIDATE_OFFSET(tRadarTrace, m_pEntryExit, 0x20); +VALIDATE_OFFSET(tRadarTrace, m_nRadarSprite, 0x24); VALIDATE_SIZE(tRadarTrace, 0x28); extern unsigned int MAX_RADAR_SPRITES; @@ -263,6 +273,7 @@ class CRadar { // Save radar blips to save file static void Save(); }; +VALIDATE_SIZE(CRadar, 0x1); extern airstrip_info *airstrip_table; // airstrip_info airstrip_table[4] diff --git a/plugin_sa/game_sa/CRealTimeShadow.h b/plugin_sa/game_sa/CRealTimeShadow.h index 5fe739ab5..56569e75e 100644 --- a/plugin_sa/game_sa/CRealTimeShadow.h +++ b/plugin_sa/game_sa/CRealTimeShadow.h @@ -43,5 +43,16 @@ class PLUGIN_API CRealTimeShadow { // this updates texture and give it to us RwTexture *Update(); }; - +VALIDATE_OFFSET(CRealTimeShadow, m_pOwner, 0x0); +VALIDATE_OFFSET(CRealTimeShadow, m_bCreated, 0x4); +VALIDATE_OFFSET(CRealTimeShadow, m_nIntensity, 0x5); +VALIDATE_OFFSET(CRealTimeShadow, m_camera, 0x8); +VALIDATE_OFFSET(CRealTimeShadow, m_bBlurred, 0x10); +VALIDATE_OFFSET(CRealTimeShadow, m_blurCamera, 0x14); +VALIDATE_OFFSET(CRealTimeShadow, m_nBlurPasses, 0x1C); +VALIDATE_OFFSET(CRealTimeShadow, m_bDrawMoreBlur, 0x20); +VALIDATE_OFFSET(CRealTimeShadow, m_nRwObjectType, 0x24); +VALIDATE_OFFSET(CRealTimeShadow, m_pLight, 0x28); +VALIDATE_OFFSET(CRealTimeShadow, m_boundingSphere, 0x2C); +VALIDATE_OFFSET(CRealTimeShadow, m_baseSphere, 0x3C); VALIDATE_SIZE(CRealTimeShadow, 0x4C); diff --git a/plugin_sa/game_sa/CRect.h b/plugin_sa/game_sa/CRect.h index a6f56d4f2..b2e029a91 100644 --- a/plugin_sa/game_sa/CRect.h +++ b/plugin_sa/game_sa/CRect.h @@ -53,5 +53,8 @@ class PLUGIN_API CRect top += y; } }; - +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); VALIDATE_SIZE(CRect, 0x10); \ No newline at end of file diff --git a/plugin_sa/game_sa/CReference.h b/plugin_sa/game_sa/CReference.h index 1878aba25..a8934e920 100644 --- a/plugin_sa/game_sa/CReference.h +++ b/plugin_sa/game_sa/CReference.h @@ -15,5 +15,6 @@ class PLUGIN_API CReference class CReference *m_pNext; class CEntity **m_ppEntity; }; - -VALIDATE_SIZE(CReference, 8); \ No newline at end of file +VALIDATE_OFFSET(CReference, m_pNext, 0x0); +VALIDATE_OFFSET(CReference, m_ppEntity, 0x4); +VALIDATE_SIZE(CReference, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CReferences.h b/plugin_sa/game_sa/CReferences.h index c7f3ad8ee..8888c91a3 100644 --- a/plugin_sa/game_sa/CReferences.h +++ b/plugin_sa/game_sa/CReferences.h @@ -23,3 +23,4 @@ class PLUGIN_API CReferences static void RemoveReferencesToPlayer(); static void PruneAllReferencesInWorld(); }; +VALIDATE_SIZE(CReferences, 0x1); diff --git a/plugin_sa/game_sa/CRegisteredCorona.h b/plugin_sa/game_sa/CRegisteredCorona.h index ef5076b25..f83e482f8 100644 --- a/plugin_sa/game_sa/CRegisteredCorona.h +++ b/plugin_sa/game_sa/CRegisteredCorona.h @@ -62,5 +62,20 @@ class CRegisteredCorona { void Update(); }; - +VALIDATE_OFFSET(CRegisteredCorona, m_vPosn, 0x0); +VALIDATE_OFFSET(CRegisteredCorona, m_dwId, 0xC); +VALIDATE_OFFSET(CRegisteredCorona, m_pTexture, 0x10); +VALIDATE_OFFSET(CRegisteredCorona, m_fSize, 0x14); +VALIDATE_OFFSET(CRegisteredCorona, m_fAngle, 0x18); +VALIDATE_OFFSET(CRegisteredCorona, m_fFarClip, 0x1C); +VALIDATE_OFFSET(CRegisteredCorona, m_fNearClip, 0x20); +VALIDATE_OFFSET(CRegisteredCorona, m_fHeightAboveGround, 0x24); +VALIDATE_OFFSET(CRegisteredCorona, m_fFadeSpeed, 0x28); +VALIDATE_OFFSET(CRegisteredCorona, m_Color, 0x2C); +VALIDATE_OFFSET(CRegisteredCorona, m_nFadeState, 0x30); +VALIDATE_OFFSET(CRegisteredCorona, m_bRegisteredThisFrame, 0x31); +VALIDATE_OFFSET(CRegisteredCorona, m_nFlareType, 0x32); +VALIDATE_OFFSET(CRegisteredCorona, m_bUsesReflection, 0x33); +VALIDATE_OFFSET(CRegisteredCorona, m_bJustCreated, 0x35); +VALIDATE_OFFSET(CRegisteredCorona, m_pAttachedTo, 0x38); VALIDATE_SIZE(CRegisteredCorona, 0x3C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CRegisteredMotionBlurStreak.h b/plugin_sa/game_sa/CRegisteredMotionBlurStreak.h index 462cc997c..004f946b3 100644 --- a/plugin_sa/game_sa/CRegisteredMotionBlurStreak.h +++ b/plugin_sa/game_sa/CRegisteredMotionBlurStreak.h @@ -23,5 +23,12 @@ class CRegisteredMotionBlurStreak { void Update(); void Render(); }; - +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_nId, 0x0); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_color, 0x4); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecLeftPoints, 0x8); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecRightPoints, 0x2C); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_bExists, 0x50); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_51, 0x51); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_52, 0x52); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_53, 0x53); VALIDATE_SIZE(CRegisteredMotionBlurStreak, 0x54); \ No newline at end of file diff --git a/plugin_sa/game_sa/CRenderer.h b/plugin_sa/game_sa/CRenderer.h index 1c82c92a7..55c91493f 100644 --- a/plugin_sa/game_sa/CRenderer.h +++ b/plugin_sa/game_sa/CRenderer.h @@ -17,15 +17,20 @@ struct tScanLists { CPtrListDoubleLink *pedsList; CPtrListDoubleLink *dummiesList; }; - +VALIDATE_OFFSET(tScanLists, buildingsList, 0x0); +VALIDATE_OFFSET(tScanLists, objectsList, 0x4); +VALIDATE_OFFSET(tScanLists, vehiclesList, 0x8); +VALIDATE_OFFSET(tScanLists, pedsList, 0xC); +VALIDATE_OFFSET(tScanLists, dummiesList, 0x10); VALIDATE_SIZE(tScanLists, 0x14); struct tRenderListEntry { CEntity *pEntity; float distance; }; - -VALIDATE_SIZE(tRenderListEntry, 8); +VALIDATE_OFFSET(tRenderListEntry, pEntity, 0x0); +VALIDATE_OFFSET(tRenderListEntry, distance, 0x4); +VALIDATE_SIZE(tRenderListEntry, 0x8); extern unsigned int MAX_INVISIBLE_ENTITY_PTRS; // default 150 extern unsigned int MAX_VISIBLE_ENTITY_PTRS; // default 1000 @@ -94,6 +99,7 @@ class PLUGIN_API CRenderer { static void RequestObjectsInDirection(CVector const& posn, float angle, int modelRequesFlags); static void SetupScanLists(int sector_x, int sector_y); }; +VALIDATE_SIZE(CRenderer, 0x1); extern unsigned int &gnRendererModelRequestFlags; extern CEntity **&gpOutEntitiesForGetObjectsInFrustum; \ No newline at end of file diff --git a/plugin_sa/game_sa/CRepeatSector.h b/plugin_sa/game_sa/CRepeatSector.h index be5747835..3b49eed98 100644 --- a/plugin_sa/game_sa/CRepeatSector.h +++ b/plugin_sa/game_sa/CRepeatSector.h @@ -18,5 +18,5 @@ class PLUGIN_API CRepeatSector { public: CPtrListDoubleLink m_lists[3]; }; - +VALIDATE_OFFSET(CRepeatSector, m_lists, 0x0); VALIDATE_SIZE(CRepeatSector, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CReplay.cpp b/plugin_sa/game_sa/CReplay.cpp index d539f374f..84b1c999c 100644 --- a/plugin_sa/game_sa/CReplay.cpp +++ b/plugin_sa/game_sa/CReplay.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CReplay.h" diff --git a/plugin_sa/game_sa/CReplay.h b/plugin_sa/game_sa/CReplay.h index f9bc8fdf2..100ce0479 100644 --- a/plugin_sa/game_sa/CReplay.h +++ b/plugin_sa/game_sa/CReplay.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -11,4 +11,5 @@ class PLUGIN_API CReplay { public: static char &Mode; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CReplay, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CRestart.h b/plugin_sa/game_sa/CRestart.h index fd463702b..0dfdbcb7e 100644 --- a/plugin_sa/game_sa/CRestart.h +++ b/plugin_sa/game_sa/CRestart.h @@ -38,4 +38,5 @@ class PLUGIN_API CRestart static void OverrideNextRestart(CVector const& point, float angle); static void Save(); static void SetRespawnPointForDurationOfMission(CVector point); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CRestart, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CRideAnimData.h b/plugin_sa/game_sa/CRideAnimData.h index 67a90b1c1..c1fb432cc 100644 --- a/plugin_sa/game_sa/CRideAnimData.h +++ b/plugin_sa/game_sa/CRideAnimData.h @@ -18,5 +18,11 @@ class PLUGIN_API CRideAnimData { float m_fHandlebarsAngle; float m_fAnimPercentageState; }; - +VALIDATE_OFFSET(CRideAnimData, m_nAnimGroup, 0x0); +VALIDATE_OFFSET(CRideAnimData, m_fSteerAngle, 0x4); +VALIDATE_OFFSET(CRideAnimData, m_fAnimLean, 0x8); +VALIDATE_OFFSET(CRideAnimData, dwordC, 0xC); +VALIDATE_OFFSET(CRideAnimData, dword10, 0x10); +VALIDATE_OFFSET(CRideAnimData, m_fHandlebarsAngle, 0x14); +VALIDATE_OFFSET(CRideAnimData, m_fAnimPercentageState, 0x18); VALIDATE_SIZE(CRideAnimData, 0x1C); diff --git a/plugin_sa/game_sa/CRoadBlocks.h b/plugin_sa/game_sa/CRoadBlocks.h index 9a814558f..6a3181c70 100644 --- a/plugin_sa/game_sa/CRoadBlocks.h +++ b/plugin_sa/game_sa/CRoadBlocks.h @@ -2,10 +2,9 @@ Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others work! + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVehicle.h" #include "CVector.h" @@ -18,11 +17,21 @@ struct tScriptRoadBlocks { char type; char field_1B; }; +VALIDATE_OFFSET(tScriptRoadBlocks, cornerA, 0x0); +VALIDATE_OFFSET(tScriptRoadBlocks, cornerB, 0xC); +VALIDATE_OFFSET(tScriptRoadBlocks, m_nActive, 0x18); +VALIDATE_OFFSET(tScriptRoadBlocks, m_bIsCreated, 0x19); +VALIDATE_OFFSET(tScriptRoadBlocks, type, 0x1A); +VALIDATE_OFFSET(tScriptRoadBlocks, field_1B, 0x1B); +VALIDATE_SIZE(tScriptRoadBlocks, 0x1C); struct tRoadbloxDat { short areaId; short nodeId; }; +VALIDATE_OFFSET(tRoadbloxDat, areaId, 0x0); +VALIDATE_OFFSET(tRoadbloxDat, nodeId, 0x2); +VALIDATE_SIZE(tRoadbloxDat, 0x4); class PLUGIN_API CRoadBlocks { public: @@ -38,5 +47,6 @@ class PLUGIN_API CRoadBlocks { SUPPORTED_10US_11US static void CreateRoadBlockBetween2Points(CVector *a, CVector *b, byte type); SUPPORTED_10US_11US static void GenerateRoadBlocks(); }; +VALIDATE_SIZE(CRoadBlocks, 0x1); #include "meta/meta.CRoadBlocks.h" diff --git a/plugin_sa/game_sa/CRope.h b/plugin_sa/game_sa/CRope.h index 071b1cc59..bf201a97f 100644 --- a/plugin_sa/game_sa/CRope.h +++ b/plugin_sa/game_sa/CRope.h @@ -38,5 +38,19 @@ class PLUGIN_API CRope { void Update(); void UpdateWeightInRope(CVector a1, float a2, CVector *a3); }; - +VALIDATE_OFFSET(CRope, m_avecRopeSegments, 0x0); +VALIDATE_OFFSET(CRope, m_avecRopeSegmentsReleased, 0x180); +VALIDATE_OFFSET(CRope, m_nId, 0x300); +VALIDATE_OFFSET(CRope, field_304, 0x304); +VALIDATE_OFFSET(CRope, m_fMass, 0x308); +VALIDATE_OFFSET(CRope, m_fRopeTotalLength, 0x30C); +VALIDATE_OFFSET(CRope, m_pRopeHolder, 0x310); +VALIDATE_OFFSET(CRope, m_pRopeAttachObject, 0x314); +VALIDATE_OFFSET(CRope, m_pAttachedEntity, 0x318); +VALIDATE_OFFSET(CRope, m_fRopeSegmentLength, 0x31C); +VALIDATE_OFFSET(CRope, m_nTime, 0x320); +VALIDATE_OFFSET(CRope, m_nNumSegments, 0x324); +VALIDATE_OFFSET(CRope, m_nRopeType, 0x325); +VALIDATE_OFFSET(CRope, m_nFlags1, 0x326); +VALIDATE_OFFSET(CRope, m_nFlags2, 0x327); VALIDATE_SIZE(CRope, 0x328); diff --git a/plugin_sa/game_sa/CRopes.h b/plugin_sa/game_sa/CRopes.h index ec2dbca59..a2d75d230 100644 --- a/plugin_sa/game_sa/CRopes.h +++ b/plugin_sa/game_sa/CRopes.h @@ -32,3 +32,4 @@ class PLUGIN_API CRopes static bool IsCarriedByRope(CEntity* entity); static void SetSpeedOfTopNode(unsigned int ropeId, CVector dirSpeed); }; +VALIDATE_SIZE(CRopes, 0x1); diff --git a/plugin_sa/game_sa/CRunningScript.cpp b/plugin_sa/game_sa/CRunningScript.cpp index 7636085f7..f2a526a7f 100644 --- a/plugin_sa/game_sa/CRunningScript.cpp +++ b/plugin_sa/game_sa/CRunningScript.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CRunningScript.h" diff --git a/plugin_sa/game_sa/CRunningScript.h b/plugin_sa/game_sa/CRunningScript.h index d004a0b58..9c8e913ce 100644 --- a/plugin_sa/game_sa/CRunningScript.h +++ b/plugin_sa/game_sa/CRunningScript.h @@ -190,6 +190,28 @@ class PLUGIN_API CRunningScript { //! Sets instruction pointer, used in GOTO-like commands SUPPORTED_10US void UpdatePC(int newIP); }; +VALIDATE_OFFSET(CRunningScript, m_pNext, 0x0); +VALIDATE_OFFSET(CRunningScript, m_pPrev, 0x4); +VALIDATE_OFFSET(CRunningScript, m_szName, 0x8); +VALIDATE_OFFSET(CRunningScript, m_pBaseIP, 0x10); +VALIDATE_OFFSET(CRunningScript, m_pCurrentIP, 0x14); +VALIDATE_OFFSET(CRunningScript, m_apStack, 0x18); +VALIDATE_OFFSET(CRunningScript, m_nSP, 0x38); +VALIDATE_OFFSET(CRunningScript, m_aLocalVars, 0x3C); +VALIDATE_OFFSET(CRunningScript, m_anTimers, 0xBC); +VALIDATE_OFFSET(CRunningScript, m_bIsActive, 0xC4); +VALIDATE_OFFSET(CRunningScript, m_bCondResult, 0xC5); +VALIDATE_OFFSET(CRunningScript, m_bUseMissionCleanup, 0xC6); +VALIDATE_OFFSET(CRunningScript, m_bIsExternal, 0xC7); +VALIDATE_OFFSET(CRunningScript, m_bTextBlockOverride, 0xC8); +VALIDATE_OFFSET(CRunningScript, m_nWakeTime, 0xCC); +VALIDATE_OFFSET(CRunningScript, m_nLogicalOp, 0xD0); +VALIDATE_OFFSET(CRunningScript, m_bNotFlag, 0xD2); +VALIDATE_OFFSET(CRunningScript, m_bWastedBustedCheck, 0xD3); +VALIDATE_OFFSET(CRunningScript, m_bWastedOrBusted, 0xD4); +VALIDATE_OFFSET(CRunningScript, m_pSceneSkipIP, 0xD8); +VALIDATE_OFFSET(CRunningScript, m_bIsMission, 0xDC); +VALIDATE_SIZE(CRunningScript, 0xE0); #include "meta/meta.CRunningScript.h" diff --git a/plugin_sa/game_sa/CScene.h b/plugin_sa/game_sa/CScene.h index 7eea67577..87cb4dbbb 100644 --- a/plugin_sa/game_sa/CScene.h +++ b/plugin_sa/game_sa/CScene.h @@ -15,7 +15,8 @@ class PLUGIN_API CScene RpWorld *m_pWorld; RwCamera *m_pCamera; }; - +VALIDATE_OFFSET(CScene, m_pWorld, 0x0); +VALIDATE_OFFSET(CScene, m_pCamera, 0x4); VALIDATE_SIZE(CScene, 0x8); extern PLUGIN_API CScene &Scene; \ No newline at end of file diff --git a/plugin_sa/game_sa/CScriptResourceManager.h b/plugin_sa/game_sa/CScriptResourceManager.h index 4ac0c8692..8d25fb3a3 100644 --- a/plugin_sa/game_sa/CScriptResourceManager.h +++ b/plugin_sa/game_sa/CScriptResourceManager.h @@ -33,7 +33,7 @@ class PLUGIN_API CScriptResourceManager { //! see eScriptResourceType SUPPORTED_10US bool RemoveFromResourceManager(int modelID, unsigned int ResourceType, CRunningScript *pScript); }; - -VALIDATE_SIZE(CScriptResourceManager,0x384); +VALIDATE_OFFSET(CScriptResourceManager, m_aScriptResources, 0x0); +VALIDATE_SIZE(CScriptResourceManager, 0x384); #include "meta/meta.CScriptResourceManager.h" diff --git a/plugin_sa/game_sa/CScriptsForBrains.h b/plugin_sa/game_sa/CScriptsForBrains.h index 84a2a761d..6eacd32e9 100644 --- a/plugin_sa/game_sa/CScriptsForBrains.h +++ b/plugin_sa/game_sa/CScriptsForBrains.h @@ -45,5 +45,7 @@ class PLUGIN_API CScriptsForBrains { SUPPORTED_10US void StartOrRequestNewStreamedScriptBrainWithThisName(char const *name, CEntity *pEntity, signed char attachType); SUPPORTED_10US void SwitchAllObjectBrainsWithThisID(signed char ID, bool bStatus); }; +VALIDATE_OFFSET(CScriptsForBrains, m_aScriptForBrains, 0x0); +VALIDATE_SIZE(CScriptsForBrains, 0x578); #include "meta/meta.CScriptsForBrains.h" diff --git a/plugin_sa/game_sa/CSector.h b/plugin_sa/game_sa/CSector.h index c3f13898f..d00f8afc7 100644 --- a/plugin_sa/game_sa/CSector.h +++ b/plugin_sa/game_sa/CSector.h @@ -14,5 +14,6 @@ class PLUGIN_API CSector { CPtrListSingleLink m_buildingList; CPtrListDoubleLink m_dummyList; }; - -VALIDATE_SIZE(CSector, 8); \ No newline at end of file +VALIDATE_OFFSET(CSector, m_buildingList, 0x0); +VALIDATE_OFFSET(CSector, m_dummyList, 0x4); +VALIDATE_SIZE(CSector, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSetPiece.h b/plugin_sa/game_sa/CSetPiece.h index 2ac6bb89d..a4bb404d8 100644 --- a/plugin_sa/game_sa/CSetPiece.h +++ b/plugin_sa/game_sa/CSetPiece.h @@ -70,5 +70,18 @@ class PLUGIN_API CSetPiece { CVehicle* TryToGenerateCopCar(CVector2D posn, CVector2D target); void Update(); }; - +VALIDATE_OFFSET(CSetPiece, m_nLastGenerationTime, 0x0); +VALIDATE_OFFSET(CSetPiece, m_nAreaCornerX1, 0x4); +VALIDATE_OFFSET(CSetPiece, m_nAreaCornerY1, 0x6); +VALIDATE_OFFSET(CSetPiece, m_nAreaCornerX2, 0x8); +VALIDATE_OFFSET(CSetPiece, m_nAreaCornerY2, 0xA); +VALIDATE_OFFSET(CSetPiece, m_nSpawnCoord1X, 0xC); +VALIDATE_OFFSET(CSetPiece, m_nSpawnCoord1Y, 0xE); +VALIDATE_OFFSET(CSetPiece, m_nSpawnCoord2X, 0x10); +VALIDATE_OFFSET(CSetPiece, m_nSpawnCoord2Y, 0x12); +VALIDATE_OFFSET(CSetPiece, m_nTargetCoord1X, 0x14); +VALIDATE_OFFSET(CSetPiece, m_nTargetCoord1Y, 0x16); +VALIDATE_OFFSET(CSetPiece, m_nTargetCoord2X, 0x18); +VALIDATE_OFFSET(CSetPiece, m_nTargetCoord2Y, 0x1A); +VALIDATE_OFFSET(CSetPiece, m_nType, 0x1C); VALIDATE_SIZE(CSetPiece, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSetPieces.h b/plugin_sa/game_sa/CSetPieces.h index 57bd58ff1..c3f635a84 100644 --- a/plugin_sa/game_sa/CSetPieces.h +++ b/plugin_sa/game_sa/CSetPieces.h @@ -22,4 +22,5 @@ class PLUGIN_API CSetPieces { static bool &bDebug; static unsigned int &NumSetPieces; static CSetPiece *aSetPieces; // static CSetPiece aSetPieces[MAX_SET_PIECES] -}; \ No newline at end of file +}; +VALIDATE_SIZE(CSetPieces, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CShadowCamera.h b/plugin_sa/game_sa/CShadowCamera.h index fc44a64dd..bd3858b03 100644 --- a/plugin_sa/game_sa/CShadowCamera.h +++ b/plugin_sa/game_sa/CShadowCamera.h @@ -35,6 +35,9 @@ class PLUGIN_API CShadowCamera void RasterResample(RwRaster *raster); void RasterBlur(RwRaster *raster, int numPasses); }; +VALIDATE_OFFSET(CShadowCamera, m_pRwCamera, 0x0); +VALIDATE_OFFSET(CShadowCamera, m_pRwRenderTexture, 0x4); +VALIDATE_SIZE(CShadowCamera, 0x8); VALIDATE_SIZE(CShadowCamera, 8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CShadows.h b/plugin_sa/game_sa/CShadows.h index 0e1282444..b8f13aeac 100644 --- a/plugin_sa/game_sa/CShadows.h +++ b/plugin_sa/game_sa/CShadows.h @@ -82,7 +82,21 @@ class CRegisteredShadow { unsigned char bDrawOnBuildings : 1; } m_nFlags; }; - +VALIDATE_OFFSET(CRegisteredShadow, m_vecPosn, 0x0); +VALIDATE_OFFSET(CRegisteredShadow, m_fFrontX, 0xC); +VALIDATE_OFFSET(CRegisteredShadow, m_fFrontY, 0x10); +VALIDATE_OFFSET(CRegisteredShadow, m_fSideX, 0x14); +VALIDATE_OFFSET(CRegisteredShadow, m_fSideY, 0x18); +VALIDATE_OFFSET(CRegisteredShadow, m_fZDistance, 0x1C); +VALIDATE_OFFSET(CRegisteredShadow, m_fScale, 0x20); +VALIDATE_OFFSET(CRegisteredShadow, m_pTexture, 0x24); +VALIDATE_OFFSET(CRegisteredShadow, m_pRTShadow, 0x28); +VALIDATE_OFFSET(CRegisteredShadow, m_nIntensity, 0x2C); +VALIDATE_OFFSET(CRegisteredShadow, m_nType, 0x2E); +VALIDATE_OFFSET(CRegisteredShadow, m_nRed, 0x2F); +VALIDATE_OFFSET(CRegisteredShadow, m_nGreen, 0x30); +VALIDATE_OFFSET(CRegisteredShadow, m_nBlue, 0x31); +VALIDATE_OFFSET(CRegisteredShadow, m_nFlags, 0x32); VALIDATE_SIZE(CRegisteredShadow, 0x34); class CPermanentShadow { @@ -108,7 +122,22 @@ class CPermanentShadow { unsigned char bDrawOnBuildings : 1; } m_nFlags; }; - +VALIDATE_OFFSET(CPermanentShadow, m_vecPosn, 0x0); +VALIDATE_OFFSET(CPermanentShadow, m_fFrontX, 0xC); +VALIDATE_OFFSET(CPermanentShadow, m_fFrontY, 0x10); +VALIDATE_OFFSET(CPermanentShadow, m_fSideX, 0x14); +VALIDATE_OFFSET(CPermanentShadow, m_fSideY, 0x18); +VALIDATE_OFFSET(CPermanentShadow, m_fZDistance, 0x1C); +VALIDATE_OFFSET(CPermanentShadow, m_fScale, 0x20); +VALIDATE_OFFSET(CPermanentShadow, m_nTimeCreated, 0x24); +VALIDATE_OFFSET(CPermanentShadow, m_nTimeDuration, 0x28); +VALIDATE_OFFSET(CPermanentShadow, m_pTexture, 0x2C); +VALIDATE_OFFSET(CPermanentShadow, m_nIntensity, 0x30); +VALIDATE_OFFSET(CPermanentShadow, m_nType, 0x32); +VALIDATE_OFFSET(CPermanentShadow, m_nRed, 0x33); +VALIDATE_OFFSET(CPermanentShadow, m_nGreen, 0x34); +VALIDATE_OFFSET(CPermanentShadow, m_nBlue, 0x35); +VALIDATE_OFFSET(CPermanentShadow, m_nFlags, 0x36); VALIDATE_SIZE(CPermanentShadow, 0x38); class CStaticShadow { @@ -145,7 +174,26 @@ class CStaticShadow { void Free(); }; - +VALIDATE_OFFSET(CStaticShadow, m_nId, 0x0); +VALIDATE_OFFSET(CStaticShadow, m_pPolyBunch, 0x4); +VALIDATE_OFFSET(CStaticShadow, m_nTimeCreated, 0x8); +VALIDATE_OFFSET(CStaticShadow, m_vecPosn, 0xC); +VALIDATE_OFFSET(CStaticShadow, m_fFrontX, 0x18); +VALIDATE_OFFSET(CStaticShadow, m_fFrontY, 0x1C); +VALIDATE_OFFSET(CStaticShadow, m_fSideX, 0x20); +VALIDATE_OFFSET(CStaticShadow, m_fSideY, 0x24); +VALIDATE_OFFSET(CStaticShadow, m_fZDistance, 0x28); +VALIDATE_OFFSET(CStaticShadow, m_fScale, 0x2C); +VALIDATE_OFFSET(CStaticShadow, m_pTexture, 0x30); +VALIDATE_OFFSET(CStaticShadow, m_nIntensity, 0x34); +VALIDATE_OFFSET(CStaticShadow, m_nType, 0x36); +VALIDATE_OFFSET(CStaticShadow, m_nRed, 0x37); +VALIDATE_OFFSET(CStaticShadow, m_nGreen, 0x38); +VALIDATE_OFFSET(CStaticShadow, m_nBlue, 0x39); +VALIDATE_OFFSET(CStaticShadow, m_bJustCreated, 0x3A); +VALIDATE_OFFSET(CStaticShadow, m_bRendered, 0x3B); +VALIDATE_OFFSET(CStaticShadow, m_bTemporaryShadow, 0x3C); +VALIDATE_OFFSET(CStaticShadow, m_nDayNightIntensity, 0x3D); VALIDATE_SIZE(CStaticShadow, 0x40); struct _ProjectionParam { @@ -156,7 +204,12 @@ struct _ProjectionParam { RwUInt32 numIm3DBatch; /* Number of buffer flushes */ // unused RwMatrix entityMatrix; }; - +VALIDATE_OFFSET(_ProjectionParam, at, 0x0); +VALIDATE_OFFSET(_ProjectionParam, invMatrix, 0xC); +VALIDATE_OFFSET(_ProjectionParam, shadowValue, 0x4C); +VALIDATE_OFFSET(_ProjectionParam, fade, 0x50); +VALIDATE_OFFSET(_ProjectionParam, numIm3DBatch, 0x54); +VALIDATE_OFFSET(_ProjectionParam, entityMatrix, 0x58); VALIDATE_SIZE(_ProjectionParam, 0x98); class CEntity; @@ -208,6 +261,7 @@ class CShadows { static CStaticShadow *aStaticShadows; // static CStaticShadow aStaticShadows[default: 48] static CPermanentShadow *aPermanentShadows; // static CPermanentShadow aPermanentShadows[default: 48] }; +VALIDATE_SIZE(CShadows, 0x1); #ifdef _MSC_VER RwV3d *ShadowRenderTriangleCB(RwV3d *pNormal, RwV3d *pTrianglePos, _ProjectionParam *param); diff --git a/plugin_sa/game_sa/CShinyTexts.h b/plugin_sa/game_sa/CShinyTexts.h index e22b3b0b1..8a5390f7f 100644 --- a/plugin_sa/game_sa/CShinyTexts.h +++ b/plugin_sa/game_sa/CShinyTexts.h @@ -21,7 +21,16 @@ class CRegisteredShinyText { float m_fDistanceToCamera; RwRGBA m_color; }; - +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAA, 0x0); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAB, 0xC); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBA, 0x18); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBB, 0x24); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAA, 0x30); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAB, 0x38); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBA, 0x40); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBB, 0x48); +VALIDATE_OFFSET(CRegisteredShinyText, m_fDistanceToCamera, 0x50); +VALIDATE_OFFSET(CRegisteredShinyText, m_color, 0x54); VALIDATE_SIZE(CRegisteredShinyText, 0x58); class CShinyTexts { @@ -34,5 +43,6 @@ class CShinyTexts { static void Render(); static void RegisterOne(CVector cornerAA, CVector cornerBA, CVector cornerBB, CVector cornerAB, float u1, float v1, float u2, float v2, float u3, float v3, float u4, float v4, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha, float maxDistance); }; +VALIDATE_SIZE(CShinyTexts, 0x1); extern unsigned int MAX_SHINYTEXTS; // default = 32 \ No newline at end of file diff --git a/plugin_sa/game_sa/CShopping.cpp b/plugin_sa/game_sa/CShopping.cpp index 816f0cc5a..0fccc9ac1 100644 --- a/plugin_sa/game_sa/CShopping.cpp +++ b/plugin_sa/game_sa/CShopping.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) Source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CShopping.h" diff --git a/plugin_sa/game_sa/CShopping.h b/plugin_sa/game_sa/CShopping.h index 17b664290..2bb4aa1a9 100644 --- a/plugin_sa/game_sa/CShopping.h +++ b/plugin_sa/game_sa/CShopping.h @@ -27,24 +27,30 @@ class CShopping { uint32_t key; uint32_t price; }; + VALIDATE_OFFSET(PriceModifier, key, 0x0); + VALIDATE_OFFSET(PriceModifier, price, 0x4); VALIDATE_SIZE(PriceModifier, 0x8); struct ItemPrice { uint32_t key; uint32_t price; - union { + union + { struct { uint32_t ammo; } weapon; + struct { uint32_t modelKey; uint32_t type; // a/k/a textureKey } clothes; + struct { uint32_t type1; uint32_t texKey; } tattoos; + struct { int32_t extra1; int32_t extra2; @@ -53,6 +59,12 @@ class CShopping { char nameTag[8]; }; + VALIDATE_OFFSET(ItemPrice, key, 0x0); + VALIDATE_OFFSET(ItemPrice, price, 0x4); + VALIDATE_OFFSET(ItemPrice, weapon, 0x8); + VALIDATE_OFFSET(ItemPrice, clothes, 0x8); + VALIDATE_OFFSET(ItemPrice, tattoos, 0x8); + VALIDATE_OFFSET(ItemPrice, general, 0x8); VALIDATE_SIZE(ItemPrice, 0x18); struct StatModifiers { @@ -65,4 +77,4 @@ class CShopping { static void Load(); static void Save(); -}; \ No newline at end of file +}; diff --git a/plugin_sa/game_sa/CShotInfo.h b/plugin_sa/game_sa/CShotInfo.h index 0a2054dc3..54a778eef 100644 --- a/plugin_sa/game_sa/CShotInfo.h +++ b/plugin_sa/game_sa/CShotInfo.h @@ -35,7 +35,14 @@ class PLUGIN_API CShotInfo { static bool GetFlameThrowerShotPosn(unsigned char shotId, CVector* outPosn); static void Update(); }; - +VALIDATE_OFFSET(CShotInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CShotInfo, m_vecOrigin, 0x4); +VALIDATE_OFFSET(CShotInfo, m_vecTargetOffset, 0x10); +VALIDATE_OFFSET(CShotInfo, m_fRange, 0x1C); +VALIDATE_OFFSET(CShotInfo, m_pCreator, 0x20); +VALIDATE_OFFSET(CShotInfo, m_nDestroyTime, 0x24); +VALIDATE_OFFSET(CShotInfo, m_bExist, 0x28); +VALIDATE_OFFSET(CShotInfo, m_bExecuted, 0x29); VALIDATE_SIZE(CShotInfo, 0x2C); extern unsigned int MAX_SHOT_INFOS; // default 100 diff --git a/plugin_sa/game_sa/CSimpleTransform.h b/plugin_sa/game_sa/CSimpleTransform.h index 7a73450c2..1a92941ac 100644 --- a/plugin_sa/game_sa/CSimpleTransform.h +++ b/plugin_sa/game_sa/CSimpleTransform.h @@ -20,5 +20,6 @@ class PLUGIN_API CSimpleTransform void Invert(CSimpleTransform const& base); void UpdateMatrix(class CMatrix *out); }; - +VALIDATE_OFFSET(CSimpleTransform, m_vPosn, 0x0); +VALIDATE_OFFSET(CSimpleTransform, m_fHeading, 0xC); VALIDATE_SIZE(CSimpleTransform, 0x10); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSpecialFX.h b/plugin_sa/game_sa/CSpecialFX.h index d1110448e..880374fca 100644 --- a/plugin_sa/game_sa/CSpecialFX.h +++ b/plugin_sa/game_sa/CSpecialFX.h @@ -24,5 +24,6 @@ class CSpecialFX { static void Shutdown(); static void Update(); }; +VALIDATE_SIZE(CSpecialFX, 0x1); extern RwTexture *&gpFinishFlagTex; \ No newline at end of file diff --git a/plugin_sa/game_sa/CSpecialPlateHandler.h b/plugin_sa/game_sa/CSpecialPlateHandler.h index f15d29dcb..7c633a298 100644 --- a/plugin_sa/game_sa/CSpecialPlateHandler.h +++ b/plugin_sa/game_sa/CSpecialPlateHandler.h @@ -12,7 +12,8 @@ struct tCarGenPlateText { int m_nCarGenId; // -1 - empty char m_szPlateText[12]; }; - +VALIDATE_OFFSET(tCarGenPlateText, m_nCarGenId, 0x0); +VALIDATE_OFFSET(tCarGenPlateText, m_szPlateText, 0x4); VALIDATE_SIZE(tCarGenPlateText, 0x10); class CSpecialPlateHandler { @@ -26,5 +27,6 @@ class CSpecialPlateHandler { void Add(int carGenId, char* plateText); void Remove(int plateTextId); }; - +VALIDATE_OFFSET(CSpecialPlateHandler, m_plateTextEntries, 0x0); +VALIDATE_OFFSET(CSpecialPlateHandler, m_nCount, 0xF0); VALIDATE_SIZE(CSpecialPlateHandler, 0xF4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSphere.h b/plugin_sa/game_sa/CSphere.h index 238d3f292..9e0fb7153 100644 --- a/plugin_sa/game_sa/CSphere.h +++ b/plugin_sa/game_sa/CSphere.h @@ -16,5 +16,6 @@ class CSphere { void Set(float radius, CVector const& center); }; - +VALIDATE_OFFSET(CSphere, m_vecCenter, 0x0); +VALIDATE_OFFSET(CSphere, m_fRadius, 0xC); VALIDATE_SIZE(CSphere, 0x10); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSprite.h b/plugin_sa/game_sa/CSprite.h index bc134f202..62799c1be 100644 --- a/plugin_sa/game_sa/CSprite.h +++ b/plugin_sa/game_sa/CSprite.h @@ -20,4 +20,5 @@ class PLUGIN_API CSprite static void RenderBufferedOneXLUSprite_Rotate_2Colours(float x, float y, float z, float w, float h, uint8_t r1, uint8_t g1, uint8_t b1, uint8_t r2, uint8_t g2, uint8_t b2, float cx, float cy, float recipz, float rotation, uint8_t a); static void RenderBufferedOneXLUSprite_Rotate_Aspect(float x, float y, float z, float w, float h, uint8_t r, uint8_t g, uint8_t b, int16_t intens, float recipz, float roll, uint8_t a); static bool CalcScreenCoors(RwV3d const &posn, RwV3d *out, float *w, float *h, bool checkMaxVisible, bool checkMinVisible); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CSprite, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CSprite2d.h b/plugin_sa/game_sa/CSprite2d.h index 93f5bbb7f..63e610637 100644 --- a/plugin_sa/game_sa/CSprite2d.h +++ b/plugin_sa/game_sa/CSprite2d.h @@ -83,5 +83,5 @@ class PLUGIN_API CSprite2d static void DrawBarChart(float x, float y, unsigned short width, unsigned char height, float progress, signed char progressAdd, unsigned char drawPercentage, unsigned char drawBlackBorder, CRGBA color, CRGBA addColor); }; - -VALIDATE_SIZE(CSprite2d, 4); \ No newline at end of file +VALIDATE_OFFSET(CSprite2d, m_pTexture, 0x0); +VALIDATE_SIZE(CSprite2d, 0x4); \ No newline at end of file diff --git a/plugin_sa/game_sa/CStats.h b/plugin_sa/game_sa/CStats.h index a64f15db3..7f75baae1 100644 --- a/plugin_sa/game_sa/CStats.h +++ b/plugin_sa/game_sa/CStats.h @@ -28,7 +28,11 @@ struct tStatMessage { float value; // value stat must reach to display message char text_id[8]; // text id from american.gxt text file to display }; - +VALIDATE_OFFSET(tStatMessage, stat_num, 0x0); +VALIDATE_OFFSET(tStatMessage, displayed, 0x2); +VALIDATE_OFFSET(tStatMessage, condition, 0x3); +VALIDATE_OFFSET(tStatMessage, value, 0x4); +VALIDATE_OFFSET(tStatMessage, text_id, 0x8); VALIDATE_SIZE(tStatMessage, 0x10); class CVehicle; @@ -117,4 +121,5 @@ class CStats { static void ModifyStat(unsigned short stat, float value); static bool Save(); static bool Load(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CStats, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CStoredCollPoly.h b/plugin_sa/game_sa/CStoredCollPoly.h index d0b8e1e6f..e6b9e5b4f 100644 --- a/plugin_sa/game_sa/CStoredCollPoly.h +++ b/plugin_sa/game_sa/CStoredCollPoly.h @@ -15,5 +15,7 @@ class PLUGIN_API CStoredCollPoly { bool m_bIsActual; unsigned int m_nLighting; }; - +VALIDATE_OFFSET(CStoredCollPoly, m_aMeshVertices, 0x0); +VALIDATE_OFFSET(CStoredCollPoly, m_bIsActual, 0x24); +VALIDATE_OFFSET(CStoredCollPoly, m_nLighting, 0x28); VALIDATE_SIZE(CStoredCollPoly, 0x2C); diff --git a/plugin_sa/game_sa/CStreamedScripts.h b/plugin_sa/game_sa/CStreamedScripts.h index d400babb8..df6fb157c 100644 --- a/plugin_sa/game_sa/CStreamedScripts.h +++ b/plugin_sa/game_sa/CStreamedScripts.h @@ -39,6 +39,10 @@ class PLUGIN_API CStreamedScripts { SUPPORTED_10US void RemoveStreamedScriptFromMemory(int index); SUPPORTED_10US CRunningScript *StartNewStreamedScript(int index); }; +VALIDATE_OFFSET(CStreamedScripts, m_aScripts, 0x0); +VALIDATE_OFFSET(CStreamedScripts, m_nLargestExternalSize, 0xA40); +VALIDATE_OFFSET(CStreamedScripts, m_nCountOfScripts, 0xA44); +VALIDATE_OFFSET(CStreamedScripts, field_A46, 0xA46); VALIDATE_SIZE(CStreamedScripts, 0xA48); #include "meta/meta.CStreamedScripts.h" diff --git a/plugin_sa/game_sa/CStreaming.h b/plugin_sa/game_sa/CStreaming.h index 047eecfa7..ce6e068a3 100644 --- a/plugin_sa/game_sa/CStreaming.h +++ b/plugin_sa/game_sa/CStreaming.h @@ -31,6 +31,11 @@ struct tStreamingFileDesc char __pad[3]; int m_StreamHandle; }; +VALIDATE_OFFSET(tStreamingFileDesc, m_szName, 0x0); +VALIDATE_OFFSET(tStreamingFileDesc, bNotPlayerImg, 0x28); +VALIDATE_OFFSET(tStreamingFileDesc, __pad, 0x29); +VALIDATE_OFFSET(tStreamingFileDesc, m_StreamHandle, 0x2C); +VALIDATE_SIZE(tStreamingFileDesc, 0x30); struct tStreamingChannel { @@ -43,6 +48,15 @@ struct tStreamingChannel int field_90; int m_nCdStreamStatus; }; +VALIDATE_OFFSET(tStreamingChannel, modelIds, 0x0); +VALIDATE_OFFSET(tStreamingChannel, field_40, 0x40); +VALIDATE_OFFSET(tStreamingChannel, m_nStreamStatus, 0x80); +VALIDATE_OFFSET(tStreamingChannel, field_84, 0x84); +VALIDATE_OFFSET(tStreamingChannel, field_88, 0x88); +VALIDATE_OFFSET(tStreamingChannel, field_8C, 0x8C); +VALIDATE_OFFSET(tStreamingChannel, field_90, 0x90); +VALIDATE_OFFSET(tStreamingChannel, m_nCdStreamStatus, 0x94); +VALIDATE_SIZE(tStreamingChannel, 0x98); class PLUGIN_API CStreaming { @@ -228,6 +242,7 @@ class PLUGIN_API CStreaming { SUPPORTED_10US static void UpdateForAnimViewer(); SUPPORTED_10US static bool WeAreTryingToPhaseVehicleOut(int modelIndex); }; +VALIDATE_SIZE(CStreaming, 0x1); SUPPORTED_10US extern RwStream &gRwStream; diff --git a/plugin_sa/game_sa/CStreamingInfo.h b/plugin_sa/game_sa/CStreamingInfo.h index ac147956d..bfe934b5d 100644 --- a/plugin_sa/game_sa/CStreamingInfo.h +++ b/plugin_sa/game_sa/CStreamingInfo.h @@ -58,7 +58,14 @@ class PLUGIN_API CStreamingInfo { SUPPORTED_10US void RemoveFromList(); SUPPORTED_10US void SetCdPosnAndSize(unsigned int CdPosn, unsigned int CdSize); }; - +VALIDATE_OFFSET(CStreamingInfo, m_nNextIndex, 0x0); +VALIDATE_OFFSET(CStreamingInfo, m_nPrevIndex, 0x2); +VALIDATE_OFFSET(CStreamingInfo, m_nNextIndexOnCd, 0x4); +VALIDATE_OFFSET(CStreamingInfo, m_nFlags, 0x6); +VALIDATE_OFFSET(CStreamingInfo, m_nImgId, 0x7); +VALIDATE_OFFSET(CStreamingInfo, m_nCdPosn, 0x8); +VALIDATE_OFFSET(CStreamingInfo, m_nCdSize, 0xC); +VALIDATE_OFFSET(CStreamingInfo, m_nLoadState, 0x10); VALIDATE_SIZE(CStreamingInfo, 0x14); #include "meta/meta.CStreamingInfo.h" diff --git a/plugin_sa/game_sa/CStuckCarCheck.h b/plugin_sa/game_sa/CStuckCarCheck.h index c81ed29aa..51a4d37a0 100644 --- a/plugin_sa/game_sa/CStuckCarCheck.h +++ b/plugin_sa/game_sa/CStuckCarCheck.h @@ -38,7 +38,7 @@ class PLUGIN_API CStuckCarCheck { SUPPORTED_10US void RemoveCarFromCheck(int carHandle); SUPPORTED_10US void ResetArrayElement(unsigned short index); }; - +VALIDATE_OFFSET(CStuckCarCheck, m_aStuckCars, 0x0); VALIDATE_SIZE(CStuckCarCheck, 0x240); #include "meta/meta.CStuckCarCheck.h" diff --git a/plugin_sa/game_sa/CStuntJumpManager.cpp b/plugin_sa/game_sa/CStuntJumpManager.cpp index 237ef2b38..84ac8f17f 100644 --- a/plugin_sa/game_sa/CStuntJumpManager.cpp +++ b/plugin_sa/game_sa/CStuntJumpManager.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) Source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CStuntJumpManager.h" diff --git a/plugin_sa/game_sa/CStuntJumpManager.h b/plugin_sa/game_sa/CStuntJumpManager.h index b353bc76d..32956c617 100644 --- a/plugin_sa/game_sa/CStuntJumpManager.h +++ b/plugin_sa/game_sa/CStuntJumpManager.h @@ -25,7 +25,12 @@ struct CStuntJump { bool done; bool found; }; - +VALIDATE_OFFSET(CStuntJump, start, 0x0); +VALIDATE_OFFSET(CStuntJump, end, 0x18); +VALIDATE_OFFSET(CStuntJump, camera, 0x30); +VALIDATE_OFFSET(CStuntJump, reward, 0x3C); +VALIDATE_OFFSET(CStuntJump, done, 0x40); +VALIDATE_OFFSET(CStuntJump, found, 0x41); VALIDATE_SIZE(CStuntJump, 0x44); typedef CPool CStuntJumpsPool; @@ -43,4 +48,5 @@ class CStuntJumpManager { static bool Save(); static bool Load(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CStuntJumpManager, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTagManager.cpp b/plugin_sa/game_sa/CTagManager.cpp index 4a6c33de6..522e1760c 100644 --- a/plugin_sa/game_sa/CTagManager.cpp +++ b/plugin_sa/game_sa/CTagManager.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) Source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTagManager.h" diff --git a/plugin_sa/game_sa/CTagManager.h b/plugin_sa/game_sa/CTagManager.h index 145c41ce9..1f9ee7ab7 100644 --- a/plugin_sa/game_sa/CTagManager.h +++ b/plugin_sa/game_sa/CTagManager.h @@ -16,6 +16,9 @@ struct tTagDesc { CEntity* m_pEntity; uint8_t m_nAlpha; }; +VALIDATE_OFFSET(tTagDesc, m_pEntity, 0x0); +VALIDATE_OFFSET(tTagDesc, m_nAlpha, 0x4); +VALIDATE_SIZE(tTagDesc, 0x8); class CTagManager { public: @@ -28,4 +31,5 @@ class CTagManager { static void Save(); static void Load(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTagManager, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTask.h b/plugin_sa/game_sa/CTask.h index df9990561..0535b1139 100644 --- a/plugin_sa/game_sa/CTask.h +++ b/plugin_sa/game_sa/CTask.h @@ -31,6 +31,5 @@ class PLUGIN_API CTask { virtual void StopTimer(CEvent* event); virtual bool MakeAbortable(CPed* ped, eAbortPriority priority, CEvent* event); }; - VALIDATE_OFFSET(CTask, m_pParentTask, 0x4); VALIDATE_SIZE(CTask, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskComplex.h b/plugin_sa/game_sa/CTaskComplex.h index c09025e7f..ac57b8c11 100644 --- a/plugin_sa/game_sa/CTaskComplex.h +++ b/plugin_sa/game_sa/CTaskComplex.h @@ -24,6 +24,5 @@ class PLUGIN_API CTaskComplex : public CTask { virtual CTask* CreateFirstSubTask(CPed* ped); virtual CTask* ControlSubTask(CPed* ped); }; - VALIDATE_OFFSET(CTaskComplex, m_pSubTask, 0x8); VALIDATE_SIZE(CTaskComplex, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskComplexClimb.cpp b/plugin_sa/game_sa/CTaskComplexClimb.cpp index edfac2f9a..09cb20e60 100644 --- a/plugin_sa/game_sa/CTaskComplexClimb.cpp +++ b/plugin_sa/game_sa/CTaskComplexClimb.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexClimb.h" diff --git a/plugin_sa/game_sa/CTaskComplexClimb.h b/plugin_sa/game_sa/CTaskComplexClimb.h index cd5ac5375..49a2b3950 100644 --- a/plugin_sa/game_sa/CTaskComplexClimb.h +++ b/plugin_sa/game_sa/CTaskComplexClimb.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplexJump.h" @@ -16,6 +15,5 @@ class PLUGIN_API CTaskComplexClimb : public CTaskComplexJump { CTaskComplexClimb(); }; - VALIDATE_SIZE(CTaskComplexClimb, 0x14); diff --git a/plugin_sa/game_sa/CTaskComplexCopInCar.cpp b/plugin_sa/game_sa/CTaskComplexCopInCar.cpp index 2e4bdb2be..4bfec704e 100644 --- a/plugin_sa/game_sa/CTaskComplexCopInCar.cpp +++ b/plugin_sa/game_sa/CTaskComplexCopInCar.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexCopInCar.h" CTaskComplexCopInCar::CTaskComplexCopInCar(CVehicle* pVeh,CPed* pCop1,CPed* pCop2,bool arg3) diff --git a/plugin_sa/game_sa/CTaskComplexCopInCar.h b/plugin_sa/game_sa/CTaskComplexCopInCar.h index b9c6756a8..48cf2ca2e 100644 --- a/plugin_sa/game_sa/CTaskComplexCopInCar.h +++ b/plugin_sa/game_sa/CTaskComplexCopInCar.h @@ -25,6 +25,12 @@ class PLUGIN_API CTaskComplexCopInCar : public CTaskComplex { CTaskComplexCopInCar(CVehicle* pVeh, CPed* pCop1, CPed* pCop2, bool arg3); }; - +VALIDATE_OFFSET(CTaskComplexCopInCar, m_pVehicle, 0xC); +VALIDATE_OFFSET(CTaskComplexCopInCar, m_pCop1, 0x10); +VALIDATE_OFFSET(CTaskComplexCopInCar, m_pCop2, 0x14); +VALIDATE_OFFSET(CTaskComplexCopInCar, m_timer1, 0x18); +VALIDATE_OFFSET(CTaskComplexCopInCar, m_timer2, 0x24); +VALIDATE_OFFSET(CTaskComplexCopInCar, m_nFlags, 0x30); +VALIDATE_OFFSET(CTaskComplexCopInCar, __flags, 0x31); VALIDATE_SIZE(CTaskComplexCopInCar, 0x34); diff --git a/plugin_sa/game_sa/CTaskComplexDie.cpp b/plugin_sa/game_sa/CTaskComplexDie.cpp index d93550d2d..ead7b1628 100644 --- a/plugin_sa/game_sa/CTaskComplexDie.cpp +++ b/plugin_sa/game_sa/CTaskComplexDie.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexDie.h" diff --git a/plugin_sa/game_sa/CTaskComplexDie.h b/plugin_sa/game_sa/CTaskComplexDie.h index b228e482c..c83cb7ad3 100644 --- a/plugin_sa/game_sa/CTaskComplexDie.h +++ b/plugin_sa/game_sa/CTaskComplexDie.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "eWeaponType.h" @@ -39,6 +38,12 @@ class PLUGIN_API CTaskComplexDie : public CTaskComplex { float fBlendDelta, float fAnimSpeed, bool bBeingKilledByStealth, bool bFallingToDeath, int nFallToDeathDir, bool bFallToDeathOverRailing); }; - +VALIDATE_OFFSET(CTaskComplexDie, m_nWeaponType, 0xC); +VALIDATE_OFFSET(CTaskComplexDie, m_animGroup, 0x10); +VALIDATE_OFFSET(CTaskComplexDie, m_animID, 0x14); +VALIDATE_OFFSET(CTaskComplexDie, m_fBlendDelta, 0x18); +VALIDATE_OFFSET(CTaskComplexDie, m_fAnimSpeed, 0x1C); +VALIDATE_OFFSET(CTaskComplexDie, m_nFlags, 0x20); +VALIDATE_OFFSET(CTaskComplexDie, nFallToDeathDir, 0x24); VALIDATE_SIZE(CTaskComplexDie, 0x28); diff --git a/plugin_sa/game_sa/CTaskComplexDriveFireTruck.cpp b/plugin_sa/game_sa/CTaskComplexDriveFireTruck.cpp index c367ed9e8..bb742db33 100644 --- a/plugin_sa/game_sa/CTaskComplexDriveFireTruck.cpp +++ b/plugin_sa/game_sa/CTaskComplexDriveFireTruck.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplex.h" #include "CTaskComplexDriveFireTruck.h" diff --git a/plugin_sa/game_sa/CTaskComplexDriveFireTruck.h b/plugin_sa/game_sa/CTaskComplexDriveFireTruck.h index 72cbe95c1..b867295f5 100644 --- a/plugin_sa/game_sa/CTaskComplexDriveFireTruck.h +++ b/plugin_sa/game_sa/CTaskComplexDriveFireTruck.h @@ -1,10 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! -*/#pragma once - + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ +#pragma once #include "PluginBase.h" #include "CVehicle.h" #include "CTaskComplex.h" @@ -17,3 +17,4 @@ class PLUGIN_API CTaskComplexDriveFireTruck : public CTaskComplex { CTaskComplexDriveFireTruck(CVehicle* pFiretruck, CPed *pFireman, bool isPassenger); }; +VALIDATE_SIZE(CTaskComplexDriveFireTruck, 0xC); diff --git a/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.cpp b/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.cpp index de4c2abd5..e6812f78c 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.cpp +++ b/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexEnterBoatAsDriver.h" CTaskComplexEnterBoatAsDriver::CTaskComplexEnterBoatAsDriver(CVehicle* pTargetVehicle) : CTaskComplex(plugin::dummy) diff --git a/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.h b/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.h index 1b72bb9b2..0781bf405 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.h +++ b/plugin_sa/game_sa/CTaskComplexEnterBoatAsDriver.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CVehicle.h" @@ -19,6 +18,6 @@ class PLUGIN_API CTaskComplexEnterBoatAsDriver : public CTaskComplex { CTaskComplexEnterBoatAsDriver(CVehicle* pTargetVehicle); }; - +VALIDATE_OFFSET(CTaskComplexEnterBoatAsDriver, m_pTargetVehicle, 0xC); VALIDATE_SIZE(CTaskComplexEnterBoatAsDriver, 0x10); diff --git a/plugin_sa/game_sa/CTaskComplexEnterCar.cpp b/plugin_sa/game_sa/CTaskComplexEnterCar.cpp index 45fde3531..0f9fd63b8 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCar.cpp +++ b/plugin_sa/game_sa/CTaskComplexEnterCar.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexEnterCar.h" diff --git a/plugin_sa/game_sa/CTaskComplexEnterCar.h b/plugin_sa/game_sa/CTaskComplexEnterCar.h index 33f52c602..74924a465 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCar.h +++ b/plugin_sa/game_sa/CTaskComplexEnterCar.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CPathFind.h" @@ -68,5 +67,20 @@ class PLUGIN_API CTaskComplexEnterCar : public CTaskComplex { bool bQuitAfterDraggingPedOut, bool bCarryOnAfterFallingOff = false); }; - +VALIDATE_OFFSET(CTaskComplexEnterCar, m_pTargetVehicle, 0xC); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nFlags, 0x10); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nTargetDoor, 0x14); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nTargetDoorOppositeToFlag, 0x18); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nTargetSeat, 0x1C); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nDraggedPedDownTime, 0x20); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nMoveState, 0x24); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nNumGettingInSet, 0x28); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nCamMovementChoice, 0x29); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_vTargetDoorPos, 0x2C); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_pTaskUtilityLineUpPedWithCar, 0x38); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_bIsAborting, 0x3C); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_pDraggedPed, 0x40); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nDoorFlagsSet, 0x44); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_fCruiseSpeed, 0x48); +VALIDATE_OFFSET(CTaskComplexEnterCar, m_nEnterCarStartTime, 0x4C); VALIDATE_SIZE(CTaskComplexEnterCar, 0x50); diff --git a/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.cpp b/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.cpp index b2cf8e2e3..83fdf6aeb 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.cpp +++ b/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexEnterCarAsDriver.h" diff --git a/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.h b/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.h index f9fdc3a64..7b69e17dd 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.h +++ b/plugin_sa/game_sa/CTaskComplexEnterCarAsDriver.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplexEnterCar.h" @@ -17,5 +16,4 @@ class PLUGIN_API CTaskComplexEnterCarAsDriver : public CTaskComplexEnterCar { CTaskComplexEnterCarAsDriver(CVehicle* pTargetVehicle); }; - VALIDATE_SIZE(CTaskComplexEnterCarAsDriver, 0x50); diff --git a/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.cpp b/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.cpp index 6c622073d..c1b4a6544 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.cpp +++ b/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexEnterCarAsPassenger.h" diff --git a/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.h b/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.h index 6cff3a1d8..2bc8e30a6 100644 --- a/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.h +++ b/plugin_sa/game_sa/CTaskComplexEnterCarAsPassenger.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplexEnterCar.h" @@ -17,5 +16,4 @@ class PLUGIN_API CTaskComplexEnterCarAsPassenger : public CTaskComplexEnterCar { CTaskComplexEnterCarAsPassenger(CVehicle* pTargetVehicle, int nTargetSeat, bool bCarryOnAfterFallingOff); }; - VALIDATE_SIZE(CTaskComplexEnterCarAsPassenger, 0x50); diff --git a/plugin_sa/game_sa/CTaskComplexFacial.cpp b/plugin_sa/game_sa/CTaskComplexFacial.cpp index ddab962fa..6c5cb2f9d 100644 --- a/plugin_sa/game_sa/CTaskComplexFacial.cpp +++ b/plugin_sa/game_sa/CTaskComplexFacial.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexFacial.h" CTaskComplexFacial::CTaskComplexFacial() : CTaskComplex(plugin::dummy) diff --git a/plugin_sa/game_sa/CTaskComplexFacial.h b/plugin_sa/game_sa/CTaskComplexFacial.h index e514c8508..d85f21765 100644 --- a/plugin_sa/game_sa/CTaskComplexFacial.h +++ b/plugin_sa/game_sa/CTaskComplexFacial.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CTaskSimpleFacial.h" @@ -24,6 +23,12 @@ class PLUGIN_API CTaskComplexFacial : public CTaskComplex { CTaskComplexFacial(); }; - +VALIDATE_OFFSET(CTaskComplexFacial, m_bNotPlayer, 0xC); +VALIDATE_OFFSET(CTaskComplexFacial, m_bStarted, 0xD); +VALIDATE_OFFSET(CTaskComplexFacial, m_bIsAborting, 0xE); +VALIDATE_OFFSET(CTaskComplexFacial, m_nFacialExpression1, 0x10); +VALIDATE_OFFSET(CTaskComplexFacial, m_nDuration1, 0x14); +VALIDATE_OFFSET(CTaskComplexFacial, m_nFacialExpression2, 0x18); +VALIDATE_OFFSET(CTaskComplexFacial, m_nDuration2, 0x1C); VALIDATE_SIZE(CTaskComplexFacial, 0x20); diff --git a/plugin_sa/game_sa/CTaskComplexJump.cpp b/plugin_sa/game_sa/CTaskComplexJump.cpp index a038dae97..afe799ea3 100644 --- a/plugin_sa/game_sa/CTaskComplexJump.cpp +++ b/plugin_sa/game_sa/CTaskComplexJump.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexJump.h" diff --git a/plugin_sa/game_sa/CTaskComplexJump.h b/plugin_sa/game_sa/CTaskComplexJump.h index bb97e93bf..3105dfd00 100644 --- a/plugin_sa/game_sa/CTaskComplexJump.h +++ b/plugin_sa/game_sa/CTaskComplexJump.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" @@ -19,6 +18,7 @@ class PLUGIN_API CTaskComplexJump : public CTaskComplex { // 0 - jump , 1 - climb CTaskComplexJump(unsigned int jumpType); }; - +VALIDATE_OFFSET(CTaskComplexJump, m_nType, 0xC); +VALIDATE_OFFSET(CTaskComplexJump, bUnkFlag, 0x10); VALIDATE_SIZE(CTaskComplexJump, 0x14); diff --git a/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.cpp b/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.cpp index 2057a1a12..5160c4e64 100644 --- a/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.cpp +++ b/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexKillPedFromBoat.h" CTaskComplexKillPedFromBoat::CTaskComplexKillPedFromBoat(CPed* ped) : CTaskComplex(plugin::dummy) diff --git a/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.h b/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.h index 28a3883f6..9aa198a89 100644 --- a/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.h +++ b/plugin_sa/game_sa/CTaskComplexKillPedFromBoat.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto) header file + Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CPed.h" @@ -18,6 +17,6 @@ class PLUGIN_API CTaskComplexKillPedFromBoat : public CTaskComplex { CTaskComplexKillPedFromBoat(CPed* ped); }; - +VALIDATE_OFFSET(CTaskComplexKillPedFromBoat, pPed, 0xC); VALIDATE_SIZE(CTaskComplexKillPedFromBoat, 0x10); diff --git a/plugin_sa/game_sa/CTaskComplexKillPedOnFoot.h b/plugin_sa/game_sa/CTaskComplexKillPedOnFoot.h index 273597d67..7f264e467 100644 --- a/plugin_sa/game_sa/CTaskComplexKillPedOnFoot.h +++ b/plugin_sa/game_sa/CTaskComplexKillPedOnFoot.h @@ -27,5 +27,13 @@ class PLUGIN_API CTaskComplexKillPedOnFoot : public CTaskComplex { CTaskComplexKillPedOnFoot(CPed *target, int time, int specFlags, int delay, int chance, char a7); }; - +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nFlags, 0xC); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_pTarget, 0x10); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nAttackFlags, 0x14); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nActionDelay, 0x18); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nActionChance, 0x1C); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, field_20, 0x20); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nLaunchTime, 0x24); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_nTime, 0x28); +VALIDATE_OFFSET(CTaskComplexKillPedOnFoot, m_taskTimer, 0x2C); VALIDATE_SIZE(CTaskComplexKillPedOnFoot, 0x38); diff --git a/plugin_sa/game_sa/CTaskComplexLeaveCar.cpp b/plugin_sa/game_sa/CTaskComplexLeaveCar.cpp index 0f07ec79e..08a875c93 100644 --- a/plugin_sa/game_sa/CTaskComplexLeaveCar.cpp +++ b/plugin_sa/game_sa/CTaskComplexLeaveCar.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexLeaveCar.h" CTaskComplexLeaveCar::CTaskComplexLeaveCar(CVehicle* pTargetVehicle, int nTargetDoor, int nDelayTime, bool bSensibleLeaveCar, bool bForceGetOut) : CTaskComplex(plugin::dummy) diff --git a/plugin_sa/game_sa/CTaskComplexLeaveCar.h b/plugin_sa/game_sa/CTaskComplexLeaveCar.h index 2da6d30d3..bd92bb49d 100644 --- a/plugin_sa/game_sa/CTaskComplexLeaveCar.h +++ b/plugin_sa/game_sa/CTaskComplexLeaveCar.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CVehicle.h" @@ -44,6 +43,18 @@ class PLUGIN_API CTaskComplexLeaveCar : public CTaskComplex { CTaskComplexLeaveCar(CVehicle* pTargetVehicle, int nTargetDoor, int nDelayTime, bool bSensibleLeaveCar, bool bForceGetOut); }; - +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_pTargetVehicle, 0xC); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_nTargetDoor, 0x10); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_nDelayTime, 0x14); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_bSensibleLeaveCar, 0x18); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_bForceGetOut, 0x19); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_bDie, 0x1A); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_pTaskUtilityLineUpPedWithCa, 0x1C); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_nDoorFlagsSet, 0x20); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_nNumGettingInSet, 0x21); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_nDieAnimID, 0x24); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_fDieAnimBlendDelta, 0x28); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_fDieAnimSpeed, 0x2C); +VALIDATE_OFFSET(CTaskComplexLeaveCar, m_bIsInAir, 0x30); VALIDATE_SIZE(CTaskComplexLeaveCar, 0x34); diff --git a/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.cpp b/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.cpp index 40f4606c1..e9ea75e14 100644 --- a/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.cpp +++ b/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplex.h" #include "CTaskComplexMedicTreatInjuredPed.h" diff --git a/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.h b/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.h index 8dec57f81..8953959e4 100644 --- a/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.h +++ b/plugin_sa/game_sa/CTaskComplexMedicTreatInjuredPed.h @@ -1,10 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! -*/#pragma once - + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ +#pragma once #include "PluginBase.h" #include "CVehicle.h" #include "CTaskComplex.h" @@ -17,3 +17,4 @@ class PLUGIN_API CTaskComplexMedicTreatInjuredPed : public CTaskComplex { CTaskComplexMedicTreatInjuredPed(CVehicle* pAmbulance, CPed *pMedic, bool isPassenger); }; +VALIDATE_SIZE(CTaskComplexMedicTreatInjuredPed, 0xC); diff --git a/plugin_sa/game_sa/CTaskComplexPlayHandSignalAnim.h b/plugin_sa/game_sa/CTaskComplexPlayHandSignalAnim.h index 2c928d281..018498a9d 100644 --- a/plugin_sa/game_sa/CTaskComplexPlayHandSignalAnim.h +++ b/plugin_sa/game_sa/CTaskComplexPlayHandSignalAnim.h @@ -31,5 +31,8 @@ class PLUGIN_API CTaskComplexPlayHandSignalAnim : public CTaskComplex { CTask* CreateSubTask(int taskType); int GetAnimIdForPed(CPed* ped); }; - +VALIDATE_OFFSET(CTaskComplexPlayHandSignalAnim, m_animationId, 0xC); +VALIDATE_OFFSET(CTaskComplexPlayHandSignalAnim, m_fBlendFactor, 0x10); +VALIDATE_OFFSET(CTaskComplexPlayHandSignalAnim, m_nFlags, 0x14); +VALIDATE_OFFSET(CTaskComplexPlayHandSignalAnim, _pad, 0x15); VALIDATE_SIZE(CTaskComplexPlayHandSignalAnim, 0x18); diff --git a/plugin_sa/game_sa/CTaskComplexProstituteSolicit.h b/plugin_sa/game_sa/CTaskComplexProstituteSolicit.h index bf463d7ce..e03dd4b49 100644 --- a/plugin_sa/game_sa/CTaskComplexProstituteSolicit.h +++ b/plugin_sa/game_sa/CTaskComplexProstituteSolicit.h @@ -44,5 +44,12 @@ class CTaskComplexProstituteSolicit : public CTaskComplex { static void GetRidOfPlayerProstitute(); static bool IsTaskValid(CPed* pProstitute, CPed* pClient); }; - +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_pClient, 0xC); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_vecVehiclePosn, 0x10); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nLastSavedTime, 0x1C); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nNextTimeToCheckForSecludedPlace, 0x20); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nLastPaymentTime, 0x24); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nVehicleMovementTimer, 0x28); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nCurrentTimer, 0x2A); +VALIDATE_OFFSET(CTaskComplexProstituteSolicit, m_nFlags, 0x2C); VALIDATE_SIZE(CTaskComplexProstituteSolicit, 0x30); diff --git a/plugin_sa/game_sa/CTaskComplexSeekEntityMove.h b/plugin_sa/game_sa/CTaskComplexSeekEntityMove.h index 5899195f8..962a79881 100644 --- a/plugin_sa/game_sa/CTaskComplexSeekEntityMove.h +++ b/plugin_sa/game_sa/CTaskComplexSeekEntityMove.h @@ -46,7 +46,6 @@ class PLUGIN_API CTaskComplexSeekEntityMove : public CTaskComplex { bool playTiredAnim, // if timeouted play tired animation bool faceEntityWhenDone); }; - VALIDATE_OFFSET(CTaskComplexSeekEntityMove, m_entity, 0xC); VALIDATE_OFFSET(CTaskComplexSeekEntityMove, m_time, 0x10); VALIDATE_OFFSET(CTaskComplexSeekEntityMove, m_scanInterval, 0x14); diff --git a/plugin_sa/game_sa/CTaskComplexSequence.h b/plugin_sa/game_sa/CTaskComplexSequence.h index b2d35b912..80baaaf32 100644 --- a/plugin_sa/game_sa/CTaskComplexSequence.h +++ b/plugin_sa/game_sa/CTaskComplexSequence.h @@ -16,4 +16,5 @@ class CTaskComplexSequence : public CTaskComplex { CTaskComplexSequence(); ~CTaskComplexSequence(); bool AddTask(CTask *pTask); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTaskComplexSequence, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskComplexStuckInAir.cpp b/plugin_sa/game_sa/CTaskComplexStuckInAir.cpp index d6402fd07..de5b3954c 100644 --- a/plugin_sa/game_sa/CTaskComplexStuckInAir.cpp +++ b/plugin_sa/game_sa/CTaskComplexStuckInAir.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskComplexStuckInAir.h" CTaskComplexStuckInAir::CTaskComplexStuckInAir() : CTaskComplex(plugin::dummy) diff --git a/plugin_sa/game_sa/CTaskComplexStuckInAir.h b/plugin_sa/game_sa/CTaskComplexStuckInAir.h index 43f55afd1..21ac7d1a4 100644 --- a/plugin_sa/game_sa/CTaskComplexStuckInAir.h +++ b/plugin_sa/game_sa/CTaskComplexStuckInAir.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" @@ -17,6 +16,5 @@ class PLUGIN_API CTaskComplexStuckInAir : public CTaskComplex { CTaskComplexStuckInAir(); }; - VALIDATE_SIZE(CTaskComplexStuckInAir, 0xC); diff --git a/plugin_sa/game_sa/CTaskComplexSunbathe.cpp b/plugin_sa/game_sa/CTaskComplexSunbathe.cpp index b04448af4..44f26e0da 100644 --- a/plugin_sa/game_sa/CTaskComplexSunbathe.cpp +++ b/plugin_sa/game_sa/CTaskComplexSunbathe.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexSunbathe.h" diff --git a/plugin_sa/game_sa/CTaskComplexSunbathe.h b/plugin_sa/game_sa/CTaskComplexSunbathe.h index 3c1590d46..ba3ed3814 100644 --- a/plugin_sa/game_sa/CTaskComplexSunbathe.h +++ b/plugin_sa/game_sa/CTaskComplexSunbathe.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CTaskTimer.h" @@ -43,6 +42,17 @@ class PLUGIN_API CTaskComplexSunbathe : public CTaskComplex { CTaskComplexSunbathe(CObject* pTowel, bool bStartStanding); }; - +VALIDATE_OFFSET(CTaskComplexSunbathe, m_bStartStanding, 0xC); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_bBathing, 0xD); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_bBeachAnimsReferenced, 0xE); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_bSunbatheAnimsReferenced, 0xF); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_bAborted, 0x10); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_BathingTimer, 0x14); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_SunbatherType, 0x20); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_pBeachAnimBlock, 0x24); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_pSunbatheAnimBlock, 0x28); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_BeachAnimBlockIndex, 0x2C); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_SunbatheAnimBlockIndex, 0x30); +VALIDATE_OFFSET(CTaskComplexSunbathe, m_pTowel, 0x34); VALIDATE_SIZE(CTaskComplexSunbathe, 0x38); diff --git a/plugin_sa/game_sa/CTaskComplexUseMobilePhone.cpp b/plugin_sa/game_sa/CTaskComplexUseMobilePhone.cpp index 28afbb466..289774d96 100644 --- a/plugin_sa/game_sa/CTaskComplexUseMobilePhone.cpp +++ b/plugin_sa/game_sa/CTaskComplexUseMobilePhone.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskComplexUseMobilePhone.h" diff --git a/plugin_sa/game_sa/CTaskComplexUseMobilePhone.h b/plugin_sa/game_sa/CTaskComplexUseMobilePhone.h index a01916c7c..d26f91947 100644 --- a/plugin_sa/game_sa/CTaskComplexUseMobilePhone.h +++ b/plugin_sa/game_sa/CTaskComplexUseMobilePhone.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskComplex.h" #include "CTaskTimer.h" @@ -21,6 +20,9 @@ class PLUGIN_API CTaskComplexUseMobilePhone : public CTaskComplex { CTaskComplexUseMobilePhone(int nDuration); }; - +VALIDATE_OFFSET(CTaskComplexUseMobilePhone, m_nDuration, 0xC); +VALIDATE_OFFSET(CTaskComplexUseMobilePhone, m_timer, 0x10); +VALIDATE_OFFSET(CTaskComplexUseMobilePhone, m_bIsAborting, 0x1C); +VALIDATE_OFFSET(CTaskComplexUseMobilePhone, m_bQuit, 0x1D); VALIDATE_SIZE(CTaskComplexUseMobilePhone, 0x20); diff --git a/plugin_sa/game_sa/CTaskComplexWander.h b/plugin_sa/game_sa/CTaskComplexWander.h index ad4d6ae1b..7e276615d 100644 --- a/plugin_sa/game_sa/CTaskComplexWander.h +++ b/plugin_sa/game_sa/CTaskComplexWander.h @@ -52,5 +52,11 @@ class PLUGIN_API CTaskComplexWander : public CTaskComplex { CTaskComplexWander(int MoveState, unsigned char Dir, bool bWanderSensibly, float TargetRadius = 0.5f); }; - +VALIDATE_OFFSET(CTaskComplexWander, m_nMoveState, 0xC); +VALIDATE_OFFSET(CTaskComplexWander, m_nDir, 0x10); +VALIDATE_OFFSET(CTaskComplexWander, m_fTargetRadius, 0x14); +VALIDATE_OFFSET(CTaskComplexWander, m_LastNode, 0x18); +VALIDATE_OFFSET(CTaskComplexWander, m_NextNode, 0x1C); +VALIDATE_OFFSET(CTaskComplexWander, m_nLastUpdateDirFrameCount, 0x20); +VALIDATE_OFFSET(CTaskComplexWander, m_nFlags, 0x24); VALIDATE_SIZE(CTaskComplexWander, 0x28); diff --git a/plugin_sa/game_sa/CTaskComplexWanderStandard.h b/plugin_sa/game_sa/CTaskComplexWanderStandard.h index c6fbb2435..251992d31 100644 --- a/plugin_sa/game_sa/CTaskComplexWanderStandard.h +++ b/plugin_sa/game_sa/CTaskComplexWanderStandard.h @@ -19,5 +19,6 @@ class PLUGIN_API CTaskComplexWanderStandard : public CTaskComplexWander { CTaskComplexWanderStandard(int MoveState, unsigned char Dir, bool bWanderSensibly = true); }; - +VALIDATE_OFFSET(CTaskComplexWanderStandard, m_TaskTimer, 0x28); +VALIDATE_OFFSET(CTaskComplexWanderStandard, m_nMinNextScanTime, 0x34); VALIDATE_SIZE(CTaskComplexWanderStandard, 0x38); diff --git a/plugin_sa/game_sa/CTaskManager.h b/plugin_sa/game_sa/CTaskManager.h index 6c2dfdccd..90b20e2db 100644 --- a/plugin_sa/game_sa/CTaskManager.h +++ b/plugin_sa/game_sa/CTaskManager.h @@ -57,5 +57,7 @@ class PLUGIN_API CTaskManager { void ClearTaskEventResponse(); void ManageTasks(); }; - +VALIDATE_OFFSET(CTaskManager, m_aPrimaryTasks, 0x0); +VALIDATE_OFFSET(CTaskManager, m_aSecondaryTasks, 0x14); +VALIDATE_OFFSET(CTaskManager, m_pPed, 0x2C); VALIDATE_SIZE(CTaskManager, 0x30); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimple.h b/plugin_sa/game_sa/CTaskSimple.h index 383f2fbde..f634b0206 100644 --- a/plugin_sa/game_sa/CTaskSimple.h +++ b/plugin_sa/game_sa/CTaskSimple.h @@ -17,5 +17,4 @@ class PLUGIN_API CTaskSimple : public CTask { virtual bool ProcessPed(class CPed *ped);//=0 virtual bool SetPedPosition(class CPed *ped); }; - -VALIDATE_SIZE(CTaskSimple, 8); \ No newline at end of file +VALIDATE_SIZE(CTaskSimple, 0x8); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimpleAnim.h b/plugin_sa/game_sa/CTaskSimpleAnim.h index e46565b17..dd0aa1381 100644 --- a/plugin_sa/game_sa/CTaskSimpleAnim.h +++ b/plugin_sa/game_sa/CTaskSimpleAnim.h @@ -40,5 +40,6 @@ class PLUGIN_API CTaskSimpleAnim : public CTaskSimple { CTaskSimpleAnim(bool bHoldLastFrame); }; - +VALIDATE_OFFSET(CTaskSimpleAnim, m_pAnim, 0x8); +VALIDATE_OFFSET(CTaskSimpleAnim, m_nFlags, 0xC); VALIDATE_SIZE(CTaskSimpleAnim, 0x10); diff --git a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsDriver.h b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsDriver.h index a3c455cf3..7d3de26db 100644 --- a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsDriver.h +++ b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsDriver.h @@ -33,5 +33,11 @@ class PLUGIN_API CTaskSimpleCarSetPedInAsDriver : public CTaskSimple { }; - +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_pAnim, 0xC); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_pTargetVehicle, 0x10); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_pUtility, 0x14); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_bWarpingInToCar, 0x18); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_nDoorFlagsToClear, 0x19); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsDriver, m_nNumGettingInToClear, 0x1A); VALIDATE_SIZE(CTaskSimpleCarSetPedInAsDriver, 0x1C); diff --git a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.cpp b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.cpp index 0722b94ff..c738cabd3 100644 --- a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.cpp +++ b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleCarSetPedInAsPassenger.h" diff --git a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.h b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.h index e48bb6a70..4a959d842 100644 --- a/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.h +++ b/plugin_sa/game_sa/CTaskSimpleCarSetPedInAsPassenger.h @@ -33,6 +33,13 @@ class PLUGIN_API CTaskSimpleCarSetPedInAsPassenger : public CTaskSimple { CTaskSimpleCarSetPedInAsPassenger(CVehicle *pTargetVehicle, int nTargetDoor, CTaskUtilityLineUpPedWithCar *pUtility); }; - +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_pAnim, 0xC); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_pTargetVehicle, 0x10); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_iTargetDoor, 0x14); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_pUtility, 0x18); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_bWarpingInToCar, 0x1C); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_nDoorFlagsToClear, 0x1D); +VALIDATE_OFFSET(CTaskSimpleCarSetPedInAsPassenger, m_nNumGettingInToClear, 0x1E); VALIDATE_SIZE(CTaskSimpleCarSetPedInAsPassenger, 0x20); diff --git a/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.cpp b/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.cpp index a8f0f3aba..6afc73829 100644 --- a/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.cpp +++ b/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleCarSetPedOut.h" diff --git a/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.h b/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.h index 274d0224e..84d403119 100644 --- a/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.h +++ b/plugin_sa/game_sa/CTaskSimpleCarSetPedOut.h @@ -29,6 +29,13 @@ class PLUGIN_API CTaskSimpleCarSetPedOut : public CTaskSimple { CTaskSimpleCarSetPedOut(CVehicle *pTargetVehicle, int nTargetDoor, bool bSwitchOffEngine); }; - +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_pTargetVehicle, 0x8); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_nTargetDoor, 0xC); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_bSwitchOffEngine, 0x10); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_bWarpingOutOfCar, 0x11); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_bFallingOutOfCar, 0x12); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_bKnockedOffBike, 0x13); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_nDoorFlagsToClear, 0x14); +VALIDATE_OFFSET(CTaskSimpleCarSetPedOut, m_nNumGettingInToClear, 0x15); VALIDATE_SIZE(CTaskSimpleCarSetPedOut, 0x18); diff --git a/plugin_sa/game_sa/CTaskSimpleChoking.cpp b/plugin_sa/game_sa/CTaskSimpleChoking.cpp index 073688465..31efb8201 100644 --- a/plugin_sa/game_sa/CTaskSimpleChoking.cpp +++ b/plugin_sa/game_sa/CTaskSimpleChoking.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleChoking.h" diff --git a/plugin_sa/game_sa/CTaskSimpleChoking.h b/plugin_sa/game_sa/CTaskSimpleChoking.h index c5d499c07..2e25fecb0 100644 --- a/plugin_sa/game_sa/CTaskSimpleChoking.h +++ b/plugin_sa/game_sa/CTaskSimpleChoking.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -26,5 +25,10 @@ class PLUGIN_API CTaskSimpleChoking : public CTaskSimple { void UpdateChoke(CPed* pVictim, CPed* pAttacker, bool bIsTeargas); }; - +VALIDATE_OFFSET(CTaskSimpleChoking, m_pAttacker, 0x8); +VALIDATE_OFFSET(CTaskSimpleChoking, m_pAnim, 0xC); +VALIDATE_OFFSET(CTaskSimpleChoking, m_nTimeRemaining, 0x10); +VALIDATE_OFFSET(CTaskSimpleChoking, m_nTimeStarted, 0x14); +VALIDATE_OFFSET(CTaskSimpleChoking, m_bIsTeargas, 0x18); +VALIDATE_OFFSET(CTaskSimpleChoking, m_bIsFinished, 0x19); VALIDATE_SIZE(CTaskSimpleChoking, 0x1C); diff --git a/plugin_sa/game_sa/CTaskSimpleClimb.h b/plugin_sa/game_sa/CTaskSimpleClimb.h index c743b59cd..5584f4f51 100644 --- a/plugin_sa/game_sa/CTaskSimpleClimb.h +++ b/plugin_sa/game_sa/CTaskSimpleClimb.h @@ -43,5 +43,18 @@ class PLUGIN_API CTaskSimpleClimb : public CTaskSimple { CTaskSimpleClimb(CEntity *pClimbEnt, const CVector &vecTarget, float fHeading, unsigned char nSurfaceType, eClimbHeights nHeight, bool bForceClimb); }; - +VALIDATE_OFFSET(CTaskSimpleClimb, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleClimb, m_bChangeAnimation, 0x9); +VALIDATE_OFFSET(CTaskSimpleClimb, m_bChangePosition, 0xA); +VALIDATE_OFFSET(CTaskSimpleClimb, m_bForceClimb, 0xB); +VALIDATE_OFFSET(CTaskSimpleClimb, m_bInvalidClimb, 0xC); +VALIDATE_OFFSET(CTaskSimpleClimb, m_nHeightForAnim, 0xD); +VALIDATE_OFFSET(CTaskSimpleClimb, m_nHeightForPos, 0xE); +VALIDATE_OFFSET(CTaskSimpleClimb, m_nSurfaceType, 0xF); +VALIDATE_OFFSET(CTaskSimpleClimb, m_nFallAfterVault, 0x10); +VALIDATE_OFFSET(CTaskSimpleClimb, m_fHandholdHeading, 0x14); +VALIDATE_OFFSET(CTaskSimpleClimb, m_vecHandholdPos, 0x18); +VALIDATE_OFFSET(CTaskSimpleClimb, m_pClimbEnt, 0x24); +VALIDATE_OFFSET(CTaskSimpleClimb, m_nGetToPosCounter, 0x28); +VALIDATE_OFFSET(CTaskSimpleClimb, m_pAnim, 0x2C); VALIDATE_SIZE(CTaskSimpleClimb, 0x30); diff --git a/plugin_sa/game_sa/CTaskSimpleDuck.h b/plugin_sa/game_sa/CTaskSimpleDuck.h index 1e65318e6..9f690ecd7 100644 --- a/plugin_sa/game_sa/CTaskSimpleDuck.h +++ b/plugin_sa/game_sa/CTaskSimpleDuck.h @@ -43,5 +43,16 @@ class PLUGIN_API CTaskSimpleDuck : public CTaskSimple { CTaskSimpleDuck(eDuckControlTypes DuckControlType, unsigned short nLengthOfDuck, short nUseShotsWhizzingEvents = -1); }; - +VALIDATE_OFFSET(CTaskSimpleDuck, m_nStartTime, 0x8); +VALIDATE_OFFSET(CTaskSimpleDuck, m_nLengthOfDuck, 0xC); +VALIDATE_OFFSET(CTaskSimpleDuck, m_nShotWhizzingCounter, 0xE); +VALIDATE_OFFSET(CTaskSimpleDuck, m_pDuckAnim, 0x10); +VALIDATE_OFFSET(CTaskSimpleDuck, m_pMoveAnim, 0x14); +VALIDATE_OFFSET(CTaskSimpleDuck, m_bIsFinished, 0x18); +VALIDATE_OFFSET(CTaskSimpleDuck, m_bIsAborting, 0x19); +VALIDATE_OFFSET(CTaskSimpleDuck, m_bNeedToSetDuckFlag, 0x1A); +VALIDATE_OFFSET(CTaskSimpleDuck, m_bIsInControl, 0x1B); +VALIDATE_OFFSET(CTaskSimpleDuck, m_vecMoveCommand, 0x1C); +VALIDATE_OFFSET(CTaskSimpleDuck, m_nDuckControlType, 0x24); +VALIDATE_OFFSET(CTaskSimpleDuck, m_nCountDownFrames, 0x25); VALIDATE_SIZE(CTaskSimpleDuck, 0x28); diff --git a/plugin_sa/game_sa/CTaskSimpleDuckToggle.h b/plugin_sa/game_sa/CTaskSimpleDuckToggle.h index cc2a67bdf..bf6714a1d 100644 --- a/plugin_sa/game_sa/CTaskSimpleDuckToggle.h +++ b/plugin_sa/game_sa/CTaskSimpleDuckToggle.h @@ -21,5 +21,5 @@ class PLUGIN_API CTaskSimpleDuckToggle : public CTaskSimple { CTaskSimpleDuckToggle(int toggleType); }; - +VALIDATE_OFFSET(CTaskSimpleDuckToggle, m_nToggleType, 0x8); VALIDATE_SIZE(CTaskSimpleDuckToggle, 0xC); diff --git a/plugin_sa/game_sa/CTaskSimpleFacial.cpp b/plugin_sa/game_sa/CTaskSimpleFacial.cpp index 906b7416f..6a5d040ea 100644 --- a/plugin_sa/game_sa/CTaskSimpleFacial.cpp +++ b/plugin_sa/game_sa/CTaskSimpleFacial.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleFacial.h" diff --git a/plugin_sa/game_sa/CTaskSimpleFacial.h b/plugin_sa/game_sa/CTaskSimpleFacial.h index 883878f20..70e94cb7b 100644 --- a/plugin_sa/game_sa/CTaskSimpleFacial.h +++ b/plugin_sa/game_sa/CTaskSimpleFacial.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CTaskTimer.h" @@ -30,5 +29,7 @@ class PLUGIN_API CTaskSimpleFacial : public CTaskSimple { CTaskSimpleFacial(eFacialExpression nFacialExpress,int nDuration); }; - +VALIDATE_OFFSET(CTaskSimpleFacial, m_Timer, 0x8); +VALIDATE_OFFSET(CTaskSimpleFacial, m_nFacialExpression, 0x14); +VALIDATE_OFFSET(CTaskSimpleFacial, m_nDuration, 0x18); VALIDATE_SIZE(CTaskSimpleFacial, 0x1C); diff --git a/plugin_sa/game_sa/CTaskSimpleFight.h b/plugin_sa/game_sa/CTaskSimpleFight.h index 12b9c9907..3549049d0 100644 --- a/plugin_sa/game_sa/CTaskSimpleFight.h +++ b/plugin_sa/game_sa/CTaskSimpleFight.h @@ -45,5 +45,19 @@ class PLUGIN_API CTaskSimpleFight : public CTaskSimple { CTaskSimpleFight(CEntity *pTargetEntity, int nCommand, unsigned int nIdlePeriod = 10000); }; - +VALIDATE_OFFSET(CTaskSimpleFight, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleFight, m_bIsInControl, 0x9); +VALIDATE_OFFSET(CTaskSimpleFight, m_bAnimsReferenced, 0xA); +VALIDATE_OFFSET(CTaskSimpleFight, m_nRequiredAnimGroup, 0xC); +VALIDATE_OFFSET(CTaskSimpleFight, m_nIdlePeriod, 0x10); +VALIDATE_OFFSET(CTaskSimpleFight, m_nIdleCounter, 0x12); +VALIDATE_OFFSET(CTaskSimpleFight, m_nContinueStrike, 0x14); +VALIDATE_OFFSET(CTaskSimpleFight, m_nChainCounter, 0x15); +VALIDATE_OFFSET(CTaskSimpleFight, m_pTargetEntity, 0x18); +VALIDATE_OFFSET(CTaskSimpleFight, m_pAnim, 0x1C); +VALIDATE_OFFSET(CTaskSimpleFight, m_pIdleAnim, 0x20); +VALIDATE_OFFSET(CTaskSimpleFight, m_nComboSet, 0x24); +VALIDATE_OFFSET(CTaskSimpleFight, m_nCurrentMove, 0x25); +VALIDATE_OFFSET(CTaskSimpleFight, m_nNextCommand, 0x26); +VALIDATE_OFFSET(CTaskSimpleFight, m_nLastCommand, 0x27); VALIDATE_SIZE(CTaskSimpleFight, 0x28); diff --git a/plugin_sa/game_sa/CTaskSimpleGangDriveBy.cpp b/plugin_sa/game_sa/CTaskSimpleGangDriveBy.cpp index 8176f4b55..0f78b0917 100644 --- a/plugin_sa/game_sa/CTaskSimpleGangDriveBy.cpp +++ b/plugin_sa/game_sa/CTaskSimpleGangDriveBy.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleGangDriveBy.h" diff --git a/plugin_sa/game_sa/CTaskSimpleGangDriveBy.h b/plugin_sa/game_sa/CTaskSimpleGangDriveBy.h index cc79fc615..3f6a886c0 100644 --- a/plugin_sa/game_sa/CTaskSimpleGangDriveBy.h +++ b/plugin_sa/game_sa/CTaskSimpleGangDriveBy.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -51,6 +50,28 @@ class PLUGIN_API CTaskSimpleGangDriveBy : public CTaskSimple { CTaskSimpleGangDriveBy(CEntity *pTargetEntity, const CVector *pVecTarget, float fAbortRange, char FrequencyPercentage, char nDrivebyStyle, bool bSeatRHS); }; - +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bAnimsReferenced, 0x9); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bSeatRHS, 0xA); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bInRangeToShoot, 0xB); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bInWeaponRange, 0xC); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bReachedAbortRange, 0xD); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_bFromScriptCommand, 0xE); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nNextCommand, 0xF); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nLastCommand, 0x10); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nBurstShots, 0x11); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nDrivebyStyle, 0x12); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nFrequencyPercentage, 0x13); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nFakeShootDirn, 0x14); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nAttackTimer, 0x16); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nLOSCheckTime, 0x18); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nLOSBlocked, 0x1C); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_fAbortRange, 0x20); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nRequiredAnimID, 0x24); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_nRequiredAnimGroup, 0x28); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_pAnim, 0x2C); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_pWeaponInfo, 0x30); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_pTargetEntity, 0x34); +VALIDATE_OFFSET(CTaskSimpleGangDriveBy, m_vecCoords, 0x38); VALIDATE_SIZE(CTaskSimpleGangDriveBy, 0x44); diff --git a/plugin_sa/game_sa/CTaskSimpleHoldEntity.h b/plugin_sa/game_sa/CTaskSimpleHoldEntity.h index 8aa997e51..19c95f0bd 100644 --- a/plugin_sa/game_sa/CTaskSimpleHoldEntity.h +++ b/plugin_sa/game_sa/CTaskSimpleHoldEntity.h @@ -39,5 +39,20 @@ class PLUGIN_API CTaskSimpleHoldEntity : public CTaskSimple { CAnimBlendAssociation* m_pAnimBlendAssociation; }; - +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_pEntityToHold, 0x8); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_vecPosition, 0xC); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_nBoneFrameId, 0x18); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_bBoneFlags, 0x19); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, field_1A, 0x1A); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_fRotation, 0x1C); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_nAnimId, 0x20); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_nAnimGroupId, 0x24); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_animFlags, 0x28); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_pAnimBlock, 0x2C); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_pAnimBlendHierarchy, 0x30); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_bEntityDropped, 0x34); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_bEntityRequiresProcessing, 0x35); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_bDisallowDroppingOnAnimEnd, 0x36); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, field_37, 0x37); +VALIDATE_OFFSET(CTaskSimpleHoldEntity, m_pAnimBlendAssociation, 0x38); VALIDATE_SIZE(CTaskSimpleHoldEntity, 0x3C); diff --git a/plugin_sa/game_sa/CTaskSimpleIKChain.cpp b/plugin_sa/game_sa/CTaskSimpleIKChain.cpp index abf291252..b3de1bebc 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKChain.cpp +++ b/plugin_sa/game_sa/CTaskSimpleIKChain.cpp @@ -1,10 +1,9 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ - #include "CTaskSimpleIKChain.h" CTaskSimpleIKChain::CTaskSimpleIKChain(char* _IGNORED_ idString , int effectorBoneTag, RwV3d effectorVec, int pivotBoneTag, diff --git a/plugin_sa/game_sa/CTaskSimpleIKChain.h b/plugin_sa/game_sa/CTaskSimpleIKChain.h index bb8cdb9b7..01fd91a69 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKChain.h +++ b/plugin_sa/game_sa/CTaskSimpleIKChain.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -44,5 +43,21 @@ class PLUGIN_API CTaskSimpleIKChain : public CTaskSimple { CTaskSimpleIKChain(char* _IGNORED_ idString ,int effectorBoneTag,RwV3d effectorVec,int pivotBoneTag, CEntity* pEntity,int offsetBoneTag, RwV3d offsetPos,float speed,int time,int blendTime); }; - +VALIDATE_OFFSET(CTaskSimpleIKChain, m_time, 0x8); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_blendTime, 0xC); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_pIKChain, 0x10); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_slotID, 0x14); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_pivotBoneTag, 0x16); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_effectorBoneTag, 0x18); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_effectorVec, 0x1C); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_pEntity, 0x28); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_offsetBoneTag, 0x2C); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_offsetPos, 0x30); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_speed, 0x3C); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_bEntityExist, 0x40); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_blend, 0x44); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_endTime, 0x48); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_targetBlend, 0x4C); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_targetTime, 0x50); +VALIDATE_OFFSET(CTaskSimpleIKChain, m_isBlendingOut, 0x54); VALIDATE_SIZE(CTaskSimpleIKChain, 0x58); diff --git a/plugin_sa/game_sa/CTaskSimpleIKLookAt.cpp b/plugin_sa/game_sa/CTaskSimpleIKLookAt.cpp index 86def4b5e..dfe73418e 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKLookAt.cpp +++ b/plugin_sa/game_sa/CTaskSimpleIKLookAt.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleIKLookAt.h" diff --git a/plugin_sa/game_sa/CTaskSimpleIKLookAt.h b/plugin_sa/game_sa/CTaskSimpleIKLookAt.h index 26bcb1c89..662cf07c7 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKLookAt.h +++ b/plugin_sa/game_sa/CTaskSimpleIKLookAt.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -22,5 +21,6 @@ class PLUGIN_API CTaskSimpleIKLookAt : public CTaskSimpleIKChain { CTaskSimpleIKLookAt(char* idString _IGNORED_ ,CEntity* pEntity,int time,int offsetBoneTag, RwV3d offsetPos, bool bUseTorso,float speed,int blendTime,int m_priority); }; - +VALIDATE_OFFSET(CTaskSimpleIKLookAt, m_bUseTorso, 0x58); +VALIDATE_OFFSET(CTaskSimpleIKLookAt, m_priority, 0x59); VALIDATE_SIZE(CTaskSimpleIKLookAt, 0x5C); diff --git a/plugin_sa/game_sa/CTaskSimpleIKManager.cpp b/plugin_sa/game_sa/CTaskSimpleIKManager.cpp index 38e3d9d59..4d8ce12d9 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKManager.cpp +++ b/plugin_sa/game_sa/CTaskSimpleIKManager.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleIKManager.h" diff --git a/plugin_sa/game_sa/CTaskSimpleIKManager.h b/plugin_sa/game_sa/CTaskSimpleIKManager.h index 114c4b807..bd6d61763 100644 --- a/plugin_sa/game_sa/CTaskSimpleIKManager.h +++ b/plugin_sa/game_sa/CTaskSimpleIKManager.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimpleIKChain.h" @@ -22,5 +21,6 @@ class PLUGIN_API CTaskSimpleIKManager : public CTaskSimple { CTaskSimpleIKManager(); }; - +VALIDATE_OFFSET(CTaskSimpleIKManager, m_pIKChainTasks, 0x8); +VALIDATE_OFFSET(CTaskSimpleIKManager, m_bAborting, 0x18); VALIDATE_SIZE(CTaskSimpleIKManager, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimpleInAir.h b/plugin_sa/game_sa/CTaskSimpleInAir.h index 9d271897f..175372c8d 100644 --- a/plugin_sa/game_sa/CTaskSimpleInAir.h +++ b/plugin_sa/game_sa/CTaskSimpleInAir.h @@ -39,5 +39,15 @@ class PLUGIN_API CTaskSimpleInAir : public CTaskSimple { CTaskSimpleInAir(bool bUsingJumpGlide, bool bUsingFallGlide, bool bUsingClimbJump); }; - +VALIDATE_OFFSET(CTaskSimpleInAir, m_vecPosn, 0x8); +VALIDATE_OFFSET(CTaskSimpleInAir, m_fAngle, 0x14); +VALIDATE_OFFSET(CTaskSimpleInAir, m_nSurfaceType, 0x18); +VALIDATE_OFFSET(CTaskSimpleInAir, _pad, 0x19); +VALIDATE_OFFSET(CTaskSimpleInAir, m_pAnim, 0x1C); +VALIDATE_OFFSET(CTaskSimpleInAir, m_fHeight, 0x20); +VALIDATE_OFFSET(CTaskSimpleInAir, m_nFlags, 0x24); +VALIDATE_OFFSET(CTaskSimpleInAir, _pad2, 0x25); +VALIDATE_OFFSET(CTaskSimpleInAir, m_nProcessCounter, 0x28); +VALIDATE_OFFSET(CTaskSimpleInAir, m_timer, 0x2C); +VALIDATE_OFFSET(CTaskSimpleInAir, m_pEntity, 0x38); VALIDATE_SIZE(CTaskSimpleInAir, 0x3C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimpleJetpack.h b/plugin_sa/game_sa/CTaskSimpleJetpack.h index b3c7ad6da..2aff5c79d 100644 --- a/plugin_sa/game_sa/CTaskSimpleJetpack.h +++ b/plugin_sa/game_sa/CTaskSimpleJetpack.h @@ -67,6 +67,34 @@ class PLUGIN_API CTaskSimpleJetPack : public CTaskSimple CTaskSimpleJetPack(const CVector *pVecTargetPos = NULL, float fCruiseHeight = 10.0f, int nHoverTime = 0); }; +VALIDATE_OFFSET(CTaskSimpleJetPack, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_bAddedIdleAnim, 0x9); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_bAnimsReferenced, 0xA); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_bAttackButtonPressed, 0xB); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_bSwitchedWeapons, 0xC); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_nThrustStop, 0xD); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_nThrustFwd, 0xE); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fThrustStrafe, 0x10); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fThrustAngle, 0x14); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegSwingFwd, 0x18); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegSwingSide, 0x1C); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegTwist, 0x20); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegSwingFwdSpeed, 0x24); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegSwingSideSpeed, 0x28); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fLegTwistSpeed, 0x2C); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_vecOldSpeed, 0x30); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fOldHeading, 0x3C); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_pJetPackClump, 0x40); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_pAnim, 0x44); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_vecTargetPos, 0x48); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fCruiseHeight, 0x54); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_nHoverTime, 0x58); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_nStartHover, 0x5C); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_pTargetEnt, 0x60); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_pFxSysL, 0x64); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_pFxSysR, 0x68); +VALIDATE_OFFSET(CTaskSimpleJetPack, m_fxKeyTime, 0x6C); +VALIDATE_SIZE(CTaskSimpleJetPack, 0x70); extern CVector &JETPACK_POS_OFFSET; // { 0.1, 0.08, 0.0 } extern CVector &JETPACK_ROT_AXIS; // { 0.0, 1.0, 0.0 } diff --git a/plugin_sa/game_sa/CTaskSimpleJump.h b/plugin_sa/game_sa/CTaskSimpleJump.h index 92d99e35b..a65bb2c04 100644 --- a/plugin_sa/game_sa/CTaskSimpleJump.h +++ b/plugin_sa/game_sa/CTaskSimpleJump.h @@ -36,5 +36,15 @@ class PLUGIN_API CTaskSimpleJump : public CTaskSimple { CTaskSimpleJump(bool bIsClimb); }; - +VALIDATE_OFFSET(CTaskSimpleJump, m_vecPosn, 0x8); +VALIDATE_OFFSET(CTaskSimpleJump, m_fAngle, 0x14); +VALIDATE_OFFSET(CTaskSimpleJump, m_nSurfaceType, 0x18); +VALIDATE_OFFSET(CTaskSimpleJump, m_pEntity, 0x1C); +VALIDATE_OFFSET(CTaskSimpleJump, m_bIsFinished, 0x20); +VALIDATE_OFFSET(CTaskSimpleJump, bHitHisHead, 0x21); +VALIDATE_OFFSET(CTaskSimpleJump, m_bIsBlockedByEntity, 0x22); +VALIDATE_OFFSET(CTaskSimpleJump, m_bStartedLaunchAnim, 0x23); +VALIDATE_OFFSET(CTaskSimpleJump, m_bIsClimb, 0x24); +VALIDATE_OFFSET(CTaskSimpleJump, m_bIsInPlayersGroup, 0x25); +VALIDATE_OFFSET(CTaskSimpleJump, m_pAnimBlendAssoc, 0x28); VALIDATE_SIZE(CTaskSimpleJump, 0x2C); diff --git a/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.cpp b/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.cpp index 0ce0c3563..28e170fcb 100644 --- a/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.cpp +++ b/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimplePlayerOnFoot.h" diff --git a/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.h b/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.h index d1785aac5..b7c1a0ebc 100644 --- a/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.h +++ b/plugin_sa/game_sa/CTaskSimplePlayerOnFoot.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -24,5 +23,9 @@ class PLUGIN_API CTaskSimplePlayerOnFoot : public CTaskSimple { CTaskSimplePlayerOnFoot(); }; - +VALIDATE_OFFSET(CTaskSimplePlayerOnFoot, m_nAnimationBlockIndex, 0x8); +VALIDATE_OFFSET(CTaskSimplePlayerOnFoot, m_nFrameCounter, 0xC); +VALIDATE_OFFSET(CTaskSimplePlayerOnFoot, m_nTimer, 0x10); +VALIDATE_OFFSET(CTaskSimplePlayerOnFoot, dword_14, 0x14); +VALIDATE_OFFSET(CTaskSimplePlayerOnFoot, dword_18, 0x18); VALIDATE_SIZE(CTaskSimplePlayerOnFoot, 0x1C); diff --git a/plugin_sa/game_sa/CTaskSimpleRunAnim.cpp b/plugin_sa/game_sa/CTaskSimpleRunAnim.cpp index 2808ca956..d90e8aed0 100644 --- a/plugin_sa/game_sa/CTaskSimpleRunAnim.cpp +++ b/plugin_sa/game_sa/CTaskSimpleRunAnim.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleRunAnim.h" diff --git a/plugin_sa/game_sa/CTaskSimpleRunAnim.h b/plugin_sa/game_sa/CTaskSimpleRunAnim.h index c10ba2ea4..c7676711a 100644 --- a/plugin_sa/game_sa/CTaskSimpleRunAnim.h +++ b/plugin_sa/game_sa/CTaskSimpleRunAnim.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimpleAnim.h" #include "CAnimBlendAssociation.h" @@ -28,5 +27,8 @@ class PLUGIN_API CTaskSimpleRunAnim : public CTaskSimpleAnim { char* pTaskName _IGNORED_, bool bHoldLastFrame); }; - +VALIDATE_OFFSET(CTaskSimpleRunAnim, m_nAnimGroup, 0x10); +VALIDATE_OFFSET(CTaskSimpleRunAnim, m_nAnimId, 0x14); +VALIDATE_OFFSET(CTaskSimpleRunAnim, m_fBlendDelta, 0x18); +VALIDATE_OFFSET(CTaskSimpleRunAnim, m_nTaskType, 0x1C); VALIDATE_SIZE(CTaskSimpleRunAnim, 0x20); diff --git a/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.cpp b/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.cpp index 3fcc2651d..e80000b98 100644 --- a/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.cpp +++ b/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleRunNamedAnim.h" diff --git a/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.h b/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.h index ac8519757..ef0bd713a 100644 --- a/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.h +++ b/plugin_sa/game_sa/CTaskSimpleRunNamedAnim.h @@ -31,5 +31,13 @@ class PLUGIN_API CTaskSimpleRunNamedAnim : public CTaskSimpleAnim { }; - +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_animName, 0x10); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_animGroupName, 0x28); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_fBlendDelta, 0x38); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_pAnimHierarchy, 0x3C); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_nTime, 0x40); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_timer, 0x44); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_vecOffsetAtEnd, 0x50); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_nFlags, 0x5C); +VALIDATE_OFFSET(CTaskSimpleRunNamedAnim, m_nAnimId, 0x60); VALIDATE_SIZE(CTaskSimpleRunNamedAnim, 0x64); diff --git a/plugin_sa/game_sa/CTaskSimpleStandStill.h b/plugin_sa/game_sa/CTaskSimpleStandStill.h index 57f7149ab..d15e13aa2 100644 --- a/plugin_sa/game_sa/CTaskSimpleStandStill.h +++ b/plugin_sa/game_sa/CTaskSimpleStandStill.h @@ -26,5 +26,9 @@ class PLUGIN_API CTaskSimpleStandStill : public CTaskSimple { CTaskSimpleStandStill(int nTime, bool Looped, bool bUseAnimIdleStance, float fBlendData); }; - +VALIDATE_OFFSET(CTaskSimpleStandStill, m_nTime, 0x8); +VALIDATE_OFFSET(CTaskSimpleStandStill, m_timer, 0xC); +VALIDATE_OFFSET(CTaskSimpleStandStill, m_bLooped, 0x18); +VALIDATE_OFFSET(CTaskSimpleStandStill, m_bUseAnimIdleStance, 0x19); +VALIDATE_OFFSET(CTaskSimpleStandStill, m_fBlendData, 0x1C); VALIDATE_SIZE(CTaskSimpleStandStill, 0x20); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimpleStealthKill.cpp b/plugin_sa/game_sa/CTaskSimpleStealthKill.cpp index 3bc19dd3b..da916e87f 100644 --- a/plugin_sa/game_sa/CTaskSimpleStealthKill.cpp +++ b/plugin_sa/game_sa/CTaskSimpleStealthKill.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleStealthKill.h" diff --git a/plugin_sa/game_sa/CTaskSimpleStealthKill.h b/plugin_sa/game_sa/CTaskSimpleStealthKill.h index 66ef4c887..a57c86f65 100644 --- a/plugin_sa/game_sa/CTaskSimpleStealthKill.h +++ b/plugin_sa/game_sa/CTaskSimpleStealthKill.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CPed.h" @@ -32,6 +31,12 @@ class CTaskSimpleStealthKill : public CTaskSimple CTaskSimpleStealthKill(bool bKeepTargetAlive,CPed *pTarget,int nAssocGroupId); }; - +VALIDATE_OFFSET(CTaskSimpleStealthKill, m_bKeepTargetAlive, 0x8); +VALIDATE_OFFSET(CTaskSimpleStealthKill, m_pTarget, 0xC); +VALIDATE_OFFSET(CTaskSimpleStealthKill, m_nAssocGroupId, 0x10); +VALIDATE_OFFSET(CTaskSimpleStealthKill, b_bIsAborting, 0x14); +VALIDATE_OFFSET(CTaskSimpleStealthKill, b_bIsFinished, 0x15); +VALIDATE_OFFSET(CTaskSimpleStealthKill, m_pAnim, 0x18); +VALIDATE_OFFSET(CTaskSimpleStealthKill, m_nTime, 0x1C); VALIDATE_SIZE(CTaskSimpleStealthKill, 0x20); diff --git a/plugin_sa/game_sa/CTaskSimpleSwim.h b/plugin_sa/game_sa/CTaskSimpleSwim.h index e94e9137e..1904df439 100644 --- a/plugin_sa/game_sa/CTaskSimpleSwim.h +++ b/plugin_sa/game_sa/CTaskSimpleSwim.h @@ -55,5 +55,26 @@ class PLUGIN_API CTaskSimpleSwim : public CTaskSimple { CTaskSimpleSwim(CVector const* pPosn, CPed* pPed); }; - +VALIDATE_OFFSET(CTaskSimpleSwim, m_bFinishedBlending, 0x8); +VALIDATE_OFFSET(CTaskSimpleSwim, m_bAnimBlockRefAdded, 0x9); +VALIDATE_OFFSET(CTaskSimpleSwim, m_nSwimState, 0xA); +VALIDATE_OFFSET(CTaskSimpleSwim, m_AnimID, 0xC); +VALIDATE_OFFSET(CTaskSimpleSwim, m_fAnimSpeed, 0x10); +VALIDATE_OFFSET(CTaskSimpleSwim, m_vecPos, 0x14); +VALIDATE_OFFSET(CTaskSimpleSwim, m_pPed, 0x20); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_24, 0x24); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_28, 0x28); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_2C, 0x2C); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_30, 0x30); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_34, 0x34); +VALIDATE_OFFSET(CTaskSimpleSwim, m_pEntity, 0x38); +VALIDATE_OFFSET(CTaskSimpleSwim, m_pClimbPos, 0x3C); +VALIDATE_OFFSET(CTaskSimpleSwim, m_fAngle, 0x48); +VALIDATE_OFFSET(CTaskSimpleSwim, m_nSurfaceType, 0x4C); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_50, 0x50); +VALIDATE_OFFSET(CTaskSimpleSwim, flt_54, 0x54); +VALIDATE_OFFSET(CTaskSimpleSwim, m_nProcessTimeCounter, 0x58); +VALIDATE_OFFSET(CTaskSimpleSwim, m_pFxSystem, 0x5C); +VALIDATE_OFFSET(CTaskSimpleSwim, m_bTriggerWaterSplash, 0x60); +VALIDATE_OFFSET(CTaskSimpleSwim, pad2, 0x61); VALIDATE_SIZE(CTaskSimpleSwim, 0x64); diff --git a/plugin_sa/game_sa/CTaskSimpleThrowProjectile.h b/plugin_sa/game_sa/CTaskSimpleThrowProjectile.h index c0c761917..7b6da2b0d 100644 --- a/plugin_sa/game_sa/CTaskSimpleThrowProjectile.h +++ b/plugin_sa/game_sa/CTaskSimpleThrowProjectile.h @@ -28,5 +28,11 @@ class PLUGIN_API CTaskSimpleThrowProjectile : public CTaskSimple { CTaskSimpleThrowProjectile(CEntity* pTarget, CVector Posn); }; - +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_bIsAborting, 0x8); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_bFinished, 0x9); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_bStarted, 0xA); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_pAnim, 0xC); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_pTarget, 0x10); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_vecPosition, 0x14); +VALIDATE_OFFSET(CTaskSimpleThrowProjectile, m_nStartTime, 0x20); VALIDATE_SIZE(CTaskSimpleThrowProjectile, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.cpp b/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.cpp index 4129e5149..a2597c0fa 100644 --- a/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.cpp +++ b/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTaskSimpleTriggerLookAt.h" diff --git a/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.h b/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.h index fa5c6a662..73e379f42 100644 --- a/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.h +++ b/plugin_sa/game_sa/CTaskSimpleTriggerLookAt.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CAnimBlendAssociation.h" @@ -34,7 +33,14 @@ class PLUGIN_API CTaskSimpleTriggerLookAt : public CTaskSimple { CTaskSimpleTriggerLookAt(CEntity* pEntity, int time, int offsetBoneTag, RwV3d offsetPos, bool bUseTorso = true, float speed = 0.25f, int blendTime = 1000, int priority = 3); - }; - +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_pEntity, 0x8); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_time, 0xC); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_offsetBoneTag, 0x10); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_offsetPos, 0x14); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_bUseTorso, 0x20); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_fSpeed, 0x24); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_BlendTime, 0x28); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_bEntityExist, 0x2C); +VALIDATE_OFFSET(CTaskSimpleTriggerLookAt, m_priority, 0x2D); VALIDATE_SIZE(CTaskSimpleTriggerLookAt, 0x30); diff --git a/plugin_sa/game_sa/CTaskSimpleUseGun.h b/plugin_sa/game_sa/CTaskSimpleUseGun.h index 0c5f144de..5b78e8cf2 100644 --- a/plugin_sa/game_sa/CTaskSimpleUseGun.h +++ b/plugin_sa/game_sa/CTaskSimpleUseGun.h @@ -1,11 +1,10 @@ - /* +/* Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CTaskSimple.h" #include "CVector.h" @@ -58,6 +57,25 @@ class CTaskSimpleUseGun : public CTaskSimple CTaskSimpleUseGun(CEntity *pTargetEntity, CVector vecTarget, unsigned char nCommand, unsigned short nBurstLength = 1, bool bAimImmediate = false); }; - +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bIsFinished, 0x8); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bIsInControl, 0x9); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bMoveControl, 0xA); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bFiredGun, 0xB); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bBlockedLOS, 0xC); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nFireGunThisFrame, 0xD); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bSkipAim, 0xE); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nNextCommand, 0xF); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nLastCommand, 0x10); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_vecMoveCommand, 0x14); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_pTarget, 0x1C); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_vecTarget, 0x20); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_pAnim, 0x2C); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_pWeaponInfo, 0x30); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nBurstLength, 0x34); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nBurstShots, 0x36); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_nCountDownFrames, 0x38); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_ArmIKInUse, 0x39); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_LookIKInUse, 0x3A); +VALIDATE_OFFSET(CTaskSimpleUseGun, m_bAimImmediate, 0x3B); VALIDATE_SIZE(CTaskSimpleUseGun, 0x3C); diff --git a/plugin_sa/game_sa/CTaskTimer.h b/plugin_sa/game_sa/CTaskTimer.h index 9f143ca40..46ad51a31 100644 --- a/plugin_sa/game_sa/CTaskTimer.h +++ b/plugin_sa/game_sa/CTaskTimer.h @@ -36,5 +36,8 @@ class PLUGIN_API CTaskTimer bool IsOutOfTime(); }; - +VALIDATE_OFFSET(CTaskTimer, m_nStartTime, 0x0); +VALIDATE_OFFSET(CTaskTimer, m_nInterval, 0x4); +VALIDATE_OFFSET(CTaskTimer, m_bStarted, 0x8); +VALIDATE_OFFSET(CTaskTimer, m_bStopped, 0x9); VALIDATE_SIZE(CTaskTimer, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTaskUtilityLineUpPedWithCar.h b/plugin_sa/game_sa/CTaskUtilityLineUpPedWithCar.h index d4e23abaf..17fd4d3e9 100644 --- a/plugin_sa/game_sa/CTaskUtilityLineUpPedWithCar.h +++ b/plugin_sa/game_sa/CTaskUtilityLineUpPedWithCar.h @@ -27,5 +27,11 @@ class PLUGIN_API CTaskUtilityLineUpPedWithCar void ProcessPed(CPed* pPed, CVehicle* pVehicle, CAnimBlendAssociation* pAnimBlendAssoc); RwV3d* GetPositionToOpenCarDoor(int unused, CVehicle* pVehicle, float arg2, CAnimBlendAssociation* pAnimBlendAssoc); }; - -VALIDATE_SIZE(CTaskUtilityLineUpPedWithCar, 28); \ No newline at end of file +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, pCoords, 0x0); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, field_4, 0x4); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, field_8, 0x8); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, field_c, 0xC); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, time, 0x10); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, field_14, 0x14); +VALIDATE_OFFSET(CTaskUtilityLineUpPedWithCar, pCTaskSimpleVtable, 0x18); +VALIDATE_SIZE(CTaskUtilityLineUpPedWithCar, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CText.h b/plugin_sa/game_sa/CText.h index 1c7c1a113..df3ce1917 100644 --- a/plugin_sa/game_sa/CText.h +++ b/plugin_sa/game_sa/CText.h @@ -18,6 +18,8 @@ struct PLUGIN_API CText__TDat // Reads TABL block from GXT file bool read(size_t TABLblockSize, FILE *file, int *pFileOffset, bool skipRead); }; +VALIDATE_OFFSET(CText__TDat, data, 0x0); +VALIDATE_OFFSET(CText__TDat, size, 0x4); VALIDATE_SIZE(CText__TDat, 0x8); @@ -26,6 +28,8 @@ struct PLUGIN_API CText__TablEntry char name[8]; int offset; }; +VALIDATE_OFFSET(CText__TablEntry, name, 0x0); +VALIDATE_OFFSET(CText__TablEntry, offset, 0x8); VALIDATE_SIZE(CText__TablEntry, 0xC); @@ -41,6 +45,9 @@ struct PLUGIN_API CText__Tabl // Reads TABL block from GXT file void read(size_t TABLblockSize, FILE *file, int *pFileOffset, int maxReadSize); }; +VALIDATE_OFFSET(CText__Tabl, data, 0x0); +VALIDATE_OFFSET(CText__Tabl, size, 0x960); +VALIDATE_OFFSET(CText__Tabl, __pad, 0x962); VALIDATE_SIZE(CText__Tabl, 0x964); @@ -49,6 +56,8 @@ struct PLUGIN_API tGXT_VERSION_2_TKEY_item unsigned long int Position; // TDAT + 8 offset unsigned long int KeyHash; }; +VALIDATE_OFFSET(tGXT_VERSION_2_TKEY_item, Position, 0x0); +VALIDATE_OFFSET(tGXT_VERSION_2_TKEY_item, KeyHash, 0x4); VALIDATE_SIZE(tGXT_VERSION_2_TKEY_item, 0x8); @@ -74,6 +83,8 @@ struct PLUGIN_API CText__TKey // Destructor ~CText__TKey(); }; +VALIDATE_OFFSET(CText__TKey, data, 0x0); +VALIDATE_OFFSET(CText__TKey, size, 0x4); VALIDATE_SIZE(CText__TKey, 0x8); @@ -120,6 +131,17 @@ class PLUGIN_API CText // Writes a mission table name into buffer void getMissionTableName(char *outStr); }; +VALIDATE_OFFSET(CText, tkeyMain, 0x0); +VALIDATE_OFFSET(CText, tdatMain, 0x8); +VALIDATE_OFFSET(CText, tkeyMission, 0x10); +VALIDATE_OFFSET(CText, tdatMission, 0x18); +VALIDATE_OFFSET(CText, encoding, 0x20); +VALIDATE_OFFSET(CText, haveTabl, 0x21); +VALIDATE_OFFSET(CText, cderrorInitialized, 0x22); +VALIDATE_OFFSET(CText, missionTableLoaded, 0x23); +VALIDATE_OFFSET(CText, missionTableName, 0x24); +VALIDATE_OFFSET(CText, cderrorText, 0x2C); +VALIDATE_OFFSET(CText, tabl, 0x12C); VALIDATE_SIZE(CText, 0xA90); extern PLUGIN_API CText& TheText; diff --git a/plugin_sa/game_sa/CTheCarGenerators.cpp b/plugin_sa/game_sa/CTheCarGenerators.cpp index 17dff88bf..a3b944196 100644 --- a/plugin_sa/game_sa/CTheCarGenerators.cpp +++ b/plugin_sa/game_sa/CTheCarGenerators.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTheCarGenerators.h" diff --git a/plugin_sa/game_sa/CTheCarGenerators.h b/plugin_sa/game_sa/CTheCarGenerators.h index 2b90560e8..d7243c583 100644 --- a/plugin_sa/game_sa/CTheCarGenerators.h +++ b/plugin_sa/game_sa/CTheCarGenerators.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CSpecialPlateHandler.h" #include "CCarGenerator.h" @@ -26,5 +25,6 @@ class PLUGIN_API CTheCarGenerators { SUPPORTED_10US static void RemoveCarGenerators(unsigned char IplID); SUPPORTED_10US static void Save(); }; +VALIDATE_SIZE(CTheCarGenerators, 0x1); #include "meta/meta.CTheCarGenerators.h" diff --git a/plugin_sa/game_sa/CTheScripts.cpp b/plugin_sa/game_sa/CTheScripts.cpp index e07195082..fe9095489 100644 --- a/plugin_sa/game_sa/CTheScripts.cpp +++ b/plugin_sa/game_sa/CTheScripts.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTheScripts.h" diff --git a/plugin_sa/game_sa/CTheScripts.h b/plugin_sa/game_sa/CTheScripts.h index 5f1340729..8bb50ccfe 100644 --- a/plugin_sa/game_sa/CTheScripts.h +++ b/plugin_sa/game_sa/CTheScripts.h @@ -43,12 +43,19 @@ struct tBuildingSwap int m_nOldModelIndex; int m_nNewModelIndex; }; +VALIDATE_OFFSET(tBuildingSwap, m_pCBuilding, 0x0); +VALIDATE_OFFSET(tBuildingSwap, m_nOldModelIndex, 0x4); +VALIDATE_OFFSET(tBuildingSwap, m_nNewModelIndex, 0x8); +VALIDATE_SIZE(tBuildingSwap, 0xC); struct tScriptSwitchCase { int m_nSwitchValue; int m_nSwitchLabelAddress; }; +VALIDATE_OFFSET(tScriptSwitchCase, m_nSwitchValue, 0x0); +VALIDATE_OFFSET(tScriptSwitchCase, m_nSwitchLabelAddress, 0x4); +VALIDATE_SIZE(tScriptSwitchCase, 0x8); struct tScriptCheckpoint { @@ -57,18 +64,30 @@ struct tScriptCheckpoint short wUniqueID; void *field_4; }; +VALIDATE_OFFSET(tScriptCheckpoint, bUsed, 0x0); +VALIDATE_OFFSET(tScriptCheckpoint, field_1, 0x1); +VALIDATE_OFFSET(tScriptCheckpoint, wUniqueID, 0x2); +VALIDATE_OFFSET(tScriptCheckpoint, field_4, 0x4); +VALIDATE_SIZE(tScriptCheckpoint, 0x8); struct tScriptEffectSystem { char bUsed; short wUniqueID; void *m_pFxSystem; }; +VALIDATE_OFFSET(tScriptEffectSystem, bUsed, 0x0); +VALIDATE_OFFSET(tScriptEffectSystem, wUniqueID, 0x2); +VALIDATE_OFFSET(tScriptEffectSystem, m_pFxSystem, 0x4); +VALIDATE_SIZE(tScriptEffectSystem, 0x8); struct tScriptSequence { char bUsed; short wUniqueID; }; +VALIDATE_OFFSET(tScriptSequence, bUsed, 0x0); +VALIDATE_OFFSET(tScriptSequence, wUniqueID, 0x2); +VALIDATE_SIZE(tScriptSequence, 0x4); #pragma pack(push,1) struct tScriptText @@ -100,8 +119,33 @@ struct tScriptText int param1 = -1; int param2 = -1; }; -#pragma pack(pop) +VALIDATE_OFFSET(tScriptText, letterWidth, 0x0); +VALIDATE_OFFSET(tScriptText, letterHeight, 0x4); +VALIDATE_OFFSET(tScriptText, color, 0x8); +VALIDATE_OFFSET(tScriptText, justify, 0xC); +VALIDATE_OFFSET(tScriptText, centered, 0xD); +VALIDATE_OFFSET(tScriptText, withBackground, 0xE); +VALIDATE_OFFSET(tScriptText, _pad, 0xF); +VALIDATE_OFFSET(tScriptText, wrapWidth, 0x10); +VALIDATE_OFFSET(tScriptText, centerWidth, 0x14); +VALIDATE_OFFSET(tScriptText, backgroundBoxColor, 0x18); +VALIDATE_OFFSET(tScriptText, proportional, 0x1C); +VALIDATE_OFFSET(tScriptText, backgroundColor, 0x1D); +VALIDATE_OFFSET(tScriptText, shadowType, 0x21); +VALIDATE_OFFSET(tScriptText, outlineType, 0x22); +VALIDATE_OFFSET(tScriptText, drawBeforeFade, 0x23); +VALIDATE_OFFSET(tScriptText, rightJustify, 0x24); +VALIDATE_OFFSET(tScriptText, _pad_25, 0x25); +VALIDATE_OFFSET(tScriptText, _pad_26, 0x26); +VALIDATE_OFFSET(tScriptText, _pad_27, 0x27); +VALIDATE_OFFSET(tScriptText, font, 0x28); +VALIDATE_OFFSET(tScriptText, xPosition, 0x2C); +VALIDATE_OFFSET(tScriptText, yPosition, 0x30); +VALIDATE_OFFSET(tScriptText, text, 0x34); +VALIDATE_OFFSET(tScriptText, param1, 0x3C); +VALIDATE_OFFSET(tScriptText, param2, 0x40); VALIDATE_SIZE(tScriptText, 0x44); +#pragma pack(pop) #pragma pack(push,1) struct tScriptRectangle @@ -126,14 +170,36 @@ struct tScriptRectangle char _pad_38 = 0; int textboxStyle = 3; }; -#pragma pack(pop) +VALIDATE_OFFSET(tScriptRectangle, type, 0x0); +VALIDATE_OFFSET(tScriptRectangle, drawBeforeFade, 0x4); +VALIDATE_OFFSET(tScriptRectangle, _pad_5, 0x5); +VALIDATE_OFFSET(tScriptRectangle, spriteIdx, 0x6); +VALIDATE_OFFSET(tScriptRectangle, rect, 0x8); +VALIDATE_OFFSET(tScriptRectangle, angle, 0x18); +VALIDATE_OFFSET(tScriptRectangle, color, 0x1C); +VALIDATE_OFFSET(tScriptRectangle, title, 0x20); +VALIDATE_OFFSET(tScriptRectangle, _pad_28, 0x28); +VALIDATE_OFFSET(tScriptRectangle, _pad_29, 0x29); +VALIDATE_OFFSET(tScriptRectangle, message, 0x2A); +VALIDATE_OFFSET(tScriptRectangle, _pad_32, 0x32); +VALIDATE_OFFSET(tScriptRectangle, _pad_33, 0x33); +VALIDATE_OFFSET(tScriptRectangle, alignment, 0x34); +VALIDATE_OFFSET(tScriptRectangle, _pad_36, 0x35); +VALIDATE_OFFSET(tScriptRectangle, _pad_37, 0x36); +VALIDATE_OFFSET(tScriptRectangle, _pad_38, 0x37); +VALIDATE_OFFSET(tScriptRectangle, textboxStyle, 0x38); VALIDATE_SIZE(tScriptRectangle, 0x3C); +#pragma pack(pop) + struct tScriptAttachedAnimGroup { int m_nModelID; char m_IfpName[16]; }; +VALIDATE_OFFSET(tScriptAttachedAnimGroup, m_nModelID, 0x0); +VALIDATE_OFFSET(tScriptAttachedAnimGroup, m_IfpName, 0x4); +VALIDATE_SIZE(tScriptAttachedAnimGroup, 0x14); struct tScriptSearchlight { @@ -159,12 +225,37 @@ struct tScriptSearchlight RwV3d field_64; RwV3d field_70; }; +VALIDATE_OFFSET(tScriptSearchlight, bUsed, 0x0); +VALIDATE_OFFSET(tScriptSearchlight, field_1, 0x1); +VALIDATE_OFFSET(tScriptSearchlight, bEnableShadow, 0x2); +VALIDATE_OFFSET(tScriptSearchlight, field_3, 0x3); +VALIDATE_OFFSET(tScriptSearchlight, wUniqueID, 0x4); +VALIDATE_OFFSET(tScriptSearchlight, field_6, 0x6); +VALIDATE_OFFSET(tScriptSearchlight, position, 0x8); +VALIDATE_OFFSET(tScriptSearchlight, target, 0x14); +VALIDATE_OFFSET(tScriptSearchlight, targetRadius, 0x20); +VALIDATE_OFFSET(tScriptSearchlight, baseRadius, 0x24); +VALIDATE_OFFSET(tScriptSearchlight, pathCoord1, 0x28); +VALIDATE_OFFSET(tScriptSearchlight, pathCoord2, 0x34); +VALIDATE_OFFSET(tScriptSearchlight, pathSpeed, 0x40); +VALIDATE_OFFSET(tScriptSearchlight, attachedEntity, 0x44); +VALIDATE_OFFSET(tScriptSearchlight, followingEntity, 0x48); +VALIDATE_OFFSET(tScriptSearchlight, tower, 0x4C); +VALIDATE_OFFSET(tScriptSearchlight, housing, 0x50); +VALIDATE_OFFSET(tScriptSearchlight, bulb, 0x54); +VALIDATE_OFFSET(tScriptSearchlight, targetSpot, 0x58); +VALIDATE_OFFSET(tScriptSearchlight, field_64, 0x64); +VALIDATE_OFFSET(tScriptSearchlight, field_70, 0x70); +VALIDATE_SIZE(tScriptSearchlight, 0x7C); struct tUsedObject { char szModelName[24]; int dwModelIndex; }; +VALIDATE_OFFSET(tUsedObject, szModelName, 0x0); +VALIDATE_OFFSET(tUsedObject, dwModelIndex, 0x18); +VALIDATE_SIZE(tUsedObject, 0x1C); struct tScriptSphere { @@ -175,6 +266,13 @@ struct tScriptSphere RwV3d vCoords; int fRadius; }; +VALIDATE_OFFSET(tScriptSphere, bUsed, 0x0); +VALIDATE_OFFSET(tScriptSphere, field_1, 0x1); +VALIDATE_OFFSET(tScriptSphere, wUniqueID, 0x2); +VALIDATE_OFFSET(tScriptSphere, field_4, 0x4); +VALIDATE_OFFSET(tScriptSphere, vCoords, 0x8); +VALIDATE_OFFSET(tScriptSphere, fRadius, 0x14); +VALIDATE_SIZE(tScriptSphere, 0x18); @@ -344,6 +442,7 @@ class PLUGIN_API CTheScripts SUPPORTED_10US static void UseSwitchJumpTable(int *pSwitchLabelAddress); SUPPORTED_10US static void WipeLocalVariableMemoryForMissionScript(); }; +VALIDATE_SIZE(CTheScripts, 0x1); #include "meta/meta.CTheScripts.h" diff --git a/plugin_sa/game_sa/CTheZones.h b/plugin_sa/game_sa/CTheZones.h index 426fb86d1..07df01a2e 100644 --- a/plugin_sa/game_sa/CTheZones.h +++ b/plugin_sa/game_sa/CTheZones.h @@ -90,4 +90,5 @@ class PLUGIN_API CTheZones // Load CTheZones info static void Load(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTheZones, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTimeCycle.h b/plugin_sa/game_sa/CTimeCycle.h index d9a31b03d..574a9bd64 100644 --- a/plugin_sa/game_sa/CTimeCycle.h +++ b/plugin_sa/game_sa/CTimeCycle.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CColourSet.h" #include "CBox.h" @@ -175,5 +174,5 @@ class PLUGIN_API CTimeCycle { static void StartExtraColour(int colour, bool bNoExtraColorInterior); static void StopExtraColour(bool bNoExtraColorInterior); static void Update(); - }; +VALIDATE_SIZE(CTimeCycle, 0x1); diff --git a/plugin_sa/game_sa/CTimeCycleBox.h b/plugin_sa/game_sa/CTimeCycleBox.h index 4513f0c71..1b68c2f91 100644 --- a/plugin_sa/game_sa/CTimeCycleBox.h +++ b/plugin_sa/game_sa/CTimeCycleBox.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CBox.h" @@ -20,5 +19,10 @@ class CTimeCycleBox float strength; float falloff; }; - -VALIDATE_SIZE(CTimeCycleBox,0x28) \ No newline at end of file +VALIDATE_OFFSET(CTimeCycleBox, box, 0x0); +VALIDATE_OFFSET(CTimeCycleBox, farclip, 0x18); +VALIDATE_OFFSET(CTimeCycleBox, lodDistMult, 0x1A); +VALIDATE_OFFSET(CTimeCycleBox, extraColor, 0x1C); +VALIDATE_OFFSET(CTimeCycleBox, strength, 0x20); +VALIDATE_OFFSET(CTimeCycleBox, falloff, 0x24); +VALIDATE_SIZE(CTimeCycleBox, 0x28); diff --git a/plugin_sa/game_sa/CTimeModelInfo.h b/plugin_sa/game_sa/CTimeModelInfo.h index f1def0cf6..6b213efba 100644 --- a/plugin_sa/game_sa/CTimeModelInfo.h +++ b/plugin_sa/game_sa/CTimeModelInfo.h @@ -14,5 +14,5 @@ class PLUGIN_API CTimeModelInfo : public CAtomicModelInfo { void FindOtherTimeModel(char *modelName); }; - +VALIDATE_OFFSET(CTimeModelInfo, m_timeInfo, 0x20); VALIDATE_SIZE(CTimeModelInfo, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTimer.h b/plugin_sa/game_sa/CTimer.h index 2021365ca..c7639e1e6 100644 --- a/plugin_sa/game_sa/CTimer.h +++ b/plugin_sa/game_sa/CTimer.h @@ -52,4 +52,5 @@ class PLUGIN_API CTimer static void StartUserPause(); static void EndUserPause(); static void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTimer, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTrailer.h b/plugin_sa/game_sa/CTrailer.h index 65eb29836..c8cf74e07 100644 --- a/plugin_sa/game_sa/CTrailer.h +++ b/plugin_sa/game_sa/CTrailer.h @@ -54,7 +54,12 @@ class CTrailer : public CAutomobile { void ScanForTowLink(); }; - +VALIDATE_OFFSET(CTrailer, field_988, 0x988); +VALIDATE_OFFSET(CTrailer, field_9E0, 0x9E0); +VALIDATE_OFFSET(CTrailer, field_9E4, 0x9E4); +VALIDATE_OFFSET(CTrailer, field_9E8, 0x9E8); +VALIDATE_OFFSET(CTrailer, field_9EC, 0x9EC); +VALIDATE_OFFSET(CTrailer, field_9F0, 0x9F0); VALIDATE_SIZE(CTrailer, 0x9F4); extern float& TRAILER_TOWED_MINRATIO; // 0.9 diff --git a/plugin_sa/game_sa/CTrain.h b/plugin_sa/game_sa/CTrain.h index a3fa4caaa..eb0387595 100644 --- a/plugin_sa/game_sa/CTrain.h +++ b/plugin_sa/game_sa/CTrain.h @@ -136,7 +136,23 @@ class CTrain : public CVehicle { static void CreateMissionTrain(CVector posn, bool clockwiseDirection, unsigned int trainType, CTrain**outFirstCarriage, CTrain**outLastCarriage, int nodeIndex, int trackId, bool isMissionTrain); static void DoTrainGenerationAndRemoval(); }; - +VALIDATE_OFFSET(CTrain, m_nNodeIndex, 0x5A0); +VALIDATE_OFFSET(CTrain, m_fTrainSpeed, 0x5A4); +VALIDATE_OFFSET(CTrain, m_fCurrentRailDistance, 0x5A8); +VALIDATE_OFFSET(CTrain, m_fLength, 0x5AC); +VALIDATE_OFFSET(CTrain, m_fTrainGas, 0x5B0); +VALIDATE_OFFSET(CTrain, m_fTrainBrake, 0x5B4); +VALIDATE_OFFSET(CTrain, m_nTrainFlags, 0x5B8); +VALIDATE_OFFSET(CTrain, m_nTimeWhenStoppedAtStation, 0x5BC); +VALIDATE_OFFSET(CTrain, m_nTrackId, 0x5C0); +VALIDATE_OFFSET(CTrain, m_nTimeWhenCreated, 0x5C4); +VALIDATE_OFFSET(CTrain, field_5C8, 0x5C8); +VALIDATE_OFFSET(CTrain, m_nPassengersGenerationState, 0x5CA); +VALIDATE_OFFSET(CTrain, m_pTemporaryPassenger, 0x5CC); +VALIDATE_OFFSET(CTrain, m_pPrevCarriage, 0x5D0); +VALIDATE_OFFSET(CTrain, m_pNextCarriage, 0x5D4); +VALIDATE_OFFSET(CTrain, m_aDoors, 0x5D8); +VALIDATE_OFFSET(CTrain, m_aTrainNodes, 0x668); VALIDATE_SIZE(CTrain, 0x6AC); extern unsigned int *NumTrackNodes; // unsigned int NumTrackNodes[4] diff --git a/plugin_sa/game_sa/CTrainNode.h b/plugin_sa/game_sa/CTrainNode.h index 9f9e1b92b..6f5ce5e16 100644 --- a/plugin_sa/game_sa/CTrainNode.h +++ b/plugin_sa/game_sa/CTrainNode.h @@ -30,5 +30,10 @@ class CTrainNode { float GetDistanceFromStart(); unsigned char GetLightingFromCollision(); }; - +VALIDATE_OFFSET(CTrainNode, x, 0x0); +VALIDATE_OFFSET(CTrainNode, y, 0x2); +VALIDATE_OFFSET(CTrainNode, z, 0x4); +VALIDATE_OFFSET(CTrainNode, m_nDistanceFromStart, 0x6); +VALIDATE_OFFSET(CTrainNode, m_nSurfaceLighting, 0x8); +VALIDATE_OFFSET(CTrainNode, m_bSurfLightingFound, 0x9); VALIDATE_SIZE(CTrainNode, 0xA); \ No newline at end of file diff --git a/plugin_sa/game_sa/CTxdStore.h b/plugin_sa/game_sa/CTxdStore.h index fbc2cac15..66e61709b 100644 --- a/plugin_sa/game_sa/CTxdStore.h +++ b/plugin_sa/game_sa/CTxdStore.h @@ -60,4 +60,5 @@ class PLUGIN_API CTxdStore static void GameShutdown(); // load txd from file static bool LoadTxd(int index, char const* filename); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTxdStore, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CUpsideDownCarCheck.h b/plugin_sa/game_sa/CUpsideDownCarCheck.h index 0fab15e37..caf590e2c 100644 --- a/plugin_sa/game_sa/CUpsideDownCarCheck.h +++ b/plugin_sa/game_sa/CUpsideDownCarCheck.h @@ -28,6 +28,7 @@ class PLUGIN_API CUpsideDownCarCheck { SUPPORTED_10US static bool IsCarUpsideDown(CVehicle *pVehicle); SUPPORTED_10US static bool IsCarUpsideDown(int carhandle); }; +VALIDATE_OFFSET(CUpsideDownCarCheck, m_aUpsideDownCars, 0x0); VALIDATE_SIZE(CUpsideDownCarCheck, 0x30); #include "meta/meta.CUpsideDownCarCheck.h" diff --git a/plugin_sa/game_sa/CUserDisplay.h b/plugin_sa/game_sa/CUserDisplay.h index 3ecbbb5de..ed9f5e96a 100644 --- a/plugin_sa/game_sa/CUserDisplay.h +++ b/plugin_sa/game_sa/CUserDisplay.h @@ -13,4 +13,5 @@ class PLUGIN_API CUserDisplay { public: static COnscreenTimer &OnscnTimer; -}; \ No newline at end of file +}; +VALIDATE_SIZE(CUserDisplay, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CVehicle.h b/plugin_sa/game_sa/CVehicle.h index 954c39ad9..d7eba659d 100644 --- a/plugin_sa/game_sa/CVehicle.h +++ b/plugin_sa/game_sa/CVehicle.h @@ -544,7 +544,93 @@ class PLUGIN_API CVehicle : public CPhysical { static void* operator new(unsigned int size); static void operator delete(void* data); }; - +VALIDATE_OFFSET(CVehicle, m_vehicleAudio, 0x138); +VALIDATE_OFFSET(CVehicle, m_pHandlingData, 0x384); +VALIDATE_OFFSET(CVehicle, m_pFlyingHandlingData, 0x388); +VALIDATE_OFFSET(CVehicle, m_nHandlingFlagsIntValue, 0x38C); +VALIDATE_OFFSET(CVehicle, m_nHandlingFlags, 0x38C); +VALIDATE_OFFSET(CVehicle, m_autoPilot, 0x390); +VALIDATE_OFFSET(CVehicle, m_nCreationTime, 0x430); +VALIDATE_OFFSET(CVehicle, m_nPrimaryColor, 0x434); +VALIDATE_OFFSET(CVehicle, m_nSecondaryColor, 0x435); +VALIDATE_OFFSET(CVehicle, m_nTertiaryColor, 0x436); +VALIDATE_OFFSET(CVehicle, m_nQuaternaryColor, 0x437); +VALIDATE_OFFSET(CVehicle, m_anExtras, 0x438); +VALIDATE_OFFSET(CVehicle, m_anUpgrades, 0x43A); +VALIDATE_OFFSET(CVehicle, m_fWheelScale, 0x458); +VALIDATE_OFFSET(CVehicle, m_nAlarmState, 0x45C); +VALIDATE_OFFSET(CVehicle, m_nForcedRandomRouteSeed, 0x45E); +VALIDATE_OFFSET(CVehicle, m_pDriver, 0x460); +VALIDATE_OFFSET(CVehicle, m_apPassengers, 0x464); +VALIDATE_OFFSET(CVehicle, m_nNumPassengers, 0x484); +VALIDATE_OFFSET(CVehicle, m_nNumGettingIn, 0x485); +VALIDATE_OFFSET(CVehicle, m_nGettingInFlags, 0x486); +VALIDATE_OFFSET(CVehicle, m_nGettingOutFlags, 0x487); +VALIDATE_OFFSET(CVehicle, m_nMaxPassengers, 0x488); +VALIDATE_OFFSET(CVehicle, m_nWindowsOpenFlags, 0x489); +VALIDATE_OFFSET(CVehicle, m_nNitroBoosts, 0x48A); +VALIDATE_OFFSET(CVehicle, m_nSpecialColModel, 0x48B); +VALIDATE_OFFSET(CVehicle, m_pEntityWeAreOn, 0x48C); +VALIDATE_OFFSET(CVehicle, m_pFire, 0x490); +VALIDATE_OFFSET(CVehicle, m_fSteerAngle, 0x494); +VALIDATE_OFFSET(CVehicle, m_f2ndSteerAngle, 0x498); +VALIDATE_OFFSET(CVehicle, m_fGasPedal, 0x49C); +VALIDATE_OFFSET(CVehicle, m_fBreakPedal, 0x4A0); +VALIDATE_OFFSET(CVehicle, m_nCreatedBy, 0x4A4); +VALIDATE_OFFSET(CVehicle, m_nExtendedRemovalRange, 0x4A6); +VALIDATE_OFFSET(CVehicle, m_nUsedForCover, 0x4AA); +VALIDATE_OFFSET(CVehicle, m_nAmmoInClip, 0x4AB); +VALIDATE_OFFSET(CVehicle, m_nPacMansCollected, 0x4AC); +VALIDATE_OFFSET(CVehicle, m_nPedsPositionForRoadBlock, 0x4AD); +VALIDATE_OFFSET(CVehicle, m_nNumCopsForRoadBlock, 0x4AE); +VALIDATE_OFFSET(CVehicle, m_fDirtLevel, 0x4B0); +VALIDATE_OFFSET(CVehicle, m_nCurrentGear, 0x4B4); +VALIDATE_OFFSET(CVehicle, m_fGearChangeCount, 0x4B8); +VALIDATE_OFFSET(CVehicle, m_fWheelSpinForAudio, 0x4BC); +VALIDATE_OFFSET(CVehicle, m_fHealth, 0x4C0); +VALIDATE_OFFSET(CVehicle, m_pTractor, 0x4C4); +VALIDATE_OFFSET(CVehicle, m_pTrailer, 0x4C8); +VALIDATE_OFFSET(CVehicle, m_pWhoInstalledBombOnMe, 0x4CC); +VALIDATE_OFFSET(CVehicle, m_nTimeTillWeNeedThisCar, 0x4D0); +VALIDATE_OFFSET(CVehicle, m_nGunFiringTime, 0x4D4); +VALIDATE_OFFSET(CVehicle, m_nTimeWhenBlowedUp, 0x4D8); +VALIDATE_OFFSET(CVehicle, m_nCopsInCarTimer, 0x4DC); +VALIDATE_OFFSET(CVehicle, m_wBombTimer, 0x4DE); +VALIDATE_OFFSET(CVehicle, m_pWhoDetonatedMe, 0x4E0); +VALIDATE_OFFSET(CVehicle, m_fVehicleFrontGroundZ, 0x4E4); +VALIDATE_OFFSET(CVehicle, m_fVehicleRearGroundZ, 0x4E8); +VALIDATE_OFFSET(CVehicle, field_4EC, 0x4EC); +VALIDATE_OFFSET(CVehicle, field_4ED, 0x4ED); +VALIDATE_OFFSET(CVehicle, m_eDoorLock, 0x4F8); +VALIDATE_OFFSET(CVehicle, m_nProjectileWeaponFiringTime, 0x4FC); +VALIDATE_OFFSET(CVehicle, m_nAdditionalProjectileWeaponFiringTime, 0x500); +VALIDATE_OFFSET(CVehicle, m_nTimeForMinigunFiring, 0x504); +VALIDATE_OFFSET(CVehicle, m_nLastWeaponDamageType, 0x508); +VALIDATE_OFFSET(CVehicle, m_pLastDamageEntity, 0x50C); +VALIDATE_OFFSET(CVehicle, field_510, 0x510); +VALIDATE_OFFSET(CVehicle, field_511, 0x511); +VALIDATE_OFFSET(CVehicle, field_512, 0x512); +VALIDATE_OFFSET(CVehicle, m_nVehicleWeaponInUse, 0x513); +VALIDATE_OFFSET(CVehicle, m_nHornCounter, 0x514); +VALIDATE_OFFSET(CVehicle, m_HornPattern, 0x518); +VALIDATE_OFFSET(CVehicle, m_nCarHornTimer, 0x519); +VALIDATE_OFFSET(CVehicle, m_comedyControlState, 0x51A); +VALIDATE_OFFSET(CVehicle, m_nHasslePosId, 0x51B); +VALIDATE_OFFSET(CVehicle, m_FrontCollPoly, 0x51C); +VALIDATE_OFFSET(CVehicle, m_RearCollPoly, 0x548); +VALIDATE_OFFSET(CVehicle, m_anCollisionLighting, 0x574); +VALIDATE_OFFSET(CVehicle, m_pOverheatParticle, 0x578); +VALIDATE_OFFSET(CVehicle, m_pFireParticle, 0x57C); +VALIDATE_OFFSET(CVehicle, m_pDustParticle, 0x580); +VALIDATE_OFFSET(CVehicle, m_nRenderLightsFlags, 0x584); +VALIDATE_OFFSET(CVehicle, m_renderLights, 0x584); +VALIDATE_OFFSET(CVehicle, m_pCustomCarPlate, 0x588); +VALIDATE_OFFSET(CVehicle, m_fRawSteerAngle, 0x58C); +VALIDATE_OFFSET(CVehicle, m_nVehicleClass, 0x590); +VALIDATE_OFFSET(CVehicle, m_nVehicleSubClass, 0x594); +VALIDATE_OFFSET(CVehicle, m_nPreviousRemapTxd, 0x598); +VALIDATE_OFFSET(CVehicle, m_nRemapTxd, 0x59A); +VALIDATE_OFFSET(CVehicle, m_pRemapTexture, 0x59C); VALIDATE_SIZE(CVehicle, 0x5A0); bool IsVehiclePointerValid(CVehicle* vehicle); diff --git a/plugin_sa/game_sa/CVehicleModelInfo.h b/plugin_sa/game_sa/CVehicleModelInfo.h index c9728e597..26861f47b 100644 --- a/plugin_sa/game_sa/CVehicleModelInfo.h +++ b/plugin_sa/game_sa/CVehicleModelInfo.h @@ -39,7 +39,9 @@ struct PLUGIN_API UpgradePosnDesc { CQuaternion m_qRotation; int m_nParentComponentId; }; - +VALIDATE_OFFSET(UpgradePosnDesc, m_vPosition, 0x0); +VALIDATE_OFFSET(UpgradePosnDesc, m_qRotation, 0xC); +VALIDATE_OFFSET(UpgradePosnDesc, m_nParentComponentId, 0x1C); VALIDATE_SIZE(UpgradePosnDesc, 0x20); class PLUGIN_API CVehicleModelInfo : public CClumpModelInfo { @@ -281,8 +283,42 @@ class PLUGIN_API CVehicleModelInfo : public CClumpModelInfo { // get num doors in this model int GetNumDoors(); }; - +VALIDATE_OFFSET(CVehicleModelInfo, m_pPlateMaterial, 0x24); +VALIDATE_OFFSET(CVehicleModelInfo, m_szPlateText, 0x28); +VALIDATE_OFFSET(CVehicleModelInfo, field_30, 0x30); +VALIDATE_OFFSET(CVehicleModelInfo, m_nPlateType, 0x31); +VALIDATE_OFFSET(CVehicleModelInfo, m_szGameName, 0x32); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleType, 0x3C); +VALIDATE_OFFSET(CVehicleModelInfo, m_fWheelSizeFront, 0x40); +VALIDATE_OFFSET(CVehicleModelInfo, m_fWheelSizeRear, 0x44); +VALIDATE_OFFSET(CVehicleModelInfo, m_nWheelModelIndex, 0x48); +VALIDATE_OFFSET(CVehicleModelInfo, m_nHandlingId, 0x4A); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumDoors, 0x4C); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleClass, 0x4D); +VALIDATE_OFFSET(CVehicleModelInfo, m_nFlags, 0x4E); +VALIDATE_OFFSET(CVehicleModelInfo, m_nWheelUpgradeClass, 0x4F); +VALIDATE_OFFSET(CVehicleModelInfo, m_nTimesUsed, 0x50); VALIDATE_OFFSET(CVehicleModelInfo, field_51, 0x51); +VALIDATE_OFFSET(CVehicleModelInfo, m_nFrq, 0x52); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRules, 0x54); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRulesBits, 0x54); +VALIDATE_OFFSET(CVehicleModelInfo, m_fBikeSteerAngle, 0x58); +VALIDATE_OFFSET(CVehicleModelInfo, m_pVehicleStruct, 0x5C); +VALIDATE_OFFSET(CVehicleModelInfo, field_60, 0x60); +VALIDATE_OFFSET(CVehicleModelInfo, m_apDirtMaterials, 0x230); +VALIDATE_OFFSET(CVehicleModelInfo, m_anPrimaryColors, 0x2B0); +VALIDATE_OFFSET(CVehicleModelInfo, m_anSecondaryColors, 0x2B8); +VALIDATE_OFFSET(CVehicleModelInfo, m_anTertiaryColors, 0x2C0); +VALIDATE_OFFSET(CVehicleModelInfo, m_anQuaternaryColors, 0x2C8); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumColorVariations, 0x2D0); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastColorVariation, 0x2D1); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentPrimaryColor, 0x2D2); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentSecondaryColor, 0x2D3); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentTertiaryColor, 0x2D4); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentQuaternaryColor, 0x2D5); +VALIDATE_OFFSET(CVehicleModelInfo, m_anUpgrades, 0x2D6); +VALIDATE_OFFSET(CVehicleModelInfo, m_anRemapTxds, 0x2FA); +VALIDATE_OFFSET(CVehicleModelInfo, m_pAnimBlock, 0x304); VALIDATE_SIZE(CVehicleModelInfo, 0x308); VALIDATE_SIZE(CVehicleModelInfo::CVehicleStructure, 0x314); diff --git a/plugin_sa/game_sa/CVisibilityPlugins.h b/plugin_sa/game_sa/CVisibilityPlugins.h index 06651c7ce..b2c8742d3 100644 --- a/plugin_sa/game_sa/CVisibilityPlugins.h +++ b/plugin_sa/game_sa/CVisibilityPlugins.h @@ -20,6 +20,9 @@ struct tAtomicVisibilityPlugin short m_wModelId; unsigned short m_wFlags; }; +VALIDATE_OFFSET(tAtomicVisibilityPlugin, m_wModelId, 0x0); +VALIDATE_OFFSET(tAtomicVisibilityPlugin, m_wFlags, 0x2); +VALIDATE_SIZE(tAtomicVisibilityPlugin, 0x4); class PLUGIN_API CVisibilityPlugins { @@ -130,5 +133,6 @@ class PLUGIN_API CVisibilityPlugins static bool VehicleVisibilityCB(RpClump *pRpClump); static bool VehicleVisibilityCB_BigVehicle(RpClump *pRpClump); }; +VALIDATE_SIZE(CVisibilityPlugins, 0x1); #define RpAtomicGetVisibilityPlugin(atomic) ((tAtomicVisibilityPlugin *)((unsigned int)atomic + CVisibilityPlugins::ms_atomicPluginOffset)) \ No newline at end of file diff --git a/plugin_sa/game_sa/CWanted.h b/plugin_sa/game_sa/CWanted.h index fa1d421aa..180f2817f 100644 --- a/plugin_sa/game_sa/CWanted.h +++ b/plugin_sa/game_sa/CWanted.h @@ -88,5 +88,24 @@ class PLUGIN_API CWanted { bool CanCopJoinPursuit(CCopPed* cop); bool SetPursuitCop(CCopPed* cop); }; - +VALIDATE_OFFSET(CWanted, m_nChaosLevel, 0x0); +VALIDATE_OFFSET(CWanted, m_nChaosLevelBeforeParole, 0x4); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedDecreased, 0x8); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedLevelChanged, 0xC); +VALIDATE_OFFSET(CWanted, m_nTimeOfParole, 0x10); +VALIDATE_OFFSET(CWanted, m_fMultiplier, 0x14); +VALIDATE_OFFSET(CWanted, m_nCopsInPursuit, 0x18); +VALIDATE_OFFSET(CWanted, m_nMaxCopsInPursuit, 0x19); +VALIDATE_OFFSET(CWanted, m_nMaxCopCarsInPursuit, 0x1A); +VALIDATE_OFFSET(CWanted, m_nCopsBeatingSuspect, 0x1B); +VALIDATE_OFFSET(CWanted, m_nChanceOnRoadBlock, 0x1C); +VALIDATE_OFFSET(CWanted, m_nCurrentChaseTime, 0x20); +VALIDATE_OFFSET(CWanted, m_nCurrentChaseTimeCounter, 0x24); +VALIDATE_OFFSET(CWanted, m_nTimeCounting, 0x28); +VALIDATE_OFFSET(CWanted, m_nWantedLevel, 0x2C); +VALIDATE_OFFSET(CWanted, m_nWantedLevelBeforeParole, 0x30); +VALIDATE_OFFSET(CWanted, m_CrimesBeingQd, 0x34); +VALIDATE_OFFSET(CWanted, m_pCopsInPursuit, 0x1F4); +VALIDATE_OFFSET(CWanted, m_PoliceScannerAudio, 0x21C); +VALIDATE_OFFSET(CWanted, m_bLeavePlayerAlone, 0x298); VALIDATE_SIZE(CWanted, 0x29C); \ No newline at end of file diff --git a/plugin_sa/game_sa/CWaterLevel.h b/plugin_sa/game_sa/CWaterLevel.h index 67e88bb56..3eb05f3ef 100644 --- a/plugin_sa/game_sa/CWaterLevel.h +++ b/plugin_sa/game_sa/CWaterLevel.h @@ -18,6 +18,12 @@ struct CRenPar char flowX; char flowY; }; +VALIDATE_OFFSET(CRenPar, z, 0x0); +VALIDATE_OFFSET(CRenPar, bigWaves, 0x4); +VALIDATE_OFFSET(CRenPar, smallWaves, 0x8); +VALIDATE_OFFSET(CRenPar, flowX, 0xC); +VALIDATE_OFFSET(CRenPar, flowY, 0xD); +VALIDATE_SIZE(CRenPar, 0x10); struct CWaterVertex { @@ -25,6 +31,10 @@ struct CWaterVertex short y; CRenPar rp; }; +VALIDATE_OFFSET(CWaterVertex, x, 0x0); +VALIDATE_OFFSET(CWaterVertex, y, 0x2); +VALIDATE_OFFSET(CWaterVertex, rp, 0x4); +VALIDATE_SIZE(CWaterVertex, 0x14); enum eBeachToy : int32_t { @@ -81,6 +91,7 @@ class CWaterLevel static void WaterLevelInitialise(); static void Shutdown(); }; +VALIDATE_SIZE(CWaterLevel, 0x1); extern RwTexture *TexWaterClear256; extern RwTexture *TexSeabd32; diff --git a/plugin_sa/game_sa/CWeapon.h b/plugin_sa/game_sa/CWeapon.h index 342305774..6788292f2 100644 --- a/plugin_sa/game_sa/CWeapon.h +++ b/plugin_sa/game_sa/CWeapon.h @@ -89,7 +89,16 @@ class PLUGIN_API CWeapon { CWeapon(plugin::dummy_func_t) {} }; - +VALIDATE_OFFSET(CWeapon, m_eWeaponType, 0x0); +VALIDATE_OFFSET(CWeapon, m_nState, 0x4); +VALIDATE_OFFSET(CWeapon, m_nAmmoInClip, 0x8); +VALIDATE_OFFSET(CWeapon, m_nAmmoTotal, 0xC); +VALIDATE_OFFSET(CWeapon, m_nTimeForNextShot, 0x10); +VALIDATE_OFFSET(CWeapon, field_14, 0x14); +VALIDATE_OFFSET(CWeapon, field_15, 0x15); +VALIDATE_OFFSET(CWeapon, field_16, 0x16); +VALIDATE_OFFSET(CWeapon, field_17, 0x17); +VALIDATE_OFFSET(CWeapon, m_pFxSystem, 0x18); VALIDATE_SIZE(CWeapon, 0x1C); extern float &fPlayerAimScale; // default 0.75 diff --git a/plugin_sa/game_sa/CWeaponEffects.h b/plugin_sa/game_sa/CWeaponEffects.h index 54f06130b..d2d0af8b0 100644 --- a/plugin_sa/game_sa/CWeaponEffects.h +++ b/plugin_sa/game_sa/CWeaponEffects.h @@ -45,7 +45,15 @@ class PLUGIN_API CWeaponEffects { static void ClearCrossHairsImmediately(); static void Render(); }; - +VALIDATE_OFFSET(CWeaponEffects, m_bActive, 0x0); +VALIDATE_OFFSET(CWeaponEffects, m_nTimeWhenToDeactivate, 0x4); +VALIDATE_OFFSET(CWeaponEffects, m_vecPosn, 0x8); +VALIDATE_OFFSET(CWeaponEffects, m_color, 0x14); +VALIDATE_OFFSET(CWeaponEffects, m_fSize, 0x18); +VALIDATE_OFFSET(CWeaponEffects, field_1C, 0x1C); +VALIDATE_OFFSET(CWeaponEffects, field_20, 0x20); +VALIDATE_OFFSET(CWeaponEffects, m_fRotation, 0x24); +VALIDATE_OFFSET(CWeaponEffects, field_28, 0x28); VALIDATE_SIZE(CWeaponEffects, 0x2C); extern unsigned int MAX_NUM_WEAPON_CROSSHAIRS; // default 2 diff --git a/plugin_sa/game_sa/CWeaponInfo.h b/plugin_sa/game_sa/CWeaponInfo.h index 05465219b..51186e479 100644 --- a/plugin_sa/game_sa/CWeaponInfo.h +++ b/plugin_sa/game_sa/CWeaponInfo.h @@ -104,7 +104,35 @@ class CWeaponInfo { // closing static void Shutdown(); }; - +VALIDATE_OFFSET(CWeaponInfo, m_nWeaponFire, 0x0); +VALIDATE_OFFSET(CWeaponInfo, m_fTargetRange, 0x4); +VALIDATE_OFFSET(CWeaponInfo, m_fWeaponRange, 0x8); +VALIDATE_OFFSET(CWeaponInfo, m_nModelId, 0xC); +VALIDATE_OFFSET(CWeaponInfo, m_nModelId2, 0x10); +VALIDATE_OFFSET(CWeaponInfo, m_nSlot, 0x14); +VALIDATE_OFFSET(CWeaponInfo, m_nFlags, 0x18); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimToPlay, 0x1C); +VALIDATE_OFFSET(CWeaponInfo, m_nAmmoClip, 0x20); +VALIDATE_OFFSET(CWeaponInfo, m_nDamage, 0x22); +VALIDATE_OFFSET(CWeaponInfo, m_vecFireOffset, 0x24); +VALIDATE_OFFSET(CWeaponInfo, m_nSkillLevel, 0x30); +VALIDATE_OFFSET(CWeaponInfo, m_nReqStatLevel, 0x34); +VALIDATE_OFFSET(CWeaponInfo, m_fAccuracy, 0x38); +VALIDATE_OFFSET(CWeaponInfo, m_fMoveSpeed, 0x3C); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopStart, 0x40); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopEnd, 0x44); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimLoopFire, 0x48); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimLoop2Start, 0x4C); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimLoop2End, 0x50); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimLoop2Fire, 0x54); +VALIDATE_OFFSET(CWeaponInfo, m_fBreakoutTime, 0x58); +VALIDATE_OFFSET(CWeaponInfo, m_fSpeed, 0x5C); +VALIDATE_OFFSET(CWeaponInfo, m_fRadius, 0x60); +VALIDATE_OFFSET(CWeaponInfo, m_fLifespan, 0x64); +VALIDATE_OFFSET(CWeaponInfo, m_fSpread, 0x68); +VALIDATE_OFFSET(CWeaponInfo, m_nAimOffsetIndex, 0x6C); +VALIDATE_OFFSET(CWeaponInfo, m_nBaseCombo, 0x6E); +VALIDATE_OFFSET(CWeaponInfo, m_nNumCombos, 0x6F); VALIDATE_SIZE(CWeaponInfo, 0x70); // list of weapon infos. Count: MAX_WEAPON_INFOS (80) diff --git a/plugin_sa/game_sa/CWeaponModelInfo.h b/plugin_sa/game_sa/CWeaponModelInfo.h index 025124105..59c137cd9 100644 --- a/plugin_sa/game_sa/CWeaponModelInfo.h +++ b/plugin_sa/game_sa/CWeaponModelInfo.h @@ -13,6 +13,8 @@ class PLUGIN_API CWeaponModelInfo : public CClumpModelInfo { public: eWeaponType m_weaponInfo; }; +VALIDATE_OFFSET(CWeaponModelInfo, m_weaponInfo, 0x24); +VALIDATE_SIZE(CWeaponModelInfo, 0x28); VALIDATE_SIZE(CWeaponModelInfo, 0x28); \ No newline at end of file diff --git a/plugin_sa/game_sa/CWeather.h b/plugin_sa/game_sa/CWeather.h index 86688bd1d..5397d1e9d 100644 --- a/plugin_sa/game_sa/CWeather.h +++ b/plugin_sa/game_sa/CWeather.h @@ -101,4 +101,5 @@ class CWeather { static void Update(); static void UpdateInTunnelness(); static void UpdateWeatherRegion(CVector* posn); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CWeather, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/CWorld.cpp b/plugin_sa/game_sa/CWorld.cpp index 9fd50947f..9921edef7 100644 --- a/plugin_sa/game_sa/CWorld.cpp +++ b/plugin_sa/game_sa/CWorld.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWorld.h" diff --git a/plugin_sa/game_sa/CWorld.h b/plugin_sa/game_sa/CWorld.h index 52dda8e44..f922b23ab 100644 --- a/plugin_sa/game_sa/CWorld.h +++ b/plugin_sa/game_sa/CWorld.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #define SECTOR_SIZE_X (50.0f) @@ -200,6 +200,7 @@ class PLUGIN_API CWorld { } }; +VALIDATE_SIZE(CWorld, 0x1); extern unsigned int& FilledColPointIndex; extern CColPoint* gaTempSphereColPoints; // CColPoint gaTempSphereColPoints[32] diff --git a/plugin_sa/game_sa/CZone.h b/plugin_sa/game_sa/CZone.h index 8bd00c9ee..05e189c3d 100644 --- a/plugin_sa/game_sa/CZone.h +++ b/plugin_sa/game_sa/CZone.h @@ -38,5 +38,15 @@ class CZone { // Returns pointer to GXT name string. const char* GetTranslatedName(); }; - +VALIDATE_OFFSET(CZone, m_szLabel, 0x0); +VALIDATE_OFFSET(CZone, m_szTextKey, 0x8); +VALIDATE_OFFSET(CZone, m_fX1, 0x10); +VALIDATE_OFFSET(CZone, m_fY1, 0x12); +VALIDATE_OFFSET(CZone, m_fZ1, 0x14); +VALIDATE_OFFSET(CZone, m_fX2, 0x16); +VALIDATE_OFFSET(CZone, m_fY2, 0x18); +VALIDATE_OFFSET(CZone, m_fZ2, 0x1A); +VALIDATE_OFFSET(CZone, m_nZoneExtraIndexInfo, 0x1C); +VALIDATE_OFFSET(CZone, m_nType, 0x2D); +VALIDATE_OFFSET(CZone, m_nLevel, 0x2E); VALIDATE_SIZE(CZone, 0x30); diff --git a/plugin_sa/game_sa/CZoneInfo.h b/plugin_sa/game_sa/CZoneInfo.h index eb728c3ea..a6199e6e2 100644 --- a/plugin_sa/game_sa/CZoneInfo.h +++ b/plugin_sa/game_sa/CZoneInfo.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -17,5 +17,9 @@ class PLUGIN_API CZoneInfo char m_nFlags; char m_nPopulationRace; }; - +VALIDATE_OFFSET(CZoneInfo, m_nGangDensity, 0x0); +VALIDATE_OFFSET(CZoneInfo, m_nDealerCounter, 0xA); +VALIDATE_OFFSET(CZoneInfo, m_ZoneColor, 0xB); +VALIDATE_OFFSET(CZoneInfo, m_nFlags, 0xF); +VALIDATE_OFFSET(CZoneInfo, m_nPopulationRace, 0x10); VALIDATE_SIZE(CZoneInfo, 0x11); \ No newline at end of file diff --git a/plugin_sa/game_sa/C_PcSave.h b/plugin_sa/game_sa/C_PcSave.h index 6a382e695..3436afdd7 100644 --- a/plugin_sa/game_sa/C_PcSave.h +++ b/plugin_sa/game_sa/C_PcSave.h @@ -37,7 +37,7 @@ class PLUGIN_API C_PcSave { bool SaveSlot(int slot); static void SetSaveDirectory(const char* path); }; - +VALIDATE_OFFSET(C_PcSave, nErrorCode, 0x0); VALIDATE_SIZE(C_PcSave, 0x4); extern C_PcSave& PcSaveHelper; diff --git a/plugin_sa/game_sa/D3DIndexDataBuffer.h b/plugin_sa/game_sa/D3DIndexDataBuffer.h index 6b1f5f3ec..0393b7164 100644 --- a/plugin_sa/game_sa/D3DIndexDataBuffer.h +++ b/plugin_sa/game_sa/D3DIndexDataBuffer.h @@ -40,5 +40,10 @@ class D3DIndexDataBuffer { bool PushWithoutIncreasingCounter(void* indexBuffer); #endif }; - +VALIDATE_OFFSET(D3DIndexDataBuffer, m_nFormat, 0x0); +VALIDATE_OFFSET(D3DIndexDataBuffer, field_4, 0x4); +VALIDATE_OFFSET(D3DIndexDataBuffer, m_nCapcacity, 0x8); +VALIDATE_OFFSET(D3DIndexDataBuffer, m_nNumDatasInBuffer, 0xC); +VALIDATE_OFFSET(D3DIndexDataBuffer, m_nSize, 0x10); +VALIDATE_OFFSET(D3DIndexDataBuffer, m_apIndexData, 0x14); VALIDATE_SIZE(D3DIndexDataBuffer, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/D3DResourceSystem.h b/plugin_sa/game_sa/D3DResourceSystem.h index 4628f7129..9b46c942c 100644 --- a/plugin_sa/game_sa/D3DResourceSystem.h +++ b/plugin_sa/game_sa/D3DResourceSystem.h @@ -39,4 +39,5 @@ class D3DResourceSystem { static void DestroyIndexBuffer(void* pIndexBuffer); static void DestroyTexture(void* pTexture); #endif -}; \ No newline at end of file +}; +VALIDATE_SIZE(D3DResourceSystem, 0x1); \ No newline at end of file diff --git a/plugin_sa/game_sa/D3DTextureBuffer.h b/plugin_sa/game_sa/D3DTextureBuffer.h index 9e402d7d1..12d8db02e 100644 --- a/plugin_sa/game_sa/D3DTextureBuffer.h +++ b/plugin_sa/game_sa/D3DTextureBuffer.h @@ -41,5 +41,11 @@ class D3DTextureBuffer { bool PushWithoutIncreasingCounter(void* texture); #endif }; - +VALIDATE_OFFSET(D3DTextureBuffer, m_nFormat, 0x0); +VALIDATE_OFFSET(D3DTextureBuffer, m_nWidth, 0x4); +VALIDATE_OFFSET(D3DTextureBuffer, m_nLevels, 0x8); +VALIDATE_OFFSET(D3DTextureBuffer, m_nCapcacity, 0xC); +VALIDATE_OFFSET(D3DTextureBuffer, m_nNumTexturesInBuffer, 0x10); +VALIDATE_OFFSET(D3DTextureBuffer, m_nSize, 0x14); +VALIDATE_OFFSET(D3DTextureBuffer, m_apTextures, 0x18); VALIDATE_SIZE(D3DTextureBuffer, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxBox_c.h b/plugin_sa/game_sa/FxBox_c.h index 4e567a83a..73c76f607 100644 --- a/plugin_sa/game_sa/FxBox_c.h +++ b/plugin_sa/game_sa/FxBox_c.h @@ -23,5 +23,10 @@ class FxBox_c { m_fCornerB_x = m_fCornerB_y = m_fCornerB_z = -999999.0f; } }; - +VALIDATE_OFFSET(FxBox_c, m_fCornerA_x, 0x0); +VALIDATE_OFFSET(FxBox_c, m_fCornerB_x, 0x4); +VALIDATE_OFFSET(FxBox_c, m_fCornerA_y, 0x8); +VALIDATE_OFFSET(FxBox_c, m_fCornerB_y, 0xC); +VALIDATE_OFFSET(FxBox_c, m_fCornerA_z, 0x10); +VALIDATE_OFFSET(FxBox_c, m_fCornerB_z, 0x14); VALIDATE_SIZE(FxBox_c, 0x18); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxEmitterBP_c.h b/plugin_sa/game_sa/FxEmitterBP_c.h index a35551ff7..c784fbe5d 100644 --- a/plugin_sa/game_sa/FxEmitterBP_c.h +++ b/plugin_sa/game_sa/FxEmitterBP_c.h @@ -12,5 +12,4 @@ class FxEmitterBP_c : public FxPrimBP_c { public: }; - VALIDATE_SIZE(FxEmitterBP_c, 0x40); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxFrustumInfo_c.h b/plugin_sa/game_sa/FxFrustumInfo_c.h index b8215944a..d0f3d6da7 100644 --- a/plugin_sa/game_sa/FxFrustumInfo_c.h +++ b/plugin_sa/game_sa/FxFrustumInfo_c.h @@ -17,5 +17,6 @@ class FxFrustumInfo_c { bool IsCollision(FxSphere_c* sphere); }; - +VALIDATE_OFFSET(FxFrustumInfo_c, m_sphere, 0x0); +VALIDATE_OFFSET(FxFrustumInfo_c, m_planes, 0x14); VALIDATE_SIZE(FxFrustumInfo_c, 0x54); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxInfoManager_c.h b/plugin_sa/game_sa/FxInfoManager_c.h index 8f13a1b2b..1b55ee1f3 100644 --- a/plugin_sa/game_sa/FxInfoManager_c.h +++ b/plugin_sa/game_sa/FxInfoManager_c.h @@ -24,5 +24,14 @@ class FxInfoManager_c { char field_12; char field_13; }; - +VALIDATE_OFFSET(FxInfoManager_c, m_nNumInfos, 0x0); +VALIDATE_OFFSET(FxInfoManager_c, m_pInfos, 0x4); +VALIDATE_OFFSET(FxInfoManager_c, m_nFirstMovementInfo, 0x8); +VALIDATE_OFFSET(FxInfoManager_c, m_nFirstRenderInfo, 0x9); +VALIDATE_OFFSET(FxInfoManager_c, m_nLodStart, 0xC); +VALIDATE_OFFSET(FxInfoManager_c, m_nLodEnd, 0xE); +VALIDATE_OFFSET(FxInfoManager_c, m_bHasFlatParticleEmitter, 0x10); +VALIDATE_OFFSET(FxInfoManager_c, m_bHasHeatHazeParticleEmitter, 0x11); +VALIDATE_OFFSET(FxInfoManager_c, field_12, 0x12); +VALIDATE_OFFSET(FxInfoManager_c, field_13, 0x13); VALIDATE_SIZE(FxInfoManager_c, 0x14); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxManager_c.h b/plugin_sa/game_sa/FxManager_c.h index 05731d20e..2fa3dc4ab 100644 --- a/plugin_sa/game_sa/FxManager_c.h +++ b/plugin_sa/game_sa/FxManager_c.h @@ -57,7 +57,17 @@ class FxManager_c { FxSystemBP_c* LoadFxSystemBP(char* filename, int file); bool LoadFxProject(char* filename); }; - +VALIDATE_OFFSET(FxManager_c, m_fxSystemBPList, 0x0); +VALIDATE_OFFSET(FxManager_c, m_fxSystemList, 0xC); +VALIDATE_OFFSET(FxManager_c, m_pFxEmitters, 0x18); +VALIDATE_OFFSET(FxManager_c, m_fxEmitterPrtList, 0x1C); +VALIDATE_OFFSET(FxManager_c, m_nFxTxdIndex, 0x28); +VALIDATE_OFFSET(FxManager_c, m_pWindDir, 0x2C); +VALIDATE_OFFSET(FxManager_c, m_pfWindSpeed, 0x30); +VALIDATE_OFFSET(FxManager_c, m_frustum, 0x34); +VALIDATE_OFFSET(FxManager_c, m_nCurrentMatrix, 0x88); +VALIDATE_OFFSET(FxManager_c, m_apMatrices, 0x8C); +VALIDATE_OFFSET(FxManager_c, m_pool, 0xAC); VALIDATE_SIZE(FxManager_c, 0xB8); extern PLUGIN_API FxManager_c &g_fxMan; diff --git a/plugin_sa/game_sa/FxMemoryPool_c.h b/plugin_sa/game_sa/FxMemoryPool_c.h index 94f0e9d4a..7ebd965b4 100644 --- a/plugin_sa/game_sa/FxMemoryPool_c.h +++ b/plugin_sa/game_sa/FxMemoryPool_c.h @@ -19,5 +19,7 @@ class PLUGIN_API FxMemoryPool_c void Optimise(); }; - +VALIDATE_OFFSET(FxMemoryPool_c, data, 0x0); +VALIDATE_OFFSET(FxMemoryPool_c, size, 0x4); +VALIDATE_OFFSET(FxMemoryPool_c, position, 0x8); VALIDATE_SIZE(FxMemoryPool_c, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxPlane_c.h b/plugin_sa/game_sa/FxPlane_c.h index c48f0b2db..38af6beb1 100644 --- a/plugin_sa/game_sa/FxPlane_c.h +++ b/plugin_sa/game_sa/FxPlane_c.h @@ -14,5 +14,6 @@ class FxPlane_c { RwV3d m_vecNormal; float m_fDistance; }; - +VALIDATE_OFFSET(FxPlane_c, m_vecNormal, 0x0); +VALIDATE_OFFSET(FxPlane_c, m_fDistance, 0xC); VALIDATE_SIZE(FxPlane_c, 0x10); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxPrimBP_c.h b/plugin_sa/game_sa/FxPrimBP_c.h index c0ba9387a..a28693e6f 100644 --- a/plugin_sa/game_sa/FxPrimBP_c.h +++ b/plugin_sa/game_sa/FxPrimBP_c.h @@ -25,5 +25,13 @@ class FxPrimBP_c { virtual ~FxPrimBP_c() {} }; - +VALIDATE_OFFSET(FxPrimBP_c, field_4, 0x4); +VALIDATE_OFFSET(FxPrimBP_c, m_nSrcBlendId, 0x5); +VALIDATE_OFFSET(FxPrimBP_c, m_nDstBlendId, 0x6); +VALIDATE_OFFSET(FxPrimBP_c, m_nAlphaOn, 0x7); +VALIDATE_OFFSET(FxPrimBP_c, m_pMatrixBuffered, 0x8); +VALIDATE_OFFSET(FxPrimBP_c, m_apTextures, 0xC); +VALIDATE_OFFSET(FxPrimBP_c, field_1C, 0x1C); +VALIDATE_OFFSET(FxPrimBP_c, m_emitterPrts, 0x20); +VALIDATE_OFFSET(FxPrimBP_c, m_fxInfoManager, 0x2C); VALIDATE_SIZE(FxPrimBP_c, 0x40); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxPrtMult_c.h b/plugin_sa/game_sa/FxPrtMult_c.h index c1898078f..bdd035add 100644 --- a/plugin_sa/game_sa/FxPrtMult_c.h +++ b/plugin_sa/game_sa/FxPrtMult_c.h @@ -19,5 +19,8 @@ class FxPrtMult_c { FxPrtMult_c(float red, float green, float blue, float alpha, float size, float arg5, float lastFactor); void SetUp(float red, float green, float blue, float alpha, float size, float arg5, float lastFactor); }; - +VALIDATE_OFFSET(FxPrtMult_c, m_color, 0x0); +VALIDATE_OFFSET(FxPrtMult_c, m_fSize, 0x10); +VALIDATE_OFFSET(FxPrtMult_c, field_14, 0x14); +VALIDATE_OFFSET(FxPrtMult_c, m_fLife, 0x18); VALIDATE_SIZE(FxPrtMult_c, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxSphere_c.h b/plugin_sa/game_sa/FxSphere_c.h index 5e0eebeaf..89738cca2 100644 --- a/plugin_sa/game_sa/FxSphere_c.h +++ b/plugin_sa/game_sa/FxSphere_c.h @@ -21,5 +21,7 @@ class FxSphere_c { bool IsCollision(FxSphere_c* sphere); float GetDistToPlane(FxPlane_c* plane); }; - +VALIDATE_OFFSET(FxSphere_c, m_vecCenter, 0x0); +VALIDATE_OFFSET(FxSphere_c, m_fRadius, 0xC); +VALIDATE_OFFSET(FxSphere_c, m_nNumPlanesPassed, 0x10); VALIDATE_SIZE(FxSphere_c, 0x14); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxSystemBP_c.h b/plugin_sa/game_sa/FxSystemBP_c.h index 3d83d2cb6..17dd27e0d 100644 --- a/plugin_sa/game_sa/FxSystemBP_c.h +++ b/plugin_sa/game_sa/FxSystemBP_c.h @@ -36,5 +36,13 @@ class FxSystemBP_c : public ListItem_c { void SetBoundingSphere(RwV3d* center, float radius); void Load(char* filename, int file, int version); }; - +VALIDATE_OFFSET(FxSystemBP_c, m_nNameKey, 0x8); +VALIDATE_OFFSET(FxSystemBP_c, m_fLength, 0xC); +VALIDATE_OFFSET(FxSystemBP_c, m_fLoopIntervalMin, 0x10); +VALIDATE_OFFSET(FxSystemBP_c, m_fLoopLength, 0x14); +VALIDATE_OFFSET(FxSystemBP_c, m_nCullDist, 0x18); +VALIDATE_OFFSET(FxSystemBP_c, m_nPlayMode, 0x1A); +VALIDATE_OFFSET(FxSystemBP_c, m_nNumEmitters, 0x1B); +VALIDATE_OFFSET(FxSystemBP_c, m_emittersList, 0x1C); +VALIDATE_OFFSET(FxSystemBP_c, m_pBoundingSphere, 0x20); VALIDATE_SIZE(FxSystemBP_c, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/FxSystem_c.h b/plugin_sa/game_sa/FxSystem_c.h index 4bfce9bc9..1520352fc 100644 --- a/plugin_sa/game_sa/FxSystem_c.h +++ b/plugin_sa/game_sa/FxSystem_c.h @@ -97,3 +97,23 @@ class FxSystem_c : public ListItem_c { bool IsVisible(); bool Update(RwCamera* camera, float timeDelta); }; +VALIDATE_OFFSET(FxSystem_c, m_pBlueprint, 0x8); +VALIDATE_OFFSET(FxSystem_c, m_pParentMatrix, 0xC); +VALIDATE_OFFSET(FxSystem_c, m_localMatrix, 0x10); +VALIDATE_OFFSET(FxSystem_c, m_nPlayStatus, 0x50); +VALIDATE_OFFSET(FxSystem_c, m_nKillStatus, 0x51); +VALIDATE_OFFSET(FxSystem_c, m_bConstTimeSet, 0x52); +VALIDATE_OFFSET(FxSystem_c, field_53, 0x53); +VALIDATE_OFFSET(FxSystem_c, field_54, 0x54); +VALIDATE_OFFSET(FxSystem_c, m_fCameraDistance, 0x58); +VALIDATE_OFFSET(FxSystem_c, m_nConstTime, 0x5C); +VALIDATE_OFFSET(FxSystem_c, m_nRateMult, 0x5E); +VALIDATE_OFFSET(FxSystem_c, m_nTimeMult, 0x60); +VALIDATE_OFFSET(FxSystem_c, m_nFlags, 0x62); +VALIDATE_OFFSET(FxSystem_c, field_63, 0x63); +VALIDATE_OFFSET(FxSystem_c, fUnkRandom, 0x64); +VALIDATE_OFFSET(FxSystem_c, m_vecVelAdd, 0x68); +VALIDATE_OFFSET(FxSystem_c, m_pBounding, 0x74); +VALIDATE_OFFSET(FxSystem_c, m_pPrimsPtrList, 0x78); +VALIDATE_OFFSET(FxSystem_c, m_fireAudio, 0x7C); +VALIDATE_SIZE(FxSystem_c, 0x104); diff --git a/plugin_sa/game_sa/Fx_c.h b/plugin_sa/game_sa/Fx_c.h index 6280e998a..554214485 100644 --- a/plugin_sa/game_sa/Fx_c.h +++ b/plugin_sa/game_sa/Fx_c.h @@ -87,7 +87,32 @@ class Fx_c { void ExitEntitySystems(); void Exit(); }; - +VALIDATE_OFFSET(Fx_c, m_pPrtBlood, 0x0); +VALIDATE_OFFSET(Fx_c, m_pPrtBoatsplash, 0x4); +VALIDATE_OFFSET(Fx_c, m_pPrtBubble, 0x8); +VALIDATE_OFFSET(Fx_c, m_pPrtCardebris, 0xC); +VALIDATE_OFFSET(Fx_c, m_pPrtCollisionsmoke, 0x10); +VALIDATE_OFFSET(Fx_c, m_pPrtGunshell, 0x14); +VALIDATE_OFFSET(Fx_c, m_pPrtSand, 0x18); +VALIDATE_OFFSET(Fx_c, m_pPrtSand2, 0x1C); +VALIDATE_OFFSET(Fx_c, m_pPrtSmoke_huge, 0x20); +VALIDATE_OFFSET(Fx_c, m_pPrtSmokeII3expand, 0x24); +VALIDATE_OFFSET(Fx_c, m_pPrtSpark, 0x28); +VALIDATE_OFFSET(Fx_c, m_pPrtSpark2, 0x2C); +VALIDATE_OFFSET(Fx_c, m_pPrtSplash, 0x30); +VALIDATE_OFFSET(Fx_c, m_pPrtWake, 0x34); +VALIDATE_OFFSET(Fx_c, m_pPrtWatersplash, 0x38); +VALIDATE_OFFSET(Fx_c, m_pPrtWheeldirt, 0x3C); +VALIDATE_OFFSET(Fx_c, m_pPrtGlass, 0x40); +VALIDATE_OFFSET(Fx_c, m_entityFxList, 0x44); +VALIDATE_OFFSET(Fx_c, m_nBloodPoolsCount, 0x50); +VALIDATE_OFFSET(Fx_c, m_fxQuality, 0x54); +VALIDATE_OFFSET(Fx_c, m_nVerticesCount2, 0x58); +VALIDATE_OFFSET(Fx_c, m_nVerticesCount, 0x5C); +VALIDATE_OFFSET(Fx_c, m_nTransformRenderFlags, 0x60); +VALIDATE_OFFSET(Fx_c, m_pRasterToRender, 0x64); +VALIDATE_OFFSET(Fx_c, m_pTransformLTM, 0x68); +VALIDATE_OFFSET(Fx_c, m_pVerts, 0x6C); VALIDATE_SIZE(Fx_c, 0x70); void RenderBegin(RwRaster* raster, RwMatrix* transform, unsigned int transformRenderFlags); diff --git a/plugin_sa/game_sa/IplDef.h b/plugin_sa/game_sa/IplDef.h index fe19c9c8c..4d5c39baa 100644 --- a/plugin_sa/game_sa/IplDef.h +++ b/plugin_sa/game_sa/IplDef.h @@ -31,5 +31,17 @@ class PLUGIN_API IplDef { char _pad32[2]; public: }; - +VALIDATE_OFFSET(IplDef, m_boundBox, 0x0); +VALIDATE_OFFSET(IplDef, m_szName, 0x10); +VALIDATE_OFFSET(IplDef, m_nMinBuildingId, 0x22); +VALIDATE_OFFSET(IplDef, m_nMaxBuildingId, 0x24); +VALIDATE_OFFSET(IplDef, m_nMinDummyId, 0x26); +VALIDATE_OFFSET(IplDef, m_nMaxDummyId, 0x28); +VALIDATE_OFFSET(IplDef, m_nRelatedIpl, 0x2A); +VALIDATE_OFFSET(IplDef, m_bInterior, 0x2C); +VALIDATE_OFFSET(IplDef, field_2D, 0x2D); +VALIDATE_OFFSET(IplDef, m_bLoadRequest, 0x2E); +VALIDATE_OFFSET(IplDef, m_bDisableDynamicStreaming, 0x2F); +VALIDATE_OFFSET(IplDef, field_30, 0x30); +VALIDATE_OFFSET(IplDef, field_31, 0x31); VALIDATE_SIZE(IplDef, 0x34); \ No newline at end of file diff --git a/plugin_sa/game_sa/JPegCompress.cpp b/plugin_sa/game_sa/JPegCompress.cpp index ea6d347cb..61d163658 100644 --- a/plugin_sa/game_sa/JPegCompress.cpp +++ b/plugin_sa/game_sa/JPegCompress.cpp @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ # include "JPegCompress.h" # include "CScene.h" # include diff --git a/plugin_sa/game_sa/JPegCompress.h b/plugin_sa/game_sa/JPegCompress.h index cc269c2eb..d64acdcbc 100644 --- a/plugin_sa/game_sa/JPegCompress.h +++ b/plugin_sa/game_sa/JPegCompress.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include "PluginBase.h" #include "RenderWare.h" diff --git a/plugin_sa/game_sa/ListItem_c.cpp b/plugin_sa/game_sa/ListItem_c.cpp index 4401b1118..dda06a679 100644 --- a/plugin_sa/game_sa/ListItem_c.cpp +++ b/plugin_sa/game_sa/ListItem_c.cpp @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #include "ListItem_c.h" // US-1.00 @ 0x004A8DB0 diff --git a/plugin_sa/game_sa/ListItem_c.h b/plugin_sa/game_sa/ListItem_c.h index 56ef3436f..192004321 100644 --- a/plugin_sa/game_sa/ListItem_c.h +++ b/plugin_sa/game_sa/ListItem_c.h @@ -25,3 +25,4 @@ class PLUGIN_API ListItem_c friend class List_c; }; +VALIDATE_SIZE(ListItem_c, 0x8); diff --git a/plugin_sa/game_sa/List_c.cpp b/plugin_sa/game_sa/List_c.cpp index b64700027..0724ccd95 100644 --- a/plugin_sa/game_sa/List_c.cpp +++ b/plugin_sa/game_sa/List_c.cpp @@ -1,3 +1,9 @@ +/* + Plugin-SDK (Grand Theft Auto San Andreas) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ # include "List_c.h" # include diff --git a/plugin_sa/game_sa/List_c.h b/plugin_sa/game_sa/List_c.h index 13f9746a2..6472964ec 100644 --- a/plugin_sa/game_sa/List_c.h +++ b/plugin_sa/game_sa/List_c.h @@ -59,6 +59,10 @@ class PLUGIN_API List_c */ ListItem_c * GetItemOffset(bool bFromHead, int iOffset); }; +VALIDATE_OFFSET(List_c, last, 0x0); +VALIDATE_OFFSET(List_c, first, 0x4); +VALIDATE_OFFSET(List_c, count, 0x8); +VALIDATE_SIZE(List_c, 0xC); /** diff --git a/plugin_sa/game_sa/RpHAnimBlendInterpFrame.h b/plugin_sa/game_sa/RpHAnimBlendInterpFrame.h index 432aaa50e..cd6c7f987 100644 --- a/plugin_sa/game_sa/RpHAnimBlendInterpFrame.h +++ b/plugin_sa/game_sa/RpHAnimBlendInterpFrame.h @@ -13,5 +13,6 @@ struct RpHAnimBlendInterpFrame { RtQuat orientation; RwV3d translation; }; - +VALIDATE_OFFSET(RpHAnimBlendInterpFrame, orientation, 0x0); +VALIDATE_OFFSET(RpHAnimBlendInterpFrame, translation, 0x10); VALIDATE_SIZE(RpHAnimBlendInterpFrame, 0x1C); \ No newline at end of file diff --git a/plugin_sa/game_sa/RwObjectNameIdAssocation.h b/plugin_sa/game_sa/RwObjectNameIdAssocation.h index 49b1e64af..e942863a1 100644 --- a/plugin_sa/game_sa/RwObjectNameIdAssocation.h +++ b/plugin_sa/game_sa/RwObjectNameIdAssocation.h @@ -14,5 +14,7 @@ struct PLUGIN_API RwObjectNameIdAssocation unsigned int m_dwHierarchyId; unsigned int m_dwFlags; }; - +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_pName, 0x0); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_dwHierarchyId, 0x4); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_dwFlags, 0x8); VALIDATE_SIZE(RwObjectNameIdAssocation, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/SurfaceInfos_c.h b/plugin_sa/game_sa/SurfaceInfos_c.h index 08449b09d..b0379ade4 100644 --- a/plugin_sa/game_sa/SurfaceInfos_c.h +++ b/plugin_sa/game_sa/SurfaceInfos_c.h @@ -1,4 +1,4 @@ -/* +/* Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk @@ -74,6 +74,43 @@ struct SurfaceInfo { int32_t Climbable; char BulletFx[32]; }; +VALIDATE_OFFSET(SurfaceInfo, SurfaceName, 0x0); +VALIDATE_OFFSET(SurfaceInfo, AdhesionGroup, 0x40); +VALIDATE_OFFSET(SurfaceInfo, TyreGrip, 0x60); +VALIDATE_OFFSET(SurfaceInfo, WetGrip, 0x64); +VALIDATE_OFFSET(SurfaceInfo, SkidMark, 0x68); +VALIDATE_OFFSET(SurfaceInfo, FrictionEffect, 0x88); +VALIDATE_OFFSET(SurfaceInfo, SoftLand, 0xA8); +VALIDATE_OFFSET(SurfaceInfo, SeeThrough, 0xAC); +VALIDATE_OFFSET(SurfaceInfo, ShootThrough, 0xB0); +VALIDATE_OFFSET(SurfaceInfo, Sand, 0xB4); +VALIDATE_OFFSET(SurfaceInfo, Water, 0xB8); +VALIDATE_OFFSET(SurfaceInfo, ShallowWater, 0xBC); +VALIDATE_OFFSET(SurfaceInfo, Beach, 0xC0); +VALIDATE_OFFSET(SurfaceInfo, SteepSlope, 0xC4); +VALIDATE_OFFSET(SurfaceInfo, Glass, 0xC8); +VALIDATE_OFFSET(SurfaceInfo, Stairs, 0xCC); +VALIDATE_OFFSET(SurfaceInfo, Skateable, 0xD0); +VALIDATE_OFFSET(SurfaceInfo, Pavement, 0xD4); +VALIDATE_OFFSET(SurfaceInfo, Roughness, 0xD8); +VALIDATE_OFFSET(SurfaceInfo, Flame, 0xDC); +VALIDATE_OFFSET(SurfaceInfo, Sparks, 0xE0); +VALIDATE_OFFSET(SurfaceInfo, Sprint, 0xE4); +VALIDATE_OFFSET(SurfaceInfo, Footsteps, 0xE8); +VALIDATE_OFFSET(SurfaceInfo, FootDust, 0xEC); +VALIDATE_OFFSET(SurfaceInfo, CarDirt, 0xF0); +VALIDATE_OFFSET(SurfaceInfo, CarClean, 0xF4); +VALIDATE_OFFSET(SurfaceInfo, WheelGrass, 0xF8); +VALIDATE_OFFSET(SurfaceInfo, WheelGravel, 0xFC); +VALIDATE_OFFSET(SurfaceInfo, WheelMud, 0x100); +VALIDATE_OFFSET(SurfaceInfo, WheelDust, 0x104); +VALIDATE_OFFSET(SurfaceInfo, WheelSand, 0x108); +VALIDATE_OFFSET(SurfaceInfo, WheelSpray, 0x10C); +VALIDATE_OFFSET(SurfaceInfo, ProcPlant, 0x110); +VALIDATE_OFFSET(SurfaceInfo, ProcObj, 0x114); +VALIDATE_OFFSET(SurfaceInfo, Climbable, 0x118); +VALIDATE_OFFSET(SurfaceInfo, BulletFx, 0x11C); +VALIDATE_SIZE(SurfaceInfo, 0x13C); class SurfaceInfo_c { public: @@ -134,11 +171,12 @@ class SurfaceInfo_c { uint32_t m_nFlags2; }; }; - +VALIDATE_OFFSET(SurfaceInfo_c, tyreGrip, 0x0); +VALIDATE_OFFSET(SurfaceInfo_c, wetGrip, 0x1); +VALIDATE_OFFSET(SurfaceInfo_c, m_nFlags1, 0x4); +VALIDATE_OFFSET(SurfaceInfo_c, m_nFlags2, 0x4); VALIDATE_SIZE(SurfaceInfo_c, 0xC); - - class SurfaceInfos_c { public: float m_adhesiveLimits[6][6]; @@ -198,4 +236,6 @@ class SurfaceInfos_c { bool IsAudioTile(SurfaceId id); float GetAdhesiveLimit(CColPoint* colPoint); }; +VALIDATE_OFFSET(SurfaceInfos_c, m_adhesiveLimits, 0x0); +VALIDATE_OFFSET(SurfaceInfos_c, m_surfaces, 0x90); VALIDATE_SIZE(SurfaceInfos_c, 0x8F4); \ No newline at end of file diff --git a/plugin_sa/game_sa/TxdDef.h b/plugin_sa/game_sa/TxdDef.h index 25f2261c0..4bdf3f89d 100644 --- a/plugin_sa/game_sa/TxdDef.h +++ b/plugin_sa/game_sa/TxdDef.h @@ -16,5 +16,8 @@ class TxdDef { short m_wParentIndex; unsigned int m_hash; }; - +VALIDATE_OFFSET(TxdDef, m_pRwDictionary, 0x0); +VALIDATE_OFFSET(TxdDef, m_wRefsCount, 0x4); +VALIDATE_OFFSET(TxdDef, m_wParentIndex, 0x6); +VALIDATE_OFFSET(TxdDef, m_hash, 0x8); VALIDATE_SIZE(TxdDef, 0xC); \ No newline at end of file diff --git a/plugin_sa/game_sa/cHandlingDataMgr.h b/plugin_sa/game_sa/cHandlingDataMgr.h index 9dc629873..92451cc9d 100644 --- a/plugin_sa/game_sa/cHandlingDataMgr.h +++ b/plugin_sa/game_sa/cHandlingDataMgr.h @@ -47,7 +47,15 @@ class PLUGIN_API cHandlingDataMgr // get boat handling by id tBoatHandlingData *GetBoatPointer(unsigned char handlingId); }; - +VALIDATE_OFFSET(cHandlingDataMgr, field_0, 0x0); +VALIDATE_OFFSET(cHandlingDataMgr, field_4, 0x4); +VALIDATE_OFFSET(cHandlingDataMgr, field_8, 0x8); +VALIDATE_OFFSET(cHandlingDataMgr, field_C, 0xC); +VALIDATE_OFFSET(cHandlingDataMgr, field_10, 0x10); +VALIDATE_OFFSET(cHandlingDataMgr, m_aVehicleHandling, 0x14); +VALIDATE_OFFSET(cHandlingDataMgr, m_aBikeHandling, 0xB7D4); +VALIDATE_OFFSET(cHandlingDataMgr, m_aFlyingHandling, 0xBB14); +VALIDATE_OFFSET(cHandlingDataMgr, m_aBoatHandling, 0xC354); VALIDATE_SIZE(cHandlingDataMgr, 0xC624); extern cHandlingDataMgr& gHandlingDataMgr; \ No newline at end of file diff --git a/plugin_sa/game_sa/cTransmission.h b/plugin_sa/game_sa/cTransmission.h index c3d631466..ec2a243b6 100644 --- a/plugin_sa/game_sa/cTransmission.h +++ b/plugin_sa/game_sa/cTransmission.h @@ -31,5 +31,16 @@ class PLUGIN_API cTransmission { void DisplayGearRatios(); float CalculateDriveAcceleration(float& gasPedal, unsigned char& currrentGear, float& gearChangeCount, float& speed, float& unk1, float& unk2, bool allWheelsOnGround, unsigned char handlingType); }; - +VALIDATE_OFFSET(cTransmission, m_aGears, 0x0); +VALIDATE_OFFSET(cTransmission, m_nDriveType, 0x48); +VALIDATE_OFFSET(cTransmission, m_nEngineType, 0x49); +VALIDATE_OFFSET(cTransmission, m_nNumberOfGears, 0x4A); +VALIDATE_OFFSET(cTransmission, field_4B, 0x4B); +VALIDATE_OFFSET(cTransmission, m_nHandlingFlags, 0x4C); +VALIDATE_OFFSET(cTransmission, m_fEngineAcceleration, 0x50); +VALIDATE_OFFSET(cTransmission, m_fEngineInertia, 0x54); +VALIDATE_OFFSET(cTransmission, m_fMaxGearVelocity, 0x58); +VALIDATE_OFFSET(cTransmission, field_5C, 0x5C); +VALIDATE_OFFSET(cTransmission, m_fMinGearVelocity, 0x60); +VALIDATE_OFFSET(cTransmission, m_fCurrentSpeed, 0x64); VALIDATE_SIZE(cTransmission, 0x68); diff --git a/plugin_sa/game_sa/enums/eAnimations.h b/plugin_sa/game_sa/enums/eAnimations.h index cae45f3ee..59a77fee2 100644 --- a/plugin_sa/game_sa/enums/eAnimations.h +++ b/plugin_sa/game_sa/enums/eAnimations.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once enum eAnimGroup diff --git a/plugin_sa/game_sa/meta/meta.CAnimBlendAssociation.h b/plugin_sa/game_sa/meta/meta.CAnimBlendAssociation.h index 6ef912838..aab4027da 100644 --- a/plugin_sa/game_sa/meta/meta.CAnimBlendAssociation.h +++ b/plugin_sa/game_sa/meta/meta.CAnimBlendAssociation.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CAnimBlendClumpData.h b/plugin_sa/game_sa/meta/meta.CAnimBlendClumpData.h index 57106fbb6..dde4bc3fb 100644 --- a/plugin_sa/game_sa/meta/meta.CAnimBlendClumpData.h +++ b/plugin_sa/game_sa/meta/meta.CAnimBlendClumpData.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CAnimBlendStaticAssociation.h b/plugin_sa/game_sa/meta/meta.CAnimBlendStaticAssociation.h index ac1433192..36269db7d 100644 --- a/plugin_sa/game_sa/meta/meta.CAnimBlendStaticAssociation.h +++ b/plugin_sa/game_sa/meta/meta.CAnimBlendStaticAssociation.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCamera.h b/plugin_sa/game_sa/meta/meta.CCamera.h index 012301d27..90a369368 100644 --- a/plugin_sa/game_sa/meta/meta.CCamera.h +++ b/plugin_sa/game_sa/meta/meta.CCamera.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCarEnterExit.h b/plugin_sa/game_sa/meta/meta.CCarEnterExit.h index b1757dab1..ec2b2ea98 100644 --- a/plugin_sa/game_sa/meta/meta.CCarEnterExit.h +++ b/plugin_sa/game_sa/meta/meta.CCarEnterExit.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCarGenerator.h b/plugin_sa/game_sa/meta/meta.CCarGenerator.h index c3a1b0301..36a271b03 100644 --- a/plugin_sa/game_sa/meta/meta.CCarGenerator.h +++ b/plugin_sa/game_sa/meta/meta.CCarGenerator.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCarPathLink.h b/plugin_sa/game_sa/meta/meta.CCarPathLink.h index e4bb5801d..f0127b609 100644 --- a/plugin_sa/game_sa/meta/meta.CCarPathLink.h +++ b/plugin_sa/game_sa/meta/meta.CCarPathLink.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCheat.h b/plugin_sa/game_sa/meta/meta.CCheat.h index 81c0bc483..4b8730e13 100644 --- a/plugin_sa/game_sa/meta/meta.CCheat.h +++ b/plugin_sa/game_sa/meta/meta.CCheat.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CClock.h b/plugin_sa/game_sa/meta/meta.CClock.h index 7bcc232a3..816aad6d9 100644 --- a/plugin_sa/game_sa/meta/meta.CClock.h +++ b/plugin_sa/game_sa/meta/meta.CClock.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCover.h b/plugin_sa/game_sa/meta/meta.CCover.h index df295bfca..3f29af159 100644 --- a/plugin_sa/game_sa/meta/meta.CCover.h +++ b/plugin_sa/game_sa/meta/meta.CCover.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CCoverPoint.h b/plugin_sa/game_sa/meta/meta.CCoverPoint.h index aee276981..4296c69cc 100644 --- a/plugin_sa/game_sa/meta/meta.CCoverPoint.h +++ b/plugin_sa/game_sa/meta/meta.CCoverPoint.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CDate.h b/plugin_sa/game_sa/meta/meta.CDate.h index fbd449328..62e89b28e 100644 --- a/plugin_sa/game_sa/meta/meta.CDate.h +++ b/plugin_sa/game_sa/meta/meta.CDate.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CEntryExit.h b/plugin_sa/game_sa/meta/meta.CEntryExit.h index a5fe99fdc..0c1ee6df8 100644 --- a/plugin_sa/game_sa/meta/meta.CEntryExit.h +++ b/plugin_sa/game_sa/meta/meta.CEntryExit.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CEntryExitManager.h b/plugin_sa/game_sa/meta/meta.CEntryExitManager.h index 1c9c0b349..e27020853 100644 --- a/plugin_sa/game_sa/meta/meta.CEntryExitManager.h +++ b/plugin_sa/game_sa/meta/meta.CEntryExitManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CFileLoader.h b/plugin_sa/game_sa/meta/meta.CFileLoader.h index 71531a5c5..086985175 100644 --- a/plugin_sa/game_sa/meta/meta.CFileLoader.h +++ b/plugin_sa/game_sa/meta/meta.CFileLoader.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CFormation.h b/plugin_sa/game_sa/meta/meta.CFormation.h index 0830d8553..8e9094463 100644 --- a/plugin_sa/game_sa/meta/meta.CFormation.h +++ b/plugin_sa/game_sa/meta/meta.CFormation.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGame.h b/plugin_sa/game_sa/meta/meta.CGame.h index c7e60542e..152bc02a2 100644 --- a/plugin_sa/game_sa/meta/meta.CGame.h +++ b/plugin_sa/game_sa/meta/meta.CGame.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGangInfo.h b/plugin_sa/game_sa/meta/meta.CGangInfo.h index 9e1f53447..4bb8f7178 100644 --- a/plugin_sa/game_sa/meta/meta.CGangInfo.h +++ b/plugin_sa/game_sa/meta/meta.CGangInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGangWars.h b/plugin_sa/game_sa/meta/meta.CGangWars.h index 307e09018..b1b6504f2 100644 --- a/plugin_sa/game_sa/meta/meta.CGangWars.h +++ b/plugin_sa/game_sa/meta/meta.CGangWars.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGangWarsSaveStructure.h b/plugin_sa/game_sa/meta/meta.CGangWarsSaveStructure.h index ad2c92d35..8953c5b5e 100644 --- a/plugin_sa/game_sa/meta/meta.CGangWarsSaveStructure.h +++ b/plugin_sa/game_sa/meta/meta.CGangWarsSaveStructure.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGangs.h b/plugin_sa/game_sa/meta/meta.CGangs.h index 01fe30c75..6937e9147 100644 --- a/plugin_sa/game_sa/meta/meta.CGangs.h +++ b/plugin_sa/game_sa/meta/meta.CGangs.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGenericGameStorage.h b/plugin_sa/game_sa/meta/meta.CGenericGameStorage.h index d602ad80c..9ca028c4e 100644 --- a/plugin_sa/game_sa/meta/meta.CGenericGameStorage.h +++ b/plugin_sa/game_sa/meta/meta.CGenericGameStorage.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CGridRef.h b/plugin_sa/game_sa/meta/meta.CGridRef.h index 0ce628877..608d09eb0 100644 --- a/plugin_sa/game_sa/meta/meta.CGridRef.h +++ b/plugin_sa/game_sa/meta/meta.CGridRef.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CMatrixLink.h b/plugin_sa/game_sa/meta/meta.CMatrixLink.h index ad5ae8da1..a3df81638 100644 --- a/plugin_sa/game_sa/meta/meta.CMatrixLink.h +++ b/plugin_sa/game_sa/meta/meta.CMatrixLink.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.COnscreenCounterEntry.h b/plugin_sa/game_sa/meta/meta.COnscreenCounterEntry.h index 5e25919a1..141e3f478 100644 --- a/plugin_sa/game_sa/meta/meta.COnscreenCounterEntry.h +++ b/plugin_sa/game_sa/meta/meta.COnscreenCounterEntry.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.COnscreenTimer.h b/plugin_sa/game_sa/meta/meta.COnscreenTimer.h index 1998e2d0b..9f3cfb86e 100644 --- a/plugin_sa/game_sa/meta/meta.COnscreenTimer.h +++ b/plugin_sa/game_sa/meta/meta.COnscreenTimer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.COnscreenTimerEntry.h b/plugin_sa/game_sa/meta/meta.COnscreenTimerEntry.h index ca59cde3c..c410d33b0 100644 --- a/plugin_sa/game_sa/meta/meta.COnscreenTimerEntry.h +++ b/plugin_sa/game_sa/meta/meta.COnscreenTimerEntry.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPathNode.h b/plugin_sa/game_sa/meta/meta.CPathNode.h index 14bb8eff7..ce7fce946 100644 --- a/plugin_sa/game_sa/meta/meta.CPathNode.h +++ b/plugin_sa/game_sa/meta/meta.CPathNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedGroup.h b/plugin_sa/game_sa/meta/meta.CPedGroup.h index b99a62a82..52b475624 100644 --- a/plugin_sa/game_sa/meta/meta.CPedGroup.h +++ b/plugin_sa/game_sa/meta/meta.CPedGroup.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedGroupIntelligence.h b/plugin_sa/game_sa/meta/meta.CPedGroupIntelligence.h index 6d16d22a7..a437d877c 100644 --- a/plugin_sa/game_sa/meta/meta.CPedGroupIntelligence.h +++ b/plugin_sa/game_sa/meta/meta.CPedGroupIntelligence.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedGroupMembership.h b/plugin_sa/game_sa/meta/meta.CPedGroupMembership.h index 1bcf16313..639cb7111 100644 --- a/plugin_sa/game_sa/meta/meta.CPedGroupMembership.h +++ b/plugin_sa/game_sa/meta/meta.CPedGroupMembership.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedGroupPlacer.h b/plugin_sa/game_sa/meta/meta.CPedGroupPlacer.h index ababfdb25..4e9f60fba 100644 --- a/plugin_sa/game_sa/meta/meta.CPedGroupPlacer.h +++ b/plugin_sa/game_sa/meta/meta.CPedGroupPlacer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedGroups.h b/plugin_sa/game_sa/meta/meta.CPedGroups.h index 0eec7002d..641d28049 100644 --- a/plugin_sa/game_sa/meta/meta.CPedGroups.h +++ b/plugin_sa/game_sa/meta/meta.CPedGroups.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedList.h b/plugin_sa/game_sa/meta/meta.CPedList.h index 0f6d90025..f56e2a720 100644 --- a/plugin_sa/game_sa/meta/meta.CPedList.h +++ b/plugin_sa/game_sa/meta/meta.CPedList.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedPlacement.h b/plugin_sa/game_sa/meta/meta.CPedPlacement.h index 5d5dbc05a..b588d6137 100644 --- a/plugin_sa/game_sa/meta/meta.CPedPlacement.h +++ b/plugin_sa/game_sa/meta/meta.CPedPlacement.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPedTaskPair.h b/plugin_sa/game_sa/meta/meta.CPedTaskPair.h index ffb57df58..c1465e9cd 100644 --- a/plugin_sa/game_sa/meta/meta.CPedTaskPair.h +++ b/plugin_sa/game_sa/meta/meta.CPedTaskPair.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CPointList.h b/plugin_sa/game_sa/meta/meta.CPointList.h index fdbde9899..d91b71754 100644 --- a/plugin_sa/game_sa/meta/meta.CPointList.h +++ b/plugin_sa/game_sa/meta/meta.CPointList.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CRoadBlocks.h b/plugin_sa/game_sa/meta/meta.CRoadBlocks.h index a8f91977a..16d413be2 100644 --- a/plugin_sa/game_sa/meta/meta.CRoadBlocks.h +++ b/plugin_sa/game_sa/meta/meta.CRoadBlocks.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CRunningScript.h b/plugin_sa/game_sa/meta/meta.CRunningScript.h index 3fee891b1..a70528883 100644 --- a/plugin_sa/game_sa/meta/meta.CRunningScript.h +++ b/plugin_sa/game_sa/meta/meta.CRunningScript.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CScriptResourceManager.h b/plugin_sa/game_sa/meta/meta.CScriptResourceManager.h index e343bc31c..f701c8bd2 100644 --- a/plugin_sa/game_sa/meta/meta.CScriptResourceManager.h +++ b/plugin_sa/game_sa/meta/meta.CScriptResourceManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CScriptsForBrains.h b/plugin_sa/game_sa/meta/meta.CScriptsForBrains.h index 719efca10..32eecd772 100644 --- a/plugin_sa/game_sa/meta/meta.CScriptsForBrains.h +++ b/plugin_sa/game_sa/meta/meta.CScriptsForBrains.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CSpecialPlateHandler.h b/plugin_sa/game_sa/meta/meta.CSpecialPlateHandler.h index fb549e083..3e779da79 100644 --- a/plugin_sa/game_sa/meta/meta.CSpecialPlateHandler.h +++ b/plugin_sa/game_sa/meta/meta.CSpecialPlateHandler.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CStreamedScripts.h b/plugin_sa/game_sa/meta/meta.CStreamedScripts.h index 82836cd5d..4fc7ee2e3 100644 --- a/plugin_sa/game_sa/meta/meta.CStreamedScripts.h +++ b/plugin_sa/game_sa/meta/meta.CStreamedScripts.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CStreaming.h b/plugin_sa/game_sa/meta/meta.CStreaming.h index c0d0a0fd3..213872b20 100644 --- a/plugin_sa/game_sa/meta/meta.CStreaming.h +++ b/plugin_sa/game_sa/meta/meta.CStreaming.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CStreamingInfo.h b/plugin_sa/game_sa/meta/meta.CStreamingInfo.h index 1329d8eea..78e741729 100644 --- a/plugin_sa/game_sa/meta/meta.CStreamingInfo.h +++ b/plugin_sa/game_sa/meta/meta.CStreamingInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CStuckCarCheck.h b/plugin_sa/game_sa/meta/meta.CStuckCarCheck.h index e6723aafc..005d395fa 100644 --- a/plugin_sa/game_sa/meta/meta.CStuckCarCheck.h +++ b/plugin_sa/game_sa/meta/meta.CStuckCarCheck.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CText.h b/plugin_sa/game_sa/meta/meta.CText.h index 96db1fd57..62d6ecb80 100644 --- a/plugin_sa/game_sa/meta/meta.CText.h +++ b/plugin_sa/game_sa/meta/meta.CText.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CTheCarGenerators.h b/plugin_sa/game_sa/meta/meta.CTheCarGenerators.h index 52287cc33..6eb2aab2c 100644 --- a/plugin_sa/game_sa/meta/meta.CTheCarGenerators.h +++ b/plugin_sa/game_sa/meta/meta.CTheCarGenerators.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CTheScripts.h b/plugin_sa/game_sa/meta/meta.CTheScripts.h index 5e1c2c4e7..1e0f10b08 100644 --- a/plugin_sa/game_sa/meta/meta.CTheScripts.h +++ b/plugin_sa/game_sa/meta/meta.CTheScripts.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/meta/meta.CUpsideDownCarCheck.h b/plugin_sa/game_sa/meta/meta.CUpsideDownCarCheck.h index 331426ca5..70f68eea5 100644 --- a/plugin_sa/game_sa/meta/meta.CUpsideDownCarCheck.h +++ b/plugin_sa/game_sa/meta/meta.CUpsideDownCarCheck.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_sa/game_sa/tBikeHandlingData.h b/plugin_sa/game_sa/tBikeHandlingData.h index 6337a20a4..67f24109f 100644 --- a/plugin_sa/game_sa/tBikeHandlingData.h +++ b/plugin_sa/game_sa/tBikeHandlingData.h @@ -26,5 +26,20 @@ struct PLUGIN_API tBikeHandlingData { float m_fWheelieStabMult; float m_fStoppieStabMult; }; - +VALIDATE_OFFSET(tBikeHandlingData, m_nVehicleId, 0x0); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanFwdCOM, 0x4); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanFwdForce, 0x8); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanBakCOM, 0xC); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanBakForce, 0x10); +VALIDATE_OFFSET(tBikeHandlingData, m_fMaxLean, 0x14); +VALIDATE_OFFSET(tBikeHandlingData, m_fFullAnimLean, 0x18); +VALIDATE_OFFSET(tBikeHandlingData, m_fDesLean, 0x1C); +VALIDATE_OFFSET(tBikeHandlingData, m_fSpeedSteer, 0x20); +VALIDATE_OFFSET(tBikeHandlingData, m_fSlipSteer, 0x24); +VALIDATE_OFFSET(tBikeHandlingData, m_fNoPlayerCOMz, 0x28); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieAng, 0x2C); +VALIDATE_OFFSET(tBikeHandlingData, m_fStoppieAng, 0x30); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieSteer, 0x34); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieStabMult, 0x38); +VALIDATE_OFFSET(tBikeHandlingData, m_fStoppieStabMult, 0x3C); VALIDATE_SIZE(tBikeHandlingData, 0x40); diff --git a/plugin_sa/game_sa/tBinaryIplFile.h b/plugin_sa/game_sa/tBinaryIplFile.h index 5894e7bd6..049eb2f61 100644 --- a/plugin_sa/game_sa/tBinaryIplFile.h +++ b/plugin_sa/game_sa/tBinaryIplFile.h @@ -28,5 +28,9 @@ struct tBinaryIplFile { char _unused40[12]; public: }; - +VALIDATE_OFFSET(tBinaryIplFile, fourcc, 0x0); +VALIDATE_OFFSET(tBinaryIplFile, numInstances, 0x4); +VALIDATE_OFFSET(tBinaryIplFile, numCarGenerators, 0x14); +VALIDATE_OFFSET(tBinaryIplFile, instancesOffset, 0x1C); +VALIDATE_OFFSET(tBinaryIplFile, carGeneratorsOffset, 0x3C); VALIDATE_SIZE(tBinaryIplFile, 0x4C); \ No newline at end of file diff --git a/plugin_sa/game_sa/tBoatHandlingData.h b/plugin_sa/game_sa/tBoatHandlingData.h index 6f4071394..87998635f 100644 --- a/plugin_sa/game_sa/tBoatHandlingData.h +++ b/plugin_sa/game_sa/tBoatHandlingData.h @@ -22,5 +22,15 @@ struct PLUGIN_API tBoatHandlingData { CVector m_vecMoveRes; CVector m_vecTurnRes; }; - +VALIDATE_OFFSET(tBoatHandlingData, m_nVehicleId, 0x0); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustY, 0x4); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustZ, 0x8); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustAppZ, 0xC); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneForce, 0x10); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneLimit, 0x14); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneOffset, 0x18); +VALIDATE_OFFSET(tBoatHandlingData, m_fWaveAudioMult, 0x1C); +VALIDATE_OFFSET(tBoatHandlingData, m_fLookLRBehindCamHeight, 0x20); +VALIDATE_OFFSET(tBoatHandlingData, m_vecMoveRes, 0x24); +VALIDATE_OFFSET(tBoatHandlingData, m_vecTurnRes, 0x30); VALIDATE_SIZE(tBoatHandlingData, 0x3C); diff --git a/plugin_sa/game_sa/tFlyingHandlingData.h b/plugin_sa/game_sa/tFlyingHandlingData.h index 5e3676878..5b79f86cc 100644 --- a/plugin_sa/game_sa/tFlyingHandlingData.h +++ b/plugin_sa/game_sa/tFlyingHandlingData.h @@ -29,5 +29,22 @@ struct PLUGIN_API tFlyingHandlingData { CVector m_vecTurnRes; CVector m_vecSpeedRes; }; - +VALIDATE_OFFSET(tFlyingHandlingData, m_nVehicleId, 0x0); +VALIDATE_OFFSET(tFlyingHandlingData, m_fThrust, 0x4); +VALIDATE_OFFSET(tFlyingHandlingData, m_fThrustFallOff, 0x8); +VALIDATE_OFFSET(tFlyingHandlingData, m_fYaw, 0xC); +VALIDATE_OFFSET(tFlyingHandlingData, m_fYawStab, 0x10); +VALIDATE_OFFSET(tFlyingHandlingData, m_fSideSlip, 0x14); +VALIDATE_OFFSET(tFlyingHandlingData, m_fRoll, 0x18); +VALIDATE_OFFSET(tFlyingHandlingData, m_fRollStab, 0x1C); +VALIDATE_OFFSET(tFlyingHandlingData, m_fPitch, 0x20); +VALIDATE_OFFSET(tFlyingHandlingData, m_fPitchStab, 0x24); +VALIDATE_OFFSET(tFlyingHandlingData, m_fFormLift, 0x28); +VALIDATE_OFFSET(tFlyingHandlingData, m_fAttackLift, 0x2C); +VALIDATE_OFFSET(tFlyingHandlingData, m_fGearUpR, 0x30); +VALIDATE_OFFSET(tFlyingHandlingData, m_fGearDownL, 0x34); +VALIDATE_OFFSET(tFlyingHandlingData, m_fWindMult, 0x38); +VALIDATE_OFFSET(tFlyingHandlingData, m_fMoveRes, 0x3C); +VALIDATE_OFFSET(tFlyingHandlingData, m_vecTurnRes, 0x40); +VALIDATE_OFFSET(tFlyingHandlingData, m_vecSpeedRes, 0x4C); VALIDATE_SIZE(tFlyingHandlingData, 0x58); diff --git a/plugin_sa/game_sa/tHandlingData.h b/plugin_sa/game_sa/tHandlingData.h index f5366321f..2320d311b 100644 --- a/plugin_sa/game_sa/tHandlingData.h +++ b/plugin_sa/game_sa/tHandlingData.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto San Andreas) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto San Andreas) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "cTransmission.h" #include "CVector.h" @@ -124,5 +123,38 @@ struct PLUGIN_API tHandlingData { eVehicleLightsSize m_nRearLights; unsigned char m_nAnimGroup; }; - +VALIDATE_OFFSET(tHandlingData, m_nVehicleId, 0x0); +VALIDATE_OFFSET(tHandlingData, m_fMass, 0x4); +VALIDATE_OFFSET(tHandlingData, field_8, 0x8); +VALIDATE_OFFSET(tHandlingData, m_fTurnMass, 0xC); +VALIDATE_OFFSET(tHandlingData, m_fDragMult, 0x10); +VALIDATE_OFFSET(tHandlingData, m_vecCentreOfMass, 0x14); +VALIDATE_OFFSET(tHandlingData, m_nPercentSubmerged, 0x20); +VALIDATE_OFFSET(tHandlingData, m_fBuoyancyConstant, 0x24); +VALIDATE_OFFSET(tHandlingData, m_fTractionMultiplier, 0x28); +VALIDATE_OFFSET(tHandlingData, m_transmissionData, 0x2C); +VALIDATE_OFFSET(tHandlingData, m_fBrakeDeceleration, 0x94); +VALIDATE_OFFSET(tHandlingData, m_fBrakeBias, 0x98); +VALIDATE_OFFSET(tHandlingData, m_bABS, 0x9C); +VALIDATE_OFFSET(tHandlingData, field_9D, 0x9D); +VALIDATE_OFFSET(tHandlingData, field_9E, 0x9E); +VALIDATE_OFFSET(tHandlingData, field_9F, 0x9F); +VALIDATE_OFFSET(tHandlingData, m_fSteeringLock, 0xA0); +VALIDATE_OFFSET(tHandlingData, m_fTractionLoss, 0xA4); +VALIDATE_OFFSET(tHandlingData, m_fTractionBias, 0xA8); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionForceLevel, 0xAC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionDampingLevel, 0xB0); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionHighSpdComDamp, 0xB4); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionUpperLimit, 0xB8); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionLowerLimit, 0xBC); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionBiasBetweenFrontAndRear, 0xC0); +VALIDATE_OFFSET(tHandlingData, m_fSuspensionAntiDiveMultiplier, 0xC4); +VALIDATE_OFFSET(tHandlingData, m_fCollisionDamageMultiplier, 0xC8); +VALIDATE_OFFSET(tHandlingData, m_nModelFlags, 0xCC); +VALIDATE_OFFSET(tHandlingData, m_nHandlingFlags, 0xD0); +VALIDATE_OFFSET(tHandlingData, m_fSeatOffsetDistance, 0xD4); +VALIDATE_OFFSET(tHandlingData, m_nMonetaryValue, 0xD8); +VALIDATE_OFFSET(tHandlingData, m_nFrontLights, 0xDC); +VALIDATE_OFFSET(tHandlingData, m_nRearLights, 0xDD); +VALIDATE_OFFSET(tHandlingData, m_nAnimGroup, 0xDE); VALIDATE_SIZE(tHandlingData, 0xE0); diff --git a/plugin_sa/game_sa/tPickupMessage.h b/plugin_sa/game_sa/tPickupMessage.h index fced5d557..098ccea31 100644 --- a/plugin_sa/game_sa/tPickupMessage.h +++ b/plugin_sa/game_sa/tPickupMessage.h @@ -23,5 +23,14 @@ struct tPickupMessage { unsigned int price; char *messageText; }; - +VALIDATE_OFFSET(tPickupMessage, x, 0x0); +VALIDATE_OFFSET(tPickupMessage, y, 0x4); +VALIDATE_OFFSET(tPickupMessage, z, 0x8); +VALIDATE_OFFSET(tPickupMessage, width, 0xC); +VALIDATE_OFFSET(tPickupMessage, height, 0x10); +VALIDATE_OFFSET(tPickupMessage, color, 0x14); +VALIDATE_OFFSET(tPickupMessage, flags, 0x18); +VALIDATE_OFFSET(tPickupMessage, field_19, 0x19); +VALIDATE_OFFSET(tPickupMessage, price, 0x1C); +VALIDATE_OFFSET(tPickupMessage, messageText, 0x20); VALIDATE_SIZE(tPickupMessage, 0x24); \ No newline at end of file diff --git a/plugin_sa/game_sa/tTransmissionGear.h b/plugin_sa/game_sa/tTransmissionGear.h index fca20f09e..87def4413 100644 --- a/plugin_sa/game_sa/tTransmissionGear.h +++ b/plugin_sa/game_sa/tTransmissionGear.h @@ -14,5 +14,7 @@ struct PLUGIN_API tTransmissionGear float m_fChangeUpVelocity; float m_fChangeDownVelocity; }; - +VALIDATE_OFFSET(tTransmissionGear, m_fMaxVelocity, 0x0); +VALIDATE_OFFSET(tTransmissionGear, m_fChangeUpVelocity, 0x4); +VALIDATE_OFFSET(tTransmissionGear, m_fChangeDownVelocity, 0x8); VALIDATE_SIZE(tTransmissionGear, 0xC); \ No newline at end of file diff --git a/plugin_sa_unreal/game_sa_unreal/CCopPed.h b/plugin_sa_unreal/game_sa_unreal/CCopPed.h index 63624df56..92ee375d7 100644 --- a/plugin_sa_unreal/game_sa_unreal/CCopPed.h +++ b/plugin_sa_unreal/game_sa_unreal/CCopPed.h @@ -11,3 +11,4 @@ class CCopPed { public: }; +VALIDATE_SIZE(CCopPed, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CCutsceneObject.h b/plugin_sa_unreal/game_sa_unreal/CCutsceneObject.h index 688745e7d..d320feced 100644 --- a/plugin_sa_unreal/game_sa_unreal/CCutsceneObject.h +++ b/plugin_sa_unreal/game_sa_unreal/CCutsceneObject.h @@ -11,3 +11,4 @@ class CCutsceneObject { public: }; +VALIDATE_SIZE(CCutsceneObject, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CFont.h b/plugin_sa_unreal/game_sa_unreal/CFont.h index f5ccac16e..c7acc88d5 100644 --- a/plugin_sa_unreal/game_sa_unreal/CFont.h +++ b/plugin_sa_unreal/game_sa_unreal/CFont.h @@ -34,6 +34,31 @@ struct CFontDetails { int8_t EdgeAmount; int8_t EdgeSpace; }; +VALIDATE_OFFSET(CFontDetails, Color, 0x0); +VALIDATE_OFFSET(CFontDetails, ScaleX, 0x4); +VALIDATE_OFFSET(CFontDetails, ScaleY, 0x8); +VALIDATE_OFFSET(CFontDetails, Slope, 0xC); +VALIDATE_OFFSET(CFontDetails, SlopeRefX, 0x10); +VALIDATE_OFFSET(CFontDetails, SlopeRefY, 0x14); +VALIDATE_OFFSET(CFontDetails, Justify, 0x18); +VALIDATE_OFFSET(CFontDetails, Centre, 0x19); +VALIDATE_OFFSET(CFontDetails, RightJustify, 0x1A); +VALIDATE_OFFSET(CFontDetails, Background, 0x1B); +VALIDATE_OFFSET(CFontDetails, BackgroundOutline, 0x1C); +VALIDATE_OFFSET(CFontDetails, Proportional, 0x1D); +VALIDATE_OFFSET(CFontDetails, Shadow, 0x1E); +VALIDATE_OFFSET(CFontDetails, AlphaFade, 0x20); +VALIDATE_OFFSET(CFontDetails, BGColor, 0x24); +VALIDATE_OFFSET(CFontDetails, WrapEnd, 0x28); +VALIDATE_OFFSET(CFontDetails, Centrex, 0x2C); +VALIDATE_OFFSET(CFontDetails, RightJustifyWrap, 0x30); +VALIDATE_OFFSET(CFontDetails, Style, 0x34); +VALIDATE_OFFSET(CFontDetails, ExtraFont, 0x35); +VALIDATE_OFFSET(CFontDetails, DropAmount, 0x36); +VALIDATE_OFFSET(CFontDetails, DropColor, 0x37); +VALIDATE_OFFSET(CFontDetails, EdgeAmount, 0x3B); +VALIDATE_OFFSET(CFontDetails, EdgeSpace, 0x3C); +VALIDATE_SIZE(CFontDetails, 0x40); class CFont { public: @@ -43,3 +68,4 @@ class CFont { static void PrintString(float x, float y, const char* str); static void RenderFontBuffer(); }; +VALIDATE_SIZE(CFont, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CHeli.h b/plugin_sa_unreal/game_sa_unreal/CHeli.h index f86c0c825..a7892e71d 100644 --- a/plugin_sa_unreal/game_sa_unreal/CHeli.h +++ b/plugin_sa_unreal/game_sa_unreal/CHeli.h @@ -11,3 +11,4 @@ class CHeli { public: }; +VALIDATE_SIZE(CHeli, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CObject.h b/plugin_sa_unreal/game_sa_unreal/CObject.h index dfa8fcde1..0af6dffb8 100644 --- a/plugin_sa_unreal/game_sa_unreal/CObject.h +++ b/plugin_sa_unreal/game_sa_unreal/CObject.h @@ -11,3 +11,4 @@ class CObject { public: }; +VALIDATE_SIZE(CObject, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CPad.h b/plugin_sa_unreal/game_sa_unreal/CPad.h index 541547328..b2459c1d1 100644 --- a/plugin_sa_unreal/game_sa_unreal/CPad.h +++ b/plugin_sa_unreal/game_sa_unreal/CPad.h @@ -33,7 +33,30 @@ struct CControllerState { int16_t m_bVehicleMouseLook; int16_t m_bRadioTrackSkip; }; - +VALIDATE_OFFSET(CControllerState, LeftStickX, 0x0); +VALIDATE_OFFSET(CControllerState, LeftStickY, 0x2); +VALIDATE_OFFSET(CControllerState, RightStickX, 0x4); +VALIDATE_OFFSET(CControllerState, RightStickY, 0x6); +VALIDATE_OFFSET(CControllerState, LeftShoulder1, 0x8); +VALIDATE_OFFSET(CControllerState, LeftShoulder2, 0xA); +VALIDATE_OFFSET(CControllerState, RightShoulder1, 0xC); +VALIDATE_OFFSET(CControllerState, RightShoulder2, 0xE); +VALIDATE_OFFSET(CControllerState, DPadUp, 0x10); +VALIDATE_OFFSET(CControllerState, DPadDown, 0x12); +VALIDATE_OFFSET(CControllerState, DPadLeft, 0x14); +VALIDATE_OFFSET(CControllerState, DPadRight, 0x16); +VALIDATE_OFFSET(CControllerState, Start, 0x18); +VALIDATE_OFFSET(CControllerState, Select, 0x1A); +VALIDATE_OFFSET(CControllerState, ButtonSquare, 0x1C); +VALIDATE_OFFSET(CControllerState, ButtonTriangle, 0x1E); +VALIDATE_OFFSET(CControllerState, ButtonCross, 0x20); +VALIDATE_OFFSET(CControllerState, ButtonCircle, 0x22); +VALIDATE_OFFSET(CControllerState, ShockButtonL, 0x24); +VALIDATE_OFFSET(CControllerState, ShockButtonR, 0x26); +VALIDATE_OFFSET(CControllerState, m_bChatIndicated, 0x28); +VALIDATE_OFFSET(CControllerState, m_bPedWalk, 0x2A); +VALIDATE_OFFSET(CControllerState, m_bVehicleMouseLook, 0x2C); +VALIDATE_OFFSET(CControllerState, m_bRadioTrackSkip, 0x2E); VALIDATE_SIZE(CControllerState, 0x30); class CPad { @@ -89,7 +112,56 @@ class CPad { float m_fAccelY; float m_fAccelZ; }; - +VALIDATE_OFFSET(CPad, NewState, 0x0); +VALIDATE_OFFSET(CPad, OldState, 0x30); +VALIDATE_OFFSET(CPad, currentPadId, 0x60); +VALIDATE_OFFSET(CPad, SteeringLeftRightBuffer, 0x64); +VALIDATE_OFFSET(CPad, DrunkDrivingBufferUsed, 0x78); +VALIDATE_OFFSET(CPad, PCTempKeyState, 0x7C); +VALIDATE_OFFSET(CPad, PCTempJoyState, 0xAC); +VALIDATE_OFFSET(CPad, PCTempMouseState, 0xDC); +VALIDATE_OFFSET(CPad, Phase, 0x10C); +VALIDATE_OFFSET(CPad, ShakeDur, 0x10E); +VALIDATE_OFFSET(CPad, DisablePlayerControls, 0x110); +VALIDATE_OFFSET(CPad, ShakeFreq, 0x112); +VALIDATE_OFFSET(CPad, JustOutOfFrontEnd, 0x113); +VALIDATE_OFFSET(CPad, fCruisingSpeed, 0x114); +VALIDATE_OFFSET(CPad, bRhythm, 0x118); +VALIDATE_OFFSET(CPad, bWheelie, 0x119); +VALIDATE_OFFSET(CPad, bStoppie, 0x11A); +VALIDATE_OFFSET(CPad, bApplyGas, 0x11B); +VALIDATE_OFFSET(CPad, bApplyBrake, 0x11C); +VALIDATE_OFFSET(CPad, bLaneCorrection, 0x11D); +VALIDATE_OFFSET(CPad, bUsingDebugCamera, 0x11E); +VALIDATE_OFFSET(CPad, bUsingDebugPlayerFreeze, 0x11F); +VALIDATE_OFFSET(CPad, bHasCheated, 0x120); +VALIDATE_OFFSET(CPad, bDisableForbiddenTerr, 0x121); +VALIDATE_OFFSET(CPad, bStopRhythmSprites, 0x122); +VALIDATE_OFFSET(CPad, bDoorsLocked, 0x123); +VALIDATE_OFFSET(CPad, bRegainControl, 0x124); +VALIDATE_OFFSET(CPad, fBikeStickY, 0x128); +VALIDATE_OFFSET(CPad, bApplyBrakes, 0x12C); +VALIDATE_OFFSET(CPad, bDisablePlayerEnterCar, 0x12D); +VALIDATE_OFFSET(CPad, bDisablePlayerDuck, 0x12E); +VALIDATE_OFFSET(CPad, bDisablePlayerFireWeapon, 0x12F); +VALIDATE_OFFSET(CPad, bDisablePlayerFireWeaponWithL1, 0x130); +VALIDATE_OFFSET(CPad, bDisablePlayerCycleWeapon, 0x131); +VALIDATE_OFFSET(CPad, bDisablePlayerJump, 0x132); +VALIDATE_OFFSET(CPad, bDisablePlayerDisplayVitalStats, 0x133); +VALIDATE_OFFSET(CPad, LastTimeTouched, 0x134); +VALIDATE_OFFSET(CPad, AverageWeapon, 0x138); +VALIDATE_OFFSET(CPad, AverageEntries, 0x13C); +VALIDATE_OFFSET(CPad, NoShakeBeforeThis, 0x140); +VALIDATE_OFFSET(CPad, NoShakeFreq, 0x144); +VALIDATE_OFFSET(CPad, bHasJetPack, 0x145); +VALIDATE_OFFSET(CPad, bRocketLocked, 0x146); +VALIDATE_OFFSET(CPad, bTrainPassenger, 0x147); +VALIDATE_OFFSET(CPad, bSavedForTrain, 0x148); +VALIDATE_OFFSET(CPad, bSetSteeringMode, 0x149); +VALIDATE_OFFSET(CPad, bSetTouchLayout, 0x14A); +VALIDATE_OFFSET(CPad, m_fAccelX, 0x14C); +VALIDATE_OFFSET(CPad, m_fAccelY, 0x150); +VALIDATE_OFFSET(CPad, m_fAccelZ, 0x154); VALIDATE_SIZE(CPad, 0x158); extern CPad* Pads; diff --git a/plugin_sa_unreal/game_sa_unreal/CPed.h b/plugin_sa_unreal/game_sa_unreal/CPed.h index dfb6c7f60..771d50813 100644 --- a/plugin_sa_unreal/game_sa_unreal/CPed.h +++ b/plugin_sa_unreal/game_sa_unreal/CPed.h @@ -11,3 +11,4 @@ class CPed { public: }; +VALIDATE_SIZE(CPed, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CPools.h b/plugin_sa_unreal/game_sa_unreal/CPools.h index 9f874d2b9..86a772d13 100644 --- a/plugin_sa_unreal/game_sa_unreal/CPools.h +++ b/plugin_sa_unreal/game_sa_unreal/CPools.h @@ -36,3 +36,4 @@ class CPools { static int32_t GetVehicleRef(CVehicle* vehicle); static int32_t GetObjectRef(CObject* object); }; +VALIDATE_SIZE(CPools, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CRect.h b/plugin_sa_unreal/game_sa_unreal/CRect.h index c907efe23..0cf76cb25 100644 --- a/plugin_sa_unreal/game_sa_unreal/CRect.h +++ b/plugin_sa_unreal/game_sa_unreal/CRect.h @@ -83,3 +83,8 @@ class CRect { bottom += b; } }; +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); +VALIDATE_SIZE(CRect, 0x10); diff --git a/plugin_sa_unreal/game_sa_unreal/CRunningScript.h b/plugin_sa_unreal/game_sa_unreal/CRunningScript.h index 46dede3bf..498b25d8a 100644 --- a/plugin_sa_unreal/game_sa_unreal/CRunningScript.h +++ b/plugin_sa_unreal/game_sa_unreal/CRunningScript.h @@ -64,12 +64,11 @@ union tScriptParam { void* pParam; uint8_t* szParam; }; - VALIDATE_SIZE(tScriptParam, 0x8); class PLUGIN_API CRunningScript { public: - CRunningScript* pNext; + CRunningScript* m_pNext; CRunningScript* m_pPrev; char m_szName[8]; uint8_t* m_pBaseIP; @@ -88,12 +87,32 @@ class PLUGIN_API CRunningScript { uint8_t m_bNotFlag; uint8_t m_bWastedBustedCheck; uint8_t m_bWastedOrBusted; - int32_t m_nEndOfScriptedCutscenePC; + int32_t m_pSceneSkipIP; uint8_t m_bIsMission; public: void ProcessOneCommand(); void Init(); }; - +VALIDATE_OFFSET(CRunningScript, m_pNext, 0x0); +VALIDATE_OFFSET(CRunningScript, m_pPrev, 0x8); +VALIDATE_OFFSET(CRunningScript, m_szName, 0x10); +VALIDATE_OFFSET(CRunningScript, m_pBaseIP, 0x18); +VALIDATE_OFFSET(CRunningScript, m_pCurrentIP, 0x20); +VALIDATE_OFFSET(CRunningScript, m_apStack, 0x28); +VALIDATE_OFFSET(CRunningScript, m_nSP, 0x68); +VALIDATE_OFFSET(CRunningScript, m_aLocalVars, 0x6C); +VALIDATE_OFFSET(CRunningScript, m_bIsActive, 0x114); +VALIDATE_OFFSET(CRunningScript, m_bCondResult, 0x115); +VALIDATE_OFFSET(CRunningScript, m_bUseMissionCleanup, 0x116); +VALIDATE_OFFSET(CRunningScript, m_bIsExternal, 0x117); +VALIDATE_OFFSET(CRunningScript, m_bTextBlockOverride, 0x118); +VALIDATE_OFFSET(CRunningScript, m_nScriptBrainType, 0x119); +VALIDATE_OFFSET(CRunningScript, m_nWakeTime, 0x11C); +VALIDATE_OFFSET(CRunningScript, m_nLogicalOp, 0x120); +VALIDATE_OFFSET(CRunningScript, m_bNotFlag, 0x122); +VALIDATE_OFFSET(CRunningScript, m_bWastedBustedCheck, 0x123); +VALIDATE_OFFSET(CRunningScript, m_bWastedOrBusted, 0x124); +VALIDATE_OFFSET(CRunningScript, m_pSceneSkipIP, 0x128); +VALIDATE_OFFSET(CRunningScript, m_bIsMission, 0x12C); VALIDATE_SIZE(CRunningScript, 0x130); diff --git a/plugin_sa_unreal/game_sa_unreal/CSprite2d.h b/plugin_sa_unreal/game_sa_unreal/CSprite2d.h index 62a25e910..c42800a8e 100644 --- a/plugin_sa_unreal/game_sa_unreal/CSprite2d.h +++ b/plugin_sa_unreal/game_sa_unreal/CSprite2d.h @@ -11,3 +11,4 @@ class CSprite2d { public: }; +VALIDATE_SIZE(CSprite2d, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CText.h b/plugin_sa_unreal/game_sa_unreal/CText.h index b78bdc608..5f0cd361c 100644 --- a/plugin_sa_unreal/game_sa_unreal/CText.h +++ b/plugin_sa_unreal/game_sa_unreal/CText.h @@ -11,5 +11,6 @@ class CText { public: const wchar_t* Get(const char* str); }; +VALIDATE_SIZE(CText, 0x1); extern CText TheText; diff --git a/plugin_sa_unreal/game_sa_unreal/CTimer.h b/plugin_sa_unreal/game_sa_unreal/CTimer.h index b4a897bd8..7c41d2863 100644 --- a/plugin_sa_unreal/game_sa_unreal/CTimer.h +++ b/plugin_sa_unreal/game_sa_unreal/CTimer.h @@ -11,3 +11,4 @@ class CTimer { public: }; +VALIDATE_SIZE(CTimer, 0x1); diff --git a/plugin_sa_unreal/game_sa_unreal/CVehicle.h b/plugin_sa_unreal/game_sa_unreal/CVehicle.h index 218b25d0c..19453356a 100644 --- a/plugin_sa_unreal/game_sa_unreal/CVehicle.h +++ b/plugin_sa_unreal/game_sa_unreal/CVehicle.h @@ -11,3 +11,4 @@ class CVehicle { public: }; +VALIDATE_SIZE(CVehicle, 0x1); diff --git a/plugin_vc/game_vc/AnimAssociationData.h b/plugin_vc/game_vc/AnimAssociationData.h index 2075cc44c..34acb67b8 100644 --- a/plugin_vc/game_vc/AnimAssociationData.h +++ b/plugin_vc/game_vc/AnimAssociationData.h @@ -27,5 +27,16 @@ class PLUGIN_API AnimAssociationData { short m_nAnimId; unsigned short m_nFlags; }; - +VALIDATE_OFFSET(AnimAssociationData, m_link, 0x0); +VALIDATE_OFFSET(AnimAssociationData, m_nNumBlendNodes, 0x8); +VALIDATE_OFFSET(AnimAssociationData, m_nAnimGroup, 0xA); +VALIDATE_OFFSET(AnimAssociationData, m_pNodeArray, 0xC); +VALIDATE_OFFSET(AnimAssociationData, m_pHierarchy, 0x10); +VALIDATE_OFFSET(AnimAssociationData, m_fBlendAmount, 0x14); +VALIDATE_OFFSET(AnimAssociationData, m_fBlendDelta, 0x18); +VALIDATE_OFFSET(AnimAssociationData, m_fCurrentTime, 0x1C); +VALIDATE_OFFSET(AnimAssociationData, m_fSpeed, 0x20); +VALIDATE_OFFSET(AnimAssociationData, fTimeStep, 0x24); +VALIDATE_OFFSET(AnimAssociationData, m_nAnimId, 0x28); +VALIDATE_OFFSET(AnimAssociationData, m_nFlags, 0x2A); VALIDATE_SIZE(AnimAssociationData, 0x2C); \ No newline at end of file diff --git a/plugin_vc/game_vc/AnimBlendFrameData.h b/plugin_vc/game_vc/AnimBlendFrameData.h index 7be305419..05f183fc7 100644 --- a/plugin_vc/game_vc/AnimBlendFrameData.h +++ b/plugin_vc/game_vc/AnimBlendFrameData.h @@ -16,5 +16,8 @@ class PLUGIN_API AnimBlendFrameData { RwFrame* m_pFrame; unsigned int m_nNodeId; }; - +VALIDATE_OFFSET(AnimBlendFrameData, m_nFlags, 0x0); +VALIDATE_OFFSET(AnimBlendFrameData, m_vecOffset, 0x4); +VALIDATE_OFFSET(AnimBlendFrameData, m_pFrame, 0x10); +VALIDATE_OFFSET(AnimBlendFrameData, m_nNodeId, 0x14); VALIDATE_SIZE(AnimBlendFrameData, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/C3dMarker.h b/plugin_vc/game_vc/C3dMarker.h index e4b754a02..0e0255d4d 100644 --- a/plugin_vc/game_vc/C3dMarker.h +++ b/plugin_vc/game_vc/C3dMarker.h @@ -46,7 +46,22 @@ class PLUGIN_API C3dMarker { m_pAtomic = nullptr; } }; - +VALIDATE_OFFSET(C3dMarker, m_Matrix, 0x0); +VALIDATE_OFFSET(C3dMarker, m_pAtomic, 0x48); +VALIDATE_OFFSET(C3dMarker, m_pMaterial, 0x4C); +VALIDATE_OFFSET(C3dMarker, m_nType, 0x50); +VALIDATE_OFFSET(C3dMarker, m_bIsUsed, 0x52); +VALIDATE_OFFSET(C3dMarker, m_bIsActive, 0x53); +VALIDATE_OFFSET(C3dMarker, m_nIdentifier, 0x54); +VALIDATE_OFFSET(C3dMarker, m_colour, 0x58); +VALIDATE_OFFSET(C3dMarker, m_nPulsePeriod, 0x5C); +VALIDATE_OFFSET(C3dMarker, m_nRotateRate, 0x5E); +VALIDATE_OFFSET(C3dMarker, m_nStartTime, 0x60); +VALIDATE_OFFSET(C3dMarker, m_fPulseFraction, 0x64); +VALIDATE_OFFSET(C3dMarker, m_fStdSize, 0x68); +VALIDATE_OFFSET(C3dMarker, m_fSize, 0x6C); +VALIDATE_OFFSET(C3dMarker, m_fBrightness, 0x70); +VALIDATE_OFFSET(C3dMarker, m_fCameraRange, 0x74); VALIDATE_SIZE(C3dMarker, 0x78); #include "meta/meta.C3dMarker.h" diff --git a/plugin_vc/game_vc/C3dMarkers.h b/plugin_vc/game_vc/C3dMarkers.h index 9739d7a94..96121487e 100644 --- a/plugin_vc/game_vc/C3dMarkers.h +++ b/plugin_vc/game_vc/C3dMarkers.h @@ -33,4 +33,5 @@ class PLUGIN_API C3dMarkers { static void PlaceMarkerSet(unsigned int id, unsigned short type, CVector& pos, float size, unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned short pulsePeriod, float pulseFraction, short rotateRate); }; +VALIDATE_SIZE(C3dMarkers, 0x1); diff --git a/plugin_vc/game_vc/CAnimBlendAssocGroup.h b/plugin_vc/game_vc/CAnimBlendAssocGroup.h index 33b4fe19d..e60a05eba 100644 --- a/plugin_vc/game_vc/CAnimBlendAssocGroup.h +++ b/plugin_vc/game_vc/CAnimBlendAssocGroup.h @@ -22,5 +22,9 @@ class CAnimBlendAssocGroup int m_nIdOffset; int m_nGroupID; }; - +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_pAnimBlock, 0x0); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_pAssociations, 0x4); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nNumAnimations, 0x8); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nIdOffset, 0xC); +VALIDATE_OFFSET(CAnimBlendAssocGroup, m_nGroupID, 0x10); VALIDATE_SIZE(CAnimBlendAssocGroup, 0x14); diff --git a/plugin_vc/game_vc/CAnimBlendAssociation.h b/plugin_vc/game_vc/CAnimBlendAssociation.h index 06238b896..b009c0d6d 100644 --- a/plugin_vc/game_vc/CAnimBlendAssociation.h +++ b/plugin_vc/game_vc/CAnimBlendAssociation.h @@ -56,6 +56,22 @@ class PLUGIN_API CAnimBlendAssociation { // vtable function #0 (destructor) ~CAnimBlendAssociation(); }; +VALIDATE_OFFSET(CAnimBlendAssociation, vtable, 0x0); +VALIDATE_OFFSET(CAnimBlendAssociation, m_link, 0x4); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nNumBlendNodes, 0xC); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nAnimGroup, 0xE); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pNodeArray, 0x10); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pHierarchy, 0x14); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendAmount, 0x18); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fBlendDelta, 0x1C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fCurrentTime, 0x20); +VALIDATE_OFFSET(CAnimBlendAssociation, m_fSpeed, 0x24); +VALIDATE_OFFSET(CAnimBlendAssociation, fTimeStep, 0x28); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nAnimId, 0x2C); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nFlags, 0x2E); +VALIDATE_OFFSET(CAnimBlendAssociation, m_nCallbackType, 0x30); +VALIDATE_OFFSET(CAnimBlendAssociation, m_pCallbackData, 0x38); +VALIDATE_SIZE(CAnimBlendAssociation, 0x3C); VTABLE_DESC(CAnimBlendAssociation, 0x68308C, 1); VALIDATE_SIZE(CAnimBlendAssociation, 0x3C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CAnimBlendClumpData.h b/plugin_vc/game_vc/CAnimBlendClumpData.h index fbed041e7..2200f5bb8 100644 --- a/plugin_vc/game_vc/CAnimBlendClumpData.h +++ b/plugin_vc/game_vc/CAnimBlendClumpData.h @@ -25,5 +25,8 @@ class PLUGIN_API CAnimBlendClumpData { } }; - +VALIDATE_OFFSET(CAnimBlendClumpData, m_associationsList, 0x0); +VALIDATE_OFFSET(CAnimBlendClumpData, m_nNumFrames, 0x8); +VALIDATE_OFFSET(CAnimBlendClumpData, m_pvecPedPosition, 0xC); +VALIDATE_OFFSET(CAnimBlendClumpData, m_pFrames, 0x10); VALIDATE_SIZE(CAnimBlendClumpData, 0x14); \ No newline at end of file diff --git a/plugin_vc/game_vc/CAnimBlock.h b/plugin_vc/game_vc/CAnimBlock.h index fc0c4d8e6..0aa2d214d 100644 --- a/plugin_vc/game_vc/CAnimBlock.h +++ b/plugin_vc/game_vc/CAnimBlock.h @@ -17,5 +17,10 @@ class PLUGIN_API CAnimBlock { int startAnimation; int animationCount; }; - -VALIDATE_SIZE(CAnimBlock,0x20); \ No newline at end of file +VALIDATE_OFFSET(CAnimBlock, name, 0x0); +VALIDATE_OFFSET(CAnimBlock, bLoaded, 0x14); +VALIDATE_OFFSET(CAnimBlock, pad, 0x15); +VALIDATE_OFFSET(CAnimBlock, usRefs, 0x16); +VALIDATE_OFFSET(CAnimBlock, startAnimation, 0x18); +VALIDATE_OFFSET(CAnimBlock, animationCount, 0x1C); +VALIDATE_SIZE(CAnimBlock, 0x20); \ No newline at end of file diff --git a/plugin_vc/game_vc/CAnimManager.h b/plugin_vc/game_vc/CAnimManager.h index 657af7ea4..dae4e67b2 100644 --- a/plugin_vc/game_vc/CAnimManager.h +++ b/plugin_vc/game_vc/CAnimManager.h @@ -48,3 +48,4 @@ class PLUGIN_API CAnimManager { static CAnimationStyleDescriptor *ms_aAnimAssocDefinitions; static CLinkList &ms_animCache; }; +VALIDATE_SIZE(CAnimManager, 0x1); diff --git a/plugin_vc/game_vc/CAnimationStyleDescriptor.h b/plugin_vc/game_vc/CAnimationStyleDescriptor.h index b50676c5b..fb1a3e5b5 100644 --- a/plugin_vc/game_vc/CAnimationStyleDescriptor.h +++ b/plugin_vc/game_vc/CAnimationStyleDescriptor.h @@ -20,5 +20,10 @@ class PLUGIN_API CAnimationStyleDescriptor { int flags; } *animDesc; }; - +VALIDATE_OFFSET(CAnimationStyleDescriptor, groupName, 0x0); +VALIDATE_OFFSET(CAnimationStyleDescriptor, blockName, 0x4); +VALIDATE_OFFSET(CAnimationStyleDescriptor, modelIndex, 0x8); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animsCount, 0xC); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animNames, 0x10); +VALIDATE_OFFSET(CAnimationStyleDescriptor, animDesc, 0x14); VALIDATE_SIZE(CAnimationStyleDescriptor, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/CAutoPilot.h b/plugin_vc/game_vc/CAutoPilot.h index 5df2715d3..ce6d8b548 100644 --- a/plugin_vc/game_vc/CAutoPilot.h +++ b/plugin_vc/game_vc/CAutoPilot.h @@ -66,5 +66,29 @@ class CAutoPilot { private: char _pad[2]; }; - +VALIDATE_OFFSET(CAutoPilot, m_currentAddress, 0x0); +VALIDATE_OFFSET(CAutoPilot, m_startingRouteNode, 0x4); +VALIDATE_OFFSET(CAutoPilot, m_PreviousRouteNode, 0x8); +VALIDATE_OFFSET(CAutoPilot, m_nTotalSpeedScaleFactor, 0xC); +VALIDATE_OFFSET(CAutoPilot, m_nSpeedScaleFactor, 0x10); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentPathNodeInfo, 0x14); +VALIDATE_OFFSET(CAutoPilot, m_nNextPathNodeInfo, 0x18); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousPathNodeInfo, 0x1C); +VALIDATE_OFFSET(CAutoPilot, m_nTimeToStartMission, 0x20); +VALIDATE_OFFSET(CAutoPilot, m_nTimeSwitchedToRealPhysics, 0x24); +VALIDATE_OFFSET(CAutoPilot, m_nPreviousDirection, 0x28); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentDirecton, 0x29); +VALIDATE_OFFSET(CAutoPilot, m_nNextDirection, 0x2A); +VALIDATE_OFFSET(CAutoPilot, m_nCurrentLane, 0x2B); +VALIDATE_OFFSET(CAutoPilot, m_nNextLane, 0x2C); +VALIDATE_OFFSET(CAutoPilot, m_nDrivingStyle, 0x2D); +VALIDATE_OFFSET(CAutoPilot, m_nCarMission, 0x2E); +VALIDATE_OFFSET(CAutoPilot, m_nAnimationId, 0x2F); +VALIDATE_OFFSET(CAutoPilot, m_nAnimationTime, 0x30); +VALIDATE_OFFSET(CAutoPilot, m_fMaxTrafficSpeed, 0x34); +VALIDATE_OFFSET(CAutoPilot, m_nCruiseSpeed, 0x38); +VALIDATE_OFFSET(CAutoPilot, unknown, 0x39); +VALIDATE_OFFSET(CAutoPilot, m_vecDestinationCoors, 0x44); +VALIDATE_OFFSET(CAutoPilot, m_aPathFindNodesInfo, 0x50); +VALIDATE_OFFSET(CAutoPilot, m_nPathFindNodesCount, 0x70); VALIDATE_SIZE(CAutoPilot, 0x74); \ No newline at end of file diff --git a/plugin_vc/game_vc/CAutomobile.cpp b/plugin_vc/game_vc/CAutomobile.cpp index 785c23300..a719a0643 100644 --- a/plugin_vc/game_vc/CAutomobile.cpp +++ b/plugin_vc/game_vc/CAutomobile.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CAutomobile.h" diff --git a/plugin_vc/game_vc/CAutomobile.h b/plugin_vc/game_vc/CAutomobile.h index 1a427f1f9..b167f8ff4 100644 --- a/plugin_vc/game_vc/CAutomobile.h +++ b/plugin_vc/game_vc/CAutomobile.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVehicle.h" #include "CDoor.h" @@ -129,5 +128,35 @@ class CAutomobile : public CVehicle { // Create colliding particles void dmgDrawCarCollidingParticles(CVector const& position, float force); }; - +VALIDATE_OFFSET(CAutomobile, m_carDamage, 0x2A0); +VALIDATE_OFFSET(CAutomobile, bDamSwitch, 0x2B8); +VALIDATE_OFFSET(CAutomobile, __f02B5, 0x2B9); +VALIDATE_OFFSET(CAutomobile, m_aDoors, 0x2BC); +VALIDATE_OFFSET(CAutomobile, m_aCarNodes, 0x394); +VALIDATE_OFFSET(CAutomobile, stWheels, 0x3E4); +VALIDATE_OFFSET(CAutomobile, fWheelSuspDist, 0x484); +VALIDATE_OFFSET(CAutomobile, fWheelSuspDistSoft, 0x494); +VALIDATE_OFFSET(CAutomobile, fWheelContactRate, 0x4A4); +VALIDATE_OFFSET(CAutomobile, __p04B0, 0x4B4); +VALIDATE_OFFSET(CAutomobile, fWheelTotalRot, 0x4D0); +VALIDATE_OFFSET(CAutomobile, fWheelRot, 0x4E0); +VALIDATE_OFFSET(CAutomobile, __p04EC, 0x4F0); +VALIDATE_OFFSET(CAutomobile, fNegSpeed, 0x4F4); +VALIDATE_OFFSET(CAutomobile, __p04F4, 0x4F8); +VALIDATE_OFFSET(CAutomobile, bfFlagsX, 0x501); +VALIDATE_OFFSET(CAutomobile, __p04FE, 0x502); +VALIDATE_OFFSET(CAutomobile, fWheelAngleMul, 0x530); +VALIDATE_OFFSET(CAutomobile, fAIGripMultiplier, 0x534); +VALIDATE_OFFSET(CAutomobile, __p0534, 0x538); +VALIDATE_OFFSET(CAutomobile, fSpecialWepRotH, 0x5B0); +VALIDATE_OFFSET(CAutomobile, fSpecialWepRotV, 0x5B4); +VALIDATE_OFFSET(CAutomobile, fSpecialSteering, 0x5B8); +VALIDATE_OFFSET(CAutomobile, fSpecialMoveState, 0x5BC); +VALIDATE_OFFSET(CAutomobile, uUnusedX, 0x5C0); +VALIDATE_OFFSET(CAutomobile, nWheelsOnGround, 0x5C4); +VALIDATE_OFFSET(CAutomobile, nRearWheelsOnGround, 0x5C5); +VALIDATE_OFFSET(CAutomobile, bytePrevRearWheelsOnGround, 0x5C6); +VALIDATE_OFFSET(CAutomobile, __f05C3, 0x5C7); +VALIDATE_OFFSET(CAutomobile, fSkidMarkDensity, 0x5C8); +VALIDATE_OFFSET(CAutomobile, nTireFriction, 0x5CC); VALIDATE_SIZE(CAutomobile, 0x5DC); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBaseModelInfo.h b/plugin_vc/game_vc/CBaseModelInfo.h index ac541ea5d..cf0daa5f8 100644 --- a/plugin_vc/game_vc/CBaseModelInfo.h +++ b/plugin_vc/game_vc/CBaseModelInfo.h @@ -54,5 +54,13 @@ class CBaseModelInfo { CBaseModelInfo(const CBaseModelInfo &) {}; CBaseModelInfo &operator=(const CBaseModelInfo &) { return *this; }; }; - +VALIDATE_OFFSET(CBaseModelInfo, m_szName, 0x4); +VALIDATE_OFFSET(CBaseModelInfo, m_nType, 0x19); +VALIDATE_OFFSET(CBaseModelInfo, m_nNum2dEffects, 0x1A); +VALIDATE_OFFSET(CBaseModelInfo, m_bDoWeOwnTheColModel, 0x1B); +VALIDATE_OFFSET(CBaseModelInfo, m_pColModel, 0x1C); +VALIDATE_OFFSET(CBaseModelInfo, m_n2dEffectIndex, 0x20); +VALIDATE_OFFSET(CBaseModelInfo, m_nObjectDataIndex, 0x22); +VALIDATE_OFFSET(CBaseModelInfo, m_nRefCount, 0x24); +VALIDATE_OFFSET(CBaseModelInfo, m_nTxdIndex, 0x26); VALIDATE_SIZE(CBaseModelInfo, 0x28); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBike.cpp b/plugin_vc/game_vc/CBike.cpp index 390120e2c..e5de63690 100644 --- a/plugin_vc/game_vc/CBike.cpp +++ b/plugin_vc/game_vc/CBike.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CBike.h" diff --git a/plugin_vc/game_vc/CBike.h b/plugin_vc/game_vc/CBike.h index 7219e31ea..b75abed21 100644 --- a/plugin_vc/game_vc/CBike.h +++ b/plugin_vc/game_vc/CBike.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -101,5 +101,61 @@ class CBike : public CVehicle { void SetupSuspensionLines(); void VehicleDamage(); }; - +VALIDATE_OFFSET(CBike, m_aBikeNodes, 0x2A0); +VALIDATE_OFFSET(CBike, field_2C4, 0x2C4); +VALIDATE_OFFSET(CBike, gap_30C, 0x30C); +VALIDATE_OFFSET(CBike, pBikeHandling, 0x324); +VALIDATE_OFFSET(CBike, nBikeAnimGroup, 0x328); +VALIDATE_OFFSET(CBike, tireStatus, 0x32C); +VALIDATE_OFFSET(CBike, gap_32E, 0x32E); +VALIDATE_OFFSET(CBike, field_330, 0x330); +VALIDATE_OFFSET(CBike, field_3D0, 0x3D0); +VALIDATE_OFFSET(CBike, field_3E0, 0x3E0); +VALIDATE_OFFSET(CBike, field_3F0, 0x3F0); +VALIDATE_OFFSET(CBike, field_400, 0x400); +VALIDATE_OFFSET(CBike, field_404, 0x404); +VALIDATE_OFFSET(CBike, field_408, 0x408); +VALIDATE_OFFSET(CBike, field_40C, 0x40C); +VALIDATE_OFFSET(CBike, field_40D, 0x40D); +VALIDATE_OFFSET(CBike, field_40E, 0x40E); +VALIDATE_OFFSET(CBike, field_40F, 0x40F); +VALIDATE_OFFSET(CBike, field_410, 0x410); +VALIDATE_OFFSET(CBike, field_414, 0x414); +VALIDATE_OFFSET(CBike, field_418, 0x418); +VALIDATE_OFFSET(CBike, field_41C, 0x41C); +VALIDATE_OFFSET(CBike, gap_420, 0x420); +VALIDATE_OFFSET(CBike, field_428, 0x428); +VALIDATE_OFFSET(CBike, field_42C, 0x42C); +VALIDATE_OFFSET(CBike, gap_430, 0x430); +VALIDATE_OFFSET(CBike, field_450, 0x450); +VALIDATE_OFFSET(CBike, field_454, 0x454); +VALIDATE_OFFSET(CBike, field_458, 0x458); +VALIDATE_OFFSET(CBike, field_45C, 0x45C); +VALIDATE_OFFSET(CBike, field_460, 0x460); +VALIDATE_OFFSET(CBike, field_464, 0x464); +VALIDATE_OFFSET(CBike, field_468, 0x468); +VALIDATE_OFFSET(CBike, field_46C, 0x46C); +VALIDATE_OFFSET(CBike, field_470, 0x470); +VALIDATE_OFFSET(CBike, field_474, 0x474); +VALIDATE_OFFSET(CBike, field_478, 0x478); +VALIDATE_OFFSET(CBike, field_47C, 0x47C); +VALIDATE_OFFSET(CBike, field_480, 0x480); +VALIDATE_OFFSET(CBike, gap_481, 0x481); +VALIDATE_OFFSET(CBike, m_nDamageFlags, 0x484); +VALIDATE_OFFSET(CBike, gap_485, 0x485); +VALIDATE_OFFSET(CBike, field_486, 0x486); +VALIDATE_OFFSET(CBike, field_488, 0x488); +VALIDATE_OFFSET(CBike, field_48C, 0x48C); +VALIDATE_OFFSET(CBike, field_490, 0x490); +VALIDATE_OFFSET(CBike, field_494, 0x494); +VALIDATE_OFFSET(CBike, field_498, 0x498); +VALIDATE_OFFSET(CBike, field_4A8, 0x4A8); +VALIDATE_OFFSET(CBike, field_4D8, 0x4D8); +VALIDATE_OFFSET(CBike, field_4DC, 0x4DC); +VALIDATE_OFFSET(CBike, field_4DD, 0x4DD); +VALIDATE_OFFSET(CBike, field_4DE, 0x4DE); +VALIDATE_OFFSET(CBike, gap_4DF, 0x4DF); +VALIDATE_OFFSET(CBike, field_4E0, 0x4E0); +VALIDATE_OFFSET(CBike, field_4E4, 0x4E4); +VALIDATE_OFFSET(CBike, field_4E8, 0x4E8); VALIDATE_SIZE(CBike, 0x4EC); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBoat.cpp b/plugin_vc/game_vc/CBoat.cpp index 29c7c9e9e..a4bdb8022 100644 --- a/plugin_vc/game_vc/CBoat.cpp +++ b/plugin_vc/game_vc/CBoat.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CBoat.h" diff --git a/plugin_vc/game_vc/CBoat.h b/plugin_vc/game_vc/CBoat.h index ec40687b0..db52fbbe6 100644 --- a/plugin_vc/game_vc/CBoat.h +++ b/plugin_vc/game_vc/CBoat.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -80,5 +80,35 @@ class CBoat : public CVehicle { static void FillBoatList(); void PruneWakeTrail(); }; - +VALIDATE_OFFSET(CBoat, m_fPropRotation, 0x2A0); +VALIDATE_OFFSET(CBoat, m_fPropSpeed, 0x2A4); +VALIDATE_OFFSET(CBoat, field_2A8, 0x2A8); +VALIDATE_OFFSET(CBoat, m_aBoatNodes, 0x2AC); +VALIDATE_OFFSET(CBoat, m_boatDoor, 0x2CC); +VALIDATE_OFFSET(CBoat, m_pBoatHandling, 0x2F0); +VALIDATE_OFFSET(CBoat, m_nBoatFlags, 0x2F4); +VALIDATE_OFFSET(CBoat, field_2F5, 0x2F5); +VALIDATE_OFFSET(CBoat, gap_2F6, 0x2F6); +VALIDATE_OFFSET(CBoat, m_fForcedZRotation, 0x2F8); +VALIDATE_OFFSET(CBoat, m_nAttackPlayerTime, 0x2FC); +VALIDATE_OFFSET(CBoat, field_300, 0x300); +VALIDATE_OFFSET(CBoat, m_fBurningTimer, 0x304); +VALIDATE_OFFSET(CBoat, m_pWhoDestroyedMe, 0x308); +VALIDATE_OFFSET(CBoat, field_30C, 0x30C); +VALIDATE_OFFSET(CBoat, field_310, 0x310); +VALIDATE_OFFSET(CBoat, m_fBoatGasPedal, 0x314); +VALIDATE_OFFSET(CBoat, m_fBoatBrakePedal, 0x318); +VALIDATE_OFFSET(CBoat, m_fBoatSteeringLeftRight, 0x31C); +VALIDATE_OFFSET(CBoat, m_nPadNumber, 0x320); +VALIDATE_OFFSET(CBoat, field_321, 0x321); +VALIDATE_OFFSET(CBoat, gap_324, 0x324); +VALIDATE_OFFSET(CBoat, field_328, 0x328); +VALIDATE_OFFSET(CBoat, field_32C, 0x32C); +VALIDATE_OFFSET(CBoat, field_330, 0x330); +VALIDATE_OFFSET(CBoat, field_334, 0x334); +VALIDATE_OFFSET(CBoat, field_338, 0x338); +VALIDATE_OFFSET(CBoat, field_33C, 0x33C); +VALIDATE_OFFSET(CBoat, m_nNumWaterTrailPoints, 0x33E); +VALIDATE_OFFSET(CBoat, m_avecWakePoints, 0x340); +VALIDATE_OFFSET(CBoat, m_afWakePointLifeTime, 0x440); VALIDATE_SIZE(CBoat, 0x4C0); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBox.cpp b/plugin_vc/game_vc/CBox.cpp index 9b8f4370f..6f2173e56 100644 --- a/plugin_vc/game_vc/CBox.cpp +++ b/plugin_vc/game_vc/CBox.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CBox.h" diff --git a/plugin_vc/game_vc/CBox.h b/plugin_vc/game_vc/CBox.h index 4b38b09d2..201c2b2c9 100644 --- a/plugin_vc/game_vc/CBox.h +++ b/plugin_vc/game_vc/CBox.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -16,5 +15,6 @@ class CBox { static void Set(CVector const& vecMin, CVector const& vecMax); }; - +VALIDATE_OFFSET(CBox, m_vecMin, 0x0); +VALIDATE_OFFSET(CBox, m_vecMax, 0xC); VALIDATE_SIZE(CBox, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBrightLights.h b/plugin_vc/game_vc/CBrightLights.h index 0de05ac84..69ea90125 100644 --- a/plugin_vc/game_vc/CBrightLights.h +++ b/plugin_vc/game_vc/CBrightLights.h @@ -20,7 +20,12 @@ class CBrightLight { CBrightLight(); }; - +VALIDATE_OFFSET(CBrightLight, m_vecPosition, 0x0); +VALIDATE_OFFSET(CBrightLight, m_vecRight, 0xC); +VALIDATE_OFFSET(CBrightLight, m_vecUp, 0x18); +VALIDATE_OFFSET(CBrightLight, m_vecAt, 0x24); +VALIDATE_OFFSET(CBrightLight, m_fDistanceToCamera, 0x30); +VALIDATE_OFFSET(CBrightLight, m_color, 0x34); VALIDATE_SIZE(CBrightLight, 0x38); class CBrightLights { @@ -32,5 +37,6 @@ class CBrightLights { static void RegisterOne(CVector posn, CVector right, CVector up, CVector at, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha); static void Render(); }; +VALIDATE_SIZE(CBrightLights, 0x1); extern unsigned int MAX_NUM_BRIGHTLIGHTS; // default 32 diff --git a/plugin_vc/game_vc/CBuilding.h b/plugin_vc/game_vc/CBuilding.h index 3d26d62c4..54f71abe0 100644 --- a/plugin_vc/game_vc/CBuilding.h +++ b/plugin_vc/game_vc/CBuilding.h @@ -28,7 +28,6 @@ class CBuilding : public CEntity { CBuilding(const CBuilding &) = delete; CBuilding &operator=(const CBuilding &) = delete; }; - VALIDATE_SIZE(CBuilding, 0x64); bool IsBuildingPointerValid(CBuilding* building); \ No newline at end of file diff --git a/plugin_vc/game_vc/CBulletInfo.h b/plugin_vc/game_vc/CBulletInfo.h index ed72fbc38..8da19a1e2 100644 --- a/plugin_vc/game_vc/CBulletInfo.h +++ b/plugin_vc/game_vc/CBulletInfo.h @@ -35,7 +35,13 @@ class CBulletInfo { static void TestForSniperBullet(float x1, float y1, float z1, float x2, float y2, float z2); static void Update(); }; - +VALIDATE_OFFSET(CBulletInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CBulletInfo, m_pCreator, 0x4); +VALIDATE_OFFSET(CBulletInfo, m_nDestroyTime, 0x8); +VALIDATE_OFFSET(CBulletInfo, m_bExists, 0xC); +VALIDATE_OFFSET(CBulletInfo, m_vecPosition, 0x10); +VALIDATE_OFFSET(CBulletInfo, m_vecVelocity, 0x1C); +VALIDATE_OFFSET(CBulletInfo, m_nDamage, 0x28); VALIDATE_SIZE(CBulletInfo, 0x2C); extern unsigned int MAX_BULLET_INFOS; // default 100 diff --git a/plugin_vc/game_vc/CBulletTrace.h b/plugin_vc/game_vc/CBulletTrace.h index c37374026..4d3b17041 100644 --- a/plugin_vc/game_vc/CBulletTrace.h +++ b/plugin_vc/game_vc/CBulletTrace.h @@ -22,6 +22,14 @@ class PLUGIN_API CBulletTrace { float m_fRadius; unsigned char m_nTransparency; }; +VALIDATE_OFFSET(CBulletTrace, m_vecOrigin, 0x0); +VALIDATE_OFFSET(CBulletTrace, m_vecTarget, 0xC); +VALIDATE_OFFSET(CBulletTrace, m_bExist, 0x18); +VALIDATE_OFFSET(CBulletTrace, m_nCreationTime, 0x1C); +VALIDATE_OFFSET(CBulletTrace, m_nLifeTime, 0x20); +VALIDATE_OFFSET(CBulletTrace, m_fRadius, 0x24); +VALIDATE_OFFSET(CBulletTrace, m_nTransparency, 0x28); +VALIDATE_SIZE(CBulletTrace, 0x2C); //! RwImVertexIndex TraceIndexList[48] = { 0, 5, 7, 0, 7, 2, 0, 7, 5, 0, 2, 7, 0, 4, 9, 0, //! 9, 5, 0, 9, 4, 0, 5, 9, 0, 1, 6, 0, 6, 5, 0, 6, diff --git a/plugin_vc/game_vc/CBulletTraces.h b/plugin_vc/game_vc/CBulletTraces.h index d7b451bf4..a1d7b3897 100644 --- a/plugin_vc/game_vc/CBulletTraces.h +++ b/plugin_vc/game_vc/CBulletTraces.h @@ -19,5 +19,6 @@ class PLUGIN_API CBulletTraces { SUPPORTED_10EN_11EN_STEAM static void Init(); SUPPORTED_10EN_11EN_STEAM static void Render(); }; +VALIDATE_SIZE(CBulletTraces, 0x1); #include "meta/meta.CBulletTraces.h" diff --git a/plugin_vc/game_vc/CCam.h b/plugin_vc/game_vc/CCam.h index 5f7a7baf5..be2baca89 100644 --- a/plugin_vc/game_vc/CCam.h +++ b/plugin_vc/game_vc/CCam.h @@ -174,5 +174,97 @@ class CCam { CPed *m_pLastPedLookedAt;// So interpolation works bool m_bFirstPersonRunAboutActive; }; - +VALIDATE_OFFSET(CCam, m_bBelowMinDist, 0x0); +VALIDATE_OFFSET(CCam, m_bBehindPlayerDesired, 0x1); +VALIDATE_OFFSET(CCam, m_bCamLookingAtVector, 0x2); +VALIDATE_OFFSET(CCam, m_bCollisionChecksOn, 0x3); +VALIDATE_OFFSET(CCam, m_bFixingBeta, 0x4); +VALIDATE_OFFSET(CCam, m_bTheHeightFixerVehicleIsATrain, 0x5); +VALIDATE_OFFSET(CCam, m_bLookBehindCamWasInFront, 0x6); +VALIDATE_OFFSET(CCam, m_bLookingBehind, 0x7); +VALIDATE_OFFSET(CCam, m_bLookingLeft, 0x8); +VALIDATE_OFFSET(CCam, m_bLookingRight, 0x9); +VALIDATE_OFFSET(CCam, m_bResetStatics, 0xA); +VALIDATE_OFFSET(CCam, m_bRotating, 0xB); +VALIDATE_OFFSET(CCam, m_nCamMode, 0xC); +VALIDATE_OFFSET(CCam, m_nFinishTime, 0x10); +VALIDATE_OFFSET(CCam, m_nDoCollisionChecksOnFrameNum, 0x14); +VALIDATE_OFFSET(CCam, m_nDoCollisionCheckEveryNumOfFrames, 0x18); +VALIDATE_OFFSET(CCam, m_nFrameNumWereAt, 0x1C); +VALIDATE_OFFSET(CCam, m_nRunningVectorArrayPos, 0x20); +VALIDATE_OFFSET(CCam, m_nRunningVectorCounter, 0x24); +VALIDATE_OFFSET(CCam, DirectionWasLooking, 0x28); +VALIDATE_OFFSET(CCam, m_fMaxRoleAngle, 0x2C); +VALIDATE_OFFSET(CCam, m_fRoll, 0x30); +VALIDATE_OFFSET(CCam, m_fRollSpeed, 0x34); +VALIDATE_OFFSET(CCam, m_fSyphonModeTargetZOffSet, 0x38); +VALIDATE_OFFSET(CCam, m_fAmountFractionObscured, 0x3C); +VALIDATE_OFFSET(CCam, m_fAlphaSpeedOverOneFrame, 0x40); +VALIDATE_OFFSET(CCam, m_fBetaSpeedOverOneFrame, 0x44); +VALIDATE_OFFSET(CCam, m_fBufferedTargetBeta, 0x48); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientation, 0x4C); +VALIDATE_OFFSET(CCam, m_fBufferedTargetOrientationSpeed, 0x50); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeight, 0x54); +VALIDATE_OFFSET(CCam, m_fCamBufferedHeightSpeed, 0x58); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffset, 0x5C); +VALIDATE_OFFSET(CCam, m_fCloseInPedHeightOffsetSpeed, 0x60); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffset, 0x64); +VALIDATE_OFFSET(CCam, m_fCloseInCarHeightOffsetSpeed, 0x68); +VALIDATE_OFFSET(CCam, m_fDimensionOfHighestNearCar, 0x6C); +VALIDATE_OFFSET(CCam, m_fDistanceBeforeChanges, 0x70); +VALIDATE_OFFSET(CCam, m_fFovSpeedOverOneFrame, 0x74); +VALIDATE_OFFSET(CCam, m_fMinDistAwayFromCamWhenInterPolating, 0x78); +VALIDATE_OFFSET(CCam, m_fPedBetweenCameraHeightOffset, 0x7C); +VALIDATE_OFFSET(CCam, m_fPlayerInFrontSyphonAngleOffSet, 0x80); +VALIDATE_OFFSET(CCam, m_fRadiusForDead, 0x84); +VALIDATE_OFFSET(CCam, m_fRealGroundDist, 0x88); +VALIDATE_OFFSET(CCam, m_fTargetBeta, 0x8C); +VALIDATE_OFFSET(CCam, m_fTimeElapsedFloat, 0x90); +VALIDATE_OFFSET(CCam, m_fTilt, 0x94); +VALIDATE_OFFSET(CCam, m_fTiltSpeed, 0x98); +VALIDATE_OFFSET(CCam, m_fTransitionBeta, 0x9C); +VALIDATE_OFFSET(CCam, m_fTrueBeta, 0xA0); +VALIDATE_OFFSET(CCam, m_fTrueAlpha, 0xA4); +VALIDATE_OFFSET(CCam, m_fInitialPlayerOrientation, 0xA8); +VALIDATE_OFFSET(CCam, m_fVerticalAngle, 0xAC); +VALIDATE_OFFSET(CCam, m_fAlphaSpeed, 0xB0); +VALIDATE_OFFSET(CCam, m_fFOV, 0xB4); +VALIDATE_OFFSET(CCam, m_fFOVSpeed, 0xB8); +VALIDATE_OFFSET(CCam, m_fHorizontalAngle, 0xBC); +VALIDATE_OFFSET(CCam, m_fBetaSpeed, 0xC0); +VALIDATE_OFFSET(CCam, m_fDistance, 0xC4); +VALIDATE_OFFSET(CCam, m_fDistanceSpeed, 0xC8); +VALIDATE_OFFSET(CCam, m_fCA_MIN_DISTANCE, 0xCC); +VALIDATE_OFFSET(CCam, m_fCA_MAX_DISTANCE, 0xD0); +VALIDATE_OFFSET(CCam, m_fSpeedVar, 0xD4); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundOne, 0xD8); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundTwo, 0xDC); +VALIDATE_OFFSET(CCam, m_fTargetZoomGroundThree, 0xE0); +VALIDATE_OFFSET(CCam, m_fTargetZoomOneZExtra, 0xE4); +VALIDATE_OFFSET(CCam, m_fTargetZoomTwoZExtra, 0xE8); +VALIDATE_OFFSET(CCam, m_fTargetZoomThreeZExtra, 0xEC); +VALIDATE_OFFSET(CCam, m_fTargetZoomZCloseIn, 0xF0); +VALIDATE_OFFSET(CCam, m_fMinRealGroundDist, 0xF4); +VALIDATE_OFFSET(CCam, m_fTargetCloseInDist, 0xF8); +VALIDATE_OFFSET(CCam, m_vecSourceSpeedOverOneFrame, 0xFC); +VALIDATE_OFFSET(CCam, m_vecTargetSpeedOverOneFrame, 0x108); +VALIDATE_OFFSET(CCam, m_vecUpOverOneFrame, 0x114); +VALIDATE_OFFSET(CCam, m_vecTargetCoorsForFudgeInter, 0x120); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeVector, 0x12C); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeSource, 0x138); +VALIDATE_OFFSET(CCam, m_vecCamFixedModeUpOffSet, 0x144); +VALIDATE_OFFSET(CCam, m_vecLastAboveWaterCamPosition, 0x150); +VALIDATE_OFFSET(CCam, m_vecBufferedPlayerBodyOffset, 0x15C); +VALIDATE_OFFSET(CCam, m_vecFront, 0x168); +VALIDATE_OFFSET(CCam, m_vecSource, 0x174); +VALIDATE_OFFSET(CCam, m_vecSourceBeforeLookBehind, 0x180); +VALIDATE_OFFSET(CCam, m_vecUp, 0x18C); +VALIDATE_OFFSET(CCam, m_arrPreviousVectors, 0x198); +VALIDATE_OFFSET(CCam, m_pCamTargetEntity, 0x1B0); +VALIDATE_OFFSET(CCam, m_fCameraDistance, 0x1B4); +VALIDATE_OFFSET(CCam, m_fIdealAlpha, 0x1B8); +VALIDATE_OFFSET(CCam, m_fPlayerVelocity, 0x1BC); +VALIDATE_OFFSET(CCam, m_pLastCarEntered, 0x1C0); +VALIDATE_OFFSET(CCam, m_pLastPedLookedAt, 0x1C4); +VALIDATE_OFFSET(CCam, m_bFirstPersonRunAboutActive, 0x1C8); VALIDATE_SIZE(CCam, 0x1CC); diff --git a/plugin_vc/game_vc/CCamera.h b/plugin_vc/game_vc/CCamera.h index f40b223cc..130afb4a3 100644 --- a/plugin_vc/game_vc/CCamera.h +++ b/plugin_vc/game_vc/CCamera.h @@ -296,6 +296,183 @@ class CCamera : public CPlaceable { void UpdateTargetEntity(); bool Using1stPersonWeaponMode(); }; +VALIDATE_OFFSET(CCamera, m_bAboveGroundTrainNodesLoaded, 0x48); +VALIDATE_OFFSET(CCamera, m_bBelowGroundTrainNodesLoaded, 0x49); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyBehind, 0x4A); +VALIDATE_OFFSET(CCamera, m_bCamDirectlyInFront, 0x4B); +VALIDATE_OFFSET(CCamera, m_bCameraJustRestored, 0x4C); +VALIDATE_OFFSET(CCamera, m_bCutsceneFinished, 0x4D); +VALIDATE_OFFSET(CCamera, m_bCullZoneChecksOn, 0x4E); +VALIDATE_OFFSET(CCamera, m_bFirstPersonBeingUsed, 0x4F); +VALIDATE_OFFSET(CCamera, m_bJustJumpedOutOf1stPersonBecauseOfTarget, 0x50); +VALIDATE_OFFSET(CCamera, m_bIdleOn, 0x51); +VALIDATE_OFFSET(CCamera, m_bInATunnelAndABigVehicle, 0x52); +VALIDATE_OFFSET(CCamera, m_bInitialNodeFound, 0x53); +VALIDATE_OFFSET(CCamera, m_bInitialNoNodeStaticsSet, 0x54); +VALIDATE_OFFSET(CCamera, m_bIgnoreFadingStuffForMusic, 0x55); +VALIDATE_OFFSET(CCamera, m_bPlayerIsInGarage, 0x56); +VALIDATE_OFFSET(CCamera, m_bPlayerWasOnBike, 0x57); +VALIDATE_OFFSET(CCamera, m_bJustCameOutOfGarage, 0x58); +VALIDATE_OFFSET(CCamera, m_bJustInitalised, 0x59); +VALIDATE_OFFSET(CCamera, m_bJust_Switched, 0x5A); +VALIDATE_OFFSET(CCamera, m_bLookingAtPlayer, 0x5B); +VALIDATE_OFFSET(CCamera, m_bLookingAtVector, 0x5C); +VALIDATE_OFFSET(CCamera, m_bMoveCamToAvoidGeom, 0x5D); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicPedCamOn, 0x5E); +VALIDATE_OFFSET(CCamera, m_bObbeCinematicCarCamOn, 0x5F); +VALIDATE_OFFSET(CCamera, m_bRestoreByJumpCut, 0x60); +VALIDATE_OFFSET(CCamera, m_bUseNearClipScript, 0x61); +VALIDATE_OFFSET(CCamera, m_bStartInterScript, 0x62); +VALIDATE_OFFSET(CCamera, m_bStartingSpline, 0x63); +VALIDATE_OFFSET(CCamera, m_bTargetJustBeenOnTrain, 0x64); +VALIDATE_OFFSET(CCamera, m_bTargetJustCameOffTrain, 0x65); +VALIDATE_OFFSET(CCamera, m_bUseSpecialFovTrain, 0x66); +VALIDATE_OFFSET(CCamera, m_bUseTransitionBeta, 0x67); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValuePed, 0x68); +VALIDATE_OFFSET(CCamera, m_bUseScriptZoomValueCar, 0x69); +VALIDATE_OFFSET(CCamera, m_bWaitForInterpolToFinish, 0x6A); +VALIDATE_OFFSET(CCamera, m_bItsOkToLookJustAtThePlayer, 0x6B); +VALIDATE_OFFSET(CCamera, m_bWantsToSwitchWidescreenOff, 0x6C); +VALIDATE_OFFSET(CCamera, m_bWideScreenOn, 0x6D); +VALIDATE_OFFSET(CCamera, m_b1stPersonRunCloseToAWall, 0x6E); +VALIDATE_OFFSET(CCamera, m_bHeadBob, 0x6F); +VALIDATE_OFFSET(CCamera, m_bVehicleSuspenHigh, 0x70); +VALIDATE_OFFSET(CCamera, m_bEnable1rstPersonCamCntrlsScript, 0x71); +VALIDATE_OFFSET(CCamera, m_bAllow1rstPersonWeaponsCamera, 0x72); +VALIDATE_OFFSET(CCamera, m_bFailedCullZoneTestPreviously, 0x73); +VALIDATE_OFFSET(CCamera, m_bFadeTargetIsSplashScreen, 0x74); +VALIDATE_OFFSET(CCamera, m_bWorldViewerBeingUsed, 0x75); +VALIDATE_OFFSET(CCamera, m_nActiveCam, 0x76); +VALIDATE_OFFSET(CCamera, m_nCamShakeStart, 0x78); +VALIDATE_OFFSET(CCamera, m_nFirstPersonCamLastInputTime, 0x7C); +VALIDATE_OFFSET(CCamera, m_nLongestTimeInMill, 0x80); +VALIDATE_OFFSET(CCamera, m_nNumberOfTrainCamNodes, 0x84); +VALIDATE_OFFSET(CCamera, m_nTransitionJUSTStarted, 0x88); +VALIDATE_OFFSET(CCamera, m_nTransitionState, 0x89); +VALIDATE_OFFSET(CCamera, m_nTimeLastChange, 0x8C); +VALIDATE_OFFSET(CCamera, m_nTimeWeLeftIdle_StillNoInput, 0x90); +VALIDATE_OFFSET(CCamera, m_nTimeWeEnteredIdle, 0x94); +VALIDATE_OFFSET(CCamera, m_nTimeTransitionStart, 0x98); +VALIDATE_OFFSET(CCamera, m_nTransitionDuration, 0x9C); +VALIDATE_OFFSET(CCamera, m_nTransitionDurationTargetCoors, 0xA0); +VALIDATE_OFFSET(CCamera, m_nBlurBlue, 0xA4); +VALIDATE_OFFSET(CCamera, m_nBlurGreen, 0xA8); +VALIDATE_OFFSET(CCamera, m_nBlurRed, 0xAC); +VALIDATE_OFFSET(CCamera, m_nBlurType, 0xB0); +VALIDATE_OFFSET(CCamera, m_nWorkOutSpeedThisNumFrames, 0xB4); +VALIDATE_OFFSET(CCamera, m_nNumFramesSoFar, 0xB8); +VALIDATE_OFFSET(CCamera, m_nCurrentTrainCamNode, 0xBC); +VALIDATE_OFFSET(CCamera, m_nMotionBlur, 0xC0); +VALIDATE_OFFSET(CCamera, m_nMotionBlurAddAlpha, 0xC4); +VALIDATE_OFFSET(CCamera, m_nCheckCullZoneThisNumFrames, 0xC8); +VALIDATE_OFFSET(CCamera, m_nZoneCullFrameNumWereAt, 0xCC); +VALIDATE_OFFSET(CCamera, m_nWhoIsInControlOfTheCamera, 0xD0); +VALIDATE_OFFSET(CCamera, m_fCamFrontXNorm, 0xD4); +VALIDATE_OFFSET(CCamera, m_fCamFrontYNorm, 0xD8); +VALIDATE_OFFSET(CCamera, m_fCarZoomIndicator, 0xDC); +VALIDATE_OFFSET(CCamera, m_fCarZoomValue, 0xE0); +VALIDATE_OFFSET(CCamera, m_fCarZoomValueSmooth, 0xE4); +VALIDATE_OFFSET(CCamera, m_fDistanceToWater, 0xE8); +VALIDATE_OFFSET(CCamera, m_fFOVDuringInter, 0xEC); +VALIDATE_OFFSET(CCamera, m_fLODDistMultiplier, 0xF0); +VALIDATE_OFFSET(CCamera, m_fGenerationDistMultiplier, 0xF4); +VALIDATE_OFFSET(CCamera, m_fAlphaSpeedAtStartInter, 0xF8); +VALIDATE_OFFSET(CCamera, m_fAlphaWhenInterPol, 0xFC); +VALIDATE_OFFSET(CCamera, m_fAlphaDuringInterPol, 0x100); +VALIDATE_OFFSET(CCamera, m_fBetaDuringInterPol, 0x104); +VALIDATE_OFFSET(CCamera, m_fBetaSpeedAtStartInter, 0x108); +VALIDATE_OFFSET(CCamera, m_fBetaWhenInterPol, 0x10C); +VALIDATE_OFFSET(CCamera, m_fFOVWhenInterPol, 0x110); +VALIDATE_OFFSET(CCamera, m_fFOVSpeedAtStartInter, 0x114); +VALIDATE_OFFSET(CCamera, m_fStartingBetaForInterPol, 0x118); +VALIDATE_OFFSET(CCamera, m_fStartingAlphaForInterPol, 0x11C); +VALIDATE_OFFSET(CCamera, m_PedOrientForBehindOrInFront, 0x120); +VALIDATE_OFFSET(CCamera, m_fCameraAverageSpeed, 0x124); +VALIDATE_OFFSET(CCamera, m_fCameraSpeedSoFar, 0x128); +VALIDATE_OFFSET(CCamera, m_fCamShakeForce, 0x12C); +VALIDATE_OFFSET(CCamera, m_fCarZoomValueScript, 0x130); +VALIDATE_OFFSET(CCamera, m_fFovForTrain, 0x134); +VALIDATE_OFFSET(CCamera, m_fFOV_Wide_Screen, 0x138); +VALIDATE_OFFSET(CCamera, m_fNearClipScript, 0x13C); +VALIDATE_OFFSET(CCamera, m_fOldBetaDiff, 0x140); +VALIDATE_OFFSET(CCamera, m_fPedZoomValue, 0x144); +VALIDATE_OFFSET(CCamera, m_fPedZoomValueSmooth, 0x148); +VALIDATE_OFFSET(CCamera, m_fPedZoomValueScript, 0x14C); +VALIDATE_OFFSET(CCamera, m_fPositionAlongSpline, 0x150); +VALIDATE_OFFSET(CCamera, m_fScreenReductionPercentage, 0x154); +VALIDATE_OFFSET(CCamera, m_fScreenReductionSpeed, 0x158); +VALIDATE_OFFSET(CCamera, m_fAlphaForPlayerAnim1rstPerson, 0x15C); +VALIDATE_OFFSET(CCamera, m_fOrientation, 0x160); +VALIDATE_OFFSET(CCamera, m_fPedZoomIndicator, 0x164); +VALIDATE_OFFSET(CCamera, m_fPlayerExhaustion, 0x168); +VALIDATE_OFFSET(CCamera, m_fSoundDistUp, 0x16C); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsRead, 0x170); +VALIDATE_OFFSET(CCamera, m_fSoundDistUpAsReadOld, 0x174); +VALIDATE_OFFSET(CCamera, m_fAvoidTheGeometryProbsTimer, 0x178); +VALIDATE_OFFSET(CCamera, m_nAvoidTheGeometryProbsDirn, 0x17C); +VALIDATE_OFFSET(CCamera, m_fWideScreenReductionAmount, 0x180); +VALIDATE_OFFSET(CCamera, m_fStartingFOVForInterPol, 0x184); +VALIDATE_OFFSET(CCamera, m_asCams, 0x188); +VALIDATE_OFFSET(CCamera, pToGarageWeAreIn, 0x6EC); +VALIDATE_OFFSET(CCamera, pToGarageWeAreInForHackAvoidFirstPerson, 0x6F0); +VALIDATE_OFFSET(CCamera, m_PlayerMode, 0x6F4); +VALIDATE_OFFSET(CCamera, m_PlayerWeaponMode, 0x700); +VALIDATE_OFFSET(CCamera, m_vecPreviousCameraPosition, 0x70C); +VALIDATE_OFFSET(CCamera, m_vecRealPreviousCameraPosition, 0x718); +VALIDATE_OFFSET(CCamera, m_vecAimingTargetCoors, 0x724); +VALIDATE_OFFSET(CCamera, m_vecFixedModeVector, 0x730); +VALIDATE_OFFSET(CCamera, m_vecFixedModeSource, 0x73C); +VALIDATE_OFFSET(CCamera, m_vecFixedModeUpOffSet, 0x748); +VALIDATE_OFFSET(CCamera, m_vecCutSceneOffset, 0x754); +VALIDATE_OFFSET(CCamera, m_vecStartingSourceForInterPol, 0x760); +VALIDATE_OFFSET(CCamera, m_vecStartingTargetForInterPol, 0x76C); +VALIDATE_OFFSET(CCamera, m_vecStartingUpForInterPol, 0x778); +VALIDATE_OFFSET(CCamera, m_vecSourceSpeedAtStartInter, 0x784); +VALIDATE_OFFSET(CCamera, m_vecTargetSpeedAtStartInter, 0x790); +VALIDATE_OFFSET(CCamera, m_vecUpSpeedAtStartInter, 0x79C); +VALIDATE_OFFSET(CCamera, m_vecSourceWhenInterPol, 0x7A8); +VALIDATE_OFFSET(CCamera, m_vecTargetWhenInterPol, 0x7B4); +VALIDATE_OFFSET(CCamera, m_vecUpWhenInterPol, 0x7C0); +VALIDATE_OFFSET(CCamera, m_vecClearGeometryVec, 0x7CC); +VALIDATE_OFFSET(CCamera, m_vecGameCamPos, 0x7D8); +VALIDATE_OFFSET(CCamera, m_vecSourceDuringInter, 0x7E4); +VALIDATE_OFFSET(CCamera, m_vecTargetDuringInter, 0x7F0); +VALIDATE_OFFSET(CCamera, m_vecUpDuringInter, 0x7FC); +VALIDATE_OFFSET(CCamera, m_pRwCamera, 0x808); +VALIDATE_OFFSET(CCamera, m_pTargetEntity, 0x80C); +VALIDATE_OFFSET(CCamera, m_ArrPathArray, 0x810); +VALIDATE_OFFSET(CCamera, m_CameraMatrix, 0x820); +VALIDATE_OFFSET(CCamera, m_bGarageFixedCamPositionSet, 0x868); +VALIDATE_OFFSET(CCamera, m_vecDoingSpecialInterPolation, 0x869); +VALIDATE_OFFSET(CCamera, m_bScriptParametersSetForInterPol, 0x86A); +VALIDATE_OFFSET(CCamera, m_bFading, 0x86B); +VALIDATE_OFFSET(CCamera, m_bMusicFading, 0x86C); +VALIDATE_OFFSET(CCamera, m_ViewMatrix, 0x870); +VALIDATE_OFFSET(CCamera, m_vecFrustumNormals, 0x8B8); +VALIDATE_OFFSET(CCamera, m_vecOldSourceForInter, 0x8E8); +VALIDATE_OFFSET(CCamera, m_vecOldFrontForInter, 0x8F4); +VALIDATE_OFFSET(CCamera, m_vecOldUpForInter, 0x900); +VALIDATE_OFFSET(CCamera, m_vecOldFOVForInter, 0x90C); +VALIDATE_OFFSET(CCamera, m_fFLOATingFade, 0x910); +VALIDATE_OFFSET(CCamera, m_fFLOATingFadeMusic, 0x914); +VALIDATE_OFFSET(CCamera, m_fTimeToFadeOut, 0x918); +VALIDATE_OFFSET(CCamera, m_fTimeToFadeMusic, 0x91C); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopMoving, 0x920); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopCatchUp, 0x924); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopMovingTarget, 0x928); +VALIDATE_OFFSET(CCamera, m_fFractionInterToStopCatchUpTarget, 0x92C); +VALIDATE_OFFSET(CCamera, m_fGaitSwayBuffer, 0x930); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToStopMoving, 0x934); +VALIDATE_OFFSET(CCamera, m_fScriptPercentageInterToCatchUp, 0x938); +VALIDATE_OFFSET(CCamera, m_fScriptTimeForInterPolation, 0x93C); +VALIDATE_OFFSET(CCamera, m_nFadingDirection, 0x940); +VALIDATE_OFFSET(CCamera, m_nModeObbeCamIsInForCar, 0x944); +VALIDATE_OFFSET(CCamera, m_nModeToGoTo, 0x948); +VALIDATE_OFFSET(CCamera, m_nMusicFadingDirection, 0x94A); +VALIDATE_OFFSET(CCamera, m_nTypeOfSwitch, 0x94C); +VALIDATE_OFFSET(CCamera, m_nFadeTimeStarted, 0x950); +VALIDATE_OFFSET(CCamera, m_nFadeTimeStartedMusic, 0x954); +VALIDATE_SIZE(CCamera, 0x958); extern CCamera &TheCamera; diff --git a/plugin_vc/game_vc/CCarAI.h b/plugin_vc/game_vc/CCarAI.h index 1eed381ec..dbdbe450a 100644 --- a/plugin_vc/game_vc/CCarAI.h +++ b/plugin_vc/game_vc/CCarAI.h @@ -30,5 +30,6 @@ class PLUGIN_API CCarAI { SUPPORTED_10EN_11EN static void TellOccupantsToLeaveCar(CVehicle *vehicle); SUPPORTED_10EN_11EN static void UpdateCarAI(CVehicle *vehicle); }; +VALIDATE_SIZE(CCarAI, 0x1); #include "meta/meta.CCarAI.h" diff --git a/plugin_vc/game_vc/CCarCtrl.cpp b/plugin_vc/game_vc/CCarCtrl.cpp index 3be9a8f9b..f64fdcb3b 100644 --- a/plugin_vc/game_vc/CCarCtrl.cpp +++ b/plugin_vc/game_vc/CCarCtrl.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCarCtrl.h" diff --git a/plugin_vc/game_vc/CCarCtrl.h b/plugin_vc/game_vc/CCarCtrl.h index 25e2d4df0..5d2e4cbe2 100644 --- a/plugin_vc/game_vc/CCarCtrl.h +++ b/plugin_vc/game_vc/CCarCtrl.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -70,3 +70,4 @@ class CCarCtrl { static void WeaveThroughObjectsSectorList(CPtrList& ptrlist, CVehicle* vehicle, float arg2, float arg3, float arg4, float arg5, float* arg6, float* arg7); static void WeaveThroughPedsSectorList(CPtrList& ptrlist, CVehicle* vehicle, CPhysical* arg2, float arg3, float arg4, float arg5, float arg6, float* arg7, float* arg8); }; +VALIDATE_SIZE(CCarCtrl, 0x1); diff --git a/plugin_vc/game_vc/CCarGenerator.cpp b/plugin_vc/game_vc/CCarGenerator.cpp index 0a4194ad2..5365d15da 100644 --- a/plugin_vc/game_vc/CCarGenerator.cpp +++ b/plugin_vc/game_vc/CCarGenerator.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCarGenerator.h" diff --git a/plugin_vc/game_vc/CCarGenerator.h b/plugin_vc/game_vc/CCarGenerator.h index 99f2b2a85..f09f0f065 100644 --- a/plugin_vc/game_vc/CCarGenerator.h +++ b/plugin_vc/game_vc/CCarGenerator.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -38,5 +38,20 @@ class CCarGenerator { void SwitchOff(); void SwitchOn(); }; - +VALIDATE_OFFSET(CCarGenerator, m_nModelId, 0x0); +VALIDATE_OFFSET(CCarGenerator, m_vPos, 0x4); +VALIDATE_OFFSET(CCarGenerator, m_fAngle, 0x10); +VALIDATE_OFFSET(CCarGenerator, m_nPrimaryColor, 0x14); +VALIDATE_OFFSET(CCarGenerator, m_nSecondaryColor, 0x16); +VALIDATE_OFFSET(CCarGenerator, m_nForceSpawn, 0x18); +VALIDATE_OFFSET(CCarGenerator, m_nAlarm, 0x19); +VALIDATE_OFFSET(CCarGenerator, m_nDoorLock, 0x1A); +VALIDATE_OFFSET(CCarGenerator, field_1B, 0x1B); +VALIDATE_OFFSET(CCarGenerator, m_nMinDelay, 0x1C); +VALIDATE_OFFSET(CCarGenerator, m_nMaxDelay, 0x1E); +VALIDATE_OFFSET(CCarGenerator, m_nTimeNextGen, 0x20); +VALIDATE_OFFSET(CCarGenerator, m_nVehicleHandle, 0x24); +VALIDATE_OFFSET(CCarGenerator, m_nEnabled, 0x28); +VALIDATE_OFFSET(CCarGenerator, field_2A, 0x2A); +VALIDATE_OFFSET(CCarGenerator, field_2B, 0x2B); VALIDATE_SIZE(CCarGenerator, 0x2C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CCivilianPed.cpp b/plugin_vc/game_vc/CCivilianPed.cpp index 208b6dcee..aa55f65f5 100644 --- a/plugin_vc/game_vc/CCivilianPed.cpp +++ b/plugin_vc/game_vc/CCivilianPed.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCivilianPed.h" diff --git a/plugin_vc/game_vc/CCivilianPed.h b/plugin_vc/game_vc/CCivilianPed.h index c608e1704..43f6dff24 100644 --- a/plugin_vc/game_vc/CCivilianPed.h +++ b/plugin_vc/game_vc/CCivilianPed.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" #include "ePedType.h" @@ -31,5 +30,11 @@ class CCivilianPed : public CPed { void EnterVacantNearbyCars(); void UseNearbyAttractors(); }; - +VALIDATE_OFFSET(CCivilianPed, m_bIsCriminal, 0x5F4); +VALIDATE_OFFSET(CCivilianPed, field_5F8, 0x5F8); +VALIDATE_OFFSET(CCivilianPed, field_5FC, 0x5FC); +VALIDATE_OFFSET(CCivilianPed, m_bFoundVacantNearbyCar, 0x5FD); +VALIDATE_OFFSET(CCivilianPed, m_nCivilianVehicleModels, 0x600); +VALIDATE_OFFSET(CCivilianPed, m_bUseAttractorInstantly, 0x640); +VALIDATE_OFFSET(CCivilianPed, dwSitFreqCounter, 0x644); VALIDATE_SIZE(CCivilianPed, 0x648); \ No newline at end of file diff --git a/plugin_vc/game_vc/CClock.h b/plugin_vc/game_vc/CClock.h index 6b7560fb6..97bed75f3 100644 --- a/plugin_vc/game_vc/CClock.h +++ b/plugin_vc/game_vc/CClock.h @@ -44,5 +44,6 @@ class PLUGIN_API CClock { //! Updates a time. Called each frame from CGame::Process SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CClock, 0x1); #include "meta/meta.CClock.h" diff --git a/plugin_vc/game_vc/CClouds.cpp b/plugin_vc/game_vc/CClouds.cpp index 1f57e750a..9e51072d7 100644 --- a/plugin_vc/game_vc/CClouds.cpp +++ b/plugin_vc/game_vc/CClouds.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CClouds.h" diff --git a/plugin_vc/game_vc/CClouds.h b/plugin_vc/game_vc/CClouds.h index ca8eea253..0abc8ba68 100644 --- a/plugin_vc/game_vc/CClouds.h +++ b/plugin_vc/game_vc/CClouds.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -17,4 +17,5 @@ class CClouds static void RenderHorizon(); static void Shutdown(); static void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CClouds, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CClumpModelInfo.cpp b/plugin_vc/game_vc/CClumpModelInfo.cpp index b179a22ca..214f3051f 100644 --- a/plugin_vc/game_vc/CClumpModelInfo.cpp +++ b/plugin_vc/game_vc/CClumpModelInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CClumpModelInfo.h" diff --git a/plugin_vc/game_vc/CClumpModelInfo.h b/plugin_vc/game_vc/CClumpModelInfo.h index 430ba35da..4c0bc9a6a 100644 --- a/plugin_vc/game_vc/CClumpModelInfo.h +++ b/plugin_vc/game_vc/CClumpModelInfo.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CBaseModelInfo.h" #include "RenderWare.h" @@ -16,8 +15,9 @@ struct FrameSearchData { char const *name; RwFrame *result; }; - -VALIDATE_SIZE(FrameSearchData, 8); +VALIDATE_OFFSET(FrameSearchData, name, 0x0); +VALIDATE_OFFSET(FrameSearchData, result, 0x4); +VALIDATE_SIZE(FrameSearchData, 0x8); class CClumpModelInfo : public CBaseModelInfo { public: @@ -68,7 +68,9 @@ class CClumpModelInfo : public CBaseModelInfo { CClumpModelInfo(const CClumpModelInfo &) {}; CClumpModelInfo &operator=(const CClumpModelInfo &) { return *this; }; }; - +VALIDATE_OFFSET(CClumpModelInfo, m_pClump, 0x28); +VALIDATE_OFFSET(CClumpModelInfo, m_pszAnimFileName, 0x2C); +VALIDATE_OFFSET(CClumpModelInfo, m_nAnimFileIndex, 0x2C); VALIDATE_SIZE(CClumpModelInfo, 0x30); struct ClumpModelStore { @@ -77,3 +79,6 @@ struct ClumpModelStore { ~ClumpModelStore(); }; +VALIDATE_OFFSET(ClumpModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(ClumpModelStore, m_sObject, 0x4); +VALIDATE_SIZE(ClumpModelStore, 0xF4); diff --git a/plugin_vc/game_vc/CColBox.cpp b/plugin_vc/game_vc/CColBox.cpp index c6a2d85b2..7ae100a80 100644 --- a/plugin_vc/game_vc/CColBox.cpp +++ b/plugin_vc/game_vc/CColBox.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CColBox.h" diff --git a/plugin_vc/game_vc/CColBox.h b/plugin_vc/game_vc/CColBox.h index 4d62d9c23..e4cac1bd9 100644 --- a/plugin_vc/game_vc/CColBox.h +++ b/plugin_vc/game_vc/CColBox.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CBox.h" @@ -15,4 +14,5 @@ class CColBox : public CBox void Set(CVector const& sup, CVector const& inf, unsigned char material, unsigned char flags); void operator=(CColBox const& right); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CColBox, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/CColLine.cpp b/plugin_vc/game_vc/CColLine.cpp index 97d7b67ef..67e6c9197 100644 --- a/plugin_vc/game_vc/CColLine.cpp +++ b/plugin_vc/game_vc/CColLine.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CColLine.h" diff --git a/plugin_vc/game_vc/CColLine.h b/plugin_vc/game_vc/CColLine.h index 1cde37741..35f1dd97f 100644 --- a/plugin_vc/game_vc/CColLine.h +++ b/plugin_vc/game_vc/CColLine.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -18,5 +17,7 @@ class CColLine CColLine(CVector const& start, CVector const& end); }; - +VALIDATE_OFFSET(CColLine, m_vStart, 0x0); +VALIDATE_OFFSET(CColLine, gapC, 0xC); +VALIDATE_OFFSET(CColLine, m_vEnd, 0x10); VALIDATE_SIZE(CColLine, 0x1C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CColModel.cpp b/plugin_vc/game_vc/CColModel.cpp index 7e0e8e287..a5f63b9f9 100644 --- a/plugin_vc/game_vc/CColModel.cpp +++ b/plugin_vc/game_vc/CColModel.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CColModel.h" diff --git a/plugin_vc/game_vc/CColModel.h b/plugin_vc/game_vc/CColModel.h index 17b380211..70c8e8c34 100644 --- a/plugin_vc/game_vc/CColModel.h +++ b/plugin_vc/game_vc/CColModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once @@ -40,5 +40,18 @@ class CColModel { static void* operator new(unsigned int size); void operator=(CColModel const& arg0); }; - +VALIDATE_OFFSET(CColModel, m_boundSphere, 0x0); +VALIDATE_OFFSET(CColModel, m_boundBox, 0x10); +VALIDATE_OFFSET(CColModel, m_nNumSpheres, 0x28); +VALIDATE_OFFSET(CColModel, m_nNumBoxes, 0x2A); +VALIDATE_OFFSET(CColModel, m_nNumTriangles, 0x2C); +VALIDATE_OFFSET(CColModel, m_nNumLines, 0x2E); +VALIDATE_OFFSET(CColModel, m_nColStoreIndex, 0x2F); +VALIDATE_OFFSET(CColModel, m_bLoaded, 0x30); +VALIDATE_OFFSET(CColModel, m_pSpheres, 0x34); +VALIDATE_OFFSET(CColModel, m_pLines, 0x38); +VALIDATE_OFFSET(CColModel, m_pBoxes, 0x3C); +VALIDATE_OFFSET(CColModel, m_pVertices, 0x40); +VALIDATE_OFFSET(CColModel, m_pTriangles, 0x44); +VALIDATE_OFFSET(CColModel, m_pTrianglePlanes, 0x48); VALIDATE_SIZE(CColModel, 0x4C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CColPoint.h b/plugin_vc/game_vc/CColPoint.h index 85efb0460..75e4a95c0 100644 --- a/plugin_vc/game_vc/CColPoint.h +++ b/plugin_vc/game_vc/CColPoint.h @@ -23,5 +23,13 @@ class CColPoint { CColPoint& operator=(CColPoint const& right); }; - +VALIDATE_OFFSET(CColPoint, m_vecPoint, 0x0); +VALIDATE_OFFSET(CColPoint, field_C, 0xC); +VALIDATE_OFFSET(CColPoint, m_vNormal, 0x10); +VALIDATE_OFFSET(CColPoint, field_1C, 0x1C); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeA, 0x20); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeA, 0x21); +VALIDATE_OFFSET(CColPoint, m_nSurfaceTypeB, 0x22); +VALIDATE_OFFSET(CColPoint, m_nPieceTypeB, 0x23); +VALIDATE_OFFSET(CColPoint, field_24, 0x24); VALIDATE_SIZE(CColPoint, 0x28); \ No newline at end of file diff --git a/plugin_vc/game_vc/CColSphere.cpp b/plugin_vc/game_vc/CColSphere.cpp index 53652200b..a2e3fc9ca 100644 --- a/plugin_vc/game_vc/CColSphere.cpp +++ b/plugin_vc/game_vc/CColSphere.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CColSphere.h" diff --git a/plugin_vc/game_vc/CColSphere.h b/plugin_vc/game_vc/CColSphere.h index 56ec54e65..2a7cd3643 100644 --- a/plugin_vc/game_vc/CColSphere.h +++ b/plugin_vc/game_vc/CColSphere.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CSphere.h" @@ -15,4 +14,5 @@ class CColSphere : public CSphere bool IntersectRay(CVector const& rayStart, CVector const& rayEnd, CVector& intPoint1, CVector& intPoint2); void Set(float radius, CVector const& center, unsigned char material, unsigned char flags); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CColSphere, 0x10); \ No newline at end of file diff --git a/plugin_vc/game_vc/CControllerConfigManager.h b/plugin_vc/game_vc/CControllerConfigManager.h index 8ef768525..c7c08d2e1 100644 --- a/plugin_vc/game_vc/CControllerConfigManager.h +++ b/plugin_vc/game_vc/CControllerConfigManager.h @@ -67,11 +67,16 @@ class CControllerKey { unsigned int keyCode; unsigned int priority; }; +VALIDATE_OFFSET(CControllerKey, keyCode, 0x0); +VALIDATE_OFFSET(CControllerKey, priority, 0x4); +VALIDATE_SIZE(CControllerKey, 0x8); class CControllerAction { public: CControllerKey keys[4]; }; +VALIDATE_OFFSET(CControllerAction, keys, 0x0); +VALIDATE_SIZE(CControllerAction, 0x20); class CControllerConfigManager { public: @@ -84,7 +89,14 @@ class CControllerConfigManager { bool m_aSimCheckers[4][4]; bool m_bMouseAssociated; }; - +VALIDATE_OFFSET(CControllerConfigManager, m_bFirstCapture, 0x0); +VALIDATE_OFFSET(CControllerConfigManager, m_OldState, 0x4); +VALIDATE_OFFSET(CControllerConfigManager, m_NewState, 0x114); +VALIDATE_OFFSET(CControllerConfigManager, m_aActionNames, 0x224); +VALIDATE_OFFSET(CControllerConfigManager, m_aButtonStates, 0xEF4); +VALIDATE_OFFSET(CControllerConfigManager, m_actions, 0xF08); +VALIDATE_OFFSET(CControllerConfigManager, m_aSimCheckers, 0x1428); +VALIDATE_OFFSET(CControllerConfigManager, m_bMouseAssociated, 0x1438); VALIDATE_SIZE(CControllerConfigManager, 0x143C); extern CControllerConfigManager& ControlsManager; diff --git a/plugin_vc/game_vc/CControllerState.h b/plugin_vc/game_vc/CControllerState.h index f1897c4fe..45c978d58 100644 --- a/plugin_vc/game_vc/CControllerState.h +++ b/plugin_vc/game_vc/CControllerState.h @@ -35,6 +35,28 @@ class PLUGIN_API CControllerState { SUPPORTED_10EN_11EN_STEAM bool CheckForInput(); }; +VALIDATE_OFFSET(CControllerState, LeftStickX, 0x0); +VALIDATE_OFFSET(CControllerState, LeftStickY, 0x2); +VALIDATE_OFFSET(CControllerState, RightStickX, 0x4); +VALIDATE_OFFSET(CControllerState, RightStickY, 0x6); +VALIDATE_OFFSET(CControllerState, LeftShoulder1, 0x8); +VALIDATE_OFFSET(CControllerState, LeftShoulder2, 0xA); +VALIDATE_OFFSET(CControllerState, RightShoulder1, 0xC); +VALIDATE_OFFSET(CControllerState, RightShoulder2, 0xE); +VALIDATE_OFFSET(CControllerState, DPadUp, 0x10); +VALIDATE_OFFSET(CControllerState, DPadDown, 0x12); +VALIDATE_OFFSET(CControllerState, DPadLeft, 0x14); +VALIDATE_OFFSET(CControllerState, DPadRight, 0x16); +VALIDATE_OFFSET(CControllerState, Start, 0x18); +VALIDATE_OFFSET(CControllerState, Select, 0x1A); +VALIDATE_OFFSET(CControllerState, ButtonSquare, 0x1C); +VALIDATE_OFFSET(CControllerState, ButtonTriangle, 0x1E); +VALIDATE_OFFSET(CControllerState, ButtonCross, 0x20); +VALIDATE_OFFSET(CControllerState, ButtonCircle, 0x22); +VALIDATE_OFFSET(CControllerState, ShockButtonL, 0x24); +VALIDATE_OFFSET(CControllerState, ShockButtonR, 0x26); +VALIDATE_OFFSET(CControllerState, RadioTrackSkip, 0x28); +VALIDATE_SIZE(CControllerState, 0x2A); #pragma pack(pop) VALIDATE_SIZE(CControllerState, 0x2A); diff --git a/plugin_vc/game_vc/CCopPed.cpp b/plugin_vc/game_vc/CCopPed.cpp index 9e48476d4..c990b3bcd 100644 --- a/plugin_vc/game_vc/CCopPed.cpp +++ b/plugin_vc/game_vc/CCopPed.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CCopPed.h" diff --git a/plugin_vc/game_vc/CCopPed.h b/plugin_vc/game_vc/CCopPed.h index 77b43ffbe..bf10f77bb 100644 --- a/plugin_vc/game_vc/CCopPed.h +++ b/plugin_vc/game_vc/CCopPed.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" #include "eCopType.h" @@ -53,5 +52,24 @@ class CCopPed : public CPed { void SetArrestPlayer(CPed* ped); void SetPursuit(bool arg0); }; - +VALIDATE_OFFSET(CCopPed, field_5F4, 0x5F4); +VALIDATE_OFFSET(CCopPed, field_5F8, 0x5F8); +VALIDATE_OFFSET(CCopPed, field_5FC, 0x5FC); +VALIDATE_OFFSET(CCopPed, field_5FD, 0x5FD); +VALIDATE_OFFSET(CCopPed, field_5FE, 0x5FE); +VALIDATE_OFFSET(CCopPed, field_5FF, 0x5FF); +VALIDATE_OFFSET(CCopPed, field_600, 0x600); +VALIDATE_OFFSET(CCopPed, field_601, 0x601); +VALIDATE_OFFSET(CCopPed, field_602, 0x602); +VALIDATE_OFFSET(CCopPed, field_603, 0x603); +VALIDATE_OFFSET(CCopPed, fAbseilPos, 0x604); +VALIDATE_OFFSET(CCopPed, m_copType, 0x608); +VALIDATE_OFFSET(CCopPed, bThrowsSpikeTrap, 0x60C); +VALIDATE_OFFSET(CCopPed, pHeliAbseil, 0x610); +VALIDATE_OFFSET(CCopPed, dwRopeIdentifier, 0x614); +VALIDATE_OFFSET(CCopPed, field_618, 0x618); +VALIDATE_OFFSET(CCopPed, field_61C, 0x61C); +VALIDATE_OFFSET(CCopPed, m_pStinger, 0x620); +VALIDATE_OFFSET(CCopPed, field_624, 0x624); +VALIDATE_OFFSET(CCopPed, field_628, 0x628); VALIDATE_SIZE(CCopPed, 0x62C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CCoronas.cpp b/plugin_vc/game_vc/CCoronas.cpp index 1ebec14b0..450c704ba 100644 --- a/plugin_vc/game_vc/CCoronas.cpp +++ b/plugin_vc/game_vc/CCoronas.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_vc/game_vc/CCoronas.h b/plugin_vc/game_vc/CCoronas.h index 3f3150e58..153522c25 100644 --- a/plugin_vc/game_vc/CCoronas.h +++ b/plugin_vc/game_vc/CCoronas.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto Vice City) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -41,5 +40,6 @@ class CCoronas { // Updates coronas static void Update(); }; +VALIDATE_SIZE(CCoronas, 0x1); extern RwTexture **gpCoronaTexture; \ No newline at end of file diff --git a/plugin_vc/game_vc/CCrane.h b/plugin_vc/game_vc/CCrane.h index 9d16bbb9e..8c9c4a5ed 100644 --- a/plugin_vc/game_vc/CCrane.h +++ b/plugin_vc/game_vc/CCrane.h @@ -14,5 +14,6 @@ class PLUGIN_API CCrane { SUPPORTED_10EN_11EN_STEAM static void SetHookMatrix(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CCrane, 0x1); #include "meta/meta.CCrane.h" diff --git a/plugin_vc/game_vc/CCranes.h b/plugin_vc/game_vc/CCranes.h index 52faff387..8fe49b6c4 100644 --- a/plugin_vc/game_vc/CCranes.h +++ b/plugin_vc/game_vc/CCranes.h @@ -20,5 +20,6 @@ class PLUGIN_API CCranes { SUPPORTED_10EN_11EN_STEAM static void RegisterCarForMilitaryCrane(unsigned short arg1); SUPPORTED_10EN_11EN_STEAM static void UpdateCranes(); }; +VALIDATE_SIZE(CCranes, 0x1); #include "meta/meta.CCranes.h" diff --git a/plugin_vc/game_vc/CCurrentVehicle.h b/plugin_vc/game_vc/CCurrentVehicle.h index bc4729744..fb39daf0c 100644 --- a/plugin_vc/game_vc/CCurrentVehicle.h +++ b/plugin_vc/game_vc/CCurrentVehicle.h @@ -13,5 +13,5 @@ class CCurrentVehicle public: class CVehicle *m_pCurrentVehicle; }; - -VALIDATE_SIZE(CCurrentVehicle, 0x04); \ No newline at end of file +VALIDATE_OFFSET(CCurrentVehicle, m_pCurrentVehicle, 0x0); +VALIDATE_SIZE(CCurrentVehicle, 0x4); \ No newline at end of file diff --git a/plugin_vc/game_vc/CCutsceneMgr.h b/plugin_vc/game_vc/CCutsceneMgr.h index a9ba29fb4..7019920e8 100644 --- a/plugin_vc/game_vc/CCutsceneMgr.h +++ b/plugin_vc/game_vc/CCutsceneMgr.h @@ -19,3 +19,4 @@ class CCutsceneMgr { static int32_t GetCutsceneTimeInMilliseconds(); }; +VALIDATE_SIZE(CCutsceneMgr, 0x1); diff --git a/plugin_vc/game_vc/CCutsceneObject.h b/plugin_vc/game_vc/CCutsceneObject.h index a4e4e8b4d..14d0fda5d 100644 --- a/plugin_vc/game_vc/CCutsceneObject.h +++ b/plugin_vc/game_vc/CCutsceneObject.h @@ -20,5 +20,7 @@ class CCutsceneObject : public CObject { CCutsceneObject(); void CreateShadow(); }; - +VALIDATE_OFFSET(CCutsceneObject, m_pCutsceneShadow, 0x194); +VALIDATE_OFFSET(CCutsceneObject, m_pAttachTo, 0x198); +VALIDATE_OFFSET(CCutsceneObject, m_pAttachmentObject, 0x19C); VALIDATE_SIZE(CCutsceneObject, 0x1A0); \ No newline at end of file diff --git a/plugin_vc/game_vc/CCutsceneShadow.h b/plugin_vc/game_vc/CCutsceneShadow.h index a873918a9..8c25b9bab 100644 --- a/plugin_vc/game_vc/CCutsceneShadow.h +++ b/plugin_vc/game_vc/CCutsceneShadow.h @@ -43,7 +43,18 @@ class PLUGIN_API CCutsceneShadow { SUPPORTED_10EN_11EN_STEAM RwRaster *Update(); SUPPORTED_10EN_11EN_STEAM RwTexture *UpdateForCutscene(); }; - +VALIDATE_OFFSET(CCutsceneShadow, m_Camera, 0x0); +VALIDATE_OFFSET(CCutsceneShadow, m_bResample, 0x8); +VALIDATE_OFFSET(CCutsceneShadow, m_ResampleCamera, 0xC); +VALIDATE_OFFSET(CCutsceneShadow, m_nBlurPasses, 0x14); +VALIDATE_OFFSET(CCutsceneShadow, m_BlurCamera, 0x18); +VALIDATE_OFFSET(CCutsceneShadow, m_bGradient, 0x20); +VALIDATE_OFFSET(CCutsceneShadow, m_GradientCamera, 0x24); +VALIDATE_OFFSET(CCutsceneShadow, m_pAtomic, 0x2C); +VALIDATE_OFFSET(CCutsceneShadow, m_nRwObjectType, 0x30); +VALIDATE_OFFSET(CCutsceneShadow, m_pLight, 0x34); +VALIDATE_OFFSET(CCutsceneShadow, m_BoundingSphere, 0x38); +VALIDATE_OFFSET(CCutsceneShadow, m_BaseSphere, 0x48); VALIDATE_SIZE(CCutsceneShadow, 0x58); #include "meta/meta.CCutsceneShadow.h" diff --git a/plugin_vc/game_vc/CDamageManager.cpp b/plugin_vc/game_vc/CDamageManager.cpp index b33765027..6b9e8c9af 100644 --- a/plugin_vc/game_vc/CDamageManager.cpp +++ b/plugin_vc/game_vc/CDamageManager.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CDamageManager.h" diff --git a/plugin_vc/game_vc/CDamageManager.h b/plugin_vc/game_vc/CDamageManager.h index 0b8c882fd..8105aa587 100644 --- a/plugin_vc/game_vc/CDamageManager.h +++ b/plugin_vc/game_vc/CDamageManager.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -106,5 +106,8 @@ class CDamageManager { void SetWheelStatus(int wheel, unsigned int status); void SetLightStatus(eLights light, unsigned int status); }; - +VALIDATE_OFFSET(CDamageManager, uDamId, 0x0); +VALIDATE_OFFSET(CDamageManager, bStates, 0x4); +VALIDATE_OFFSET(CDamageManager, uLightBits, 0x10); +VALIDATE_OFFSET(CDamageManager, uPanelBits, 0x14); VALIDATE_SIZE(CDamageManager, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/CDarkel.cpp b/plugin_vc/game_vc/CDarkel.cpp index f92d0b62a..758ae5546 100644 --- a/plugin_vc/game_vc/CDarkel.cpp +++ b/plugin_vc/game_vc/CDarkel.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CDarkel.h" diff --git a/plugin_vc/game_vc/CDarkel.h b/plugin_vc/game_vc/CDarkel.h index f3e1652b2..bdf730f21 100644 --- a/plugin_vc/game_vc/CDarkel.h +++ b/plugin_vc/game_vc/CDarkel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -44,4 +44,5 @@ class CDarkel { static void ResetOnPlayerDeath(); static void StartFrenzy(eWeaponType weaponType, int arg1, unsigned short arg2, int arg3, unsigned short* arg4, int arg5, int arg6, int arg7, bool arg8, bool arg9); static void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CDarkel, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CDirectory.h b/plugin_vc/game_vc/CDirectory.h index 9e79aa7a8..febc28de9 100644 --- a/plugin_vc/game_vc/CDirectory.h +++ b/plugin_vc/game_vc/CDirectory.h @@ -27,8 +27,9 @@ class PLUGIN_API CDirectory { SUPPORTED_10EN void ReadDirFile(char const *filename); SUPPORTED_10EN bool WriteDirFile(char const *filename); }; - +VALIDATE_OFFSET(CDirectory, m_pEntries, 0x0); +VALIDATE_OFFSET(CDirectory, m_nCapacity, 0x4); +VALIDATE_OFFSET(CDirectory, m_nNumEntries, 0x8); VALIDATE_SIZE(CDirectory, 0xC); -VALIDATE_SIZE(CDirectory::DirectoryInfo, 0x20); #include "meta/meta.CDirectory.h" diff --git a/plugin_vc/game_vc/CDoor.cpp b/plugin_vc/game_vc/CDoor.cpp index 60b9a9edd..92d3bac2f 100644 --- a/plugin_vc/game_vc/CDoor.cpp +++ b/plugin_vc/game_vc/CDoor.cpp @@ -1,7 +1,7 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CDoor.h" \ No newline at end of file diff --git a/plugin_vc/game_vc/CDoor.h b/plugin_vc/game_vc/CDoor.h index b55c01c4c..ff1a3f1dc 100644 --- a/plugin_vc/game_vc/CDoor.h +++ b/plugin_vc/game_vc/CDoor.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -22,5 +21,14 @@ class PLUGIN_API CDoor { float fVelAngle; CVector vecVelocity; }; - +VALIDATE_OFFSET(CDoor, fAngleInPosOne, 0x0); +VALIDATE_OFFSET(CDoor, fAngleInPosTwo, 0x4); +VALIDATE_OFFSET(CDoor, nAxisDirection, 0x8); +VALIDATE_OFFSET(CDoor, nAxis, 0x9); +VALIDATE_OFFSET(CDoor, nState, 0xA); +VALIDATE_OFFSET(CDoor, __f000B, 0xB); +VALIDATE_OFFSET(CDoor, fAngle, 0xC); +VALIDATE_OFFSET(CDoor, fPrevAngle, 0x10); +VALIDATE_OFFSET(CDoor, fVelAngle, 0x14); +VALIDATE_OFFSET(CDoor, vecVelocity, 0x18); VALIDATE_SIZE(CDoor, 0x24); \ No newline at end of file diff --git a/plugin_vc/game_vc/CDraw.cpp b/plugin_vc/game_vc/CDraw.cpp index cf9889742..c097ed577 100644 --- a/plugin_vc/game_vc/CDraw.cpp +++ b/plugin_vc/game_vc/CDraw.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CDraw.h" // variables diff --git a/plugin_vc/game_vc/CDraw.h b/plugin_vc/game_vc/CDraw.h index 75b01c6be..5102a1403 100644 --- a/plugin_vc/game_vc/CDraw.h +++ b/plugin_vc/game_vc/CDraw.h @@ -25,4 +25,5 @@ class CDraw // functions static void CalculateAspectRatio(); static void SetFOV(float fov); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CDraw, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CDummy.h b/plugin_vc/game_vc/CDummy.h index a782f96d6..3d5b62de0 100644 --- a/plugin_vc/game_vc/CDummy.h +++ b/plugin_vc/game_vc/CDummy.h @@ -23,7 +23,7 @@ class CDummy : public CEntity { CDummy(const CDummy &) = delete; CDummy &operator=(const CDummy &) = delete; }; - +VALIDATE_OFFSET(CDummy, m_collisionList, 0x64); VALIDATE_SIZE(CDummy, 0x68); bool IsDummyPointerValid(CDummy* dummy); \ No newline at end of file diff --git a/plugin_vc/game_vc/CDummyObject.h b/plugin_vc/game_vc/CDummyObject.h index d91dc94ad..e1af4878b 100644 --- a/plugin_vc/game_vc/CDummyObject.h +++ b/plugin_vc/game_vc/CDummyObject.h @@ -17,5 +17,4 @@ class CDummyObject : public CDummy { CDummyObject(const CDummyObject &) = delete; CDummyObject &operator=(const CDummyObject &) = delete; }; - VALIDATE_SIZE(CDummyObject, 0x68); \ No newline at end of file diff --git a/plugin_vc/game_vc/CEmergencyPed.cpp b/plugin_vc/game_vc/CEmergencyPed.cpp index bca4fce8b..2f3e285bd 100644 --- a/plugin_vc/game_vc/CEmergencyPed.cpp +++ b/plugin_vc/game_vc/CEmergencyPed.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CEmergencyPed.h" diff --git a/plugin_vc/game_vc/CEmergencyPed.h b/plugin_vc/game_vc/CEmergencyPed.h index 8da2951e9..613e3e12d 100644 --- a/plugin_vc/game_vc/CEmergencyPed.h +++ b/plugin_vc/game_vc/CEmergencyPed.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" @@ -26,5 +25,10 @@ class CEmergencyPed : public CPed void FiremanAI(); void MedicAI(); }; - +VALIDATE_OFFSET(CEmergencyPed, field_5F4, 0x5F4); +VALIDATE_OFFSET(CEmergencyPed, field_5F8, 0x5F8); +VALIDATE_OFFSET(CEmergencyPed, field_5FC, 0x5FC); +VALIDATE_OFFSET(CEmergencyPed, field_600, 0x600); +VALIDATE_OFFSET(CEmergencyPed, field_604, 0x604); +VALIDATE_OFFSET(CEmergencyPed, field_608, 0x608); VALIDATE_SIZE(CEmergencyPed, 0x60C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CEntity.cpp b/plugin_vc/game_vc/CEntity.cpp index b78c5151b..87a5e5930 100644 --- a/plugin_vc/game_vc/CEntity.cpp +++ b/plugin_vc/game_vc/CEntity.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CEntity.h" diff --git a/plugin_vc/game_vc/CEntity.h b/plugin_vc/game_vc/CEntity.h index aedc853f5..68b4da38d 100644 --- a/plugin_vc/game_vc/CEntity.h +++ b/plugin_vc/game_vc/CEntity.h @@ -171,7 +171,15 @@ class CEntity : public CPlaceable { CEntity(const CEntity &) = delete; CEntity &operator=(const CEntity &) = delete; }; - +VALIDATE_OFFSET(CEntity, m_pRwObject, 0x4C); +VALIDATE_OFFSET(CEntity, m_pRwAtomic, 0x4C); +VALIDATE_OFFSET(CEntity, m_pRwClump, 0x4C); +VALIDATE_OFFSET(CEntity, m_nScanCode, 0x58); +VALIDATE_OFFSET(CEntity, m_nRandomSeed, 0x5A); +VALIDATE_OFFSET(CEntity, m_nModelIndex, 0x5C); +VALIDATE_OFFSET(CEntity, m_nLevel, 0x5E); +VALIDATE_OFFSET(CEntity, m_nAreaCode, 0x5F); +VALIDATE_OFFSET(CEntity, m_pFirstRef, 0x60); VALIDATE_SIZE(CEntity, 0x64); RpAtomic *AtomicRemoveAnimFromSkinCB(RpAtomic* atomic, void* callbackData); \ No newline at end of file diff --git a/plugin_vc/game_vc/CEntryInfoList.h b/plugin_vc/game_vc/CEntryInfoList.h index d5a4f5c02..d93989e46 100644 --- a/plugin_vc/game_vc/CEntryInfoList.h +++ b/plugin_vc/game_vc/CEntryInfoList.h @@ -32,5 +32,5 @@ class CEntryInfoList { node->m_pPrev->m_pNext = node->m_pNext; } }; - +VALIDATE_OFFSET(CEntryInfoList, m_pLastEntry, 0x0); VALIDATE_SIZE(CEntryInfoList, 0x4); \ No newline at end of file diff --git a/plugin_vc/game_vc/CEntryInfoNode.h b/plugin_vc/game_vc/CEntryInfoNode.h index c937d0ba4..e30bc5118 100644 --- a/plugin_vc/game_vc/CEntryInfoNode.h +++ b/plugin_vc/game_vc/CEntryInfoNode.h @@ -28,5 +28,9 @@ class CEntryInfoNode { m_pSector = sector; } }; - +VALIDATE_OFFSET(CEntryInfoNode, m_pPtrList, 0x0); +VALIDATE_OFFSET(CEntryInfoNode, m_pPtrNode, 0x4); +VALIDATE_OFFSET(CEntryInfoNode, m_pSector, 0x8); +VALIDATE_OFFSET(CEntryInfoNode, m_pNext, 0xC); +VALIDATE_OFFSET(CEntryInfoNode, m_pPrev, 0x10); VALIDATE_SIZE(CEntryInfoNode, 0x14); diff --git a/plugin_vc/game_vc/CEscalators.cpp b/plugin_vc/game_vc/CEscalators.cpp index ce6a6fc61..c468a52f1 100644 --- a/plugin_vc/game_vc/CEscalators.cpp +++ b/plugin_vc/game_vc/CEscalators.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CEscalators.h" diff --git a/plugin_vc/game_vc/CEscalators.h b/plugin_vc/game_vc/CEscalators.h index 560e8e0bd..c33e5a684 100644 --- a/plugin_vc/game_vc/CEscalators.h +++ b/plugin_vc/game_vc/CEscalators.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -18,4 +18,5 @@ class CEscalators { static void Init(); static void Shutdown(); void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CEscalators, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CFileLoader.h b/plugin_vc/game_vc/CFileLoader.h index 703ef17a8..ba612e325 100644 --- a/plugin_vc/game_vc/CFileLoader.h +++ b/plugin_vc/game_vc/CFileLoader.h @@ -89,3 +89,4 @@ class PLUGIN_API CFileLoader { static void LoadCollisionModel(unsigned char* buf, CColModel& model, char* modelname); }; +VALIDATE_SIZE(CFileLoader, 0x1); diff --git a/plugin_vc/game_vc/CFileMgr.h b/plugin_vc/game_vc/CFileMgr.h index 13a60ce98..a6f24465b 100644 --- a/plugin_vc/game_vc/CFileMgr.h +++ b/plugin_vc/game_vc/CFileMgr.h @@ -27,4 +27,5 @@ class PLUGIN_API CFileMgr { static void SetDir(char const* dir); static void ChangeDir(char const* dir); static void Initialise(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CFileMgr, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CFire.h b/plugin_vc/game_vc/CFire.h index d70ac0c9b..6f5bb2343 100644 --- a/plugin_vc/game_vc/CFire.h +++ b/plugin_vc/game_vc/CFire.h @@ -43,5 +43,18 @@ class CFire { void Extinguish(); void ProcessFire(); }; - +VALIDATE_OFFSET(CFire, m_bActive, 0x0); +VALIDATE_OFFSET(CFire, m_bCreatedByScript, 0x1); +VALIDATE_OFFSET(CFire, m_bMoves, 0x2); +VALIDATE_OFFSET(CFire, m_bMakesNoise, 0x3); +VALIDATE_OFFSET(CFire, m_vecPosition, 0x4); +VALIDATE_OFFSET(CFire, m_pEntityTarget, 0x10); +VALIDATE_OFFSET(CFire, m_pEntityCreator, 0x14); +VALIDATE_OFFSET(CFire, m_nTimeToBurn, 0x18); +VALIDATE_OFFSET(CFire, m_uShadowTimer, 0x1C); +VALIDATE_OFFSET(CFire, m_uPeriodTimer, 0x20); +VALIDATE_OFFSET(CFire, m_fParticleSize, 0x24); +VALIDATE_OFFSET(CFire, m_fStrength, 0x28); +VALIDATE_OFFSET(CFire, m_bBeingExtinguished, 0x2C); +VALIDATE_OFFSET(CFire, pad, 0x2D); VALIDATE_SIZE(CFire, 0x30); \ No newline at end of file diff --git a/plugin_vc/game_vc/CFireManager.h b/plugin_vc/game_vc/CFireManager.h index 4f0187ada..4c33701eb 100644 --- a/plugin_vc/game_vc/CFireManager.h +++ b/plugin_vc/game_vc/CFireManager.h @@ -30,7 +30,8 @@ class CFireManager { int StartScriptFire(CVector const& point, CEntity* target); void Update(); }; - +VALIDATE_OFFSET(CFireManager, m_aFires, 0x0); +VALIDATE_OFFSET(CFireManager, m_nMaxFireGenerationsAllowed, 0xAE0); VALIDATE_SIZE(CFireManager, 0xAE4); extern CFireManager &gFireManager; \ No newline at end of file diff --git a/plugin_vc/game_vc/CFont.h b/plugin_vc/game_vc/CFont.h index f4ae9ef3c..ee12c03ef 100644 --- a/plugin_vc/game_vc/CFont.h +++ b/plugin_vc/game_vc/CFont.h @@ -17,11 +17,18 @@ struct tFontTable { unsigned short space; unsigned short unprop; }; +VALIDATE_OFFSET(tFontTable, prop, 0x0); +VALIDATE_OFFSET(tFontTable, space, 0x1A0); +VALIDATE_OFFSET(tFontTable, unprop, 0x1A2); +VALIDATE_SIZE(tFontTable, 0x1A4); struct tFontSize { tFontTable fonts[3]; unsigned short ftable[338]; }; +VALIDATE_OFFSET(tFontSize, fonts, 0x0); +VALIDATE_OFFSET(tFontSize, ftable, 0x4EC); +VALIDATE_SIZE(tFontSize, 0x790); enum eFontAlignment : unsigned char { ALIGN_CENTER, @@ -55,6 +62,22 @@ class CFontRenderState { char anonymous_14; short FontStyle; }; +VALIDATE_OFFSET(CFontRenderState, anonymous_0, 0x0); +VALIDATE_OFFSET(CFontRenderState, fTextPosX, 0x4); +VALIDATE_OFFSET(CFontRenderState, fTextPosY, 0x8); +VALIDATE_OFFSET(CFontRenderState, fTextSizeX, 0xC); +VALIDATE_OFFSET(CFontRenderState, fTextSizeY, 0x10); +VALIDATE_OFFSET(CFontRenderState, color, 0x14); +VALIDATE_OFFSET(CFontRenderState, fExtraSpace, 0x18); +VALIDATE_OFFSET(CFontRenderState, fSlant, 0x1C); +VALIDATE_OFFSET(CFontRenderState, fSlantRefPointX, 0x20); +VALIDATE_OFFSET(CFontRenderState, fSlantRefPointY, 0x24); +VALIDATE_OFFSET(CFontRenderState, bIsShadow, 0x28); +VALIDATE_OFFSET(CFontRenderState, bFontHalfTexture, 0x29); +VALIDATE_OFFSET(CFontRenderState, bProp, 0x2A); +VALIDATE_OFFSET(CFontRenderState, anonymous_14, 0x2B); +VALIDATE_OFFSET(CFontRenderState, FontStyle, 0x2C); +VALIDATE_SIZE(CFontRenderState, 0x30); class CFont { public: @@ -129,6 +152,7 @@ class CFont { SetBackgroundOff(); } }; +VALIDATE_SIZE(CFont, 0x1); void UnicodeMakeUpperCase(wchar_t* str_out, wchar_t const* str_in); int UnicodeStrlen(wchar_t const* str); diff --git a/plugin_vc/game_vc/CFontDetails.h b/plugin_vc/game_vc/CFontDetails.h index 0eee01714..ecea9d515 100644 --- a/plugin_vc/game_vc/CFontDetails.h +++ b/plugin_vc/game_vc/CFontDetails.h @@ -46,5 +46,36 @@ class CFontDetails ~CFontDetails(); }; +VALIDATE_OFFSET(CFontDetails, m_Color, 0x0); +VALIDATE_OFFSET(CFontDetails, m_vecScale, 0x4); +VALIDATE_OFFSET(CFontDetails, m_fSlant, 0xC); +VALIDATE_OFFSET(CFontDetails, m_vecSlantRefPoint, 0x10); +VALIDATE_OFFSET(CFontDetails, m_bJustify, 0x18); +VALIDATE_OFFSET(CFontDetails, m_bCentre, 0x19); +VALIDATE_OFFSET(CFontDetails, m_bRightJustify, 0x1A); +VALIDATE_OFFSET(CFontDetails, m_bBackground, 0x1B); +VALIDATE_OFFSET(CFontDetails, m_bBackGroundOnlyText, 0x1C); +VALIDATE_OFFSET(CFontDetails, m_bPropOn, 0x1D); +VALIDATE_OFFSET(CFontDetails, m_bForcedColor, 0x1E); +VALIDATE_OFFSET(CFontDetails, field_1F, 0x1F); +VALIDATE_OFFSET(CFontDetails, field_20, 0x20); +VALIDATE_OFFSET(CFontDetails, _pad0, 0x21); +VALIDATE_OFFSET(CFontDetails, m_fAlpha, 0x24); +VALIDATE_OFFSET(CFontDetails, m_BackgroundColor, 0x28); +VALIDATE_OFFSET(CFontDetails, m_fWrapX, 0x2C); +VALIDATE_OFFSET(CFontDetails, m_fCentreSize, 0x30); +VALIDATE_OFFSET(CFontDetails, m_fRightJustifyWrap, 0x34); +VALIDATE_OFFSET(CFontDetails, m_FontStyle, 0x38); +VALIDATE_OFFSET(CFontDetails, m_bFontHalfTexture, 0x3A); +VALIDATE_OFFSET(CFontDetails, _unk, 0x3B); +VALIDATE_OFFSET(CFontDetails, m_nShadowPos, 0x40); +VALIDATE_OFFSET(CFontDetails, m_DropColor, 0x42); +VALIDATE_OFFSET(CFontDetails, field_46, 0x46); +VALIDATE_OFFSET(CFontDetails, field_47, 0x47); +VALIDATE_OFFSET(CFontDetails, field_48, 0x48); +VALIDATE_OFFSET(CFontDetails, field_4C, 0x4C); +VALIDATE_OFFSET(CFontDetails, _pad1, 0x4D); +VALIDATE_OFFSET(CFontDetails, field_50, 0x50); +VALIDATE_SIZE(CFontDetails, 0x54); //VALIDATE_SIZE(CFontDetails, 0x54); \ No newline at end of file diff --git a/plugin_vc/game_vc/CGame.h b/plugin_vc/game_vc/CGame.h index 21756b690..2d989b40c 100644 --- a/plugin_vc/game_vc/CGame.h +++ b/plugin_vc/game_vc/CGame.h @@ -39,6 +39,7 @@ class PLUGIN_API CGame { SUPPORTED_10EN_11EN_STEAM static void ShutdownRenderWare(); SUPPORTED_10EN_11EN_STEAM static void TidyUpMemory(bool a1, bool clearD3Dmem); }; +VALIDATE_SIZE(CGame, 0x1); SUPPORTED_10EN_11EN_STEAM extern int &splashTxdId; SUPPORTED_10EN_11EN_STEAM extern bool &g_SlowMode; diff --git a/plugin_vc/game_vc/CGameLogic.h b/plugin_vc/game_vc/CGameLogic.h index 77eb3a5e0..213886c2b 100644 --- a/plugin_vc/game_vc/CGameLogic.h +++ b/plugin_vc/game_vc/CGameLogic.h @@ -20,4 +20,5 @@ class CGameLogic { static void RemoveShortCutDropOffPointForMission(); static void PassTime(uint32_t time); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CGameLogic, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CGangs.cpp b/plugin_vc/game_vc/CGangs.cpp index 378825da2..2c488c5cd 100644 --- a/plugin_vc/game_vc/CGangs.cpp +++ b/plugin_vc/game_vc/CGangs.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CGangs.h" diff --git a/plugin_vc/game_vc/CGangs.h b/plugin_vc/game_vc/CGangs.h index bc5aacecb..068d54573 100644 --- a/plugin_vc/game_vc/CGangs.h +++ b/plugin_vc/game_vc/CGangs.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" #include "CObject.h" @@ -35,5 +34,8 @@ class CGangs { }; - +VALIDATE_OFFSET(CGangs, nVehicleModel, 0x0); +VALIDATE_OFFSET(CGangs, nPedModels, 0x4); +VALIDATE_OFFSET(CGangs, uUnknown, 0xC); +VALIDATE_OFFSET(CGangs, nWeapons, 0x10); VALIDATE_SIZE(CGangs, 0x18); \ No newline at end of file diff --git a/plugin_vc/game_vc/CGarage.h b/plugin_vc/game_vc/CGarage.h index 8aabf39c5..1e92e8e44 100644 --- a/plugin_vc/game_vc/CGarage.h +++ b/plugin_vc/game_vc/CGarage.h @@ -1,7 +1,14 @@ +/* + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once #include "PluginBase.h" class CGarage { public: -}; \ No newline at end of file +}; +VALIDATE_SIZE(CGarage, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CGeneral.h b/plugin_vc/game_vc/CGeneral.h index c0ee137c5..a101882a9 100644 --- a/plugin_vc/game_vc/CGeneral.h +++ b/plugin_vc/game_vc/CGeneral.h @@ -45,5 +45,6 @@ class PLUGIN_API CGeneral { //! Solves the given quadratic function SUPPORTED_10EN_11EN_STEAM static unsigned char SolveQuadratic(float a, float b, float c, float &x1, float &x2); }; +VALIDATE_SIZE(CGeneral, 0x1); #include "meta/meta.CGeneral.h" diff --git a/plugin_vc/game_vc/CHeli.cpp b/plugin_vc/game_vc/CHeli.cpp index 1a752e5e1..657c4d196 100644 --- a/plugin_vc/game_vc/CHeli.cpp +++ b/plugin_vc/game_vc/CHeli.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CHeli.h" diff --git a/plugin_vc/game_vc/CHeli.h b/plugin_vc/game_vc/CHeli.h index 3fbc8215c..559f61450 100644 --- a/plugin_vc/game_vc/CHeli.h +++ b/plugin_vc/game_vc/CHeli.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVehicle.h" #include "CObject.h" @@ -86,7 +85,39 @@ class CHeli : public CVehicle { static bool TestSniperCollision(CVector* origin, CVector* target); static void UpdateHelis(); }; - +VALIDATE_OFFSET(CHeli, m_apModelNodes, 0x2A0); +VALIDATE_OFFSET(CHeli, m_nHeliState, 0x2C0); +VALIDATE_OFFSET(CHeli, m_fSearchLightX, 0x2C4); +VALIDATE_OFFSET(CHeli, m_fSearchLightY, 0x2C8); +VALIDATE_OFFSET(CHeli, m_nExplosionTime, 0x2CC); +VALIDATE_OFFSET(CHeli, field_2D0, 0x2D0); +VALIDATE_OFFSET(CHeli, m_fRotationX, 0x2D4); +VALIDATE_OFFSET(CHeli, m_fHeliForcedZ, 0x2D8); +VALIDATE_OFFSET(CHeli, m_fSearchLightIntensity, 0x2DC); +VALIDATE_OFFSET(CHeli, m_nHeliNumber, 0x2E0); +VALIDATE_OFFSET(CHeli, m_nHeliType, 0x2E1); +VALIDATE_OFFSET(CHeli, m_nHeliDestinationPoint, 0x2E2); +VALIDATE_OFFSET(CHeli, m_nNumSwatPassengers, 0x2E3); +VALIDATE_OFFSET(CHeli, m_anRopeLifeTime, 0x2E4); +VALIDATE_OFFSET(CHeli, fLastXPoses, 0x2E8); +VALIDATE_OFFSET(CHeli, fLastYPoses, 0x300); +VALIDATE_OFFSET(CHeli, field_318, 0x318); +VALIDATE_OFFSET(CHeli, field_31C, 0x31C); +VALIDATE_OFFSET(CHeli, field_320, 0x320); +VALIDATE_OFFSET(CHeli, m_nDamagePoints, 0x324); +VALIDATE_OFFSET(CHeli, m_fRotorAngle, 0x328); +VALIDATE_OFFSET(CHeli, field_32C, 0x32C); +VALIDATE_OFFSET(CHeli, field_330, 0x330); +VALIDATE_OFFSET(CHeli, field_334, 0x334); +VALIDATE_OFFSET(CHeli, field_338, 0x338); +VALIDATE_OFFSET(CHeli, field_33C, 0x33C); +VALIDATE_OFFSET(CHeli, field_340, 0x340); +VALIDATE_OFFSET(CHeli, field_344, 0x344); +VALIDATE_OFFSET(CHeli, field_348, 0x348); +VALIDATE_OFFSET(CHeli, field_34C, 0x34C); +VALIDATE_OFFSET(CHeli, field_354, 0x354); +VALIDATE_OFFSET(CHeli, field_358, 0x358); +VALIDATE_OFFSET(CHeli, field_35C, 0x35C); VALIDATE_SIZE(CHeli, 0x360); void GenerateHeli(bool enable); diff --git a/plugin_vc/game_vc/CHud.h b/plugin_vc/game_vc/CHud.h index a45541dcb..3ece9af3b 100644 --- a/plugin_vc/game_vc/CHud.h +++ b/plugin_vc/game_vc/CHud.h @@ -166,6 +166,7 @@ class PLUGIN_API CHud { SetZoneName(wname); } }; +VALIDATE_SIZE(CHud, 0x1); SUPPORTED_10EN_11EN_STEAM extern float(&BigMessageX)[6]; // float BigMessageX[6] SUPPORTED_10EN_11EN_STEAM extern float(&BigMessageInUse)[6]; // float BigMessageInUse[6] diff --git a/plugin_vc/game_vc/CIniFile.cpp b/plugin_vc/game_vc/CIniFile.cpp index caca2ab62..640da8751 100644 --- a/plugin_vc/game_vc/CIniFile.cpp +++ b/plugin_vc/game_vc/CIniFile.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CIniFile.h" diff --git a/plugin_vc/game_vc/CIniFile.h b/plugin_vc/game_vc/CIniFile.h index 7e5845b62..a66712d06 100644 --- a/plugin_vc/game_vc/CIniFile.h +++ b/plugin_vc/game_vc/CIniFile.h @@ -1,14 +1,14 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class CIniFile { public: static void LoadIniFile(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CIniFile, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CKeyboardState.h b/plugin_vc/game_vc/CKeyboardState.h index ba6a93127..d8cb4e32b 100644 --- a/plugin_vc/game_vc/CKeyboardState.h +++ b/plugin_vc/game_vc/CKeyboardState.h @@ -59,7 +59,52 @@ class PLUGIN_API CKeyboardState { SUPPORTED_10EN_11EN_STEAM void Clear(); }; - +VALIDATE_OFFSET(CKeyboardState, FKeys, 0x0); +VALIDATE_OFFSET(CKeyboardState, standardKeys, 0x18); +VALIDATE_OFFSET(CKeyboardState, esc, 0x218); +VALIDATE_OFFSET(CKeyboardState, insert, 0x21A); +VALIDATE_OFFSET(CKeyboardState, del, 0x21C); +VALIDATE_OFFSET(CKeyboardState, home, 0x21E); +VALIDATE_OFFSET(CKeyboardState, end, 0x220); +VALIDATE_OFFSET(CKeyboardState, pgup, 0x222); +VALIDATE_OFFSET(CKeyboardState, pgdn, 0x224); +VALIDATE_OFFSET(CKeyboardState, up, 0x226); +VALIDATE_OFFSET(CKeyboardState, down, 0x228); +VALIDATE_OFFSET(CKeyboardState, left, 0x22A); +VALIDATE_OFFSET(CKeyboardState, right, 0x22C); +VALIDATE_OFFSET(CKeyboardState, scroll, 0x22E); +VALIDATE_OFFSET(CKeyboardState, pause, 0x230); +VALIDATE_OFFSET(CKeyboardState, numlock, 0x232); +VALIDATE_OFFSET(CKeyboardState, div, 0x234); +VALIDATE_OFFSET(CKeyboardState, mul, 0x236); +VALIDATE_OFFSET(CKeyboardState, sub, 0x238); +VALIDATE_OFFSET(CKeyboardState, add, 0x23A); +VALIDATE_OFFSET(CKeyboardState, enter, 0x23C); +VALIDATE_OFFSET(CKeyboardState, decimal, 0x23E); +VALIDATE_OFFSET(CKeyboardState, num1, 0x240); +VALIDATE_OFFSET(CKeyboardState, num2, 0x242); +VALIDATE_OFFSET(CKeyboardState, num3, 0x244); +VALIDATE_OFFSET(CKeyboardState, num4, 0x246); +VALIDATE_OFFSET(CKeyboardState, num5, 0x248); +VALIDATE_OFFSET(CKeyboardState, num6, 0x24A); +VALIDATE_OFFSET(CKeyboardState, num7, 0x24C); +VALIDATE_OFFSET(CKeyboardState, num8, 0x24E); +VALIDATE_OFFSET(CKeyboardState, num9, 0x250); +VALIDATE_OFFSET(CKeyboardState, num0, 0x252); +VALIDATE_OFFSET(CKeyboardState, back, 0x254); +VALIDATE_OFFSET(CKeyboardState, tab, 0x256); +VALIDATE_OFFSET(CKeyboardState, capslock, 0x258); +VALIDATE_OFFSET(CKeyboardState, extenter, 0x25A); +VALIDATE_OFFSET(CKeyboardState, lshift, 0x25C); +VALIDATE_OFFSET(CKeyboardState, rshift, 0x25E); +VALIDATE_OFFSET(CKeyboardState, shift, 0x260); +VALIDATE_OFFSET(CKeyboardState, lctrl, 0x262); +VALIDATE_OFFSET(CKeyboardState, rctrl, 0x264); +VALIDATE_OFFSET(CKeyboardState, lmenu, 0x266); +VALIDATE_OFFSET(CKeyboardState, rmenu, 0x268); +VALIDATE_OFFSET(CKeyboardState, lwin, 0x26A); +VALIDATE_OFFSET(CKeyboardState, rwin, 0x26C); +VALIDATE_OFFSET(CKeyboardState, apps, 0x26E); VALIDATE_SIZE(CKeyboardState, 0x270); #include "meta/meta.CKeyboardState.h" diff --git a/plugin_vc/game_vc/CMatrix.h b/plugin_vc/game_vc/CMatrix.h index 615a14289..9f851915f 100644 --- a/plugin_vc/game_vc/CMatrix.h +++ b/plugin_vc/game_vc/CMatrix.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once @@ -89,7 +89,16 @@ class CMatrix { return at; } }; - +VALIDATE_OFFSET(CMatrix, right, 0x0); +VALIDATE_OFFSET(CMatrix, flags, 0xC); +VALIDATE_OFFSET(CMatrix, up, 0x10); +VALIDATE_OFFSET(CMatrix, pad1, 0x1C); +VALIDATE_OFFSET(CMatrix, at, 0x20); +VALIDATE_OFFSET(CMatrix, pad2, 0x2C); +VALIDATE_OFFSET(CMatrix, pos, 0x30); +VALIDATE_OFFSET(CMatrix, pad3, 0x3C); +VALIDATE_OFFSET(CMatrix, m_pAttachMatrix, 0x40); +VALIDATE_OFFSET(CMatrix, m_bOwnsAttachedMatrix, 0x44); VALIDATE_SIZE(CMatrix, 0x48); void Invert(CMatrix const& in, CMatrix&out); diff --git a/plugin_vc/game_vc/CMenuManager.h b/plugin_vc/game_vc/CMenuManager.h index 2b566e010..630edb18f 100644 --- a/plugin_vc/game_vc/CMenuManager.h +++ b/plugin_vc/game_vc/CMenuManager.h @@ -156,6 +156,15 @@ class PLUGIN_API CMenuPoly { float x4; float y4; }; +VALIDATE_OFFSET(CMenuPoly, x1, 0x0); +VALIDATE_OFFSET(CMenuPoly, y1, 0x4); +VALIDATE_OFFSET(CMenuPoly, x2, 0x8); +VALIDATE_OFFSET(CMenuPoly, y2, 0xC); +VALIDATE_OFFSET(CMenuPoly, x3, 0x10); +VALIDATE_OFFSET(CMenuPoly, y3, 0x14); +VALIDATE_OFFSET(CMenuPoly, x4, 0x18); +VALIDATE_OFFSET(CMenuPoly, y4, 0x1C); +VALIDATE_SIZE(CMenuPoly, 0x20); struct PLUGIN_API CMenuScreen { char m_ScreenName[8]; @@ -172,6 +181,11 @@ struct PLUGIN_API CMenuScreen { unsigned short m_nAlign; } m_aEntries[NUM_ENTRIES]; }; +VALIDATE_OFFSET(CMenuScreen, m_ScreenName, 0x0); +VALIDATE_OFFSET(CMenuScreen, m_nPreviousPage, 0x8); +VALIDATE_OFFSET(CMenuScreen, m_nParentEntry, 0x9); +VALIDATE_OFFSET(CMenuScreen, m_aEntries, 0xA); +VALIDATE_SIZE(CMenuScreen, 0xE2); class CMenuManager { public: @@ -313,6 +327,127 @@ class CMenuManager { void LoadSettings(); void SaveSettings(); }; +VALIDATE_OFFSET(CMenuManager, m_nStatsScrollDir, 0x0); +VALIDATE_OFFSET(CMenuManager, field_1, 0x1); +VALIDATE_OFFSET(CMenuManager, m_fStatsScrollSpeed, 0x4); +VALIDATE_OFFSET(CMenuManager, field_8, 0x8); +VALIDATE_OFFSET(CMenuManager, m_bPrefsUseVibration, 0x9); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowHud, 0xA); +VALIDATE_OFFSET(CMenuManager, field_B, 0xB); +VALIDATE_OFFSET(CMenuManager, m_nPrefsRadarMode, 0xC); +VALIDATE_OFFSET(CMenuManager, m_bDisplayControllerOnFoot, 0x10); +VALIDATE_OFFSET(CMenuManager, m_bShutDownFrontEndRequested, 0x11); +VALIDATE_OFFSET(CMenuManager, m_bStartUpFrontEndRequested, 0x12); +VALIDATE_OFFSET(CMenuManager, field_13, 0x13); +VALIDATE_OFFSET(CMenuManager, m_nKeyPressedCode, 0x14); +VALIDATE_OFFSET(CMenuManager, m_nPrefsBrightness, 0x18); +VALIDATE_OFFSET(CMenuManager, m_fPrefsLOD, 0x1C); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowSubtitles, 0x20); +VALIDATE_OFFSET(CMenuManager, m_bPrefsShowLegends, 0x21); +VALIDATE_OFFSET(CMenuManager, m_bPrefsUseWideScreen, 0x22); +VALIDATE_OFFSET(CMenuManager, m_bPrefsVsync, 0x23); +VALIDATE_OFFSET(CMenuManager, m_bPrefsVsyncDisp, 0x24); +VALIDATE_OFFSET(CMenuManager, m_bPrefsFrameLimiter, 0x25); +VALIDATE_OFFSET(CMenuManager, m_nPrefsAudio3DProviderIndex, 0x26); +VALIDATE_OFFSET(CMenuManager, m_nPrefsSpeakers, 0x27); +VALIDATE_OFFSET(CMenuManager, m_bPrefsDMA, 0x28); +VALIDATE_OFFSET(CMenuManager, m_nPrefsSfxVolume, 0x29); +VALIDATE_OFFSET(CMenuManager, m_nPrefsMusicVolume, 0x2A); +VALIDATE_OFFSET(CMenuManager, m_nPrefsRadioStation, 0x2B); +VALIDATE_OFFSET(CMenuManager, m_bPrefsStereoMono, 0x2C); +VALIDATE_OFFSET(CMenuManager, field_2D, 0x2D); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuEntry, 0x30); +VALIDATE_OFFSET(CMenuManager, m_bQuitGameNoCD, 0x34); +VALIDATE_OFFSET(CMenuManager, m_bDrawRadarOrMap, 0x35); +VALIDATE_OFFSET(CMenuManager, m_bAllowNavigation, 0x36); +VALIDATE_OFFSET(CMenuManager, m_bStreamingDone, 0x37); +VALIDATE_OFFSET(CMenuManager, m_bMenuActive, 0x38); +VALIDATE_OFFSET(CMenuManager, m_bWantToRestart, 0x39); +VALIDATE_OFFSET(CMenuManager, m_bFirstTime, 0x3A); +VALIDATE_OFFSET(CMenuManager, m_bSaveMenuActive, 0x3B); +VALIDATE_OFFSET(CMenuManager, m_bWantToLoad, 0x3C); +VALIDATE_OFFSET(CMenuManager, field_3D, 0x3D); +VALIDATE_OFFSET(CMenuManager, m_fMapZoom, 0x40); +VALIDATE_OFFSET(CMenuManager, m_fMapBaseX, 0x44); +VALIDATE_OFFSET(CMenuManager, m_fMapBaseY, 0x48); +VALIDATE_OFFSET(CMenuManager, OS_Language, 0x4C); +VALIDATE_OFFSET(CMenuManager, m_nPrefsLanguage, 0x50); +VALIDATE_OFFSET(CMenuManager, field_54, 0x54); +VALIDATE_OFFSET(CMenuManager, m_bLanguageLoaded, 0x58); +VALIDATE_OFFSET(CMenuManager, m_bPrefsAllowNastyGame, 0x59); +VALIDATE_OFFSET(CMenuManager, m_nPrefsMP3BoostVolume, 0x5A); +VALIDATE_OFFSET(CMenuManager, m_nControlMethod, 0x5B); +VALIDATE_OFFSET(CMenuManager, m_nPrefsVideoMode, 0x5C); +VALIDATE_OFFSET(CMenuManager, m_nDisplayVideoMode, 0x60); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosX, 0x64); +VALIDATE_OFFSET(CMenuManager, m_nMouseTempPosY, 0x68); +VALIDATE_OFFSET(CMenuManager, m_bGameNotLoaded, 0x6C); +VALIDATE_OFFSET(CMenuManager, m_nPreviousAudioIndex, 0x6D); +VALIDATE_OFFSET(CMenuManager, m_bFrontEnd_ReloadObrTxtGxt, 0x6E); +VALIDATE_OFFSET(CMenuManager, field_6F, 0x6F); +VALIDATE_OFFSET(CMenuManager, pEditString, 0x70); +VALIDATE_OFFSET(CMenuManager, field_74, 0x74); +VALIDATE_OFFSET(CMenuManager, pControlEdit, 0x78); +VALIDATE_OFFSET(CMenuManager, m_bOnlySaveMenu, 0x7C); +VALIDATE_OFFSET(CMenuManager, field_7D, 0x7D); +VALIDATE_OFFSET(CMenuManager, m_nMenuFadeAlpha2, 0x80); +VALIDATE_OFFSET(CMenuManager, m_aMenuSprites, 0x84); +VALIDATE_OFFSET(CMenuManager, m_bSpritesLoaded, 0xEC); +VALIDATE_OFFSET(CMenuManager, m_nRadioIconsLeftPosition, 0xF0); +VALIDATE_OFFSET(CMenuManager, m_nScrollRadioOffset, 0xF4); +VALIDATE_OFFSET(CMenuManager, m_nCurrentMenuPage, 0xF8); +VALIDATE_OFFSET(CMenuManager, m_nPreviousMenuPage, 0xFC); +VALIDATE_OFFSET(CMenuManager, m_nCurrentSaveSlot, 0x100); +VALIDATE_OFFSET(CMenuManager, field_BC, 0x104); +VALIDATE_OFFSET(CMenuManager, m_nMenuFadeAlpha, 0x108); +VALIDATE_OFFSET(CMenuManager, m_nOptionHighlightTransitionBlend, 0x10C); +VALIDATE_OFFSET(CMenuManager, m_bMenuChangeOngoing, 0x110); +VALIDATE_OFFSET(CMenuManager, m_nMouseButtonJustClicked, 0x114); +VALIDATE_OFFSET(CMenuManager, m_nJoyButtonJustClicked, 0x118); +VALIDATE_OFFSET(CMenuManager, m_bDisplayComboButtonErrMsg, 0x11C); +VALIDATE_OFFSET(CMenuManager, m_bNoEmptyBinding, 0x11D); +VALIDATE_OFFSET(CMenuManager, m_bShowEmptyBindingError, 0x11E); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextAlpha, 0x120); +VALIDATE_OFFSET(CMenuManager, m_bPressedPgUpOnList, 0x124); +VALIDATE_OFFSET(CMenuManager, m_bPressedPgDnOnList, 0x125); +VALIDATE_OFFSET(CMenuManager, m_bPressedUpOnList, 0x126); +VALIDATE_OFFSET(CMenuManager, m_bPressedDownOnList, 0x127); +VALIDATE_OFFSET(CMenuManager, m_bPressedScrollButton, 0x128); +VALIDATE_OFFSET(CMenuManager, field_129, 0x129); +VALIDATE_OFFSET(CMenuManager, field_12A, 0x12A); +VALIDATE_OFFSET(CMenuManager, field_12B, 0x12B); +VALIDATE_OFFSET(CMenuManager, m_nMousePosX, 0x12C); +VALIDATE_OFFSET(CMenuManager, m_nMousePosY, 0x130); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosX, 0x134); +VALIDATE_OFFSET(CMenuManager, m_nMouseOldPosY, 0x138); +VALIDATE_OFFSET(CMenuManager, m_nHoverOption, 0x13C); +VALIDATE_OFFSET(CMenuManager, m_bShowMouse, 0x140); +VALIDATE_OFFSET(CMenuManager, m_nOptionMouseHovering, 0x144); +VALIDATE_OFFSET(CMenuManager, m_bStartWaitingForKeyBind, 0x148); +VALIDATE_OFFSET(CMenuManager, m_bWaitingForNewKeyBind, 0x149); +VALIDATE_OFFSET(CMenuManager, m_bKeyChangeNotProcessed, 0x14A); +VALIDATE_OFFSET(CMenuManager, m_nCurrCntrlAction, 0x14C); +VALIDATE_OFFSET(CMenuManager, field_150, 0x150); +VALIDATE_OFFSET(CMenuManager, field_151, 0x151); +VALIDATE_OFFSET(CMenuManager, field_152, 0x152); +VALIDATE_OFFSET(CMenuManager, field_153, 0x153); +VALIDATE_OFFSET(CMenuManager, m_nSelectedCtrlColumn, 0x154); +VALIDATE_OFFSET(CMenuManager, field_158, 0x158); +VALIDATE_OFFSET(CMenuManager, field_159, 0x159); +VALIDATE_OFFSET(CMenuManager, m_nCurrExLayer, 0x15A); +VALIDATE_OFFSET(CMenuManager, m_nPrefsSkinFile, 0x15B); +VALIDATE_OFFSET(CMenuManager, m_aSkinName, 0x25B); +VALIDATE_OFFSET(CMenuManager, field_35B, 0x35B); +VALIDATE_OFFSET(CMenuManager, m_nHelperTextMsgId, 0x35C); +VALIDATE_OFFSET(CMenuManager, m_pSkinListHead, 0x360); +VALIDATE_OFFSET(CMenuManager, m_pSelectedSkin, 0x668); +VALIDATE_OFFSET(CMenuManager, m_nFirstVisibleRowOnList, 0x66C); +VALIDATE_OFFSET(CMenuManager, m_nScrollbarTopMargin, 0x670); +VALIDATE_OFFSET(CMenuManager, m_nTotalListRow, 0x674); +VALIDATE_OFFSET(CMenuManager, m_nSkinsTotal, 0x678); +VALIDATE_OFFSET(CMenuManager, m_nSelectedListRow, 0x67C); +VALIDATE_OFFSET(CMenuManager, m_bSkinsEnumerated, 0x680); +VALIDATE_SIZE(CMenuManager, 0x684); VALIDATE_SIZE(CMenuManager, 0x684); diff --git a/plugin_vc/game_vc/CMessages.h b/plugin_vc/game_vc/CMessages.h index 1b7258c7e..4e5046bc7 100644 --- a/plugin_vc/game_vc/CMessages.h +++ b/plugin_vc/game_vc/CMessages.h @@ -50,3 +50,4 @@ class CMessages { static void InsertPlayerControlKeysInString(char* text); static void InsertStringInString(char* text, const char* str); }; +VALIDATE_SIZE(CMessages, 0x1); diff --git a/plugin_vc/game_vc/CModelInfo.cpp b/plugin_vc/game_vc/CModelInfo.cpp index b6e6f442c..4868bfec9 100644 --- a/plugin_vc/game_vc/CModelInfo.cpp +++ b/plugin_vc/game_vc/CModelInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CModelInfo.h" diff --git a/plugin_vc/game_vc/CModelInfo.h b/plugin_vc/game_vc/CModelInfo.h index fcb8f1417..c1e912f7a 100644 --- a/plugin_vc/game_vc/CModelInfo.h +++ b/plugin_vc/game_vc/CModelInfo.h @@ -61,4 +61,5 @@ class CModelInfo { static bool IsQuadBikeModel(int modelId); static bool IsTrailerModel(int modelId); static bool IsTrainModel(int modelId); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CModelInfo, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CMotionBlurStreaks.h b/plugin_vc/game_vc/CMotionBlurStreaks.h index bdfc8b5b9..b93e0c64c 100644 --- a/plugin_vc/game_vc/CMotionBlurStreaks.h +++ b/plugin_vc/game_vc/CMotionBlurStreaks.h @@ -17,5 +17,6 @@ class CMotionBlurStreaks { static void RegisterStreak(unsigned int id, unsigned char red, unsigned char green, unsigned char blue, CVector leftPoint, CVector rightPoint); static void Render(); }; +VALIDATE_SIZE(CMotionBlurStreaks, 0x1); extern unsigned int MAX_NUM_MOTIONBLUR_STREAKS; // default 4 diff --git a/plugin_vc/game_vc/CMouseControllerState.h b/plugin_vc/game_vc/CMouseControllerState.h index c8be7891d..92d57aef9 100644 --- a/plugin_vc/game_vc/CMouseControllerState.h +++ b/plugin_vc/game_vc/CMouseControllerState.h @@ -23,5 +23,13 @@ class PLUGIN_API CMouseControllerState { float x; float y; }; - +VALIDATE_OFFSET(CMouseControllerState, lmb, 0x0); +VALIDATE_OFFSET(CMouseControllerState, rmb, 0x1); +VALIDATE_OFFSET(CMouseControllerState, mmb, 0x2); +VALIDATE_OFFSET(CMouseControllerState, wheelUp, 0x3); +VALIDATE_OFFSET(CMouseControllerState, wheelDown, 0x4); +VALIDATE_OFFSET(CMouseControllerState, bmx1, 0x5); +VALIDATE_OFFSET(CMouseControllerState, bmx2, 0x6); +VALIDATE_OFFSET(CMouseControllerState, x, 0x8); +VALIDATE_OFFSET(CMouseControllerState, y, 0xC); VALIDATE_SIZE(CMouseControllerState, 0x10); diff --git a/plugin_vc/game_vc/CMousePointerStateHelper.h b/plugin_vc/game_vc/CMousePointerStateHelper.h index acf78ef1e..7c05e7f36 100644 --- a/plugin_vc/game_vc/CMousePointerStateHelper.h +++ b/plugin_vc/game_vc/CMousePointerStateHelper.h @@ -17,6 +17,9 @@ class PLUGIN_API CMousePointerStateHelper { SUPPORTED_10EN_11EN_STEAM CMouseControllerState GetMouseSetUp(); }; +VALIDATE_OFFSET(CMousePointerStateHelper, invertV, 0x0); +VALIDATE_OFFSET(CMousePointerStateHelper, invertH, 0x1); +VALIDATE_SIZE(CMousePointerStateHelper, 0x2); #pragma pack(pop) SUPPORTED_10EN_11EN_STEAM extern CMousePointerStateHelper &MousePointerStateHelper; diff --git a/plugin_vc/game_vc/CMovie.cpp b/plugin_vc/game_vc/CMovie.cpp index 8348488ae..760025ce5 100644 --- a/plugin_vc/game_vc/CMovie.cpp +++ b/plugin_vc/game_vc/CMovie.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) source file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_vc/game_vc/CMovie.h b/plugin_vc/game_vc/CMovie.h index 4c652f3fd..0a57892c0 100644 --- a/plugin_vc/game_vc/CMovie.h +++ b/plugin_vc/game_vc/CMovie.h @@ -21,5 +21,11 @@ class CMovie { CMovie(); }; - +VALIDATE_OFFSET(CMovie, m_nCurrentMovieCommand, 0x0); +VALIDATE_OFFSET(CMovie, m_vecCurrentPosition, 0x4); +VALIDATE_OFFSET(CMovie, m_vecGotoPosition, 0x10); +VALIDATE_OFFSET(CMovie, m_nActor, 0x1C); +VALIDATE_OFFSET(CMovie, m_nActor2, 0x1E); +VALIDATE_OFFSET(CMovie, m_nVehicle, 0x20); +VALIDATE_OFFSET(CMovie, m_nModelId, 0x22); VALIDATE_SIZE(CMovie, 0x24); diff --git a/plugin_vc/game_vc/CObject.h b/plugin_vc/game_vc/CObject.h index 59a717516..1f0205a1b 100644 --- a/plugin_vc/game_vc/CObject.h +++ b/plugin_vc/game_vc/CObject.h @@ -84,5 +84,20 @@ class CObject : public CPhysical { static unsigned char& nNoTempObjects; }; - +VALIDATE_OFFSET(CObject, m_matDummyInitial, 0x120); +VALIDATE_OFFSET(CObject, m_fAttachForce, 0x168); +VALIDATE_OFFSET(CObject, m_nObjectType, 0x16C); +VALIDATE_OFFSET(CObject, m_nObjectFlags, 0x16D); +VALIDATE_OFFSET(CObject, m_nBonusValue, 0x16F); +VALIDATE_OFFSET(CObject, m_wCostValue, 0x170); +VALIDATE_OFFSET(CObject, m_fDamageMultiplier, 0x174); +VALIDATE_OFFSET(CObject, m_CollisionDamageType, 0x178); +VALIDATE_OFFSET(CObject, m_nSpecialCollisionType, 0x179); +VALIDATE_OFFSET(CObject, m_bCameraAvoids, 0x17A); +VALIDATE_OFFSET(CObject, m_nBounceScore, 0x17B); +VALIDATE_OFFSET(CObject, m_dwObjectTimer, 0x180); +VALIDATE_OFFSET(CObject, m_wRefModelId, 0x184); +VALIDATE_OFFSET(CObject, m_pInitialSurface, 0x188); +VALIDATE_OFFSET(CObject, m_pContactPhysical, 0x18C); +VALIDATE_OFFSET(CObject, m_nCarColor, 0x190); VALIDATE_SIZE(CObject, 0x194); \ No newline at end of file diff --git a/plugin_vc/game_vc/COcclusion.h b/plugin_vc/game_vc/COcclusion.h index be4c55afd..ca91682da 100644 --- a/plugin_vc/game_vc/COcclusion.h +++ b/plugin_vc/game_vc/COcclusion.h @@ -15,6 +15,10 @@ struct PLUGIN_API ActiveOccluderLine { CVector2D m_vec2dDirection; float m_fLength; }; +VALIDATE_OFFSET(ActiveOccluderLine, m_vec2dOrigin, 0x0); +VALIDATE_OFFSET(ActiveOccluderLine, m_vec2dDirection, 0x8); +VALIDATE_OFFSET(ActiveOccluderLine, m_fLength, 0x10); +VALIDATE_SIZE(ActiveOccluderLine, 0x14); class PLUGIN_API CActiveOccluder { public: @@ -22,6 +26,10 @@ class PLUGIN_API CActiveOccluder { int m_nLinesCount; float m_fRadius; }; +VALIDATE_OFFSET(CActiveOccluder, m_lines, 0x0); +VALIDATE_OFFSET(CActiveOccluder, m_nLinesCount, 0x78); +VALIDATE_OFFSET(CActiveOccluder, m_fRadius, 0x7C); +VALIDATE_SIZE(CActiveOccluder, 0x80); class PLUGIN_API COccluder { public: @@ -37,6 +45,15 @@ class PLUGIN_API COccluder { SUPPORTED_10EN_11EN_STEAM bool ProcessLineSegment(int corner1, int corner2, CActiveOccluder *occl); SUPPORTED_10EN_11EN_STEAM bool ProcessOneOccluder(CActiveOccluder *occl); }; +VALIDATE_OFFSET(COccluder, length, 0x0); +VALIDATE_OFFSET(COccluder, width, 0x2); +VALIDATE_OFFSET(COccluder, height, 0x4); +VALIDATE_OFFSET(COccluder, x, 0x6); +VALIDATE_OFFSET(COccluder, y, 0x8); +VALIDATE_OFFSET(COccluder, z, 0xA); +VALIDATE_OFFSET(COccluder, angle, 0xC); +VALIDATE_OFFSET(COccluder, listIndex, 0xE); +VALIDATE_SIZE(COccluder, 0x10); class PLUGIN_API COcclusion { public: @@ -55,6 +72,7 @@ class PLUGIN_API COcclusion { SUPPORTED_10EN_11EN_STEAM static bool IsPositionOccluded(CVector pos, float side); SUPPORTED_10EN_11EN_STEAM static void ProcessBeforeRendering(); }; +VALIDATE_SIZE(COcclusion, 0x1); SUPPORTED_10EN_11EN_STEAM extern CVector(&gOccluderCoorsOnScreen)[8]; // CVector gOccluderCoorsOnScreen[8] SUPPORTED_10EN_11EN_STEAM extern CVector(&gOccluderCoors)[8]; // CVector gOccluderCoors[8] diff --git a/plugin_vc/game_vc/COneSheet.h b/plugin_vc/game_vc/COneSheet.h index 597a2b51f..6209ac164 100644 --- a/plugin_vc/game_vc/COneSheet.h +++ b/plugin_vc/game_vc/COneSheet.h @@ -29,5 +29,15 @@ class PLUGIN_API COneSheet { COneSheet *m_pNext; COneSheet *m_pPrev; }; - +VALIDATE_OFFSET(COneSheet, m_avPosn, 0x0); +VALIDATE_OFFSET(COneSheet, m_fGroundZ, 0x18); +VALIDATE_OFFSET(COneSheet, m_bActive, 0x1C); +VALIDATE_OFFSET(COneSheet, m_bMovementActive, 0x1D); +VALIDATE_OFFSET(COneSheet, m_nTimer, 0x20); +VALIDATE_OFFSET(COneSheet, m_nDuration, 0x24); +VALIDATE_OFFSET(COneSheet, m_vOffset, 0x28); +VALIDATE_OFFSET(COneSheet, m_fAngle, 0x34); +VALIDATE_OFFSET(COneSheet, m_abZoneVissible, 0x38); +VALIDATE_OFFSET(COneSheet, m_pNext, 0x3C); +VALIDATE_OFFSET(COneSheet, m_pPrev, 0x40); VALIDATE_SIZE(COneSheet, 0x44); diff --git a/plugin_vc/game_vc/COnscreenTimer.cpp b/plugin_vc/game_vc/COnscreenTimer.cpp index e1bf6c1ea..17b6ff338 100644 --- a/plugin_vc/game_vc/COnscreenTimer.cpp +++ b/plugin_vc/game_vc/COnscreenTimer.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "COnscreenTimer.h" diff --git a/plugin_vc/game_vc/COnscreenTimer.h b/plugin_vc/game_vc/COnscreenTimer.h index 07f9f3bc0..50e218741 100644 --- a/plugin_vc/game_vc/COnscreenTimer.h +++ b/plugin_vc/game_vc/COnscreenTimer.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -20,7 +20,13 @@ class COnscreenTimerEntry { //funcs void Process(); }; - +VALIDATE_OFFSET(COnscreenTimerEntry, m_nVarId, 0x0); +VALIDATE_OFFSET(COnscreenTimerEntry, m_acDescriptionTextKey, 0x4); +VALIDATE_OFFSET(COnscreenTimerEntry, m_acDisplayedText, 0xE); +VALIDATE_OFFSET(COnscreenTimerEntry, _pad0, 0x36); +VALIDATE_OFFSET(COnscreenTimerEntry, m_bEnabled, 0x38); +VALIDATE_OFFSET(COnscreenTimerEntry, m_nTimerDirection, 0x39); +VALIDATE_OFFSET(COnscreenTimerEntry, _pad1, 0x3A); VALIDATE_SIZE(COnscreenTimerEntry, 0x3C); class COnscreenCounterEntry { @@ -33,7 +39,13 @@ class COnscreenCounterEntry { bool m_bEnabled; char _pad1[1]; }; - +VALIDATE_OFFSET(COnscreenCounterEntry, m_nVarId, 0x0); +VALIDATE_OFFSET(COnscreenCounterEntry, m_acDescriptionTextKey, 0x4); +VALIDATE_OFFSET(COnscreenCounterEntry, m_nType, 0xE); +VALIDATE_OFFSET(COnscreenCounterEntry, m_acDisplayedText, 0x10); +VALIDATE_OFFSET(COnscreenCounterEntry, _pad0, 0x38); +VALIDATE_OFFSET(COnscreenCounterEntry, m_bEnabled, 0x3A); +VALIDATE_OFFSET(COnscreenCounterEntry, _pad1, 0x3B); VALIDATE_SIZE(COnscreenCounterEntry, 0x3C); class COnscreenTimer { @@ -53,5 +65,9 @@ class COnscreenTimer { void Process(); void ProcessForDisplay(); }; - +VALIDATE_OFFSET(COnscreenTimer, m_aClocks, 0x0); +VALIDATE_OFFSET(COnscreenTimer, m_aCounters, 0x3C); +VALIDATE_OFFSET(COnscreenTimer, m_bDisplay, 0xF0); +VALIDATE_OFFSET(COnscreenTimer, m_bTimerFeezed, 0xF1); +VALIDATE_OFFSET(COnscreenTimer, _pad0, 0xF2); VALIDATE_SIZE(COnscreenTimer, 0xF4); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPad.h b/plugin_vc/game_vc/CPad.h index 4230f5911..0bed2eef7 100644 --- a/plugin_vc/game_vc/CPad.h +++ b/plugin_vc/game_vc/CPad.h @@ -125,6 +125,27 @@ class PLUGIN_API CPad { SUPPORTED_10EN_11EN_STEAM static void UpdateMouse(); SUPPORTED_10EN_11EN_STEAM static void UpdatePads(); }; +VALIDATE_OFFSET(CPad, NewState, 0x0); +VALIDATE_OFFSET(CPad, OldState, 0x2A); +VALIDATE_OFFSET(CPad, SteeringLeftRightBuffer, 0x54); +VALIDATE_OFFSET(CPad, DrunkDrivingBufferUsed, 0x68); +VALIDATE_OFFSET(CPad, PCTempKeyState, 0x6C); +VALIDATE_OFFSET(CPad, PCTempJoyState, 0x96); +VALIDATE_OFFSET(CPad, PCTempMouseState, 0xC0); +VALIDATE_OFFSET(CPad, field_EA, 0xEA); +VALIDATE_OFFSET(CPad, Mode, 0xEC); +VALIDATE_OFFSET(CPad, ShakeDur, 0xEE); +VALIDATE_OFFSET(CPad, DisablePlayerControls, 0xF0); +VALIDATE_OFFSET(CPad, ShakeFreq, 0xF2); +VALIDATE_OFFSET(CPad, bHornHistory, 0xF3); +VALIDATE_OFFSET(CPad, iCurrHornHistory, 0xF8); +VALIDATE_OFFSET(CPad, JustOutOfFrontEnd, 0xF9); +VALIDATE_OFFSET(CPad, bApplyBrakes, 0xFA); +VALIDATE_OFFSET(CPad, field_FB, 0xFB); +VALIDATE_OFFSET(CPad, LastTimeTouched, 0x108); +VALIDATE_OFFSET(CPad, AverageWeapon, 0x10C); +VALIDATE_OFFSET(CPad, AverageEntries, 0x110); +VALIDATE_SIZE(CPad, 0x114); SUPPORTED_10EN_11EN_STEAM extern CPad(&Pads)[2]; // CPad Pads[2] diff --git a/plugin_vc/game_vc/CPager.h b/plugin_vc/game_vc/CPager.h index 26c5055ea..5d7f6ad98 100644 --- a/plugin_vc/game_vc/CPager.h +++ b/plugin_vc/game_vc/CPager.h @@ -15,5 +15,6 @@ class PLUGIN_API CPager { SUPPORTED_10EN_11EN_STEAM static void Init(); SUPPORTED_10EN_11EN_STEAM static void Process(); }; +VALIDATE_SIZE(CPager, 0x1); #include "meta/meta.CPager.h" diff --git a/plugin_vc/game_vc/CParticle.h b/plugin_vc/game_vc/CParticle.h index c2f849f1b..d5b4f535e 100644 --- a/plugin_vc/game_vc/CParticle.h +++ b/plugin_vc/game_vc/CParticle.h @@ -62,6 +62,29 @@ class PLUGIN_API CParticle { SUPPORTED_10EN_11EN_STEAM static void Shutdown(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_OFFSET(CParticle, m_vecPosition, 0x0); +VALIDATE_OFFSET(CParticle, m_vecDirection, 0xC); +VALIDATE_OFFSET(CParticle, m_nTimeWhenWillBeDestroyed, 0x18); +VALIDATE_OFFSET(CParticle, m_nTimeWhenColorWillBeChanged, 0x1C); +VALIDATE_OFFSET(CParticle, m_fZCoord, 0x20); +VALIDATE_OFFSET(CParticle, m_vecParticleMovementOffset, 0x24); +VALIDATE_OFFSET(CParticle, m_nCurrentZRotation, 0x30); +VALIDATE_OFFSET(CParticle, m_nZRotationTimer, 0x32); +VALIDATE_OFFSET(CParticle, m_fCurrentZRadius, 0x34); +VALIDATE_OFFSET(CParticle, m_nZRadiusTimer, 0x38); +VALIDATE_OFFSET(CParticle, m_nFadeToBlackIntensity, 0x3A); +VALIDATE_OFFSET(CParticle, m_nFadeAlphaIntensity, 0x3B); +VALIDATE_OFFSET(CParticle, m_fSize, 0x3C); +VALIDATE_OFFSET(CParticle, m_fExpansionRate, 0x40); +VALIDATE_OFFSET(CParticle, m_nFadeToBlackFadeAmount, 0x44); +VALIDATE_OFFSET(CParticle, m_nFadeAlphaFadeAmount, 0x46); +VALIDATE_OFFSET(CParticle, field_48, 0x48); +VALIDATE_OFFSET(CParticle, m_nRotationSpeed, 0x4A); +VALIDATE_OFFSET(CParticle, m_nRotation, 0x4C); +VALIDATE_OFFSET(CParticle, m_nCurrentFrame, 0x4E); +VALIDATE_OFFSET(CParticle, m_color, 0x4F); +VALIDATE_OFFSET(CParticle, m_pNext, 0x54); +VALIDATE_SIZE(CParticle, 0x58); SUPPORTED_10EN_11EN_STEAM extern int &nParticleCreationInterval; SUPPORTED_10EN_11EN_STEAM extern float &PARTICLE_WIND_TEST_SCALE; diff --git a/plugin_vc/game_vc/CPathFind.h b/plugin_vc/game_vc/CPathFind.h index cf3f1a3b6..12eba50b7 100644 --- a/plugin_vc/game_vc/CPathFind.h +++ b/plugin_vc/game_vc/CPathFind.h @@ -21,7 +21,8 @@ class PLUGIN_API CNodeAddress CNodeAddress() : m_wAreaId(-1), m_wNodeId(-1) {} }; - +VALIDATE_OFFSET(CNodeAddress, m_wAreaId, 0x0); +VALIDATE_OFFSET(CNodeAddress, m_wNodeId, 0x2); VALIDATE_SIZE(CNodeAddress, 0x4); class PLUGIN_API CCarPathLinkAddress @@ -30,7 +31,6 @@ class PLUGIN_API CCarPathLinkAddress short m_wCarPathLinkId : 10; short m_wAreaId : 6; }; - VALIDATE_SIZE(CCarPathLinkAddress, 0x2); @@ -45,7 +45,7 @@ class CPathFind { void DoPathSearch(unsigned char type, CVector start, int startNodeId, CVector target, CPathNode** nodes, short* numNodes, short maxNumNodes, CVehicle* vehicle, float* dist, float distLimit, int forcedTargetNode); }; - +VALIDATE_OFFSET(CPathFind, nodes, 0x0); VALIDATE_SIZE(CPathFind, 0x2F1E8); extern CPathFind &ThePaths; diff --git a/plugin_vc/game_vc/CPathNode.h b/plugin_vc/game_vc/CPathNode.h index 31db25068..fa82b4d7a 100644 --- a/plugin_vc/game_vc/CPathNode.h +++ b/plugin_vc/game_vc/CPathNode.h @@ -26,5 +26,12 @@ class CPathNode { } }; - +VALIDATE_OFFSET(CPathNode, m_wPathData1, 0x0); +VALIDATE_OFFSET(CPathNode, m_wPathData2, 0x2); +VALIDATE_OFFSET(CPathNode, m_wPosX, 0x4); +VALIDATE_OFFSET(CPathNode, m_wPosY, 0x6); +VALIDATE_OFFSET(CPathNode, m_wPosZ, 0x8); +VALIDATE_OFFSET(CPathNode, field_A, 0xA); +VALIDATE_OFFSET(CPathNode, field_C, 0xC); +VALIDATE_OFFSET(CPathNode, field_E, 0xE); VALIDATE_SIZE(CPathNode, 0x14); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPed.h b/plugin_vc/game_vc/CPed.h index 905c34d12..7f9aece3e 100644 --- a/plugin_vc/game_vc/CPed.h +++ b/plugin_vc/game_vc/CPed.h @@ -639,5 +639,155 @@ class CPed : public CPhysical { return &this->m_aWeapons[this->m_nCurrentWeapon]; } }; - +VALIDATE_OFFSET(CPed, m_polyColliding, 0x120); +VALIDATE_OFFSET(CPed, m_fCollisionSpeed, 0x148); +VALIDATE_OFFSET(CPed, m_nGangFlags, 0x15C); +VALIDATE_OFFSET(CPed, m_nPedStatus, 0x160); +VALIDATE_OFFSET(CPed, m_nObjective, 0x164); +VALIDATE_OFFSET(CPed, m_nPrevObjective, 0x168); +VALIDATE_OFFSET(CPed, m_pObjectiveEntity, 0x16C); +VALIDATE_OFFSET(CPed, m_pObjectiveVehicle, 0x170); +VALIDATE_OFFSET(CPed, m_vecObjective, 0x174); +VALIDATE_OFFSET(CPed, m_fObjectiveAngle, 0x180); +VALIDATE_OFFSET(CPed, m_pGangLeader, 0x184); +VALIDATE_OFFSET(CPed, m_nPedFormation, 0x188); +VALIDATE_OFFSET(CPed, m_nFearFlags, 0x18C); +VALIDATE_OFFSET(CPed, m_pThreatEntity, 0x190); +VALIDATE_OFFSET(CPed, m_EventOrThreatPos, 0x194); +VALIDATE_OFFSET(CPed, m_nEventType, 0x19C); +VALIDATE_OFFSET(CPed, m_pEventEntity, 0x1A0); +VALIDATE_OFFSET(CPed, m_fAngleToEvent, 0x1A4); +VALIDATE_OFFSET(CPed, m_apFrames, 0x1A8); +VALIDATE_OFFSET(CPed, m_pCurWeaponAtomic, 0x1F0); +VALIDATE_OFFSET(CPed, m_nAnimGroupId, 0x1F4); +VALIDATE_OFFSET(CPed, m_pVehicleAnim, 0x1F8); +VALIDATE_OFFSET(CPed, m_vecAnimMoveDelta, 0x1FC); +VALIDATE_OFFSET(CPed, m_vecOffsetSeek, 0x204); +VALIDATE_OFFSET(CPed, m_PedIK, 0x210); +VALIDATE_OFFSET(CPed, m_ActionPos, 0x238); +VALIDATE_OFFSET(CPed, m_nActionTimer, 0x240); +VALIDATE_OFFSET(CPed, m_ePedState, 0x244); +VALIDATE_OFFSET(CPed, m_eLastPedState, 0x248); +VALIDATE_OFFSET(CPed, m_eMoveState, 0x24C); +VALIDATE_OFFSET(CPed, m_eStoredMoveState, 0x250); +VALIDATE_OFFSET(CPed, m_ePrevActionState, 0x254); +VALIDATE_OFFSET(CPed, m_nWaitState, 0x258); +VALIDATE_OFFSET(CPed, m_nWaitTimer, 0x25C); +VALIDATE_OFFSET(CPed, m_apPathNodesStates, 0x260); +VALIDATE_OFFSET(CPed, m_wPathNodes, 0x280); +VALIDATE_OFFSET(CPed, m_wCurPathNode, 0x282); +VALIDATE_OFFSET(CPed, m_pPathRelEntity, 0x284); +VALIDATE_OFFSET(CPed, m_pNextNodeEntity, 0x288); +VALIDATE_OFFSET(CPed, m_nPathNodeTimer, 0x28C); +VALIDATE_OFFSET(CPed, m_aPathNodeStates, 0x290); +VALIDATE_OFFSET(CPed, m_pCurNodeState, 0x330); +VALIDATE_OFFSET(CPed, m_nPathState, 0x334); +VALIDATE_OFFSET(CPed, m_pNextPathNode, 0x338); +VALIDATE_OFFSET(CPed, m_pLastPathNode, 0x33C); +VALIDATE_OFFSET(CPed, m_vecPathNextNode, 0x340); +VALIDATE_OFFSET(CPed, m_fPathNextNodeDir, 0x34C); +VALIDATE_OFFSET(CPed, m_nPathNodeType, 0x350); +VALIDATE_OFFSET(CPed, m_fHealth, 0x354); +VALIDATE_OFFSET(CPed, m_fArmour, 0x358); +VALIDATE_OFFSET(CPed, m_nShadowUpdateTimer, 0x35C); +VALIDATE_OFFSET(CPed, wRouteLastPoint, 0x360); +VALIDATE_OFFSET(CPed, wRoutePoints, 0x362); +VALIDATE_OFFSET(CPed, wRoutePos, 0x364); +VALIDATE_OFFSET(CPed, wRouteType, 0x366); +VALIDATE_OFFSET(CPed, wRouteCurDir, 0x368); +VALIDATE_OFFSET(CPed, m_vecAnimMovingShift, 0x36C); +VALIDATE_OFFSET(CPed, m_fHeadingCurrent, 0x374); +VALIDATE_OFFSET(CPed, m_fHeadingGoal, 0x378); +VALIDATE_OFFSET(CPed, m_fHeadingChangeRate, 0x37C); +VALIDATE_OFFSET(CPed, m_nEnterType, 0x380); +VALIDATE_OFFSET(CPed, m_nWalkAroundType, 0x382); +VALIDATE_OFFSET(CPed, m_pCurPhysSurface, 0x384); +VALIDATE_OFFSET(CPed, m_vecOffsetFromPhysSurface, 0x388); +VALIDATE_OFFSET(CPed, m_pCurSurface, 0x394); +VALIDATE_OFFSET(CPed, vecSeekVehicle, 0x398); +VALIDATE_OFFSET(CPed, m_pSeekTarget, 0x3A4); +VALIDATE_OFFSET(CPed, m_pVehicle, 0x3A8); +VALIDATE_OFFSET(CPed, m_bInVehicle, 0x3AC); +VALIDATE_OFFSET(CPed, m_fSeatPrecisionX, 0x3B0); +VALIDATE_OFFSET(CPed, m_fSeatPrecisionY, 0x3B4); +VALIDATE_OFFSET(CPed, m_pFromVehicle, 0x3B8); +VALIDATE_OFFSET(CPed, m_pSeat, 0x3BC); +VALIDATE_OFFSET(CPed, m_nSeatType, 0x3C0); +VALIDATE_OFFSET(CPed, m_bHasPhone, 0x3C4); +VALIDATE_OFFSET(CPed, m_wPhoneId, 0x3C6); +VALIDATE_OFFSET(CPed, m_nLookingForPhone, 0x3C8); +VALIDATE_OFFSET(CPed, m_nPhoneTalkTimer, 0x3CC); +VALIDATE_OFFSET(CPed, m_pLastAccident, 0x3D0); +VALIDATE_OFFSET(CPed, m_nPedType, 0x3D4); +VALIDATE_OFFSET(CPed, m_pPedStats, 0x3D8); +VALIDATE_OFFSET(CPed, m_fFleeFromPosX, 0x3DC); +VALIDATE_OFFSET(CPed, m_fFleeFromPosY, 0x3E0); +VALIDATE_OFFSET(CPed, m_pFleeFrom, 0x3E4); +VALIDATE_OFFSET(CPed, m_nFleeTimer, 0x3E8); +VALIDATE_OFFSET(CPed, m_pThreatEx, 0x3EC); +VALIDATE_OFFSET(CPed, m_pLastThreatAt, 0x3F0); +VALIDATE_OFFSET(CPed, m_nLastThreatTimer, 0x3F4); +VALIDATE_OFFSET(CPed, m_pVehicleColliding, 0x3F8); +VALIDATE_OFFSET(CPed, m_nStateUnused, 0x3FC); +VALIDATE_OFFSET(CPed, m_nTimerUnused, 0x400); +VALIDATE_OFFSET(CPed, m_pTargetUnused, 0x404); +VALIDATE_OFFSET(CPed, m_aWeapons, 0x408); +VALIDATE_OFFSET(CPed, m_nAtchStoredWep, 0x4F8); +VALIDATE_OFFSET(CPed, m_nStoredGiveWep, 0x4FC); +VALIDATE_OFFSET(CPed, m_nStoredGiveAmmo, 0x500); +VALIDATE_OFFSET(CPed, m_nCurrentWeapon, 0x504); +VALIDATE_OFFSET(CPed, m_nWepSkills, 0x505); +VALIDATE_OFFSET(CPed, m_nWeaponAccuracy, 0x506); +VALIDATE_OFFSET(CPed, m_nBodyPart, 0x507); +VALIDATE_OFFSET(CPed, m_pPointGunAt, 0x508); +VALIDATE_OFFSET(CPed, m_vecHitLastPos, 0x50C); +VALIDATE_OFFSET(CPed, m_nHitCounter, 0x518); +VALIDATE_OFFSET(CPed, m_nLastHitState, 0x51C); +VALIDATE_OFFSET(CPed, m_nFightFlags1, 0x520); +VALIDATE_OFFSET(CPed, m_nFightFlags2, 0x521); +VALIDATE_OFFSET(CPed, m_nFightFlags3, 0x522); +VALIDATE_OFFSET(CPed, m_nBleedCounter, 0x523); +VALIDATE_OFFSET(CPed, m_pPedFire, 0x524); +VALIDATE_OFFSET(CPed, m_pPedFight, 0x528); +VALIDATE_OFFSET(CPed, m_fLookDirection, 0x52C); +VALIDATE_OFFSET(CPed, m_nWepModelID, 0x530); +VALIDATE_OFFSET(CPed, m_nLeaveCarTimer, 0x534); +VALIDATE_OFFSET(CPed, m_nGetUpTimer, 0x538); +VALIDATE_OFFSET(CPed, m_nLookTimer, 0x53C); +VALIDATE_OFFSET(CPed, m_nStandardTimer, 0x540); +VALIDATE_OFFSET(CPed, m_nAttackTimer, 0x544); +VALIDATE_OFFSET(CPed, m_nLastHitTime, 0x548); +VALIDATE_OFFSET(CPed, m_nHitRecoverTimer, 0x54C); +VALIDATE_OFFSET(CPed, m_nObjectiveTimer, 0x550); +VALIDATE_OFFSET(CPed, m_nDuckTimer, 0x554); +VALIDATE_OFFSET(CPed, m_nDuckAndCoverTimer, 0x558); +VALIDATE_OFFSET(CPed, m_nBloodyTimer, 0x55C); +VALIDATE_OFFSET(CPed, m_nShotTime, 0x560); +VALIDATE_OFFSET(CPed, m_nShotTimeAdd, 0x564); +VALIDATE_OFFSET(CPed, m_nPanicCounter, 0x568); +VALIDATE_OFFSET(CPed, m_nDeadBleeding, 0x569); +VALIDATE_OFFSET(CPed, m_nBodyPartBleeding, 0x56A); +VALIDATE_OFFSET(CPed, m_apNearPeds, 0x56C); +VALIDATE_OFFSET(CPed, m_nNumNearPeds, 0x594); +VALIDATE_OFFSET(CPed, m_nPedMoney, 0x596); +VALIDATE_OFFSET(CPed, m_nLastDamWep, 0x598); +VALIDATE_OFFSET(CPed, m_pLastDamEntity, 0x59C); +VALIDATE_OFFSET(CPed, m_pAttachedTo, 0x5A0); +VALIDATE_OFFSET(CPed, m_vecAttachOffset, 0x5A4); +VALIDATE_OFFSET(CPed, m_nAttachType, 0x5B0); +VALIDATE_OFFSET(CPed, m_fAttachRot, 0x5B4); +VALIDATE_OFFSET(CPed, m_nAttachWepAmmo, 0x5B8); +VALIDATE_OFFSET(CPed, m_nThreatFlags, 0x5BC); +VALIDATE_OFFSET(CPed, m_nThreatCheck, 0x5C0); +VALIDATE_OFFSET(CPed, m_nLastThreatCheck, 0x5C4); +VALIDATE_OFFSET(CPed, m_nSayType, 0x5C8); +VALIDATE_OFFSET(CPed, m_nSayTimer, 0x5CC); +VALIDATE_OFFSET(CPed, m_nTalkTimerLast, 0x5D0); +VALIDATE_OFFSET(CPed, m_nTalkTimer, 0x5D4); +VALIDATE_OFFSET(CPed, m_wTalkTypeLast, 0x5D8); +VALIDATE_OFFSET(CPed, m_wTalkType, 0x5DA); +VALIDATE_OFFSET(CPed, m_bCanPedTalk, 0x5DC); +VALIDATE_OFFSET(CPed, m_nPedLastComment, 0x5E0); +VALIDATE_OFFSET(CPed, m_vecSeekPosEx, 0x5E4); +VALIDATE_OFFSET(CPed, m_fSeekExAngle, 0x5F0); VALIDATE_SIZE(CPed, 0x5F4); diff --git a/plugin_vc/game_vc/CPedAtmAttractor.h b/plugin_vc/game_vc/CPedAtmAttractor.h index 1124e221a..370da4abf 100644 --- a/plugin_vc/game_vc/CPedAtmAttractor.h +++ b/plugin_vc/game_vc/CPedAtmAttractor.h @@ -36,6 +36,7 @@ class PLUGIN_API CPedAtmAttractor : public CPedAttractor { // virtual function #7 (not overriden) }; +VALIDATE_SIZE(CPedAtmAttractor, 0x64); VTABLE_DESC(CPedAtmAttractor, 0x6DBED8, 8); VALIDATE_SIZE(CPedAtmAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedAttractor.h b/plugin_vc/game_vc/CPedAttractor.h index 175730bad..2b685ff95 100644 --- a/plugin_vc/game_vc/CPedAttractor.h +++ b/plugin_vc/game_vc/CPedAttractor.h @@ -61,6 +61,21 @@ class PLUGIN_API CPedAttractor { SUPPORTED_10EN_11EN_STEAM int GetNoOfRegisteredPeds(); SUPPORTED_10EN_11EN_STEAM bool RegisterPed(CPed *ped); }; +VALIDATE_OFFSET(CPedAttractor, m_p2dEffect, 0x4); +VALIDATE_OFFSET(CPedAttractor, vApproachingQueue, 0x8); +VALIDATE_OFFSET(CPedAttractor, vWaitingQueue, 0x14); +VALIDATE_OFFSET(CPedAttractor, m_nMaxPedsInAttractor, 0x20); +VALIDATE_OFFSET(CPedAttractor, m_fQueueDistance, 0x24); +VALIDATE_OFFSET(CPedAttractor, m_fTimeInWaitQueue, 0x28); +VALIDATE_OFFSET(CPedAttractor, m_fTimeInApproachingQueue, 0x2C); +VALIDATE_OFFSET(CPedAttractor, m_fDistanceToUseAttractor, 0x30); +VALIDATE_OFFSET(CPedAttractor, m_fAcceptableHeading, 0x34); +VALIDATE_OFFSET(CPedAttractor, m_fMaxPositionDisplacement, 0x38); +VALIDATE_OFFSET(CPedAttractor, m_fMaxHeadingDisplacement, 0x3C); +VALIDATE_OFFSET(CPedAttractor, vecEffectPos, 0x40); +VALIDATE_OFFSET(CPedAttractor, vecQueueDir, 0x4C); +VALIDATE_OFFSET(CPedAttractor, vecUseDir, 0x58); +VALIDATE_SIZE(CPedAttractor, 0x64); VTABLE_DESC(CPedAttractor, 0x6DBF00, 8); VALIDATE_SIZE(CPedAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedAttractorManager.h b/plugin_vc/game_vc/CPedAttractorManager.h index c2a458e5e..858826cc6 100644 --- a/plugin_vc/game_vc/CPedAttractorManager.h +++ b/plugin_vc/game_vc/CPedAttractorManager.h @@ -40,6 +40,14 @@ class PLUGIN_API CPedAttractorManager { SUPPORTED_10EN_11EN_STEAM static bool IsApproachable(C2dEffect *effect, CMatrix const &matrix, int unk, CPed *ped); SUPPORTED_10EN_11EN_STEAM static CPedAttractor *RegisterPed(CPed *ped, C2dEffect *effect, CMatrix const &matrix, std::vector &vecAttractors); }; +VALIDATE_OFFSET(CPedAttractorManager, vAtmAttractors, 0x0); +VALIDATE_OFFSET(CPedAttractorManager, vSeatAttractors, 0xC); +VALIDATE_OFFSET(CPedAttractorManager, vStopAttractors, 0x18); +VALIDATE_OFFSET(CPedAttractorManager, vPizzaAttractors, 0x24); +VALIDATE_OFFSET(CPedAttractorManager, vShelterAttractors, 0x30); +VALIDATE_OFFSET(CPedAttractorManager, vIceCreamAttractors, 0x3C); +VALIDATE_OFFSET(CPedAttractorManager, vVehicleToEffect, 0x48); +VALIDATE_SIZE(CPedAttractorManager, 0x54); SUPPORTED_10EN_11EN_STEAM extern CPedAttractorManager *&pedAttrMgr; diff --git a/plugin_vc/game_vc/CPedIK.h b/plugin_vc/game_vc/CPedIK.h index c2d46b883..e96e5ddda 100644 --- a/plugin_vc/game_vc/CPedIK.h +++ b/plugin_vc/game_vc/CPedIK.h @@ -21,7 +21,8 @@ struct LimbOrientation { float m_fYaw; float m_fPitch; }; - +VALIDATE_OFFSET(LimbOrientation, m_fYaw, 0x0); +VALIDATE_OFFSET(LimbOrientation, m_fPitch, 0x4); VALIDATE_SIZE(LimbOrientation, 0x8); struct LimbMovementInfo { @@ -32,7 +33,12 @@ struct LimbMovementInfo { float minPitch; float pitchD; }; - +VALIDATE_OFFSET(LimbMovementInfo, maxYaw, 0x0); +VALIDATE_OFFSET(LimbMovementInfo, minYaw, 0x4); +VALIDATE_OFFSET(LimbMovementInfo, yawD, 0x8); +VALIDATE_OFFSET(LimbMovementInfo, maxPitch, 0xC); +VALIDATE_OFFSET(LimbMovementInfo, minPitch, 0x10); +VALIDATE_OFFSET(LimbMovementInfo, pitchD, 0x14); VALIDATE_SIZE(LimbMovementInfo, 0x18); class CPed; @@ -66,5 +72,10 @@ class CPedIK { void GetComponentPosition(RwV3d& returnedPos, unsigned int boneIndex); void ExtractYawAndPitchWorld(RwMatrix* matrix, float* yaw, float* pitch); }; - +VALIDATE_OFFSET(CPedIK, m_pPed, 0x0); +VALIDATE_OFFSET(CPedIK, m_sHead, 0x4); +VALIDATE_OFFSET(CPedIK, m_sTorso, 0xC); +VALIDATE_OFFSET(CPedIK, m_sUpperArm, 0x14); +VALIDATE_OFFSET(CPedIK, m_sLowerArm, 0x1C); +VALIDATE_OFFSET(CPedIK, m_nFlags, 0x24); VALIDATE_SIZE(CPedIK, 0x28); diff --git a/plugin_vc/game_vc/CPedIceCreamVanAttractor.h b/plugin_vc/game_vc/CPedIceCreamVanAttractor.h index 4ffa5fc98..80df96acf 100644 --- a/plugin_vc/game_vc/CPedIceCreamVanAttractor.h +++ b/plugin_vc/game_vc/CPedIceCreamVanAttractor.h @@ -36,6 +36,7 @@ class PLUGIN_API CPedIceCreamVanAttractor : public CPedAttractor { // virtual function #7 (not overriden) }; +VALIDATE_SIZE(CPedIceCreamVanAttractor, 0x64); VTABLE_DESC(CPedIceCreamVanAttractor, 0x6DBE10, 8); VALIDATE_SIZE(CPedIceCreamVanAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedModelInfo.cpp b/plugin_vc/game_vc/CPedModelInfo.cpp index 780c8c774..716aed422 100644 --- a/plugin_vc/game_vc/CPedModelInfo.cpp +++ b/plugin_vc/game_vc/CPedModelInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPedModelInfo.h" diff --git a/plugin_vc/game_vc/CPedModelInfo.h b/plugin_vc/game_vc/CPedModelInfo.h index 8b63f4b3f..8d1be8051 100644 --- a/plugin_vc/game_vc/CPedModelInfo.h +++ b/plugin_vc/game_vc/CPedModelInfo.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -26,7 +26,12 @@ class CPedModelInfo : public CClumpModelInfo { void AnimatePedColModelSkinnedWorld(RpClump* clump); void CreateHitColModelSkinned(RpClump* clump); }; - +VALIDATE_OFFSET(CPedModelInfo, m_nAnigGroupId, 0x30); +VALIDATE_OFFSET(CPedModelInfo, m_nPedType, 0x34); +VALIDATE_OFFSET(CPedModelInfo, m_nPedStatType, 0x38); +VALIDATE_OFFSET(CPedModelInfo, m_nCarsCanDriveMask, 0x3C); +VALIDATE_OFFSET(CPedModelInfo, m_pHitColModel, 0x40); +VALIDATE_OFFSET(CPedModelInfo, m_anPreferredRadioStations, 0x44); VALIDATE_SIZE(CPedModelInfo, 0x48); struct PedModelStore { @@ -35,3 +40,6 @@ struct PedModelStore { ~PedModelStore(); }; +VALIDATE_OFFSET(PedModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(PedModelStore, m_sObject, 0x4); +VALIDATE_SIZE(PedModelStore, 0x2494); diff --git a/plugin_vc/game_vc/CPedPizzaAttractor.h b/plugin_vc/game_vc/CPedPizzaAttractor.h index decca41e9..dc734ff37 100644 --- a/plugin_vc/game_vc/CPedPizzaAttractor.h +++ b/plugin_vc/game_vc/CPedPizzaAttractor.h @@ -35,6 +35,7 @@ class PLUGIN_API CPedPizzaAttractor : public CPedAttractor { // virtual function #7 (not overriden) }; +VALIDATE_SIZE(CPedPizzaAttractor, 0x64); VTABLE_DESC(CPedPizzaAttractor, 0x6DBE60, 8); VALIDATE_SIZE(CPedPizzaAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedPlacement.cpp b/plugin_vc/game_vc/CPedPlacement.cpp index 7baee7cfe..ca19f1980 100644 --- a/plugin_vc/game_vc/CPedPlacement.cpp +++ b/plugin_vc/game_vc/CPedPlacement.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPedPlacement.h" diff --git a/plugin_vc/game_vc/CPedPlacement.h b/plugin_vc/game_vc/CPedPlacement.h index 6fe29c98e..e8682fc5c 100644 --- a/plugin_vc/game_vc/CPedPlacement.h +++ b/plugin_vc/game_vc/CPedPlacement.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -16,4 +16,5 @@ class CPedPlacement { static bool FindZCoorForPed(CVector* posn); static bool IsPositionClearForPed(CVector const& posn, float arg1, int arg2, CEntity** entity); static bool IsPositionClearOfCars(CVector* posn); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPedPlacement, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPedSeatAttractor.h b/plugin_vc/game_vc/CPedSeatAttractor.h index 495fe268c..45aff97a8 100644 --- a/plugin_vc/game_vc/CPedSeatAttractor.h +++ b/plugin_vc/game_vc/CPedSeatAttractor.h @@ -36,6 +36,7 @@ class PLUGIN_API CPedSeatAttractor : public CPedAttractor { // virtual function #7 (not overriden) }; +VALIDATE_SIZE(CPedSeatAttractor, 0x64); VTABLE_DESC(CPedSeatAttractor, 0x6DBEB0, 8); VALIDATE_SIZE(CPedSeatAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedShelterAttractor.h b/plugin_vc/game_vc/CPedShelterAttractor.h index de03d41fb..3001c3f49 100644 --- a/plugin_vc/game_vc/CPedShelterAttractor.h +++ b/plugin_vc/game_vc/CPedShelterAttractor.h @@ -32,6 +32,7 @@ class PLUGIN_API CPedShelterAttractor : public CPedAttractor { SUPPORTED_10EN_11EN_STEAM static CVector GetDisplacement(int qid); }; +VALIDATE_SIZE(CPedShelterAttractor, 0x64); VTABLE_DESC(CPedShelterAttractor, 0x6DBE38, 8); VALIDATE_SIZE(CPedShelterAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedStats.cpp b/plugin_vc/game_vc/CPedStats.cpp index 35c415ca8..35646cc3c 100644 --- a/plugin_vc/game_vc/CPedStats.cpp +++ b/plugin_vc/game_vc/CPedStats.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_vc/game_vc/CPedStats.h b/plugin_vc/game_vc/CPedStats.h index a77b0f350..6cfa43d3d 100644 --- a/plugin_vc/game_vc/CPedStats.h +++ b/plugin_vc/game_vc/CPedStats.h @@ -91,5 +91,16 @@ class CPedStats static void LoadPedStats(); static unsigned int GetPedStatType(char* pedStatName); }; - +VALIDATE_OFFSET(CPedStats, m_Personality, 0x0); +VALIDATE_OFFSET(CPedStats, m_aszName, 0x4); +VALIDATE_OFFSET(CPedStats, m_fFleeDistance, 0x1C); +VALIDATE_OFFSET(CPedStats, m_fHeadingChangeRate, 0x20); +VALIDATE_OFFSET(CPedStats, m_nFear, 0x24); +VALIDATE_OFFSET(CPedStats, m_nTemper, 0x25); +VALIDATE_OFFSET(CPedStats, m_nLawfullness, 0x26); +VALIDATE_OFFSET(CPedStats, m_nSexiness, 0x27); +VALIDATE_OFFSET(CPedStats, m_fAttackStrength, 0x28); +VALIDATE_OFFSET(CPedStats, m_fDefendWeakness, 0x2C); +VALIDATE_OFFSET(CPedStats, m_nFlags, 0x30); +VALIDATE_OFFSET(CPedStats, _pad0, 0x31); VALIDATE_SIZE(CPedStats, 0x34); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPedStopAttractor.h b/plugin_vc/game_vc/CPedStopAttractor.h index 48da4a3cb..0465e679d 100644 --- a/plugin_vc/game_vc/CPedStopAttractor.h +++ b/plugin_vc/game_vc/CPedStopAttractor.h @@ -36,6 +36,7 @@ class PLUGIN_API CPedStopAttractor : public CPedAttractor { // virtual function #7 (not overriden) }; +VALIDATE_SIZE(CPedStopAttractor, 0x64); VTABLE_DESC(CPedStopAttractor, 0x6DBE88, 8); VALIDATE_SIZE(CPedStopAttractor, 0x64); diff --git a/plugin_vc/game_vc/CPedType.cpp b/plugin_vc/game_vc/CPedType.cpp index 96329ed47..145ff60ae 100644 --- a/plugin_vc/game_vc/CPedType.cpp +++ b/plugin_vc/game_vc/CPedType.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_vc/game_vc/CPedType.h b/plugin_vc/game_vc/CPedType.h index a09faa453..1f10c395d 100644 --- a/plugin_vc/game_vc/CPedType.h +++ b/plugin_vc/game_vc/CPedType.h @@ -69,5 +69,12 @@ class CPedType static void Save(unsigned char* bufferPointer, unsigned int* structSize); static void Load(unsigned char* bufferPointer, unsigned int structSize); }; - +VALIDATE_OFFSET(CPedType, m_Type, 0x0); +VALIDATE_OFFSET(CPedType, field_4, 0x4); +VALIDATE_OFFSET(CPedType, field_8, 0x8); +VALIDATE_OFFSET(CPedType, field_C, 0xC); +VALIDATE_OFFSET(CPedType, field_10, 0x10); +VALIDATE_OFFSET(CPedType, field_14, 0x14); +VALIDATE_OFFSET(CPedType, m_Threat, 0x18); +VALIDATE_OFFSET(CPedType, m_Avoid, 0x1C); VALIDATE_SIZE(CPedType, 0x20); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPhone.h b/plugin_vc/game_vc/CPhone.h index a380f96b9..af6edf7fc 100644 --- a/plugin_vc/game_vc/CPhone.h +++ b/plugin_vc/game_vc/CPhone.h @@ -24,7 +24,12 @@ class PLUGIN_API CPhone { char _pad31[3]; public: }; - +VALIDATE_OFFSET(CPhone, m_vecPos, 0x0); +VALIDATE_OFFSET(CPhone, m_pMessages, 0xC); +VALIDATE_OFFSET(CPhone, m_nStartTimer, 0x24); +VALIDATE_OFFSET(CPhone, m_pEntity, 0x28); +VALIDATE_OFFSET(CPhone, m_nState, 0x2C); +VALIDATE_OFFSET(CPhone, m_bPlayerIsClose, 0x30); VALIDATE_SIZE(CPhone, 0x34); #include "meta/meta.CPhone.h" diff --git a/plugin_vc/game_vc/CPhoneInfo.h b/plugin_vc/game_vc/CPhoneInfo.h index b2517ad77..b06aaf9a3 100644 --- a/plugin_vc/game_vc/CPhoneInfo.h +++ b/plugin_vc/game_vc/CPhoneInfo.h @@ -30,6 +30,10 @@ class PLUGIN_API CPhoneInfo { SUPPORTED_10EN_11EN void Shutdown(); SUPPORTED_10EN_11EN void Update(); }; +VALIDATE_OFFSET(CPhoneInfo, m_nTotalPhones, 0x0); +VALIDATE_OFFSET(CPhoneInfo, m_nFirstFreeIndex, 0x4); +VALIDATE_OFFSET(CPhoneInfo, m_aPhones, 0x8); +VALIDATE_SIZE(CPhoneInfo, 0xA30); SUPPORTED_10EN_11EN extern int &PhoneEnableControlsTimer; SUPPORTED_10EN_11EN extern bool &bDisplayingPhoneMessage; diff --git a/plugin_vc/game_vc/CPhysical.h b/plugin_vc/game_vc/CPhysical.h index b8270e248..566f13a12 100644 --- a/plugin_vc/game_vc/CPhysical.h +++ b/plugin_vc/game_vc/CPhysical.h @@ -86,5 +86,37 @@ class CPhysical : public CEntity { CPhysical(const CPhysical &) = delete; CPhysical &operator=(const CPhysical &) = delete; }; - +VALIDATE_OFFSET(CPhysical, m_nAudioEntityId, 0x64); +VALIDATE_OFFSET(CPhysical, fUnknownX, 0x68); +VALIDATE_OFFSET(CPhysical, fUnknownY, 0x6C); +VALIDATE_OFFSET(CPhysical, m_vecMoveSpeed, 0x70); +VALIDATE_OFFSET(CPhysical, m_vecTurnSpeed, 0x7C); +VALIDATE_OFFSET(CPhysical, m_vecFrictionMoveForce, 0x88); +VALIDATE_OFFSET(CPhysical, m_vecFrictionTurnForce, 0x94); +VALIDATE_OFFSET(CPhysical, m_vecForce, 0xA0); +VALIDATE_OFFSET(CPhysical, m_vecTorque, 0xAC); +VALIDATE_OFFSET(CPhysical, m_fMass, 0xB8); +VALIDATE_OFFSET(CPhysical, m_fTurnMass, 0xBC); +VALIDATE_OFFSET(CPhysical, m_fVelocityFrequency, 0xC0); +VALIDATE_OFFSET(CPhysical, m_fAirResistance, 0xC4); +VALIDATE_OFFSET(CPhysical, m_fElasticity, 0xC8); +VALIDATE_OFFSET(CPhysical, m_fBuoyancyConstant, 0xCC); +VALIDATE_OFFSET(CPhysical, m_vecCentreOfMass, 0xD0); +VALIDATE_OFFSET(CPhysical, m_collisionList, 0xDC); +VALIDATE_OFFSET(CPhysical, m_pMovingListNode, 0xE0); +VALIDATE_OFFSET(CPhysical, uCollideExtra, 0xE4); +VALIDATE_OFFSET(CPhysical, uCollideInfo, 0xE5); +VALIDATE_OFFSET(CPhysical, m_nNumCollisionRecords, 0xE6); +VALIDATE_OFFSET(CPhysical, field_E7, 0xE7); +VALIDATE_OFFSET(CPhysical, m_apCollisionRecords, 0xE8); +VALIDATE_OFFSET(CPhysical, m_fTotSpeed, 0x100); +VALIDATE_OFFSET(CPhysical, m_fCollisionPower, 0x104); +VALIDATE_OFFSET(CPhysical, m_pPhysColliding, 0x108); +VALIDATE_OFFSET(CPhysical, m_vecCollisionPower, 0x10C); +VALIDATE_OFFSET(CPhysical, m_wComponentCol, 0x118); +VALIDATE_OFFSET(CPhysical, m_nMoveFlags, 0x11A); +VALIDATE_OFFSET(CPhysical, m_nCollFlags, 0x11B); +VALIDATE_OFFSET(CPhysical, m_nLastCollType, 0x11C); +VALIDATE_OFFSET(CPhysical, m_nZoneLevel, 0x11D); +VALIDATE_OFFSET(CPhysical, field_11E, 0x11E); VALIDATE_SIZE(CPhysical, 0x120); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPickups.cpp b/plugin_vc/game_vc/CPickups.cpp index bc4fb8e38..0816ae3c5 100644 --- a/plugin_vc/game_vc/CPickups.cpp +++ b/plugin_vc/game_vc/CPickups.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPickups.h" diff --git a/plugin_vc/game_vc/CPickups.h b/plugin_vc/game_vc/CPickups.h index a1f682c5f..935e0facf 100644 --- a/plugin_vc/game_vc/CPickups.h +++ b/plugin_vc/game_vc/CPickups.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -40,7 +40,20 @@ class CPickup { void Update(CPlayerPed* arg0, CVehicle* vehicle, int arg2); CPickup(); }; - +VALIDATE_OFFSET(CPickup, vecPos, 0x0); +VALIDATE_OFFSET(CPickup, fStandProximity, 0xC); +VALIDATE_OFFSET(CPickup, pObject, 0x10); +VALIDATE_OFFSET(CPickup, pExtraObject, 0x14); +VALIDATE_OFFSET(CPickup, dwPickupQuantity, 0x18); +VALIDATE_OFFSET(CPickup, nTimer, 0x1C); +VALIDATE_OFFSET(CPickup, wMoneySpeed, 0x20); +VALIDATE_OFFSET(CPickup, nModelId, 0x22); +VALIDATE_OFFSET(CPickup, wUniqueId, 0x24); +VALIDATE_OFFSET(CPickup, szPickupTextKey, 0x26); +VALIDATE_OFFSET(CPickup, bPickupType, 0x2E); +VALIDATE_OFFSET(CPickup, bRemoved, 0x2F); +VALIDATE_OFFSET(CPickup, bEffects, 0x30); +VALIDATE_OFFSET(CPickup, _pad0, 0x31); VALIDATE_SIZE(CPickup, 0x34); @@ -55,7 +68,14 @@ struct tPickupMessage unsigned char nTextID; char _pad0[2]; }; - +VALIDATE_OFFSET(tPickupMessage, Pos, 0x0); +VALIDATE_OFFSET(tPickupMessage, WeaponType, 0x8); +VALIDATE_OFFSET(tPickupMessage, fW, 0xC); +VALIDATE_OFFSET(tPickupMessage, fH, 0x10); +VALIDATE_OFFSET(tPickupMessage, Color, 0x14); +VALIDATE_OFFSET(tPickupMessage, Flags, 0x18); +VALIDATE_OFFSET(tPickupMessage, nTextID, 0x19); +VALIDATE_OFFSET(tPickupMessage, _pad0, 0x1A); VALIDATE_SIZE(tPickupMessage, 0x1C); class CPickups { @@ -94,3 +114,4 @@ class CPickups { static void Save(unsigned char* arg0, unsigned int* arg1); static void Update(); }; +VALIDATE_SIZE(CPickups, 0x1); diff --git a/plugin_vc/game_vc/CPlaceable.h b/plugin_vc/game_vc/CPlaceable.h index e6348b962..0d53c2c7e 100644 --- a/plugin_vc/game_vc/CPlaceable.h +++ b/plugin_vc/game_vc/CPlaceable.h @@ -20,4 +20,5 @@ class CPlaceable : public CMatrix { void GetOrientation(float& x, float& y, float& z); inline CMatrix& GetMatrix() { return *this; } -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPlaceable, 0x48); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPlane.cpp b/plugin_vc/game_vc/CPlane.cpp index 3b691acd8..fb8ab78b9 100644 --- a/plugin_vc/game_vc/CPlane.cpp +++ b/plugin_vc/game_vc/CPlane.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPlane.h" diff --git a/plugin_vc/game_vc/CPlane.h b/plugin_vc/game_vc/CPlane.h index b8c07aec3..189c17ee1 100644 --- a/plugin_vc/game_vc/CPlane.h +++ b/plugin_vc/game_vc/CPlane.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -38,5 +38,13 @@ class CPlane : public CVehicle { static bool TestRocketCollision(CVector* arg0); static void UpdatePlanes(); }; - +VALIDATE_OFFSET(CPlane, field_2A0, 0x2A0); +VALIDATE_OFFSET(CPlane, field_2A2, 0x2A2); +VALIDATE_OFFSET(CPlane, field_2A4, 0x2A4); +VALIDATE_OFFSET(CPlane, field_2A8, 0x2A8); +VALIDATE_OFFSET(CPlane, field_2AC, 0x2AC); +VALIDATE_OFFSET(CPlane, field_2B0, 0x2B0); +VALIDATE_OFFSET(CPlane, field_2B1, 0x2B1); +VALIDATE_OFFSET(CPlane, field_2B2, 0x2B2); +VALIDATE_OFFSET(CPlane, field_2B3, 0x2B3); VALIDATE_SIZE(CPlane, 0x2B4); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPlayerInfo.cpp b/plugin_vc/game_vc/CPlayerInfo.cpp index 967e6fa7b..3fb12de84 100644 --- a/plugin_vc/game_vc/CPlayerInfo.cpp +++ b/plugin_vc/game_vc/CPlayerInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPlayerInfo.h" diff --git a/plugin_vc/game_vc/CPlayerInfo.h b/plugin_vc/game_vc/CPlayerInfo.h index 711ebc374..4f5b817b1 100644 --- a/plugin_vc/game_vc/CPlayerInfo.h +++ b/plugin_vc/game_vc/CPlayerInfo.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -108,5 +108,64 @@ class CPlayerInfo { void LoadPlayerSkin(); void DeletePlayerSkin(); }; - +VALIDATE_OFFSET(CPlayerInfo, m_pPed, 0x0); +VALIDATE_OFFSET(CPlayerInfo, m_pRemoteVehicle, 0x4); +VALIDATE_OFFSET(CPlayerInfo, m_ColModel, 0x8); +VALIDATE_OFFSET(CPlayerInfo, m_pVehicleEx, 0x54); +VALIDATE_OFFSET(CPlayerInfo, m_aszPlayerName, 0x58); +VALIDATE_OFFSET(CPlayerInfo, m_nMoney, 0xA0); +VALIDATE_OFFSET(CPlayerInfo, m_nDisplayMoney, 0xA4); +VALIDATE_OFFSET(CPlayerInfo, m_nCollectablesCollected, 0xA8); +VALIDATE_OFFSET(CPlayerInfo, m_nCollectablesTotal, 0xAC); +VALIDATE_OFFSET(CPlayerInfo, field_B0, 0xB0); +VALIDATE_OFFSET(CPlayerInfo, m_nTaxiTimer, 0xB4); +VALIDATE_OFFSET(CPlayerInfo, m_bTaxiTimerScore, 0xB8); +VALIDATE_OFFSET(CPlayerInfo, m_nHookerTimer, 0xBC); +VALIDATE_OFFSET(CPlayerInfo, m_nHookerMoneyTimer, 0xC0); +VALIDATE_OFFSET(CPlayerInfo, m_nHookerTime, 0xC4); +VALIDATE_OFFSET(CPlayerInfo, m_pHooker, 0xC8); +VALIDATE_OFFSET(CPlayerInfo, m_nPlayerState, 0xCC); +VALIDATE_OFFSET(CPlayerInfo, m_nDeathFadeTimer, 0xD0); +VALIDATE_OFFSET(CPlayerInfo, m_bFadeAfterRemoteVehicleExplosion, 0xD4); +VALIDATE_OFFSET(CPlayerInfo, field_D5, 0xD5); +VALIDATE_OFFSET(CPlayerInfo, field_D6, 0xD6); +VALIDATE_OFFSET(CPlayerInfo, field_D7, 0xD7); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeArrested, 0xD8); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeEnergyLost, 0xDC); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeArmourLost, 0xE0); +VALIDATE_OFFSET(CPlayerInfo, m_nLastTimeBigGunFired, 0xE4); +VALIDATE_OFFSET(CPlayerInfo, m_nTimesUpsideDownInARow, 0xE8); +VALIDATE_OFFSET(CPlayerInfo, m_nTimesStuckInARow, 0xEC); +VALIDATE_OFFSET(CPlayerInfo, m_nVehicleTimeOnTwoWheels, 0xF0); +VALIDATE_OFFSET(CPlayerInfo, m_fVehicleDistanceOnTwoWheels, 0xF4); +VALIDATE_OFFSET(CPlayerInfo, m_nVehicleTimeInAir, 0xF8); +VALIDATE_OFFSET(CPlayerInfo, field_FC, 0xFC); +VALIDATE_OFFSET(CPlayerInfo, field_100, 0x100); +VALIDATE_OFFSET(CPlayerInfo, field_104, 0x104); +VALIDATE_OFFSET(CPlayerInfo, field_108, 0x108); +VALIDATE_OFFSET(CPlayerInfo, field_10C, 0x10C); +VALIDATE_OFFSET(CPlayerInfo, field_110, 0x110); +VALIDATE_OFFSET(CPlayerInfo, field_114, 0x114); +VALIDATE_OFFSET(CPlayerInfo, field_118, 0x118); +VALIDATE_OFFSET(CPlayerInfo, field_11C, 0x11C); +VALIDATE_OFFSET(CPlayerInfo, field_120, 0x120); +VALIDATE_OFFSET(CPlayerInfo, field_124, 0x124); +VALIDATE_OFFSET(CPlayerInfo, m_nCarDensityForCurrentZone, 0x128); +VALIDATE_OFFSET(CPlayerInfo, m_fRoadDensityAroundPlayer, 0x12C); +VALIDATE_OFFSET(CPlayerInfo, m_nTimeOfLastCarExplosionCaused, 0x130); +VALIDATE_OFFSET(CPlayerInfo, m_nExplosionMultiplier, 0x134); +VALIDATE_OFFSET(CPlayerInfo, field_138, 0x138); +VALIDATE_OFFSET(CPlayerInfo, field_13C, 0x13C); +VALIDATE_OFFSET(CPlayerInfo, m_bInfiniteSprint, 0x140); +VALIDATE_OFFSET(CPlayerInfo, m_bFastReload, 0x141); +VALIDATE_OFFSET(CPlayerInfo, m_bFireProof, 0x142); +VALIDATE_OFFSET(CPlayerInfo, m_nMaxHealth, 0x143); +VALIDATE_OFFSET(CPlayerInfo, m_nMaxArmour, 0x144); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfJailFree, 0x145); +VALIDATE_OFFSET(CPlayerInfo, m_bGetOutOfHospitalFree, 0x146); +VALIDATE_OFFSET(CPlayerInfo, m_bCanDoDriveBy, 0x147); +VALIDATE_OFFSET(CPlayerInfo, m_nBustedAudioStatus, 0x148); +VALIDATE_OFFSET(CPlayerInfo, m_nLastBustMessageNumber, 0x14A); +VALIDATE_OFFSET(CPlayerInfo, m_szSkinName, 0x14C); +VALIDATE_OFFSET(CPlayerInfo, m_pSkinTexture, 0x16C); VALIDATE_SIZE(CPlayerInfo, 0x170); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPlayerPed.cpp b/plugin_vc/game_vc/CPlayerPed.cpp index 068dae9f8..b165a3a00 100644 --- a/plugin_vc/game_vc/CPlayerPed.cpp +++ b/plugin_vc/game_vc/CPlayerPed.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPlayerPed.h" diff --git a/plugin_vc/game_vc/CPlayerPed.h b/plugin_vc/game_vc/CPlayerPed.h index 798e7f365..f09fb5123 100644 --- a/plugin_vc/game_vc/CPlayerPed.h +++ b/plugin_vc/game_vc/CPlayerPed.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" #include "eWeaponType.h" @@ -109,5 +108,38 @@ class CPlayerPed : public CPed { return m_pWanted; } }; - +VALIDATE_OFFSET(CPlayerPed, m_pWanted, 0x5F4); +VALIDATE_OFFSET(CPlayerPed, m_pArrestingCop, 0x5F8); +VALIDATE_OFFSET(CPlayerPed, m_fMoveSpeed, 0x5FC); +VALIDATE_OFFSET(CPlayerPed, m_fCurrentStamina, 0x600); +VALIDATE_OFFSET(CPlayerPed, m_fMaxStamina, 0x604); +VALIDATE_OFFSET(CPlayerPed, m_fStaminaProgress, 0x608); +VALIDATE_OFFSET(CPlayerPed, m_nSelectedWepSlot, 0x60C); +VALIDATE_OFFSET(CPlayerPed, m_bStoppedMoving, 0x60D); +VALIDATE_OFFSET(CPlayerPed, m_bShouldEvade, 0x60E); +VALIDATE_OFFSET(CPlayerPed, m_nStandStillTimer, 0x610); +VALIDATE_OFFSET(CPlayerPed, m_nShotDelay, 0x614); +VALIDATE_OFFSET(CPlayerPed, m_fAttackButtonCounter, 0x618); +VALIDATE_OFFSET(CPlayerPed, m_bHaveTargetSelected, 0x61C); +VALIDATE_OFFSET(CPlayerPed, m_pEvadingFrom, 0x620); +VALIDATE_OFFSET(CPlayerPed, m_nTargettableObjects, 0x624); +VALIDATE_OFFSET(CPlayerPed, m_nAdrenalineEndTime, 0x634); +VALIDATE_OFFSET(CPlayerPed, m_nDrunkenness, 0x638); +VALIDATE_OFFSET(CPlayerPed, m_nFadeDrunkenness, 0x639); +VALIDATE_OFFSET(CPlayerPed, m_nDrunkCountdown, 0x63A); +VALIDATE_OFFSET(CPlayerPed, m_bAdrenaline, 0x63B); +VALIDATE_OFFSET(CPlayerPed, m_bHasLockOnTarget, 0x63C); +VALIDATE_OFFSET(CPlayerPed, m_bDrunkVisualsWearOff, 0x63D); +VALIDATE_OFFSET(CPlayerPed, m_checkPlayerFlag, 0x63E); +VALIDATE_OFFSET(CPlayerPed, m_vecSafePos, 0x640); +VALIDATE_OFFSET(CPlayerPed, m_pPedAtSafePos, 0x688); +VALIDATE_OFFSET(CPlayerPed, m_pCheckPlayers, 0x6A0); +VALIDATE_OFFSET(CPlayerPed, m_nCheckPlayersIndex, 0x6B8); +VALIDATE_OFFSET(CPlayerPed, m_fWalkAngle, 0x6BC); +VALIDATE_OFFSET(CPlayerPed, m_fFPSMoveHeading, 0x6C0); +VALIDATE_OFFSET(CPlayerPed, m_pMinigunTopAtomic, 0x6C4); +VALIDATE_OFFSET(CPlayerPed, m_fGunSpinSpeed, 0x6C8); +VALIDATE_OFFSET(CPlayerPed, m_fGunSpinAngle, 0x6CC); +VALIDATE_OFFSET(CPlayerPed, m_nPadDownPressedInMilliseconds, 0x6D0); +VALIDATE_OFFSET(CPlayerPed, m_nPadUpPressedInMilliseconds, 0x6D4); VALIDATE_SIZE(CPlayerPed, 0x6D8); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPlayerSkin.h b/plugin_vc/game_vc/CPlayerSkin.h index 4d6c89398..4578d88da 100644 --- a/plugin_vc/game_vc/CPlayerSkin.h +++ b/plugin_vc/game_vc/CPlayerSkin.h @@ -15,6 +15,12 @@ struct PLUGIN_API CPlayerSkinData { char m_aDateInfo[256]; CPlayerSkinData* m_pNextSkin; }; +VALIDATE_OFFSET(CPlayerSkinData, m_nSkinId, 0x0); +VALIDATE_OFFSET(CPlayerSkinData, m_aSkinNameDisplayed, 0x4); +VALIDATE_OFFSET(CPlayerSkinData, m_aSkinNameOriginal, 0x104); +VALIDATE_OFFSET(CPlayerSkinData, m_aDateInfo, 0x204); +VALIDATE_OFFSET(CPlayerSkinData, m_pNextSkin, 0x304); +VALIDATE_SIZE(CPlayerSkinData, 0x308); class CPlayerSkin { public: @@ -29,5 +35,6 @@ class CPlayerSkin { static void RenderFrontendSkinEdit(); static void Shutdown(); }; +VALIDATE_SIZE(CPlayerSkin, 0x1); extern RpClump*& gpPlayerClump; diff --git a/plugin_vc/game_vc/CPointLight.h b/plugin_vc/game_vc/CPointLight.h index b16757c55..5578f6eea 100644 --- a/plugin_vc/game_vc/CPointLight.h +++ b/plugin_vc/game_vc/CPointLight.h @@ -26,7 +26,15 @@ class PLUGIN_API CPointLight { char _pad2B; public: }; - +VALIDATE_OFFSET(CPointLight, m_vecPosn, 0x0); +VALIDATE_OFFSET(CPointLight, m_vecDirection, 0xC); +VALIDATE_OFFSET(CPointLight, m_fRange, 0x18); +VALIDATE_OFFSET(CPointLight, m_fColorRed, 0x1C); +VALIDATE_OFFSET(CPointLight, m_fColorGreen, 0x20); +VALIDATE_OFFSET(CPointLight, m_fColorBlue, 0x24); +VALIDATE_OFFSET(CPointLight, m_nType, 0x28); +VALIDATE_OFFSET(CPointLight, m_nFogType, 0x29); +VALIDATE_OFFSET(CPointLight, m_bGenerateShadows, 0x2A); VALIDATE_SIZE(CPointLight, 0x2C); #include "meta/meta.CPointLight.h" diff --git a/plugin_vc/game_vc/CPointLights.h b/plugin_vc/game_vc/CPointLights.h index 72763d845..66527981f 100644 --- a/plugin_vc/game_vc/CPointLights.h +++ b/plugin_vc/game_vc/CPointLights.h @@ -23,5 +23,6 @@ class PLUGIN_API CPointLights { SUPPORTED_10EN_11EN_STEAM static void Init(); SUPPORTED_10EN_11EN_STEAM static void RenderFogEffect(); }; +VALIDATE_SIZE(CPointLights, 0x1); #include "meta/meta.CPointLights.h" diff --git a/plugin_vc/game_vc/CPools.h b/plugin_vc/game_vc/CPools.h index aa800493e..8adbf21be 100644 --- a/plugin_vc/game_vc/CPools.h +++ b/plugin_vc/game_vc/CPools.h @@ -54,5 +54,6 @@ class PLUGIN_API CPools { SUPPORTED_10EN_11EN_STEAM static void SaveVehiclePool(unsigned char *buffer, unsigned int *outSize); SUPPORTED_10EN_11EN_STEAM static void ShutDown(); }; +VALIDATE_SIZE(CPools, 0x1); #include "meta/meta.CPools.h" diff --git a/plugin_vc/game_vc/CPopulation.cpp b/plugin_vc/game_vc/CPopulation.cpp index 9388ee0a4..1e9bdaa9d 100644 --- a/plugin_vc/game_vc/CPopulation.cpp +++ b/plugin_vc/game_vc/CPopulation.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CPopulation.h" diff --git a/plugin_vc/game_vc/CPopulation.h b/plugin_vc/game_vc/CPopulation.h index f38f1bdaa..db410ce24 100644 --- a/plugin_vc/game_vc/CPopulation.h +++ b/plugin_vc/game_vc/CPopulation.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -79,4 +79,5 @@ class CPopulation { static bool TestSafeForRealObject(CDummyObject* dummyObject); static void Update(bool generatePeds); static void UpdatePedCount(ePedType pedType, unsigned char updateState); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CPopulation, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CProjectile.cpp b/plugin_vc/game_vc/CProjectile.cpp index 0db3ee15b..526fc8bdc 100644 --- a/plugin_vc/game_vc/CProjectile.cpp +++ b/plugin_vc/game_vc/CProjectile.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CProjectile.h" diff --git a/plugin_vc/game_vc/CProjectile.h b/plugin_vc/game_vc/CProjectile.h index b4090c606..d39d846da 100644 --- a/plugin_vc/game_vc/CProjectile.h +++ b/plugin_vc/game_vc/CProjectile.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CObject.h" @@ -15,5 +14,4 @@ class CProjectile : public CObject { //funcs CProjectile(int arg0); }; - VALIDATE_SIZE(CProjectile, 0x194); \ No newline at end of file diff --git a/plugin_vc/game_vc/CProjectileInfo.cpp b/plugin_vc/game_vc/CProjectileInfo.cpp index c193680a1..caffbaffa 100644 --- a/plugin_vc/game_vc/CProjectileInfo.cpp +++ b/plugin_vc/game_vc/CProjectileInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CProjectileInfo.h" diff --git a/plugin_vc/game_vc/CProjectileInfo.h b/plugin_vc/game_vc/CProjectileInfo.h index 093d804e2..901f7afbf 100644 --- a/plugin_vc/game_vc/CProjectileInfo.h +++ b/plugin_vc/game_vc/CProjectileInfo.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CObject.h" #include "eWeaponType.h" @@ -35,5 +34,9 @@ class CProjectileInfo { static bool AddProjectile(CEntity* pEntity, eWeaponType weapontype, CVector posn, float fPower); }; - +VALIDATE_OFFSET(CProjectileInfo, nWeaponId, 0x0); +VALIDATE_OFFSET(CProjectileInfo, pSource, 0x4); +VALIDATE_OFFSET(CProjectileInfo, dwTimer, 0x8); +VALIDATE_OFFSET(CProjectileInfo, bInUse, 0xC); +VALIDATE_OFFSET(CProjectileInfo, vecPos, 0x10); VALIDATE_SIZE(CProjectileInfo, 0x1C); \ No newline at end of file diff --git a/plugin_vc/game_vc/CPtrList.h b/plugin_vc/game_vc/CPtrList.h index 30075a8fc..5abac89f3 100644 --- a/plugin_vc/game_vc/CPtrList.h +++ b/plugin_vc/game_vc/CPtrList.h @@ -37,5 +37,4 @@ class CPtrList { return m_pHead; } }; - VALIDATE_SIZE(CPtrList, 0x4); diff --git a/plugin_vc/game_vc/CPtrNode.h b/plugin_vc/game_vc/CPtrNode.h index d059bdb43..dbe2082df 100644 --- a/plugin_vc/game_vc/CPtrNode.h +++ b/plugin_vc/game_vc/CPtrNode.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" class CPtrNode { @@ -21,5 +20,7 @@ class CPtrNode { static void operator delete(void* data); static void* operator new(unsigned int size); }; - +VALIDATE_OFFSET(CPtrNode, m_pVoid, 0x0); +VALIDATE_OFFSET(CPtrNode, m_pNext, 0x4); +VALIDATE_OFFSET(CPtrNode, m_pPrev, 0x8); VALIDATE_SIZE(CPtrNode, 0xC); diff --git a/plugin_vc/game_vc/CQuaternion.h b/plugin_vc/game_vc/CQuaternion.h index ce44dc658..38de50da8 100644 --- a/plugin_vc/game_vc/CQuaternion.h +++ b/plugin_vc/game_vc/CQuaternion.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -41,5 +41,6 @@ class CQuaternion { // Spherical linear interpolation void Slerp(CQuaternion const& from, CQuaternion const& to, float halftheta, float sintheta_inv, float t); }; - +VALIDATE_OFFSET(CQuaternion, imag, 0x0); +VALIDATE_OFFSET(CQuaternion, real, 0xC); VALIDATE_SIZE(CQuaternion, 0x10); \ No newline at end of file diff --git a/plugin_vc/game_vc/CRadar.h b/plugin_vc/game_vc/CRadar.h index 44ce4f390..3ac017d04 100644 --- a/plugin_vc/game_vc/CRadar.h +++ b/plugin_vc/game_vc/CRadar.h @@ -100,6 +100,21 @@ class PLUGIN_API tRadarTrace { unsigned short m_nBlipDisplay; //!< see eBlipDisplay unsigned short m_nRadarSprite; //!< see eRadarSprite }; +VALIDATE_OFFSET(tRadarTrace, m_nColour, 0x0); +VALIDATE_OFFSET(tRadarTrace, m_nBlipType, 0x4); +VALIDATE_OFFSET(tRadarTrace, m_nEntityHandle, 0x8); +VALIDATE_OFFSET(tRadarTrace, m_vec2DPos, 0xC); +VALIDATE_OFFSET(tRadarTrace, m_vecPos, 0x18); +VALIDATE_OFFSET(tRadarTrace, m_nBlipIndex, 0x24); +VALIDATE_OFFSET(tRadarTrace, m_bDim, 0x26); +VALIDATE_OFFSET(tRadarTrace, m_bInUse, 0x27); +VALIDATE_OFFSET(tRadarTrace, m_bShortRange, 0x28); +VALIDATE_OFFSET(tRadarTrace, m_bUnk, 0x29); +VALIDATE_OFFSET(tRadarTrace, m_fSphereRadius, 0x2C); +VALIDATE_OFFSET(tRadarTrace, m_nBlipSize, 0x30); +VALIDATE_OFFSET(tRadarTrace, m_nBlipDisplay, 0x32); +VALIDATE_OFFSET(tRadarTrace, m_nRadarSprite, 0x34); +VALIDATE_SIZE(tRadarTrace, 0x38); class PLUGIN_API CRadar { public: @@ -196,6 +211,7 @@ class PLUGIN_API CRadar { static void TransformRealWorldPointToRadarSpace(CVector2D& out, CVector2D const& in); static void TransformRealWorldToTexCoordSpace(CVector2D& out, CVector2D const& in, int x, int y); }; +VALIDATE_SIZE(CRadar, 0x1); extern CSprite2d** pRadarSprites; extern int* gRadarTxdIds; // int gRadarTxdIds[64] diff --git a/plugin_vc/game_vc/CRect.h b/plugin_vc/game_vc/CRect.h index b7aab1226..4464a53b8 100644 --- a/plugin_vc/game_vc/CRect.h +++ b/plugin_vc/game_vc/CRect.h @@ -92,5 +92,8 @@ class CRect { bottom = y; } }; - +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); VALIDATE_SIZE(CRect, 0x10); \ No newline at end of file diff --git a/plugin_vc/game_vc/CRegisteredMotionBlurStreak.h b/plugin_vc/game_vc/CRegisteredMotionBlurStreak.h index 8620be0d6..c6d3b3d42 100644 --- a/plugin_vc/game_vc/CRegisteredMotionBlurStreak.h +++ b/plugin_vc/game_vc/CRegisteredMotionBlurStreak.h @@ -25,7 +25,14 @@ class CRegisteredMotionBlurStreak { void Render(); CRegisteredMotionBlurStreak(); }; - +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_nId, 0x0); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_color, 0x4); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecLeftPoints, 0x8); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_avecRightPoints, 0x2C); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, m_bExists, 0x50); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_51, 0x51); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_52, 0x52); +VALIDATE_OFFSET(CRegisteredMotionBlurStreak, field_53, 0x53); VALIDATE_SIZE(CRegisteredMotionBlurStreak, 0x54); extern RxObjSpace3DVertex *StreakVertices; diff --git a/plugin_vc/game_vc/CRenderer.cpp b/plugin_vc/game_vc/CRenderer.cpp index 950699540..ab3704913 100644 --- a/plugin_vc/game_vc/CRenderer.cpp +++ b/plugin_vc/game_vc/CRenderer.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CRenderer.h" diff --git a/plugin_vc/game_vc/CRenderer.h b/plugin_vc/game_vc/CRenderer.h index 58d272925..ccd1168e6 100644 --- a/plugin_vc/game_vc/CRenderer.h +++ b/plugin_vc/game_vc/CRenderer.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -13,3 +13,4 @@ class CRenderer { static int& ms_nNoOfVisibleEntities; static CEntity** ms_aVisibleEntityPtrs; }; +VALIDATE_SIZE(CRenderer, 0x1); diff --git a/plugin_vc/game_vc/CReplay.cpp b/plugin_vc/game_vc/CReplay.cpp index f71fc27ed..a5595822b 100644 --- a/plugin_vc/game_vc/CReplay.cpp +++ b/plugin_vc/game_vc/CReplay.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CReplay.h" diff --git a/plugin_vc/game_vc/CReplay.h b/plugin_vc/game_vc/CReplay.h index 80db27acc..ae3a3b1c7 100644 --- a/plugin_vc/game_vc/CReplay.h +++ b/plugin_vc/game_vc/CReplay.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -10,5 +10,5 @@ class PLUGIN_API CReplay { public: static char &Mode; - }; +VALIDATE_SIZE(CReplay, 0x1); diff --git a/plugin_vc/game_vc/CRestart.h b/plugin_vc/game_vc/CRestart.h index dab64939f..5f3fdef3b 100644 --- a/plugin_vc/game_vc/CRestart.h +++ b/plugin_vc/game_vc/CRestart.h @@ -39,3 +39,4 @@ class CRestart { static void AddHospitalRestartPoint(CVector const& point, float angle); static void Initialise(); }; +VALIDATE_SIZE(CRestart, 0x1); diff --git a/plugin_vc/game_vc/CRouteNode.h b/plugin_vc/game_vc/CRouteNode.h index ee796da01..36b419d13 100644 --- a/plugin_vc/game_vc/CRouteNode.h +++ b/plugin_vc/game_vc/CRouteNode.h @@ -24,6 +24,9 @@ class PLUGIN_API CRouteNode { SUPPORTED_10EN_11EN_STEAM static void Initialise(); SUPPORTED_10EN_11EN_STEAM static void RemoveRoute(short route); }; +VALIDATE_OFFSET(CRouteNode, m_nRoute, 0x0); +VALIDATE_OFFSET(CRouteNode, m_vecPosition, 0x4); +VALIDATE_SIZE(CRouteNode, 0x10); SUPPORTED_10EN_11EN_STEAM extern CRouteNode(&gaRoutes)[200]; // CRouteNode gaRoutes[200] diff --git a/plugin_vc/game_vc/CRubbish.h b/plugin_vc/game_vc/CRubbish.h index 992d79d10..eca0e7028 100644 --- a/plugin_vc/game_vc/CRubbish.h +++ b/plugin_vc/game_vc/CRubbish.h @@ -26,6 +26,7 @@ class PLUGIN_API CRubbish { SUPPORTED_10EN_11EN_STEAM static void StirUp(CVehicle *pVehicle); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CRubbish, 0x1); SUPPORTED_10EN_11EN_STEAM extern int *gpRubbishTexture; // int gpRubbishTexture[4] diff --git a/plugin_vc/game_vc/CRunningScript.cpp b/plugin_vc/game_vc/CRunningScript.cpp index 8f5376451..54e31f1da 100644 --- a/plugin_vc/game_vc/CRunningScript.cpp +++ b/plugin_vc/game_vc/CRunningScript.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file + Plugin-SDK (Grand Theft Auto Vice City) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/plugin_vc/game_vc/CRunningScript.h b/plugin_vc/game_vc/CRunningScript.h index 2d3de1261..95a49b3da 100644 --- a/plugin_vc/game_vc/CRunningScript.h +++ b/plugin_vc/game_vc/CRunningScript.h @@ -62,5 +62,22 @@ class PLUGIN_API CRunningScript { static unsigned char *GetScriptSpaceBase(); }; - +VALIDATE_OFFSET(CRunningScript, m_pNext, 0x0); +VALIDATE_OFFSET(CRunningScript, m_pPrev, 0x4); +VALIDATE_OFFSET(CRunningScript, m_szName, 0x8); +VALIDATE_OFFSET(CRunningScript, m_nIp, 0x10); +VALIDATE_OFFSET(CRunningScript, m_anStack, 0x14); +VALIDATE_OFFSET(CRunningScript, m_nSP, 0x2C); +VALIDATE_OFFSET(CRunningScript, m_aLocalVars, 0x30); +VALIDATE_OFFSET(CRunningScript, m_anTimers, 0x70); +VALIDATE_OFFSET(CRunningScript, m_bIsActive, 0x78); +VALIDATE_OFFSET(CRunningScript, m_bCondResult, 0x79); +VALIDATE_OFFSET(CRunningScript, m_bUseMissionCleanup, 0x7A); +VALIDATE_OFFSET(CRunningScript, m_bAwake, 0x7B); +VALIDATE_OFFSET(CRunningScript, m_nWakeTime, 0x7C); +VALIDATE_OFFSET(CRunningScript, m_nLogicalOp, 0x80); +VALIDATE_OFFSET(CRunningScript, m_bNotFlag, 0x82); +VALIDATE_OFFSET(CRunningScript, m_bWastedBustedCheck, 0x83); +VALIDATE_OFFSET(CRunningScript, m_bWastedOrBusted, 0x84); +VALIDATE_OFFSET(CRunningScript, m_bIsMission, 0x85); VALIDATE_SIZE(CRunningScript, 0x88); diff --git a/plugin_vc/game_vc/CScene.h b/plugin_vc/game_vc/CScene.h index 1b9abf024..a35018235 100644 --- a/plugin_vc/game_vc/CScene.h +++ b/plugin_vc/game_vc/CScene.h @@ -14,5 +14,8 @@ class CScene { RpWorld *m_pWorld; RwCamera *m_pCamera; }; +VALIDATE_OFFSET(CScene, m_pWorld, 0x0); +VALIDATE_OFFSET(CScene, m_pCamera, 0x4); +VALIDATE_SIZE(CScene, 0x8); extern CScene &Scene; \ No newline at end of file diff --git a/plugin_vc/game_vc/CSceneEdit.h b/plugin_vc/game_vc/CSceneEdit.h index 063518171..643d88046 100644 --- a/plugin_vc/game_vc/CSceneEdit.h +++ b/plugin_vc/game_vc/CSceneEdit.h @@ -56,3 +56,4 @@ class CSceneEdit { static void InitPlayBack(); static void Initialise(); }; +VALIDATE_SIZE(CSceneEdit, 0x1); diff --git a/plugin_vc/game_vc/CSector.h b/plugin_vc/game_vc/CSector.h index edc698121..0ce5c39b5 100644 --- a/plugin_vc/game_vc/CSector.h +++ b/plugin_vc/game_vc/CSector.h @@ -22,5 +22,14 @@ class CSector { CPtrList m_dummyList; CPtrList m_dummyOverlapList; }; - +VALIDATE_OFFSET(CSector, m_buildingList, 0x0); +VALIDATE_OFFSET(CSector, m_buildingOverlapList, 0x4); +VALIDATE_OFFSET(CSector, m_objectList, 0x8); +VALIDATE_OFFSET(CSector, m_objectOverlapList, 0xC); +VALIDATE_OFFSET(CSector, m_vehicleList, 0x10); +VALIDATE_OFFSET(CSector, m_vehicleOverlapList, 0x14); +VALIDATE_OFFSET(CSector, m_pedList, 0x18); +VALIDATE_OFFSET(CSector, m_pedOverlapList, 0x1C); +VALIDATE_OFFSET(CSector, m_dummyList, 0x20); +VALIDATE_OFFSET(CSector, m_dummyOverlapList, 0x24); VALIDATE_SIZE(CSector, 0x28); \ No newline at end of file diff --git a/plugin_vc/game_vc/CShadowCamera.h b/plugin_vc/game_vc/CShadowCamera.h index 2a996a28b..6edb25edc 100644 --- a/plugin_vc/game_vc/CShadowCamera.h +++ b/plugin_vc/game_vc/CShadowCamera.h @@ -24,6 +24,9 @@ class PLUGIN_API CShadowCamera { SUPPORTED_10EN_11EN_STEAM RwRaster *RasterResample(RwRaster *raster); SUPPORTED_10EN_11EN_STEAM RwCamera *Update(RpAtomic *atomic); }; +VALIDATE_OFFSET(CShadowCamera, m_pCamera, 0x0); +VALIDATE_OFFSET(CShadowCamera, m_pTexture, 0x4); +VALIDATE_SIZE(CShadowCamera, 0x8); SUPPORTED_10EN_11EN_STEAM RpAtomic *ShadowRenderCallBack(RpAtomic *atomic, void *data); diff --git a/plugin_vc/game_vc/CShinyTexts.h b/plugin_vc/game_vc/CShinyTexts.h index c244a3a83..bf1ad1746 100644 --- a/plugin_vc/game_vc/CShinyTexts.h +++ b/plugin_vc/game_vc/CShinyTexts.h @@ -24,7 +24,16 @@ class CRegisteredShinyText { CRegisteredShinyText(); }; - +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAA, 0x0); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerAB, 0xC); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBA, 0x18); +VALIDATE_OFFSET(CRegisteredShinyText, m_vecCornerBB, 0x24); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAA, 0x30); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsAB, 0x38); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBA, 0x40); +VALIDATE_OFFSET(CRegisteredShinyText, m_texCoorsBB, 0x48); +VALIDATE_OFFSET(CRegisteredShinyText, m_fDistanceToCamera, 0x50); +VALIDATE_OFFSET(CRegisteredShinyText, m_color, 0x54); VALIDATE_SIZE(CRegisteredShinyText, 0x58); class CShinyTexts { @@ -35,5 +44,6 @@ class CShinyTexts { //funcs static void Render(); }; +VALIDATE_SIZE(CShinyTexts, 0x1); extern unsigned int MAX_SHINYTEXTS; // default = 32 diff --git a/plugin_vc/game_vc/CShotInfo.h b/plugin_vc/game_vc/CShotInfo.h index dcfadd84c..9bcc042d5 100644 --- a/plugin_vc/game_vc/CShotInfo.h +++ b/plugin_vc/game_vc/CShotInfo.h @@ -31,7 +31,13 @@ class PLUGIN_API CShotInfo { static bool AddShot(CEntity* creator, eWeaponType weaponType, CVector origin, CVector target); static void Update(); }; - +VALIDATE_OFFSET(CShotInfo, m_nWeaponType, 0x0); +VALIDATE_OFFSET(CShotInfo, m_vecOrigin, 0x4); +VALIDATE_OFFSET(CShotInfo, m_vecTargetOffset, 0x10); +VALIDATE_OFFSET(CShotInfo, m_fRange, 0x1C); +VALIDATE_OFFSET(CShotInfo, m_pCreator, 0x20); +VALIDATE_OFFSET(CShotInfo, fFlameVar, 0x24); +VALIDATE_OFFSET(CShotInfo, bInUse, 0x28); VALIDATE_SIZE(CShotInfo, 0x2C); extern unsigned int MAX_SHOT_INFOS; // default 100 diff --git a/plugin_vc/game_vc/CSimpleModelInfo.h b/plugin_vc/game_vc/CSimpleModelInfo.h index d65db66f9..5d1fc079f 100644 --- a/plugin_vc/game_vc/CSimpleModelInfo.h +++ b/plugin_vc/game_vc/CSimpleModelInfo.h @@ -50,7 +50,14 @@ class CSimpleModelInfo : public CBaseModelInfo { void SetLodDistances(float* distances); void SetupBigBuilding(int minLineIndex, int maxLineIndex); }; - +VALIDATE_OFFSET(CSimpleModelInfo, m_apAtomics, 0x28); +VALIDATE_OFFSET(CSimpleModelInfo, m_pLodModelInfo, 0x30); +VALIDATE_OFFSET(CSimpleModelInfo, m_nWeaponType, 0x30); +VALIDATE_OFFSET(CSimpleModelInfo, m_afLodDistances, 0x34); +VALIDATE_OFFSET(CSimpleModelInfo, m_fLodModelDistance, 0x3C); +VALIDATE_OFFSET(CSimpleModelInfo, m_nNumAtomics, 0x40); +VALIDATE_OFFSET(CSimpleModelInfo, m_nVisibility, 0x41); +VALIDATE_OFFSET(CSimpleModelInfo, m_nFlags, 0x42); VALIDATE_SIZE(CSimpleModelInfo, 0x44); struct SimpleModelStore { @@ -59,3 +66,6 @@ struct SimpleModelStore { ~SimpleModelStore(); }; +VALIDATE_OFFSET(SimpleModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(SimpleModelStore, m_sObject, 0x4); +VALIDATE_SIZE(SimpleModelStore, 0x407F8); diff --git a/plugin_vc/game_vc/CSphere.cpp b/plugin_vc/game_vc/CSphere.cpp index 0c5eaf35f..670b49c86 100644 --- a/plugin_vc/game_vc/CSphere.cpp +++ b/plugin_vc/game_vc/CSphere.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CSphere.h" diff --git a/plugin_vc/game_vc/CSphere.h b/plugin_vc/game_vc/CSphere.h index 7d438f698..9dbecd8d7 100644 --- a/plugin_vc/game_vc/CSphere.h +++ b/plugin_vc/game_vc/CSphere.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -16,5 +15,6 @@ class CSphere { void Set(float radius, CVector const& center); }; - +VALIDATE_OFFSET(CSphere, m_vecCenter, 0x0); +VALIDATE_OFFSET(CSphere, m_fRadius, 0xC); VALIDATE_SIZE(CSphere, 0x10); \ No newline at end of file diff --git a/plugin_vc/game_vc/CSprite.h b/plugin_vc/game_vc/CSprite.h index 9c347a5fd..86394d4be 100644 --- a/plugin_vc/game_vc/CSprite.h +++ b/plugin_vc/game_vc/CSprite.h @@ -15,3 +15,4 @@ class PLUGIN_API CSprite { unsigned char red, unsigned char green, unsigned char blue, short intensity, float rhw, unsigned char alpha); static bool CalcScreenCoors(RwV3d const& posn, RwV3d *out, float *w, float *h, bool checkMaxVisible); }; +VALIDATE_SIZE(CSprite, 0x1); diff --git a/plugin_vc/game_vc/CSprite2d.h b/plugin_vc/game_vc/CSprite2d.h index 44956a76e..8a6a60b3b 100644 --- a/plugin_vc/game_vc/CSprite2d.h +++ b/plugin_vc/game_vc/CSprite2d.h @@ -47,4 +47,6 @@ class CSprite2d { void Delete(); ~CSprite2d(); CSprite2d(); -}; \ No newline at end of file +}; +VALIDATE_OFFSET(CSprite2d, m_pTexture, 0x0); +VALIDATE_SIZE(CSprite2d, 0x4); \ No newline at end of file diff --git a/plugin_vc/game_vc/CStats.cpp b/plugin_vc/game_vc/CStats.cpp index cc7e4fce3..f285bce95 100644 --- a/plugin_vc/game_vc/CStats.cpp +++ b/plugin_vc/game_vc/CStats.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CStats.h" diff --git a/plugin_vc/game_vc/CStats.h b/plugin_vc/game_vc/CStats.h index 93e5345f5..87806a73e 100644 --- a/plugin_vc/game_vc/CStats.h +++ b/plugin_vc/game_vc/CStats.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once @@ -139,4 +139,5 @@ class CStats static void SaveStats(unsigned char* bufferPointer, unsigned int* structSize); static void LoadStats(unsigned char* bufferPointer, unsigned int structSize); static int ConstructStatLine(int a1); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CStats, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CStinger.cpp b/plugin_vc/game_vc/CStinger.cpp index 0408c9f9d..38812e2b8 100644 --- a/plugin_vc/game_vc/CStinger.cpp +++ b/plugin_vc/game_vc/CStinger.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CStinger.h" diff --git a/plugin_vc/game_vc/CStinger.h b/plugin_vc/game_vc/CStinger.h index 4b6640a71..276cc6fae 100644 --- a/plugin_vc/game_vc/CStinger.h +++ b/plugin_vc/game_vc/CStinger.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CPed.h" #include "CObject.h" @@ -36,5 +35,13 @@ class PLUGIN_API CStinger { private: char _pad02[3]; }; - +VALIDATE_OFFSET(CStinger, bIsDeployed, 0x0); +VALIDATE_OFFSET(CStinger, m_nTimeOfDeploy, 0x4); +VALIDATE_OFFSET(CStinger, m_vPos, 0x8); +VALIDATE_OFFSET(CStinger, m_fMax_Z, 0x14); +VALIDATE_OFFSET(CStinger, m_fMin_Z, 0x18); +VALIDATE_OFFSET(CStinger, m_vPositions, 0x1C); +VALIDATE_OFFSET(CStinger, pSpikes, 0x1FC); +VALIDATE_OFFSET(CStinger, pOwner, 0x22C); +VALIDATE_OFFSET(CStinger, m_nSpikeState, 0x230); VALIDATE_SIZE(CStinger, 0x234); \ No newline at end of file diff --git a/plugin_vc/game_vc/CStoredCollPoly.h b/plugin_vc/game_vc/CStoredCollPoly.h index 47248ee68..ec92f19b3 100644 --- a/plugin_vc/game_vc/CStoredCollPoly.h +++ b/plugin_vc/game_vc/CStoredCollPoly.h @@ -16,5 +16,6 @@ class CStoredCollPoly { private: char _pad[3]; }; - +VALIDATE_OFFSET(CStoredCollPoly, m_aVertices, 0x0); +VALIDATE_OFFSET(CStoredCollPoly, m_bIsActual, 0x24); VALIDATE_SIZE(CStoredCollPoly, 0x28); \ No newline at end of file diff --git a/plugin_vc/game_vc/CStreaming.h b/plugin_vc/game_vc/CStreaming.h index 4be5c3006..75c1e5de5 100644 --- a/plugin_vc/game_vc/CStreaming.h +++ b/plugin_vc/game_vc/CStreaming.h @@ -23,6 +23,14 @@ struct PLUGIN_API tModelRequest int uArchiveOffset; int uArchiveSize; }; +VALIDATE_OFFSET(tModelRequest, pNextRequest, 0x0); +VALIDATE_OFFSET(tModelRequest, pPrevRequest, 0x4); +VALIDATE_OFFSET(tModelRequest, uLoadStatus, 0x8); +VALIDATE_OFFSET(tModelRequest, uLoadFlags, 0x9); +VALIDATE_OFFSET(tModelRequest, nModelIndex, 0xA); +VALIDATE_OFFSET(tModelRequest, uArchiveOffset, 0xC); +VALIDATE_OFFSET(tModelRequest, uArchiveSize, 0x10); +VALIDATE_SIZE(tModelRequest, 0x14); class PLUGIN_API CStreaming { @@ -123,5 +131,6 @@ class PLUGIN_API CStreaming { SUPPORTED_10EN static void StreamZoneModels(CVector const *arg1); SUPPORTED_10EN static void Update(); }; +VALIDATE_SIZE(CStreaming, 0x1); #include "meta/meta.CStreaming.h" diff --git a/plugin_vc/game_vc/CStreamingInfo.h b/plugin_vc/game_vc/CStreamingInfo.h index aee4af454..ca771dd91 100644 --- a/plugin_vc/game_vc/CStreamingInfo.h +++ b/plugin_vc/game_vc/CStreamingInfo.h @@ -34,5 +34,11 @@ class CStreamingInfo { unsigned int m_nCdPosn; unsigned int m_nCdSize; }; - +VALIDATE_OFFSET(CStreamingInfo, m_pNext, 0x0); +VALIDATE_OFFSET(CStreamingInfo, m_pPrev, 0x4); +VALIDATE_OFFSET(CStreamingInfo, m_nLoadState, 0x8); +VALIDATE_OFFSET(CStreamingInfo, m_nFlags, 0x9); +VALIDATE_OFFSET(CStreamingInfo, m_nModelIndex, 0xA); +VALIDATE_OFFSET(CStreamingInfo, m_nCdPosn, 0xC); +VALIDATE_OFFSET(CStreamingInfo, m_nCdSize, 0x10); VALIDATE_SIZE(CStreamingInfo, 0x14); diff --git a/plugin_vc/game_vc/CText.h b/plugin_vc/game_vc/CText.h index 80e52e60b..5271e7a26 100644 --- a/plugin_vc/game_vc/CText.h +++ b/plugin_vc/game_vc/CText.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto Vice City) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -11,18 +11,27 @@ struct CKeyEntry { wchar_t* value; char key[8]; }; +VALIDATE_OFFSET(CKeyEntry, value, 0x0); +VALIDATE_OFFSET(CKeyEntry, key, 0x4); +VALIDATE_SIZE(CKeyEntry, 0xC); class CKeyArray { public: CKeyEntry* entries; int numEntries; }; +VALIDATE_OFFSET(CKeyArray, entries, 0x0); +VALIDATE_OFFSET(CKeyArray, numEntries, 0x4); +VALIDATE_SIZE(CKeyArray, 0x8); class CData { public: wchar_t* chars; int numChars; }; +VALIDATE_OFFSET(CData, chars, 0x0); +VALIDATE_OFFSET(CData, numChars, 0x4); +VALIDATE_SIZE(CData, 0x8); class CMissionTextOffsets { public: @@ -31,16 +40,21 @@ class CMissionTextOffsets { unsigned int offset; }; - enum { MAX_MISSION_TEXTS = 90 }; - + static constexpr auto MAX_MISSION_TEXTS = 90; Entry data[MAX_MISSION_TEXTS]; unsigned short size; }; +VALIDATE_OFFSET(CMissionTextOffsets, data, 0x0); +VALIDATE_OFFSET(CMissionTextOffsets, size, 0x438); +VALIDATE_SIZE(CMissionTextOffsets, 0x43C); struct ChunkHeader { char magic[4]; int size; }; +VALIDATE_OFFSET(ChunkHeader, magic, 0x0); +VALIDATE_OFFSET(ChunkHeader, size, 0x4); +VALIDATE_SIZE(ChunkHeader, 0x8); class CText { public: @@ -58,6 +72,16 @@ class CText { wchar_t* Get(char const* key); }; +VALIDATE_OFFSET(CText, keyArray, 0x0); +VALIDATE_OFFSET(CText, data, 0x8); +VALIDATE_OFFSET(CText, mission_keyArray, 0x10); +VALIDATE_OFFSET(CText, mission_data, 0x18); +VALIDATE_OFFSET(CText, encoding, 0x20); +VALIDATE_OFFSET(CText, bHasMissionTextOffsets, 0x21); +VALIDATE_OFFSET(CText, bIsMissionTextLoaded, 0x22); +VALIDATE_OFFSET(CText, szMissionTableName, 0x23); +VALIDATE_OFFSET(CText, MissionTextOffsets, 0x2C); +VALIDATE_SIZE(CText, 0x468); extern CText& TheText; diff --git a/plugin_vc/game_vc/CTheScripts.h b/plugin_vc/game_vc/CTheScripts.h index e2c3e7ac8..6d450af43 100644 --- a/plugin_vc/game_vc/CTheScripts.h +++ b/plugin_vc/game_vc/CTheScripts.h @@ -45,6 +45,25 @@ struct tScriptText float yPosition = 0.0f; wchar_t text[100] = { 0 }; }; +VALIDATE_OFFSET(tScriptText, letterWidth, 0x0); +VALIDATE_OFFSET(tScriptText, letterHeight, 0x4); +VALIDATE_OFFSET(tScriptText, color, 0x8); +VALIDATE_OFFSET(tScriptText, justify, 0xC); +VALIDATE_OFFSET(tScriptText, centered, 0xD); +VALIDATE_OFFSET(tScriptText, withBackground, 0xE); +VALIDATE_OFFSET(tScriptText, backgroundOnly, 0xF); +VALIDATE_OFFSET(tScriptText, wrapWidth, 0x10); +VALIDATE_OFFSET(tScriptText, centerWidth, 0x14); +VALIDATE_OFFSET(tScriptText, backgroundBoxColor, 0x18); +VALIDATE_OFFSET(tScriptText, proportional, 0x1C); +VALIDATE_OFFSET(tScriptText, drawBeforeFade, 0x1D); +VALIDATE_OFFSET(tScriptText, rightJustify, 0x1E); +VALIDATE_OFFSET(tScriptText, _pad, 0x1F); +VALIDATE_OFFSET(tScriptText, font, 0x20); +VALIDATE_OFFSET(tScriptText, xPosition, 0x24); +VALIDATE_OFFSET(tScriptText, yPosition, 0x28); +VALIDATE_OFFSET(tScriptText, text, 0x2C); +VALIDATE_SIZE(tScriptText, 0xF4); #pragma pack(pop) VALIDATE_SIZE(tScriptText, 0xF4); @@ -58,6 +77,12 @@ struct tScriptRectangle CRect rect; CRGBA color = { 255, 255, 255, 255 }; }; +VALIDATE_OFFSET(tScriptRectangle, isUsed, 0x0); +VALIDATE_OFFSET(tScriptRectangle, drawBeforeFade, 0x1); +VALIDATE_OFFSET(tScriptRectangle, spriteIdx, 0x2); +VALIDATE_OFFSET(tScriptRectangle, rect, 0x4); +VALIDATE_OFFSET(tScriptRectangle, color, 0x14); +VALIDATE_SIZE(tScriptRectangle, 0x18); #pragma pack(pop) VALIDATE_SIZE(tScriptRectangle, 0x18); @@ -100,5 +125,6 @@ class PLUGIN_API CTheScripts { static void ClearSpaceForMissionEntity(CVector const& position, CEntity* entity); }; +VALIDATE_SIZE(CTheScripts, 0x1); #include "meta/meta.CTheScripts.h" diff --git a/plugin_vc/game_vc/CTheZones.cpp b/plugin_vc/game_vc/CTheZones.cpp index 425c9c52d..f125ee07e 100644 --- a/plugin_vc/game_vc/CTheZones.cpp +++ b/plugin_vc/game_vc/CTheZones.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTheZones.h" diff --git a/plugin_vc/game_vc/CTheZones.h b/plugin_vc/game_vc/CTheZones.h index 2599f923f..fb217e73d 100644 --- a/plugin_vc/game_vc/CTheZones.h +++ b/plugin_vc/game_vc/CTheZones.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -60,3 +60,4 @@ class CTheZones { static void Update(); static bool ZoneIsEntirelyContainedWithinOtherZone(CZone* currentZona, CZone* otherZone); }; +VALIDATE_SIZE(CTheZones, 0x1); diff --git a/plugin_vc/game_vc/CTimeCycle.h b/plugin_vc/game_vc/CTimeCycle.h index daf4df966..978d0189f 100644 --- a/plugin_vc/game_vc/CTimeCycle.h +++ b/plugin_vc/game_vc/CTimeCycle.h @@ -14,5 +14,6 @@ class PLUGIN_API CTimeCycle { SUPPORTED_10EN_11EN_STEAM static void StopExtraColour(bool arg1); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CTimeCycle, 0x1); #include "meta/meta.CTimeCycle.h" diff --git a/plugin_vc/game_vc/CTimeModelInfo.cpp b/plugin_vc/game_vc/CTimeModelInfo.cpp index 48955f893..25beff7cc 100644 --- a/plugin_vc/game_vc/CTimeModelInfo.cpp +++ b/plugin_vc/game_vc/CTimeModelInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTimeModelInfo.h" diff --git a/plugin_vc/game_vc/CTimeModelInfo.h b/plugin_vc/game_vc/CTimeModelInfo.h index 335e0fd45..1b0e6e066 100644 --- a/plugin_vc/game_vc/CTimeModelInfo.h +++ b/plugin_vc/game_vc/CTimeModelInfo.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -16,7 +16,9 @@ class CTimeModelInfo : public CSimpleModelInfo { void FindOtherTimeModel(); }; - +VALIDATE_OFFSET(CTimeModelInfo, m_nStartHour, 0x44); +VALIDATE_OFFSET(CTimeModelInfo, m_nEndHour, 0x48); +VALIDATE_OFFSET(CTimeModelInfo, m_pPairedModel, 0x4C); VALIDATE_SIZE(CTimeModelInfo, 0x50); struct TimeModelStore { @@ -25,3 +27,6 @@ struct TimeModelStore { ~TimeModelStore(); }; +VALIDATE_OFFSET(TimeModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(TimeModelStore, m_sObject, 0x4); +VALIDATE_SIZE(TimeModelStore, 0x7854); diff --git a/plugin_vc/game_vc/CTimer.h b/plugin_vc/game_vc/CTimer.h index 894511b9c..f6be1d56d 100644 --- a/plugin_vc/game_vc/CTimer.h +++ b/plugin_vc/game_vc/CTimer.h @@ -34,6 +34,7 @@ class PLUGIN_API CTimer { SUPPORTED_10EN_11EN_STEAM static void Suspend(); SUPPORTED_10EN_11EN_STEAM static void Update(); }; +VALIDATE_SIZE(CTimer, 0x1); SUPPORTED_10EN_11EN_STEAM extern int &suspendPcTimer; SUPPORTED_10EN_11EN_STEAM extern int &suspendDepth; diff --git a/plugin_vc/game_vc/CTrafficLights.h b/plugin_vc/game_vc/CTrafficLights.h index 8c682322e..85a72b1b7 100644 --- a/plugin_vc/game_vc/CTrafficLights.h +++ b/plugin_vc/game_vc/CTrafficLights.h @@ -18,5 +18,6 @@ class PLUGIN_API CTrafficLights { SUPPORTED_10EN_11EN_STEAM static void ShouldCarStopForBridge(); SUPPORTED_10EN_11EN_STEAM static void ShouldCarStopForLight(CVehicle *arg1, bool arg2); }; +VALIDATE_SIZE(CTrafficLights, 0x1); #include "meta/meta.CTrafficLights.h" diff --git a/plugin_vc/game_vc/CTrain.cpp b/plugin_vc/game_vc/CTrain.cpp index 4fee8a251..e07694906 100644 --- a/plugin_vc/game_vc/CTrain.cpp +++ b/plugin_vc/game_vc/CTrain.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTrain.h" diff --git a/plugin_vc/game_vc/CTrain.h b/plugin_vc/game_vc/CTrain.h index fa5cb3c17..fcda43f50 100644 --- a/plugin_vc/game_vc/CTrain.h +++ b/plugin_vc/game_vc/CTrain.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -35,5 +35,8 @@ class CTrain : public CVehicle { // Empty function static void UpdateTrains(); }; - +VALIDATE_OFFSET(CTrain, gap_2A0, 0x2A0); +VALIDATE_OFFSET(CTrain, field_2C0, 0x2C0); +VALIDATE_OFFSET(CTrain, gap_2F0, 0x2F0); +VALIDATE_OFFSET(CTrain, field_2FB, 0x2FB); VALIDATE_SIZE(CTrain, 0x2FC); \ No newline at end of file diff --git a/plugin_vc/game_vc/CTreadable.h b/plugin_vc/game_vc/CTreadable.h index 4c0bbbb97..f1e88ae55 100644 --- a/plugin_vc/game_vc/CTreadable.h +++ b/plugin_vc/game_vc/CTreadable.h @@ -19,5 +19,4 @@ class CTreadable : public CBuilding { CTreadable(const CTreadable &) = delete; CTreadable &operator=(const CTreadable &) = delete; }; - VALIDATE_SIZE(CTreadable, 0x64); \ No newline at end of file diff --git a/plugin_vc/game_vc/CTxdStore.cpp b/plugin_vc/game_vc/CTxdStore.cpp index 9c694fc63..16ff89b28 100644 --- a/plugin_vc/game_vc/CTxdStore.cpp +++ b/plugin_vc/game_vc/CTxdStore.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CTxdStore.h" diff --git a/plugin_vc/game_vc/CTxdStore.h b/plugin_vc/game_vc/CTxdStore.h index 434c20a39..1e2f0acfb 100644 --- a/plugin_vc/game_vc/CTxdStore.h +++ b/plugin_vc/game_vc/CTxdStore.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -52,4 +52,5 @@ class CTxdStore { static bool StartLoadTxd(int index, RwStream* stream); // initialise txd store static void Initialise(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CTxdStore, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CUserDisplay.cpp b/plugin_vc/game_vc/CUserDisplay.cpp index 83e14bf9a..78bf9ffba 100644 --- a/plugin_vc/game_vc/CUserDisplay.cpp +++ b/plugin_vc/game_vc/CUserDisplay.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CUserDisplay.h" diff --git a/plugin_vc/game_vc/CUserDisplay.h b/plugin_vc/game_vc/CUserDisplay.h index 5f52a84fe..bfbc76ae0 100644 --- a/plugin_vc/game_vc/CUserDisplay.h +++ b/plugin_vc/game_vc/CUserDisplay.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -19,4 +19,5 @@ class CUserDisplay { //funcs static void Init(); static void Process(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CUserDisplay, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CVehicle.cpp b/plugin_vc/game_vc/CVehicle.cpp index ac9e105d9..be0a0a03c 100644 --- a/plugin_vc/game_vc/CVehicle.cpp +++ b/plugin_vc/game_vc/CVehicle.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CVehicle.h" diff --git a/plugin_vc/game_vc/CVehicle.h b/plugin_vc/game_vc/CVehicle.h index fb8411add..35356e97b 100644 --- a/plugin_vc/game_vc/CVehicle.h +++ b/plugin_vc/game_vc/CVehicle.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once @@ -305,7 +305,62 @@ class CVehicle : public CPhysical { static void* operator new(unsigned int size, int arg1); static void operator delete(void* data); }; - +VALIDATE_OFFSET(CVehicle, m_pHandlingData, 0x120); +VALIDATE_OFFSET(CVehicle, m_pFlyingHandling, 0x124); +VALIDATE_OFFSET(CVehicle, m_autoPilot, 0x128); +VALIDATE_OFFSET(CVehicle, m_pVehicleToRam, 0x19C); +VALIDATE_OFFSET(CVehicle, m_nPrimaryColor, 0x1A0); +VALIDATE_OFFSET(CVehicle, m_nSecondaryColor, 0x1A1); +VALIDATE_OFFSET(CVehicle, m_anExtras, 0x1A2); +VALIDATE_OFFSET(CVehicle, m_wWantedStarsOnEnter, 0x1A4); +VALIDATE_OFFSET(CVehicle, m_wMissionValue, 0x1A6); +VALIDATE_OFFSET(CVehicle, m_pDriver, 0x1A8); +VALIDATE_OFFSET(CVehicle, m_passengers, 0x1AC); +VALIDATE_OFFSET(CVehicle, m_nNumPassengers, 0x1CC); +VALIDATE_OFFSET(CVehicle, m_nNumGettingIn, 0x1CD); +VALIDATE_OFFSET(CVehicle, m_nGettingInFlags, 0x1CE); +VALIDATE_OFFSET(CVehicle, m_nGettingOutFlags, 0x1CF); +VALIDATE_OFFSET(CVehicle, m_nMaxPassengers, 0x1D0); +VALIDATE_OFFSET(CVehicle, __f01CD, 0x1D1); +VALIDATE_OFFSET(CVehicle, field_1D4, 0x1D4); +VALIDATE_OFFSET(CVehicle, field_1D8, 0x1D8); +VALIDATE_OFFSET(CVehicle, m_pEntityWeAreOn, 0x1E4); +VALIDATE_OFFSET(CVehicle, m_pFire, 0x1E8); +VALIDATE_OFFSET(CVehicle, m_fSteerAngle, 0x1EC); +VALIDATE_OFFSET(CVehicle, m_fGasPedal, 0x1F0); +VALIDATE_OFFSET(CVehicle, m_fBreakPedal, 0x1F4); +VALIDATE_OFFSET(CVehicle, m_nCreatedBy, 0x1F8); +VALIDATE_OFFSET(CVehicle, m_nAmmoInClip, 0x201); +VALIDATE_OFFSET(CVehicle, field_201, 0x202); +VALIDATE_OFFSET(CVehicle, m_fHealth, 0x204); +VALIDATE_OFFSET(CVehicle, m_nCurrentGear, 0x208); +VALIDATE_OFFSET(CVehicle, __f0205, 0x209); +VALIDATE_OFFSET(CVehicle, field_20C, 0x20C); +VALIDATE_OFFSET(CVehicle, field_210, 0x210); +VALIDATE_OFFSET(CVehicle, m_nTimeTillWeNeedThisCar, 0x214); +VALIDATE_OFFSET(CVehicle, field_218, 0x218); +VALIDATE_OFFSET(CVehicle, m_nTimeOfDeath, 0x21C); +VALIDATE_OFFSET(CVehicle, field_220, 0x220); +VALIDATE_OFFSET(CVehicle, m_wBombTimer, 0x222); +VALIDATE_OFFSET(CVehicle, field_224, 0x224); +VALIDATE_OFFSET(CVehicle, field_228, 0x228); +VALIDATE_OFFSET(CVehicle, field_22C, 0x22C); +VALIDATE_OFFSET(CVehicle, m_eDoorLock, 0x230); +VALIDATE_OFFSET(CVehicle, m_nLastWeaponDamage, 0x234); +VALIDATE_OFFSET(CVehicle, __f0231, 0x235); +VALIDATE_OFFSET(CVehicle, pLastDamEntity, 0x238); +VALIDATE_OFFSET(CVehicle, m_nRadioStation, 0x23C); +VALIDATE_OFFSET(CVehicle, field_23D, 0x23D); +VALIDATE_OFFSET(CVehicle, field_23E, 0x23E); +VALIDATE_OFFSET(CVehicle, m_bHornEnabled, 0x240); +VALIDATE_OFFSET(CVehicle, field_244, 0x244); +VALIDATE_OFFSET(CVehicle, m_nSirenOrAlarm, 0x245); +VALIDATE_OFFSET(CVehicle, m_nSirenExtra, 0x246); +VALIDATE_OFFSET(CVehicle, field_247, 0x247); +VALIDATE_OFFSET(CVehicle, m_frontCollPoly, 0x248); +VALIDATE_OFFSET(CVehicle, m_rearCollPoly, 0x270); +VALIDATE_OFFSET(CVehicle, m_fSteerRatio, 0x298); +VALIDATE_OFFSET(CVehicle, m_nVehicleClass, 0x29C); VALIDATE_SIZE(CVehicle, 0x2A0); extern float &fBurstTyreMod; // 0.13 diff --git a/plugin_vc/game_vc/CVehicleModelInfo.h b/plugin_vc/game_vc/CVehicleModelInfo.h index 392c4ba8e..c21f50431 100644 --- a/plugin_vc/game_vc/CVehicleModelInfo.h +++ b/plugin_vc/game_vc/CVehicleModelInfo.h @@ -113,7 +113,32 @@ class CVehicleModelInfo : public CClumpModelInfo { // unloads 'white' texture static void ShutdownEnvironmentMaps(); }; - +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastPrimaryColor, 0x30); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastSecondaryColor, 0x31); +VALIDATE_OFFSET(CVehicleModelInfo, m_szGameName, 0x32); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleType, 0x3C); +VALIDATE_OFFSET(CVehicleModelInfo, m_fWheelSize, 0x40); +VALIDATE_OFFSET(CVehicleModelInfo, m_nWheelModelIndex, 0x44); +VALIDATE_OFFSET(CVehicleModelInfo, m_nHandlingId, 0x46); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumDoors, 0x48); +VALIDATE_OFFSET(CVehicleModelInfo, m_nVehicleClass, 0x49); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLvl, 0x4A); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumExtras, 0x4B); +VALIDATE_OFFSET(CVehicleModelInfo, m_nFrq, 0x4C); +VALIDATE_OFFSET(CVehicleModelInfo, m_avDummyPos, 0x50); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRules, 0x8C); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCompRulesBits, 0x8C); +VALIDATE_OFFSET(CVehicleModelInfo, m_fBikeSteerAngle, 0x90); +VALIDATE_OFFSET(CVehicleModelInfo, m_apMaterialsPrimary, 0x94); +VALIDATE_OFFSET(CVehicleModelInfo, m_apMaterialsSecondary, 0xF4); +VALIDATE_OFFSET(CVehicleModelInfo, m_anPrimaryColors, 0x144); +VALIDATE_OFFSET(CVehicleModelInfo, m_anSecondaryColors, 0x14C); +VALIDATE_OFFSET(CVehicleModelInfo, m_nNumColorVariations, 0x154); +VALIDATE_OFFSET(CVehicleModelInfo, m_nLastColorVariation, 0x155); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentPrimaryColor, 0x156); +VALIDATE_OFFSET(CVehicleModelInfo, m_nCurrentSecondaryColor, 0x157); +VALIDATE_OFFSET(CVehicleModelInfo, m_apExtras, 0x158); +VALIDATE_OFFSET(CVehicleModelInfo, m_pszAnimName, 0x170); VALIDATE_SIZE(CVehicleModelInfo, 0x174); extern RwFrame *&pMatFxIdentityFrame; @@ -127,3 +152,6 @@ struct VehicleModelStore { ~VehicleModelStore(); }; +VALIDATE_OFFSET(VehicleModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(VehicleModelStore, m_sObject, 0x4); +VALIDATE_SIZE(VehicleModelStore, 0x9FDC); diff --git a/plugin_vc/game_vc/CVisibilityPlugins.h b/plugin_vc/game_vc/CVisibilityPlugins.h index cebfc3b2b..f4873fc02 100644 --- a/plugin_vc/game_vc/CVisibilityPlugins.h +++ b/plugin_vc/game_vc/CVisibilityPlugins.h @@ -12,3 +12,4 @@ class PLUGIN_API CVisibilityPlugins { public: static void SetAtomicRenderCallback(RpAtomic* atomic, RpAtomicCallBackRender cb); }; +VALIDATE_SIZE(CVisibilityPlugins, 0x1); diff --git a/plugin_vc/game_vc/CWanted.cpp b/plugin_vc/game_vc/CWanted.cpp index d5494a206..099dbedab 100644 --- a/plugin_vc/game_vc/CWanted.cpp +++ b/plugin_vc/game_vc/CWanted.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWanted.h" diff --git a/plugin_vc/game_vc/CWanted.h b/plugin_vc/game_vc/CWanted.h index 4c52ea4f8..8ef6508cd 100644 --- a/plugin_vc/game_vc/CWanted.h +++ b/plugin_vc/game_vc/CWanted.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -24,7 +24,13 @@ class CCrimeBeingQd { // [FrogByteDQ]: TODO: move this to CCrimeBeingQd.h file // [FrogByteDQ]: TODO: constructor sub_5388D0 }; - +VALIDATE_OFFSET(CCrimeBeingQd, m_nCrimeType, 0x0); +VALIDATE_OFFSET(CCrimeBeingQd, pVictim, 0x4); +VALIDATE_OFFSET(CCrimeBeingQd, m_nStartTime, 0x8); +VALIDATE_OFFSET(CCrimeBeingQd, m_vecCoors, 0xC); +VALIDATE_OFFSET(CCrimeBeingQd, m_bAlreadyReported, 0x18); +VALIDATE_OFFSET(CCrimeBeingQd, m_bPoliceDontReallyCare, 0x19); +VALIDATE_OFFSET(CCrimeBeingQd, pad, 0x1A); VALIDATE_SIZE(CCrimeBeingQd, 0x1C); class CWanted { @@ -84,5 +90,21 @@ class CWanted { void UpdateWantedLevel(); static void WorkOutPolicePresence(CVector arg0, float arg1); }; - +VALIDATE_OFFSET(CWanted, m_nChaosLevel, 0x0); +VALIDATE_OFFSET(CWanted, m_nChaosLevelBeforeParole, 0x4); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedDecreased, 0x8); +VALIDATE_OFFSET(CWanted, m_nLastTimeWantedLevelChanged, 0xC); +VALIDATE_OFFSET(CWanted, m_dwTimeOfParole, 0x10); +VALIDATE_OFFSET(CWanted, m_fMultiplier, 0x14); +VALIDATE_OFFSET(CWanted, m_nCopsInPursuit, 0x18); +VALIDATE_OFFSET(CWanted, m_nMaxCopsInPursuit, 0x19); +VALIDATE_OFFSET(CWanted, m_nMaxCopCarsInPursuit, 0x1A); +VALIDATE_OFFSET(CWanted, m_nCopsBeatingSuspect, 0x1B); +VALIDATE_OFFSET(CWanted, m_nChanceOnRoadBlock, 0x1C); +VALIDATE_OFFSET(CWanted, m_nWantedFlags, 0x1E); +VALIDATE_OFFSET(CWanted, _pad0, 0x1F); +VALIDATE_OFFSET(CWanted, m_nWantedLevel, 0x20); +VALIDATE_OFFSET(CWanted, m_nWantedLevelBeforeParole, 0x24); +VALIDATE_OFFSET(CWanted, m_asCrimesBeingQd, 0x28); +VALIDATE_OFFSET(CWanted, m_apCopsInPursuit, 0x1E8); VALIDATE_SIZE(CWanted, 0x210); \ No newline at end of file diff --git a/plugin_vc/game_vc/CWaterCannons.h b/plugin_vc/game_vc/CWaterCannons.h index 7f3cd9b65..e6216613f 100644 --- a/plugin_vc/game_vc/CWaterCannons.h +++ b/plugin_vc/game_vc/CWaterCannons.h @@ -26,6 +26,12 @@ class CWaterCannon { void Render(); void Update_OncePerFrame(short index); }; +VALIDATE_OFFSET(CWaterCannon, m_pCreator, 0x0); +VALIDATE_OFFSET(CWaterCannon, m_nSectionsCount, 0x4); +VALIDATE_OFFSET(CWaterCannon, m_nCreationTime, 0x8); +VALIDATE_OFFSET(CWaterCannon, m_avecPosition, 0xC); +VALIDATE_OFFSET(CWaterCannon, m_avecMoveSpeed, 0xCC); +VALIDATE_OFFSET(CWaterCannon, m_anSectionState, 0x18C); VALIDATE_SIZE(CWaterCannon, 0x19C); extern RxObjSpace3DVertex *WaterCannonVertices; // [4] @@ -42,3 +48,4 @@ class CWaterCannons { static void Update(); static void UpdateOne(unsigned int pCar, CVector* posn, CVector* moveSpeed); }; +VALIDATE_SIZE(CWaterCannons, 0x1); diff --git a/plugin_vc/game_vc/CWeapon.cpp b/plugin_vc/game_vc/CWeapon.cpp index ce276d4b0..05e8be685 100644 --- a/plugin_vc/game_vc/CWeapon.cpp +++ b/plugin_vc/game_vc/CWeapon.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeapon.h" diff --git a/plugin_vc/game_vc/CWeapon.h b/plugin_vc/game_vc/CWeapon.h index 553b236c5..ea65fc6e6 100644 --- a/plugin_vc/game_vc/CWeapon.h +++ b/plugin_vc/game_vc/CWeapon.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "eWeaponType.h" #include "CEntity.h" @@ -78,6 +77,13 @@ class CWeapon { bool HasWeaponAmmoToBeUsed(); static void CheckForShootingVehicleOccupant(CEntity** pCollideEntity, CColPoint* pColPoint, eWeaponType type, CVector const& vecStart, CVector const& vecEnd); }; +VALIDATE_OFFSET(CWeapon, m_eWeaponType, 0x0); +VALIDATE_OFFSET(CWeapon, m_eWeaponState, 0x4); +VALIDATE_OFFSET(CWeapon, m_nAmmoInClip, 0x8); +VALIDATE_OFFSET(CWeapon, m_nAmmoTotal, 0xC); +VALIDATE_OFFSET(CWeapon, m_nNextShotTime, 0x10); +VALIDATE_OFFSET(CWeapon, m_bAddRotOffset, 0x14); +VALIDATE_SIZE(CWeapon, 0x18); void FireOneInstantHitRound(CVector* vecStart, CVector* vecEnd, int nDamage); diff --git a/plugin_vc/game_vc/CWeaponEffects.cpp b/plugin_vc/game_vc/CWeaponEffects.cpp index 4790565c8..57ada345a 100644 --- a/plugin_vc/game_vc/CWeaponEffects.cpp +++ b/plugin_vc/game_vc/CWeaponEffects.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeaponEffects.h" diff --git a/plugin_vc/game_vc/CWeaponEffects.h b/plugin_vc/game_vc/CWeaponEffects.h index 3bcf43904..d1c116392 100644 --- a/plugin_vc/game_vc/CWeaponEffects.h +++ b/plugin_vc/game_vc/CWeaponEffects.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -28,7 +28,12 @@ class CWeaponEffects { static void Render(); static void Shutdown(); }; - +VALIDATE_OFFSET(CWeaponEffects, m_bActive, 0x0); +VALIDATE_OFFSET(CWeaponEffects, _pad0, 0x1); +VALIDATE_OFFSET(CWeaponEffects, m_vecPosn, 0x4); +VALIDATE_OFFSET(CWeaponEffects, m_Color, 0x10); +VALIDATE_OFFSET(CWeaponEffects, m_fSize, 0x14); +VALIDATE_OFFSET(CWeaponEffects, m_fRotation, 0x18); VALIDATE_SIZE(CWeaponEffects, 0x1C); extern RwTexture*& gpCrossHairTex; // RwTexture* gpCrossHairTex diff --git a/plugin_vc/game_vc/CWeaponInfo.cpp b/plugin_vc/game_vc/CWeaponInfo.cpp index 45ebf69e5..c62dc5be2 100644 --- a/plugin_vc/game_vc/CWeaponInfo.cpp +++ b/plugin_vc/game_vc/CWeaponInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeaponInfo.h" diff --git a/plugin_vc/game_vc/CWeaponInfo.h b/plugin_vc/game_vc/CWeaponInfo.h index 76beb4365..77f5c7658 100644 --- a/plugin_vc/game_vc/CWeaponInfo.h +++ b/plugin_vc/game_vc/CWeaponInfo.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -81,6 +81,30 @@ class CWeaponInfo { // closing static void Shutdown(); }; +VALIDATE_OFFSET(CWeaponInfo, m_eWeaponFire, 0x0); +VALIDATE_OFFSET(CWeaponInfo, m_fRange, 0x4); +VALIDATE_OFFSET(CWeaponInfo, m_nFiringRate, 0x8); +VALIDATE_OFFSET(CWeaponInfo, m_nReload, 0xC); +VALIDATE_OFFSET(CWeaponInfo, m_nAmountofAmmunition, 0x10); +VALIDATE_OFFSET(CWeaponInfo, m_nDamage, 0x14); +VALIDATE_OFFSET(CWeaponInfo, m_fSpeed, 0x18); +VALIDATE_OFFSET(CWeaponInfo, m_fRadius, 0x1C); +VALIDATE_OFFSET(CWeaponInfo, m_fLifespan, 0x20); +VALIDATE_OFFSET(CWeaponInfo, m_fSpread, 0x24); +VALIDATE_OFFSET(CWeaponInfo, m_vecFireOffset, 0x28); +VALIDATE_OFFSET(CWeaponInfo, m_nAnimToPlay, 0x34); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopStart, 0x38); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimLoopEnd, 0x3C); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimFrameFire, 0x40); +VALIDATE_OFFSET(CWeaponInfo, m_fAnim2LoopStart, 0x44); +VALIDATE_OFFSET(CWeaponInfo, m_fAnim2LoopEnd, 0x48); +VALIDATE_OFFSET(CWeaponInfo, m_fAnim2FrameFire, 0x4C); +VALIDATE_OFFSET(CWeaponInfo, m_fAnimBreakout, 0x50); +VALIDATE_OFFSET(CWeaponInfo, m_nModelId, 0x54); +VALIDATE_OFFSET(CWeaponInfo, m_nModel2Id, 0x58); +VALIDATE_OFFSET(CWeaponInfo, m_nWeaponFlags, 0x5C); +VALIDATE_OFFSET(CWeaponInfo, m_WeaponSlot, 0x60); +VALIDATE_SIZE(CWeaponInfo, 0x64); extern CWeaponInfo (&aWeaponInfo)[37]; // CWeaponInfo aWeaponInfo[37] diff --git a/plugin_vc/game_vc/CWeaponModelInfo.cpp b/plugin_vc/game_vc/CWeaponModelInfo.cpp index 88018ba3d..a576202cf 100644 --- a/plugin_vc/game_vc/CWeaponModelInfo.cpp +++ b/plugin_vc/game_vc/CWeaponModelInfo.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeaponModelInfo.h" diff --git a/plugin_vc/game_vc/CWeaponModelInfo.h b/plugin_vc/game_vc/CWeaponModelInfo.h index 0e1209b5c..170619ea0 100644 --- a/plugin_vc/game_vc/CWeaponModelInfo.h +++ b/plugin_vc/game_vc/CWeaponModelInfo.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -20,7 +20,8 @@ class CWeaponModelInfo : public CSimpleModelInfo { void Init(); int SetWeaponInfo(int weaponType); }; - +VALIDATE_OFFSET(CWeaponModelInfo, m_pszAnimFileName, 0x44); +VALIDATE_OFFSET(CWeaponModelInfo, m_nAnimFileIndex, 0x44); VALIDATE_SIZE(CWeaponModelInfo, 0x48); struct WeaponModelStore { @@ -29,3 +30,6 @@ struct WeaponModelStore { ~WeaponModelStore(); }; +VALIDATE_OFFSET(WeaponModelStore, m_nCount, 0x0); +VALIDATE_OFFSET(WeaponModelStore, m_sObject, 0x4); +VALIDATE_SIZE(WeaponModelStore, 0xA6C); diff --git a/plugin_vc/game_vc/CWeather.cpp b/plugin_vc/game_vc/CWeather.cpp index 09e7a2edb..3478f0928 100644 --- a/plugin_vc/game_vc/CWeather.cpp +++ b/plugin_vc/game_vc/CWeather.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWeather.h" diff --git a/plugin_vc/game_vc/CWeather.h b/plugin_vc/game_vc/CWeather.h index 9c1270a64..3f0020b7f 100644 --- a/plugin_vc/game_vc/CWeather.h +++ b/plugin_vc/game_vc/CWeather.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -32,4 +32,5 @@ class CWeather { static void ReleaseWeather(); static void RenderRainStreaks(); static void Update(); -}; \ No newline at end of file +}; +VALIDATE_SIZE(CWeather, 0x1); \ No newline at end of file diff --git a/plugin_vc/game_vc/CWheel.h b/plugin_vc/game_vc/CWheel.h index f8210f761..dc8d7be04 100644 --- a/plugin_vc/game_vc/CWheel.h +++ b/plugin_vc/game_vc/CWheel.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -16,5 +15,8 @@ class CWheel { CVector vecWheelAngle; char __p001C[12]; }; - +VALIDATE_OFFSET(CWheel, vecWheelPos, 0x0); +VALIDATE_OFFSET(CWheel, __p000C, 0xC); +VALIDATE_OFFSET(CWheel, vecWheelAngle, 0x10); +VALIDATE_OFFSET(CWheel, __p001C, 0x1C); VALIDATE_SIZE(CWheel, 0x28); \ No newline at end of file diff --git a/plugin_vc/game_vc/CWindModifiers.h b/plugin_vc/game_vc/CWindModifiers.h index 08c952605..29956214a 100644 --- a/plugin_vc/game_vc/CWindModifiers.h +++ b/plugin_vc/game_vc/CWindModifiers.h @@ -16,7 +16,8 @@ class PLUGIN_API CWindModifier { CVector m_vecPos; int m_nType; }; - +VALIDATE_OFFSET(CWindModifier, m_vecPos, 0x0); +VALIDATE_OFFSET(CWindModifier, m_nType, 0xC); VALIDATE_SIZE(CWindModifier, 0x10); class PLUGIN_API CWindModifiers { @@ -27,5 +28,6 @@ class PLUGIN_API CWindModifiers { SUPPORTED_10EN_11EN_STEAM static bool FindWindModifier(CVector pos, float *x, float *y); SUPPORTED_10EN_11EN_STEAM static void RegisterOne(CVector pos, int type); }; +VALIDATE_SIZE(CWindModifiers, 0x1); #include "meta/meta.CWindModifiers.h" diff --git a/plugin_vc/game_vc/CWorld.cpp b/plugin_vc/game_vc/CWorld.cpp index d41db2801..9d79fb218 100644 --- a/plugin_vc/game_vc/CWorld.cpp +++ b/plugin_vc/game_vc/CWorld.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "CWorld.h" diff --git a/plugin_vc/game_vc/CWorld.h b/plugin_vc/game_vc/CWorld.h index 2a52eba82..d05ca7266 100644 --- a/plugin_vc/game_vc/CWorld.h +++ b/plugin_vc/game_vc/CWorld.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #define SECTOR_SIZE_X (50.0f) @@ -136,3 +136,4 @@ class CWorld { return y * SECTOR_SIZE_Y + WORLD_MIN_Y; } }; +VALIDATE_SIZE(CWorld, 0x1); diff --git a/plugin_vc/game_vc/CZone.h b/plugin_vc/game_vc/CZone.h index bf207997e..8426a66b0 100644 --- a/plugin_vc/game_vc/CZone.h +++ b/plugin_vc/game_vc/CZone.h @@ -32,5 +32,15 @@ class CZone { // Returns pointer to GXT name string. wchar_t* GetTranslatedName(); }; - +VALIDATE_OFFSET(CZone, name, 0x0); +VALIDATE_OFFSET(CZone, text, 0x8); +VALIDATE_OFFSET(CZone, x1, 0x10); +VALIDATE_OFFSET(CZone, y1, 0x12); +VALIDATE_OFFSET(CZone, z1, 0x14); +VALIDATE_OFFSET(CZone, x2, 0x16); +VALIDATE_OFFSET(CZone, y2, 0x18); +VALIDATE_OFFSET(CZone, z2, 0x1A); +VALIDATE_OFFSET(CZone, _zoneExtraIndexInfo, 0x1C); +VALIDATE_OFFSET(CZone, type, 0x1E); +VALIDATE_OFFSET(CZone, townNumber, 0x1F); VALIDATE_SIZE(CZone, 0x20); \ No newline at end of file diff --git a/plugin_vc/game_vc/CZoneInfo.h b/plugin_vc/game_vc/CZoneInfo.h index 5558c1a50..10f3ed3c4 100644 --- a/plugin_vc/game_vc/CZoneInfo.h +++ b/plugin_vc/game_vc/CZoneInfo.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file + Plugin-SDK (Grand Theft Auto Vice City) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -18,3 +18,13 @@ struct CZoneInfo { unsigned short copPedThreshold; unsigned short pedGroup; }; +VALIDATE_OFFSET(CZoneInfo, carDensity, 0x0); +VALIDATE_OFFSET(CZoneInfo, carThreshold, 0x2); +VALIDATE_OFFSET(CZoneInfo, boatThreshold, 0x14); +VALIDATE_OFFSET(CZoneInfo, gangThreshold, 0x18); +VALIDATE_OFFSET(CZoneInfo, copThreshold, 0x2A); +VALIDATE_OFFSET(CZoneInfo, pedDensity, 0x2C); +VALIDATE_OFFSET(CZoneInfo, gangPedThreshold, 0x2E); +VALIDATE_OFFSET(CZoneInfo, copPedThreshold, 0x40); +VALIDATE_OFFSET(CZoneInfo, pedGroup, 0x42); +VALIDATE_SIZE(CZoneInfo, 0x44); diff --git a/plugin_vc/game_vc/C_PcSave.h b/plugin_vc/game_vc/C_PcSave.h index e940db264..dd505bea8 100644 --- a/plugin_vc/game_vc/C_PcSave.h +++ b/plugin_vc/game_vc/C_PcSave.h @@ -39,6 +39,8 @@ class PLUGIN_API C_PcSave { SUPPORTED_10EN_11EN_STEAM static void SetSaveDirectory(char const *path); }; +VALIDATE_OFFSET(C_PcSave, nErrorCode, 0x0); +VALIDATE_SIZE(C_PcSave, 0x4); SUPPORTED_10EN_11EN_STEAM extern C_PcSave &PcSaveHelper; diff --git a/plugin_vc/game_vc/NodeName.h b/plugin_vc/game_vc/NodeName.h index 16d47b483..c47512585 100644 --- a/plugin_vc/game_vc/NodeName.h +++ b/plugin_vc/game_vc/NodeName.h @@ -5,7 +5,6 @@ Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "RenderWare.h" diff --git a/plugin_vc/game_vc/RwObjectNameIdAssocation.h b/plugin_vc/game_vc/RwObjectNameIdAssocation.h index 7ba823625..776c47243 100644 --- a/plugin_vc/game_vc/RwObjectNameIdAssocation.h +++ b/plugin_vc/game_vc/RwObjectNameIdAssocation.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -14,5 +14,7 @@ struct PLUGIN_API RwObjectNameIdAssocation unsigned int m_dwHierarchyId; unsigned int m_dwFlags; }; - +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_pName, 0x0); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_dwHierarchyId, 0x4); +VALIDATE_OFFSET(RwObjectNameIdAssocation, m_dwFlags, 0x8); VALIDATE_SIZE(RwObjectNameIdAssocation, 0xC); \ No newline at end of file diff --git a/plugin_vc/game_vc/TxdDef.h b/plugin_vc/game_vc/TxdDef.h index cfc2f0061..77075b1df 100644 --- a/plugin_vc/game_vc/TxdDef.h +++ b/plugin_vc/game_vc/TxdDef.h @@ -14,5 +14,7 @@ class TxdDef { unsigned short m_nRefCount; char m_szName[20]; }; - +VALIDATE_OFFSET(TxdDef, m_pRwDictionary, 0x0); +VALIDATE_OFFSET(TxdDef, m_nRefCount, 0x4); +VALIDATE_OFFSET(TxdDef, m_szName, 0x6); VALIDATE_SIZE(TxdDef, 0x1C); \ No newline at end of file diff --git a/plugin_vc/game_vc/cAudioManager.cpp b/plugin_vc/game_vc/cAudioManager.cpp index db71f1642..61806ec97 100644 --- a/plugin_vc/game_vc/cAudioManager.cpp +++ b/plugin_vc/game_vc/cAudioManager.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "cAudioManager.h" diff --git a/plugin_vc/game_vc/cAudioManager.h b/plugin_vc/game_vc/cAudioManager.h index 1d3031cc5..3b2a6d892 100644 --- a/plugin_vc/game_vc/cAudioManager.h +++ b/plugin_vc/game_vc/cAudioManager.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -36,6 +36,7 @@ class PLUGIN_API tSound { unsigned int m_nFinalPriority; char m_nVolumeChange; }; +VALIDATE_SIZE(tSound, 0x5C); class PLUGIN_API cAudioManager { public: @@ -55,5 +56,17 @@ class PLUGIN_API cAudioManager { static CVehicle* FindVehicleOfPlayer(); }; +VALIDATE_OFFSET(cAudioManager, m_bIsInitialised, 0x0); +VALIDATE_OFFSET(cAudioManager, m_bIsSurround, 0x1); +VALIDATE_OFFSET(cAudioManager, m_bReduceReleasingPriority, 0x2); +VALIDATE_OFFSET(cAudioManager, m_nActiveSamples, 0x3); +VALIDATE_OFFSET(cAudioManager, m_bDoubleVolume, 0x4); +VALIDATE_OFFSET(cAudioManager, m_bDynamicAcousticModelingStatus, 0x5); +VALIDATE_OFFSET(cAudioManager, m_nChannelOffset, 0x6); +VALIDATE_OFFSET(cAudioManager, m_fSpeedOfSound, 0x8); +VALIDATE_OFFSET(cAudioManager, m_bTimerJustReset, 0xC); +VALIDATE_OFFSET(cAudioManager, m_nTimer, 0x10); +VALIDATE_OFFSET(cAudioManager, m_sQueueSample, 0x14); +VALIDATE_SIZE(cAudioManager, 0x70); extern cAudioManager AudioManager; diff --git a/plugin_vc/game_vc/cAudioScriptObject.h b/plugin_vc/game_vc/cAudioScriptObject.h index 098f04eb5..44f8f9803 100644 --- a/plugin_vc/game_vc/cAudioScriptObject.h +++ b/plugin_vc/game_vc/cAudioScriptObject.h @@ -23,7 +23,9 @@ class PLUGIN_API cAudioScriptObject { SUPPORTED_10EN_11EN_STEAM static void LoadAllAudioScriptObjects(unsigned char *buffer, unsigned int size); SUPPORTED_10EN_11EN_STEAM static void SaveAllAudioScriptObjects(unsigned char *buffer, int *outSize); }; - +VALIDATE_OFFSET(cAudioScriptObject, m_nEventId, 0x0); +VALIDATE_OFFSET(cAudioScriptObject, m_vecPosition, 0x4); +VALIDATE_OFFSET(cAudioScriptObject, m_nStatusIndex, 0x10); VALIDATE_SIZE(cAudioScriptObject, 0x14); #include "meta/meta.cAudioScriptObject.h" diff --git a/plugin_vc/game_vc/cBuoyancy.h b/plugin_vc/game_vc/cBuoyancy.h index 7be65b339..e6a0e349c 100644 --- a/plugin_vc/game_vc/cBuoyancy.h +++ b/plugin_vc/game_vc/cBuoyancy.h @@ -37,5 +37,28 @@ class cBuoyancy { public: bool ProcessBuoyancy(CPhysical* phys, float buoyancy, CVector* point, CVector* impulse); }; +VALIDATE_OFFSET(cBuoyancy, m_vecPosition, 0x0); +VALIDATE_OFFSET(cBuoyancy, m_Matrix, 0xC); +VALIDATE_OFFSET(cBuoyancy, m_field_54, 0x54); +VALIDATE_OFFSET(cBuoyancy, m_vecPositionZ, 0x58); +VALIDATE_OFFSET(cBuoyancy, m_fWaterlevel, 0x64); +VALIDATE_OFFSET(cBuoyancy, m_fWaterLevelInc, 0x68); +VALIDATE_OFFSET(cBuoyancy, m_fBuoyancy, 0x6C); +VALIDATE_OFFSET(cBuoyancy, m_vecDimMax, 0x70); +VALIDATE_OFFSET(cBuoyancy, m_vecDimMin, 0x7C); +VALIDATE_OFFSET(cBuoyancy, m_fNumPartialVolumes, 0x88); +VALIDATE_OFFSET(cBuoyancy, m_field_8C, 0x8C); +VALIDATE_OFFSET(cBuoyancy, m_field_90, 0x90); +VALIDATE_OFFSET(cBuoyancy, m_field_94, 0x94); +VALIDATE_OFFSET(cBuoyancy, m_bHaveVolume, 0x98); +VALIDATE_OFFSET(cBuoyancy, m_vecStep, 0x9C); +VALIDATE_OFFSET(cBuoyancy, m_vecStepRatio, 0xA8); +VALIDATE_OFFSET(cBuoyancy, m_fNumSteps, 0xB4); +VALIDATE_OFFSET(cBuoyancy, m_bFlipAverage, 0xB8); +VALIDATE_OFFSET(cBuoyancy, m_field_B9, 0xB9); +VALIDATE_OFFSET(cBuoyancy, m_bIsBoat, 0xBA); +VALIDATE_OFFSET(cBuoyancy, m_fVolumeUnderWater, 0xBC); +VALIDATE_OFFSET(cBuoyancy, m_vecImpulsePoint, 0xC0); +VALIDATE_SIZE(cBuoyancy, 0xCC); extern cBuoyancy& mod_Buoyancy; \ No newline at end of file diff --git a/plugin_vc/game_vc/cDMAudio.h b/plugin_vc/game_vc/cDMAudio.h index 1f789573f..402daefc6 100644 --- a/plugin_vc/game_vc/cDMAudio.h +++ b/plugin_vc/game_vc/cDMAudio.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto 3) header file + Plugin-SDK (Grand Theft Auto Vice City) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -24,5 +24,6 @@ class cDMAudio { void SetMusicMasterVolume(unsigned char volume); }; +VALIDATE_SIZE(cDMAudio, 0x1); extern cDMAudio& DMAudio; diff --git a/plugin_vc/game_vc/cHandlingDataMgr.cpp b/plugin_vc/game_vc/cHandlingDataMgr.cpp index b6ad6986d..e14098af5 100644 --- a/plugin_vc/game_vc/cHandlingDataMgr.cpp +++ b/plugin_vc/game_vc/cHandlingDataMgr.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "cHandlingDataMgr.h" diff --git a/plugin_vc/game_vc/cHandlingDataMgr.h b/plugin_vc/game_vc/cHandlingDataMgr.h index 95c0669d6..f3d8055db 100644 --- a/plugin_vc/game_vc/cHandlingDataMgr.h +++ b/plugin_vc/game_vc/cHandlingDataMgr.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "tHandlingData.h" #include "tBikeHandlingData.h" @@ -42,7 +41,16 @@ class cHandlingDataMgr { }; - +VALIDATE_OFFSET(cHandlingDataMgr, field_0, 0x0); +VALIDATE_OFFSET(cHandlingDataMgr, field_4, 0x4); +VALIDATE_OFFSET(cHandlingDataMgr, field_8, 0x8); +VALIDATE_OFFSET(cHandlingDataMgr, field_C, 0xC); +VALIDATE_OFFSET(cHandlingDataMgr, field_10, 0x10); +VALIDATE_OFFSET(cHandlingDataMgr, m_aVehicleHandling, 0x14); +VALIDATE_OFFSET(cHandlingDataMgr, m_aBikeHandling, 0x5B2C); +VALIDATE_OFFSET(cHandlingDataMgr, m_aFlyingHandling, 0x5C6C); +VALIDATE_OFFSET(cHandlingDataMgr, m_aBoatHandling, 0x5F64); +VALIDATE_OFFSET(cHandlingDataMgr, _pad, 0x61F8); VALIDATE_SIZE(cHandlingDataMgr, 0x61FC); extern cHandlingDataMgr& gHandlingDataMgr; \ No newline at end of file diff --git a/plugin_vc/game_vc/cParticleSystemMgr.h b/plugin_vc/game_vc/cParticleSystemMgr.h index 63418bc5f..7d38c9395 100644 --- a/plugin_vc/game_vc/cParticleSystemMgr.h +++ b/plugin_vc/game_vc/cParticleSystemMgr.h @@ -16,6 +16,8 @@ class PLUGIN_API cParticleSystemMgr { SUPPORTED_10EN_11EN_STEAM void Initialise(); SUPPORTED_10EN_11EN_STEAM void LoadParticleData(); }; +VALIDATE_OFFSET(cParticleSystemMgr, m_systems, 0x0); +VALIDATE_SIZE(cParticleSystemMgr, 0x2FFC); SUPPORTED_10EN_11EN_STEAM extern cParticleSystemMgr &mod_ParticleSystemManager; diff --git a/plugin_vc/game_vc/cSampleManager.cpp b/plugin_vc/game_vc/cSampleManager.cpp index fd75f4a88..294b9d1f9 100644 --- a/plugin_vc/game_vc/cSampleManager.cpp +++ b/plugin_vc/game_vc/cSampleManager.cpp @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) source file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "cSampleManager.h" diff --git a/plugin_vc/game_vc/cSampleManager.h b/plugin_vc/game_vc/cSampleManager.h index 41513f0db..27cb5bd16 100644 --- a/plugin_vc/game_vc/cSampleManager.h +++ b/plugin_vc/game_vc/cSampleManager.h @@ -1,8 +1,8 @@ /* - Plugin-SDK (Grand Theft Auto Vice City) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" @@ -14,6 +14,12 @@ struct PLUGIN_API tSample { unsigned int nLoopStart; int nLoopEnd; }; +VALIDATE_OFFSET(tSample, nOffset, 0x0); +VALIDATE_OFFSET(tSample, nSize, 0x4); +VALIDATE_OFFSET(tSample, nFrequency, 0x8); +VALIDATE_OFFSET(tSample, nLoopStart, 0xC); +VALIDATE_OFFSET(tSample, nLoopEnd, 0x10); +VALIDATE_SIZE(tSample, 0x14); class PLUGIN_API cSampleManager { public: @@ -36,5 +42,21 @@ class PLUGIN_API cSampleManager { static bool IsMP3RadioChannelAvailable(); }; +VALIDATE_OFFSET(cSampleManager, m_nEffectsVolume, 0x0); +VALIDATE_OFFSET(cSampleManager, m_nMusicVolume, 0x1); +VALIDATE_OFFSET(cSampleManager, m_nMP3BoostVolume, 0x2); +VALIDATE_OFFSET(cSampleManager, m_nEffectsFadeVolume, 0x3); +VALIDATE_OFFSET(cSampleManager, m_nMusicFadeVolume, 0x4); +VALIDATE_OFFSET(cSampleManager, m_nMonoMode, 0x5); +VALIDATE_OFFSET(cSampleManager, m_szCDRomRootPath, 0x6); +VALIDATE_OFFSET(cSampleManager, m_bInitialised, 0x56); +VALIDATE_OFFSET(cSampleManager, m_nNumberOfProviders, 0x57); +VALIDATE_OFFSET(cSampleManager, m_aAudioProviders, 0x58); +VALIDATE_OFFSET(cSampleManager, m_aSamples, 0x158); +VALIDATE_OFFSET(cSampleManager, m_MiscomPath, 0x309FC); +VALIDATE_OFFSET(cSampleManager, m_WavFilesPath, 0x30B00); +VALIDATE_OFFSET(cSampleManager, m_MP3FilesPath, 0x30C04); +VALIDATE_OFFSET(cSampleManager, m_aChannels, 0x30CC0); +VALIDATE_SIZE(cSampleManager, 0x30D08); extern cSampleManager& SampleManager; diff --git a/plugin_vc/game_vc/cTransmission.cpp b/plugin_vc/game_vc/cTransmission.cpp index 2823a8855..6f9f04fde 100644 --- a/plugin_vc/game_vc/cTransmission.cpp +++ b/plugin_vc/game_vc/cTransmission.cpp @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) source file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) source file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #include "cTransmission.h" diff --git a/plugin_vc/game_vc/cTransmission.h b/plugin_vc/game_vc/cTransmission.h index df61ad75c..57d641744 100644 --- a/plugin_vc/game_vc/cTransmission.h +++ b/plugin_vc/game_vc/cTransmission.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "tTransmissionGear.h" @@ -30,4 +29,14 @@ class PLUGIN_API cTransmission void InitGearRatios(); cTransmission(); }; +VALIDATE_OFFSET(cTransmission, m_aGears, 0x0); +VALIDATE_OFFSET(cTransmission, m_nDriveType, 0x48); +VALIDATE_OFFSET(cTransmission, m_nEngineType, 0x49); +VALIDATE_OFFSET(cTransmission, m_nNumberOfGears, 0x4A); +VALIDATE_OFFSET(cTransmission, m_nHandlingFlags, 0x4B); +VALIDATE_OFFSET(cTransmission, m_fEngineAcceleration, 0x4C); +VALIDATE_OFFSET(cTransmission, m_fMaxGearVelocity, 0x50); +VALIDATE_OFFSET(cTransmission, m_fMaxSpeed, 0x54); +VALIDATE_OFFSET(cTransmission, m_fMinGearVelocity, 0x58); +VALIDATE_OFFSET(cTransmission, m_fCurrentSpeed, 0x5C); VALIDATE_SIZE(cTransmission, 0x60); \ No newline at end of file diff --git a/plugin_vc/game_vc/enums/eCopType.h b/plugin_vc/game_vc/enums/eCopType.h index 1d4681e99..68065fc81 100644 --- a/plugin_vc/game_vc/enums/eCopType.h +++ b/plugin_vc/game_vc/enums/eCopType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eCoronaType.h b/plugin_vc/game_vc/enums/eCoronaType.h index 3483aba77..5ba206e4f 100644 --- a/plugin_vc/game_vc/enums/eCoronaType.h +++ b/plugin_vc/game_vc/enums/eCoronaType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eCrimeType.h b/plugin_vc/game_vc/enums/eCrimeType.h index dc67c90e6..b980fa670 100644 --- a/plugin_vc/game_vc/enums/eCrimeType.h +++ b/plugin_vc/game_vc/enums/eCrimeType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eEntityStatus.h b/plugin_vc/game_vc/enums/eEntityStatus.h index a97eed82b..78388ea99 100644 --- a/plugin_vc/game_vc/enums/eEntityStatus.h +++ b/plugin_vc/game_vc/enums/eEntityStatus.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eEventType.h b/plugin_vc/game_vc/enums/eEventType.h index a722822af..e634e2913 100644 --- a/plugin_vc/game_vc/enums/eEventType.h +++ b/plugin_vc/game_vc/enums/eEventType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eExplosionType.h b/plugin_vc/game_vc/enums/eExplosionType.h index 60436b833..65e19be10 100644 --- a/plugin_vc/game_vc/enums/eExplosionType.h +++ b/plugin_vc/game_vc/enums/eExplosionType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eFormation.h b/plugin_vc/game_vc/enums/eFormation.h index 07107d1df..d4dc77288 100644 --- a/plugin_vc/game_vc/enums/eFormation.h +++ b/plugin_vc/game_vc/enums/eFormation.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eGangType.h b/plugin_vc/game_vc/enums/eGangType.h index a37c3b0cd..962f1f973 100644 --- a/plugin_vc/game_vc/enums/eGangType.h +++ b/plugin_vc/game_vc/enums/eGangType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eLevelName.h b/plugin_vc/game_vc/enums/eLevelName.h index 582d679dd..1f1932eb8 100644 --- a/plugin_vc/game_vc/enums/eLevelName.h +++ b/plugin_vc/game_vc/enums/eLevelName.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eModelInfoType.h b/plugin_vc/game_vc/enums/eModelInfoType.h index 66dd34c67..08300920d 100644 --- a/plugin_vc/game_vc/enums/eModelInfoType.h +++ b/plugin_vc/game_vc/enums/eModelInfoType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once #include diff --git a/plugin_vc/game_vc/enums/eParticleObjectType.h b/plugin_vc/game_vc/enums/eParticleObjectType.h index 777e0887d..b0db18b6e 100644 --- a/plugin_vc/game_vc/enums/eParticleObjectType.h +++ b/plugin_vc/game_vc/enums/eParticleObjectType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/ePedAction.h b/plugin_vc/game_vc/enums/ePedAction.h index c043feabc..38e8df3c8 100644 --- a/plugin_vc/game_vc/enums/ePedAction.h +++ b/plugin_vc/game_vc/enums/ePedAction.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/ePedModel.h b/plugin_vc/game_vc/enums/ePedModel.h index 2ad92b0f4..46ade15cc 100644 --- a/plugin_vc/game_vc/enums/ePedModel.h +++ b/plugin_vc/game_vc/enums/ePedModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/ePedPieceTypes.h b/plugin_vc/game_vc/enums/ePedPieceTypes.h index 4bae6d1ad..ea706e0e1 100644 --- a/plugin_vc/game_vc/enums/ePedPieceTypes.h +++ b/plugin_vc/game_vc/enums/ePedPieceTypes.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/ePedStats.h b/plugin_vc/game_vc/enums/ePedStats.h index 268013842..c03f9af40 100644 --- a/plugin_vc/game_vc/enums/ePedStats.h +++ b/plugin_vc/game_vc/enums/ePedStats.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/ePickupType.h b/plugin_vc/game_vc/enums/ePickupType.h index 539b4f830..fa16e2b37 100644 --- a/plugin_vc/game_vc/enums/ePickupType.h +++ b/plugin_vc/game_vc/enums/ePickupType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eRadioStations.h b/plugin_vc/game_vc/enums/eRadioStations.h index af2a791ac..2535e42d2 100644 --- a/plugin_vc/game_vc/enums/eRadioStations.h +++ b/plugin_vc/game_vc/enums/eRadioStations.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eSceneCommands.h b/plugin_vc/game_vc/enums/eSceneCommands.h index 097667375..b936e8fe4 100644 --- a/plugin_vc/game_vc/enums/eSceneCommands.h +++ b/plugin_vc/game_vc/enums/eSceneCommands.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto 3) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eShadowType.h b/plugin_vc/game_vc/enums/eShadowType.h index d322c3983..250b513de 100644 --- a/plugin_vc/game_vc/enums/eShadowType.h +++ b/plugin_vc/game_vc/enums/eShadowType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eVehicleFlags.h b/plugin_vc/game_vc/enums/eVehicleFlags.h index c7eea4feb..2c9d1f416 100644 --- a/plugin_vc/game_vc/enums/eVehicleFlags.h +++ b/plugin_vc/game_vc/enums/eVehicleFlags.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eVehicleType.h b/plugin_vc/game_vc/enums/eVehicleType.h index cf94d9b80..2734d02ab 100644 --- a/plugin_vc/game_vc/enums/eVehicleType.h +++ b/plugin_vc/game_vc/enums/eVehicleType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eWaitState.h b/plugin_vc/game_vc/enums/eWaitState.h index 605f1d61b..9540343d2 100644 --- a/plugin_vc/game_vc/enums/eWaitState.h +++ b/plugin_vc/game_vc/enums/eWaitState.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eWeaponFire.h b/plugin_vc/game_vc/enums/eWeaponFire.h index d0d569089..80a38e140 100644 --- a/plugin_vc/game_vc/enums/eWeaponFire.h +++ b/plugin_vc/game_vc/enums/eWeaponFire.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eWeaponModel.h b/plugin_vc/game_vc/enums/eWeaponModel.h index 6cb354ea2..14288090d 100644 --- a/plugin_vc/game_vc/enums/eWeaponModel.h +++ b/plugin_vc/game_vc/enums/eWeaponModel.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eWeaponType.h b/plugin_vc/game_vc/enums/eWeaponType.h index a393be90c..84968ac5d 100644 --- a/plugin_vc/game_vc/enums/eWeaponType.h +++ b/plugin_vc/game_vc/enums/eWeaponType.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/enums/eWeather.h b/plugin_vc/game_vc/enums/eWeather.h index d2657fb4a..363e1f047 100644 --- a/plugin_vc/game_vc/enums/eWeather.h +++ b/plugin_vc/game_vc/enums/eWeather.h @@ -1,8 +1,8 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/plugin_vc/game_vc/meta/meta.C3dMarker.h b/plugin_vc/game_vc/meta/meta.C3dMarker.h index 44e960110..ccf9474fd 100644 --- a/plugin_vc/game_vc/meta/meta.C3dMarker.h +++ b/plugin_vc/game_vc/meta/meta.C3dMarker.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CBulletTrace.h b/plugin_vc/game_vc/meta/meta.CBulletTrace.h index 72eca0cce..e492f40d5 100644 --- a/plugin_vc/game_vc/meta/meta.CBulletTrace.h +++ b/plugin_vc/game_vc/meta/meta.CBulletTrace.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CBulletTraces.h b/plugin_vc/game_vc/meta/meta.CBulletTraces.h index ec98850c6..89db41257 100644 --- a/plugin_vc/game_vc/meta/meta.CBulletTraces.h +++ b/plugin_vc/game_vc/meta/meta.CBulletTraces.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CCarAI.h b/plugin_vc/game_vc/meta/meta.CCarAI.h index 927ace213..9f65f6b93 100644 --- a/plugin_vc/game_vc/meta/meta.CCarAI.h +++ b/plugin_vc/game_vc/meta/meta.CCarAI.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CClock.h b/plugin_vc/game_vc/meta/meta.CClock.h index 794830b60..fd694ae44 100644 --- a/plugin_vc/game_vc/meta/meta.CClock.h +++ b/plugin_vc/game_vc/meta/meta.CClock.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CControllerState.h b/plugin_vc/game_vc/meta/meta.CControllerState.h index ad36c5e7c..dee44f69a 100644 --- a/plugin_vc/game_vc/meta/meta.CControllerState.h +++ b/plugin_vc/game_vc/meta/meta.CControllerState.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CCrane.h b/plugin_vc/game_vc/meta/meta.CCrane.h index ccd7dc57d..01a48e913 100644 --- a/plugin_vc/game_vc/meta/meta.CCrane.h +++ b/plugin_vc/game_vc/meta/meta.CCrane.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CCranes.h b/plugin_vc/game_vc/meta/meta.CCranes.h index f2e74b4c2..ef0323cb9 100644 --- a/plugin_vc/game_vc/meta/meta.CCranes.h +++ b/plugin_vc/game_vc/meta/meta.CCranes.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CCutsceneShadow.h b/plugin_vc/game_vc/meta/meta.CCutsceneShadow.h index 4b4292322..a2e6e0d1e 100644 --- a/plugin_vc/game_vc/meta/meta.CCutsceneShadow.h +++ b/plugin_vc/game_vc/meta/meta.CCutsceneShadow.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CDirectory.h b/plugin_vc/game_vc/meta/meta.CDirectory.h index 3597772b3..8017a8604 100644 --- a/plugin_vc/game_vc/meta/meta.CDirectory.h +++ b/plugin_vc/game_vc/meta/meta.CDirectory.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CDraw.h b/plugin_vc/game_vc/meta/meta.CDraw.h index f6706b3eb..a73466cda 100644 --- a/plugin_vc/game_vc/meta/meta.CDraw.h +++ b/plugin_vc/game_vc/meta/meta.CDraw.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CFileMgr.h b/plugin_vc/game_vc/meta/meta.CFileMgr.h index 6818cf139..91dfff91b 100644 --- a/plugin_vc/game_vc/meta/meta.CFileMgr.h +++ b/plugin_vc/game_vc/meta/meta.CFileMgr.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CGame.h b/plugin_vc/game_vc/meta/meta.CGame.h index 9eed246c5..8ede635fc 100644 --- a/plugin_vc/game_vc/meta/meta.CGame.h +++ b/plugin_vc/game_vc/meta/meta.CGame.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CGeneral.h b/plugin_vc/game_vc/meta/meta.CGeneral.h index 65aea78c8..2229a66b2 100644 --- a/plugin_vc/game_vc/meta/meta.CGeneral.h +++ b/plugin_vc/game_vc/meta/meta.CGeneral.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CHud.h b/plugin_vc/game_vc/meta/meta.CHud.h index c34b1620c..62458350a 100644 --- a/plugin_vc/game_vc/meta/meta.CHud.h +++ b/plugin_vc/game_vc/meta/meta.CHud.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CKeyboardState.h b/plugin_vc/game_vc/meta/meta.CKeyboardState.h index a39a662e1..a5e179c50 100644 --- a/plugin_vc/game_vc/meta/meta.CKeyboardState.h +++ b/plugin_vc/game_vc/meta/meta.CKeyboardState.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CMousePointerStateHelper.h b/plugin_vc/game_vc/meta/meta.CMousePointerStateHelper.h index 8bac10b18..2c1a182e2 100644 --- a/plugin_vc/game_vc/meta/meta.CMousePointerStateHelper.h +++ b/plugin_vc/game_vc/meta/meta.CMousePointerStateHelper.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.COcclusion.h b/plugin_vc/game_vc/meta/meta.COcclusion.h index 64df804af..8e3adf8e3 100644 --- a/plugin_vc/game_vc/meta/meta.COcclusion.h +++ b/plugin_vc/game_vc/meta/meta.COcclusion.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPad.h b/plugin_vc/game_vc/meta/meta.CPad.h index 112f24307..a4d7f9aed 100644 --- a/plugin_vc/game_vc/meta/meta.CPad.h +++ b/plugin_vc/game_vc/meta/meta.CPad.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPager.h b/plugin_vc/game_vc/meta/meta.CPager.h index 5590a3ec6..7f806ca0c 100644 --- a/plugin_vc/game_vc/meta/meta.CPager.h +++ b/plugin_vc/game_vc/meta/meta.CPager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CParticle.h b/plugin_vc/game_vc/meta/meta.CParticle.h index 6313b72bd..3705e0a33 100644 --- a/plugin_vc/game_vc/meta/meta.CParticle.h +++ b/plugin_vc/game_vc/meta/meta.CParticle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedAtmAttractor.h b/plugin_vc/game_vc/meta/meta.CPedAtmAttractor.h index df5d56c69..fe71e807f 100644 --- a/plugin_vc/game_vc/meta/meta.CPedAtmAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedAtmAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedAttractor.h b/plugin_vc/game_vc/meta/meta.CPedAttractor.h index 2179ae2e8..de8482f82 100644 --- a/plugin_vc/game_vc/meta/meta.CPedAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedAttractorManager.h b/plugin_vc/game_vc/meta/meta.CPedAttractorManager.h index 16f86d3a8..18eece12c 100644 --- a/plugin_vc/game_vc/meta/meta.CPedAttractorManager.h +++ b/plugin_vc/game_vc/meta/meta.CPedAttractorManager.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedIceCreamVanAttractor.h b/plugin_vc/game_vc/meta/meta.CPedIceCreamVanAttractor.h index 0e6a23049..b96d6e9c4 100644 --- a/plugin_vc/game_vc/meta/meta.CPedIceCreamVanAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedIceCreamVanAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedPizzaAttractor.h b/plugin_vc/game_vc/meta/meta.CPedPizzaAttractor.h index 37022a5e8..f921ae1ef 100644 --- a/plugin_vc/game_vc/meta/meta.CPedPizzaAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedPizzaAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedSeatAttractor.h b/plugin_vc/game_vc/meta/meta.CPedSeatAttractor.h index 5a11ad238..11b0188d1 100644 --- a/plugin_vc/game_vc/meta/meta.CPedSeatAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedSeatAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedShelterAttractor.h b/plugin_vc/game_vc/meta/meta.CPedShelterAttractor.h index c64991dc6..fde851fe0 100644 --- a/plugin_vc/game_vc/meta/meta.CPedShelterAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedShelterAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPedStopAttractor.h b/plugin_vc/game_vc/meta/meta.CPedStopAttractor.h index 422251a74..e3759efd4 100644 --- a/plugin_vc/game_vc/meta/meta.CPedStopAttractor.h +++ b/plugin_vc/game_vc/meta/meta.CPedStopAttractor.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPhone.h b/plugin_vc/game_vc/meta/meta.CPhone.h index e947516fc..1774d8023 100644 --- a/plugin_vc/game_vc/meta/meta.CPhone.h +++ b/plugin_vc/game_vc/meta/meta.CPhone.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPhoneInfo.h b/plugin_vc/game_vc/meta/meta.CPhoneInfo.h index 49bcf4d0c..93c31ab7d 100644 --- a/plugin_vc/game_vc/meta/meta.CPhoneInfo.h +++ b/plugin_vc/game_vc/meta/meta.CPhoneInfo.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPointLight.h b/plugin_vc/game_vc/meta/meta.CPointLight.h index 7e1b17149..c795a246b 100644 --- a/plugin_vc/game_vc/meta/meta.CPointLight.h +++ b/plugin_vc/game_vc/meta/meta.CPointLight.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPointLights.h b/plugin_vc/game_vc/meta/meta.CPointLights.h index 3963280d0..2c602024a 100644 --- a/plugin_vc/game_vc/meta/meta.CPointLights.h +++ b/plugin_vc/game_vc/meta/meta.CPointLights.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CPools.h b/plugin_vc/game_vc/meta/meta.CPools.h index 55e3fa5b4..5c00e4484 100644 --- a/plugin_vc/game_vc/meta/meta.CPools.h +++ b/plugin_vc/game_vc/meta/meta.CPools.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CRouteNode.h b/plugin_vc/game_vc/meta/meta.CRouteNode.h index dc69e668b..d4995c5ad 100644 --- a/plugin_vc/game_vc/meta/meta.CRouteNode.h +++ b/plugin_vc/game_vc/meta/meta.CRouteNode.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CRubbish.h b/plugin_vc/game_vc/meta/meta.CRubbish.h index 7a1637a9f..0c74ec34b 100644 --- a/plugin_vc/game_vc/meta/meta.CRubbish.h +++ b/plugin_vc/game_vc/meta/meta.CRubbish.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CShadowCamera.h b/plugin_vc/game_vc/meta/meta.CShadowCamera.h index 0b684ee39..02de94899 100644 --- a/plugin_vc/game_vc/meta/meta.CShadowCamera.h +++ b/plugin_vc/game_vc/meta/meta.CShadowCamera.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CStreaming.h b/plugin_vc/game_vc/meta/meta.CStreaming.h index 8cd472372..580937a65 100644 --- a/plugin_vc/game_vc/meta/meta.CStreaming.h +++ b/plugin_vc/game_vc/meta/meta.CStreaming.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CTheScripts.h b/plugin_vc/game_vc/meta/meta.CTheScripts.h index bc6595243..945a94940 100644 --- a/plugin_vc/game_vc/meta/meta.CTheScripts.h +++ b/plugin_vc/game_vc/meta/meta.CTheScripts.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CTimeCycle.h b/plugin_vc/game_vc/meta/meta.CTimeCycle.h index 3d61fd20d..79bf67aae 100644 --- a/plugin_vc/game_vc/meta/meta.CTimeCycle.h +++ b/plugin_vc/game_vc/meta/meta.CTimeCycle.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CTimer.h b/plugin_vc/game_vc/meta/meta.CTimer.h index ea9e0e924..28626f6d4 100644 --- a/plugin_vc/game_vc/meta/meta.CTimer.h +++ b/plugin_vc/game_vc/meta/meta.CTimer.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CTrafficLights.h b/plugin_vc/game_vc/meta/meta.CTrafficLights.h index 79ca50c6e..bc0f846f2 100644 --- a/plugin_vc/game_vc/meta/meta.CTrafficLights.h +++ b/plugin_vc/game_vc/meta/meta.CTrafficLights.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.CWindModifiers.h b/plugin_vc/game_vc/meta/meta.CWindModifiers.h index 282ddd26f..649ad5555 100644 --- a/plugin_vc/game_vc/meta/meta.CWindModifiers.h +++ b/plugin_vc/game_vc/meta/meta.CWindModifiers.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.C_PcSave.h b/plugin_vc/game_vc/meta/meta.C_PcSave.h index e5ba8c8fd..996aee723 100644 --- a/plugin_vc/game_vc/meta/meta.C_PcSave.h +++ b/plugin_vc/game_vc/meta/meta.C_PcSave.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.NodeName.h b/plugin_vc/game_vc/meta/meta.NodeName.h index 29058de83..0c9d2a5c5 100644 --- a/plugin_vc/game_vc/meta/meta.NodeName.h +++ b/plugin_vc/game_vc/meta/meta.NodeName.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.cAudioScriptObject.h b/plugin_vc/game_vc/meta/meta.cAudioScriptObject.h index bf5f1d81d..31f133652 100644 --- a/plugin_vc/game_vc/meta/meta.cAudioScriptObject.h +++ b/plugin_vc/game_vc/meta/meta.cAudioScriptObject.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/meta/meta.cParticleSystemMgr.h b/plugin_vc/game_vc/meta/meta.cParticleSystemMgr.h index 816ba7034..86855d3ef 100644 --- a/plugin_vc/game_vc/meta/meta.cParticleSystemMgr.h +++ b/plugin_vc/game_vc/meta/meta.cParticleSystemMgr.h @@ -4,6 +4,7 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ +#pragma once #include "PluginBase.h" namespace plugin { diff --git a/plugin_vc/game_vc/tBikeHandlingData.h b/plugin_vc/game_vc/tBikeHandlingData.h index 1f373dc60..df9e50a1b 100644 --- a/plugin_vc/game_vc/tBikeHandlingData.h +++ b/plugin_vc/game_vc/tBikeHandlingData.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" struct tBikeHandlingData { @@ -26,5 +25,20 @@ struct tBikeHandlingData { float m_fWheelieStabMult; float m_fStoppieStabMult; }; - +VALIDATE_OFFSET(tBikeHandlingData, m_dwVehicleId, 0x0); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanFwdCOM, 0x4); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanFwdForce, 0x8); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanBakCOM, 0xC); +VALIDATE_OFFSET(tBikeHandlingData, m_fLeanBakForce, 0x10); +VALIDATE_OFFSET(tBikeHandlingData, m_fMaxLean, 0x14); +VALIDATE_OFFSET(tBikeHandlingData, m_fFullAnimLean, 0x18); +VALIDATE_OFFSET(tBikeHandlingData, m_fDesLean, 0x1C); +VALIDATE_OFFSET(tBikeHandlingData, m_fSpeedSteer, 0x20); +VALIDATE_OFFSET(tBikeHandlingData, m_fSlipSteer, 0x24); +VALIDATE_OFFSET(tBikeHandlingData, m_fNoPlayerCOMz, 0x28); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieAng, 0x2C); +VALIDATE_OFFSET(tBikeHandlingData, m_fStoppieAng, 0x30); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieSteer, 0x34); +VALIDATE_OFFSET(tBikeHandlingData, m_fWheelieStabMult, 0x38); +VALIDATE_OFFSET(tBikeHandlingData, m_fStoppieStabMult, 0x3C); VALIDATE_SIZE(tBikeHandlingData, 0x40); \ No newline at end of file diff --git a/plugin_vc/game_vc/tBoatHandlingData.h b/plugin_vc/game_vc/tBoatHandlingData.h index aef44bcff..32faf3d56 100644 --- a/plugin_vc/game_vc/tBoatHandlingData.h +++ b/plugin_vc/game_vc/tBoatHandlingData.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -23,5 +22,15 @@ struct tBoatHandlingData { CVector m_vMoveRes; CVector m_vTurnRes; }; - +VALIDATE_OFFSET(tBoatHandlingData, m_dwVehicleId, 0x0); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustY, 0x4); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustZ, 0x8); +VALIDATE_OFFSET(tBoatHandlingData, m_fThrustAppZ, 0xC); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneForce, 0x10); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneLimit, 0x14); +VALIDATE_OFFSET(tBoatHandlingData, m_fAqPlaneOffset, 0x18); +VALIDATE_OFFSET(tBoatHandlingData, m_fWaveAudioMult, 0x1C); +VALIDATE_OFFSET(tBoatHandlingData, m_fLookLRBehindCamHeight, 0x20); +VALIDATE_OFFSET(tBoatHandlingData, m_vMoveRes, 0x24); +VALIDATE_OFFSET(tBoatHandlingData, m_vTurnRes, 0x30); VALIDATE_SIZE(tBoatHandlingData, 0x3C); \ No newline at end of file diff --git a/plugin_vc/game_vc/tCamPathSplines.h b/plugin_vc/game_vc/tCamPathSplines.h index 0261f9c18..22e27235b 100644 --- a/plugin_vc/game_vc/tCamPathSplines.h +++ b/plugin_vc/game_vc/tCamPathSplines.h @@ -11,5 +11,5 @@ struct tCamPathSplines { float *m_arr_PathData;// FLOAT m_arr_PathData[MAXPATHLENGTH = 800]; }; - +VALIDATE_OFFSET(tCamPathSplines, m_arr_PathData, 0x0); VALIDATE_SIZE(tCamPathSplines, 0x4); diff --git a/plugin_vc/game_vc/tFlyingHandlingData.h b/plugin_vc/game_vc/tFlyingHandlingData.h index 5d9aa7334..f1c6eb1a2 100644 --- a/plugin_vc/game_vc/tFlyingHandlingData.h +++ b/plugin_vc/game_vc/tFlyingHandlingData.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "CVector.h" @@ -26,5 +25,19 @@ struct tFlyingHandlingData { CVector vecTurnRes; CVector vecSpeedRes; }; - +VALIDATE_OFFSET(tFlyingHandlingData, m_dwVehicleId, 0x0); +VALIDATE_OFFSET(tFlyingHandlingData, fThrust, 0x4); +VALIDATE_OFFSET(tFlyingHandlingData, fThrustFallOff, 0x8); +VALIDATE_OFFSET(tFlyingHandlingData, fYaw, 0xC); +VALIDATE_OFFSET(tFlyingHandlingData, fYawStab, 0x10); +VALIDATE_OFFSET(tFlyingHandlingData, fSideSlip, 0x14); +VALIDATE_OFFSET(tFlyingHandlingData, fRoll, 0x18); +VALIDATE_OFFSET(tFlyingHandlingData, fRollStab, 0x1C); +VALIDATE_OFFSET(tFlyingHandlingData, fPitch, 0x20); +VALIDATE_OFFSET(tFlyingHandlingData, fPitchStab, 0x24); +VALIDATE_OFFSET(tFlyingHandlingData, fFormLift, 0x28); +VALIDATE_OFFSET(tFlyingHandlingData, fAttackLift, 0x2C); +VALIDATE_OFFSET(tFlyingHandlingData, fMoveRes, 0x30); +VALIDATE_OFFSET(tFlyingHandlingData, vecTurnRes, 0x34); +VALIDATE_OFFSET(tFlyingHandlingData, vecSpeedRes, 0x40); VALIDATE_SIZE(tFlyingHandlingData, 0x4C); \ No newline at end of file diff --git a/plugin_vc/game_vc/tHandlingData.h b/plugin_vc/game_vc/tHandlingData.h index 609dcee0c..a280136f0 100644 --- a/plugin_vc/game_vc/tHandlingData.h +++ b/plugin_vc/game_vc/tHandlingData.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" #include "cTransmission.h" #include "CVector.h" @@ -52,5 +51,35 @@ struct tHandlingData { eVehicleLightsSize bRearLights; char pad2[2]; }; - +VALIDATE_OFFSET(tHandlingData, m_dwVehicleId, 0x0); +VALIDATE_OFFSET(tHandlingData, fMass, 0x4); +VALIDATE_OFFSET(tHandlingData, fMassInverted, 0x8); +VALIDATE_OFFSET(tHandlingData, fTurnMass, 0xC); +VALIDATE_OFFSET(tHandlingData, m_vDimensions, 0x10); +VALIDATE_OFFSET(tHandlingData, m_vecCentreOfMass, 0x1C); +VALIDATE_OFFSET(tHandlingData, nPercentSubmerged, 0x28); +VALIDATE_OFFSET(tHandlingData, fBuoyancyForce, 0x2C); +VALIDATE_OFFSET(tHandlingData, fTractionMultiplier, 0x30); +VALIDATE_OFFSET(tHandlingData, m_transmissionData, 0x34); +VALIDATE_OFFSET(tHandlingData, fBrakeDeceleration, 0x94); +VALIDATE_OFFSET(tHandlingData, fBrakeBias, 0x98); +VALIDATE_OFFSET(tHandlingData, bABS, 0x9C); +VALIDATE_OFFSET(tHandlingData, pad, 0x9D); +VALIDATE_OFFSET(tHandlingData, fSteeringLock, 0xA0); +VALIDATE_OFFSET(tHandlingData, fTractionLoss, 0xA4); +VALIDATE_OFFSET(tHandlingData, fTractionBias, 0xA8); +VALIDATE_OFFSET(tHandlingData, fABS, 0xAC); +VALIDATE_OFFSET(tHandlingData, fSuspensionForceLevel, 0xB0); +VALIDATE_OFFSET(tHandlingData, fSuspensionDampingLevel, 0xB4); +VALIDATE_OFFSET(tHandlingData, fSuspUpperLimit, 0xB8); +VALIDATE_OFFSET(tHandlingData, fSuspLowerLimit, 0xBC); +VALIDATE_OFFSET(tHandlingData, fSuspBias, 0xC0); +VALIDATE_OFFSET(tHandlingData, fSuspAntiDiveMultiplier, 0xC4); +VALIDATE_OFFSET(tHandlingData, fCollisionDamageMultiplier, 0xC8); +VALIDATE_OFFSET(tHandlingData, uFlags, 0xCC); +VALIDATE_OFFSET(tHandlingData, fSeatOffsetDistance, 0xD0); +VALIDATE_OFFSET(tHandlingData, nMonetaryValue, 0xD4); +VALIDATE_OFFSET(tHandlingData, bFrontLights, 0xD8); +VALIDATE_OFFSET(tHandlingData, bRearLights, 0xD9); +VALIDATE_OFFSET(tHandlingData, pad2, 0xDA); VALIDATE_SIZE(tHandlingData, 0xDC); \ No newline at end of file diff --git a/plugin_vc/game_vc/tParticleSystemData.h b/plugin_vc/game_vc/tParticleSystemData.h index 50dac7320..c941bd0d5 100644 --- a/plugin_vc/game_vc/tParticleSystemData.h +++ b/plugin_vc/game_vc/tParticleSystemData.h @@ -84,5 +84,50 @@ struct PLUGIN_API tParticleSystemData { RwRaster *m_pRaster; CParticle *field_90; }; - +VALIDATE_OFFSET(tParticleSystemData, m_nId, 0x0); +VALIDATE_OFFSET(tParticleSystemData, m_szName, 0x4); +VALIDATE_OFFSET(tParticleSystemData, m_fParticleCreateRange, 0x18); +VALIDATE_OFFSET(tParticleSystemData, m_fDefaultInitialRadius, 0x1C); +VALIDATE_OFFSET(tParticleSystemData, m_fExpansionRate, 0x20); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationInitialAngle, 0x24); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationAngleChangeAmount, 0x26); +VALIDATE_OFFSET(tParticleSystemData, m_nZRotationChangeTime, 0x28); +VALIDATE_OFFSET(tParticleSystemData, m_nZRadiusChangeTime, 0x2A); +VALIDATE_OFFSET(tParticleSystemData, m_fInitialZRadius, 0x2C); +VALIDATE_OFFSET(tParticleSystemData, m_fZRadiusChangeAmount, 0x30); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackFadeTime, 0x34); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackInitialIntensity, 0x36); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeToBlackFadeAmount, 0x38); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaInitialIntensity, 0x3A); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaFadeTime, 0x3C); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeAlphaFadeAmount, 0x3E); +VALIDATE_OFFSET(tParticleSystemData, m_nStartAnimationFrame, 0x40); +VALIDATE_OFFSET(tParticleSystemData, m_nFinalAnimationFrame, 0x41); +VALIDATE_OFFSET(tParticleSystemData, m_nAnimationSpeed, 0x42); +VALIDATE_OFFSET(tParticleSystemData, m_nRotationSpeed, 0x44); +VALIDATE_OFFSET(tParticleSystemData, m_fGravitationAcceleration, 0x48); +VALIDATE_OFFSET(tParticleSystemData, m_nDragFrictionDeceleration, 0x4C); +VALIDATE_OFFSET(tParticleSystemData, m_nDefaultLifeSpan, 0x50); +VALIDATE_OFFSET(tParticleSystemData, m_fPositionRandomError, 0x54); +VALIDATE_OFFSET(tParticleSystemData, m_fVelocityRandomError, 0x58); +VALIDATE_OFFSET(tParticleSystemData, m_fExpansionRateError, 0x5C); +VALIDATE_OFFSET(tParticleSystemData, m_nRotationRateError, 0x60); +VALIDATE_OFFSET(tParticleSystemData, m_nLifeSpanErrorShape, 0x64); +VALIDATE_OFFSET(tParticleSystemData, m_fTrailLengthMultiplier, 0x68); +VALIDATE_OFFSET(tParticleSystemData, m_nFlags, 0x6C); +VALIDATE_OFFSET(tParticleSystemData, m_nRed, 0x70); +VALIDATE_OFFSET(tParticleSystemData, m_nGreen, 0x71); +VALIDATE_OFFSET(tParticleSystemData, m_nBlue, 0x72); +VALIDATE_OFFSET(tParticleSystemData, m_nAlpha, 0x73); +VALIDATE_OFFSET(tParticleSystemData, m_nInitialColorVariation, 0x74); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeDestRed, 0x75); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeDestGreen, 0x76); +VALIDATE_OFFSET(tParticleSystemData, m_nFadeDestBlue, 0x77); +VALIDATE_OFFSET(tParticleSystemData, field_78, 0x78); +VALIDATE_OFFSET(tParticleSystemData, m_nColorFadeTime, 0x7C); +VALIDATE_OFFSET(tParticleSystemData, m_fTextureStretchValueX, 0x80); +VALIDATE_OFFSET(tParticleSystemData, m_fTextureStretchValueY, 0x84); +VALIDATE_OFFSET(tParticleSystemData, m_fWindFactor, 0x88); +VALIDATE_OFFSET(tParticleSystemData, m_pRaster, 0x8C); +VALIDATE_OFFSET(tParticleSystemData, field_90, 0x90); VALIDATE_SIZE(tParticleSystemData, 0x94); diff --git a/plugin_vc/game_vc/tQueuedMode.h b/plugin_vc/game_vc/tQueuedMode.h index 06ff43a3c..b64a7e2a9 100644 --- a/plugin_vc/game_vc/tQueuedMode.h +++ b/plugin_vc/game_vc/tQueuedMode.h @@ -17,5 +17,8 @@ struct tQueuedMode { short MinZoom; short MaxZoom; }; - +VALIDATE_OFFSET(tQueuedMode, Mode, 0x0); +VALIDATE_OFFSET(tQueuedMode, Duration, 0x4); +VALIDATE_OFFSET(tQueuedMode, MinZoom, 0x8); +VALIDATE_OFFSET(tQueuedMode, MaxZoom, 0xA); VALIDATE_SIZE(tQueuedMode, 0xC); diff --git a/plugin_vc/game_vc/tTransmissionGear.h b/plugin_vc/game_vc/tTransmissionGear.h index 8a0665289..0fcf7e4ea 100644 --- a/plugin_vc/game_vc/tTransmissionGear.h +++ b/plugin_vc/game_vc/tTransmissionGear.h @@ -1,11 +1,10 @@ /* -Plugin-SDK (Grand Theft Auto Vice City) header file -Authors: GTA Community. See more here -https://github.com/DK22Pac/plugin-sdk -Do not delete this comment block. Respect others' work! + Plugin-SDK (Grand Theft Auto Vice City) header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" struct PLUGIN_API tTransmissionGear @@ -14,5 +13,7 @@ struct PLUGIN_API tTransmissionGear float m_fChangeUpVelocity; float m_fChangeDownVelocity; }; - +VALIDATE_OFFSET(tTransmissionGear, m_fMaxVelocity, 0x0); +VALIDATE_OFFSET(tTransmissionGear, m_fChangeUpVelocity, 0x4); +VALIDATE_OFFSET(tTransmissionGear, m_fChangeDownVelocity, 0x8); VALIDATE_SIZE(tTransmissionGear, 0xC); \ No newline at end of file diff --git a/plugin_vc_unreal/game_vc_unreal/CRect.h b/plugin_vc_unreal/game_vc_unreal/CRect.h index f7a0df268..bb3f773df 100644 --- a/plugin_vc_unreal/game_vc_unreal/CRect.h +++ b/plugin_vc_unreal/game_vc_unreal/CRect.h @@ -83,3 +83,8 @@ class CRect { bottom += b; } }; +VALIDATE_OFFSET(CRect, left, 0x0); +VALIDATE_OFFSET(CRect, bottom, 0x4); +VALIDATE_OFFSET(CRect, right, 0x8); +VALIDATE_OFFSET(CRect, top, 0xC); +VALIDATE_SIZE(CRect, 0x10); diff --git a/shared/GameVersion.cpp b/shared/GameVersion.cpp index c1292c015..908480f54 100644 --- a/shared/GameVersion.cpp +++ b/shared/GameVersion.cpp @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto) source file + Plugin-SDK (Grand Theft Auto) SHARED source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/shared/GameVersion.h b/shared/GameVersion.h index d969bb3b4..8f31802ba 100644 --- a/shared/GameVersion.h +++ b/shared/GameVersion.h @@ -1,5 +1,5 @@ /* - Plugin-SDK (Grand Theft Auto) header file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/shared/GameVersionMessage.h b/shared/GameVersionMessage.h index e7104914d..29c1d829f 100644 --- a/shared/GameVersionMessage.h +++ b/shared/GameVersionMessage.h @@ -1,11 +1,10 @@ /* - Plugin-SDK (Grand Theft Auto) header file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once - #include "GameVersion.h" #include #include diff --git a/shared/Patch.h b/shared/Patch.h index e5ccca0a0..ed05e9815 100644 --- a/shared/Patch.h +++ b/shared/Patch.h @@ -4,7 +4,6 @@ https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #pragma once #include diff --git a/shared/TextLoader.cpp b/shared/TextLoader.cpp index ff0711c76..17b5ca54c 100644 --- a/shared/TextLoader.cpp +++ b/shared/TextLoader.cpp @@ -1,4 +1,4 @@ -/* +/* Plugin-SDK (Grand Theft Auto) SHARED source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk diff --git a/shared/Timer.cpp b/shared/Timer.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/shared/VersionsMacro.h b/shared/VersionsMacro.h index 2616c37bd..fac664a4c 100644 --- a/shared/VersionsMacro.h +++ b/shared/VersionsMacro.h @@ -1,7 +1,7 @@ /* Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here - https://github.com/GTAmodding/plugin-sdk + https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once diff --git a/shared/game/CRGBA.h b/shared/game/CRGBA.h index 11aaf1bc5..6e1df377e 100644 --- a/shared/game/CRGBA.h +++ b/shared/game/CRGBA.h @@ -67,4 +67,9 @@ class CRGBA { a = std::min(a + right.a, 255); } }; +VALIDATE_OFFSET(CRGBA, r, 0x0); +VALIDATE_OFFSET(CRGBA, g, 0x1); +VALIDATE_OFFSET(CRGBA, b, 0x2); +VALIDATE_OFFSET(CRGBA, a, 0x3); +VALIDATE_SIZE(CRGBA, 0x4); #endif diff --git a/shared/game/CVector.cpp b/shared/game/CVector.cpp index 33a4e28c7..cb183c017 100644 --- a/shared/game/CVector.cpp +++ b/shared/game/CVector.cpp @@ -1,10 +1,9 @@ /* - Plugin-SDK source file + Plugin-SDK (Grand Theft Auto) SHARED source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ - #include "CVector.h" #ifdef HAS_CMATRIX diff --git a/shared/game/CVector.h b/shared/game/CVector.h index 196095ac3..f17ef84e7 100644 --- a/shared/game/CVector.h +++ b/shared/game/CVector.h @@ -1,5 +1,5 @@ /* - Plugin-SDK header file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -14,6 +14,10 @@ { float x, y, z; }; + VALIDATE_OFFSET(RwV3d, x, 0x0); + VALIDATE_OFFSET(RwV3d, y, 0x4); + VALIDATE_OFFSET(RwV3d, z, 0x8); + VALIDATE_SIZE(RwV3d, 0xC); #endif #if defined GTA3 || defined GTAVC || defined GTASA diff --git a/shared/game/CVector2D.h b/shared/game/CVector2D.h index d4c1fe024..f6083f01d 100644 --- a/shared/game/CVector2D.h +++ b/shared/game/CVector2D.h @@ -1,5 +1,5 @@ /* - Plugin-SDK header file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! @@ -14,6 +14,9 @@ { float x, y; }; + VALIDATE_OFFSET(RwV2d, x, 0x0); + VALIDATE_OFFSET(RwV2d, y, 0x4); + VALIDATE_SIZE(RwV2d, 0x8); #endif struct CVector; diff --git a/shared/game/CVector2DImplementation.h b/shared/game/CVector2DImplementation.h index cdd586975..6efb82818 100644 --- a/shared/game/CVector2DImplementation.h +++ b/shared/game/CVector2DImplementation.h @@ -1,5 +1,5 @@ /* - Plugin-SDK source file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/shared/game/CVectorImplementation.h b/shared/game/CVectorImplementation.h index cf8d030c3..e5c137da9 100644 --- a/shared/game/CVectorImplementation.h +++ b/shared/game/CVectorImplementation.h @@ -1,5 +1,5 @@ /* - Plugin-SDK source file + Plugin-SDK (Grand Theft Auto) SHARED header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! diff --git a/shared/game/CompressedVector.h b/shared/game/CompressedVector.h index ca413fde4..32ae2d756 100644 --- a/shared/game/CompressedVector.h +++ b/shared/game/CompressedVector.h @@ -5,7 +5,6 @@ Do not delete this comment block. Respect others' work! */ #pragma once - #include "PluginBase.h" struct CVector; @@ -36,5 +35,7 @@ class PLUGIN_API CompressedVector { bool operator==(CompressedVector const &rhs) const; bool operator!=(CompressedVector const &rhs) const; }; - +VALIDATE_OFFSET(CompressedVector, x, 0x0); +VALIDATE_OFFSET(CompressedVector, y, 0x2); +VALIDATE_OFFSET(CompressedVector, z, 0x4); VALIDATE_SIZE(CompressedVector, 0x6); diff --git a/shared/game/CompressedVector2D.h b/shared/game/CompressedVector2D.h index f50b55519..120fb444a 100644 --- a/shared/game/CompressedVector2D.h +++ b/shared/game/CompressedVector2D.h @@ -48,5 +48,6 @@ class PLUGIN_API CompressedVector2D { bool operator==(CompressedVector2D const &rhs) const; bool operator!=(CompressedVector2D const &rhs) const; }; - +VALIDATE_OFFSET(CompressedVector2D, x, 0x0); +VALIDATE_OFFSET(CompressedVector2D, y, 0x2); VALIDATE_SIZE(CompressedVector2D, 0x4); diff --git a/shared/rpplugin.h b/shared/rpplugin.h index 6f70f09be..2c6de221f 100644 --- a/shared/rpplugin.h +++ b/shared/rpplugin.h @@ -1 +1,7 @@ +/* + Plugin-SDK (Grand Theft Auto) SHARED header file + Authors: GTA Community. See more here + https://github.com/DK22Pac/plugin-sdk + Do not delete this comment block. Respect others' work! +*/ #pragma once diff --git a/tools/run_code_verification.cmd b/tools/run_code_verification.cmd new file mode 100644 index 000000000..ecf679e05 --- /dev/null +++ b/tools/run_code_verification.cmd @@ -0,0 +1,12 @@ +@echo off + +where /q node.exe +if %ERRORLEVEL% equ 0 ( + cd ..\ + node.exe ".github/workflows/scripts/Validate_Contents.js" +) else ( + echo This tool requires Node.js JavaScript runtime environment. + echo Visit https://nodejs.org to download +) + +pause \ No newline at end of file