Lua: Fix type confusion between signed and unsigned
[lsnes.git] / include / library / fileimage-patch.hpp
blobadc778cf3dce09880f56c4b8edf84f8542fc5240
1 #ifndef _library__fileimage_patch__hpp__included__
2 #define _library__fileimage_patch__hpp__included__
4 #include <vector>
5 #include <string>
6 #include <cstdint>
7 #include <cstdlib>
8 #include <stdexcept>
10 namespace fileimage
12 std::vector<char> patch(const std::vector<char>& original, const std::vector<char>& patch,
13 int32_t offset) throw(std::bad_alloc, std::runtime_error);
15 /**
16 * ROM patcher.
18 struct patcher
20 /**
21 * Constructor.
23 patcher() throw(std::bad_alloc);
24 /**
25 * Destructor.
27 virtual ~patcher() throw();
28 /**
29 * Identify patch.
31 * Parameter patch: The patch.
32 * Returns: True if my format, false if not.
34 virtual bool identify(const std::vector<char>& patch) throw() = 0;
35 /**
36 * Do the patch.
38 virtual void dopatch(std::vector<char>& out, const std::vector<char>& original,
39 const std::vector<char>& patch, int32_t offset) throw(std::bad_alloc, std::runtime_error) = 0;
43 #endif