mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-24 21:15:12 +00:00
DynOS fixes
This commit is contained in:
parent
565e8b6367
commit
8525a9a2ee
18 changed files with 41 additions and 43 deletions
|
@ -745,7 +745,7 @@ void PrintError(const char *aFmt, Args... aArgs) {
|
||||||
printf(aFmt, aArgs...);
|
printf(aFmt, aArgs...);
|
||||||
printf("\r\n");
|
printf("\r\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
// PrintConsole(aFmt, CONSOLE_MESSAGE_ERROR, aArgs...);
|
PrintConsole(CONSOLE_MESSAGE_ERROR, aFmt, aArgs...);
|
||||||
}
|
}
|
||||||
#define PrintDataError(...) { \
|
#define PrintDataError(...) { \
|
||||||
if (aGfxData->mErrorCount == 0) Print(" ERROR!"); \
|
if (aGfxData->mErrorCount == 0) Print(" ERROR!"); \
|
||||||
|
|
|
@ -165,7 +165,7 @@ void DynOS_Actor_Override(struct Object* obj, void** aSharedChild) {
|
||||||
obj->behavior == smlua_override_behavior(bhvMetalCap) ||
|
obj->behavior == smlua_override_behavior(bhvMetalCap) ||
|
||||||
obj->behavior == smlua_override_behavior(bhvVanishCap))) {
|
obj->behavior == smlua_override_behavior(bhvVanishCap))) {
|
||||||
struct NetworkPlayer* np = network_player_from_global_index(obj->globalPlayerIndex);
|
struct NetworkPlayer* np = network_player_from_global_index(obj->globalPlayerIndex);
|
||||||
if (np && np->localIndex > 0 && !configGlobalPlayerModels) {
|
if (np && np->localIndex > 0 && configDynosLocalPlayerModelOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -451,10 +451,6 @@ void DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool IsPowerOfTwo(s32 n) {
|
|
||||||
return (n > 0) && ((n & (n - 1)) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo) {
|
bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo) {
|
||||||
#define CONVERT_TEXINFO() { \
|
#define CONVERT_TEXINFO() { \
|
||||||
/* translate bit size */ \
|
/* translate bit size */ \
|
||||||
|
@ -483,13 +479,6 @@ bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo) {
|
||||||
// texture data is corrupted
|
// texture data is corrupted
|
||||||
if (_RawData == NULL) {
|
if (_RawData == NULL) {
|
||||||
PrintError("Attempted to load corrupted tex file: %s", aTexName);
|
PrintError("Attempted to load corrupted tex file: %s", aTexName);
|
||||||
PrintConsole(CONSOLE_MESSAGE_ERROR, "Attempted to load corrupted tex file: %s", aTexName);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// texture width or height is NPOT
|
|
||||||
if (!IsPowerOfTwo(_Data->mRawWidth) || !IsPowerOfTwo(_Data->mRawHeight)) {
|
|
||||||
PrintError("Tex file '%s' has non power of two width or height", aTexName);
|
|
||||||
PrintConsole(CONSOLE_MESSAGE_WARNING, "Tex file '%s' has non power of two width or height", aTexName);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_Data->mRawFormat = G_IM_FMT_RGBA;
|
_Data->mRawFormat = G_IM_FMT_RGBA;
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Výběr souboru"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Pouze lokální model hráče"
|
LOCAL_PLAYER_MODEL_ONLY = "Pouze lokální model hráče"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Klasické ovládání chatu"
|
||||||
MENU_OPTIONS = "Nastavení hlavního menu"
|
MENU_OPTIONS = "Nastavení hlavního menu"
|
||||||
INFORMATION = "Informace"
|
INFORMATION = "Informace"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Bestand selecteren"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Alleen lokaal spelermodel"
|
LOCAL_PLAYER_MODEL_ONLY = "Alleen lokaal spelermodel"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFORMATIE"
|
INFO_TITLE = "INFORMATIE"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Klassieke chatbediening"
|
||||||
MENU_OPTIONS = "Menu Instellingen"
|
MENU_OPTIONS = "Menu Instellingen"
|
||||||
INFORMATION = "Informatie"
|
INFORMATION = "Informatie"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "File Select"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Local Player Model Only"
|
LOCAL_PLAYER_MODEL_ONLY = "Local Player Model Only"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Classic Chatbox Controls"
|
||||||
MENU_OPTIONS = "Menu Options"
|
MENU_OPTIONS = "Menu Options"
|
||||||
INFORMATION = "Info"
|
INFORMATION = "Info"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Sélection de fichier"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Modèle de joueur local seulement"
|
LOCAL_PLAYER_MODEL_ONLY = "Modèle de joueur local seulement"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFORMATIONS"
|
INFO_TITLE = "INFORMATIONS"
|
||||||
|
@ -275,7 +275,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 = "Activer les contrôles clavier standards pour le tchat"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Commandes de chat classiques"
|
||||||
MENU_OPTIONS = "Options du menu"
|
MENU_OPTIONS = "Options du menu"
|
||||||
INFORMATION = "Information"
|
INFORMATION = "Information"
|
||||||
DEBUG = "Débogage"
|
DEBUG = "Débogage"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Dateiauswahl"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Nur lokales Spielermodell"
|
LOCAL_PLAYER_MODEL_ONLY = "Nur lokales Spielermodell"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Klassische Chat-Steuerung"
|
||||||
MENU_OPTIONS = "Menüoptionen"
|
MENU_OPTIONS = "Menüoptionen"
|
||||||
INFORMATION = "Information"
|
INFORMATION = "Information"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -159,7 +159,7 @@ FILE_SELECT_THEME = "Selezione file"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Solo modello giocatore locale"
|
LOCAL_PLAYER_MODEL_ONLY = "Solo modello giocatore locale"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -273,7 +273,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Controlli della chat classica"
|
||||||
MENU_OPTIONS = "Opzioni Menù"
|
MENU_OPTIONS = "Opzioni Menù"
|
||||||
INFORMATION = "Informazione"
|
INFORMATION = "Informazione"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Wybór Pliku"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Tylko lokalny model gracza"
|
LOCAL_PLAYER_MODEL_ONLY = "Tylko lokalny model gracza"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFORMACJE"
|
INFO_TITLE = "INFORMACJE"
|
||||||
|
@ -275,7 +275,7 @@ DEBUG_ERRORS = "Błędy z Debugowania"
|
||||||
MISC_TITLE = "POZOSTAŁE OPCJE"
|
MISC_TITLE = "POZOSTAŁE OPCJE"
|
||||||
PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza"
|
PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza"
|
||||||
DISABLE_POPUPS = "Wyłącz Dymki Powiadomień"
|
DISABLE_POPUPS = "Wyłącz Dymki Powiadomień"
|
||||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Użyj Standardowych Ustawień Klawiatury dla Czatu"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Klasyczne sterowanie czatem"
|
||||||
MENU_OPTIONS = "Opcje Menu"
|
MENU_OPTIONS = "Opcje Menu"
|
||||||
INFORMATION = "Informacje"
|
INFORMATION = "Informacje"
|
||||||
DEBUG = "Debugowanie"
|
DEBUG = "Debugowanie"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Escolha de arquivo"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Apenas modelo de jogador local"
|
LOCAL_PLAYER_MODEL_ONLY = "Apenas modelo de jogador local"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Controles clássicos de chat"
|
||||||
MENU_OPTIONS = "Opções de menu"
|
MENU_OPTIONS = "Opções de menu"
|
||||||
INFORMATION = "Informação"
|
INFORMATION = "Informação"
|
||||||
DEBUG = "Debug"
|
DEBUG = "Debug"
|
||||||
|
|
|
@ -160,7 +160,7 @@ FILE_SELECT_THEME = "Выбор файла"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Только локальная модель игрока"
|
LOCAL_PLAYER_MODEL_ONLY = "Только локальная модель игрока"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -274,7 +274,7 @@ DEBUG_ERRORS = "Ошибки отладки"
|
||||||
MISC_TITLE = "MISC"
|
MISC_TITLE = "MISC"
|
||||||
PAUSE_IN_SINGLEPLAYER = "Пауза в одиночной игре"
|
PAUSE_IN_SINGLEPLAYER = "Пауза в одиночной игре"
|
||||||
DISABLE_POPUPS = "Отключить всплывающие окна"
|
DISABLE_POPUPS = "Отключить всплывающие окна"
|
||||||
USE_STANDARD_KEY_BINDINGS_CHAT = "Использовать стандартные управления клавиатурой для чата"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Классическое управление чатом"
|
||||||
MENU_OPTIONS = "Параметры меню"
|
MENU_OPTIONS = "Параметры меню"
|
||||||
INFORMATION = "Информация"
|
INFORMATION = "Информация"
|
||||||
DEBUG = "Отладка"
|
DEBUG = "Отладка"
|
||||||
|
|
|
@ -161,7 +161,7 @@ FILE_SELECT_THEME = "Selección de archivo"
|
||||||
|
|
||||||
[DYNOS]
|
[DYNOS]
|
||||||
DYNOS = "DYNOS"
|
DYNOS = "DYNOS"
|
||||||
GLOBAL_PLAYER_MODELS = "Solo modelo de jugador local"
|
LOCAL_PLAYER_MODEL_ONLY = "Solo modelo de jugador local"
|
||||||
|
|
||||||
[HOST_MESSAGE]
|
[HOST_MESSAGE]
|
||||||
INFO_TITLE = "INFO"
|
INFO_TITLE = "INFO"
|
||||||
|
@ -275,7 +275,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"
|
USE_STANDARD_KEY_BINDINGS_CHAT = "Controles de chat clásicos"
|
||||||
MENU_OPTIONS = "Opciones del menú"
|
MENU_OPTIONS = "Opciones del menú"
|
||||||
INFORMATION = "Información"
|
INFORMATION = "Información"
|
||||||
DEBUG = "Depuración"
|
DEBUG = "Depuración"
|
||||||
|
|
|
@ -149,7 +149,7 @@ char configPlayerName[MAX_CONFIG_STRING] = "";
|
||||||
unsigned int configPlayerModel = 0;
|
unsigned int configPlayerModel = 0;
|
||||||
struct PlayerPalette configPlayerPalette = { { { 0x00, 0x00, 0xff }, { 0xff, 0x00, 0x00 }, { 0xff, 0xff, 0xff }, { 0x72, 0x1c, 0x0e }, { 0x73, 0x06, 0x00 }, { 0xfe, 0xc1, 0x79 }, { 0xff, 0x00, 0x00 }, { 0xff, 0x00, 0x00 } } };
|
struct PlayerPalette configPlayerPalette = { { { 0x00, 0x00, 0xff }, { 0xff, 0x00, 0x00 }, { 0xff, 0xff, 0xff }, { 0x72, 0x1c, 0x0e }, { 0x73, 0x06, 0x00 }, { 0xfe, 0xc1, 0x79 }, { 0xff, 0x00, 0x00 }, { 0xff, 0x00, 0x00 } } };
|
||||||
// coop settings
|
// coop settings
|
||||||
unsigned int configAmountofPlayers = 16;
|
unsigned int configAmountofPlayers = MAX_PLAYERS;
|
||||||
bool configBubbleDeath = true;
|
bool configBubbleDeath = true;
|
||||||
unsigned int configHostPort = DEFAULT_PORT;
|
unsigned int configHostPort = DEFAULT_PORT;
|
||||||
unsigned int configHostSaveSlot = 1;
|
unsigned int configHostSaveSlot = 1;
|
||||||
|
@ -163,12 +163,12 @@ bool configNametags = true;
|
||||||
unsigned int configBouncyLevelBounds = 0;
|
unsigned int configBouncyLevelBounds = 0;
|
||||||
bool configSkipIntro = 0;
|
bool configSkipIntro = 0;
|
||||||
bool configPauseAnywhere = false;
|
bool configPauseAnywhere = false;
|
||||||
bool configMenuStaffRoll = true;
|
bool configMenuStaffRoll = false;
|
||||||
unsigned int configMenuLevel = 0;
|
unsigned int configMenuLevel = 0;
|
||||||
bool configMenuSound = false;
|
bool configMenuSound = false;
|
||||||
bool configMenuRandom = false;
|
bool configMenuRandom = false;
|
||||||
bool configMenuDemos = false;
|
bool configMenuDemos = false;
|
||||||
bool configGlobalPlayerModels = true;
|
bool configDynosLocalPlayerModelOnly = false;
|
||||||
bool configDisablePopups = false;
|
bool configDisablePopups = false;
|
||||||
char configLanguage[MAX_CONFIG_STRING] = "";
|
char configLanguage[MAX_CONFIG_STRING] = "";
|
||||||
// CoopNet settings
|
// CoopNet settings
|
||||||
|
@ -292,9 +292,9 @@ static const struct ConfigOption options[] = {
|
||||||
{.name = "coop_menu_sound", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuSound},
|
{.name = "coop_menu_sound", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuSound},
|
||||||
{.name = "coop_menu_random", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuRandom},
|
{.name = "coop_menu_random", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuRandom},
|
||||||
{.name = "coop_menu_demos", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuDemos},
|
{.name = "coop_menu_demos", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuDemos},
|
||||||
{.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 = "language", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLanguage, .maxStringLength = MAX_CONFIG_STRING},
|
{.name = "language", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLanguage, .maxStringLength = MAX_CONFIG_STRING},
|
||||||
|
{.name = "dynos_local_player_model_only", .type = CONFIG_TYPE_BOOL, .boolValue = &configDynosLocalPlayerModelOnly},
|
||||||
// CoopNet settings
|
// CoopNet settings
|
||||||
{.name = "coopnet_ip", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configCoopNetIp, .maxStringLength = MAX_CONFIG_STRING},
|
{.name = "coopnet_ip", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configCoopNetIp, .maxStringLength = MAX_CONFIG_STRING},
|
||||||
{.name = "coopnet_port", .type = CONFIG_TYPE_UINT, .uintValue = &configCoopNetPort},
|
{.name = "coopnet_port", .type = CONFIG_TYPE_UINT, .uintValue = &configCoopNetPort},
|
||||||
|
|
|
@ -119,9 +119,9 @@ extern unsigned int configMenuLevel;
|
||||||
extern bool configMenuSound;
|
extern bool configMenuSound;
|
||||||
extern bool configMenuRandom;
|
extern bool configMenuRandom;
|
||||||
extern bool configMenuDemos;
|
extern bool configMenuDemos;
|
||||||
extern bool configGlobalPlayerModels;
|
|
||||||
extern bool configDisablePopups;
|
extern bool configDisablePopups;
|
||||||
extern char configLanguage[MAX_CONFIG_STRING];
|
extern char configLanguage[MAX_CONFIG_STRING];
|
||||||
|
extern bool configDynosLocalPlayerModelOnly;
|
||||||
// CoopNet settings
|
// CoopNet settings
|
||||||
extern char configCoopNetIp[MAX_CONFIG_STRING];
|
extern char configCoopNetIp[MAX_CONFIG_STRING];
|
||||||
extern unsigned int configCoopNetPort;
|
extern unsigned int configCoopNetPort;
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#include "game/camera.h"
|
#include "game/camera.h"
|
||||||
#include "game/hud.h"
|
#include "game/hud.h"
|
||||||
#include "game/rendering_graph_node.h"
|
#include "game/rendering_graph_node.h"
|
||||||
|
#include "pc/lua/smlua.h"
|
||||||
|
|
||||||
#include "engine/math_util.h"
|
#include "engine/math_util.h"
|
||||||
|
|
||||||
|
|
||||||
static enum HudUtilsResolution sResolution = RESOLUTION_DJUI;
|
static enum HudUtilsResolution sResolution = RESOLUTION_DJUI;
|
||||||
static enum HudUtilsFilter sFilter = FILTER_NEAREST;
|
static enum HudUtilsFilter sFilter = FILTER_NEAREST;
|
||||||
static enum DjuiFontType sFont = FONT_NORMAL;
|
static enum DjuiFontType sFont = FONT_NORMAL;
|
||||||
|
@ -392,7 +392,16 @@ void djui_hud_print_text_interpolated(const char* message, f32 prevX, f32 prevY,
|
||||||
interp->resolution = sResolution;
|
interp->resolution = sResolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool is_power_of_two(u32 n) {
|
||||||
|
return (n > 0) && ((n & (n - 1)) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
void djui_hud_render_texture_raw(const u8* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH) {
|
void djui_hud_render_texture_raw(const u8* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH) {
|
||||||
|
if (!is_power_of_two(width) || !is_power_of_two(height)) {
|
||||||
|
LOG_LUA_LINE("Tried to render DJUI HUD texture with NPOT width or height");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
gDjuiHudUtilsZ += 0.01f;
|
gDjuiHudUtilsZ += 0.01f;
|
||||||
|
|
||||||
// translate position
|
// translate position
|
||||||
|
|
|
@ -18,9 +18,9 @@ void djui_panel_controls_create(struct DjuiBase* caller) {
|
||||||
{
|
{
|
||||||
djui_button_create(body, DLANG(CONTROLS, N64_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_n64_create);
|
djui_button_create(body, DLANG(CONTROLS, N64_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_n64_create);
|
||||||
djui_button_create(body, DLANG(CONTROLS, EXTRA_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_extra_create);
|
djui_button_create(body, DLANG(CONTROLS, EXTRA_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_extra_create);
|
||||||
djui_checkbox_create(body, DLANG(MISC, USE_STANDARD_KEY_BINDINGS_CHAT), &configUseStandardKeyBindingsChat, NULL);
|
|
||||||
djui_checkbox_create(body, DLANG(CONTROLS, BACKGROUND_GAMEPAD), &configBackgroundGamepad, NULL);
|
djui_checkbox_create(body, DLANG(CONTROLS, BACKGROUND_GAMEPAD), &configBackgroundGamepad, NULL);
|
||||||
djui_checkbox_create(body, DLANG(CONTROLS, DISABLE_GAMEPADS), &configDisableGamepads, NULL);
|
djui_checkbox_create(body, DLANG(CONTROLS, DISABLE_GAMEPADS), &configDisableGamepads, NULL);
|
||||||
|
djui_checkbox_create(body, DLANG(MISC, USE_STANDARD_KEY_BINDINGS_CHAT), &configUseStandardKeyBindingsChat, NULL);
|
||||||
|
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
int numJoys = SDL_NumJoysticks();
|
int numJoys = SDL_NumJoysticks();
|
||||||
|
|
|
@ -15,7 +15,7 @@ static void djui_panel_dynos_apply(struct DjuiBase* caller) {
|
||||||
dynos_pack_set_enabled(caller->tag, caller->bTag);
|
dynos_pack_set_enabled(caller->tag, caller->bTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void djui_panel_dynos_global_player_models(UNUSED struct DjuiBase* caller) {
|
static void djui_panel_dynos_local_player_model_only(UNUSED struct DjuiBase* caller) {
|
||||||
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
||||||
network_player_update_model(i);
|
network_player_update_model(i);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ void djui_panel_dynos_create(struct DjuiBase* caller) {
|
||||||
djui_base_set_size(&space->base, 0, 32);
|
djui_base_set_size(&space->base, 0, 32);
|
||||||
djui_base_set_color(&space->base, 0, 0, 0, 0);
|
djui_base_set_color(&space->base, 0, 0, 0, 0);
|
||||||
|
|
||||||
djui_checkbox_create(body, DLANG(DYNOS, GLOBAL_PLAYER_MODELS), &configGlobalPlayerModels, djui_panel_dynos_global_player_models);
|
djui_checkbox_create(body, DLANG(DYNOS, LOCAL_PLAYER_MODEL_ONLY), &configDynosLocalPlayerModelOnly, djui_panel_dynos_local_player_model_only);
|
||||||
if (gNetworkType == NT_NONE) {
|
if (gNetworkType == NT_NONE) {
|
||||||
struct DjuiRect* rect1 = djui_rect_container_create(body, 64);
|
struct DjuiRect* rect1 = djui_rect_container_create(body, 64);
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue