Skip to content
Browse files

Changed Alien Blaster input keys to use touchscreen to navigate menus

  • Loading branch information...
1 parent efc1c42 commit ebaf4766e04c1585c1052d98d3f9d86e065a776b @pelya committed Jul 29, 2010
View
6 alienblaster/AppSettings.cfg
@@ -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'
View
4 alienblaster/project/AndroidManifest.xml
@@ -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"
View
3 alienblaster/project/jni/application/alienblaster/input.cpp
@@ -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;
}
View
5 alienblaster/project/jni/application/alienblaster/racer.cpp
@@ -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;
View
6 alienblaster/project/jni/application/alienblaster/surfaceDB.cpp
@@ -83,16 +83,16 @@ 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 ) {
SDL_FreeSurface(newSurface);
newSurface = hwSurface;
}
- SDL_SetColorKey( newSurface, SDL_SRCCOLORKEY,
- SDL_MapRGB(newSurface->format, transR, transG, transB) );
-
surfaceDB[ fn ] = SdlCompat_CreateAcceleratedSurface( newSurface );
SDL_FreeSurface(newSurface);
View
2 alienblaster/project/jni/sdl

0 comments on commit ebaf476

Please sign in to comment.
Something went wrong with that request. Please try again.