mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-07-05 22:16:53 +00:00
Catch source code colors
This commit is contained in:
parent
0a7c29583d
commit
283cf4f1f8
10 changed files with 14 additions and 14 deletions
|
|
@ -63,7 +63,7 @@ void djui_chat_message_create_from(u8 globalIndex, const char* message) {
|
|||
|
||||
const char* playerColorString = network_get_player_text_color_string(np->localIndex);
|
||||
char chatMsg[MAX_CHAT_PACKET_LENGTH] = { 0 };
|
||||
snprintf(chatMsg, MAX_CHAT_PACKET_LENGTH, "%s%s\\#dcdcdc\\: %s", playerColorString, (np != NULL) ? np->name : "Player", message);
|
||||
snprintf(chatMsg, MAX_CHAT_PACKET_LENGTH, "%s%s\\#\\: %s", playerColorString, (np != NULL) ? np->name : "Player", message);
|
||||
|
||||
play_sound((globalIndex == gNetworkPlayerLocal->globalIndex) ? SOUND_MENU_MESSAGE_DISAPPEAR : SOUND_MENU_MESSAGE_APPEAR, gGlobalSoundSource);
|
||||
djui_chat_message_create(chatMsg);
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ struct DjuiFpsDisplay *sFpsDisplay = NULL;
|
|||
|
||||
void djui_fps_display_update(u32 fps) {
|
||||
if (configShowFPS && sFpsDisplay != NULL) {
|
||||
char fpsText[30] = "";
|
||||
char fpsText[12] = "";
|
||||
fps = fps > 99999 ? 99999 : fps; // Prevent overflowing the FPS display (cap at 99999)
|
||||
snprintf(fpsText, 30, "\\#dcdcdc\\FPS: \\#ffffff\\%d", fps);
|
||||
snprintf(fpsText, 12, "FPS: %d", fps);
|
||||
djui_text_set_text(sFpsDisplay->text, fpsText);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ void djui_panel_language_create(struct DjuiBase* caller) {
|
|||
|
||||
char buffer[512] = "";
|
||||
sys_swap_backslashes(lpath);
|
||||
snprintf(buffer, 512, "\\#ffa0a0\\Failed to load language folder:\n\\#dcdcdc\\%s", lpath);
|
||||
snprintf(buffer, 512, "\\#ffa0a0\\Failed to load language folder:\n\\#\\%s", lpath);
|
||||
struct DjuiText* text = djui_text_create(body, buffer);
|
||||
djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER);
|
||||
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static bool loading_screen_on_render(struct DjuiBase* base) {
|
|||
u32 length = strlen(gCurrLoadingSegment.str);
|
||||
if (length > 0) {
|
||||
if (gCurrLoadingSegment.percentage > 0) {
|
||||
snprintf(buffer, 256, "%s\n\\#dcdcdc\\%d%%", gCurrLoadingSegment.str, (u8)floor(gCurrLoadingSegment.percentage * 100));
|
||||
snprintf(buffer, 256, "%s\n\\#\\%d%%", gCurrLoadingSegment.str, (u8)floor(gCurrLoadingSegment.percentage * 100));
|
||||
} else {
|
||||
snprintf(buffer, 256, "%s...", gCurrLoadingSegment.str);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ static void coopnet_populate_description(void) {
|
|||
bufferLength -= strlen(sep);
|
||||
|
||||
// concat mod strings
|
||||
str_seperator_concat(buffer, bufferLength, strings, gActiveMods.entryCount, "\\#dcdcdc\\\n");
|
||||
str_seperator_concat(buffer, bufferLength, strings, gActiveMods.entryCount, "\\#\\\n");
|
||||
}
|
||||
|
||||
void ns_coopnet_update(void) {
|
||||
|
|
|
|||
|
|
@ -428,14 +428,14 @@ u8 network_player_disconnected(u8 globalIndex) {
|
|||
|
||||
void construct_player_popup(struct NetworkPlayer* np, char* msg, const char* level) {
|
||||
char built[256] = { 0 };
|
||||
snprintf(built, 256, "\\#dcdcdc\\");
|
||||
snprintf(built, 256, "\\#\\");
|
||||
|
||||
char player[128] = { 0 };
|
||||
snprintf(player, 128, "%s%s\\#dcdcdc\\", network_get_player_text_color_string(np->localIndex), np->name);
|
||||
snprintf(player, 128, "%s%s\\#\\", network_get_player_text_color_string(np->localIndex), np->name);
|
||||
if (level) {
|
||||
djui_language_replace2(msg, &built[9], 256 - 9, '@', player, '#', (char*)level);
|
||||
djui_language_replace2(msg, &built[3], 256 - 3, '@', player, '#', (char*)level);
|
||||
} else {
|
||||
djui_language_replace(msg, &built[9], 256 - 9, '@', player);
|
||||
djui_language_replace(msg, &built[3], 256 - 3, '@', player);
|
||||
}
|
||||
djui_popup_create(built, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ void network_receive_join(struct Packet* p) {
|
|||
network_shutdown(true, false, false, false);
|
||||
LOG_ERROR("version mismatch");
|
||||
char mismatchMessage[256] = { 0 };
|
||||
snprintf(mismatchMessage, 256, "\\#ffa0a0\\Error:\\#dcdcdc\\ Version mismatch.\n\nYour version: \\#a0a0ff\\%s\\#dcdcdc\\\nTheir version: \\#a0a0ff\\%s\\#dcdcdc\\\n\nSomeone is out of date!\n", version, remoteVersion);
|
||||
snprintf(mismatchMessage, 256, "\\#ffa0a0\\Error:\\#\\ Version mismatch.\n\nYour version: \\#a0a0ff\\%s\\#\\\nTheir version: \\#a0a0ff\\%s\\#\\\n\nSomeone is out of date!\n", version, remoteVersion);
|
||||
djui_panel_join_message_error(mismatchMessage);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ void network_receive_mod_list(struct Packet* p) {
|
|||
network_shutdown(true, false, false, false);
|
||||
LOG_ERROR("version mismatch");
|
||||
char mismatchMessage[256] = { 0 };
|
||||
snprintf(mismatchMessage, 256, "\\#ffa0a0\\Error:\\#dcdcdc\\ Version mismatch.\n\nYour version: \\#a0a0ff\\%s\\#dcdcdc\\\nTheir version: \\#a0a0ff\\%s\\#dcdcdc\\\n\nSomeone is out of date!\n", version, remoteVersion);
|
||||
snprintf(mismatchMessage, 256, "\\#ffa0a0\\Error:\\#\\ Version mismatch.\n\nYour version: \\#a0a0ff\\%s\\#\\\nTheir version: \\#a0a0ff\\%s\\#\\\n\nSomeone is out of date!\n", version, remoteVersion);
|
||||
djui_panel_join_message_error(mismatchMessage);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void network_receive_spawn_objects(struct Packet* p) {
|
|||
}
|
||||
|
||||
LOG_INFO("rx spawn object %s from %s (%s)", bhvName, name, id);
|
||||
LOG_CONSOLE("rx spawn object %s from %s\\#dcdcdc\\ (%s)", bhvName, name, id);
|
||||
LOG_CONSOLE("rx spawn object %s from %s\\#\\ (%s)", bhvName, name, id);
|
||||
snprintf(gLastRemoteBhv, 256, "%s %s (%s)", bhvName, name, id);
|
||||
|
||||
struct Object* parentObj = NULL;
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ void check_for_updates(void) {
|
|||
if (sRemoteVersionStr[0] == 'v' && is_version_newer(sClientVersion, sRemoteVersion)) {
|
||||
snprintf(
|
||||
sVersionUpdateTextBuffer, 256,
|
||||
"\\#ffffa0\\%s\n\\#dcdcdc\\%s: %s\n%s: %s",
|
||||
"\\#ffffa0\\%s\n\\#\\%s: %s\n%s: %s",
|
||||
DLANG(NOTIF, UPDATE_AVAILABLE),
|
||||
DLANG(NOTIF, LATEST_VERSION),
|
||||
sRemoteVersionStr,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue