From e2c24bda95433ebc9e8a81d12b844ce9f06c3a16 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 14 Mar 2016 00:07:28 +0000 Subject: [PATCH] Android stuff. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5661 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Android.mk | 6 +- polymer/eduke32/build/src/polymost.c | 2 - polymer/eduke32/eduke32.vcxproj | 1 + polymer/eduke32/eduke32.vcxproj.filters | 3 + .../eduke32/source/android/android-jni.cpp | 146 ++++++++---------- polymer/eduke32/source/android/in_android.h | 5 +- polymer/eduke32/source/common.c | 4 + polymer/eduke32/source/menus.c | 15 +- polymer/eduke32/source/menus.h | 2 +- 9 files changed, 84 insertions(+), 100 deletions(-) diff --git a/polymer/eduke32/Android.mk b/polymer/eduke32/Android.mk index 9d40ce9bd..035b0d0ec 100644 --- a/polymer/eduke32/Android.mk +++ b/polymer/eduke32/Android.mk @@ -145,9 +145,9 @@ GAME_SRC=source/game.c \ LOCAL_SRC_FILES = $(ANDROID_SRC) $(JAUDIO_SRC) $(JMACT_SRC) $(GAME_SRC) $(BUILD_SRC) -LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog -lOpenSLES -lz -L$(TOP_DIR)/openssl/libs/ -LOCAL_STATIC_LIBRARIES := libpng crypto -LOCAL_SHARED_LIBRARIES := ogg vorbis SDL2 SDL2_mixer libvpx drm +LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog +LOCAL_STATIC_LIBRARIES := touch +LOCAL_SHARED_LIBRARIES := ogg vorbis SDL2 SDL2_mixer libvpx # SDL2_image include $(BUILD_SHARED_LIBRARY) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index e76a2e301..69969ffb5 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -1267,8 +1267,6 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp if (!glinfo.bgra) { - texfmt = GL_RGBA; - for (int i=siz.x*siz.y, j=0; j + diff --git a/polymer/eduke32/eduke32.vcxproj.filters b/polymer/eduke32/eduke32.vcxproj.filters index a2f84872c..61cd119a9 100644 --- a/polymer/eduke32/eduke32.vcxproj.filters +++ b/polymer/eduke32/eduke32.vcxproj.filters @@ -525,6 +525,9 @@ eduke32\headers + + eduke32\headers + diff --git a/polymer/eduke32/source/android/android-jni.cpp b/polymer/eduke32/source/android/android-jni.cpp index eff870453..bbb81e367 100644 --- a/polymer/eduke32/source/android/android-jni.cpp +++ b/polymer/eduke32/source/android/android-jni.cpp @@ -30,29 +30,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "TouchControlsContainer.h" #include "JNITouchControlsUtils.h" +#include "inv.h" + using namespace touchcontrols; extern "C" { -#define DEFAULT_FADE_FRAMES 10 #include "in_android.h" #include "function.h" -enum dukeinv_t -{ - GET_STEROIDS, // 0 - GET_SHIELD, - GET_SCUBA, - GET_HOLODUKE, - GET_JETPACK, - GET_DUMMY1, // 5 - GET_ACCESS, - GET_HEATS, - GET_DUMMY2, - GET_FIRSTAID, - GET_BOOTS, // 10 - GET_MAX -}; +#define DEFAULT_FADE_FRAMES 10 #ifndef LOGI #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "DUKE", __VA_ARGS__)) @@ -82,9 +69,6 @@ TouchControls *tcAutomap; TouchStick *touchJoyLeft; WheelSelect *weaponWheel; -extern JNIEnv *env_; -JavaVM *jvm_; - Button *inv_buttons[GET_MAX]; std::string obbPath, gamePath; @@ -133,12 +117,15 @@ void AndroidShowWheel(bool show) if (show) { + int weap = AndroidRead(R_PLAYER_GOTWEAPON); + for (int n = 0; n < 10; n++) - weaponWheel->setSegmentEnabled(n, (AndroidRead(R_PLAYER_GOTWEAPON) >> n) & 0x1); + weaponWheel->setSegmentEnabled(n, (weap >> n) & 0x1); // Show inventory buttons tcGameWeapons->setAllButtonsEnabled(true); tcGameWeapons->fade(FADE_IN, 5); + weaponWheelVisible = true; AndroidTimer(0); @@ -234,6 +221,8 @@ namespace callbacks if (controlsContainer.editingControls) controlsContainer.editorButtonPress(); + + AndroidShowWheel(false); } void menu_select(int action, float x, float y, float dx, float dy) @@ -290,7 +279,7 @@ namespace callbacks if (weaponWheelVisible) return; - float const scale = .1f; + float const scale = 10.f; AndroidLook(dx * droidinput.yaw_sens * scale, -dy * droidinput.pitch_sens * scale * (droidinput.invertLook ? -1.f : 1.f)); } @@ -320,6 +309,8 @@ void AndroidTouchInit(int width, int height, const char *graphics_path) GLScaleWidth = (float)width; GLScaleHeight = (float)-height; + GLAspectRatio = GLScaleWidth/GLScaleHeight; + ScaleY = nearbyintf(((float) height/(float) width) * ScaleX); LOGI("initControls %d x %d,x path = %s", width, height, graphics_path); @@ -351,8 +342,8 @@ void AndroidTouchInit(int width, int height, const char *graphics_path) ///////////////////////// YES NO SCREEN ///////////////////// - tcYesNo->addControl(new Button("enter", RectF(16, 9, 18, 11), "yes", SDL_SCANCODE_RETURN)); - tcYesNo->addControl(new Button("esc", RectF(8, 9, 10, 11), "no", SDL_SCANCODE_ESCAPE)); + tcYesNo->addControl(new Button("enter", RectF(16, 9, 18, 11), "button_yes", SDL_SCANCODE_RETURN)); + tcYesNo->addControl(new Button("esc", RectF(8, 9, 10, 11), "button_no", SDL_SCANCODE_ESCAPE)); tcYesNo->signal_button.connect(sigc::ptr_fun(&callbacks::menu_button)); @@ -363,36 +354,34 @@ void AndroidTouchInit(int width, int height, const char *graphics_path) mouseMenu->setHideGraphics(true); tcMenuMain->addControl(mouseMenu); - Button *console_button = new Button("keyboard", "Development console", RectF(8, 0, 10, 2), "keyboard", KEY_SHOW_KBRD, false, true); + Button *console_button = new Button("keyboard", "Development console", RectF(8, 0, 10, 2), "button_console", KEY_SHOW_KBRD, false, true); tcMenuMain->addControl(console_button); - tcBackButton->addControl(new Button("menu_back", RectF(0, 0, 2, 2), "arrow_left", SDL_SCANCODE_ESCAPE)); + tcBackButton->addControl(new Button("menu_back", RectF(0, 0, 2, 2), "button_left", SDL_SCANCODE_ESCAPE)); tcBackButton->signal_button.connect(sigc::ptr_fun(&callbacks::menu_button)); // main controls - tcGameMain->setAlpha(droidinput.gameControlsAlpha); + tcGameMain->addControl(new Button("use", RectF(20, 4, 23, 7), "button_use", gamefunc_Open)); + tcGameMain->addControl(new Button("fire", RectF(20, 7, 23, 10), "button_fire", gamefunc_Fire)); + tcGameMain->addControl(new Button("jump", RectF(23, 6, 26, 9), "button_jump", gamefunc_Jump)); + tcGameMain->addControl(new Button("crouch", RectF(24, 12, 26, 14), "button_crouch", gamefunc_Crouch)); + tcGameMain->addControl(new Button("kick", "Mighty Foot", RectF(23, 3, 26, 6), "button_kick", gamefunc_Quick_Kick, false, true)); - tcGameMain->addControl(new Button("use", RectF(20, 4, 23, 7), "use", gamefunc_Open)); - tcGameMain->addControl(new Button("fire", RectF(20, 7, 23, 10), "fire2", gamefunc_Fire)); - tcGameMain->addControl(new Button("jump", RectF(23, 6, 26, 9), "jump", gamefunc_Jump)); - tcGameMain->addControl(new Button("crouch", RectF(24, 12, 26, 14), "crouch", gamefunc_Crouch)); - tcGameMain->addControl(new Button("kick", "Mighty Foot", RectF(23, 3, 26, 6), "boot", gamefunc_Quick_Kick, false, true)); - - Button *map_button = new Button("map", "Overhead map", RectF(6, 0, 8, 2), "map", gamefunc_Map, false, true); + Button *map_button = new Button("map", "Overhead map", RectF(6, 0, 8, 2), "button_map", gamefunc_Map, false, true); tcGameMain->addControl(map_button); - Button *inv_button = new Button("show_inventory", "Inventory", RectF(24, 0, 26, 2), "inv", KEY_SHOW_INVEN); + Button *inv_button = new Button("show_inventory", "Inventory", RectF(24, 0, 26, 2), "button_activate", KEY_SHOW_INVEN); tcGameMain->addControl(inv_button); - tcGameMain->addControl(new Button("next_weapon", "Next weapon", RectF(0, 3, 3, 5), "next_weap", gamefunc_Next_Weapon, false, true)); - tcGameMain->addControl(new Button("prev_weapon", "Previous weapon", RectF(0, 5, 3, 7), "prev_weap", gamefunc_Previous_Weapon, false, true)); - tcGameMain->addControl(new Button("quick_save", "Save game", RectF(22, 0, 24, 2), "save", KEY_QUICK_SAVE, false, true)); - tcGameMain->addControl(new Button("quick_load", "Load game", RectF(20, 0, 22, 2), "load", KEY_QUICK_LOAD, false, true)); + tcGameMain->addControl(new Button("next_weapon", "Next weapon", RectF(0, 3, 3, 5), "button_up", gamefunc_Next_Weapon, false, true)); + tcGameMain->addControl(new Button("prev_weapon", "Previous weapon", RectF(0, 5, 3, 7), "button_down", gamefunc_Previous_Weapon, false, true)); + tcGameMain->addControl(new Button("quick_save", "Save game", RectF(22, 0, 24, 2), "button_save", KEY_QUICK_SAVE, false, true)); + tcGameMain->addControl(new Button("quick_load", "Load game", RectF(20, 0, 22, 2), "button_load", KEY_QUICK_LOAD, false, true)); tcGameMain->addControl(console_button); // Left stick - touchJoyLeft = new TouchStick("stick", RectF(0, 7, 8, 16), "strafe_arrow"); + touchJoyLeft = new TouchStick("stick", RectF(0, 8, 8, 16), "button_move"); tcGameMain->addControl(touchJoyLeft); touchJoyLeft->signal_move.connect(sigc::ptr_fun(&callbacks::move)); touchJoyLeft->signal_double_tap.connect(sigc::ptr_fun(&callbacks::left_double_tap)); @@ -416,31 +405,29 @@ void AndroidTouchInit(int width, int height, const char *graphics_path) tcAutomap->signal_button.connect(sigc::ptr_fun(&callbacks::in_game)); tcAutomap->setAlpha(0.5); + // Weapons // Now inventory in the weapons control group! - inv_buttons[GET_JETPACK] = new Button("jetpack", RectF(0, 3, 2, 5), "jetpack", gamefunc_Jetpack, false, false, true); - inv_buttons[GET_FIRSTAID] = new Button("medkit", RectF(0, 5, 2, 7), "medkit", gamefunc_MedKit, false, false, true); - inv_buttons[GET_HEATS] = new Button("nightv", RectF(0, 7, 2, 9), "nightvision", gamefunc_NightVision, false, false, true); - inv_buttons[GET_HOLODUKE] = new Button("holoduke", RectF(0, 9, 2, 11), "holoduke", gamefunc_Holo_Duke, false, false, true); - inv_buttons[GET_STEROIDS] = new Button("steroids", RectF(0, 11, 2, 13), "steroids", gamefunc_Steroids, false, false, true); + weaponWheel = new WheelSelect("weapon_wheel", RectF(7, 2, 19, 14), "weapon_wheel_orange_blank", 10); + weaponWheel->signal_selected.connect(sigc::ptr_fun(&callbacks::select_weapon)); + weaponWheel->signal_enabled.connect(sigc::ptr_fun(&callbacks::show_wheel)); + tcGameWeapons->addControl(weaponWheel); + + inv_buttons[GET_FIRSTAID] = new Button("medkit", RectF(0, 5, 2, 7), "button_inv1", gamefunc_MedKit, false, false, true); + inv_buttons[GET_STEROIDS] = new Button("steroids", RectF(0, 11, 2, 13), "button_inv2", gamefunc_Steroids, false, false, true); + inv_buttons[GET_HOLODUKE] = new Button("holoduke", RectF(0, 9, 2, 11), "button_inv3", gamefunc_Holo_Duke, false, false, true); + inv_buttons[GET_JETPACK] = new Button("jetpack", RectF(0, 3, 2, 5), "button_inv4", gamefunc_Jetpack, false, false, true); + inv_buttons[GET_HEATS] = new Button("nightv", RectF(0, 7, 2, 9), "button_inv5", gamefunc_NightVision, false, false, true); tcGameWeapons->addControl(inv_buttons[GET_JETPACK]); tcGameWeapons->addControl(inv_buttons[GET_FIRSTAID]); tcGameWeapons->addControl(inv_buttons[GET_HEATS]); tcGameWeapons->addControl(inv_buttons[GET_HOLODUKE]); tcGameWeapons->addControl(inv_buttons[GET_STEROIDS]); -// tcGameWeapons->addControl(inv_button); // Inventory are the only buttons so safe to do this tcGameWeapons->signal_button.connect(sigc::ptr_fun(&callbacks::inv_button)); - // Weapons - weaponWheel = new WheelSelect("weapon_wheel", RectF(7, 2, 19, 14), "weapon_wheel_orange_blank", 10); - weaponWheel->signal_selected.connect(sigc::ptr_fun(&callbacks::select_weapon)); - weaponWheel->signal_enabled.connect(sigc::ptr_fun(&callbacks::show_wheel)); - tcGameWeapons->addControl(weaponWheel); - tcGameWeapons->setAlpha(0.9); - controlsContainer.addControlGroup(tcMenuMain); controlsContainer.addControlGroup(tcBackButton); @@ -451,7 +438,11 @@ void AndroidTouchInit(int width, int height, const char *graphics_path) controlsContainer.addControlGroup(tcBlankTap); tcGameMain->setAlpha(droidinput.gameControlsAlpha); - tcGameWeapons->setAlpha(droidinput.gameControlsAlpha); + tcGameWeapons->setAlpha(0.f); + tcGameWeapons->resetOutput(); + tcGameWeapons->setAllButtonsEnabled(false); + weaponWheel->setTapMode(false); + weaponWheelVisible = false; tcMenuMain->setAlpha(droidinput.gameControlsAlpha); tcBackButton->setAlpha(droidinput.gameControlsAlpha); @@ -539,12 +530,6 @@ void updateTouchScreenMode(touchscreemode_t mode) lastMode = mode; } - int inv = AndroidRead(R_PLAYER_INV_AMOUNT); - - for (int i = 0; i < GET_MAX; ++i) - if (inv_buttons[i]) - inv_buttons[i]->setAlpha(tcGameWeapons->getFadedAlpha() * ((inv & (1 << i)) ? 1.f : 0.3f)); - backButtonEnabled = !tcBlankTap->enabled && mode != TOUCH_SCREEN_MENU_NOBACK; tcBackButton->setEnabled(backButtonEnabled); } @@ -582,15 +567,23 @@ void AndroidDrawControls() if (tcGameMain) tcGameMain->setAlpha(droidinput.gameControlsAlpha); - if (tcGameWeapons) - tcGameWeapons->setAlpha(droidinput.gameControlsAlpha); - if (tcMenuMain) tcMenuMain->setAlpha(droidinput.gameControlsAlpha); if (tcBackButton) tcBackButton->setAlpha(droidinput.gameControlsAlpha); + int inv = AndroidRead(R_PLAYER_INV_AMOUNT); + + if (tcGameWeapons) + { + for (int i = 0; i < GET_MAX; ++i) + if (inv_buttons[i]) + inv_buttons[i]->setAlpha(tcGameWeapons->getFadedAlpha() * ((inv & (1 << i)) ? 1.f : 0.3f)); + + tcGameWeapons->setAlpha(droidinput.gameControlsAlpha); + } + controlsContainer.draw(); if (controlsContainer.editingControls) @@ -600,20 +593,16 @@ void AndroidDrawControls() #define EXPORT_ME __NDK_FPABI__ __attribute__((visibility("default"))) -JNIEnv *env_; - int argc = 1; const char *argv[32]; static inline const char *getGamePath() { return gamePath.c_str(); } -jint EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_init(JNIEnv *env, jobject thiz, jstring graphics_dir, +jint EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_i(JNIEnv *env, jobject thiz, jstring graphics_dir, jint audio_rate, jint audio_buffer_size, jobjectArray argsArray, jstring jduke3d_path) { - env_ = env; - droidinfo.audio_sample_rate = audio_rate; droidinfo.audio_buffer_size = audio_buffer_size; @@ -642,7 +631,7 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_init(JNIEnv *env, jobj LOGI("obbPath = %s", obbPath.c_str()); if (hasTouch) - AndroidTouchInit(droidinfo.screen_width, droidinfo.screen_height, (obbPath + "/assets/").c_str()); + AndroidTouchInit(droidinfo.screen_width, droidinfo.screen_height, "/assets/"); else LOGI("skipping touch input"); main(argc, (char **)argv); @@ -653,14 +642,13 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_init(JNIEnv *env, jobj __attribute__((visibility("default"))) jint JNI_OnLoad(JavaVM *vm, void *reserved) { LOGI("JNI_OnLoad"); - setTCJNIEnv(vm); - jvm_ = vm; + JNI_SetEnv(vm); return JNI_VERSION_1_4; } void EXPORT_ME -Java_com_voidpoint_duke3d_engine_NativeLib_keyPress(JNIEnv *env, jobject obj, jint down, jint keycode, jint unicode) +Java_com_voidpoint_duke3d_NativeLib_kp(JNIEnv *env, jobject obj, jint down, jint keycode, jint unicode) { LOGI("keypress %d", keycode); if (controlsContainer.isEditing()) @@ -674,7 +662,7 @@ Java_com_voidpoint_duke3d_engine_NativeLib_keyPress(JNIEnv *env, jobject obj, ji } -void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_touchEvent(JNIEnv *env, jobject obj, jint action, jint pid, +void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_te(JNIEnv *env, jobject obj, jint action, jint pid, jfloat x, jfloat y) { if (tcBackButton && backButtonEnabled) @@ -686,7 +674,7 @@ void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_touchEvent(JNIEnv *env } -void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_doAction(JNIEnv *env, jobject obj, jint state, jint action) +void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_da(JNIEnv *env, jobject obj, jint state, jint action) { LOGI("doAction %d %d", state, action); @@ -703,18 +691,18 @@ void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_doAction(JNIEnv *env, AndroidAction(state, action); } -void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_analogMove(JNIEnv *env, jobject obj, jfloat fwd, jfloat strafe) +void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_am(JNIEnv *env, jobject obj, jfloat fwd, jfloat strafe) { AndroidMove(fwd, strafe); } -void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_analogLook(JNIEnv *env, jobject obj, jfloat pitch, jfloat yaw) +void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_al(JNIEnv *env, jobject obj, jfloat pitch, jfloat yaw) { AndroidLookJoystick(yaw, pitch); } void EXPORT_ME -Java_com_voidpoint_duke3d_engine_NativeLib_setTouchSettings(JNIEnv *env, jobject obj, int other) +Java_com_voidpoint_duke3d_NativeLib_sts(JNIEnv *env, jobject obj, int other) { // TODO: defined names for these values hasTouch = other & 0x4000 ? true : false; @@ -730,14 +718,14 @@ Java_com_voidpoint_duke3d_engine_NativeLib_setTouchSettings(JNIEnv *env, jobject LOGI("setTouchSettings left_double_action = %d", droidinput.left_double_action); } -void EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_resetTouchSettings(JNIEnv *env, jobject obj) +void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_rts(JNIEnv *env, jobject obj) { controlsContainer.resetDefaults(); } std::string quickCommandString; -jint EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_quickCommand(JNIEnv *env, jobject obj, jstring command) +jint EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_qc(JNIEnv *env, jobject obj, jstring command) { const char *p = env->GetStringUTFChars(command, NULL); quickCommandString = std::string(p) + "\n"; @@ -746,7 +734,7 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_engine_NativeLib_quickCommand(JNIEnv *e } void EXPORT_ME -Java_com_voidpoint_duke3d_engine_NativeLib_setScreenSize(JNIEnv *env, jobject thiz, jint width, jint height) +Java_com_voidpoint_duke3d_NativeLib_sss(JNIEnv *env, jobject thiz, jint width, jint height) { droidinfo.screen_width = width; droidinfo.screen_height = height; diff --git a/polymer/eduke32/source/android/in_android.h b/polymer/eduke32/source/android/in_android.h index 5852472b7..513bca8dd 100644 --- a/polymer/eduke32/source/android/in_android.h +++ b/polymer/eduke32/source/android/in_android.h @@ -31,14 +31,11 @@ extern "C" // where do these numbers come from? #define ANDROIDMOVEFACTOR 6400 -#define ANDROIDLOOKFACTOR 160000 +#define ANDROIDLOOKFACTOR 1600 #define ANDROIDPITCHFACTORJOYSTICK 2000 #define ANDROIDYAWFACTORJOYSTICK 4000 - -#define MINCONTROLALPHA 0.25f - typedef enum { R_TOUCH_MODE, R_PLAYER_GOTWEAPON, diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index 8618f177f..032bc40ba 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -544,6 +544,7 @@ static void G_LoadAddon(void) g_selectedGrp = grp; } +#ifndef EDUKE32_TOUCH_DEVICES #if defined EDUKE32_OSX || defined __linux__ || defined EDUKE32_BSD static void G_AddSteamPaths(const char *basepath) { @@ -745,9 +746,11 @@ static void G_ParseSteamKeyValuesForPaths(const char *vdf) Bfree(vdfbufstart); } #endif +#endif void G_AddSearchPaths(void) { +#ifndef EDUKE32_TOUCH_DEVICES #if defined __linux__ || defined EDUKE32_BSD char buf[BMAX_PATH]; char *homepath = Bgethomedir(); @@ -879,6 +882,7 @@ void G_AddSearchPaths(void) addsearchpath_user(buf, SEARCHPATH_WW2GI); } #endif +#endif } void G_CleanupSearchPaths(void) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index a606d2151..720db96f6 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -286,7 +286,7 @@ MAKE_MENU_TOP_ENTRYLINK( "Options", MEF_MainMenu, MAIN_OPTIONS, MENU_OPTIONS ); MAKE_MENU_TOP_ENTRYLINK( "Help", MEF_MainMenu, MAIN_HELP, MENU_STORY ); #endif MAKE_MENU_TOP_ENTRYLINK( "Credits", MEF_MainMenu, MAIN_CREDITS, MENU_CREDITS ); -MAKE_MENU_TOP_ENTRYLINK( "Quit To Title", MEF_MainMenu, MAIN_QUITTOTITLE, MENU_QUITTOTITLE ); +MAKE_MENU_TOP_ENTRYLINK( "Return To Title", MEF_MainMenu, MAIN_QUITTOTITLE, MENU_QUITTOTITLE ); MAKE_MENU_TOP_ENTRYLINK( "Quit", MEF_MainMenu, MAIN_QUIT, MENU_QUIT ); #ifndef DROIDMENU MAKE_MENU_TOP_ENTRYLINK( "Quit Game", MEF_MainMenu, MAIN_QUITGAME, MENU_QUIT ); @@ -813,9 +813,6 @@ static MenuEntry_t *MEL_TOUCHSENS [] ={ &ME_Space2, &ME_TOUCHSETUP_INVERT, }; - -static MenuEntry_t *MEL_TOUCHBUTTONS [] ={ -}; #endif MAKE_MENU_TOP_ENTRYLINK( "Edit Buttons", MEF_CenterMenu, JOYSTICK_EDITBUTTONS, MENU_JOYSTICKBTNS ); @@ -1236,7 +1233,7 @@ static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, #ifdef DROIDMENU static MenuMenu_t M_TOUCHSETUP = MAKE_MENUMENU( "Touch Setup", &MMF_Top_Options, MEL_TOUCHSETUP ); static MenuMenu_t M_TOUCHSENS = MAKE_MENUMENU( "Sensitivity", &MMF_BigOptions, MEL_TOUCHSENS); -static MenuMenu_t M_TOUCHBUTTONS = MAKE_MENUMENU("Button Setup", &MMF_BigOptions, MEL_TOUCHBUTTONS); +static MenuPanel_t M_TOUCHBUTTONS ={ "Button Setup", MENU_TOUCHSETUP, MA_Return, MENU_TOUCHSETUP, MA_Advance, }; #endif static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Joystick Setup", &MMF_Top_Joystick_Network, MEL_JOYSTICKSETUP ); static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( "Joystick Buttons", &MMF_MouseJoySetupBtns, MEL_JOYSTICKBTNS ); @@ -1329,7 +1326,7 @@ static Menu_t Menus[] = { #ifdef DROIDMENU { &M_TOUCHSETUP, MENU_TOUCHSETUP, MENU_OPTIONS, MA_Return, Menu }, { &M_TOUCHSENS, MENU_TOUCHSENS, MENU_TOUCHSETUP, MA_Return, Menu }, - { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Menu }, + { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Panel }, #endif { &M_CONTROLS, MENU_CONTROLS, MENU_OPTIONS, MA_Return, Menu }, #ifdef USE_OPENGL @@ -2147,7 +2144,7 @@ static void M_PreMenuDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin) case MENU_QUITTOTITLE: fade_screen_black(1); - mgametextcenter(origin.x, origin.y + (90<<16), "Quit to Title?"); + mgametextcenter(origin.x, origin.y + (90<<16), "End game and return to title screen?"); #ifndef DROIDMENU mgametextcenter(origin.x, origin.y + (99<<16), "(Y/N)"); #endif @@ -2360,7 +2357,6 @@ static void M_PreMenuDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin) }; const char *body[] = { - "Alan Ondra", // testing "Bioman", // GTK work, APT repository and package upkeep "Brandon Bergren", // "Bdragon" - tiles.cfg "Charlie Honig", // "CONAN" - showview command @@ -2368,7 +2364,6 @@ static void M_PreMenuDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin) "David Koenig", // "Bargle" - Merged a couple of things from duke3d_w32 "Ed Coolidge", // Mapster32 improvements "Emile Belanger", // original Android work - "Ferry Landzaat", // ? (listed on the wiki page) "Hunter_rus", // tons of stuff "James Bentler", // Mapster32 improvements "Jasper Foreman", // netcode contributions @@ -2384,11 +2379,9 @@ static void M_PreMenuDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin) "Ozkan Sezer", // SDL/GTK version checking improvements "Peter Green", // "Plugwash" - dynamic remapping, custom gametypes "Peter Veenstra", // "Qbix" - port to 64-bit - "Randy Heit", // random snippets of ZDoom here and there "Robin Green", // CON array support "Ryan Gordon", // "icculus" - icculus.org Duke3D port sound code "Stephen Anthony", // early 64-bit porting work - "Thijs Leenders", // Android icon work "tueidj", // Wii port " ", }; diff --git a/polymer/eduke32/source/menus.h b/polymer/eduke32/source/menus.h index bab1292b1..2373c35f3 100644 --- a/polymer/eduke32/source/menus.h +++ b/polymer/eduke32/source/menus.h @@ -1,6 +1,6 @@ //------------------------------------------------------------------------- /* -Copyright (C) 2010 EDuke32 developers and contributors +Copyright (C) 2016 EDuke32 developers and contributors This file is part of EDuke32.