diff --git a/app/build.gradle b/app/build.gradle index 27c7acd..ed91acd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.drbeef.dvr" minSdkVersion 16 targetSdkVersion 19 - versionCode 3 - versionName '1.0.2' + versionCode 6 + versionName '1.0.5' } buildTypes { release { diff --git a/app/jni/prboom/p_pspr.c b/app/jni/prboom/p_pspr.c index afac1fc..b5e75e7 100644 --- a/app/jni/prboom/p_pspr.c +++ b/app/jni/prboom/p_pspr.c @@ -155,58 +155,64 @@ int weapon_preferences[2][NUMWEAPONS+1] = { int P_SwitchWeapon(player_t *player) { - int *prefer = weapon_preferences[demo_compatibility!=0]; // killough 3/22/98 + int prefer = player->readyweapon;//weapon_preferences[demo_compatibility!=0]; // killough 3/22/98 int currentweapon = player->readyweapon; int newweapon = currentweapon; int i = NUMWEAPONS+1; // killough 5/2/98 // killough 2/8/98: follow preferences and fix BFG/SSG bugs - do - switch (*prefer++) - { + //SB: Change to cycle through all (available) weapons + do { + if (++prefer == NUMWEAPONS+1) + { + prefer = 0; + } + + switch (prefer) { case 1: if (!player->powers[pw_strength]) // allow chainsaw override break; case 0: newweapon = wp_fist; - break; + break; case 2: if (player->ammo[am_clip]) newweapon = wp_pistol; - break; + break; case 3: if (player->weaponowned[wp_shotgun] && player->ammo[am_shell]) newweapon = wp_shotgun; - break; + break; case 4: if (player->weaponowned[wp_chaingun] && player->ammo[am_clip]) newweapon = wp_chaingun; - break; + break; case 5: if (player->weaponowned[wp_missile] && player->ammo[am_misl]) newweapon = wp_missile; - break; + break; case 6: if (player->weaponowned[wp_plasma] && player->ammo[am_cell] && - gamemode != shareware) + gamemode != shareware) newweapon = wp_plasma; - break; + break; case 7: if (player->weaponowned[wp_bfg] && gamemode != shareware && - player->ammo[am_cell] >= (demo_compatibility ? 41 : 40)) + player->ammo[am_cell] >= (demo_compatibility ? 41 : 40)) newweapon = wp_bfg; - break; + break; case 8: if (player->weaponowned[wp_chainsaw]) newweapon = wp_chainsaw; - break; + break; case 9: if (player->weaponowned[wp_supershotgun] && gamemode == commercial && - player->ammo[am_shell] >= (demo_compatibility ? 3 : 2)) + player->ammo[am_shell] >= (demo_compatibility ? 3 : 2)) newweapon = wp_supershotgun; - break; - } + break; + } + } while (newweapon==currentweapon && --i); // killough 5/2/98 return newweapon; } diff --git a/app/src/main/java/com/drbeef/dvr/MainActivity.java b/app/src/main/java/com/drbeef/dvr/MainActivity.java index efdacb6..1611c9e 100644 --- a/app/src/main/java/com/drbeef/dvr/MainActivity.java +++ b/app/src/main/java/com/drbeef/dvr/MainActivity.java @@ -161,7 +161,6 @@ public class MainActivity getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); requestWindowFeature(Window.FEATURE_NO_TITLE); - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index 8c9ce8c..c404b78 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index 3bd9ca6..5cb7c1e 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 99c1661..40a13a3 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index b92c771..9d9fd4d 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 67093e6..a3051bc 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ