Commits

rmtew committed 104d288

Fix BROGUEX_FEATURES references ifdef checks to specify android where applicable.

Comments (0)

Files changed (5)

BrogueCode/Buttons.c

 void drawButtonsInState(buttonState *state) {
 	short i;
 
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_drawButtonsInState(state);
 #endif
 	// Draw the buttons to the dbuf:
 				
 				state->buttonFocused = i;
 				if (event->eventType == MOUSE_DOWN) {
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 					broguex_buttonpress();
 #endif
 					state->buttonDepressed = i; // Keeps track of which button is down at the moment. Cleared on mouseup.
 						}
 					}
 					
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 					broguex_buttonpress();
 #endif
 
 	//overlayDisplayBuffer(dbuf, NULL); // hangs around
 	
 	restoreRNG;
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_exitbuttonloop();
 #endif
 	return button;
 		return;
 	}
 	
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_textdismissed(0);
 #endif
 	do {
 		}
 	} while (!(theEvent.eventType == KEYSTROKE && (theEvent.param1 == ACKNOWLEDGE_KEY || theEvent.param1 == ESCAPE_KEY)
 			   || theEvent.eventType == MOUSE_UP));
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_textdismissed(1);
 #endif
 }
 
 void waitForKeystrokeOrMouseClick() {
 	rogueEvent theEvent;
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_textdismissed(0);
 #endif
 	do {
 		nextBrogueEvent(&theEvent, false, false, false);
 	} while (theEvent.eventType != KEYSTROKE && theEvent.eventType != MOUSE_UP);
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_textdismissed(1);
 #endif
 }
 	
 	retVal = printTextBox(prompt, COLS/3, ROWS/3, COLS/3, &white, &interfaceBoxColor, rbuf, buttons, 2);
 	overlayDisplayBuffer(rbuf, NULL);
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 	broguex_promptdismissed();
 #endif
 	

BrogueCode/Items.c

 	return true;
 }
 
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 char displayInventoryInternal(unsigned short categoryMask,
 					  unsigned long requiredFlags,
 					  unsigned long forbiddenFlags,
 		
 		// Was an item selected?
 		if (highlightItemLine > -1 && (waitForAcknowledge || theEvent.shiftKey || theEvent.controlKey)) {
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 			broguex_showinventoryitem();
 #endif
 			do {
 					}
 				}
 			} while (actionKey == UP_KEY || actionKey == DOWN_KEY);
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 			broguex_hideinventoryitem();
 #endif
 		}

BrogueCode/MainMenu.c

 	initializeLaunchArguments(&rogue.nextGame, rogue.nextGamePath, &rogue.nextGameSeed);
 	
 	do {
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 		broguex_mainmenu_loop();
 #endif
 		switch (rogue.nextGame) {

PlatformCode/PlatformDefines.h

 #define printf(args...) __android_log_print(ANDROID_LOG_INFO, "Brogue", ## args)
 #endif
 
-#ifdef BROGUEX_FEATURES
+#if defined(BROGUEX_FEATURES) && defined(__ANDROID__)
 void broguex_mainmenu_loop();
 void broguex_showinventory();
 void broguex_hideinventory();