summaryrefslogtreecommitdiffstats
path: root/src/patcher.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-15 16:52:37 +0200
committeraap <aap@papnet.eu>2019-05-15 16:52:37 +0200
commit600bf0351476a5a21aabb5429132ddf7f52ac0b9 (patch)
treed8e48b3a581679e33830fb7c98ed69e1e242e2c2 /src/patcher.cpp
downloadre3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.gz
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.bz2
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.lz
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.xz
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.zst
re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.zip
Diffstat (limited to 'src/patcher.cpp')
-rw-r--r--src/patcher.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/patcher.cpp b/src/patcher.cpp
new file mode 100644
index 00000000..5fdbdf8b
--- /dev/null
+++ b/src/patcher.cpp
@@ -0,0 +1,22 @@
+#include "common.h"
+#include "patcher.h"
+
+StaticPatcher *StaticPatcher::ms_head;
+
+StaticPatcher::StaticPatcher(Patcher func)
+ : m_func(func)
+{
+ m_next = ms_head;
+ ms_head = this;
+}
+
+void
+StaticPatcher::Apply()
+{
+ StaticPatcher *current = ms_head;
+ while(current){
+ current->Run();
+ current = current->m_next;
+ }
+ ms_head = nil;
+}