summaryrefslogtreecommitdiffhomepage
path: root/src/portalcolours.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-05-30 00:57:45 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-05-30 23:37:45 +0100
commit165aa899bc9d1ea0bebb7b08351582dfeff8bbde (patch)
tree4f966f7d4526224138b8c38bb57dcddae26029aa /src/portalcolours.h
parentdacb42286f41065c495b685a73ac6885dba3dcd8 (diff)
Add basic Portal crosshair colour customisation
Currently only works in 3420 and 5135 and uses hardcoded offsets with a byte pattern sanity check. Future work includes making it more widely compatible, and also doing the crazy thing I wanted to do but gave up on wherein the actual textures and stuff get patched in memory to sync up all the colours. Oh also, a couple of vtables were erroneously made executable, so I went ahead and fixed that while I was at it.
Diffstat (limited to 'src/portalcolours.h')
-rw-r--r--src/portalcolours.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/portalcolours.h b/src/portalcolours.h
new file mode 100644
index 0000000..2dd4bb5
--- /dev/null
+++ b/src/portalcolours.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright © 2022 Michael Smith <mikesmiffy128@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef INC_PORTALCOLOURS_H
+#define INC_PORTALCOLOURS_H
+
+#include <stdbool.h>
+
+bool portalcolours_init(void *clientlib);
+void portalcolours_end();
+
+#endif
+
+// vi: sw=4 ts=4 noet tw=80 cc=80