Minor edits to code and document

This commit is contained in:
NovaRain
2021-01-31 10:26:57 +08:00
parent 3ae0f0f87b
commit 4e200bc513
4 changed files with 4 additions and 6 deletions
+1 -2
View File
@@ -197,7 +197,7 @@ old:
end
> empty statements in blocks are allowed: This is just a convenience to save scripters a bit of memory. Some of the macros in the fallout headers include their own semicolons while others do not. With the original compiler you had to remember which was which, and if you got it wrong the script would not compile. Now it's always safe to include your own semicolon, even if the macro already had its own. For example, this would not compile with the original sslc, but will with the sfall edition:
> **Does not work currently** empty statements in blocks are allowed: This is just a convenience to save scripters a bit of memory. Some of the macros in the fallout headers include their own semicolons while others do not. With the original compiler you had to remember which was which, and if you got it wrong the script would not compile. Now it's always safe to include your own semicolon, even if the macro already had its own. For example, this would not compile with the original sslc, but will with the sfall edition:
#define my_macro diplay_msg("foo");
@@ -221,7 +221,6 @@ new:
callbackVar();
> *arrays: In vanilla fallout arrays had to be constructed by reserving a block of global/map variables. Since sfall 2.7, specific array targeted functions have been available, but they are fairly messy and long winded to use. The compiler provides additional syntactic shorthand for accessing and setting array variables, as well as for array creation. When declaring an array variable, put a constant integer in []'s to give the number of elements in the array. (before sfall 3.4 you had to specify size in bytes for array elements, now it's not required, see "arrays.txt" for more information)
new:
+1 -1
View File
@@ -3628,7 +3628,7 @@ void BugFixes_Init()
MakeCall(0x49CBF7, check_door_state_hack_close, 2);
MakeCall(0x49CB30, check_door_state_hack_open, 1);
// Fix the "Leave" event procedure of the window region not being triggered when the cursor moves to a non-scripted window
// Fix for the "Leave" event procedure of the window region not being triggered when the cursor moves to a non-scripted window
MakeJump(0x4B6C3B, checkAllRegions_hack);
HookCall(0x4B6C13, checkAllRegions_hook);
}
+1 -2
View File
@@ -1332,8 +1332,7 @@ static __forceinline void UpdateDDSurface(BYTE* surface, int width, int height,
}
}
class OverlaySurface
{
class OverlaySurface {
private:
long size;
long surfWidth;
+1 -1
View File
@@ -267,7 +267,7 @@ static void __declspec(naked) DrawingDots() {
}
}
static bool PrintHotspotText(long x, long y, bool backgroundCopy = false) {
static bool __stdcall PrintHotspotText(long x, long y, bool backgroundCopy = false) {
long area = *ptr_WorldMapCurrArea;
char* text = (area != -1 || !showTerrainType) ? (char*)Worldmap_GetCustomAreaTitle(area) : (char*)Worldmap_GetCurrentTerrainName();
if (!text) return false;