Streamlined Development and Enhanced Customization: Updates to .gitignore, and Keyboard Controls in Chat (#17)

* Ignore Visual Studio Stuff

* Added a few scripts for development

* Improved the development scripts

* Added option to choose between 2 different keyboard control variants in the chat

* Improved and added new batch scripts for development purposes

* Hotfix

* Converted the .BAT-Scripts to .SH-Scripts and moved them to the "development" folder and fixed a bug in the already existing "compile.sh" file

* Fixed some stuff

* Removed 7 .sh-scripts
This commit is contained in:
iZePlayzYT 2024-04-23 01:32:28 +02:00 committed by GitHub
parent 7561b375fa
commit 12e8312eda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 42 additions and 14 deletions

1
.gitignore vendored
View File

@ -90,3 +90,4 @@ todo.txt
todo-old.txt todo-old.txt
tools/ido5.3_compiler/usr/lib/libc.so.1 tools/ido5.3_compiler/usr/lib/libc.so.1
/.vs

View File

@ -8,9 +8,9 @@ else
fi fi
# find file # find file
FILE=./build/us_pc/sm64.us.f3dex2e.exe FILE=./build/us_pc/sm64coopdx.exe
if [ ! -f "$FILE" ]; then if [ ! -f "$FILE" ]; then
FILE=./build/us_pc/sm64.us.f3dex2e FILE=./build/us_pc/sm64coopdx
fi fi
$FILE & $FILE &

View File

@ -0,0 +1,3 @@
#!/bin/bash
cmd //C "taskkill /F /T /IM sm64coopdx.exe"
cd ..; make -j; if [ $? -ne 0 ]; then echo ' '; echo ' '; echo '----------------------------------------'; echo '[BUILDING/COMPILING FAILED]'; echo '----------------------------------------'; echo ' '; else echo ' '; echo ' '; echo '++++++++++++++++++++++++++++++++++++++++'; echo '[BUILDING/COMPILING SUCCESSFUL]'; echo '++++++++++++++++++++++++++++++++++++++++'; echo ' '; start build/us_pc/sm64coopdx.exe --console --server 7777; fi; read -p 'Press [Enter] to close...'

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
MISC_TITLE = "JINE" MISC_TITLE = "JINE"
PAUSE_IN_SINGLEPLAYER = "Pauza v hře s jedním hráčem" PAUSE_IN_SINGLEPLAYER = "Pauza v hře s jedním hráčem"
DISABLE_POPUPS = "Vypnout vyskakovací okna" DISABLE_POPUPS = "Vypnout vyskakovací okna"
USE_STANDARD_KEY_BINDINGS_CHAT = "Použij standardní ovládání klávesnice pro chat"
MENU_OPTIONS = "Nastavení hlavního menu" MENU_OPTIONS = "Nastavení hlavního menu"
INFORMATION = "Informace" INFORMATION = "Informace"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
MISC_TITLE = "MISC" MISC_TITLE = "MISC"
PAUSE_IN_SINGLEPLAYER = "Pauzeer in een speler" PAUSE_IN_SINGLEPLAYER = "Pauzeer in een speler"
DISABLE_POPUPS = "Popups uitzetten" DISABLE_POPUPS = "Popups uitzetten"
USE_STANDARD_KEY_BINDINGS_CHAT = "Gebruik standaard toetsenbordbediening voor chat"
MENU_OPTIONS = "Menu Instellingen" MENU_OPTIONS = "Menu Instellingen"
INFORMATION = "Informatie" INFORMATION = "Informatie"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
MISC_TITLE = "MISC" MISC_TITLE = "MISC"
PAUSE_IN_SINGLEPLAYER = "Pause In Singleplayer" PAUSE_IN_SINGLEPLAYER = "Pause In Singleplayer"
DISABLE_POPUPS = "Disable Popups" DISABLE_POPUPS = "Disable Popups"
USE_STANDARD_KEY_BINDINGS_CHAT = "Use Standard Keyboard Controls for Chat"
MENU_OPTIONS = "Menu Options" MENU_OPTIONS = "Menu Options"
INFORMATION = "Info" INFORMATION = "Info"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Erreurs de Débogage"
MISC_TITLE = "AUTRES" MISC_TITLE = "AUTRES"
PAUSE_IN_SINGLEPLAYER = "Pause en Solo" PAUSE_IN_SINGLEPLAYER = "Pause en Solo"
DISABLE_POPUPS = "Désactiver les Pop-ups" DISABLE_POPUPS = "Désactiver les Pop-ups"
USE_STANDARD_KEY_BINDINGS_CHAT = "Utiliser les contrôles clavier standards pour le chat"
MENU_OPTIONS = "Options du menu" MENU_OPTIONS = "Options du menu"
INFORMATION = "Information" INFORMATION = "Information"
DEBUG = "Débogage" DEBUG = "Débogage"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Fehler"
MISC_TITLE = "SONSTIGES" MISC_TITLE = "SONSTIGES"
PAUSE_IN_SINGLEPLAYER = "Pause im Einzelspieler" PAUSE_IN_SINGLEPLAYER = "Pause im Einzelspieler"
DISABLE_POPUPS = "Pop-ups deaktivieren" DISABLE_POPUPS = "Pop-ups deaktivieren"
USE_STANDARD_KEY_BINDINGS_CHAT = "Standard-Tastatursteuerungen für Chat verwenden"
MENU_OPTIONS = "Menüoptionen" MENU_OPTIONS = "Menüoptionen"
INFORMATION = "Information" INFORMATION = "Information"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -257,6 +257,7 @@ DEBUG_ERRORS = "Errori di debug"
MISC_TITLE = "VARIE" MISC_TITLE = "VARIE"
PAUSE_IN_SINGLEPLAYER = "Metti in pausa in giocatore singolo" PAUSE_IN_SINGLEPLAYER = "Metti in pausa in giocatore singolo"
DISABLE_POPUPS = "Disabilita Popups" DISABLE_POPUPS = "Disabilita Popups"
USE_STANDARD_KEY_BINDINGS_CHAT = "Usa i controlli standard della tastiera per la chat"
MENU_OPTIONS = "Opzioni Menù" MENU_OPTIONS = "Opzioni Menù"
INFORMATION = "Informazione" INFORMATION = "Informazione"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Bledy Debugowania"
MISC_TITLE = "ROZNE" MISC_TITLE = "ROZNE"
PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza" PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza"
DISABLE_POPUPS = "Wylacz Popupy" DISABLE_POPUPS = "Wylacz Popupy"
USE_STANDARD_KEY_BINDINGS_CHAT = "Użyj standardowych ustawień klawiatury dla czatu"
MENU_OPTIONS = "Opcje Menu" MENU_OPTIONS = "Opcje Menu"
INFORMATION = "Info" INFORMATION = "Info"
DEBUG = "Debugowanie" DEBUG = "Debugowanie"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Erros debug"
MISC_TITLE = "MAIS" MISC_TITLE = "MAIS"
PAUSE_IN_SINGLEPLAYER = "Pausa com jogador único" PAUSE_IN_SINGLEPLAYER = "Pausa com jogador único"
DISABLE_POPUPS = "Desativar popups" DISABLE_POPUPS = "Desativar popups"
USE_STANDARD_KEY_BINDINGS_CHAT = "Usar controles padrão do teclado para chat"
MENU_OPTIONS = "Opções de menu" MENU_OPTIONS = "Opções de menu"
INFORMATION = "Informação" INFORMATION = "Informação"
DEBUG = "Debug" DEBUG = "Debug"

View File

@ -258,6 +258,7 @@ DEBUG_ERRORS = "Ошибки отладки"
MISC_TITLE = "MISC" MISC_TITLE = "MISC"
PAUSE_IN_SINGLEPLAYER = "Пауза в одиночной игре" PAUSE_IN_SINGLEPLAYER = "Пауза в одиночной игре"
DISABLE_POPUPS = "Отключить всплывающие окна" DISABLE_POPUPS = "Отключить всплывающие окна"
USE_STANDARD_KEY_BINDINGS_CHAT = "Использовать стандартные управления клавиатурой для чата"
MENU_OPTIONS = "Параметры меню" MENU_OPTIONS = "Параметры меню"
INFORMATION = "Информация" INFORMATION = "Информация"
DEBUG = "Отладка" DEBUG = "Отладка"

View File

@ -259,6 +259,7 @@ DEBUG_ERRORS = "Errores de Depuración"
MISC_TITLE = "OTROS" MISC_TITLE = "OTROS"
PAUSE_IN_SINGLEPLAYER = "Pausa en modo de un jugador" PAUSE_IN_SINGLEPLAYER = "Pausa en modo de un jugador"
DISABLE_POPUPS = "Deshabilitar mensajes emergentes" DISABLE_POPUPS = "Deshabilitar mensajes emergentes"
USE_STANDARD_KEY_BINDINGS_CHAT = "Usar controles estándar del teclado para chat"
MENU_OPTIONS = "Opciones del menú" MENU_OPTIONS = "Opciones del menú"
INFORMATION = "Información" INFORMATION = "Información"
DEBUG = "Depuración" DEBUG = "Depuración"

View File

@ -144,6 +144,7 @@ bool configUncappedFramerate = false;
unsigned int configFrameLimit = 144; unsigned int configFrameLimit = 144;
unsigned int configDrawDistance = 4; unsigned int configDrawDistance = 4;
bool configDisablePopups = false; bool configDisablePopups = false;
bool configUseStandardKeyBindingsChat = false;
bool configLuaProfiler = false; bool configLuaProfiler = false;
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
bool configCtxProfiler = false; bool configCtxProfiler = false;
@ -265,6 +266,7 @@ static const struct ConfigOption options[] = {
{.name = "coop_stay_in_level_after_star", .type = CONFIG_TYPE_UINT , .uintValue = &configStayInLevelAfterStar}, {.name = "coop_stay_in_level_after_star", .type = CONFIG_TYPE_UINT , .uintValue = &configStayInLevelAfterStar},
{.name = "coop_global_player_models", .type = CONFIG_TYPE_BOOL , .boolValue = &configGlobalPlayerModels}, {.name = "coop_global_player_models", .type = CONFIG_TYPE_BOOL , .boolValue = &configGlobalPlayerModels},
{.name = "disable_popups", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisablePopups}, {.name = "disable_popups", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisablePopups},
{.name = "use_standard_key_bindings_chat", .type = CONFIG_TYPE_BOOL , .boolValue = &configUseStandardKeyBindingsChat},
{.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler}, {.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler},
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
{.name = "ctx_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configCtxProfiler}, {.name = "ctx_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configCtxProfiler},

View File

@ -103,6 +103,7 @@ extern bool configUncappedFramerate;
extern unsigned int configFrameLimit; extern unsigned int configFrameLimit;
extern unsigned int configDrawDistance; extern unsigned int configDrawDistance;
extern bool configDisablePopups; extern bool configDisablePopups;
extern bool configUseStandardKeyBindingsChat;
extern bool configLuaProfiler; extern bool configLuaProfiler;
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
extern bool configCtxProfiler; extern bool configCtxProfiler;

View File

@ -4,6 +4,7 @@
#include "pc/network/network.h" #include "pc/network/network.h"
#include "pc/lua/smlua_hooks.h" #include "pc/lua/smlua_hooks.h"
#include "pc/chat_commands.h" #include "pc/chat_commands.h"
#include "pc/configfile.h"
#include "djui.h" #include "djui.h"
struct DjuiChatBox* gDjuiChatBox = NULL; struct DjuiChatBox* gDjuiChatBox = NULL;
@ -51,7 +52,8 @@ void sent_history_init(ArrayList *arrayList) {
} }
void sent_history_add_message(ArrayList *arrayList, const char *newMessage) { void sent_history_add_message(ArrayList *arrayList, const char *newMessage) {
if (!newMessage || newMessage[0] != '/') { return; } if (!configUseStandardKeyBindingsChat && (!newMessage || newMessage[0] != '/')) { return; }
if (arrayList->size == MAX_HISTORY_SIZE) { if (arrayList->size == MAX_HISTORY_SIZE) {
for (s32 i = 1; i < MAX_HISTORY_SIZE; i++) { for (s32 i = 1; i < MAX_HISTORY_SIZE; i++) {
snprintf(arrayList->messages[i-1], MAX_MSG_LENGTH, "%s", arrayList->messages[i]); snprintf(arrayList->messages[i-1], MAX_MSG_LENGTH, "%s", arrayList->messages[i]);
@ -127,7 +129,7 @@ static void djui_chat_box_input_enter(struct DjuiInputbox* chatInput) {
if (strlen(chatInput->buffer) != 0) { if (strlen(chatInput->buffer) != 0) {
sent_history_add_message(&sentHistory, chatInput->buffer); sent_history_add_message(&sentHistory, chatInput->buffer);
if (chatInput->buffer[0] == '/') { if (chatInput->buffer[0] == '/') {
if (strcmp(chatInput->buffer, "/help") == 0 || strcmp(chatInput->buffer, "/?") == 0 || strcmp(chatInput->buffer, "/") == 0) { if (strcmp(chatInput->buffer, "/help") == 0 || strcmp(chatInput->buffer, "/?") == 0 || (!configUseStandardKeyBindingsChat && strcmp(chatInput->buffer, "/")) == 0) {
display_chat_commands(); display_chat_commands();
} else if (!exec_chat_command(chatInput->buffer)) { } else if (!exec_chat_command(chatInput->buffer)) {
char extendedUnknownCommandMessage[MAX_MSG_LENGTH]; char extendedUnknownCommandMessage[MAX_MSG_LENGTH];
@ -417,36 +419,44 @@ static bool djui_chat_box_input_on_key_down(struct DjuiBase* base, int scancode)
switch (scancode) { switch (scancode) {
case SCANCODE_UP: case SCANCODE_UP:
if (gDjuiChatBox->chatInput && gDjuiChatBox->chatInput->buffer && gDjuiChatBox->chatInput->buffer[0] != '/') { if (!configUseStandardKeyBindingsChat && (gDjuiChatBox->chatInput && gDjuiChatBox->chatInput->buffer && gDjuiChatBox->chatInput->buffer[0] != '/')) {
gDjuiChatBox->scrolling = true; gDjuiChatBox->scrolling = true;
if (canScrollDown) { *yValue = fmin(*yValue + 15, 0); } if (canScrollDown) { *yValue = fmin(*yValue + 15, 0); }
} else { } else {
sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer); sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer);
sent_history_navigate(&sentHistory, true); sent_history_navigate(&sentHistory, true);
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { reset_tab_completion_all(); }
reset_tab_completion_all();
}
} }
return true; return true;
case SCANCODE_DOWN: case SCANCODE_DOWN:
if (gDjuiChatBox->chatInput && gDjuiChatBox->chatInput->buffer && gDjuiChatBox->chatInput->buffer[0] != '/') { if (!configUseStandardKeyBindingsChat && (gDjuiChatBox->chatInput && gDjuiChatBox->chatInput->buffer && gDjuiChatBox->chatInput->buffer[0] != '/')) {
gDjuiChatBox->scrolling = true; gDjuiChatBox->scrolling = true;
if (canScrollUp) { *yValue = fmax(*yValue - 15, yMax); } if (canScrollUp) { *yValue = fmax(*yValue - 15, yMax); }
} else { } else {
sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer); sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer);
sent_history_navigate(&sentHistory, false); sent_history_navigate(&sentHistory, false);
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { reset_tab_completion_all(); }
reset_tab_completion_all();
}
} }
return true; return true;
case SCANCODE_PAGE_UP: case SCANCODE_PAGE_UP:
gDjuiChatBox->scrolling = true; gDjuiChatBox->scrolling = true;
if (canScrollDown) { *yValue = fmin(*yValue + pageAmount, 0); } if (canScrollDown) {
if (configUseStandardKeyBindingsChat) {
*yValue = fmin(*yValue + 15, 0);
} else {
*yValue = fmin(*yValue + pageAmount, 0);
}
}
return true; return true;
case SCANCODE_PAGE_DOWN: case SCANCODE_PAGE_DOWN:
gDjuiChatBox->scrolling = true; gDjuiChatBox->scrolling = true;
if (canScrollUp) { *yValue = fmax(*yValue - pageAmount, yMax); } if (canScrollUp) {
if (configUseStandardKeyBindingsChat) {
*yValue = fmax(*yValue - 15, yMax);
} else {
*yValue = fmax(*yValue - pageAmount, yMax);
}
}
return true; return true;
case SCANCODE_POS1: case SCANCODE_POS1:
gDjuiChatBox->scrolling = true; gDjuiChatBox->scrolling = true;

View File

@ -66,6 +66,7 @@ void djui_panel_misc_create(struct DjuiBase* caller) {
{ {
djui_checkbox_create(body, DLANG(MISC, DISABLE_POPUPS), &configDisablePopups, NULL); djui_checkbox_create(body, DLANG(MISC, DISABLE_POPUPS), &configDisablePopups, NULL);
djui_checkbox_create(body, DLANG(MISC, USE_STANDARD_KEY_BINDINGS_CHAT), &configUseStandardKeyBindingsChat, NULL);
#ifndef DEVELOPMENT #ifndef DEVELOPMENT
djui_checkbox_create(body, DLANG(MISC, LUA_PROFILER), &configLuaProfiler, NULL); djui_checkbox_create(body, DLANG(MISC, LUA_PROFILER), &configLuaProfiler, NULL);
#endif #endif