Skip to content

Commit

Permalink
Update for release v4.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
FakelsHub committed Apr 23, 2019
1 parent dcd5e50 commit 08214c0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
7 changes: 4 additions & 3 deletions artifacts/ddraw.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.1.6 - Extended version
;v4.1.7 - Extended version

[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
Expand Down Expand Up @@ -79,8 +79,9 @@ GraphicsHeight=0
GPUBlt=0

;Set to 1 to allow using 32-bit textures for talking heads
;Graphic files of textures .PNG format should be placed in the directory 'art\heads\<name>' with the corresponding name of the FRM head file (w/o extension)
;the folder should contain texture files and numbered according to the number of frames in the head FRM file (e.g. 0.png - 10.png)
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (w/o extension)
;The files in the folder should be numbered according to the number of frames in the talking head FRM file (e.g. 0.png, 1.png etc.)
;A detailed description, see the documentation files in modders pack
;Requires DX9 graphics mode 4 or 5, and v2.0 pixel shader support (see GPUBlt option)
Use32BitHeadGraphics=0

Expand Down
2 changes: 1 addition & 1 deletion artifacts/mods/gl_highlighting.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ procedure start begin
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");

checkObject := (alsoCorpse bwor alsoContainer);
checkObject := (alsoCorpse or alsoContainer);

register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
register_hook_proc(HOOK_COMBATTURN, CombatTurnHandler);
Expand Down
26 changes: 24 additions & 2 deletions sfall/Utils.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <algorithm>
#include <algorithm>
#include <iterator>

#include "Utils.h"

namespace sfall
namespace sfall
{

std::vector<std::string> split(const std::string &s, char delim) {
Expand All @@ -25,4 +25,26 @@ void ToLowerCase(std::string& line) {
std::transform(line.begin(), line.end(), line.begin(), ::tolower);
}

bool isSpace(char c) {
return (c == ' ' || c == '\t' /*|| c == '\n' || c == '\r'*/);
}

void strtrim(char* str) {
if (str[0] == 0) return;
int len = strlen(str) - 1;

int i = len;
while (len >= 0 && isSpace(str[len])) len--;
if (i != len) str[len + 1] = '\0'; // delete all right spaces

i = 0;
while (i < len && isSpace(str[i])) i++;
if (i > 0) {
int j = 0;
do {
str[j] = str[j + i]; // shift all chars(include null char) to left
} while (++j <= len);
}
}

}
4 changes: 4 additions & 0 deletions sfall/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ std::string trim(const std::string& str);

void ToLowerCase(std::string& line);

bool isSpace(char c);

void strtrim(char* str);

}

0 comments on commit 08214c0

Please sign in to comment.