Skip to content

Commit

Permalink
Changed Alien Blaster input keys to use touchscreen to navigate menus
Browse files Browse the repository at this point in the history
  • Loading branch information
pelya committed Jul 29, 2010
1 parent efc1c42 commit ebaf476
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions alienblaster/AppSettings.cfg
@@ -1,4 +1,4 @@
LibSdlVersion=1.2
LibSdlVersion=1.3
AppName="Alien Blaster"
AppFullName=de.schwardtnet.alienblaster
ScreenOrientation=h
Expand All @@ -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'
4 changes: 2 additions & 2 deletions 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"
Expand Down
3 changes: 0 additions & 3 deletions alienblaster/project/jni/application/alienblaster/input.cpp
Expand Up @@ -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;
}

Expand Down
5 changes: 3 additions & 2 deletions alienblaster/project/jni/application/alienblaster/racer.cpp
Expand Up @@ -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 ) {
Expand All @@ -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;
Expand Down
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion alienblaster/project/jni/sdl

0 comments on commit ebaf476

Please sign in to comment.