ppsspp/Core/HLE/ReplaceTables.h
Henrik Rydgard 2140892074 Initial preparations for ability to replace game functions with custom implementations.
Also auto-saves hashmap additions and reapplies the hashmap on function
rename so that if you rename a function that exists in several copies
they will all be labelled.

Note that actual function replacement is not activated yet.
2013-12-17 12:27:20 +01:00

36 lines
1.1 KiB
C

// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#pragma once
#include "Common/CommonTypes.h"
typedef void (* ReplaceFunc)();
// Kind of similar to HLE functions but with different data.
struct ReplacementTableEntry {
u32 hash;
int size;
const char *name;
ReplaceFunc replaceFunc;
int cyclesToEat;
};
int GetNumReplacementFuncs();
int GetReplacementFuncIndex(u64 hash, int size);
const ReplacementTableEntry *GetReplacementFunc(int index);