Fixed N3DS Speedup option not working
This commit is contained in:
parent
30dbbb70b8
commit
f039485e9c
3 changed files with 9 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
|
|
||||||
char versionText[34] = "BETA BUILD 5 (pre 1.0)";
|
char versionText[34] = "BETA BUILD 5.01 (pre 1.0)";
|
||||||
char fpsstr[34];
|
char fpsstr[34];
|
||||||
u8 currentMenu = 0;
|
u8 currentMenu = 0;
|
||||||
|
|
||||||
|
@ -553,11 +553,7 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
if(rand()%5==0)addEntityToList(newItemEntity(newItem(ITEM_SEEDS,1),(x<<4)+8, (y<<4)+8,currentLevel),&eManager);
|
if(rand()%5==0)addEntityToList(newItemEntity(newItem(ITEM_SEEDS,1),(x<<4)+8, (y<<4)+8,currentLevel),&eManager);
|
||||||
setTile(TILE_DIRT,x,y);
|
setTile(TILE_DIRT,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} break;
|
||||||
else if(item->id == ITEM_STONE){
|
|
||||||
setTile(TILE_ROCK,x,y);
|
|
||||||
--item->countLevel;
|
|
||||||
}break;
|
|
||||||
case TILE_SAND:
|
case TILE_SAND:
|
||||||
if(item->id == ITEM_CACTUS){
|
if(item->id == ITEM_CACTUS){
|
||||||
setTile(TILE_SAPLING_CACTUS,x,y);
|
setTile(TILE_SAPLING_CACTUS,x,y);
|
||||||
|
@ -568,12 +564,7 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
addEntityToList(newItemEntity(newItem(ITEM_SAND,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
addEntityToList(newItemEntity(newItem(ITEM_SAND,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
||||||
setTile(TILE_DIRT,x,y);
|
setTile(TILE_DIRT,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} break;
|
||||||
else if(item->id == ITEM_STONE){
|
|
||||||
setTile(TILE_ROCK,x,y);
|
|
||||||
--item->countLevel;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TILE_DIRT:
|
case TILE_DIRT:
|
||||||
if(item->id == TOOL_HOE && playerUseEnergy(4-item->countLevel)){
|
if(item->id == TOOL_HOE && playerUseEnergy(4-item->countLevel)){
|
||||||
setTile(TILE_FARM,x,y);
|
setTile(TILE_FARM,x,y);
|
||||||
|
@ -583,9 +574,6 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
||||||
addEntityToList(newItemEntity(newItem(ITEM_DIRT,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
addEntityToList(newItemEntity(newItem(ITEM_DIRT,1), (x<<4)+8, (y<<4)+8, currentLevel), &eManager);
|
||||||
setTile(TILE_HOLE,x,y);
|
setTile(TILE_HOLE,x,y);
|
||||||
return 1;
|
return 1;
|
||||||
}else if(item->id == ITEM_STONE){
|
|
||||||
setTile(TILE_ROCK,x,y);
|
|
||||||
--item->countLevel;
|
|
||||||
} break;
|
} break;
|
||||||
case TILE_HOLE:
|
case TILE_HOLE:
|
||||||
case TILE_WATER:
|
case TILE_WATER:
|
||||||
|
|
|
@ -581,12 +581,12 @@ void tickMenu(int menu){
|
||||||
case MENU_SETTINGS:
|
case MENU_SETTINGS:
|
||||||
if (k_up.clicked){
|
if (k_up.clicked){
|
||||||
--currentSelection;
|
--currentSelection;
|
||||||
if(currentSelection == 3 && !(MODEL_3DS & 6)) --currentSelection;
|
if(currentSelection == 3 && !((MODEL_3DS & 6) != 0)) --currentSelection;
|
||||||
if(currentSelection < 0)currentSelection=4;
|
if(currentSelection < 0)currentSelection=4;
|
||||||
}
|
}
|
||||||
if (k_down.clicked){
|
if (k_down.clicked){
|
||||||
++currentSelection;
|
++currentSelection;
|
||||||
if(currentSelection == 3 && !(MODEL_3DS & 6)) ++currentSelection;
|
if(currentSelection == 3 && !((MODEL_3DS & 6) != 0)) ++currentSelection;
|
||||||
if(currentSelection > 4)currentSelection=0;
|
if(currentSelection > 4)currentSelection=0;
|
||||||
}
|
}
|
||||||
if(k_decline.clicked){
|
if(k_decline.clicked){
|
||||||
|
@ -623,7 +623,7 @@ void tickMenu(int menu){
|
||||||
shouldRenderDebug = !shouldRenderDebug; // toggle option
|
shouldRenderDebug = !shouldRenderDebug; // toggle option
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if(MODEL_3DS & 6){ // detect if user is using a New 3DS
|
if((MODEL_3DS & 6) != 0){ // detect if user is using a New 3DS
|
||||||
shouldSpeedup = !shouldSpeedup; // toggle option
|
shouldSpeedup = !shouldSpeedup; // toggle option
|
||||||
osSetSpeedupEnable(shouldSpeedup);
|
osSetSpeedupEnable(shouldSpeedup);
|
||||||
}
|
}
|
||||||
|
@ -1146,7 +1146,7 @@ void renderMenu(int menu,int xscr,int yscr){
|
||||||
else drawSizedTextColor("Off",142, ((8 + i) * 32 - 190) >> 1,2.0, 0xDF0000FF);
|
else drawSizedTextColor("Off",142, ((8 + i) * 32 - 190) >> 1,2.0, 0xDF0000FF);
|
||||||
} else if(i == 3){
|
} else if(i == 3){
|
||||||
|
|
||||||
if(MODEL_3DS & 6){ // detect if user is using a New 3DS
|
if((MODEL_3DS & 6) != 0){ // detect if user is using a New 3DS
|
||||||
if(shouldSpeedup) drawSizedTextColor("On",142, ((8 + i) * 32 - 190) >> 1,2.0, 0x00DF00FF);
|
if(shouldSpeedup) drawSizedTextColor("On",142, ((8 + i) * 32 - 190) >> 1,2.0, 0x00DF00FF);
|
||||||
else drawSizedTextColor("Off",142, ((8 + i) * 32 - 190) >> 1,2.0, 0xDF0000FF);
|
else drawSizedTextColor("Off",142, ((8 + i) * 32 - 190) >> 1,2.0, 0xDF0000FF);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -204,6 +204,7 @@ void clearScreen(int* data, u8 fill, int size) {
|
||||||
char debugText[34];
|
char debugText[34];
|
||||||
char bossHealthText[34];
|
char bossHealthText[34];
|
||||||
int main() {
|
int main() {
|
||||||
|
initCfgu();
|
||||||
CFGU_GetSystemModel(&MODEL_3DS);
|
CFGU_GetSystemModel(&MODEL_3DS);
|
||||||
FILE * file;
|
FILE * file;
|
||||||
shouldRenderDebug = true;
|
shouldRenderDebug = true;
|
||||||
|
@ -357,6 +358,7 @@ int main() {
|
||||||
sf2d_free_texture(minimap[4]);
|
sf2d_free_texture(minimap[4]);
|
||||||
freeSounds();
|
freeSounds();
|
||||||
csndExit();
|
csndExit();
|
||||||
|
exitCfgu();
|
||||||
sf2d_fini();
|
sf2d_fini();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue