Fixed N3DS Speedup option not working

This commit is contained in:
DavidSM64 2015-11-15 22:38:00 -06:00
parent 30dbbb70b8
commit f039485e9c
3 changed files with 9 additions and 19 deletions

View file

@ -1,6 +1,6 @@
#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];
u8 currentMenu = 0;
@ -553,10 +553,6 @@ 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);
setTile(TILE_DIRT,x,y);
return 1;
}
else if(item->id == ITEM_STONE){
setTile(TILE_ROCK,x,y);
--item->countLevel;
} break;
case TILE_SAND:
if(item->id == ITEM_CACTUS){
@ -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);
setTile(TILE_DIRT,x,y);
return 1;
}
else if(item->id == ITEM_STONE){
setTile(TILE_ROCK,x,y);
--item->countLevel;
}
break;
} break;
case TILE_DIRT:
if(item->id == TOOL_HOE && playerUseEnergy(4-item->countLevel)){
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);
setTile(TILE_HOLE,x,y);
return 1;
}else if(item->id == ITEM_STONE){
setTile(TILE_ROCK,x,y);
--item->countLevel;
} break;
case TILE_HOLE:
case TILE_WATER:

View file

@ -581,12 +581,12 @@ void tickMenu(int menu){
case MENU_SETTINGS:
if (k_up.clicked){
--currentSelection;
if(currentSelection == 3 && !(MODEL_3DS & 6)) --currentSelection;
if(currentSelection == 3 && !((MODEL_3DS & 6) != 0)) --currentSelection;
if(currentSelection < 0)currentSelection=4;
}
if (k_down.clicked){
++currentSelection;
if(currentSelection == 3 && !(MODEL_3DS & 6)) ++currentSelection;
if(currentSelection == 3 && !((MODEL_3DS & 6) != 0)) ++currentSelection;
if(currentSelection > 4)currentSelection=0;
}
if(k_decline.clicked){
@ -623,7 +623,7 @@ void tickMenu(int menu){
shouldRenderDebug = !shouldRenderDebug; // toggle option
break;
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
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 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);
else drawSizedTextColor("Off",142, ((8 + i) * 32 - 190) >> 1,2.0, 0xDF0000FF);
} else {

View file

@ -204,6 +204,7 @@ void clearScreen(int* data, u8 fill, int size) {
char debugText[34];
char bossHealthText[34];
int main() {
initCfgu();
CFGU_GetSystemModel(&MODEL_3DS);
FILE * file;
shouldRenderDebug = true;
@ -357,6 +358,7 @@ int main() {
sf2d_free_texture(minimap[4]);
freeSounds();
csndExit();
exitCfgu();
sf2d_fini();
return 0;
}