- Cycle through all available weapons
- Ensure phone orientation is fixed landscape
This commit is contained in:
Simon 2016-05-27 21:25:02 +01:00
parent 7fa8ea10f4
commit 5387a360b9
8 changed files with 25 additions and 20 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "com.drbeef.dvr" applicationId "com.drbeef.dvr"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 19 targetSdkVersion 19
versionCode 3 versionCode 6
versionName '1.0.2' versionName '1.0.5'
} }
buildTypes { buildTypes {
release { release {

View File

@ -155,16 +155,21 @@ int weapon_preferences[2][NUMWEAPONS+1] = {
int P_SwitchWeapon(player_t *player) 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 currentweapon = player->readyweapon;
int newweapon = currentweapon; int newweapon = currentweapon;
int i = NUMWEAPONS+1; // killough 5/2/98 int i = NUMWEAPONS+1; // killough 5/2/98
// killough 2/8/98: follow preferences and fix BFG/SSG bugs // killough 2/8/98: follow preferences and fix BFG/SSG bugs
do //SB: Change to cycle through all (available) weapons
switch (*prefer++) do {
if (++prefer == NUMWEAPONS+1)
{ {
prefer = 0;
}
switch (prefer) {
case 1: case 1:
if (!player->powers[pw_strength]) // allow chainsaw override if (!player->powers[pw_strength]) // allow chainsaw override
break; break;
@ -207,6 +212,7 @@ int P_SwitchWeapon(player_t *player)
newweapon = wp_supershotgun; newweapon = wp_supershotgun;
break; break;
} }
}
while (newweapon==currentweapon && --i); // killough 5/2/98 while (newweapon==currentweapon && --i); // killough 5/2/98
return newweapon; return newweapon;
} }

View File

@ -161,7 +161,6 @@ public class MainActivity
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 30 KiB