Skip to content

Commit 9806ad0

Browse files
committed
Merge branch 'master' of https://github.com/sfall-team/sfall into better-docs
2 parents 5abf44e + 2db7492 commit 9806ad0

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
shell: bash
5656

5757
- name: Upload artifacts
58-
uses: actions/upload-artifact@v6
58+
uses: actions/upload-artifact@v7
5959
with:
6060
name: sfall-build
6161
path: sfall-build

artifacts/scripting/headers/define_extra.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@
475475
#define OBJ_DATA_DAMAGE_FLAGS (0x44)
476476
#define OBJ_DATA_DAMAGE_LAST_TURN (0x48)
477477
#define OBJ_DATA_WHO_HIT_ME (0x54) // current target of the critter
478+
#define OBJ_DATA_CRITTER_HP (0x58)
478479

479480
// compute attack result data offsets
480481
#define C_ATTACK_SOURCE (0x00)

sfall/FalloutEngine/Functions_def.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ WRAP_WATCOM_FUNC2(fo::DbFile*, db_fopen, const char*, path, const char*, mode)
307307
WRAP_WATCOM_FUNC3(char*, db_fgets, char*, buf, long, max_count, fo::DbFile*, file)
308308
WRAP_WATCOM_FFUNC4(long, db_fread, void*, buf, long, elsize, long, count, fo::DbFile*, file)
309309
WRAP_WATCOM_FFUNC3(long, db_fseek, fo::DbFile*, file, long, pos, long, origin)
310-
WRAP_WATCOM_FUNC2(void, db_free_file_list, char***, fileList, DWORD, arg2) // Destroys filelist array created by db_get_file_list
310+
WRAP_WATCOM_FUNC2(void, db_free_file_list, char const***, fileList, DWORD, arg2) // Destroys filelist array created by db_get_file_list
311311
WRAP_WATCOM_FUNC2(long, db_freadByte, fo::DbFile*, file, BYTE*, _out)
312312
WRAP_WATCOM_FUNC2(long, db_freadShort, fo::DbFile*, file, WORD*, _out)
313313
WRAP_WATCOM_FUNC2(long, db_freadInt, fo::DbFile*, file, DWORD*, _out)
@@ -322,7 +322,7 @@ WRAP_WATCOM_FFUNC3(long, db_fwriteByteCount, fo::DbFile*, file, const BYTE*, cpt
322322
WRAP_WATCOM_FUNC2(long, db_dir_entry, const char*, fileName, DWORD*, sizeOut) // Check fallout file and get file size (result 0 - file exists)
323323
// Searches files in DB by given path/filename mask and stores result in fileList
324324
// fileList is a pointer to a variable, that will be assigned with an address of an array of char* strings
325-
WRAP_WATCOM_FUNC2(long, db_get_file_list, const char*, searchMask, char***, fileList) // Returns number of elements in *fileList
325+
WRAP_WATCOM_FUNC2(long, db_get_file_list, const char*, searchMask, char const***, fileList) // Returns number of elements in *fileList
326326
WRAP_WATCOM_FUNC1(void*, dbase_open, const char*, fileName)
327327
WRAP_WATCOM_FUNC1(void, dbase_close, void*, dbPtr)
328328

sfall/Modules/ScriptExtender.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,13 +538,14 @@ static void InitGlobalScripts() {
538538

539539
static void PrepareGlobalScriptsListByMask() {
540540
globalScriptFilesList.clear();
541-
for (auto& fileMask : globalScriptPathList) {
542-
char** filenames;
541+
for (const std::string fileMask : globalScriptPathList) {
542+
char const** filenames;
543543
auto basePath = fileMask.substr(0, fileMask.find_last_of("\\/") + 1); // path to scripts without mask
544544
int count = fo::func::db_get_file_list(fileMask.c_str(), &filenames);
545545

546546
for (int i = 0; i < count; i++) {
547-
char* name = _strlwr(filenames[i]); // name of the script in lower case
547+
std::string name(filenames[i]);
548+
ToLowerCase(name);
548549
if (name[0] != 'g' || name[1] != 'l') continue; // fix bug in db_get_file_list fuction (if the script name begins with a non-Latin character)
549550

550551
std::string baseName(name);
@@ -553,7 +554,7 @@ static void PrepareGlobalScriptsListByMask() {
553554

554555
baseName = baseName.substr(0, lastDot); // script name without extension
555556
if (basePath != fo::var::script_path_base || !IsGameScript(baseName.c_str())) {
556-
dlog_f("Found global script: %s\n", DL_SCRIPT, name);
557+
dlog_f("Found global script: %s\n", DL_SCRIPT, name.c_str());
557558
std::string fullPath(basePath);
558559
fullPath += name;
559560
// prevent loading global scripts with the same name from different directories

0 commit comments

Comments
 (0)