mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-23 04:25:11 +00:00
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:
parent
7561b375fa
commit
12e8312eda
17 changed files with 42 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -90,3 +90,4 @@ todo.txt
|
|||
todo-old.txt
|
||||
|
||||
tools/ido5.3_compiler/usr/lib/libc.so.1
|
||||
/.vs
|
||||
|
|
|
@ -8,9 +8,9 @@ else
|
|||
fi
|
||||
|
||||
# find file
|
||||
FILE=./build/us_pc/sm64.us.f3dex2e.exe
|
||||
FILE=./build/us_pc/sm64coopdx.exe
|
||||
if [ ! -f "$FILE" ]; then
|
||||
FILE=./build/us_pc/sm64.us.f3dex2e
|
||||
FILE=./build/us_pc/sm64coopdx
|
||||
fi
|
||||
|
||||
$FILE &
|
||||
|
|
3
developer/recompile-and-restart.sh
Normal file
3
developer/recompile-and-restart.sh
Normal 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...'
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
|
|||
MISC_TITLE = "JINE"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pauza v hře s jedním hráčem"
|
||||
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"
|
||||
INFORMATION = "Informace"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
|
|||
MISC_TITLE = "MISC"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pauzeer in een speler"
|
||||
DISABLE_POPUPS = "Popups uitzetten"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Gebruik standaard toetsenbordbediening voor chat"
|
||||
MENU_OPTIONS = "Menu Instellingen"
|
||||
INFORMATION = "Informatie"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Errors"
|
|||
MISC_TITLE = "MISC"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pause In Singleplayer"
|
||||
DISABLE_POPUPS = "Disable Popups"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Use Standard Keyboard Controls for Chat"
|
||||
MENU_OPTIONS = "Menu Options"
|
||||
INFORMATION = "Info"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Erreurs de Débogage"
|
|||
MISC_TITLE = "AUTRES"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pause en Solo"
|
||||
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"
|
||||
INFORMATION = "Information"
|
||||
DEBUG = "Débogage"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Debug Fehler"
|
|||
MISC_TITLE = "SONSTIGES"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pause im Einzelspieler"
|
||||
DISABLE_POPUPS = "Pop-ups deaktivieren"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Standard-Tastatursteuerungen für Chat verwenden"
|
||||
MENU_OPTIONS = "Menüoptionen"
|
||||
INFORMATION = "Information"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -257,6 +257,7 @@ DEBUG_ERRORS = "Errori di debug"
|
|||
MISC_TITLE = "VARIE"
|
||||
PAUSE_IN_SINGLEPLAYER = "Metti in pausa in giocatore singolo"
|
||||
DISABLE_POPUPS = "Disabilita Popups"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Usa i controlli standard della tastiera per la chat"
|
||||
MENU_OPTIONS = "Opzioni Menù"
|
||||
INFORMATION = "Informazione"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Bledy Debugowania"
|
|||
MISC_TITLE = "ROZNE"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza"
|
||||
DISABLE_POPUPS = "Wylacz Popupy"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Użyj standardowych ustawień klawiatury dla czatu"
|
||||
MENU_OPTIONS = "Opcje Menu"
|
||||
INFORMATION = "Info"
|
||||
DEBUG = "Debugowanie"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Erros debug"
|
|||
MISC_TITLE = "MAIS"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pausa com jogador único"
|
||||
DISABLE_POPUPS = "Desativar popups"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Usar controles padrão do teclado para chat"
|
||||
MENU_OPTIONS = "Opções de menu"
|
||||
INFORMATION = "Informação"
|
||||
DEBUG = "Debug"
|
||||
|
|
|
@ -258,6 +258,7 @@ DEBUG_ERRORS = "Ошибки отладки"
|
|||
MISC_TITLE = "MISC"
|
||||
PAUSE_IN_SINGLEPLAYER = "Пауза в одиночной игре"
|
||||
DISABLE_POPUPS = "Отключить всплывающие окна"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Использовать стандартные управления клавиатурой для чата"
|
||||
MENU_OPTIONS = "Параметры меню"
|
||||
INFORMATION = "Информация"
|
||||
DEBUG = "Отладка"
|
||||
|
|
|
@ -259,6 +259,7 @@ DEBUG_ERRORS = "Errores de Depuración"
|
|||
MISC_TITLE = "OTROS"
|
||||
PAUSE_IN_SINGLEPLAYER = "Pausa en modo de un jugador"
|
||||
DISABLE_POPUPS = "Deshabilitar mensajes emergentes"
|
||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Usar controles estándar del teclado para chat"
|
||||
MENU_OPTIONS = "Opciones del menú"
|
||||
INFORMATION = "Información"
|
||||
DEBUG = "Depuración"
|
||||
|
|
|
@ -144,6 +144,7 @@ bool configUncappedFramerate = false;
|
|||
unsigned int configFrameLimit = 144;
|
||||
unsigned int configDrawDistance = 4;
|
||||
bool configDisablePopups = false;
|
||||
bool configUseStandardKeyBindingsChat = false;
|
||||
bool configLuaProfiler = false;
|
||||
#ifdef DEVELOPMENT
|
||||
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_global_player_models", .type = CONFIG_TYPE_BOOL , .boolValue = &configGlobalPlayerModels},
|
||||
{.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},
|
||||
#ifdef DEVELOPMENT
|
||||
{.name = "ctx_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configCtxProfiler},
|
||||
|
|
|
@ -103,6 +103,7 @@ extern bool configUncappedFramerate;
|
|||
extern unsigned int configFrameLimit;
|
||||
extern unsigned int configDrawDistance;
|
||||
extern bool configDisablePopups;
|
||||
extern bool configUseStandardKeyBindingsChat;
|
||||
extern bool configLuaProfiler;
|
||||
#ifdef DEVELOPMENT
|
||||
extern bool configCtxProfiler;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "pc/network/network.h"
|
||||
#include "pc/lua/smlua_hooks.h"
|
||||
#include "pc/chat_commands.h"
|
||||
#include "pc/configfile.h"
|
||||
#include "djui.h"
|
||||
|
||||
struct DjuiChatBox* gDjuiChatBox = NULL;
|
||||
|
@ -51,7 +52,8 @@ void sent_history_init(ArrayList *arrayList) {
|
|||
}
|
||||
|
||||
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) {
|
||||
for (s32 i = 1; i < MAX_HISTORY_SIZE; 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) {
|
||||
sent_history_add_message(&sentHistory, chatInput->buffer);
|
||||
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();
|
||||
} else if (!exec_chat_command(chatInput->buffer)) {
|
||||
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) {
|
||||
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;
|
||||
if (canScrollDown) { *yValue = fmin(*yValue + 15, 0); }
|
||||
} else {
|
||||
sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer);
|
||||
sent_history_navigate(&sentHistory, true);
|
||||
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
|
||||
reset_tab_completion_all();
|
||||
}
|
||||
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { reset_tab_completion_all(); }
|
||||
}
|
||||
return true;
|
||||
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;
|
||||
if (canScrollUp) { *yValue = fmax(*yValue - 15, yMax); }
|
||||
} else {
|
||||
sent_history_update_current_message(&sentHistory, gDjuiChatBox->chatInput->buffer);
|
||||
sent_history_navigate(&sentHistory, false);
|
||||
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
|
||||
reset_tab_completion_all();
|
||||
}
|
||||
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) { reset_tab_completion_all(); }
|
||||
}
|
||||
return true;
|
||||
case SCANCODE_PAGE_UP:
|
||||
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;
|
||||
case SCANCODE_PAGE_DOWN:
|
||||
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;
|
||||
case SCANCODE_POS1:
|
||||
gDjuiChatBox->scrolling = true;
|
||||
|
|
|
@ -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, USE_STANDARD_KEY_BINDINGS_CHAT), &configUseStandardKeyBindingsChat, NULL);
|
||||
#ifndef DEVELOPMENT
|
||||
djui_checkbox_create(body, DLANG(MISC, LUA_PROFILER), &configLuaProfiler, NULL);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue