forked from HarbourMasters/Shipwright
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors custom message code to its own file
- Loading branch information
1 parent
14a87f8
commit d927753
Showing
3 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include "custom_messages.h" | ||
#include <variables.h> | ||
|
||
using namespace std::literals::string_literals; | ||
|
||
std::string Randomizer::GetCustomGetItemMessage(GetItemID giid) { | ||
if (!gSaveContext.n64ddFlag) { | ||
return "Not Randomized."; | ||
} | ||
|
||
switch (giid) { | ||
default: | ||
switch (gSaveContext.language) { | ||
case LANGUAGE_FRA: | ||
return "Il n'y a pas de message personnalisé pour cet élément."; | ||
case LANGUAGE_GER: | ||
return "Für diesen Artikel gibt es keine benutzerdefinierte Nachricht."; | ||
case LANGUAGE_ENG: | ||
default: | ||
return "There is no custom message for this item."; | ||
} | ||
} | ||
} | ||
|
||
std::string MESSAGE_END() { | ||
return "\x02"s; | ||
} | ||
|
||
std::string ITEM_OBTAINED(uint8_t x) { | ||
return "\x08\x13"s + char(x); | ||
} | ||
|
||
std::string NEWLINE() { | ||
return "\x02"s; | ||
} | ||
|
||
std::string COLOR(uint8_t x) { | ||
return "\x05"s + char(x); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include "../../../include/z64item.h" | ||
#include "randomizer.h" | ||
|
||
#define QM_WHITE 0x00 | ||
#define QM_RED 0x41 | ||
#define QM_GREEN 0x42 | ||
#define QM_BLUE 0x43 | ||
#define QM_LBLUE 0x44 | ||
#define QM_PINK 0x45 | ||
#define QM_YELLOW 0x46 | ||
#define QM_BLACK 0x47 | ||
|
||
std::string MESSAGE_END(); | ||
std::string ITEM_OBTAINED(uint8_t x); | ||
std::string NEWLINE(); | ||
std::string COLOR(uint8_t x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters