From 165aa899bc9d1ea0bebb7b08351582dfeff8bbde Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 30 May 2022 00:57:45 +0100 Subject: 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. --- src/portalcolours.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/portalcolours.h (limited to 'src/portalcolours.h') 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 + * + * 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 + +bool portalcolours_init(void *clientlib); +void portalcolours_end(); + +#endif + +// vi: sw=4 ts=4 noet tw=80 cc=80 -- cgit v1.2.3