Added .gitattributes with ssl syntax highlighting

Minor code edits to the built-in item highlighting function.
This commit is contained in:
NovaRain
2022-03-11 20:32:55 +08:00
parent 7cc25efb01
commit 8d6e6874ee
4 changed files with 11 additions and 5 deletions
+1
View File
@@ -0,0 +1 @@
*.ssl linguist-language=Pascal
+2
View File
@@ -46,6 +46,8 @@ nb-configuration.xml
*.user
*.userosscache
*.sln.docstates
*.VC.db
*.VC.opendb
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+7 -4
View File
@@ -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
View File
@@ -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++;