From: Freddy Date: Sun, 5 Jan 2020 21:22:17 +0000 (+0100) Subject: Only use lowercase filenames X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2a061fa758bc813b344b939fbb25681bfc946ec;p=xonotic%2Fxonotic-data.pk3dir.git Only use lowercase filenames Apparently Windows can cause problems with mixed case filenames --- diff --git a/qcsrc/menu/xonotic/_mod.inc b/qcsrc/menu/xonotic/_mod.inc index 30cdb9804..ab9211c5b 100644 --- a/qcsrc/menu/xonotic/_mod.inc +++ b/qcsrc/menu/xonotic/_mod.inc @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/qcsrc/menu/xonotic/_mod.qh b/qcsrc/menu/xonotic/_mod.qh index fd4897cd0..43363792e 100644 --- a/qcsrc/menu/xonotic/_mod.qh +++ b/qcsrc/menu/xonotic/_mod.qh @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qc deleted file mode 100644 index fa6ac23b8..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qc +++ /dev/null @@ -1,66 +0,0 @@ -#include "dialog_multiplayer_join_ToS.qh" - -#include "textbox.qh" -#include - - -entity makeXonoticServerToSTab() -{ - entity me; - me = NEW(XonoticServerToSTab); - me.configureDialog(me); - return me; -} - -void XonoticServerToSTab_loadToS(entity me, string downloadurl) -{ - url_single_fopen(downloadurl, FILE_READ, AdditionalServerInfo_OnGet, me); -} - -void XonoticServerToSTab_fill(entity me) -{ - entity e; - me.TR(me); - me.TD(me, me.rows, me.columns, e = makeXonoticTextBox()); - me.textBox = e; -} - -void AdditionalServerInfo_OnGet(entity fh, entity me, int status) -{ - switch (status) { - case URL_READY_CLOSED: - { - break; - } - case URL_READY_ERROR: - { - me.text = strzone("Error reading ToS"); - me.textBox.setText(me.textBox, me.text); - break; - } - case URL_READY_CANREAD: - { - strfree(me.text); - string temp = ""; - for (string s; (s = url_fgets(fh)); ) - { - if (temp != "") - { - temp = strcat(temp, "\n", s); - } - else - { - temp = s; - } - } - url_fclose(fh); - me.text = strzone(temp); - me.textBox.setText(me.textBox, me.text); - break; - } - default: - { - break; - } - } -} diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qh b/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qh deleted file mode 100644 index aa2d19fe9..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_ToS.qh +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "tab.qh" -CLASS(XonoticServerToSTab, XonoticTab) - METHOD(XonoticServerToSTab, fill, void(entity)); - METHOD(XonoticServerToSTab, loadToS, void(entity, string)); - ATTRIB(XonoticServerToSTab, title, string, _("Terms of Service")); - ATTRIB(XonoticServerToSTab, color, vector, SKINCOLOR_DIALOG_SERVERINFO); - ATTRIB(XonoticServerToSTab, intendedWidth, float, 0.8); - ATTRIB(XonoticServerToSTab, rows, float, 17); - ATTRIB(XonoticServerToSTab, columns, float, 6.2); - - ATTRIB(XonoticServerToSTab, text, string); - ATTRIB(XonoticServerToSTab, textBox, entity); -ENDCLASS(XonoticServerToSTab) -entity makeXonoticServerToSTab(); - -void AdditionalServerInfo_OnGet(entity fh, entity pass, int status); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc index 8ad716773..c2cad99fc 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc @@ -7,7 +7,7 @@ #include "textlabel.qh" #include "button.qh" #include "dialog_multiplayer_join_serverinfotab.qh" -#include "dialog_multiplayer_join_ToS.qh" +#include "dialog_multiplayer_join_termsofservice.qh" void XonoticServerInfoDialog_loadServerInfo(entity me, float i) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc new file mode 100644 index 000000000..8a26235fd --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc @@ -0,0 +1,66 @@ +#include "dialog_multiplayer_join_termsofservice.qh" + +#include "textbox.qh" +#include + + +entity makeXonoticServerToSTab() +{ + entity me; + me = NEW(XonoticServerToSTab); + me.configureDialog(me); + return me; +} + +void XonoticServerToSTab_loadToS(entity me, string downloadurl) +{ + url_single_fopen(downloadurl, FILE_READ, AdditionalServerInfo_OnGet, me); +} + +void XonoticServerToSTab_fill(entity me) +{ + entity e; + me.TR(me); + me.TD(me, me.rows, me.columns, e = makeXonoticTextBox()); + me.textBox = e; +} + +void AdditionalServerInfo_OnGet(entity fh, entity me, int status) +{ + switch (status) { + case URL_READY_CLOSED: + { + break; + } + case URL_READY_ERROR: + { + me.text = strzone("Error reading ToS"); + me.textBox.setText(me.textBox, me.text); + break; + } + case URL_READY_CANREAD: + { + strfree(me.text); + string temp = ""; + for (string s; (s = url_fgets(fh)); ) + { + if (temp != "") + { + temp = strcat(temp, "\n", s); + } + else + { + temp = s; + } + } + url_fclose(fh); + me.text = strzone(temp); + me.textBox.setText(me.textBox, me.text); + break; + } + default: + { + break; + } + } +} diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qh b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qh new file mode 100644 index 000000000..aa2d19fe9 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qh @@ -0,0 +1,18 @@ +#pragma once + +#include "tab.qh" +CLASS(XonoticServerToSTab, XonoticTab) + METHOD(XonoticServerToSTab, fill, void(entity)); + METHOD(XonoticServerToSTab, loadToS, void(entity, string)); + ATTRIB(XonoticServerToSTab, title, string, _("Terms of Service")); + ATTRIB(XonoticServerToSTab, color, vector, SKINCOLOR_DIALOG_SERVERINFO); + ATTRIB(XonoticServerToSTab, intendedWidth, float, 0.8); + ATTRIB(XonoticServerToSTab, rows, float, 17); + ATTRIB(XonoticServerToSTab, columns, float, 6.2); + + ATTRIB(XonoticServerToSTab, text, string); + ATTRIB(XonoticServerToSTab, textBox, entity); +ENDCLASS(XonoticServerToSTab) +entity makeXonoticServerToSTab(); + +void AdditionalServerInfo_OnGet(entity fh, entity pass, int status);