Skip to content

Commit

Permalink
2020-04-01
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicpkmn11 committed Mar 28, 2020
1 parent 2e70792 commit 16454e3
Show file tree
Hide file tree
Showing 66 changed files with 25 additions and 22 deletions.
12 changes: 6 additions & 6 deletions arm9/source/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,21 +427,21 @@ void drawKeyboard(int layout) {

if(layout == 0) {
for(unsigned i=0;i<keys123.size();i++) {
printTextTinted(keys123[i].character, TextColor::gray, xPos + keys123[i].x + 16 - (getTextWidth(keys123[i].character) / 2), 192 - keyboard.height + keys123[i].y + 8, false, true);
printTextTinted(keys123[i].character, TextColor::white, xPos + keys123[i].x + 16 - (getTextWidth(keys123[i].character) / 2), 192 - keyboard.height + keys123[i].y + 8, false, true);
}
} else if(layout == 1) {
for(unsigned i=0;i<keysABC.size();i++) {
printTextTinted(keysABC[i].character, TextColor::gray, xPos + keysABC[i].x + 16 - (getTextWidth(keysABC[i].character) / 2), 192 - keyboard.height + keysABC[i].y + 8, false, true);
printTextTinted(keysABC[i].character, TextColor::white, xPos + keysABC[i].x + 16 - (getTextWidth(keysABC[i].character) / 2), 192 - keyboard.height + keysABC[i].y + 8, false, true);
}
printTextTinted("a/A", TextColor::gray, xPos + keysSpecialKana[0].x + 16 - (getTextWidth("a/A") / 2), 192 - keyboard.height + keysSpecialKana[0].y + 8, false, true);
printTextTinted("a/A", TextColor::white, xPos + keysSpecialKana[0].x + 16 - (getTextWidth("a/A") / 2), 192 - keyboard.height + keysSpecialKana[0].y + 8, false, true);
} else if(layout == 2) {
for(unsigned i=0;i<keysAIU.size();i++) {
std::u16string str;
str += (katakana ? tokatakana(keysAIU[i].character[0]) : keysAIU[i].character[0]);
printTextTinted(str, TextColor::gray, xPos + keysAIU[i].x + 16 - (getTextWidth(str) / 2), 192 - keyboard.height + keysAIU[i].y + 8, false, true);
printTextTinted(str, TextColor::white, xPos + keysAIU[i].x + 16 - (getTextWidth(str) / 2), 192 - keyboard.height + keysAIU[i].y + 8, false, true);
}
printTextTinted(katakana ? "ッ゙゚" : "っ゙゚", TextColor::gray, xPos + keysSpecialKana[0].x + 16 - (getTextWidth(katakana ? "ッ゙゚" : "っ゙゚") / 2), 192 - keyboard.height + keysSpecialKana[0].y + 8, false, true);
printTextTinted(katakana ? "" : "", TextColor::gray, xPos + keysSpecialKana[1].x + 16 - (getTextWidth(katakana ? "" : "") / 2), 192 - keyboard.height + keysSpecialKana[1].y + 8, false, true);
printTextTinted(katakana ? "ッ゙゚" : "っ゙゚", TextColor::white, xPos + keysSpecialKana[0].x + 16 - (getTextWidth(katakana ? "ッ゙゚" : "っ゙゚") / 2), 192 - keyboard.height + keysSpecialKana[0].y + 8, false, true);
printTextTinted(katakana ? "" : "", TextColor::white, xPos + keysSpecialKana[1].x + 16 - (getTextWidth(katakana ? "" : "") / 2), 192 - keyboard.height + keysSpecialKana[1].y + 8, false, true);
} else if(layout == 3) {
for(unsigned i=0;i<keysQWERTY.size();i++) {
std::string str;
Expand Down
2 changes: 1 addition & 1 deletion arm9/source/loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void loadLoadingLogo(void) {

void showLoadingLogo(void) {
angle = 0;
oamSet(&oamSub, 127, 112, 80, 0, 15, SpriteSize_32x32, SpriteColorFormat_Bmp, logoGfx, 0, false, false, false, false, false);
oamSet(&oamSub, 127, 96, 64, 0, 15, SpriteSize_32x32, SpriteColorFormat_Bmp, logoGfx, 0, true, false, false, false, false);
oamUpdate(&oamSub);
irqSet(IRQ_VBLANK, loadingAnimation);
}
Expand Down
13 changes: 7 additions & 6 deletions arm9/source/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ void drawBoxScreen(void) {
}

std::string boxBgPath(bool top, int box) {
box = 0;
if(top) return (wideScreen ? "/graphics/box/chestWide.gfx" : "/graphics/box/chest.gfx");
std::string game;
switch(save->version()) {
Expand Down Expand Up @@ -346,7 +347,7 @@ void drawBox(bool top) {
drawImage((top && wideScreen) ? 17 : 5, 15, bankBox, top, false);

// Print box name
printTextCenteredTintedMaxW((top ? Banks::bank->boxName(currentBankBox) : save->boxName(currentSaveBox)), 110 * (top ? WIDE_SCALE : 1), 1, TextColor::gray, boxTitleX, top ? 20 : boxTitleY, top, false, top ? WIDE_SCALE : 1);
printTextCenteredTintedMaxW((top ? Banks::bank->boxName(currentBankBox) : save->boxName(currentSaveBox)), 110 * (top ? WIDE_SCALE : 1), 1, TextColor::white, boxTitleX, top ? 20 : boxTitleY, top, false, top ? WIDE_SCALE : 1);

if(!top) {
drawImage(boxButton.width+5, 192-search.height, search, false, false);
Expand All @@ -361,16 +362,16 @@ void drawPokemonInfo(const PKX &pkm) {

if(pkm.species() > 0 && pkm.species() < 650) {
// Show shiny star if applicable
if(pkm.shiny()) drawImageScaled(170 + (69 * WIDE_SCALE), 45, WIDE_SCALE, 1, shiny, true, false);
if(pkm.shiny()) drawImageScaled(170 + (69 * WIDE_SCALE), 45, WIDE_SCALE, 1, shiny, true, true);

// Print Pokédex number
char str[9];
snprintf(str, sizeof(str), "%s%.3i", i18n::localize(Config::getLang("lang"), "dexNo").c_str(), pkm.species());
printTextTintedScaled(str, WIDE_SCALE, 1, TextColor::gray, 170, 8, true, true);
printTextTintedScaled(str, WIDE_SCALE, 1, TextColor::white, 170, 8, true, true);

// Print name
if(pkm.nicknamed()) printTextTintedMaxW(pkm.nickname(), 80 * WIDE_SCALE, 1, (pkm.gender() ? (pkm.gender() == 1 ? TextColor::red : TextColor::gray) : TextColor::blue), 170, 25, true, true, WIDE_SCALE);
else printTextTintedMaxW(i18n::species(Config::getLang("lang"), pkm.species()), 80 * WIDE_SCALE, 1, (pkm.gender() ? (pkm.gender() == 1 ? TextColor::red : TextColor::gray) : TextColor::blue), 170, 25, true, true, WIDE_SCALE);
if(pkm.nicknamed()) printTextTintedMaxW(pkm.nickname(), 80 * WIDE_SCALE, 1, (pkm.gender() ? (pkm.gender() == 1 ? TextColor::red : TextColor::white) : TextColor::blue), 170, 25, true, true, WIDE_SCALE);
else printTextTintedMaxW(i18n::species(Config::getLang("lang"), pkm.species()), 80 * WIDE_SCALE, 1, (pkm.gender() ? (pkm.gender() == 1 ? TextColor::red : TextColor::white) : TextColor::blue), 170, 25, true, true, WIDE_SCALE);

// Draw types
int type = (pkm.generation() < Generation::FIVE && pkm.type1() > 8) ? pkm.type1()-1 : pkm.type1();
Expand All @@ -381,7 +382,7 @@ void drawPokemonInfo(const PKX &pkm) {
}

// Print Level
printTextTintedScaled(i18n::localize(Config::getLang("lang"), "lv")+std::to_string(pkm.level()), WIDE_SCALE, 1, TextColor::gray, 170, 57, true, true);
printTextTintedScaled(i18n::localize(Config::getLang("lang"), "lv")+std::to_string(pkm.level()), WIDE_SCALE, 1, TextColor::white, 170, 57, true, true);
}
}

Expand Down
2 changes: 2 additions & 0 deletions arm9/source/utils/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ void Config::setString(const std::string &key, const std::string &v) {
}

Language Config::getLang(const std::string &key) {
return Language::BRH;

if(!configJson.contains(key) || !configJson[key].is_string()) {
return sysLang();
}
Expand Down
16 changes: 8 additions & 8 deletions arm9/source/utils/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
mm_sound_effect Sound::click, Sound::back;

void Sound::load(const char *path) {
char realPath[PATH_MAX];
if(access(path, F_OK) == 0) {
strcpy(realPath, path);
} else {
strcpy(realPath, "nitro:/sound/sfx.msl");
}
mmInitDefault(realPath);
// char realPath[PATH_MAX];
// if(access(path, F_OK) == 0) {
// strcpy(realPath, path);
// } else {
// strcpy(realPath, "nitro:/sound/sfx.msl");
// }
mmInitDefault("nitro:/sound/center1.msl");

mmLoadEffect(SFX_BACK);
mmLoadEffect(SFX_CLICK);
Expand All @@ -45,5 +45,5 @@ void Sound::load(const char *path) {
}

void Sound::play(mm_sound_effect &sound) {
if(Config::getBool("playSfx")) mmEffectEx(&sound);
/*if(Config::getBool("playSfx"))*/ mmEffectEx(&sound);
}
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger:
branches:
include: ['*']
exclude: [translation]
exclude: [translation, '2020-04-01']
tags:
include: ['*']

Expand Down
Binary file modified graphics/graphics/arrowBlue.bmp
Binary file not shown.
Binary file modified graphics/graphics/arrowRed.bmp
Binary file not shown.
Binary file modified graphics/graphics/arrowYellow.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/0.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/1.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/10.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/11.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/12.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/13.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/14.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/15.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/16.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/17.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/18.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/19.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/2.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/20.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/21.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/22.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/23.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/24.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/25.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/3.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/4.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/5.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/6.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/7.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/8.bmp
Binary file not shown.
Binary file modified graphics/graphics/ball/9.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/bw/0.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/chest.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/chestWide.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/dp/0.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/e/0.bmp
Binary file not shown.
Binary file modified graphics/graphics/box/rs/0.bmp
Binary file not shown.
Binary file modified graphics/graphics/boxBgTop.bmp
Binary file not shown.
Binary file modified graphics/graphics/boxBgTopWide.bmp
Binary file not shown.
Binary file modified graphics/graphics/boxButton.bmp
Binary file not shown.
Binary file modified graphics/graphics/icon.bmp
Binary file not shown.
Binary file modified graphics/graphics/infoBox.bmp
Binary file not shown.
Binary file modified graphics/graphics/item.bmp
Binary file not shown.
Binary file modified graphics/graphics/keyboardKana.bmp
Binary file not shown.
Binary file modified graphics/graphics/keyboardKey.bmp
Binary file not shown.
Binary file modified graphics/graphics/keyboardQWERTY.bmp
Binary file not shown.
Binary file modified graphics/graphics/listBg.bmp
Binary file not shown.
Binary file modified graphics/graphics/menuBg.bmp
Binary file not shown.
Binary file modified graphics/graphics/menuButton.bmp
Binary file not shown.
Binary file modified graphics/graphics/menuButtonBlue.bmp
Binary file not shown.
Binary file modified graphics/graphics/menuIconSheet.bmp
Binary file not shown.
Binary file modified graphics/graphics/party.bmp
Binary file not shown.
Binary file modified graphics/graphics/search.bmp
Binary file not shown.
Binary file modified graphics/graphics/shiny.bmp
Binary file not shown.
Binary file modified icon.bmp
Binary file not shown.
Binary file modified nitrofiles/graphics/font.nftr
Binary file not shown.
Binary file modified resources/nftr tools/font.bmp
Binary file not shown.
Binary file modified resources/nftr tools/font.xcf
Binary file not shown.
Binary file modified sound/back.wav
Binary file not shown.
Binary file added sound/center1.bak
Binary file not shown.
Binary file modified sound/center1.mod
Binary file not shown.
Binary file modified sound/click.wav
Binary file not shown.

0 comments on commit 16454e3

Please sign in to comment.