mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added .gitattributes with ssl syntax highlighting
Minor code edits to the built-in item highlighting function.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.ssl linguist-language=Pascal
|
||||
@@ -46,6 +46,8 @@ nb-configuration.xml
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
*.VC.db
|
||||
*.VC.opendb
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
@@ -429,7 +429,7 @@ void __fastcall SetSelfObject(fo::Program* script, fo::GameObject* obj) {
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////// BUILT-IN ITEM HIGHLIGHT ////////////////////////////
|
||||
////////////////////////// BUILT-IN ITEM HIGHLIGHTING //////////////////////////
|
||||
|
||||
static void __declspec(naked) obj_outline_all_items_on() {
|
||||
using namespace fo;
|
||||
@@ -782,8 +782,8 @@ void RunGlobalScriptsOnMainLoop() {
|
||||
if (scanner) {
|
||||
if (!(motionScanner & 2)) {
|
||||
highlightingToggled = fo::func::item_m_dec_charges(scanner) + 1;
|
||||
fo::func::intface_redraw();
|
||||
if (!highlightingToggled) fo::func::display_print(highlightFail2);
|
||||
else fo::func::intface_redraw();
|
||||
} else {
|
||||
highlightingToggled = 1;
|
||||
}
|
||||
@@ -1161,8 +1161,11 @@ void ScriptExtender::init() {
|
||||
motionScanner = IniReader::GetConfigInt("Misc", "MotionScannerFlags", 1);
|
||||
Translate::Get("Sfall", "HighlightFail1", "You aren't carrying a motion sensor.", highlightFail1);
|
||||
Translate::Get("Sfall", "HighlightFail2", "Your motion sensor is out of charge.", highlightFail2);
|
||||
HookCall(0x44BD1C, obj_remove_outline_hook); // gmouse_bk_process_
|
||||
HookCall(0x44E559, obj_remove_outline_hook); // gmouse_remove_item_outline_
|
||||
const DWORD objRemoveOutlineAddr[] = {
|
||||
0x44BD1C, // gmouse_bk_process_
|
||||
0x44E559 // gmouse_remove_item_outline_
|
||||
};
|
||||
HookCalls(obj_remove_outline_hook, objRemoveOutlineAddr);
|
||||
}
|
||||
|
||||
alwaysFindScripts = isDebug && (IniReader::GetIntDefaultConfig("Debugging", "AlwaysFindScripts", 0) != 0);
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ bool isSpace(char c) {
|
||||
const char* strfind(const char* source, const char* word) {
|
||||
if (source == 0 || word == 0 || *word == 0) return 0;
|
||||
const char *w_pos, *s_pos;
|
||||
while(*source != 0) {
|
||||
while (*source != 0) {
|
||||
w_pos = word, s_pos = source++;
|
||||
while (tolower(*s_pos) == *w_pos) {
|
||||
s_pos++;
|
||||
|
||||
Reference in New Issue
Block a user