aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-04-12 16:48:02 +0100
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-04-12 16:48:49 +0100
commit9d9d9f3826496d08f779936368755e01781a3aac (patch)
tree5916fd8aff13b662f0a95cacf72a733be5b27a0b
parentac876ed2ef1c12f58b3426ffb3cb9d405428c12c (diff)
downloadsst-9d9d9f3826496d08f779936368755e01781a3aac.tar.gz
sst-9d9d9f3826496d08f779936368755e01781a3aac.zip
Update info in the readme and a few comments
-rw-r--r--README32
-rw-r--r--src/fastfwd.h2
-rw-r--r--src/langext.h2
-rw-r--r--src/x86.c2
-rw-r--r--src/x86.h2
5 files changed, 23 insertions, 17 deletions
diff --git a/README b/README
index 9669078..df7aac0 100644
--- a/README
+++ b/README
@@ -10,7 +10,10 @@ Windows:
• Install the Windows 10 SDK and MSVC toolset via the Visual Studio Installer
(if you don’t care what else gets installed, installing the C++ Desktop
workload should be fine).
- • Install native Clang from https://clang.llvm.org (NOT MinGW/MSYS2 Clang!).
+ • Install native Clang from the LLVM GitHub releases page. (NOT MinGW/MSYS2
+ Clang!). C23 support is required; at the time of writing Clang 16 worked, but
+ Clang 20 is being used now. If you get syntax errors or unexpected keywords
+ or something, your compiler is probably too old.
• Run compile.bat (in lieu of a better build tool, to be added later).
Linux:
@@ -22,9 +25,10 @@ Linux:
they’re not already installed.
• Run ./compile (in lieu of a better build tool, to be added later).
-NOTE: Linux code should compile now but still crashes on cvar registration and
-almost none of the features usefully work. In other words, it needs quite a lot
-more development before it's of use to anyone.
+NOTE: Linux code should maybe compile now but still crashes on cvar registration
+and almost none of the features usefully work. In other words, it needs quite a
+lot more development before it's of use to anyone. It's also not actively tested
+really so don't be surprised if it doesn't compile at all again at some point.
════ How and where to install ════
@@ -41,15 +45,17 @@ left4dead2/, hl2/. Left 4 Dead and later branches *ALSO* try to load from the
top-level game directory where the EXE is, if other paths don’t work.
Since this plugin is designed to be universal, a reasonable recommendation is to
-always put it in bin/ and then use the command `plugin_load ../bin/sst`. The way
-the paths work out, that always works no matter what, thus taking all the
-thought out of it. It’s also a sensible way to share the plugin between multiple
-mods in an engine installation, where relevant.
-
-It’s additionally possible to back out of the game installation with `../../`
-etcetera and load from anywhere you want, as long as it’s not on a different
-Windows drive letter. This is especially handy if you’re building from source
-and don’t want to copy it over every time.
+make a directory for SST in the top-level engine directory and do for instance
+`plugin_load ../SST/sst`. The way the paths work out, that always works no
+matter what, and also avoids cluttering up your game files.
+
+When actively developing the plugin, it's possible to back out of the game
+installation with `../../` etcetera and load from anywhere you want, as long as
+it’s not on a different Windows drive letter. This is essentially the best way
+to work with SST built from source as it avoids the need to copy it to different
+games. The way the build scripts are written, you can rebuild the plugin
+in-place before reloading it from the game console. It can be helpful to write
+some console aliases or set up a bind to reload the plugin quickly on-the-fly.
Note: some very old (and very new) Source builds don’t have a plugin_load
command. For the time being, these versions are unsupported.
diff --git a/src/fastfwd.h b/src/fastfwd.h
index 6313e0c..e76c92c 100644
--- a/src/fastfwd.h
+++ b/src/fastfwd.h
@@ -20,7 +20,7 @@
/*
* Fast-forwards in-game time by a number of seconds, ignoring the usual
* host_framerate and host_timescale settings. timescale controls how many
- * seconds of game pass per real-time second.
+ * seconds of game time pass per real-time second.
*/
void fastfwd(float seconds, float timescale);
diff --git a/src/langext.h b/src/langext.h
index 0a17cb2..de96ef5 100644
--- a/src/langext.h
+++ b/src/langext.h
@@ -26,7 +26,7 @@
#define assume(x) ((void)(__assume(x), 0))
#define cold __declspec(noinline)
#else
-static inline _Noreturn void _invoke_ub(void) {}
+static inline _Noreturn void _invoke_ub() {}
#define unreachable (_invoke_ub())
#define assume(x) ((void)(!!(x) || (_invoke_ub(), 0)))
#define cold
diff --git a/src/x86.c b/src/x86.c
index 5bd9e4c..b017a70 100644
--- a/src/x86.c
+++ b/src/x86.c
@@ -18,7 +18,7 @@
#include "x86.h"
static int mrmsib(const uchar *p, int addrlen) {
- // I won't lie: I thought I almost understood this, but after Bill walked me
+ // I won't lie: I thought I almost understood this, but after bill walked me
// through correcting a bunch of wrong cases I now realise that I don't
// really understand it at all. If it helps, I used this as a reference:
// https://github.com/Nomade040/length-disassembler/blob/e8b34546/ldisasm.cpp#L14
diff --git a/src/x86.h b/src/x86.h
index 04418d6..92e4ccb 100644
--- a/src/x86.h
+++ b/src/x86.h
@@ -558,7 +558,7 @@ enum {
* Returns the length of an instruction, or -1 if it's a "known unknown" or
* invalid instruction. Doesn't handle unknown unknowns: may explode or hang on
* arbitrary untrusted data. Also doesn't handle, among other things, 3DNow!,
- * SSE, MMX, AVX, and such. Aims to be small and fast rather than comprehensive.
+ * SSE3+, MMX, AVX, and such. Aims to be small and fast, not comprehensive.
*/
int x86_len(const void *insn);