summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-10 01:08:19 +0100
committerTreeki <treeki@gmail.com>2013-02-10 01:08:19 +0100
commit1fe7dd1023fb9b7680caee4ba12ad860941053aa (patch)
tree8d66a536ba77e6e6d0b7f2baceb6614815a0acae /src
parentcb6acda7a3d3f7345c71ec3036318fa342a60867 (diff)
downloadkamek-1fe7dd1023fb9b7680caee4ba12ad860941053aa.tar.gz
kamek-1fe7dd1023fb9b7680caee4ba12ad860941053aa.zip
fancied up the secret codes and added another one
Diffstat (limited to 'src')
-rw-r--r--src/koopatlas/starcoin.cpp109
-rw-r--r--src/koopatlas/starcoin.h2
2 files changed, 110 insertions, 1 deletions
diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp
index fc46c8c..6993868 100644
--- a/src/koopatlas/starcoin.cpp
+++ b/src/koopatlas/starcoin.cpp
@@ -372,6 +372,7 @@ static const int secretCode[] = {
};
static const int secretCodeButtons = WPAD_UP|WPAD_DOWN|WPAD_LEFT|WPAD_RIGHT|WPAD_ONE|WPAD_TWO;
static int secretCodeIndex = 0;
+static int minusCount = 0;
extern bool enableDebugMode;
extern u8 isReplayEnabled;
@@ -381,6 +382,7 @@ void dWMStarCoin_c::beginState_ShowWait() {
layout.enableNonLoopAnim(SHOW_ALL);
secretCodeIndex = 0;
+ minusCount = 0;
}
void dWMStarCoin_c::executeState_ShowWait() {
if (!layout.isAnimOn(SHOW_ALL))
@@ -403,6 +405,36 @@ void dWMStarCoin_c::executeState_ShowSectionWait() {
}
void dWMStarCoin_c::endState_ShowSectionWait() { }
+void dWMStarCoin_c::showSecretMessage(const wchar_t *title, const wchar_t **body, int lineCount, const wchar_t **body2, int lineCount2) {
+ LeftTitle->SetVisible(true);
+ LeftTitle->SetString(title);
+ RightTitle->SetVisible(false);
+
+ for (int c = 0; c < COLUMN_COUNT; c++) {
+ for (int i = 0; i < SHINE_COUNT; i++)
+ Shine[c][i]->SetVisible(false);
+ for (int r = 0; r < ROW_COUNT; r++) {
+ LevelName[c][r]->SetVisible(false);
+ for (int i = 0; i < 3; i++) {
+ CoinOutline[c][r][i]->SetVisible(false);
+ Coin[c][r][i]->SetVisible(false);
+ }
+ }
+ }
+
+ for (int i = 0; i < lineCount; i++) {
+ LevelName[0][i]->SetVisible(true);
+ LevelName[0][i]->SetString(body[i]);
+ }
+
+ if (body2) {
+ for (int i = 0; i < lineCount2; i++) {
+ LevelName[1][i]->SetVisible(true);
+ LevelName[1][i]->SetString(body2[i]);
+ }
+ }
+}
+
void dWMStarCoin_c::beginState_Wait() { }
void dWMStarCoin_c::executeState_Wait() {
int nowPressed = Remocon_GetPressed(GetActiveRemocon());
@@ -416,12 +448,31 @@ void dWMStarCoin_c::executeState_Wait() {
MapSoundPlayer(SoundRelatedClass, SE_VOC_MA_THANK_YOU, 1);
//enableDebugMode = !enableDebugMode;
//OSReport("Debug mode toggled!\n");
+ const int lineCountOn = 9, lineCountOff = 2;
+ static const wchar_t *linesOn[lineCountOn] = {
+ L"The experimental Replay",
+ L"Recording feature has",
+ L"been enabled. Enjoy!",
+ L"You'll find your Replays",
+ L"on your SD or USB, depending",
+ L"on where Newer's files are.",
+ L"It might not work, so",
+ L"save your game before you",
+ L"play a level!",
+ };
+ static const wchar_t *linesOff[lineCountOff] = {
+ L"Replay Recording",
+ L"turned off.",
+ };
+
if (isReplayEnabled != 100) {
isReplayEnabled = 100;
OSReport("Replay Recording enabled!\n");
+ showSecretMessage(L"Nice!", linesOn, lineCountOn);
} else {
isReplayEnabled = 0;
OSReport("Replay Recording disabled!\n");
+ showSecretMessage(L"Nice!", linesOff, lineCountOff);
}
}
return;
@@ -430,7 +481,63 @@ void dWMStarCoin_c::executeState_Wait() {
}
}
- if (nowPressed & WPAD_ONE) {
+ if (nowPressed & WPAD_MINUS) {
+ minusCount++;
+ if (minusCount >= 16) {
+ minusCount = 0;
+
+ enableDebugMode = !enableDebugMode;
+
+ if (enableDebugMode) {
+ const int msgCount = 9;
+ static const wchar_t *msg[msgCount] = {
+ L"You've found the Totally",
+ L"Secret Collision Debug Mode.",
+ L"We used this to make the",
+ L"hitboxes on our custom sprites",
+ L"and bosses suck less. Awesome,",
+ L"right?!",
+ L"(Actually, I did it just to waste",
+ L"some time, but it ended up being",
+ L"pretty useful!)",
+ };
+ const int msgCount2 = 9;
+ static const wchar_t *msg2[msgCount2] = {
+ L"And yes, I know it doesn't show",
+ L"some stuff properly, like rotated",
+ L"objects. And it totally ignores",
+ L"some types of collisions, like",
+ L"platforms and mushrooms",
+ L"and so on. Can't have it all, can",
+ L"you? Wonder if Nintendo had",
+ L"something like this...",
+ L" Treeki, 9th February 2013",
+ };
+ showSecretMessage(L"Groovy!", msg, msgCount, msg2, msgCount2);
+ } else {
+ const int msgCount = 6;
+ static const wchar_t *msg[msgCount] = {
+ L"You've turned off the Totally",
+ L"Secret Collision Debug Mode.",
+ L"",
+ L"... and no, I'm not going to write",
+ L"another ridiculously long",
+ L"message to go here. Sorry!",
+ };
+ static const wchar_t *hiddenMsg[] = {
+ L"If you found these messages by",
+ L"looking through strings in the DLCode",
+ L"file, then... that's kind of cheating.",
+ L"Though I can't say I wouldn't do the",
+ L"same!",
+ L"You won't actually see this in game",
+ L"btw :p So why am I bothering with linebreaks anyway? I dunno. Oh well.",
+ L"Also, don't put this message on TCRF. Or do! Whatever. :(",
+ };
+ showSecretMessage(L"Groovy!", msg, msgCount, hiddenMsg, 0);
+ }
+ }
+ } else if (nowPressed & WPAD_ONE) {
MapSoundPlayer(SoundRelatedClass, SE_SYS_DIALOGUE_OUT_AUTO, 1);
willExit = true;
state.setState(&StateID_HideSectionWait);
diff --git a/src/koopatlas/starcoin.h b/src/koopatlas/starcoin.h
index 42cddbd..b411dc1 100644
--- a/src/koopatlas/starcoin.h
+++ b/src/koopatlas/starcoin.h
@@ -58,6 +58,8 @@ class dWMStarCoin_c : public dActor_c {
void setLeftArrowVisible(bool value);
void setRightArrowVisible(bool value);
+ void showSecretMessage(const wchar_t *title, const wchar_t **body, int lineCount, const wchar_t **body2 = 0, int lineCount2 = 0);
+
nw4r::lyt::Picture
*Shine[COLUMN_COUNT][SHINE_COUNT],
*CoinOutline[COLUMN_COUNT][ROW_COUNT][3],