Changed Alien Blaster input keys to use touchscreen to navigate menus

This commit is contained in:
pelya
2010-07-29 18:27:53 +03:00
parent efc1c424d8
commit ebaf4766e0
6 changed files with 12 additions and 14 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
LibSdlVersion=1.2
LibSdlVersion=1.3
AppName="Alien Blaster"
AppFullName=de.schwardtnet.alienblaster
ScreenOrientation=h
@@ -9,8 +9,8 @@ AppUsesMouse=n
AppNeedsArrowKeys=y
AppUsesJoystick=n
MultiABI=n
AppVersionCode=110003
AppVersionName="1.1.0.p3"
AppVersionCode=110004
AppVersionName="1.1.0.4"
CompiledLibraries="sdl_mixer sdl_image"
AppCflags='-finline-functions -O2'
ReadmeText='^You can press "Home" now - the data will be downloaded in background^In game press "Menu" for secondary fire, "Volume Up/Down" to cycle weapons^If your phone doesnt have joystick or trackball the accelerometer will be used'
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.schwardtnet.alienblaster"
android:versionCode="110003"
android:versionName="1.1.0.p3"
android:versionCode="110004"
android:versionName="1.1.0.4"
>
<application android:label="@string/app_name"
android:icon="@drawable/icon"
@@ -102,9 +102,6 @@ const SDLKey Input::translate(const SDL_Event& event) {
if (event.type == SDL_JOYBUTTONDOWN || event.type == SDL_JOYBUTTONUP) {
return (SDLKey) (1040 + event.jbutton.button);
}
if (event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP) {
return SDLK_LCTRL; // settings->getPlayerEventKeys(0).find(PE_FIRE_WEAPONS)->second;
}
return (SDLKey) 0;
}
@@ -1101,7 +1101,8 @@ void Racer::handlePlayerEvent( PlayerEvent pEvent, bool keyDown ) {
case PE_DOWN: if ( keyDown ) backwards = true; else backwards = false; break;
case PE_LEFT: if ( keyDown ) left = true; else left = false; break;
case PE_RIGHT: if ( keyDown ) right = true; else right = false; break;
case PE_FIRE_WEAPONS: if ( keyDown ) fireWeapons = true; else fireWeapons = false; break;
case PE_FIRE_SPECIALS:// PE_FIRE_WEAPONS:
if ( keyDown ) fireWeapons = true; else fireWeapons = false; break;
case PE_CHOOSE_WEAPON_SECONDARY:
{
if ( !keyDown ) {
@@ -1116,7 +1117,7 @@ void Racer::handlePlayerEvent( PlayerEvent pEvent, bool keyDown ) {
}
break;
}
case PE_FIRE_SPECIALS:
case PE_FIRE_WEAPONS: // PE_FIRE_SPECIALS:
{
if ( keyDown ) {
useSpecial = true;
@@ -83,6 +83,9 @@ SdlCompat_AcceleratedSurface *SurfaceDB::loadSurface( string fn, bool alpha ) {
exit(1);
}
SDL_SetColorKey( newSurface, SDL_SRCCOLORKEY,
SDL_MapRGB(newSurface->format, transR, transG, transB) );
SDL_Surface * hwSurface = SDL_DisplayFormat(newSurface);
if( hwSurface ) {
@@ -90,9 +93,6 @@ SdlCompat_AcceleratedSurface *SurfaceDB::loadSurface( string fn, bool alpha ) {
newSurface = hwSurface;
}
SDL_SetColorKey( newSurface, SDL_SRCCOLORKEY,
SDL_MapRGB(newSurface->format, transR, transG, transB) );
surfaceDB[ fn ] = SdlCompat_CreateAcceleratedSurface( newSurface );
SDL_FreeSurface(newSurface);
+1 -1
View File
@@ -1 +1 @@
../sdl/sdl-1.2
../sdl/sdl-1.3