diff --git a/.gitmodules b/.gitmodules index f2d347fb8..23fb5e31d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,9 +18,6 @@ [submodule "project/jni/application/teeworlds/src"] path = project/jni/application/teeworlds/src url = https://github.com/pelya/teeworlds.git -[submodule "project/jni/application/c-dogs/src"] - path = project/jni/application/c-dogs/src - url = https://github.com/cxong/cdogs-sdl.git [submodule "project/jni/application/xserver/xserver"] path = project/jni/application/xserver/xserver url = https://github.com/pelya/xserver.git diff --git a/project/jni/application/c-dogs/.gitignore b/project/jni/application/c-dogs/.gitignore deleted file mode 100644 index b48f9b63a..000000000 --- a/project/jni/application/c-dogs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/AndroidData diff --git a/project/jni/application/c-dogs/AndroidAppSettings.cfg b/project/jni/application/c-dogs/AndroidAppSettings.cfg deleted file mode 100644 index cccb72ec6..000000000 --- a/project/jni/application/c-dogs/AndroidAppSettings.cfg +++ /dev/null @@ -1,237 +0,0 @@ -# The application settings for Android libSDL port - -# Specify application name (e.x. My Application) -AppName="C-Dogs" - -# Specify reversed site name of application (e.x. com.mysite.myapp) -AppFullName=cxong.cdogs - -# Application version code (integer) -AppVersionCode=101 - -# Application user-visible version name (string) -AppVersionName="1.01" - -# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' -# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu -# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped -# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - -# these files are put inside .apk package by build system -# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS -AppDataDownloadUrl="!!Game data|data.zip" - -# Reset SDL config when updating application to the new version (y) / (n) -ResetSdlConfigForThisVersion=n - -# Delete application data files when upgrading (specify file/dir paths separated by spaces) -DeleteFilesOnUpgrade="%" - -# Here you may type readme text, which will be shown during startup. Format is: -# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/ -ReadmeText='^Readme text' - -# libSDL version to use (1.2/1.3/2.0) -LibSdlVersion=1.2 - -# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape -ScreenOrientation=h - -# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer -InhibitSuspend=n - -# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only -# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32) -VideoDepthBpp=16 - -# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedDepthBuffer=n - -# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedStencilBuffer=n - -# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device -# you need this option only if you're developing 3-d app (y) or (n) -NeedGles2=n - -# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL, -# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n) -SwVideoMode=n - -# Application video output will be resized to fit into native device screen (y)/(n) -SdlVideoResize=y - -# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) -SdlVideoResizeKeepAspect=y - -# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - -# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) -CompatibilityHacks=n - -# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n) -CompatibilityHacksStaticInit=n - -# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n) -CompatibilityHacksTextInputEmulatesHwKeyboard=n - -# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n) -CompatibilityHacksPreventAudioChopping=n - -# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n) -CompatibilityHacksAppIgnoresAudioBufferSize=n - -# Hack for VCMI: preload additional shared libraries before aplication start -CompatibilityHacksAdditionalPreloadedSharedLibraries="" - -# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue - -# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n) -CompatibilityHacksSlowCompatibleEventQueue=n - -# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL -CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=n - -# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects. -# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n) -CompatibilityHacksProperUsageOfSDL_UpdateRects= - -# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user -AppUsesMouse=n - -# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) -AppNeedsTwoButtonMouse=n - -# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n) -ShowMouseCursor=n - -# Generate more touch events, by default SDL generates one event per one video frame, this is useful for drawing apps (y) or (n) -GenerateSubframeTouchEvents= - -# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n) -ForceRelativeMouseMode=n - -# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n) -AppNeedsArrowKeys=y - -# Application needs text input (y) or (n), enables button for text input on screen -AppNeedsTextInput=y - -# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1 -AppUsesJoystick=n - -# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n) -AppUsesSecondJoystick=n - -# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7 -AppUsesAccelerometer=n - -# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4 -AppUsesGyroscope=n - -# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0 -AppUsesMultitouch=n - -# Application records audio (it will use any available source, such a s microphone) -# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void); -# This option will add additional permission to Android manifest (y)/(n) -AppRecordsAudio=n - -# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n) -AccessSdCard= - -# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) -ImmersiveMode= - -# Application implements Android-specific routines to put to background, and will not draw anything to screen -# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them -# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) -# This option is reported to be buggy, sometimes failing to restore video state -NonBlockingSwapBuffers=n - -# Redefine common hardware keys to SDL keysyms -# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent -# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices -# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th) -# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA -RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE" - -# Number of virtual keyboard keys (currently 6 is maximum) -AppTouchscreenKeyboardKeysAmount=3 - -# Number of virtual keyboard keys that support autofire (currently 2 is maximum) -AppTouchscreenKeyboardKeysAmountAutoFire=0 - -# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) -RedefinedKeysScreenKb="RETURN RSHIFT TAB" - -# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu -RedefinedKeysScreenKbNames="Fire Weapons Map" - -# On-screen keys theme -# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick) -# 1 = Simple Theme by Beholder (white, with gamepad joystick) -# 2 = Sun by Sirea (yellow, with round joystick) -# 3 = Keen by Gerstrong (multicolor, with round joystick) -TouchscreenKeysTheme=1 - -# Redefine gamepad keys to SDL keysyms, button order is: -# A B X Y L1 R1 L2 R2 LThumb RThumb -RedefinedKeysGamepad="RETURN RSHIFT TAB TAB RSHIFT RETURN" - -# How long to show startup menu button, in msec, 0 to disable startup menu -StartupMenuButtonTimeout=0 - -# Menu items to hide from startup menu, available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout -HiddenMenuOptions='' - -# Menu items to show at startup - this is Java code snippet, leave empty for default -# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration() -# Available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout -FirstStartMenuOptions='' - -# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices, -# but .apk size is 2x bigger (y) / (n) / (x86) / (all) -MultiABI=all - -# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower -AppMinimumRAM=0 - -# Optional shared libraries to compile - removing some of them will save space -# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed -# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2 -CompiledLibraries="sdl_image sdl_mixer" - -# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) -CustomBuildScript=n - -# Aditional CFLAGS for application -AppCflags='-O2 -finline-functions -D__MACTYPES__ --include jni/application/android_debug.h' - -# Additional LDFLAGS for application -AppLdflags='' - -# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable -AppOverlapsSystemHeaders= - -# Build only following subdirs (empty will build all dirs, ignored with custom script) -AppSubdirsBuild='src/src src/src/cdogs src/src/json src/src/missions src/src/tinydir src/src/cdogs/hqx/src' - -# Exclude these files from build -AppBuildExclude='src/src/cdogsed.c src/src/cdogs/hqx/src/hqx.c' - -# Application command line parameters, including app name as 0-th param -AppCmdline='cdogs --fullscreen --screen=800x480' - -# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens -# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge -MinimumScreenSize=s - -# Your AdMob Publisher ID, (n) if you don't want advertisements -AdmobPublisherId=n - -# Your AdMob test device ID, to receive a test ad -AdmobTestDeviceId= - -# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER) -AdmobBannerSize= - diff --git a/project/jni/application/c-dogs/AndroidPreBuild.sh b/project/jni/application/c-dogs/AndroidPreBuild.sh deleted file mode 100755 index 7a6fde842..000000000 --- a/project/jni/application/c-dogs/AndroidPreBuild.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -echo "Patching..." -[ -e src/patched.flag ] || { patch -p1 -d src < android.diff && touch src/patched.flag || exit 1 ; } - -echo "Archiving data" -mkdir -p AndroidData -cd src -#git submodule update --init --recursive -cmake . -DCDOGS_DATA_DIR=\"./\" || { echo "Please install cmake: sudo apt-get install cmake" ; exit 1 ; } || exit 1 -zip -r ../AndroidData/data.zip doc dogfights graphics missions music sounds >/dev/null - -exit 0 - diff --git a/project/jni/application/c-dogs/android.diff b/project/jni/application/c-dogs/android.diff deleted file mode 100644 index 063787e32..000000000 --- a/project/jni/application/c-dogs/android.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/cdogs/files.h b/src/cdogs/files.h -index 2a231df..b42ce0d 100644 ---- a/src/cdogs/files.h -+++ b/src/cdogs/files.h -@@ -81,6 +81,8 @@ ssize_t f_read(FILE *f, void *buf, size_t size); - ssize_t f_read32(FILE *f, void *buf, size_t size); - ssize_t f_read16(FILE *f, void *buf, size_t size); - -+#undef swap32 -+#undef swap16 - void swap32 (void *d); - void swap16 (void *d); - -diff --git a/src/json/json.c b/src/json/json.c -index fb928d4..be53ea8 100644 ---- a/src/json/json.c -+++ b/src/json/json.c -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - - enum LEX_VALUE -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c44844e..3d1170d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -95,7 +95,7 @@ else() - endif() - endif() - --set(CDOGS_DATA_DIR "../") -+set(CDOGS_DATA_DIR "./") - set(CDOGS_CFG_DIR ".cdogs/") - SET(SOURCE_DIRECTORY ".") - SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ".") diff --git a/project/jni/application/c-dogs/icon.png b/project/jni/application/c-dogs/icon.png deleted file mode 120000 index 9f46a3c1c..000000000 --- a/project/jni/application/c-dogs/icon.png +++ /dev/null @@ -1 +0,0 @@ -src/build/linux/cdogs-icon.48.png \ No newline at end of file diff --git a/project/jni/application/c-dogs/readme.txt b/project/jni/application/c-dogs/readme.txt deleted file mode 100644 index d37c20e6a..000000000 --- a/project/jni/application/c-dogs/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -Quick compilation guide for Debian/Ubuntu (Windows is not supported, MacOsX should be okay though): -Download SDL Git repo from https://github.com/pelya/commandergenius, -install latest Android SDK, Android NDK r8b or newer, and "ant" tool (sudo apt-get install ant), -then launch commands: - git submodule update --init --recursive project/jni/application/c-dogs/src - rm project/jni/application/src - ln -s c-dogs project/jni/application/src - ./build.sh -That should do it. diff --git a/project/jni/application/c-dogs/src b/project/jni/application/c-dogs/src deleted file mode 160000 index 76772961e..000000000 --- a/project/jni/application/c-dogs/src +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76772961e67bc6a86e7a381f615de3b86c2bccd4 diff --git a/project/jni/application/lbreakout2/AndroidAppSettings.cfg b/project/jni/application/lbreakout2/AndroidAppSettings.cfg deleted file mode 100644 index 648843a0b..000000000 --- a/project/jni/application/lbreakout2/AndroidAppSettings.cfg +++ /dev/null @@ -1,288 +0,0 @@ -# The application settings for Android libSDL port - -# Specify application name (e.x. My Application) -AppName="LBreakout2" - -# Specify reversed site name of application (e.x. com.mysite.myapp) -AppFullName=net.sourceforge.lgames.lbreakout2 - -# Application version code (integer) -AppVersionCode=26501 - -# Application user-visible version name (string) -AppVersionName="2.6.5.01" - -# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' -# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu -# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped -# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - -# these files are put inside .apk package by build system -# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file -AppDataDownloadUrl="!App data size is 5 Mb|https://sourceforge.net/projects/libsdl-android/files/LBreakout2/lbreakout2-2.6.1-data.zip/download|http://sites.google.com/site/xpelyax/Home/lbreakout2-2.6.1-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/lbreakout2-2.6.1-data.zip" - -# Reset SDL config when updating application to the new version (y) / (n) -ResetSdlConfigForThisVersion=n - -# Delete application data files when upgrading (specify file/dir paths separated by spaces) -DeleteFilesOnUpgrade="" - -# Here you may type readme text, which will be shown during startup. Format is: -# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/ -ReadmeText='^You may press "Home" now - the data will be downloaded in background' - -# libSDL version to use (1.2/1.3/2.0) -LibSdlVersion=1.2 - -# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape -ScreenOrientation=h - -# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only -# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32) -VideoDepthBpp=16 - -# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedDepthBuffer=n - -# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedStencilBuffer= - -# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device -# you need this option only if you're developing 3-d app (y) or (n) -NeedGles2= - -# Use glshim library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n) -UseGlshim= - -# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL, -# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n) -SwVideoMode= - -# Application video output will be resized to fit into native device screen (y)/(n) -SdlVideoResize=y - -# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) -SdlVideoResizeKeepAspect=n - -# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer -InhibitSuspend=y - -# Create Android service, so the app is less likely to be killed while in background -CreateService= - -# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - -# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) -CompatibilityHacksForceScreenUpdate= - -# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) - -# force screen update by moving mouse cursor a little after each click (y) or (n) -CompatibilityHacksForceScreenUpdateMouseClick=y - -# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n) -CompatibilityHacksStaticInit= - -# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n) -CompatibilityHacksTextInputEmulatesHwKeyboard=y - -# Built-in text input keyboards with custom layouts for emulators, requires CompatibilityHacksTextInputEmulatesHwKeyboard=y -# 0 or empty - standard Android keyboard -# 1 - Simple QWERTY keyboard, no function keys, no arrow keys -# 2 - Commodore 64 keyboard -# 3 - Amiga keyboard -# 4 - Atari800 keyboard -TextInputKeyboard= - -# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n) -CompatibilityHacksPreventAudioChopping= - -# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n) -CompatibilityHacksAppIgnoresAudioBufferSize= - -# Hack for VCMI: preload additional shared libraries before aplication start -CompatibilityHacksAdditionalPreloadedSharedLibraries="" - -# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue - -# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n) -CompatibilityHacksSlowCompatibleEventQueue= - -# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL -CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState= - -# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects. -# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n) -CompatibilityHacksProperUsageOfSDL_UpdateRects= - -# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user -AppUsesMouse=y - -# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) -AppNeedsTwoButtonMouse=y - -# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n) -# If you disable it, swiping with two fingers will send mouse wheel events -RightMouseButtonLongPress= - -# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n) -ShowMouseCursor= - -# Screen follows mouse cursor, when it's covered by soft keyboard, this works only in software video mode (y) or (n) -ScreenFollowsMouse= - -# Generate more touch events, by default SDL generates one event per one video frame, this is useful for drawing apps (y) or (n) -GenerateSubframeTouchEvents= - -# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n) -ForceRelativeMouseMode= - -# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n) -AppNeedsArrowKeys=n - -# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n) -# Joystick always follows finger, so moving mouse requires touching the screen with other finger -FloatingScreenJoystick= - -# Application needs text input (y) or (n), enables button for text input on screen -AppNeedsTextInput=y - -# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1 -# This will disable AppNeedsArrowKeys option -AppUsesJoystick=n - -# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n) -AppUsesSecondJoystick=n - -# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n) -AppUsesThirdJoystick= - -# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7 -AppUsesAccelerometer= - -# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4 -AppUsesGyroscope= - -# Application uses orientation sensor (y) or (n), reported as joystick 1 axes 8-10 -AppUsesOrientationSensor= - -# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting -MoveMouseWithGyroscope= - -# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0 -AppUsesMultitouch=n - -# Application records audio (it will use any available source, such a s microphone) -# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void); -# This option will add additional permission to Android manifest (y)/(n) -AppRecordsAudio= - -# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n) -AccessSdCard= - -# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n) -AccessInternet= - -# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) -ImmersiveMode= - -# Application implements Android-specific routines to put to background, and will not draw anything to screen -# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them -# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) -# This option is reported to be buggy, sometimes failing to restore video state -NonBlockingSwapBuffers=y - -# Redefine common hardware keys to SDL keysyms -# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent -# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices -# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th) -# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA -RedefinedKeys="RETURN SPACE NO_REMAP NO_REMAP" - -# Number of virtual keyboard keys (currently 6 is maximum) -AppTouchscreenKeyboardKeysAmount=0 - -# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) -RedefinedKeysScreenKb="RETURN SPACE PAGEUP PAGEDOWN" - -# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu -RedefinedKeysScreenKbNames="" - -# On-screen keys theme -# 0 = Ultimate Droid by Sean Stieber (green, with cross joystick) -# 1 = Simple Theme by Beholder (white, with cross joystick) -# 2 = Sun by Sirea (yellow, with round joystick) -# 3 = Keen by Gerstrong (multicolor, with round joystick) -# 4 = Retro by Santiago Radeff (red/white, with cross joystick) -# 5 = GameBoy from RetroArch -# 6 = PlayStation from RetroArch -# 7 = SuperNintendo from RetroArch -# 8 = DualShock from RetroArch -# 9 = Nintendo64 from RetroArch -TouchscreenKeysTheme=2 - -# Redefine gamepad keys to SDL keysyms, button order is: -# A B X Y L1 R1 L2 R2 LThumb RThumb -RedefinedKeysGamepad="" - -# How long to show startup menu button, in msec, 0 to disable startup menu -StartupMenuButtonTimeout=3000 - -# Menu items to hide from startup menu, available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced -HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig' - -# Menu items to show at startup - this is Java code snippet, leave empty for default -# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration() -# Available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced -FirstStartMenuOptions='' - -# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower -AppMinimumRAM=256 - -# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet -NDK_TOOLCHAIN_VERSION= - -# Specify architectures to compile, 'all' or 'y' to compile for all architectures. -# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips -MultiABI='armeabi' - -# Optional shared libraries to compile - removing some of them will save space -# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed -# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2 -CompiledLibraries="sdl_mixer sdl_image sdl_net intl" - -# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) -CustomBuildScript=y - -# Aditional CFLAGS for application -AppCflags='-DHAVE_CONFIG_H -finline-functions -O2' - -# Additional LDFLAGS for application -AppLdflags='' - -# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable -AppOverlapsSystemHeaders= - -# Build only following subdirs (empty will build all dirs, ignored with custom script) -AppSubdirsBuild='src/dummy' - -# Exclude these files from build -AppBuildExclude='' - -# Application command line parameters, including app name as 0-th param -AppCmdline='' - -# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens -# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge -MinimumScreenSize= - -# Your AdMob Publisher ID, (n) if you don't want advertisements -AdmobPublisherId= - -# Your AdMob test device ID, to receive a test ad -AdmobTestDeviceId= - -# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height) -AdmobBannerSize= - -# Google Play Game Services application ID, required for cloud saves to work -GooglePlayGameServicesId= - diff --git a/project/jni/application/lbreakout2/AndroidBuild.sh b/project/jni/application/lbreakout2/AndroidBuild.sh deleted file mode 100755 index 2426915c3..000000000 --- a/project/jni/application/lbreakout2/AndroidBuild.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -LOCAL_PATH=`dirname $0` -LOCAL_PATH=`cd $LOCAL_PATH && pwd` - -ln -sf libsdl_mixer.so $LOCAL_PATH/../../../obj/local/$1/libSDL_mixer.so -ln -sf libsdl_net.so $LOCAL_PATH/../../../obj/local/$1/libSDL_net.so - -cd lbreakout2-2.6.5 -if [ \! -f Makefile ] ; then - ../../setEnvironment.sh ./configure --host=$2 --disable-install --enable-sdl-net LIBS=-lintl -fi -rm -f ../libapplication.so -make -mv -f client/lbreakout2 ../libapplication.so diff --git a/project/jni/application/lbreakout2/icon.png b/project/jni/application/lbreakout2/icon.png deleted file mode 100644 index e7d77a01b..000000000 Binary files a/project/jni/application/lbreakout2/icon.png and /dev/null differ diff --git a/project/jni/application/openttd/.gitignore b/project/jni/application/openttd/.gitignore index 2b107e500..48596a3bb 100644 --- a/project/jni/application/openttd/.gitignore +++ b/project/jni/application/openttd/.gitignore @@ -1 +1,4 @@ openttd-build-* +/AndroidData/*.xz +/data +/openttd-pc diff --git a/project/jni/application/openttd/readme.txt b/project/jni/application/openttd/readme.txt index b0ad3ee05..b44e9e670 100644 --- a/project/jni/application/openttd/readme.txt +++ b/project/jni/application/openttd/readme.txt @@ -2,8 +2,6 @@ Quick compilation guide: Install liblzma-dev, it's needed for configure script sudo apt-get install liblzma-dev Download my Git repo from https://github.com/pelya/commandergenius, -then install Android SDK, Android NDK, and "ant" tool, then launch commands +then install Android SDK, Android NDK, then launch commands git submodule update --init --recursive build.sh openttd -You may need to run command - android update project -p project -t android-25 diff --git a/project/jni/application/openttd/src b/project/jni/application/openttd/src index e3e91f53b..8b99198d0 160000 --- a/project/jni/application/openttd/src +++ b/project/jni/application/openttd/src @@ -1 +1 @@ -Subproject commit e3e91f53bb927bfddb3ef9c06c1389f9e5ea2081 +Subproject commit 8b99198d000d35c4a4488d06a66eedf69a103a29 diff --git a/project/jni/application/pachi/AUTHORS b/project/jni/application/pachi/AUTHORS deleted file mode 100644 index d4bcbef42..000000000 --- a/project/jni/application/pachi/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Santiago Radeff Coding -Nicolas Radeff Drawing / Gfx -Peter Hajba Music \ No newline at end of file diff --git a/project/jni/application/pachi/AndroidAppSettings.cfg b/project/jni/application/pachi/AndroidAppSettings.cfg deleted file mode 100644 index 30284d7ee..000000000 --- a/project/jni/application/pachi/AndroidAppSettings.cfg +++ /dev/null @@ -1,288 +0,0 @@ -# The application settings for Android libSDL port - -# Specify application name (e.x. My Application) -AppName="Pachi el marciano" - -# Specify reversed site name of application (e.x. com.mysite.myapp) -AppFullName=net.sourceforge.dragontech.pachi - -# Application version code (integer) -AppVersionCode=10792 - -# Application user-visible version name (string) -AppVersionName="1.07-mips64" - -# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' -# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu -# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped -# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - -# these files are put inside .apk package by build system -# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file -AppDataDownloadUrl="!Game data is 30 Mb|pachi.zip" - -# Reset SDL config when updating application to the new version (y) / (n) -ResetSdlConfigForThisVersion=y - -# Delete application data files when upgrading (specify file/dir paths separated by spaces) -DeleteFilesOnUpgrade="%" - -# Here you may type readme text, which will be shown during startup. Format is: -# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/ -ReadmeText='^You may press "Home" now - the data will be downloaded in background' - -# libSDL version to use (1.2/1.3/2.0) -LibSdlVersion=1.2 - -# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape -ScreenOrientation=h - -# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only -# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32) -VideoDepthBpp=16 - -# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedDepthBuffer=n - -# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n) -NeedStencilBuffer=n - -# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device -# you need this option only if you're developing 3-d app (y) or (n) -NeedGles2=n - -# Use glshim library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n) -UseGlshim= - -# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL, -# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n) -SwVideoMode=y - -# Application video output will be resized to fit into native device screen (y)/(n) -SdlVideoResize=y - -# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) -SdlVideoResizeKeepAspect=n - -# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer -InhibitSuspend=n - -# Create Android service, so the app is less likely to be killed while in background -CreateService= - -# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - -# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) -CompatibilityHacksForceScreenUpdate=n - -# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) - -# force screen update by moving mouse cursor a little after each click (y) or (n) -CompatibilityHacksForceScreenUpdateMouseClick=y - -# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n) -CompatibilityHacksStaticInit=n - -# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n) -CompatibilityHacksTextInputEmulatesHwKeyboard=n - -# Built-in text input keyboards with custom layouts for emulators, requires CompatibilityHacksTextInputEmulatesHwKeyboard=y -# 0 or empty - standard Android keyboard -# 1 - Simple QWERTY keyboard, no function keys, no arrow keys -# 2 - Commodore 64 keyboard -# 3 - Amiga keyboard -# 4 - Atari800 keyboard -TextInputKeyboard= - -# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n) -CompatibilityHacksPreventAudioChopping=n - -# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n) -CompatibilityHacksAppIgnoresAudioBufferSize=n - -# Hack for VCMI: preload additional shared libraries before aplication start -CompatibilityHacksAdditionalPreloadedSharedLibraries="" - -# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue - -# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n) -CompatibilityHacksSlowCompatibleEventQueue= - -# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL -CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState= - -# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects. -# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n) -CompatibilityHacksProperUsageOfSDL_UpdateRects= - -# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user -AppUsesMouse=n - -# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) -AppNeedsTwoButtonMouse=n - -# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n) -# If you disable it, swiping with two fingers will send mouse wheel events -RightMouseButtonLongPress= - -# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n) -ShowMouseCursor=n - -# Screen follows mouse cursor, when it's covered by soft keyboard, this works only in software video mode (y) or (n) -ScreenFollowsMouse= - -# Generate more touch events, by default SDL generates one event per one video frame, this is useful for drawing apps (y) or (n) -GenerateSubframeTouchEvents= - -# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n) -ForceRelativeMouseMode=n - -# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n) -AppNeedsArrowKeys=y - -# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n) -# Joystick always follows finger, so moving mouse requires touching the screen with other finger -FloatingScreenJoystick= - -# Application needs text input (y) or (n), enables button for text input on screen -AppNeedsTextInput=y - -# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1 -# This will disable AppNeedsArrowKeys option -AppUsesJoystick=n - -# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n) -AppUsesSecondJoystick=n - -# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n) -AppUsesThirdJoystick= - -# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7 -AppUsesAccelerometer=n - -# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4 -AppUsesGyroscope= - -# Application uses orientation sensor (y) or (n), reported as joystick 1 axes 8-10 -AppUsesOrientationSensor= - -# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting -MoveMouseWithGyroscope= - -# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0 -AppUsesMultitouch=n - -# Application records audio (it will use any available source, such a s microphone) -# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void); -# This option will add additional permission to Android manifest (y)/(n) -AppRecordsAudio= - -# Application needs to access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n) -AccessSdCard=n - -# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n) -AccessInternet= - -# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) -ImmersiveMode= - -# Application implements Android-specific routines to put to background, and will not draw anything to screen -# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them -# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) -# This option is reported to be buggy, sometimes failing to restore video state -NonBlockingSwapBuffers=n - -# Redefine common hardware keys to SDL keysyms -# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent -# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices -# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th) -# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA -RedefinedKeys="SPACE RETURN" - -# Number of virtual keyboard keys (currently 6 is maximum) -AppTouchscreenKeyboardKeysAmount=1 - -# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) -RedefinedKeysScreenKb="SPACE RETURN" - -# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu -RedefinedKeysScreenKbNames="" - -# On-screen keys theme -# 0 = Ultimate Droid by Sean Stieber (green, with cross joystick) -# 1 = Simple Theme by Beholder (white, with cross joystick) -# 2 = Sun by Sirea (yellow, with round joystick) -# 3 = Keen by Gerstrong (multicolor, with round joystick) -# 4 = Retro by Santiago Radeff (red/white, with cross joystick) -# 5 = GameBoy from RetroArch -# 6 = PlayStation from RetroArch -# 7 = SuperNintendo from RetroArch -# 8 = DualShock from RetroArch -# 9 = Nintendo64 from RetroArch -TouchscreenKeysTheme=4 - -# Redefine gamepad keys to SDL keysyms, button order is: -# A B X Y L1 R1 L2 R2 LThumb RThumb -RedefinedKeysGamepad="" - -# How long to show startup menu button, in msec, 0 to disable startup menu -StartupMenuButtonTimeout=3000 - -# Menu items to hide from startup menu, available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced -HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig' - -# Menu items to show at startup - this is Java code snippet, leave empty for default -# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration() -# Available menu items: -# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced -FirstStartMenuOptions='' - -# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower -AppMinimumRAM=0 - -# GCC version, or 'clang' for CLANG -NDK_TOOLCHAIN_VERSION= - -# Specify architectures to compile, 'all' or 'y' to compile for all architectures. -# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a -MultiABI='mips64' - -# Optional shared libraries to compile - removing some of them will save space -# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed -# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2 -CompiledLibraries="sdl_mixer" - -# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) -CustomBuildScript=n - -# Aditional CFLAGS for application -AppCflags='-O2 -finline-functions -Wno-write-strings' - -# Additional LDFLAGS for application -AppLdflags='' - -# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable -AppOverlapsSystemHeaders= - -# Build only following subdirs (empty will build all dirs, ignored with custom script) -AppSubdirsBuild='' - -# Exclude these files from build -AppBuildExclude='' - -# Application command line parameters, including app name as 0-th param -AppCmdline='' - -# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens -# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge -MinimumScreenSize=s - -# Your AdMob Publisher ID, (n) if you don't want advertisements -AdmobPublisherId=n - -# Your AdMob test device ID, to receive a test ad -AdmobTestDeviceId= - -# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height) -AdmobBannerSize= - -# Google Play Game Services application ID, required for cloud saves to work -GooglePlayGameServicesId= - diff --git a/project/jni/application/pachi/COPYING b/project/jni/application/pachi/COPYING deleted file mode 100644 index 5b6e7c66c..000000000 --- a/project/jni/application/pachi/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/project/jni/application/pachi/ChangeLog b/project/jni/application/pachi/ChangeLog deleted file mode 100644 index 40465773a..000000000 --- a/project/jni/application/pachi/ChangeLog +++ /dev/null @@ -1,450 +0,0 @@ -03-29-04 - -* one more code cleanup. -* redrawed the "exit" tile. -* cleaned the Makefiles - -03-28-04 - -* corrected the volumes. -* polished the menu background. -* polished the menu font. -* added the last comic sequence. -* corrected some bugs. -* writed the credits (thanks Paula Radeff). -* added --fullscreen or -f parameter to the command line options. - -03-21-04 - -* finished all the drawings of the game. - -03-14-04 - -* fixed a level-design map (thanks to Dimitry from Moscow). - -03-07-04 - -* drawed some comics for the transition from castle to lab. - -10-05-03 - -* finished the cave comic and the castle intro draiwings/paintings. -* the castle levelset is available (at least!). - -06-18-03 - -* made objects sequence for levels of the castle. - -05-27-03 - -* added an icon. - -04-20-03 - -* fixed "pieces of objects left sometimes when grabbed" :-) . -* added a link to the Debian packages (Mantained by Martin Godisch). - -04-19-03 - -* fixed object sequence errors (mainly in 5th stage). -Thanks to Ivonne Dekker for the report- -* fixed (i hope so) a monsters colission bug (in the 2nd stage). -thanks to Martin Godisch for the report- - -02-24-03 - -* added the cave stage poster. -* added the second part of the comic. - -02-23-03 - -* painted the second part of the comic. -* improved the intro-comic. -* done the cave stage poster. -* the hint-arrows are displayed 4 times instead of 2. -* changed the channel for playing the objseq sample (it caused a noise on my rh8). - -02-09-03 - -* added hint arrows (in the first 3 stages). -* added first stage poster. -* added pause feature. -* bugfixes - code cleanup. -* started improve intro-comic. -* the game starts in fullscreen mode (again). - -02-02-03 - -* added intro-comic to the intro - -01-28-03 - -* improved titlescreen to be fri (framerate independent). -* improved object fading (to be fri and to not leave gamearea). -* added a monster (the blob). - -01-27-03 - -* drawed a monster (the pipe). -* code cleanup. -* added intro (titlescreen). -* added roommap (to see wich rooms of the current stage are near). -* added fadeback() function. -* implemented fadeback() to return from game to menu. -* improved the menu background. - -01-26-03 - -* code cleanup - * removed many global variables - * removed the powerups feature - -01-06-03 - -* code changes - * some functions now are called with the x and y params. - * removed global variables x and y. - -01-05-03 - -* the laboratory rooms are being made (very big!) - -12-15-02 - -* Major code cleanup - made a struct for the player. - many more. -* removed fps counter (no need). -* added powerup counter (for future powerups feature). -* added a dificulty feature, in diferent dificulty levels there is a diferent - colission tolerance between monsters and player. -* added powerup feature!!!. - now every x special objects collected, the player can choose for - a powerup (like MSX classic "Nemesis"). - - The powerups are: - Slowmonsters -> the monsters move 30pix./sec. slower. (done) - Superspeed -> the player moves 50pix./sec. faster and the jump becomes longer. (done) - Superjump -> the player jumps 50% higher.(done) - Slowfall -> the player falls 50% slower. - Tiny -> the player is 50% it's size but have the same habilities as normal. - -12-10-02 - -* game ported to BeOS (Thanks to Shard) -* added handling when click on "Close Window Button" (only works on menu). -* added exit game (from menu) pressing ESCAPE key. - -12-07-02 - -* updated the data files objects.dat and rooms.dat - - now the game can have 50 stage (before 25). - - the objects now can have a sequence to be picked - -* added FX (bright_obj). when an object is the next in the -sequence to be picked it shows a nice starry FX. - -12-08-02 - -* added joystick support by Gorka Olaizola. - -12-01-02 - -* major code cleanup. -* the game is installable!!! (Thanks (a lot)to Gorka Olaizola) - * now you can do: - ./configure - make - make install (as root) - -11-28-02 - -* the respawn fx is framerate independent. - -11-17-02 - -* started making specialFX. - * done the respawn FX (with sound). - * done the pickobject FX. - * done the thunder FX. - -11-10-02 - -* its been a long time without updating the changelog... - -things that has been done: - -* Redrawed the sword enemy. -* Drawed MANY castle backgrounds. -* Drawed MANY objects. -* Drawed a couple of tiles. -* Drawed the living-dead head and the spinning axe enemies. -* Changed the goblin for the bat (now the goblin is in the caves and the bat in the castle). -* Made MANY levels, today i think i will finish level 15!!!. -* Deleted the music ctgoblin.s3m (only one music for each landscape). -* Added castle music. -* Added an animation when Pachi is standing (not definitive). - -and maybe more things... in don't remember - -10-30-02 - -* Implemented .T8 file format for graphics. -* Reduced graphics size from 15Mb to 5Mb (uncompresed) without loosing visual quality. - - -10-28-02 - -* added framerate counter (pressing [F1]). - -10-27-02 - -* drawed one more enemy for the caves (the looking eye). -* fixed (i hope) a bug that made Pachi falls in some circumstances (doing [alt]+[tab] in windows for example). -* thanks to that bugfix now is available (again) the windowed game mode. - -10-20-02 - -* Fixed a visual bug (when Pachi stayed very near an enemy, the Pachi "sprite box" was displayed above the enemy). -* Drawed two more enemyes for the caves (the pike and the blinking eye). -* Changed the music for the caves. - -10-16-02 - -* Now codes are available for every stage. - -10-15-02 - -* Fixed a bug. (when the player falls one room down, it (sometimes) falls 2). -* some floor collision detection bugfixes. - -10-10-02 - -* Eliminated windowed game mode (causes a lot of bugs... i'm working on that). - -10-09-02 - -* Improved web graphics. -* Corrected (at last) the sound in windows (thanks to Sam Latinga for his hint). - -10-07-02 - -* added the showcode(); routine to display the code to the next stage. -* When the game is won ask for the name to put it in the hall of fame. - -10-04-02 - -* added a couple of backgrounds. - -10-03-02 - -* a couple of new levels. -* added a "Please wait game data loading" when press start game in the main menu. - -09-26-02 - -* added hall of fame. -* made hall of fame background from the "la calavera del jardinero" sketch. -* changed font in hall of fame. - -09-25-02 - -* corrected jump control now the max height of the jump is in pixels instead of -loops. -* adjusted monsters speed in hard level. -* recentered the menu options in the main menu. -* added a timer and each dificulty level has different time to complete stages. -* in the easy dificulty level, the player jumps 10 pixels more high than the -other levels. -* added sound when the timer is <= 10. -* when a stage is completed the player earns 45*difficulty points for each second left. - -09-24-02 - -* the game has now faster gameplay. -* implemented frame rate independent movement, now the game has the -same game speed in every computer. -* added 3 difficulty levels to the main menu. -* corrected collision detection, it may fail on VERY slow systems. -* corrected animation function to be frame rate independent. - -09-23-02 - -* added new enemy (the sword). -* finished level 6. -* added screen blinking and sound when collected the las object of the stage. -* improved blinkscreen() to pass the RGB values to blink with. - -09-22-02 - -* corrected a small but ugly bug that made the sound very choppy under some -windows systems. -* improved a bit the jump behavior (now it is less linear). - -09-21-02 - -* drawed a new enemy (the goblin's head). -* redrawed some tiles. -* added new tiles. -* edited some levels with the new tiles. -* started level 6 (the caves). - -09-20-02 - -* translated the ChangeLog to english (well at least my english...). - -09-19-02 - -* improved CODE routine on the main menu. -* changed some tiles to change the game aspect not to look too blocky. -* changed the compile script to use GNU autotool (configure / make). -thanks to Daniel T. Chen (crimsun@email.unc.edu). - -09-18-02 - -* added a routine to enter a stage code on the main manu. -* added sound to the enter CODE on the menu when the code is correct or incorrect. - -09-17-02 - -* the page is submitted to Linuxgames, Happypenguin and Freshmeat. - -09-16-02 - -* first release of the game demo. -* remade the web page (dragontech.sourceforge.net). -* the page is uploaded to sourceforge. - -09-15-02 - -* decided use the GPL license for the game. -* added to the main menu the option HELP and SCREEN (to change the display - mode between full screen or windowed). -* added a sound to the main menu when moving between options. - -09-14-02 - -* changed main screen font and placed in a panel. -* added cursor and keypad keys to the game. -* started to make a web page. - -09-13-02 - -* changed the SDL_LoadBMP for LoadT (.T files are now used). -* added a menu to the main screen (just PLAY and EXIT work). -* Nicolas (Graphic artist) gone hollyday. - -09-11-02 (code cleanup) - -* remade the loops of the game (intro, menu, etc.). - -09-09-02 - -* convert of all the surfaces to DisplayFormat for faster blitting. -* the main screen text side scroll is deleted. - -09-08-02 - -* the main screen is started to be drawed, i think i will eliminate the text - side scroll. - -09-07-02 - -* added new graphics for the cemmentery background (evil trees) - those were drawed some time ago. -* added music in the main screen. -* now the end credits dont exit when the credits finish, it loops. -* added new (and last) level of cemmentery. -* chaged the object counter variable. -* added to the score panel a stage title. -* changed font for the stage title (same but different color) in the score panel. -* the monster-monster collision is corrected again. -* added new object graphic (blue gem). - -09-05-02 - -* added some new graphics for the second landscape (not level yet). - -09-03-02 - -* at last i think the monster-monster collission detection is fine. - -09-02-02 - -* corrected a bug that stopped the music twice causing a segfault when you - complete the last level and returned to the main screen. -* added a object counter on the score panel (thank Gabriel Radeff for the idea). -* added a code that is used to select the music for each stage. - -09-01-02 - -* improved (again) the print_text() routine, so the font can be selected - when calling it. -* added end credits screem with vertical text scroll over a graphic. -* added music to the end credits. - -08-31-02 - -* level 4 fixed. -* fixed a problem when te character entered a room in duck state and - loose a life, it reapears one tile below (cause of the heigh is the - half when ducked). - -08-24-02 - -* new level (4). -* changed the acces mode for files to binary, before the levels - were not correctly readed in windows. -* new tiles. -* added "set score to 0" when exiting game. - -08-23-02 - -* added the jumping frame. -* added a screen blink and sound when loose a life. - -08-21-02 - -* improved the print_text() routine to print static text. -* added score, lives and level indicator to the gamepanel. -* changed font for the scores. -* when the character jumps and touches the head with a tile, - the jump ends and he starts falling. -* added the falling frame for Pachi. -* added some tiles. - -08-20-02 - -* drawed Pachi falling. -* drawed cementery poster (end-credits). - -08-19-02 - -* completed the animation frames of Pachi walking. -* change of the color of "The Death" monster (before brown, now some sort of cyan). - -08-02-02 - -* now Pachi have 10 animation frames for each action. -* completed the animation of Pachi ducked. -* the monsters detect when collide with another monster and change the direction. -* two more playable levels. -* the gamepanel is changed. - - -07-31-02 (code cleanup) - -* Begin of loging. -* change some variable names: - P_ afect player. - M_ afect monsters. - R_ afect rooms. -* added more comments to the code. -* deleted the delay routine an the timing.h file. -* deleted tileheight and tilewidth variables, now just using tileside. -* changed keyboard handling, now when you release the direction keys the - character stops moving. -* corrected an error that maked posible to duck in the air if falling down - (not jumping). -* now the character have more animation frames for each action it takes - (walk, jump, fall, duck) for now only the walking frames are done. -* started adding music. -* added sounds for jumping and for picking objects. diff --git a/project/jni/application/pachi/INSTALL b/project/jni/application/pachi/INSTALL deleted file mode 100644 index f016482bc..000000000 --- a/project/jni/application/pachi/INSTALL +++ /dev/null @@ -1,7 +0,0 @@ -Just do - -./configure -make -make install (as root). - -Thanks to Gorka Olaizola (http://helvelte.escomposlinux.org) \ No newline at end of file diff --git a/project/jni/application/pachi/NEWS b/project/jni/application/pachi/NEWS deleted file mode 100644 index 84a6b109a..000000000 --- a/project/jni/application/pachi/NEWS +++ /dev/null @@ -1 +0,0 @@ -see the ChangeLog. \ No newline at end of file diff --git a/project/jni/application/pachi/README b/project/jni/application/pachi/README deleted file mode 100644 index 6c71e10b7..000000000 --- a/project/jni/application/pachi/README +++ /dev/null @@ -1,2 +0,0 @@ -Pachi el marciano is a cool 2D platforms game inspired in games like -Manic Miner, Jet set Willy and more from the 80s. \ No newline at end of file diff --git a/project/jni/application/pachi/config.h b/project/jni/application/pachi/config.h deleted file mode 100644 index a21c5c39e..000000000 --- a/project/jni/application/pachi/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define if you have the ANSI C header files. */ -/* #undef STDC_HEADERS */ - -#define DATADIR "." -#define SCOREDIR "." - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the pthread library (-lpthread). */ -/* #undef HAVE_LIBPTHREAD */ - -/* Define if you have the SDL_mixer library (-lSDL_mixer). */ -#define HAVE_LIBSDL_MIXER 1 - -/* Name of package */ -#define PACKAGE "pachi" - -/* Version number of package */ -#define VERSION "0.1" - diff --git a/project/jni/application/pachi/icon.png b/project/jni/application/pachi/icon.png deleted file mode 100644 index c5613125c..000000000 Binary files a/project/jni/application/pachi/icon.png and /dev/null differ diff --git a/project/jni/application/pachi/src/credits.h b/project/jni/application/pachi/src/credits.h deleted file mode 100644 index 2f4cd6e07..000000000 --- a/project/jni/application/pachi/src/credits.h +++ /dev/null @@ -1,56 +0,0 @@ -char creditstext[] = -" CONGRATULATIONS!!! \0" -" YOU WON THE GAME!! \0" -" \0" -" NOW THANKS TO YOU, \0" -" THE MISTERY IS SOLVED AND PACHI \0" -" WILL BE ABLE TO GO BACK TO MARS, \0" -" PLAY martian memory \0" -" AND VISIT \0" -" dragontech.sourceforge.net \0" -" \0" -" \0" -" \0" -" \0" -" AND NOW THE CREDITS \0" -" \0" -" PROJECT MANAGER, PROGRAMMER: \0" -" santiago radeff \0" -" \0" -" DRAWINGS, PACHI FATHER \0" -" nicolas radeff \0" -" \0" -" GRAPHICS: \0" -" nicolas radeff \0" -" santiago radeff \0" -" \0" -" MUSICS COMPOSED BY \0" -" peter -skaven- hajba \0" -" \0" -" \0" -" \0" -" \0" -" THANKS TO THE PROGRAMMERS, \0" -" AND PLAYERS FOR THEIR SUPPORT \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" \0" -" ThAnKs fOr pLaYiNg \0" -" \0"; -int creditslines = 46; // esta variable determina cuantas lineas de texto hay en los creditos - - -int creditslinecounter = 0; // esta variable almacena que linea de texto dee imprimirse (es un contador) -int needinput = 1; // esta variable indica si debe imprimirse una nueva linea de texto en los creditos -int linegone = 0; // esta variable indica cuando una linea de texto ya hizo scroll por completo para imprimir la proxima -int wrapcounter = 0; // esta variable es un contador que una vez que termino el texto de los creditos empieza a incrementarse y cuando llega a cierto valor reinicia los creditos -char curchar; -int charcounter; diff --git a/project/jni/application/pachi/src/definitions.h b/project/jni/application/pachi/src/definitions.h deleted file mode 100644 index 3ecf68c06..000000000 --- a/project/jni/application/pachi/src/definitions.h +++ /dev/null @@ -1,130 +0,0 @@ -SDL_Joystick * joystick; -enum joynames {JOY_LEFT, JOY_RIGHT, JOY_UP, JOY_DOWN, JOY_BUTTON0, JOY_BUTTON1}; -Uint8 joypos[JOY_BUTTON1+1]={0,0,0,0,0,0}; -// --- Screen related -#define screen_w 800 -#define screen_h 600 -#define screen_bpp 16 - -// --- Room related -#define R_tileside 32 -#define R_maxobjects 5 -#define R_max_x 40 -#define R_max_y 10 -#define R_gamearea_x 28 -#define R_gamearea_y 15 -#define R_maxtiles_h 23 -#define R_maxtiles_v 14 -#define R_back_x 92 -#define R_back_y 112 -#define R_maxbacks_h 8 -#define R_maxbacks_v 4 -int R_current; // habitacion actual -int R_backdata[R_maxbacks_h][R_maxbacks_v]; //esta matriz contiene la informacion sobre el fondo del nivel actual -int R_x; // variable utilizada para ubicar la habitacion actual en la matriz -int R_y; // variable utilizada para ubicar la habitacion actual en la matriz -int R_object; -int roommap[R_max_x][R_max_y]; // mapeado de habitaciones, aca se comprueba que habitaciones pertenecen a cada stage -int chk_exits; - -int objects; // cantidad de objetos en la stage actual - -int score = 0; -int gameexit, startgame, help, hiscores; - -// --- Timing related -double playtime; -double roomtime; - -// -- FX related -int brightframe; -int sequence; // variable que almacena cual es el objeto siguiente en la secuencia (para recogerlos por orden) -int fadingobject; // esta variable indica si un objeto es esta desvaneciendo -float alphade; -#define arrow_left 1 -#define arrow_right 2 -#define arrow_up 3 -#define arrow_down 4 - -int namechar=0; -int gameover=0; - -// --- Scores related -char playername[]=" "; -char scorename[10][11]; -int scorestage[10]; -int scoretime[10]; -int scoredif[10]; -int scorescore[10]; -int scorepos; - -int codechar; -char code[]="...."; -int inputloop; - -int menuvalue = 1; -int fullscreen = 1; -int dificulty = 2; - -// --- Monsters related -#define M_w 48 -#define M_h 48 -#define M_frames 6 -#define M_max4room 10 -#define M_easyspeed 130 -#define M_normalspeed 150 -#define M_hardspeed 200 - -int M_type[M_max4room];// el 10 es el maximo de monstruos en pantalla -float M_x[M_max4room]; // el 10 es el maximo de monstruos en pantalla -float M_y[M_max4room];// el 10 es el maximo de monstruos en pantalla -float M_old_x[M_max4room];// el 10 es el maximo de monstruos en pantalla -float M_old_y[M_max4room];// el 10 es el maximo de monstruos en pantalla -int M_direction[M_max4room]; // estas variables se usan para saber si el monstruo va hacia un lado o hacia otro -int M_frame = 1; -int monsters_c; // cantidad de monstruos en la pantalla actual -int M_initspeed=M_normalspeed; -int M_speed[4]; -SDL_Rect monstersrc; -SDL_Rect monsterpos; -SDL_Rect monsterposreal; -SDL_Rect oldmonsterpos; -SDL_Rect oldmonsterposreal; - - -// --- Player related -#define maxlives 10 -#define P_h 64 -#define P_w 48 -int respawned=0; // variable que indica cuando el personaje termino de aparecer despues de morirse -SDL_Rect playersrc; // esto es para leer del bmp del player el frame a imprimir -SDL_Rect playerpos; // esta es la posicion en la pantalla del player (sin contar los bordes del panel) -SDL_Rect playerposreal; // esta es la posicion en la pantalla del player (contando los bordes del panel) se utiliza automaticamente -SDL_Rect oldplayerpos; //esta es la posicion que abandona el player -SDL_Rect oldplayerposreal; //esta es la posicion que abandona el player (contando los bordes del panel) - -// --- Timing related -Uint32 lasttime=0; -Uint32 curtime=0; -double imove=0; -double gametimer=0; -int minutes, seconds; -int oldsec; // variable que almacena el valor de los segundos - -float animcounter = 0; //contador usado para las animaciones de los enemigos y del personaje - -int escape_exit; -int game_exit; - -// --- Stage Related -#define NUM_STAGES 16 - -#define CEMETERY 1 -#define CAVES 7 -#define CASTLE 10 -#define LAB 16 -#define END 17 - -int startstage = 0; // stage inicial -int stage; //stage actual -int stagecompleted = 0; // esta variable es un flag que se pone en 1 cuando se agarran todos los objetos del nivel diff --git a/project/jni/application/pachi/src/faes.cpp b/project/jni/application/pachi/src/faes.cpp deleted file mode 100644 index 29b661ece..000000000 --- a/project/jni/application/pachi/src/faes.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include"definitions.h" -#include"structs.h" -#include"surfaces.h" -#include"sounds.h" -#include"config.h" -#include"proto.h" -#include"credits.h" - -#include"gfx.h" -#include"text.h" -#include"init.h" -#include"input.h" -#include"file.h" -#include"output.h" -#include"stages.h" -#include"menu.h" -#include"intro.h" -#include"gameover.h" -#include"player.h" -#include"monsters.h" -#include"game.h" -#include"fx.h" -#include"setgame.h" - -void flushevents() -{ - SDL_Event event; - while(SDL_PollEvent(&event)==1); -} - -int main(int argc, char *argv[]) -{ - initsdl(); - - if(argc > 1) - if(strcmp(argv[1], "--fullscreen")==0 || strcmp(argv[1], "-f")==0) - screen_mode(); - - gameexit=0; - startgame=0; - intro(); - init_stages(); // carga los valores de los niveles del juego - load_roommap(); // carga el mapeado de habitaciones - while(gameexit==0) - { - flushevents(); - menu(); - if(startgame==1) - { - startgame=0; - start_game(); - } - if(help==1) - { - help=0; - do_help(); - } - if(hiscores==1) - { - hiscores=0; - do_hiscores(); - } - } -// outro(); - SDL_JoystickClose(joystick); - SDL_Quit(); - fprintf(stderr,"\nThanks for playing.\n"); - return 0; -} diff --git a/project/jni/application/pachi/src/file.h b/project/jni/application/pachi/src/file.h deleted file mode 100644 index ddafc643b..000000000 --- a/project/jni/application/pachi/src/file.h +++ /dev/null @@ -1,376 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void load_gamedata() -{ - background=LoadT8(DATADIR"/Tgfx/gamepanel.T8"); - backs=LoadT8(DATADIR"/Tgfx/backgrounds.T8", false); - player=LoadT8(DATADIR"/Tgfx/pachi.T8"); - monstersSW=LoadT8(DATADIR"/Tgfx/monsters.T8", false); - tiles=LoadT8(DATADIR"/Tgfx/tiles.T8"); - bright=LoadT8(DATADIR"/Tgfx/bright.T8"); - left=LoadT8(DATADIR"/Tgfx/left.T8"); - right=LoadT8(DATADIR"/Tgfx/right.T8"); - load_font( menufont, DATADIR"/fonts/font32v.T8" ); - LoadT(&scorefont,DATADIR"/fonts/font16b.T"); - LoadT(&scorefont1,DATADIR"/fonts/font16a.T"); - LoadT(&scorefont2,DATADIR"/fonts/font16c.T"); - SDL_Surface *temp; - temp = SDL_CreateRGBSurface(SDL_SWSURFACE,736,448,16,0,0,0,0); //esto es para reestablecer la pantalla - screenbak = SDL_DisplayFormat(temp); - SDL_FreeSurface(temp); - SDL_SetColorKey(player, SDL_SRCCOLORKEY, SDL_MapRGB(player->format,0,0,0)); // el negro es transparente - SDL_SetColorKey(tiles, SDL_SRCCOLORKEY, SDL_MapRGB(tiles->format,0,255,0)); - SDL_SetColorKey(bright, SDL_SRCCOLORKEY, SDL_MapRGB(bright->format,0,255,0)); - SDL_SetAlpha(bright, SDL_SRCALPHA, 128); - SDL_SetColorKey(left, SDL_SRCCOLORKEY, SDL_MapRGB(left->format,0,0,0)); - SDL_SetColorKey(right, SDL_SRCCOLORKEY, SDL_MapRGB(right->format,0,0,0)); - - jump = Mix_LoadWAV(DATADIR"/sounds/jump.wav"); - obj = Mix_LoadWAV(DATADIR"/sounds/obj.wav"); - objseq = Mix_LoadWAV(DATADIR"/sounds/objseq.wav"); - die = Mix_LoadWAV(DATADIR"/sounds/die.wav"); - timer = Mix_LoadWAV(DATADIR"/sounds/timer.wav"); - exitlevel = Mix_LoadWAV(DATADIR"/sounds/exit.wav"); - stageready = Mix_LoadWAV(DATADIR"/sounds/stageready.wav"); - storm = Mix_LoadWAV(DATADIR"/sounds/storm.wav"); - respawnsnd = Mix_LoadWAV(DATADIR"/sounds/respawn.wav"); - -} -void unload_gamedata() -{ - SDL_FreeSurface(background); - SDL_FreeSurface(tiles); - SDL_FreeSurface(backs); - SDL_FreeSurface(player); - SDL_FreeSurface(bright); - SDL_FreeSurface(monstersSW); - SDL_FreeSurface(screenbak); - SDL_FreeSurface(scorefont); - SDL_FreeSurface(scorefont1); - SDL_FreeSurface(scorefont2); - unload_font(menufont); - SDL_FreeSurface(left); - SDL_FreeSurface(right); - - if( currentBack ) - SDL_FreeSurface(currentBack); - currentBack = NULL; - - for(int n=0;nformat,0,0,0)); - SDL_SetColorKey(scorefont1, SDL_SRCCOLORKEY, SDL_MapRGB(scorefont1->format,0,0,0)); -} -void unload_helpgfx() -{ - SDL_FreeSurface(background); - SDL_FreeSurface(scorefont); - SDL_FreeSurface(scorefont1); -} - -void load_menudata() -{ - load_font(menufont, DATADIR"/fonts/font32v.T8"); - load_font(menufont1, DATADIR"/fonts/font32r.T8"); - background=LoadT8(DATADIR"/Tgfx/intro.T8"); - - option=Mix_LoadWAV(DATADIR"/sounds/option.wav"); - coderight=Mix_LoadWAV(DATADIR"/sounds/exit.wav"); - codewrong=Mix_LoadWAV(DATADIR"/sounds/die.wav"); - music=Mix_LoadMUS(DATADIR"/music/menu.s3m.ogg"); -} -void unload_menudata() -{ - unload_font(menufont); - unload_font(menufont1); - SDL_FreeSurface(background); - Mix_FreeChunk(option); - Mix_FreeChunk(coderight); - Mix_FreeChunk(codewrong); -} - -void init_monsters() -{ - FILE *mnstr = fopen(DATADIR"/data/monsters.dat","rb"); - long filepos = ((R_current-1) * M_max4room*3); - fseek(mnstr,filepos,SEEK_SET); - for(int n=0;n<=M_max4room-1;n++) - { - M_type[n]=getc(mnstr); - M_x[n]=getc(mnstr)*R_tileside; - M_y[n]=getc(mnstr)*R_tileside-M_h+R_tileside; - } - fclose(mnstr); - - for(int n=0;nformat->BitsPerPixel, - screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); - SDL_BlitSurface(monstersSW, &monstersrc, monsters[n], NULL); - SDL_SetColorKey(monsters[n], SDL_SRCCOLORKEY, SDL_MapRGB(monsters[n]->format,0,255,0)); - } - } -} - -void load_room() -{ - long filepos; - FILE *bck = fopen(DATADIR"/data/backs.dat","rb"); - filepos = (R_current - 1) * (R_maxbacks_h*R_maxbacks_v); // filepos es el puntero del archivo, lo utilizamos para leer la habitacion donde estemos - fseek(bck,filepos,SEEK_SET); - int x, y; - for(y = 0;y < R_maxbacks_v; y++) - { - for(x = 0;x < R_maxbacks_h; x++) - { - R_backdata[x][y]=getc(bck); - } - } - fclose(bck); - - - if( currentBack ) - SDL_FreeSurface(currentBack); - currentBack = SDL_CreateRGBSurface(SDL_HWSURFACE, R_back_x*R_maxbacks_h, R_back_y*R_maxbacks_v, screen->format->BitsPerPixel, - screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); - - SDL_Rect backs_dst; - backs_dst.w = R_back_x; - backs_dst.h = R_back_y; - - SDL_Rect backs_src; - backs_src.w = R_back_x; - backs_src.h = R_back_y; - for(x=0;x < R_maxbacks_h;x++) - { - for(y=0;y < R_maxbacks_v;y++) - { - backs_dst.x = (x*R_back_x); - backs_dst.y = (y*R_back_y); - - backs_src.y = (int(R_backdata[x][y]/6) * R_back_y); - backs_src.x = (R_backdata[x][y] - (int(R_backdata[x][y]/6) * 6))*R_back_x; - SDL_BlitSurface(backs,&backs_src,currentBack,&backs_dst); - } - } - - - - FILE *lvl = fopen(DATADIR"/data/rooms_v2.dat","rb"); - filepos = (200 + ((R_current-1) * (R_maxtiles_h*R_maxtiles_v))+R_current); // filepos es el puntero del archivo, lo utilizamos para leer la habitacion donde estemos - fseek(lvl,filepos,SEEK_SET); - - for(y = 0;y < R_maxtiles_v;y++) - { - for(x = 0;x < R_maxtiles_h; x++) - { - mroom.data[x][y]=getc(lvl); - } - } - fclose(lvl); - - int contador; - for(contador=0;contador < 5; contador++) - { - R_object=mobject[((R_current-1)*5)+contador].type; - x=mobject[((R_current-1)*5)+contador].x; - y=mobject[((R_current-1)*5)+contador].y; - if(R_object != 0) - mroom.data[x][y]=R_object; - } -} -void load_roommap() -{ - long filepos; - int x, y; - FILE *lvl = fopen(DATADIR"/data/rooms_v2.dat","rb"); - - for(y = 0;y < R_max_y;y++) - { - for(x = 0;x < R_max_x; x++) - { - filepos=((x+1)*(R_maxtiles_h*R_maxtiles_v)+(x+1))+(y*(R_max_x*(R_maxtiles_h*R_maxtiles_v)+R_max_x)); - fseek(lvl,200+filepos,SEEK_SET); - roommap[x][y]=getc(lvl); - } - } - fclose(lvl); -} -void init_objects() // esta rutina copia en la matriz objects el archivo objects.dat -{ - FILE *obj = fopen(DATADIR"/data/objects_v2.dat","rb"); - for(int n=0;n<2000;n++) - { - mobject[n].type=getc(obj); - mobject[n].x=getc(obj); - mobject[n].y=getc(obj); - mobject[n].seq=getc(obj); - mobject[n].stage=getc(obj); - } - fclose(obj); -} - -void initcredits() -{ - creditslinecounter=0; - background=LoadT8(DATADIR"/Tgfx/endcredits.T8"); - creditsfont=LoadT8(DATADIR"/fonts/font1.T8"); - SDL_SetColorKey(creditsfont, SDL_SRCCOLORKEY, SDL_MapRGB(creditsfont->format,0,255,0)); - SDL_Surface *temp; - temp = SDL_CreateRGBSurface(SDL_SWSURFACE,600,440,16,0,0,0,0); - creditsbuffer = SDL_DisplayFormat(temp); - creditsbuffer1 = SDL_DisplayFormat(temp); - SDL_FreeSurface(temp); - setback(); - -music = Mix_LoadMUS(DATADIR"/music/credits.s3m.ogg"); -} -void unloadcredits() -{ - SDL_FreeSurface(creditsbuffer); - SDL_FreeSurface(creditsbuffer1); - SDL_FreeSurface(background); - SDL_FreeSurface(creditsfont); -} diff --git a/project/jni/application/pachi/src/fx.h b/project/jni/application/pachi/src/fx.h deleted file mode 100644 index 21841f050..000000000 --- a/project/jni/application/pachi/src/fx.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - Rutina de efectos especiales -*/ -SDL_Surface *fadeobject; -SDL_Rect fadingpos; // posicion del objeto que esta desvaneciendose -SDL_Rect realfadingpos; // posicion del objeto que esta desvaneciendose en el area de juego -float fade_y; - -int scanpos_y=0; - - -void respawn() // rutina que hace reaparecer a Pachi -{ - int scanspeed=1500; - SDL_Rect P_scansrect; - SDL_Rect P_srcscan; -//imprimimos los scans - SDL_BlitSurface(background,NULL,screen,NULL); - print_room(); - - P_srcscan.h=1; - P_srcscan.y=P_h - scanpos_y; - P_srcscan.w=mplayer[dificulty].w; - P_srcscan.x=(mplayer[dificulty].w*(mplayer[dificulty].frame)); - P_scansrect.x=mplayer[dificulty].start_x+R_gamearea_x; - P_scansrect.w=mplayer[dificulty].w; - P_scansrect.h=1; - - for(int a=0;a<=R_gamearea_y + mplayer[dificulty].start_y + P_h - scanpos_y;a++) - { - P_scansrect.y=a; - SDL_BlitSurface(player,&P_srcscan,screen,&P_scansrect); - } - P_srcscan.h=scanpos_y; - P_srcscan.y=P_h - scanpos_y; - P_scansrect.h=scanpos_y; - P_scansrect.y=R_gamearea_y + mplayer[dificulty].start_y + P_h - scanpos_y; - SDL_BlitSurface(player,&P_srcscan,screen,&P_scansrect); - - SDL_Flip(screen); - SDL_Delay(1); - - if(scanpos_yformat,0,255,0)); - SDL_Rect objectsrc; - objectsrc.w=R_tileside;objectsrc.h=R_tileside; - objectsrc.y=R_tileside*10;objectsrc.x=R_tileside*object; - SDL_BlitSurface(tiles,&objectsrc,fadeobject,NULL); - fadingpos.x=x*R_tileside;fadingpos.y=y*R_tileside; - fadingpos.w=R_tileside;fadingpos.h=R_tileside; - fade_y=fadingpos.y; -} - -float fade_object(float alpha) -{ - int fadealpha = int(alpha); - SDL_SetAlpha(fadeobject,SDL_SRCALPHA,fadealpha); - realfadingpos.x=R_gamearea_x+fadingpos.x;realfadingpos.y=R_gamearea_y+fadingpos.y;realfadingpos.w=fadingpos.w;realfadingpos.h=fadingpos.h; - - //SDL_BlitSurface(screenbak,&fadingpos,screen,&realfadingpos); - SDL_BlitSurface(fadeobject,NULL,screen,&realfadingpos); - //SDL_UpdateRect(screen,realfadingpos.x,realfadingpos.y,realfadingpos.w,realfadingpos.h+2); - if(fadealpha<5) - { - fadingobject=0; - //SDL_BlitSurface(screenbak,&fadingpos,screen,&realfadingpos); - //print_room(); - //SDL_Flip(screen); - } - else - { - alpha-=500*imove; - fade_y-=150*imove; - if(fade_y<32) - fade_y+=150*imove; - fadingpos.y=int(fade_y); - } - return(alpha); -} - - -void screen_fx() -{ - Mix_Volume(7,128); - if(seconds==15 || seconds==45) - { - if(stage<6) // en el cementerio - { - if(int(oldsec-1)==int(seconds)) - { - Mix_PlayChannel(7,storm,0); - blinkscreen(220,220,255,128); - //load_room(); - //print_room(); - } - } - } -} - -void bright_obj(int bright_x, int bright_y) -{ - SDL_Rect brsrc; - brsrc.x=(brightframe*40); - brsrc.y=0;brsrc.w=40;brsrc.h=40; - SDL_Rect brdst; - brdst.x=bright_x*R_tileside-4;brdst.y=bright_y*R_tileside-4;brdst.w=40;brdst.h=40; - SDL_Rect brdstreal; - brdstreal.x=bright_x*R_tileside-4+R_gamearea_x;brdstreal.y=bright_y*R_tileside-4+R_gamearea_y;brdstreal.w=40;brdstreal.h=40; - - SDL_Rect objsrc; - objsrc.w=R_tileside;objsrc.w=R_tileside; - objsrc.x=(mroom.data[bright_x][bright_y] - (int(mroom.data[bright_x][bright_y]/20) * 20))*R_tileside; - objsrc.y=(int(mroom.data[bright_x][bright_y]/20) * R_tileside); - SDL_Rect objdst; - objdst.x=bright_x*R_tileside; - objdst.y=bright_y*R_tileside; - objdst.w=R_tileside;objdst.h=R_tileside; - SDL_Rect objdstreal; - objdstreal.x=bright_x*R_tileside+R_gamearea_x; - objdstreal.y=bright_y*R_tileside+R_gamearea_y; - objdstreal.w=R_tileside;objdst.h=R_tileside; - - //SDL_BlitSurface(screenbak,&brdst,screen,&brdstreal); -// SDL_BlitSurface(tiles,&objsrc,screen,&objdstreal); - SDL_BlitSurface(bright,&brsrc,screen,&brdstreal); - //SDL_UpdateRect(screen,brdstreal.x,brdstreal.y,brdstreal.w,brdstreal.h); -} - -void show_arrow(int arrow, int show) -{ - SDL_Rect dst; - dst.w=150; dst.h=30;dst.y=R_gamearea_y+1; - SDL_Rect src; - src.w=dst.w; src.h=dst.h; src.y=dst.y - R_gamearea_y; - switch(arrow) - { - case arrow_left: - dst.x=R_gamearea_x+1; - src.x=dst.x-R_gamearea_x; - if(show==1) - SDL_BlitSurface(left, NULL, screen, &dst); - //else - //SDL_BlitSurface(screenbak, &src, screen, &dst); - - //SDL_UpdateRect(screen, dst.x, dst.y, dst.w, dst.h); - break; - case arrow_right: - dst.x=R_gamearea_x+(R_maxtiles_h*R_tileside)-(10+dst.w); - src.x=dst.x-R_gamearea_x; - if(show==1) - SDL_BlitSurface(right, NULL, screen, &dst); - //else - //SDL_BlitSurface(screenbak, &src, screen, &dst); - - //SDL_UpdateRect(screen, dst.x, dst.y, dst.w, dst.h); - break; - case arrow_up: -//fprintf(stderr,"up"); - break; - case arrow_down: -//fprintf(stderr,"down"); - break; - } -} diff --git a/project/jni/application/pachi/src/game.h b/project/jni/application/pachi/src/game.h deleted file mode 100644 index 2af1283ea..000000000 --- a/project/jni/application/pachi/src/game.h +++ /dev/null @@ -1,365 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void win_game() -{ - - background=LoadT8(DATADIR"/Tgfx/comic_09.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_10.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_11.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_12.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_13.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_14.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - - SDL_FreeSurface(background); - initcredits(); - escape_exit=0; - - while(escape_exit==0) - { - if(!Mix_PlayingMusic()) - Mix_PlayMusic(music,0); - credits_events(); - print_credits(); - } - SDL_BlitSurface(background, NULL, screen, NULL); - SDL_Flip(screen); - stop_music(); - unloadcredits(); -} - -void check_exits() // esta funcion se fija si hay salidas disponibles -{ - int y = int(R_current/R_max_x); - int x = (R_current-y*R_max_x)-1; - int show; // esta variable indica si se debe imprimir la flecha o borrarla - if((roomtime>1 && roomtime<1.5) || (roomtime>2 && roomtime <2.5) || (roomtime > 3 && roomtime <3.5) || (roomtime > 4 && roomtime <4.5)) - show=1; - else - show=0; - - if(x < R_max_x) - if(roommap[x+1][y]==stage) - show_arrow(arrow_right, show); - if(x > 0) - if(roommap[x-1][y]==stage) - show_arrow(arrow_left, show); - if(y < R_max_y) - if(roommap[x][y+1]==stage) - show_arrow(arrow_down, show); - if(y < 0) - if(roommap[x][y-1]==stage) - show_arrow(arrow_up, show); -} - -void stage_up() -{ - long filepos; - SDL_Rect scorerect; - scorerect.x = 30; scorerect.y = 484; scorerect.w = 400; scorerect.h = 96; - if(stage+1 != CEMETERY && stage+1 != CAVES && stage+1 != CASTLE && stage+1 != LAB) - { - SDL_FillRect(screen, &scorerect, 0); // limpiamos el cuadrado de los marcadores - //SDL_UpdateRect(screen, scorerect.x, scorerect.y, scorerect.w, scorerect.h); - } - mplayer[dificulty].objects = 0; mplayer[dificulty].stageup = 0; - mplayer[dificulty].left = 0; mplayer[dificulty].right = 0; - mplayer[dificulty].jump = 0; mplayer[dificulty].duck = 0; mplayer[dificulty].jumpcounter = 0; - Mix_HaltChannel(-1); - // ahora agregamos el puntaje correspondiente al tiempo que nos sobr - if(minutes>0||seconds>0) // esto lo hacemos por si se perdio por tiempo - { - for(int a=int(gametimer);a>0;a--) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - score=score+(dificulty*45)+(int(dificulty/3)*45); - gametimer--; - minutes = int(gametimer/60); - seconds = int(gametimer-minutes*60); - Mix_Volume(0,100); - Mix_PlayChannel(0,timer,0); - print_monitor(); - print_timer(); - SDL_Flip(screen); - SDL_Delay(20); - } - } - stage++; - if(stage <= NUM_STAGES) - { - gametimer = mstage[stage-1].time-((dificulty-1)*20); // para los niveles normal y dificil el tiempo es 30 y 60 segundos menor respectivamente - showcode(mstage[stage-1].code); - showposter(stage); - - music=Mix_LoadMUS(mstage[stage-1].music); - stagecompleted = 0; - FILE *lvl = fopen(DATADIR"/data/rooms_v2.dat","rb"); - filepos = (stage - 1) * 4; // filepos es el puntero del archivo, lo utilizamos para leer en que habitacion estamos - fseek(lvl,filepos,SEEK_SET); - R_x = getc(lvl); - R_y = getc(lvl); - mplayer[dificulty].start_x = getc(lvl) * R_tileside; // variables de posicion inicial en la pantalla - mplayer[dificulty].start_y = getc(lvl) * R_tileside; // variables de posicion inicial en la pantalla - mplayer[dificulty].x = mplayer[dificulty].start_x; - mplayer[dificulty].y = mplayer[dificulty].start_y; - R_current = (R_x + ((R_y - 1)*R_max_x)); - fclose(lvl); - init_room(); - } - else - { - game_exit=1; - } -} - -void start_game() -{ - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - LoadT(&font,DATADIR"/fonts/font16d.T"); - SDL_SetColorKey(font, SDL_SRCCOLORKEY, SDL_MapRGB(font->format,0,0,0)); - print_text(font,screen,16,16,140,90,"LOADING GAME DATA... PLEASE WAIT"); - //SDL_UpdateRect(screen,140,90,520,16); - SDL_Flip(screen); - SDL_FreeSurface(font); - - setgame(); - - load_gamedata(); - init_objects(); - if(stage+1 != CEMETERY && stage+1 != CAVES && stage+1 != CASTLE && stage+1 != LAB) - setback(); - - stage_up(); // con esta rutina aumentamos la fase en 1 y leemos la pantalla inicial y la posicion inicial del personaje - init_monsters(); - playtime=SDL_GetTicks(); - game_exit=0; - while(game_exit==0) - { - game_loop(); - } - playtime=SDL_GetTicks()-playtime; - unload_gamedata(); - stop_music(); - - if(stage>NUM_STAGES) - { - escape_exit=0; - win_game(); - } - - if(mplayer[dificulty].lives == 0 || stage > NUM_STAGES) - game_over(); -} - -void init_room() -{ - roomtime=0; // indica el tiempo que llevamos en una habitacion - flushevents(); - load_room(); - init_monsters(); - print_room(); - if(stage<=3) // solamente se muestra la flecha indicadora en las 3 primeras pantallas - chk_exits=1; - else - chk_exits=0; -} - -void animatemonsters() -{ - M_frame++; - if(M_frame > M_frames) - M_frame=1; -} - -void animatefx() -{ - brightframe++; - if(brightframe > 9) - brightframe=0; -} - -void animate() //rutina para la animacion de los sprites -{ - - int animspeed=100; - animcounter=animcounter+(imove*animspeed); - if(animcounter > 10) - { - animatemonsters(); - animateplayer(); - animatefx(); - animcounter = 0; - } -} -void play_music() -{ - if(!Mix_PlayingMusic()) - Mix_PlayMusic(music,0); -} - -void chk_state() -{ - if(mplayer[dificulty].dead==1) - { - loose_life(); - if(mplayer[dificulty].lives<1) - game_exit=1; - else - { - respawned=0; - Mix_Volume(1,90); - Mix_PlayChannel(1,respawnsnd,1); - while(respawned==0) - { - delta_time(); - respawn(); - } - } - } - if(mplayer[dificulty].stageup==1) - { - while(Mix_Playing(0)) - {} - stage_up(); - } - if(chk_exits==1 && roomtime < 5) - check_exits(); -} - -double delta_time(void) -{ - curtime=SDL_GetTicks(); - imove=(curtime-lasttime)/1000.0; - lasttime=curtime; - if(imove>0.2) - imove=0.2; - return imove; -} - -void print_timer() -{ - print_text(scorefont,screen,16,16,224,564,"TIME :"); - if(minutes==0 && seconds <=10) - { - Mix_Volume(0,100); - font=scorefont2; - if((int(oldsec-1)==int(seconds))&& seconds > 0) - Mix_PlayChannel(0,timer,0); - } - else - font=scorefont1; - - if(seconds>=10) - print_text(font,screen,16,16,352,564,"%d:%d",minutes,seconds); - else - print_text(font,screen,16,16,352,564,"%d:0%d",minutes,seconds); - - //SDL_UpdateRect(screen,224,544,208,40); -} - -void do_gametimer() -{ - gametimer-=imove; - roomtime+=imove; - minutes = int(gametimer/60); - seconds = int(gametimer-minutes*60); - - print_timer(); - screen_fx(); // efectos especiales de pantalla - if(minutes==0 && seconds == 0) - { - stage--; - init_objects(); - loose_life(); - if(Mix_PlayingMusic()) - Mix_FreeMusic(music); - stage_up(); - } - oldsec=seconds; - -} - -void chk_sequence() -{ - int n; - sequence=mstage[stage-1].objects+1; - for(n=0;n<2000;n++) - { - if(mobject[n].stage==stage) - { - if(mobject[n].seq0) - sequence=mobject[n].seq; -//fprintf(stderr,"stage=%d object stage=%d\n",stage, mobject[n].stage); - -//fprintf(stderr,"proximo objeto de la secuencia es=%d, numero=%d, x=%d, y=%d stage=%d \n",mobject[n].seq, n, mobject[n].x, mobject[n].y, mobject[n].stage); - } - } - int object_is_here=0; // esta variable indica si el objeto que sigue en la secuencia esta en la pantalla actual - int bright_x, bright_y; // variables que indica en que posicion debe aparecer el brillo del proximo objeto a recoger - for(n=0;n<5;n++) - { - if(mobject[(R_current-1)*5+n].seq==sequence) - { - object_is_here=1; - bright_x=mobject[(R_current-1)*5+n].x; - bright_y=mobject[(R_current-1)*5+n].y; - } - } - if(object_is_here==1) - { - bright_obj(bright_x, bright_y); - } -} - -void game_loop() -{ - SDL_BlitSurface(background,NULL,screen,NULL); - print_room(); - delta_time(); - do_gametimer(); // esta rutina decrementa e imprime el timer - play_music(); - game_events(); - animate(); - clean_player(); - if(fadingobject==1) // chquea si se debe eliminar un objeto - alphade=fade_object(alphade); - print_monsters(); - print_player(); - chk_sequence(); // esta rutina se fija cual es el proximo objeto de la sequencia (Bomb Jack feature) - chk_state(); // esta rutina chequea si el personaje se murio, o si paso de nivel - SDL_Flip(screen); - SDL_Delay(1); -} diff --git a/project/jni/application/pachi/src/gameover.h b/project/jni/application/pachi/src/gameover.h deleted file mode 100644 index 800af216a..000000000 --- a/project/jni/application/pachi/src/gameover.h +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void show_hiscores() -{ - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - SDL_BlitSurface(background,NULL,screen,NULL); - SDL_SetColorKey(scorefont,SDL_SRCCOLORKEY,SDL_MapRGB(scorefont->format,0,0,0)); - SDL_SetColorKey(scorefont1,SDL_SRCCOLORKEY,SDL_MapRGB(scorefont1->format,0,0,0)); - SDL_SetColorKey(scorefont1,SDL_SRCCOLORKEY,SDL_MapRGB(scorefont1->format,0,0,0)); - char plyername[]=" "; - char diflevel[] =" "; - print_text(scorefont1,screen,16,16,30, 55," PACHI EL MARCIANO TOP TEN ");//scorename[a]); - print_text(scorefont1,screen,16,16,30, 95,"NAME STAGE TIME LEVEL SCORE ");//scorename[a]); - print_text(scorefont1,screen,16,16,30,120,"----------------------------------------------");//scorename[a]); - print_text(scorefont1,screen,16,16,30,535,"----------------------------------------------");//scorename[a]); - - for(int a=0; a < 10;a++) - { - strncpy(playername,scorename[a],10); - print_text(scorefont,screen,16,16,30,170+(35*a),"%s",playername);//scorename[a]); - print_text(scorefont,screen,16,16,268,170+(35*a),"%d",scorestage[a]); - int mins=int(scoretime[a]/60); - int secs=int(scoretime[a]-(mins*60)); - if(secs>9) - print_text(scorefont,screen,16,16,386,170+(35*a),"%d:%d",mins,secs); - else - print_text(scorefont,screen,16,16,386,170+(35*a),"%d:0%d",mins,secs); - - if(scoredif[a]==1) - strcpy(diflevel," EASY "); - if(scoredif[a]==2) - strcpy(diflevel,"NORMAL"); - if(scoredif[a]==3) - strcpy(diflevel," HARD "); - print_text(scorefont,screen,16,16,502,170+(35*a),"%s",diflevel); - print_text(scorefont,screen,16,16,672,170+(35*a),"%d",scorescore[a]); - } - SDL_Flip(screen); -} - -void do_hiscores() -{ - load_hiscoredata(); - setback(); - show_hiscores(); - escape_exit=0; - - while(escape_exit==0) - { - credits_events(); - SDL_Delay(1); - } - unload_hiscoredata(); -} - -void do_gameover() -{ - load_hiscoredata(); - - char nameplayer[]=" "; - strncpy(playername,nameplayer,10); - namechar=0; - int highscore=0; - for(int a=9; a>=0;a--) - { - if(score>scorescore[a]) - { - highscore=1; - scorepos=a; - } - } - if(highscore==1) // si se hizo una buena puntuacion - { - for(int b=8;b>=scorepos;b--) - { - strncpy(scorename[b+1],scorename[b],10); - scorescore[b+1]=scorescore[b]; - scorestage[b+1]=scorestage[b]; - scoretime [b+1]=scoretime [b]; - scoredif [b+1]=scoredif [b]; - } - inputloop=1; - SDL_Rect box; - box.x=270;box.y=220;box.w=260;box.h=52; - SDL_FillRect(screen,&box,SDL_MapRGB(screen->format,255,255,255)); - box.x=273;box.y=223;box.w=254;box.h=46; - while(inputloop==1) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - SDL_BlitSurface(background,NULL,screen,NULL); - hiscore_events(); - SDL_FillRect(screen,&box,SDL_MapRGB(screen->format,0,0,0)); - print_text(scorefont1,screen,16,16,box.x+10,box.y+5,"ENTER YOUR NAME"); - print_text(scorefont1,screen,16,16,box.x+51+(namechar*16),box.y+29,"."); - print_text(scorefont,screen,16,16,box.x+51,box.y+24,"%s",playername); - SDL_Flip(screen); - } - strncpy(scorename[scorepos],playername,10); - scorescore[scorepos]=score; - scorestage[scorepos]=stage; - scoredif[scorepos]=dificulty; - scoretime[scorepos]=int(playtime/1000); - save_hiscoredata(); - } - - unload_hiscoredata(); -} - -void game_over() -{ - do_gameover(); - do_hiscores(); -} diff --git a/project/jni/application/pachi/src/gfx.h b/project/jni/application/pachi/src/gfx.h deleted file mode 100644 index 92e75e36f..000000000 --- a/project/jni/application/pachi/src/gfx.h +++ /dev/null @@ -1,120 +0,0 @@ -/*************************************************************************** -* Gfx Functions * -* ------------- * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -/* - LoadT carga un grafico en formato .T de 24 bits en una superficie SDL -*/ -void LoadT(SDL_Surface **Tsurface, char *str) -{ - FILE *Tsrc; - - int T_lwidth, T_hwidth, T_lheight, T_hheight; // bytes alto y bajo de anchura y altura del grafico - long T_width, T_height; - int R, G, B; - Uint32 pixel; - - Tsrc=fopen(str, "rb"); - if ( Tsrc == NULL) - { - fprintf(stderr, "can't read from file \n"); - return; - } - - // leer tamao del bmp - T_lwidth = getc(Tsrc); - T_hwidth = getc(Tsrc); - T_lheight = getc(Tsrc); - T_hheight = getc(Tsrc); - T_width = T_hwidth*256+T_lwidth; - T_height = T_hheight*256+T_lheight; - - SDL_Surface *temp; - temp = SDL_CreateRGBSurface(SDL_SWSURFACE,T_width,T_height,24,0,0,0,0); - - if(SDL_MUSTLOCK(temp)) - SDL_LockSurface(temp); - - for(int n=1;n<=T_height;n++) //el tamao del grafico es de ancho * alto * 3 (24 bits) - { - for(int m=1;m<=T_width;m++) - { - R=getc(Tsrc); - G=getc(Tsrc); - B=getc(Tsrc); - pixel=SDL_MapRGB(temp->format,R,G,B); - - Uint8 *p = (Uint8 *)temp->pixels + (n-1) * temp->pitch + (m-1) * 3; - p[0] = pixel & 0xff; - p[1] = (pixel >> 8) & 0xff; - p[2] = (pixel >> 16) & 0xff; - } - } - - if(SDL_MUSTLOCK(temp)) - SDL_UnlockSurface(temp); - *Tsurface = SDL_DisplayFormat(temp); - SDL_FreeSurface(temp); - fclose(Tsrc); -} - -SDL_Surface * LoadT8(char *str, bool HW=true) -{ - SDL_Surface *Tsurface; - FILE *Tsrc; - Tsrc=fopen(str, "rb"); - if ( Tsrc == NULL) - { - fprintf(stderr, "can't read from file \n"); - SDL_Quit(); - exit(0); - } - // leer tamao del bmp - fseek(Tsrc,6,SEEK_SET); // Saltamos la cabecera "T-1000" - // leemos tamao del bitmap - int wh=getc(Tsrc); int wl=getc(Tsrc); int hh=getc(Tsrc); int hl=getc(Tsrc); - int width=wh*256+wl; int height=hh*256+hl; - // leemos la paleta - int paleta[768]; - for(int pal=0;pal<768;pal++) - paleta[pal]=getc(Tsrc); - // leemos el bitmap en una superficie de 24 bits - SDL_Surface *temp; - temp = SDL_CreateRGBSurface(SDL_SWSURFACE,width,height,24,0,0,0,0); - if(SDL_MUSTLOCK(temp)) - SDL_LockSurface(temp); - Uint32 pixel; - int x,y,color; - for(y=0;yformat,paleta[color*3],paleta[(color*3)+1],paleta[(color*3)+2]); - Uint8 *p = (Uint8 *)temp->pixels + (y) * temp->pitch + (x) * 3; - p[0] = pixel & 0xff; - p[1] = (pixel >> 8) & 0xff; - p[2] = (pixel >> 16) & 0xff; - } - } - if(SDL_MUSTLOCK(temp)) - SDL_UnlockSurface(temp); - if( HW ) - Tsurface = SDL_DisplayFormat(temp); - else - Tsurface = SDL_ConvertSurface(temp, screen->format, SDL_SWSURFACE); - SDL_FreeSurface(temp); - fclose(Tsrc); - return(Tsurface); -} diff --git a/project/jni/application/pachi/src/init.h b/project/jni/application/pachi/src/init.h deleted file mode 100644 index 9eedb4c98..000000000 --- a/project/jni/application/pachi/src/init.h +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void initsdl() -{ - - int have_joystick=0; - - if(SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) - { - fprintf(stderr,"Could not Initialize SDL.\nError: %s\n", SDL_GetError()); - exit (1); - } - if(Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 2048) < 0) - { - fprintf(stderr,"Warning: Couldn't set 44100 Hz 16-bit audio\n: %s\n", SDL_GetError()); - } - SDL_WM_SetIcon(SDL_LoadBMP(DATADIR"/Tgfx/icon.bmp"),NULL); - - fullscreen=0; - screen = SDL_SetVideoMode(screen_w,screen_h,screen_bpp, SDL_HWSURFACE|SDL_DOUBLEBUF /* SDL_SWSURFACE */ ); - if (screen == NULL) - { - fprintf(stderr, "Can't set the video mode. Quitting.\nError; %s\n", SDL_GetError()); - exit (1); - } - - have_joystick = SDL_NumJoysticks(); -// fprintf(stderr, "%i joysticks were found.\n", have_joystick ); - if (have_joystick) - { - SDL_JoystickEventState(SDL_ENABLE); - joystick = SDL_JoystickOpen(0); - } - - SDL_ShowCursor(0); - SDL_WM_GrabInput(SDL_GRAB_ON); - SDL_WM_GrabInput(SDL_GRAB_OFF); - SDL_WM_SetCaption("Pachi el marciano", "Pachi el marciano"); -} diff --git a/project/jni/application/pachi/src/input.h b/project/jni/application/pachi/src/input.h deleted file mode 100644 index b44122f7c..000000000 --- a/project/jni/application/pachi/src/input.h +++ /dev/null @@ -1,467 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void credits_events() -{ - SDL_Event event; - while(SDL_PollEvent(&event)) - { - check_joystick_events(&event, joypos); - if(event.type==SDL_KEYDOWN) - if(event.key.keysym.sym==SDLK_ESCAPE || event.key.keysym.sym==SDLK_RETURN || event.key.keysym.sym==SDLK_SPACE) - escape_exit=1; - if(joypos[JOY_BUTTON0]) - escape_exit=1; - } -} - -void pause_events() -{ - SDL_Event event; - while(SDL_PollEvent(&event)) - { - if(event.type==SDL_KEYDOWN) - if(event.key.keysym.sym==SDLK_h || event.key.keysym.sym==SDLK_F1) - escape_exit=1; - } -} - -void hiscore_events() -{ - int n; - SDL_Event event; - - while(SDL_PollEvent(&event)) - { - switch(event.type) - { - case SDL_KEYDOWN: - { - if(event.key.keysym.sym == SDLK_UP) - { - playername[namechar]--; - if(playername[namechar]<='A' || playername[namechar]>='Z') - playername[namechar]='A'; - } - else - if(event.key.keysym.sym == SDLK_DOWN) - { - playername[namechar]++; - if(playername[namechar]<='A' || playername[namechar]>='Z') - playername[namechar]='Z'; - } - else - if(event.key.keysym.sym == SDLK_RIGHT) - { - if(playername[namechar]<='A' || playername[namechar]>='Z') - playername[namechar]='A'; - namechar++; - if(namechar > 9) - namechar=9; - } - else - if(event.key.keysym.sym == SDLK_LEFT) - { - playername[namechar]=' '; - namechar--; - if(namechar < 0) - namechar=0; - } - else - if(event.key.keysym.sym>41) - { - playername[namechar] = event.key.keysym.sym; - if(playername[namechar]>=97 && playername[namechar]<=122) - playername[namechar]=event.key.keysym.sym-32; - if(playername[namechar]<='A' || playername[namechar]>='Z') - playername[namechar]='A'; - if(namechar < 9) - namechar++; - } - else - { - if(event.key.keysym.sym==SDLK_RETURN || event.key.keysym.sym == SDLK_ESCAPE || event.key.keysym.sym == SDLK_SPACE) - inputloop=0; - if(event.key.keysym.sym==SDLK_BACKSPACE) - { - namechar=0; - for(n=0;n<10;n++) - playername[n] = '.'; - } - } - } - } - check_joystick_events(&event, joypos); - if (joypos[JOY_UP]) - { - playername[namechar]++; - if(playername[namechar]>=97 && playername[namechar]<=122) - playername[namechar]-=32; - } - if (joypos[JOY_DOWN]) - { - playername[namechar]--; - if(playername[namechar]>=97 && playername[namechar]<=122) - playername[namechar]-=32; - } - if (joypos[JOY_BUTTON0]) - { - namechar++; - if(namechar > 3) - namechar=0; - } - if (joypos[JOY_BUTTON1]) - inputloop=0; - } -} - -void menu_events() -{ - SDL_Event event; - Uint8 *keys; - Mix_Volume(0,100); - while(SDL_PollEvent(&event)==1) - { - if(event.type==SDL_QUIT) - gameexit=1; - - check_joystick_events(&event, joypos); - keys = SDL_GetKeyState(NULL); - if(keys[SDLK_DOWN] || keys[SDLK_KP2] || keys[SDLK_a] || joypos[JOY_DOWN]) - { - Mix_PlayChannel(0,option,0); - if(menuvalue == 7) - menuvalue=1; - else - menuvalue++; - } - if(keys[SDLK_UP] || keys[SDLK_KP8] || keys[SDLK_q] || joypos[JOY_UP]) - { - Mix_PlayChannel(0,option,0); - if(menuvalue == 1) - menuvalue = 7; - else - menuvalue--; - } - if(keys[SDLK_SPACE] || keys[SDLK_RETURN] || joypos[JOY_BUTTON0]) - { - Mix_PlayChannel(0,option,0); - - switch(menuvalue) - { - case 1: - startgame = 1; - break; - case 2: - dificulty++; - if(dificulty>3) - dificulty=1; - break; - case 3: - screen_mode(); - setback(); - joypos[JOY_BUTTON0]=0; - break; - case 4: - do_code(); - break; - case 5: - help=1; - break; - case 6: - hiscores=1; - break; - case 7: - gameexit = 1; - break; - default: - break; - } - } - if(keys[SDLK_ESCAPE]) - gameexit=1; - } -} - -void code_events() -{ - int n; - SDL_Event event; - - while(SDL_PollEvent(&event)==1) - { - switch(event.type) - { - case SDL_KEYDOWN: - { - if(event.key.keysym.sym == SDLK_UP) - { - code[codechar]--; - if(code[codechar]<='A' || code[codechar]>='Z') - code[codechar]='A'; - } - else - if(event.key.keysym.sym == SDLK_DOWN) - { - code[codechar]++; - if(code[codechar]<='A' || code[codechar]>='Z') - code[codechar]='Z'; - } - else - if(event.key.keysym.sym == SDLK_RIGHT) - { - if(code[codechar]<='A' || code[codechar]>='Z') - code[codechar]='A'; - codechar++; - if(codechar > 3) - codechar=3; - } - else - if(event.key.keysym.sym == SDLK_LEFT) - { - code[codechar]='.'; - codechar--; - if(codechar < 0) - codechar=0; - } - else - if(event.key.keysym.sym>41) - { - code[codechar] = event.key.keysym.sym; - if(code[codechar]>=97 && code[codechar]<=122) - code[codechar]=event.key.keysym.sym-32; - if(code[codechar]<='A' || code[codechar]>='Z') - code[codechar]='A'; - if(codechar < 3) - codechar++; - } - else - { - if(event.key.keysym.sym== SDLK_RETURN || event.key.keysym.sym == SDLK_ESCAPE || event.key.keysym.sym == SDLK_SPACE) - inputloop=0; - if(event.key.keysym.sym== SDLK_BACKSPACE) - { - SDL_Rect coderect; - coderect.x=303; - coderect.y=235; - coderect.w=194; - coderect.h=44; - SDL_FillRect(screen, &coderect, SDL_MapRGB(screen->format,0,0,0)); - - - codechar=0; - for(int n=0;n<4;n++) - code[n] = '.' ; - } - } - } - } - check_joystick_events(&event, joypos); - if (joypos[JOY_UP]) - { - code[codechar]++; - if(code[codechar]>=97 && code[codechar]<=122) - code[codechar]-=32; - } - if (joypos[JOY_DOWN]) - { - code[codechar]--; - if(code[codechar]>=97 && code[codechar]<=122) - code[codechar]-=32; - } - if (joypos[JOY_BUTTON0]) - { - codechar++; - if(codechar > 3) - codechar=0; - } - if (joypos[JOY_BUTTON1]) - inputloop=0; - } -} - -void check_joystick_events(SDL_Event *event, Uint8 *joypos) -{ - switch (event->type) - { - case SDL_JOYAXISMOTION: /* Handle Joystick Motion */ - if( event->jaxis.axis == 0) - { /* Left-Right movement code goes here */ - if ( event->jaxis.value < -3200) - { - joypos[JOY_LEFT]=1; - joypos[JOY_RIGHT]=0; - } - else - { - if ( event->jaxis.value > 3200) - { - joypos[JOY_LEFT]=0; - joypos[JOY_RIGHT]=1; - } - else - { - joypos[JOY_LEFT]=0; - joypos[JOY_RIGHT]=0; - } - } - } - if( event->jaxis.axis == 1) - { /* Up-Down movement code goes here */ - if ( event->jaxis.value < -3200) - { - joypos[JOY_UP]=1; - joypos[JOY_DOWN]=0; - } - else - { - if ( event->jaxis.value > 3200) - { - joypos[JOY_UP]=0; - joypos[JOY_DOWN]=1; - } - else - { - joypos[JOY_UP]=0; - joypos[JOY_DOWN]=0; - } - } - } - break; - case SDL_JOYBUTTONDOWN: /* Handle Joystick Button Presses */ - switch (event->jbutton.button) - { - case 0: - joypos[JOY_BUTTON0]=1; break; - case 1: - joypos[JOY_BUTTON1]=1; - break; - } - break; - case SDL_JOYBUTTONUP: /* Handle Joystick Button Releases */ - switch (event->jbutton.button) - { - case 0: - joypos[JOY_BUTTON0]=0; - break; - case 1: - joypos[JOY_BUTTON1]=0; - break; - } - break; - } -} - - -void game_events() -{ - int n; - SDL_Event event; - Uint8 *keys; - - if(mplayer[dificulty].lives==0) - game_exit = 1; - - - while(SDL_PollEvent(&event)==1) - { - check_joystick_events(&event, joypos); - keys = SDL_GetKeyState(NULL); - - mplayer[dificulty].left = 0; - mplayer[dificulty].right = 0; - - if(keys[SDLK_h] || keys[SDLK_F1]) - { - escape_exit=0; - SDL_Rect dst; - dst.x=300; dst.y=200; dst.w=192; dst.h=32; - SDL_Rect src; - src.x=dst.x-R_gamearea_x; src.y=dst.y-R_gamearea_y; src.w=dst.w; src.h=dst.h; - print_text(menufont, screen, 32, 32, dst.x, dst.y, "PAUSED"); - SDL_UpdateRect(screen, dst.x, dst.y , dst.w, dst.h); - while(escape_exit==0) - { - pause_events(); - SDL_Delay(5); - } - SDL_BlitSurface(screenbak, &src, screen, &dst); - SDL_UpdateRect(screen, dst.x, dst.y , dst.w, dst.w); - } - if(keys[SDLK_o] || keys[SDLK_LEFT] || keys[SDLK_KP4] || joypos[JOY_LEFT]) - { - mplayer[dificulty].left = 1; - mplayer[dificulty].right = 0; - mplayer[dificulty].facingleft = 1; - } - if(keys[SDLK_p] || keys[SDLK_RIGHT] || keys[SDLK_KP6] || joypos[JOY_RIGHT]) - { - mplayer[dificulty].right = 1; - mplayer[dificulty].left = 0; - mplayer[dificulty].facingleft = 0; - } - if(keys[SDLK_q] || keys[SDLK_UP] || keys[SDLK_KP8] || joypos[JOY_UP]) - { - if(mplayer[dificulty].duck==1) // en esta rutina tiene que comprobar que si se quiere parar que no tenga nada encima que se lo impida - { - mplayer[dificulty].duck = 0; - mplayer[dificulty].framer = 1; - mplayer[dificulty].y = mplayer[dificulty].old_y - (P_h - P_h/2); - for(int n=0;n<=mplayer[dificulty].w-1;n++) - { - int x=int(mplayer[dificulty].x+n)/R_tileside; - int y=int((mplayer[dificulty].y - (P_h - P_h/2)+R_tileside)/R_tileside); - chk_touched(x,y); - if((mroom.data[x][y] >= 80) && (mroom.data[x][y] < 200)) - { - mplayer[dificulty].duck = 1; - mplayer[dificulty].framer = 2; - mplayer[dificulty].y = mplayer[dificulty].old_y; - } - } - } - } - if(keys[SDLK_a] || keys[SDLK_DOWN] || keys[SDLK_KP2] || joypos[JOY_DOWN]) - { - if(mplayer[dificulty].duck==0 && mplayer[dificulty].jump == 0 && mplayer[dificulty].infloor == 1) - { - mplayer[dificulty].y = mplayer[dificulty].y + (P_h - P_h/2); - mplayer[dificulty].ducked = 1; - } - if(mplayer[dificulty].jump == 0 && mplayer[dificulty].infloor == 1) - mplayer[dificulty].duck = 1; - } - if(keys[SDLK_SPACE] || keys[SDLK_KP0] || joypos[JOY_BUTTON0]) - { - if((mplayer[dificulty].infloor==1)&&(mplayer[dificulty].duck==0)&&(mplayer[dificulty].y+P_h/R_tileside==int(mplayer[dificulty].y+P_h/R_tileside))) - { - mplayer[dificulty].jumpcounter=0; - mplayer[dificulty].startjump=int(mplayer[dificulty].y); - mplayer[dificulty].upflag=1; - mplayer[dificulty].downflag=0; - mplayer[dificulty].jump = 1; - Mix_Volume(0,100); - Mix_PlayChannel(0,jump,0); - } - } - if(keys[SDLK_ESCAPE]) - { - game_exit = 1; - } - } -} diff --git a/project/jni/application/pachi/src/intro.h b/project/jni/application/pachi/src/intro.h deleted file mode 100644 index 5c372405e..000000000 --- a/project/jni/application/pachi/src/intro.h +++ /dev/null @@ -1,122 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void init_intro() -{ - SDL_Surface *temp; - - dragontech=LoadT8(DATADIR"/Tgfx/dragontech.T8"); - line1=LoadT8(DATADIR"/Tgfx/line1.T8"); - line2=LoadT8(DATADIR"/Tgfx/line2.T8"); - SDL_SetColorKey(dragontech, SDL_SRCCOLORKEY,SDL_MapRGB(dragontech->format,0,255,0)); - SDL_SetColorKey(line1, SDL_SRCCOLORKEY,SDL_MapRGB(line1->format,0,0,0)); - SDL_SetColorKey(line2, SDL_SRCCOLORKEY,SDL_MapRGB(line2->format,0,0,0)); - - comic_01=LoadT8(DATADIR"/Tgfx/comic_01.T8"); - - temp=SDL_CreateRGBSurface(SDL_SWSURFACE, screen_w, screen_h, screen_bpp, 255, 255, 255, 0); - SDL_FillRect(temp, NULL, SDL_MapRGB(temp->format,0,0,0)); - black = SDL_DisplayFormat(temp); - - SDL_FreeSurface(temp); - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); -} - -void end_intro() -{ - SDL_FreeSurface(dragontech); - SDL_FreeSurface(line1); - SDL_FreeSurface(line2); - SDL_FreeSurface(comic_01); - SDL_FreeSurface(black); -} - -void intro() -{ - init_intro(); - double introtime=0; - escape_exit=0; - float title_alpha=0; - int title_done=0; - int n=1; - while(escape_exit==0) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - //if(n<=4) // 4 son los pasos a realizar en la primer parte de la intro - { - { - switch(n) - { - default: - if(n==3) - title_alpha=intro_blit(line2, 160, 350, 600, 40, title_alpha, 80, 1); - else - intro_blit(line2, 160, 350, 600, 40, 255, 80, 1); - case 2: - if(n==2) - title_alpha=intro_blit(line1, 60, 300, 600, 40, title_alpha, 80, 1); - else - intro_blit(line1, 60, 300, 600, 40, 255, 80, 1); - case 1: - if(n==1) - title_alpha=intro_blit(dragontech, 160, 100, 480, 170, title_alpha, 80, 1); - else - intro_blit(dragontech, 160, 100, 480, 170, 255, 80, 1); - } - } - if(title_alpha>=255) - { - title_alpha=0; - n++; - } - } - SDL_Flip(screen); - credits_events(); - delta_time(); - introtime+=imove; - SDL_Delay(1); - if(introtime>15) - escape_exit=1; - } - - escape_exit=0; n=1; title_alpha=0; introtime=0; - while(escape_exit==0) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - { - if(n == 1) - title_alpha=intro_blit(comic_01, 0, 0, 800, 600, title_alpha, 60, 0); - else - intro_blit(comic_01, 0, 0, 800, 600, 255, 60, 0); - } - if(title_alpha>=255) - { - title_alpha=0; - n++; - } - SDL_Flip(screen); - credits_events(); - delta_time(); - introtime+=imove; - SDL_Delay(1); - if(introtime>15) - escape_exit=1; - } - - end_intro(); -} diff --git a/project/jni/application/pachi/src/menu.h b/project/jni/application/pachi/src/menu.h deleted file mode 100644 index c097b880f..000000000 --- a/project/jni/application/pachi/src/menu.h +++ /dev/null @@ -1,142 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void do_code() -{ - Mix_Volume(3,100); - codechar=0; - inputloop=1; -// SDL_SetColorKey(menufont1,0,SDL_MapRGB(menufont1->format,0,255,0)); - while(inputloop==1) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - SDL_Rect coderect; - coderect.x=300; - coderect.y=232; - coderect.w=200; - coderect.h=60; - SDL_FillRect(screen, &coderect, SDL_MapRGB(screen->format,255,255,255)); - coderect.x=303; - coderect.y=235; - coderect.w=194; - coderect.h=54; - SDL_FillRect(screen, &coderect, SDL_MapRGB(screen->format,0,0,0)); - code_events(); - print_text(menufont1, screen, 32, 32, 336, 241, "%s",code); - char cursor[]=" "; - cursor[codechar]='.'; - print_text(menufont1, screen, 32, 32, 336, 254, "%s",cursor); - //SDL_UpdateRect(screen, 300, 232, 200, 50); - SDL_Flip(screen); - } -// SDL_SetColorKey(menufont1,SDL_SRCCOLORKEY,SDL_MapRGB(menufont1->format,0,255,0)); - - // comparar si el codigo es correcto - - startstage = 0; - int right = 0; - - int n; - for(n=1;n < NUM_STAGES+1;n++) - { - if(strcmp(code,mstage[n-1].code)==0) - { - startstage=n-1; - right=1; - } - } - if(right==1) - Mix_PlayChannel(3,coderight,0); - else - Mix_PlayChannel(3,codewrong,0); - - setback(); -} - -void do_menu() -{ - SDL_Delay(1); - SDL_Surface ** font = menufont; - - int menustartpos=156; - - if(menuvalue == 1) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos, " PLAY"); - if(menuvalue == 2) font = menufont1; else font = menufont; - { - SDL_Rect restoremenu; - restoremenu.x=305; restoremenu.y=menustartpos+(1*40);restoremenu.w=300;restoremenu.h=32; - SDL_BlitSurface(background,&restoremenu,screen,&restoremenu); - - if(dificulty==1) - { - print_text(font, screen, 32, 32 ,305, menustartpos+(1*40), " EASY"); - } - if(dificulty==2) - { - print_text(font, screen, 32, 32 ,305, menustartpos+(1*40), "NORMAL"); - } - if(dificulty==3) - { - print_text(font, screen, 32, 32 ,305, menustartpos+(1*40), " HARD"); - } - } - if(menuvalue == 3) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos+(2*40), "SCREEN"); - if(menuvalue == 4) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos+(3*40), " CODE"); - if(menuvalue == 5) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos+(4*40), " HELP"); - if(menuvalue == 6) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos+(5*40), "SCORES"); - if(menuvalue == 7) font = menufont1; else font = menufont; - print_text(font, screen, 32, 32 ,305, menustartpos+(6*40), " EXIT"); - - //SDL_UpdateRect(screen, 300, 160, 240, 300); -} - -void menu_loop() -{ - do_menu(); - if(!Mix_PlayingMusic()) - Mix_PlayMusic(music,0); - SDL_Delay(1); -} - -void menu() -{ - load_menudata(); - float alpha=0; - while(alpha<255) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - alpha=intro_blit(background,0,0,800,600,alpha,200,0); - SDL_Flip(screen); - delta_time(); - } - menuvalue=1; - while(gameexit==0 && startgame==0 && help==0 && hiscores==0) - { - SDL_BlitSurface(background, NULL, screen, NULL); - menu_events(); - menu_loop(); - SDL_Flip(screen); - } - unload_menudata(); - stop_music(); -} diff --git a/project/jni/application/pachi/src/monsters.h b/project/jni/application/pachi/src/monsters.h deleted file mode 100644 index 80266ebcd..000000000 --- a/project/jni/application/pachi/src/monsters.h +++ /dev/null @@ -1,215 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -// ------------------------------------------------- -// RUTINAS DE CHEQUEO DE COLISIONES DE LOS MONSTRUOS -// ------------------------------------------------- -void check_monster_down(int n) -{ - if((M_y[n] + M_h) > (R_tileside*(R_maxtiles_v-1))) - { - M_direction[n] = 1; - M_y[n]--; - } - if((M_y[n]+M_h)/R_tileside >= int(M_y[n]+M_h)/R_tileside) - { - for(int m=0;m<=M_w-1;m++) - { - if(mroom.data[int(M_x[n]+m)/R_tileside][int((M_y[n]+M_h)/R_tileside)] >= 40) - { - M_direction[n] = 1; - M_y[n]--; - } - } - } - // Chequeo de colision contra otro monstruo - for(int m=0;m<=M_max4room-1;m++) - { - if(n!=m && M_type[m]!=0) - { - if(M_y[n] < M_y[m]+M_h && M_y[n]+M_h > M_y[m]) - if(M_x[n] < M_x[m]+M_w && M_x[n]+M_w > M_x[m]) - { - M_direction[n] = 1; - M_y[n]-=3; - } - } - } -} - -void check_monster_up(int n) -{ - if(M_y[n] < R_tileside) - { - M_direction[n] = 0; - M_y[n]++; - } -// if((M_y[n])/R_tileside <= int(M_y[n])/R_tileside) -// { - for(int m=0;m<=M_w-1;m++) - { - if(mroom.data[int(M_x[n]+m)/R_tileside][int((M_y[n])/R_tileside)] >= 40) - { - M_direction[n] = 0; - M_y[n]++; - } - } -// } - // Chequeo de colision contra otro monstruo - for(int m=0;m<=M_max4room-1;m++) - { - if(m!=n && M_type[m]!=0) - { - if(M_y[n] < M_y[m]+M_h && M_y[n]+M_h > M_y[m]) - if(M_x[n] < M_x[m]+M_w && M_x[n]+M_w > M_x[m]) - { - M_direction[n] = 0; - M_y[n]+=3; - } - } - } - -} - -void check_monster_left(int n) -{ - if(M_x[n] < R_tileside) - { - M_direction[n] = 0; - M_x[n]++; - } - if((M_x[n])/R_tileside >= int(M_x[n])/R_tileside) - { - for(int m=0;m<=M_h-1;m++) - { - if(mroom.data[int(M_x[n])/R_tileside][int((M_y[n]+m)/R_tileside)] >= 40) - { - M_direction[n] = 0; - M_x[n]++; - } - } - } - // Chequeo de colision contra otro monstruo - for(int m=0;m<=M_max4room-1;m++) - { - if(m!=n && M_type[m]!=0) - { - if(M_y[n] < M_y[m]+M_h && M_y[n]+M_h > M_y[m]) - if(M_x[n] < M_x[m]+M_w && M_x[n]+M_w > M_x[m]) - { - M_direction[n] = 0; - M_x[n]+=3; - } - } - } -} - -void check_monster_right(int n) -{ - if((M_x[n] + M_w) > (R_tileside*(R_maxtiles_h-1))) - { - M_direction[n] = 1; - M_x[n]--; - } - if((M_x[n]+M_w)/R_tileside >= int(M_x[n]+M_w)/R_tileside) - { - for(int m=0;m<=M_h-1;m++) - { - if(mroom.data[int(M_x[n]+M_w)/R_tileside][int((M_y[n]+m)/R_tileside)] >= 40) - { - M_direction[n] = 1; - M_x[n]--; - } - } - } - // Chequeo de colision contra otro monstruo - for(int m=0;m<=M_max4room-1;m++) - { - if(m!=n && M_type[m]!=0) - { - if(M_y[n] < M_y[m]+M_h && M_y[n]+M_h > M_y[m]) - if(M_x[n] < M_x[m]+M_w && M_x[n]+M_w > M_x[m]) - { - M_direction[n] = 1; - M_x[n]-=3; - } - } - } -} - -void move_monster(int n) -{ - if(M_type[n] > 12) // los monstruos que sean tipo mayor a 12 se mueven en el eje Y y los menores de mueven en el eje X - { - if(M_direction[n] == 1) - { - M_y[n]=M_y[n]-(M_speed[dificulty]*imove); - check_monster_up(n); //up - } - if(M_direction[n] == 0) - { - M_y[n]=M_y[n]+(M_speed[dificulty]*imove); - check_monster_down(n); //down - } - } - else - { - if(M_direction[n] == 1) - { - M_x[n]=M_x[n]-(M_speed[dificulty]*imove); - check_monster_left(n); // left - } - if(M_direction[n] == 0) - { - M_x[n]=M_x[n]+(M_speed[dificulty]*imove); - check_monster_right(n); //right - } - } -} - -void print_monsters() -{ - for(int n=0;n<=M_max4room-1;n++) - { - if(M_type[n] != 0) - { - oldmonsterpos.x = int(M_x[n]); - oldmonsterpos.y = int(M_y[n]); - oldmonsterpos.h = M_h; - oldmonsterpos.w = M_w; - oldmonsterposreal.x = int(M_x[n]+R_gamearea_x); - oldmonsterposreal.y = int(M_y[n]+R_gamearea_y); - - monstersrc.y = 0;//M_type[n] * M_h; - monstersrc.x = ((M_frame - 1)+(M_direction[n]*M_frames)) * M_w; - monstersrc.h = M_h; - monstersrc.w = M_w; - move_monster(n); - - monsterpos.x = int(M_x[n]); - monsterpos.y = int(M_y[n]); - monsterposreal.x = monsterpos.x + R_gamearea_x; - monsterposreal.y = monsterpos.y + R_gamearea_y; - - //SDL_BlitSurface(screenbak, &oldmonsterpos, screen, &oldmonsterposreal); - SDL_BlitSurface(monsters[n], &monstersrc, screen, &monsterposreal); - //SDL_UpdateRect(screen,oldmonsterposreal.x,oldmonsterposreal.y,M_w,M_h); - //SDL_UpdateRect(screen,monsterposreal.x,monsterposreal.y,M_w,M_h); - } - } -} diff --git a/project/jni/application/pachi/src/output.h b/project/jni/application/pachi/src/output.h deleted file mode 100644 index 7326af4fb..000000000 --- a/project/jni/application/pachi/src/output.h +++ /dev/null @@ -1,359 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void screen_mode() -{ - if(fullscreen) - { - screen = SDL_SetVideoMode(screen_w,screen_h,screen_bpp, SDL_HWSURFACE|SDL_DOUBLEBUF /* SDL_SWSURFACE */); - fullscreen = 0; - } - else - { - screen = SDL_SetVideoMode(screen_w,screen_h,screen_bpp, SDL_SWSURFACE); - fullscreen = 1; - } -} - - - -void print_credits() -{ - int creditsfont_h = 25; - int creditsfont_w = 18; - if(needinput==1) // la variable needinput indica si se debe imprimir una nueva linea de texto - { - char line2print[100]; // esta es la cadena de texto que contiene el renglon a imprimir - - for(int n=0; n<=37; n++) - line2print[n]=creditstext[n+(creditslinecounter*36)]; - - print_text(creditsfont, creditsbuffer, creditsfont_w, creditsfont_h, 0,400, line2print); - // imprime una linea de texto en la parte de abajo (no imprimible del primer buffer) - - needinput=0; - creditslinecounter++; - if(creditslinecounter==creditslines) - { - creditslinecounter--; - wrapcounter++; - if(wrapcounter==100) - { - creditslinecounter=0; - wrapcounter=0; - } - } - } - else // si no se imprime una nueva linea se debe hacer el scroll entre los buffers - { - SDL_Rect cbuffer; - cbuffer.w = 600; - cbuffer.h = 440; - cbuffer.x = 0; - cbuffer.y = 1; - - SDL_Rect cbuffer1; - cbuffer1.w = 600; - cbuffer1.h = 400; - cbuffer1.x = 0; - cbuffer1.y = 0; - - SDL_Rect creditspos; - creditspos.w=600; - creditspos.h=400; - creditspos.x=100; - creditspos.y=100; - - SDL_Rect bgpos; - bgpos.w=600; - bgpos.h=420; - bgpos.x=100; - bgpos.y=100; - - SDL_SetColorKey(creditsbuffer, 0, 0); - SDL_SetAlpha(creditsbuffer, SDL_SRCALPHA, 255); - SDL_BlitSurface(creditsbuffer, &cbuffer, creditsbuffer1, &cbuffer1); - SDL_BlitSurface(creditsbuffer1, &cbuffer1, creditsbuffer, &cbuffer1); - SDL_BlitSurface(background, NULL, screen, NULL); //SDL_BlitSurface(background, &bgpos, screen, &bgpos); - SDL_SetColorKey(creditsbuffer, SDL_SRCCOLORKEY, SDL_MapRGB(creditsbuffer->format, 0, 255, 0)); - SDL_SetAlpha(creditsbuffer, SDL_SRCALPHA, 128); - SDL_BlitSurface(creditsbuffer, &cbuffer1, screen, &creditspos); - //SDL_UpdateRect(screen,100,100,600,400); - SDL_Flip(screen); - SDL_Delay(50); - - linegone++; - if(linegone == creditsfont_h) - { - needinput = 1; - linegone = 0; - } - } -} - -void do_help() -{ - load_helpgfx(); - fadesurface(background, 0, 0, 150); - SDL_BlitSurface(background, NULL, screen, NULL); - print_text(scorefont, screen, 16, 16, 72, 68, " HOW TO PLAY PACHI EL MARCIANO "); - print_text(scorefont1, screen, 16, 16, 72, 120, "KEYS:"); - print_text(scorefont1, screen, 16, 16,100, 140, "RIGHT : P"); - print_text(scorefont1, screen, 16, 16,100, 160, "LEFT : O"); - print_text(scorefont1, screen, 16, 16,100, 180, "DUCK : A"); - print_text(scorefont1, screen, 16, 16,100, 200, "STAND UP : Q"); - print_text(scorefont1, screen, 16, 16,100, 220, "JUMP : SPACE"); - print_text(scorefont1, screen, 16, 16,100, 240, "PAUSE : H OR F1"); - print_text(scorefont1, screen, 16, 16, 72, 270, "YOU CAN ALSO USE THE CURSOR KEYS / KEYPAD"); - - print_text(scorefont, screen, 16, 16, 72, 300, " THE GOAL OF THE GAME IS TO COLLECT ALL "); - print_text(scorefont, screen, 16, 16, 72, 320, " THE OBJECTS OF EACH LEVEL, WHEN THIS IS "); - print_text(scorefont, screen, 16, 16, 72, 340, " DONE, THE EXIT GATE TO THE NEXT LEVEL "); - print_text(scorefont, screen, 16, 16, 72, 360, "WILL APPEAR, BUT BEWARE OF THE ENEMIES..."); - - SDL_Flip(screen); - escape_exit=0; - while(escape_exit == 0) - { - credits_events(); - } - unload_helpgfx(); -} - -void print_monitor() -{ - print_text(scorefont1,screen,16,16,30,485,"%s", mstage[stage-1].title); - print_text(scorefont,screen,16,16,30,510, "SCORE:%d", score); - print_text(scorefont,screen,16,16,30,528, "LIVES:%d", mplayer[dificulty].lives); - print_text(scorefont,screen,16,16,30,546, "STAGE:%d", stage); - print_text(scorefont,screen,16,16,30,564, "ITEMS:%d/%d",mplayer[dificulty].objects,mstage[stage-1].objects); - //SDL_UpdateRect(screen, 30, 482, 500, 100); -} - -void blinkscreen(int R,int G, int B, int A) -{ - SDL_FillRect(screen,NULL,SDL_MapRGBA(screen->format,R,G,B,A)); - SDL_Flip(screen); - //setback(); - //SDL_Flip(screen); -} - -void print_room() -{ - int x,y; - SDL_Rect gamearea; - gamearea.x=R_gamearea_x; - gamearea.y=R_gamearea_y; - gamearea.h=448; - gamearea.w=736; - SDL_FillRect(screen,&gamearea,0); - - SDL_Rect backs_dst; - backs_dst.w = R_back_x*R_maxbacks_h; - backs_dst.h = R_back_y*R_maxbacks_v; - backs_dst.x = R_gamearea_x; - backs_dst.y = R_gamearea_y; - SDL_BlitSurface(currentBack,NULL,screen,&backs_dst); - - SDL_Rect tiles_dst; - SDL_Rect tiles_dstbak; - SDL_Rect tiles_src; - tiles_src.w = R_tileside; - tiles_src.h = R_tileside; - for(x=0;x < R_maxtiles_h;x++) - { - for(y=0;y < R_maxtiles_v;y++) - { - tiles_dst.x = R_gamearea_x + (x*R_tileside); - tiles_dst.y = R_gamearea_y + (y*R_tileside); - tiles_dstbak.x = x*R_tileside; - tiles_dstbak.y = y*R_tileside; - - tiles_src.y = (int(mroom.data[x][y]/20) * R_tileside); - tiles_src.x = (mroom.data[x][y] - (int(mroom.data[x][y]/20) * 20))*R_tileside; - if((mroom.data[x][y] != 0) && (mroom.data[x][y] != 239)) - SDL_BlitSurface(tiles,&tiles_src,screen,&tiles_dst); - if(mroom.data[x][y] == 239 && stagecompleted == 1) - SDL_BlitSurface(tiles,&tiles_src,screen,&tiles_dst); - } - } - SDL_BlitSurface(screen,&gamearea,screenbak,NULL); - print_monitor(); //imprime la informacion del jugador (vidas, puntos, etc) - //SDL_Flip(screen); -} - -void showcode(char *str) -{ - escape_exit=0; - while(escape_exit==0) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - SDL_Rect code; - code.x=280; code.y=220;code.w=240;code.h=50; - SDL_FillRect(screen,&code,SDL_MapRGB(screen->format,255,255,255)); - code.x+=2; code.y+=2;code.w-=4;code.h-=4; - SDL_FillRect(screen,&code,SDL_MapRGB(screen->format,0,0,0)); - code.x=280; code.y=220;code.w=240;code.h=50; - print_text(scorefont,screen,16,16,code.x+8,code.y+7,"STAGE CODE IS:"); - print_text(scorefont1,screen,16,16,code.x+90,code.y+27,"%s",str); - //SDL_UpdateRect(screen, code.x, code.y, code.w, code.h); - SDL_Flip(screen); - credits_events(); - SDL_Delay(1); - } -} - -void setback() -{ - SDL_BlitSurface(background,NULL,screen,NULL); - SDL_Flip(screen); -} - -void fadesurface(SDL_Surface *surface, int x, int y, int speed) -{ - SDL_Rect dst; - dst.x=x; dst.y=y; - float alpha=0; - while(alpha<255) - { - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - delta_time(); - SDL_SetAlpha(surface, SDL_SRCALPHA, int(alpha)); - SDL_BlitSurface(surface, NULL, screen, &dst); - SDL_Flip(screen); - alpha+=(speed*imove); - } - SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - SDL_SetAlpha(surface, 0, 0); - SDL_BlitSurface(surface, NULL, screen, &dst); - SDL_Flip(screen); -} - -// speed es la velocidad del fade y blackback es un flag que indica si debe poner un fondo de color antes de imprimir (1=negro, 2=blanco) -float intro_blit(SDL_Surface *surface, int x, int y, int w, int h, float blit_alpha, int speed, int back) -{ - SDL_Rect dst; - //SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); - dst.x=x; dst.y=y; dst.w=w; dst.h=h; - int alpha=int(blit_alpha); - SDL_SetAlpha(surface, SDL_SRCALPHA, alpha); - blit_alpha+=(speed*imove); - SDL_BlitSurface(surface, NULL, screen, &dst); - //SDL_UpdateRect(screen, dst.x, dst.y, dst.w, dst.h); - /* - if(back==1) - { - if(blit_alpha<255) - SDL_FillRect(screen, &dst, SDL_MapRGB(screen->format,0,0,0)); - } - if(back==2) - { - if(blit_alpha<255) - SDL_FillRect(screen, &dst, SDL_MapRGB(screen->format,255,255,255)); - } - if(blit_alpha>255) - { - SDL_SetAlpha(surface, 0, 0); - SDL_BlitSurface(surface, NULL, screen, &dst); - //SDL_Flip(screen); - } - */ - return(blit_alpha); -} - -/* -float fade(SDL_Surface *surface, int x, int y, int w, int h, int R, int G, int B, int speed, float blit_alpha) -{ - SDL_Rect dst; - dst.x=x; dst.y=y; dst.w=w; dst.h=h; - int alpha=int (blit_alpha); - SDL_SetAlpha(surface, SDL_SRCALPHA, alpha); - blit_alpha-=(speed*imove); - SDL_FillRect(screen, &dst, SDL_MapRGB(screen->format,R,G,B)); - SDL_BlitSurface(surface, NULL, screen, &dst); - SDL_UpdateRect(screen, dst.x, dst.y, dst.w, dst.h); - return(blit_alpha); -} -*/ - -void showposter(int num) -{ - if(num==CEMETERY || num==CAVES || num==CASTLE || num==CASTLE+1 || num==LAB) - { - escape_exit=0; - SDL_Surface *temp; - switch(num) - { - case CEMETERY: - background=LoadT8(DATADIR"/Tgfx/cemetery.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - break; - case CAVES: - background=LoadT8(DATADIR"/Tgfx/comic_02.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/cave.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - break; - case CASTLE: - background=LoadT8(DATADIR"/Tgfx/comic_03.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - break; - case CASTLE+1: - background=LoadT8(DATADIR"/Tgfx/comic_04.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/castle.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - break; - case LAB: - background=LoadT8(DATADIR"/Tgfx/comic_05.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_06.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_07.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/comic_08.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - background=LoadT8(DATADIR"/Tgfx/lab.T8"); - fadesurface(background, 0, 0, 200); - escape_exit=0; - break; - default: - break; - } - while(escape_exit==0) { credits_events(); SDL_Delay(1); } - } - background=LoadT8(DATADIR"/Tgfx/gamepanel.T8"); - fadesurface(background, 0, 0, 250); -} diff --git a/project/jni/application/pachi/src/player.h b/project/jni/application/pachi/src/player.h deleted file mode 100644 index 3689cd136..000000000 --- a/project/jni/application/pachi/src/player.h +++ /dev/null @@ -1,384 +0,0 @@ -/*************************************************************************** -* Pachi el marciano * -* ----------------- * -* (c) Santiago Radeff (coding) * -* (c) Nicolas Radeff (graphics) * -* (c) Peter Hajba (music) * -* * -* T-1000@Bigfoot.com * -**************************************************************************** - ******************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version * - * 2 of the License, or (at your option) any later version. * - * * - *******************************************************************/ - -void loose_life() -{ - Mix_Volume(4,100); - Mix_PlayChannel(4,die,0); - blinkscreen(255,0,0,0); - mplayer[dificulty].x=mplayer[dificulty].start_x; - mplayer[dificulty].y=mplayer[dificulty].start_y; - mplayer[dificulty].h=mplayer[dificulty].h; - mplayer[dificulty].left=0; - mplayer[dificulty].right=0; - mplayer[dificulty].jump=0; - mplayer[dificulty].duck=0; - mplayer[dificulty].lives--; - mplayer[dificulty].jumpcounter=0; - mplayer[dificulty].dead=0; - if(mplayer[dificulty].lives>0) - { - blinkscreen(255,255,255,0); - load_room(); - print_room(); - init_monsters(); - } -} - -void pick_obj(int x, int y) // esta rutina elimina el objeto de la matriz objects, lo elimina de la pantalla y le suma la puntuacion conrrespondiente al jugador -{ - initfade_object(x, y, mroom.data[x][y]); - fadingobject=1; - mroom.data[x][y]=0; - for(int n=0;n<5;n++) - { - if((mobject[(R_current-1)*5+n].x == x) && (mobject[(R_current-1)*5+n].y == y)) - { - score = score + (50*dificulty); - if(sequence==mobject[(R_current-1)*5+n].seq) - { - gametimer=gametimer+5; - Mix_Volume(6,128); - Mix_PlayChannel(6,objseq,0); - } - mobject[(R_current-1)*5+n].type = 0; - mobject[(R_current-1)*5+n].x = 0; - mobject[(R_current-1)*5+n].y = 0; - mobject[(R_current-1)*5+n].seq = 0; - print_monitor(); - } - } - - mplayer[dificulty].objects++; - Mix_Volume(1,100); - if(mplayer[dificulty].objects==mstage[stage-1].objects) - { - stagecompleted = 1; - blinkscreen(255,255,255,0); - Mix_PlayChannel(1,stageready,0); - } - else - Mix_PlayChannel(1,obj,0); - print_room(); -} - -void chk_touched(int x, int y) -{ - if((mroom.data[x][y] >= 239) && (stagecompleted == 1)) - { - Mix_HaltMusic(); - Mix_Volume(0,100); - Mix_PlayChannel(0,exitlevel,0); - mplayer[dificulty].stageup=1; - } - if((mroom.data[x][y] >= 220) && (mroom.data[x][y] < 239)) - mplayer[dificulty].dead=1; - if((mroom.data[x][y] < 220) && (mroom.data[x][y] >= 200)) - pick_obj(x,y); -} - -void P_chk_right() -{ - int x, y; - if(mplayer[dificulty].x + mplayer[dificulty].w >= (R_tileside*R_maxtiles_h)) - { - R_current++; - mplayer[dificulty].x = 2; - mplayer[dificulty].start_x = int(mplayer[dificulty].x); - mplayer[dificulty].start_y = int(mplayer[dificulty].y); - if(mplayer[dificulty].duck==1) - mplayer[dificulty].start_y=mplayer[dificulty].start_y-(P_h - P_h/2); // P_h es la altura parado y P_h/2 la altura agachado - init_room(); - } - - for(int n=0;n<=mplayer[dificulty].h-mplayer[dificulty].tolerance;n++) - { - x=int(mplayer[dificulty].x+mplayer[dificulty].w)/R_tileside; - y=int((mplayer[dificulty].y+n)/R_tileside); - chk_touched(x, y); - - if(mroom.data[x][y] >= 80 && mroom.data[x][y] < 200) - mplayer[dificulty].x=mplayer[dificulty].old_x; - } -} - -void P_chk_left() -{ - int x, y; - if(mplayer[dificulty].x < 2) - { - R_current--; - init_room(); - mplayer[dificulty].x = R_maxtiles_h*R_tileside - mplayer[dificulty].w; - mplayer[dificulty].start_x = int(mplayer[dificulty].x); //estas variables son para cuando se pierde una vida se vuelve el player a esta posicion - mplayer[dificulty].start_y = int(mplayer[dificulty].y); - if(mplayer[dificulty].duck==1) - mplayer[dificulty].start_y=mplayer[dificulty].start_y-(P_h - P_h/2); - } - - for(int n=0;n<=mplayer[dificulty].h-mplayer[dificulty].tolerance;n++) - { - x=int(mplayer[dificulty].x)/R_tileside; //posible P_x -1 - y=int((mplayer[dificulty].y+1+n)/R_tileside); - chk_touched(x,y); - - if(mroom.data[x][y] >= 80 && mroom.data[x][y] < 200) - mplayer[dificulty].x=mplayer[dificulty].old_x; - } -} - -void chk_up() -{ - int x, y; - if(mplayer[dificulty].y <= 1) - { - R_current = R_current - R_max_x; - mplayer[dificulty].y = float(((R_maxtiles_v-1)*R_tileside) - mplayer[dificulty].h - 1); - mplayer[dificulty].start_x = int(mplayer[dificulty].x); //estas variables son para cuando se pierde una vida se vuelve el player a esta posicion - mplayer[dificulty].start_y = int(mplayer[dificulty].y); - mplayer[dificulty].startjump=int(mplayer[dificulty].y+(R_tileside*1.5)); - init_room(); - } - for(int n=0;n<=mplayer[dificulty].w-1;n++) - { - x=int(mplayer[dificulty].x+n)/R_tileside; - y=int(mplayer[dificulty].y/R_tileside); - chk_touched(x,y); //esta rutina compruba que tipo de tile toca el personaje - - if(mroom.data[x][y] >= 80 && mroom.data[x][y] < 200) - { - mplayer[dificulty].y=int((y+1)*R_tileside); - if(mplayer[dificulty].jump == 1 && mplayer[dificulty].upflag == 1) - { - mplayer[dificulty].upflag = 0; - mplayer[dificulty].downflag = 1; - } - } - } -} - -void chk_down() -{ - int x, y; - if((mplayer[dificulty].jump==0) || (mplayer[dificulty].downflag==1)) - { - for(int n=0;n= 40 && mroom.data[x][y] < 200) - { - mplayer[dificulty].y=mplayer[dificulty].old_y; - mplayer[dificulty].infloor=1; // esta varible indica si esta en el suelo - mplayer[dificulty].y=int((mplayer[dificulty].y+(R_tileside/2))/R_tileside)*R_tileside; - mplayer[dificulty].jump=0; - mplayer[dificulty].jumpcounter=0; - mplayer[dificulty].upflag=0; - mplayer[dificulty].downflag=1; - } - } - if(mplayer[dificulty].y >= (R_maxtiles_v*R_tileside) - mplayer[dificulty].h) - { - R_current = R_current + R_max_x; - init_room(); - mplayer[dificulty].y = 2; - mplayer[dificulty].start_x = int(mplayer[dificulty].x); //estas variables son para cuando se pierde una vida se vuelve el player a esta posicion - mplayer[dificulty].start_y = int(mplayer[dificulty].y); - } - } -} - -void chk_colmonsters() //chequear colisiones contra monstruos -{ - for(int n=0;n<=M_max4room-1;n++) - { - if(M_type[n] != 0) - if(mplayer[dificulty].y < M_y[n]+M_h-mplayer[dificulty].tolerance && mplayer[dificulty].y+mplayer[dificulty].h > M_y[n]+mplayer[dificulty].tolerance) - if(mplayer[dificulty].x < M_x[n]+M_h-mplayer[dificulty].tolerance && mplayer[dificulty].x+mplayer[dificulty].w > M_x[n]+mplayer[dificulty].tolerance) - mplayer[dificulty].dead=1; - } -} - -void set_player_pos() -{ - if(mplayer[dificulty].dead==0) // si el personaje esta muerto no chequea colisiones - { - mplayer[dificulty].infloor = 0; - mplayer[dificulty].old_x = mplayer[dificulty].x; - mplayer[dificulty].old_y = mplayer[dificulty].y; - - chk_colmonsters(); // esta rutina chequea colisiones contra monstruos - - if(mplayer[dificulty].duck == 1) - mplayer[dificulty].h=P_h/2; - else - mplayer[dificulty].h=P_h; - - - if(mplayer[dificulty].left==1) - { - if(mplayer[dificulty].duck==1) - mplayer[dificulty].speed=mplayer[dificulty].realspeed/2; - else - mplayer[dificulty].speed=mplayer[dificulty].realspeed; - - mplayer[dificulty].x=mplayer[dificulty].x-(mplayer[dificulty].speed*imove); - - P_chk_left(); - } - if(mplayer[dificulty].right==1) - { - if(mplayer[dificulty].duck==1) - mplayer[dificulty].speed=mplayer[dificulty].realspeed/2; - else - mplayer[dificulty].speed=mplayer[dificulty].realspeed; - - mplayer[dificulty].x=mplayer[dificulty].x+(mplayer[dificulty].speed*imove); - - P_chk_right(); - } - if(mplayer[dificulty].jump==1) - { - if(mplayer[dificulty].upflag==1) - { - mplayer[dificulty].jumpcounter=int(mplayer[dificulty].startjump-mplayer[dificulty].y); - - mplayer[dificulty].maxjump=mplayer[dificulty].realmaxjump; - - if(mplayer[dificulty].jumpcounter <= mplayer[dificulty].maxjump) - { - if(mplayer[dificulty].jumpcounter >= mplayer[dificulty].maxjump/1.5) - { - if(mplayer[dificulty].jumpslower==1) - { - mplayer[dificulty].y=mplayer[dificulty].y+(mplayer[dificulty].fallspeed*imove); - mplayer[dificulty].jumpslower=0; - } - else - mplayer[dificulty].jumpslower=1; - } - mplayer[dificulty].y=mplayer[dificulty].y-(mplayer[dificulty].fallspeed*imove); - } - else - { - mplayer[dificulty].downflag = 1; - mplayer[dificulty].upflag = 0; - } - chk_up(); - } - if(mplayer[dificulty].downflag==1) - { - mplayer[dificulty].jumpcounter=int(mplayer[dificulty].y-mplayer[dificulty].startjump); - if(mplayer[dificulty].jumpcounter > 0) - { - - mplayer[dificulty].maxjump=mplayer[dificulty].realmaxjump; - - if(mplayer[dificulty].jumpcounter >= mplayer[dificulty].maxjump/1.5) - { - if(mplayer[dificulty].jumpslower==1) - { - mplayer[dificulty].y=mplayer[dificulty].y-(mplayer[dificulty].fallspeed*imove); - mplayer[dificulty].jumpslower=0; - } - else - mplayer[dificulty].jumpslower=1; - } - mplayer[dificulty].y=mplayer[dificulty].y+(mplayer[dificulty].fallspeed*imove); - } - else - { - mplayer[dificulty].jump = 0; - } - } - } - if(mplayer[dificulty].jump==0) - mplayer[dificulty].y=mplayer[dificulty].y+(mplayer[dificulty].fallspeed*imove); // para que se caiga si no hay suelo debajo - chk_down(); - } - oldplayerpos.x = int(mplayer[dificulty].old_x); - oldplayerpos.y = int(mplayer[dificulty].old_y); - oldplayerpos.w = mplayer[dificulty].w; - oldplayerpos.h = mplayer[dificulty].h; - if(mplayer[dificulty].ducked==1) - { - mplayer[dificulty].ducked = 0; - oldplayerpos.h = oldplayerpos.h + (P_h - P_h/2); - oldplayerpos.y = oldplayerpos.y - (P_h - P_h/2); - } - playerpos.x = int(mplayer[dificulty].x); - playerpos.y = int(mplayer[dificulty].y); -} - -void clean_player() -{ - set_player_pos(); - playerposreal.x = playerpos.x + R_gamearea_x; - playerposreal.y = playerpos.y + R_gamearea_y; - oldplayerposreal.x = oldplayerpos.x + R_gamearea_x; - oldplayerposreal.y = oldplayerpos.y + R_gamearea_y; - - //SDL_BlitSurface(screenbak,&oldplayerpos,screen, &oldplayerposreal); -} -void print_player() -{ - playersrc.y = mplayer[dificulty].framer*P_h; - playersrc.x = mplayer[dificulty].w * (mplayer[dificulty].frame - 1 + mplayer[dificulty].facingleft*mplayer[dificulty].frames); - playersrc.w = mplayer[dificulty].w; - playersrc.h = mplayer[dificulty].h; - - SDL_BlitSurface(player, &playersrc, screen, &playerposreal); - //SDL_UpdateRect(screen,oldplayerposreal.x,oldplayerposreal.y,P_w,oldplayerpos.h); - //SDL_UpdateRect(screen,playerposreal.x,playerposreal.y,mplayer[dificulty].w,mplayer[dificulty].h); -} - -void animateplayer() -{ -// Esta rutina pone el valor correspondiente a la fila de sprites en el archivo BMP del personaje en la variable framer - - if(mplayer[dificulty].right!=0 || mplayer[dificulty].left != 0) - { - mplayer[dificulty].frame++; - if(mplayer[dificulty].duck==1 && mplayer[dificulty].right==0 && mplayer[dificulty].left==0) - mplayer[dificulty].frame--; - } - - if(mplayer[dificulty].right==1 || mplayer[dificulty].left == 1) - mplayer[dificulty].framer = 1; - if(mplayer[dificulty].right==0 && mplayer[dificulty].left == 0 && mplayer[dificulty].duck==0) // parado - { - mplayer[dificulty].framer = 0; - mplayer[dificulty].frame++; - } - if(mplayer[dificulty].duck==1) // agachado - mplayer[dificulty].framer = 2; - if(mplayer[dificulty].jump==1 && mplayer[dificulty].upflag==1) // saltando (subiendo) - { - mplayer[dificulty].framer = 3; - mplayer[dificulty].frame = 1; - } - if(mplayer[dificulty].downflag==1 && mplayer[dificulty].infloor == 0 && mplayer[dificulty].duck== 0) // cayendo o saltando (bajando) - { - mplayer[dificulty].framer = 3; - mplayer[dificulty].frame = 2; - } - if(mplayer[dificulty].frame > mplayer[dificulty].frames) - mplayer[dificulty].frame=1; -} diff --git a/project/jni/application/pachi/src/proto.h b/project/jni/application/pachi/src/proto.h deleted file mode 100644 index c679c4f99..000000000 --- a/project/jni/application/pachi/src/proto.h +++ /dev/null @@ -1,44 +0,0 @@ -void stop_music(); -void credits_events(); -void menu_events(); -void setback(); -void fadesurface(SDL_Surface *surface, int x, int y, int speed); - -void screen_mode(); -void setgame(); -void start_game(); - -void load_menufont(); -void unload_menufont(); - -void do_code(); -void do_hiscores(); -void load_room(); -void print_room(); -void init_room(); - -void init_objects(); -void initfade_object(int x, int y, int object); -float fade_object(float alpha); - -double delta_time(); - -void init_monsters(); -void print_monsters(); - -void chk_touched(int x, int y); -void print_player(); -void animateplayer(); -void respawn(); - -void print_timer(); -void stage_up(); - -void flushevents(); -void screen_fx(); -void bright_obj(int bright_x, int bright_y); -void check_joystick_events(SDL_Event *event, Uint8 *joypos); -void game_loop(); -void show_arrow(int arrow, int show); - -void win_game(); diff --git a/project/jni/application/pachi/src/setgame.h b/project/jni/application/pachi/src/setgame.h deleted file mode 100644 index 8f5ad704a..000000000 --- a/project/jni/application/pachi/src/setgame.h +++ /dev/null @@ -1,41 +0,0 @@ -#define easy 1 -#define normal 2 -#define hard 3 - -void setgame() -{ - stage=startstage; - startstage=0; - score=0; - gametimer=0; - - mplayer[easy].realspeed=150; - mplayer[normal].realspeed=150; - mplayer[hard].realspeed=180; - - mplayer[easy].fallspeed=150; - mplayer[normal].fallspeed=150; - mplayer[hard].fallspeed=180; - - mplayer[easy].realmaxjump=80; - mplayer[normal].realmaxjump=70; - mplayer[hard].realmaxjump=70; - - mplayer[easy].tolerance=10; - mplayer[normal].tolerance=8; - mplayer[hard].tolerance=5; - - - M_speed[easy]=130; - M_speed[normal]=150; - M_speed[hard]=200; - - for(int n=1;n<=3;n++) - { - mplayer[n].lives=maxlives; - mplayer[n].frames=10; - mplayer[n].h=P_h; - mplayer[n].w=P_w; - } - -} diff --git a/project/jni/application/pachi/src/sounds.h b/project/jni/application/pachi/src/sounds.h deleted file mode 100644 index 7922f79be..000000000 --- a/project/jni/application/pachi/src/sounds.h +++ /dev/null @@ -1,13 +0,0 @@ -Mix_Music *music; -Mix_Chunk *jump; -Mix_Chunk *obj; -Mix_Chunk *objseq; -Mix_Chunk *die; -Mix_Chunk *stageready; -Mix_Chunk *exitlevel; -Mix_Chunk *timer; -Mix_Chunk *storm; -Mix_Chunk *respawnsnd; -Mix_Chunk *option; -Mix_Chunk *coderight; -Mix_Chunk *codewrong; diff --git a/project/jni/application/pachi/src/stages.h b/project/jni/application/pachi/src/stages.h deleted file mode 100644 index 3571233e2..000000000 --- a/project/jni/application/pachi/src/stages.h +++ /dev/null @@ -1,98 +0,0 @@ -void init_stages () -{ - mstage[0].title=" HARD LANDING ! "; - mstage[0].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[0].objects=10; - mstage[0].time=190; - mstage[0].code="HARD"; - - mstage[1].title=" ENTRANCE TO CEMETERY "; - mstage[1].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[1].objects=12; - mstage[1].time=205; - mstage[1].code="MARS"; - - mstage[2].title=" INTO THE CEMETERY (1) "; - mstage[2].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[2].objects=12; - mstage[2].time=350; - mstage[2].code="CMTR"; - - mstage[3].title=" INTO THE CEMETERY (2) "; - mstage[3].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[3].objects=19; - mstage[3].time=290; - mstage[3].code="TOMB"; - - mstage[4].title=" WHERE IS THE EXIT GATE? "; - mstage[4].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[4].objects=18; - mstage[4].time=370; - mstage[4].code="SKLL"; - - mstage[5].title=" PASSAGE TO THE CAVES "; - mstage[5].music=DATADIR"/music/stage1.s3m.ogg"; - mstage[5].objects=10; - mstage[5].time=120; - mstage[5].code="EVAC"; - - mstage[6].title=" THE CAVES "; - mstage[6].music=DATADIR"/music/stage2.stm.ogg"; - mstage[6].objects=14; - mstage[6].time=250; - mstage[6].code="EYES"; - - mstage[7].title=" DEN OF RATS "; - mstage[7].music=DATADIR"/music/stage2.stm.ogg"; - mstage[7].objects=15; - mstage[7].time=250; - mstage[7].code="RATS"; - - mstage[8].title=" THE PIT "; - mstage[8].music=DATADIR"/music/stage2.stm.ogg"; - mstage[8].objects=20; - mstage[8].time=300; - mstage[8].code="DIRT"; - - mstage[9].title=" THE CASTLE GARDENS "; - mstage[9].music=DATADIR"/music/stage2.stm.ogg"; - mstage[9].objects=13; - mstage[9].time=210; - mstage[9].code="CAST"; - - mstage[10].title=" THE CASTLE HALL "; - mstage[10].music=DATADIR"/music/stage3.s3m.ogg"; - mstage[10].objects=15; - mstage[10].time=250; - mstage[10].code="HALL"; - - mstage[11].title=" TOWER ENTRANCE "; - mstage[11].music=DATADIR"/music/stage3.s3m.ogg"; - mstage[11].objects=20; - mstage[11].time=150; - mstage[11].code="TTWR"; - - mstage[12].title=" THE FIRST TOWER "; - mstage[12].music=DATADIR"/music/stage3.s3m.ogg"; - mstage[12].objects=17; - mstage[12].time=140; - mstage[12].code="TWRF"; - - mstage[13].title=" THE TWO TOWERS "; - mstage[13].music=DATADIR"/music/stage3.s3m.ogg"; - mstage[13].objects=26; - mstage[13].time=200; - mstage[13].code="STWR"; - - mstage[14].title=" THE SECRET PLACE "; - mstage[14].music=DATADIR"/music/stage3.s3m.ogg"; - mstage[14].objects=20; - mstage[14].time=150; - mstage[14].code="DXTR"; - - mstage[15].title=" THE LABORATORY "; - mstage[15].music=DATADIR"/music/stage4.s3m.ogg"; - mstage[15].objects=90; - mstage[15].time=540; - mstage[15].code="XLAB"; -} diff --git a/project/jni/application/pachi/src/structs.h b/project/jni/application/pachi/src/structs.h deleted file mode 100644 index 31d812613..000000000 --- a/project/jni/application/pachi/src/structs.h +++ /dev/null @@ -1,57 +0,0 @@ -struct Cobject -{ - int type; - int x; - int y; - int seq; - int stage; -}; - -struct Cplayer -{ - float x, y; // posiciones x, y - float old_x, old_y; // posiciones anteriores de x y - int w, h; // anchura y altura - int speed; // velocidad - int realspeed; // copia de velocidad, se usa para restaurar el valor de speed en caso que haya sido modificado - int fallspeed; // velocidad de caida libre - int frames; // cantidad de frames de animacion - int frame, framer; // frame actual y fila de frames actual (las filas son: quieto, corriendo, agachado, saltando, cayendo) - int left, right, jump, duck; - int start_x, start_y; // posiciones iniciales en la pantalla - int lives; // vidas del jugador - int tolerance; // tolerancia de la deteccion de colisiones contra los monstruos - int objects; // objetos recogidos en la pantalla actual - - int startjump; - int jumpcounter; // contador de altura del selto - int maxjump; // altura del salto - int realmaxjump; // copia de altura del salto en caso que haya que restaurarlo - - int dead; // inficador si esta muerto - int stageup; // indicador si la pantalla esta completa - int upflag, downflag; - int infloor; - int facingleft; - int ducked; - int jumpslower; -}; - -struct Cstages -{ - char * title; - char * music; - int objects; - int time; - char * code; -}; - -struct Croom -{ - int data[R_maxtiles_h][R_maxtiles_v]; // los datos (tiles) de la habitacion - int stage; // a que stage pertenece -}; -Croom mroom; -Cobject mobject[2000]; // almacena los objetos del juego -Cplayer mplayer[4]; -Cstages mstage[NUM_STAGES]; diff --git a/project/jni/application/pachi/src/surfaces.h b/project/jni/application/pachi/src/surfaces.h deleted file mode 100644 index 66915736c..000000000 --- a/project/jni/application/pachi/src/surfaces.h +++ /dev/null @@ -1,38 +0,0 @@ -// --- Fonts -enum { FONT_CHUNKS = 2}; -SDL_Surface *font; -SDL_Surface *scorefont; -SDL_Surface *scorefont1; -SDL_Surface *scorefont2; -SDL_Surface *menufont[FONT_CHUNKS]; -SDL_Surface *menufont1[FONT_CHUNKS]; - -// --- Screen -SDL_Surface *screen; -SDL_Surface *background; -SDL_Surface *backs; -SDL_Surface *currentBack = NULL; -SDL_Surface *tiles; -SDL_Surface *screenbak; - -// --- FX -SDL_Surface *bright; -SDL_Surface *creditsbuffer; -SDL_Surface *creditsbuffer1; -SDL_Surface *creditsfont; -SDL_Surface *left; -SDL_Surface *right; - -// --- Monsters -SDL_Surface *monsters[M_max4room]; -SDL_Surface *monstersSW = NULL; - -// --- Player -SDL_Surface *player; - -// --- Intro -SDL_Surface *dragontech; -SDL_Surface *line1; -SDL_Surface *line2; -SDL_Surface *comic_01; -SDL_Surface *black; diff --git a/project/jni/application/pachi/src/text.h b/project/jni/application/pachi/src/text.h deleted file mode 100644 index c56a64c5c..000000000 --- a/project/jni/application/pachi/src/text.h +++ /dev/null @@ -1,94 +0,0 @@ -void print_text(SDL_Surface **font, SDL_Surface *surface, int font_w, int font_h, int text_x, int text_y, char *str, ...) //Rutina para imprimir texto estatico en la pantalla -{ - SDL_Rect srctxt; // la posicion donde se encuentra el caracter en el bitmap - SDL_Rect dsttxt; // la posicion donde se imprimira el texto - - char texto [100]; - - va_list ap; - va_start(ap, str); - vsprintf(texto, str, ap); - va_end(ap); - - srctxt.w = font_w; - srctxt.h = font_h; - srctxt.y = 0; - int linecounter = 0 ; // este contador se utiliza para saber en que linea imprimimos el texto - int charpos = 0; - for(int charcounter = 0; charcounter <= (strlen(texto));charcounter++) - { - int curchar=texto[charcounter]; - if(curchar == 94) - { - linecounter++; - charpos = -1; - } - srctxt.x = (curchar >= 64 ? curchar - 62 : curchar - 32) * font_w; - dsttxt.x = (text_x + (charpos * font_w)); - dsttxt.y = (text_y + (linecounter * font_h)); - charpos++; - SDL_BlitSurface (font[ (curchar >= 64 ? 1 : 0) ],&srctxt,surface,&dsttxt); - } -} - -void print_text(SDL_Surface *font, SDL_Surface *surface, int font_w, int font_h, int text_x, int text_y, char *str, ...) //Rutina para imprimir texto estatico en la pantalla -{ - SDL_Rect srctxt; // la posicion donde se encuentra el caracter en el bitmap - SDL_Rect dsttxt; // la posicion donde se imprimira el texto - - char texto [100]; - - va_list ap; - va_start(ap, str); - vsprintf(texto, str, ap); - va_end(ap); - - srctxt.w = font_w; - srctxt.h = font_h; - srctxt.y = 0; - int linecounter = 0 ; // este contador se utiliza para saber en que linea imprimimos el texto - int charpos = 0; - for(int charcounter = 0; charcounter <= (strlen(texto));charcounter++) - { - int curchar=texto[charcounter]; - if(curchar == 94) - { - linecounter++; - charpos = -1; - } - srctxt.x = (curchar - 32) * font_w; - dsttxt.x = (text_x + (charpos * font_w)); - dsttxt.y = (text_y + (linecounter * font_h)); - charpos++; - SDL_BlitSurface (font,&srctxt,surface,&dsttxt); - } -} - -void load_font(SDL_Surface **font, char * file) -{ - SDL_Surface * temp = LoadT8(file, false); - font[0] = SDL_CreateRGBSurface(SDL_HWSURFACE, temp->w/2, temp->h, screen->format->BitsPerPixel, - screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); - font[1] = SDL_CreateRGBSurface(SDL_HWSURFACE, temp->w/2, temp->h, screen->format->BitsPerPixel, - screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); - SDL_Rect r; - r.w = temp->w/2; - r.h = temp->h; - r.x = 0; - r.y = 0; - SDL_BlitSurface(temp, &r, font[0], NULL); - SDL_SetColorKey(font[0], SDL_SRCCOLORKEY, SDL_MapRGB(font[0]->format,0,255,0)); - r.x = temp->w/2; - SDL_BlitSurface(temp, &r, font[1], NULL); - SDL_SetColorKey(font[1], SDL_SRCCOLORKEY, SDL_MapRGB(font[0]->format,0,255,0)); -}; - -void unload_font(SDL_Surface **font) -{ - if( font[0] ) - SDL_FreeSurface(font[0]); - font[0] = NULL; - if( font[1] ) - SDL_FreeSurface(font[1]); - font[1] = NULL; -} diff --git a/project/jni/application/prefclub/AndroidAppSettings.cfg b/project/jni/application/prefclub/AndroidAppSettings.cfg deleted file mode 100644 index 2ca06f730..000000000 --- a/project/jni/application/prefclub/AndroidAppSettings.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# The application settings for Android libSDL port -AppSettingVersion=17 -LibSdlVersion=1.2 -AppName="PrefClub" -AppFullName=org.prefclub -ScreenOrientation=h -InhibitSuspend=n -AppDataDownloadUrl="!Prefclub game|prefclub2.zip" -VideoDepthBpp=16 -NeedDepthBuffer=n -NeedStencilBuffer=n -NeedGles2=n -SwVideoMode=y -SdlVideoResize=y -SdlVideoResizeKeepAspect=n -CompatibilityHacks=n -CompatibilityHacksStaticInit=n -CompatibilityHacksTextInputEmulatesHwKeyboard=n -CompatibilityHacksPreventAudioChopping=n -AppUsesMouse=n -AppNeedsTwoButtonMouse=n -ShowMouseCursor=n -ForceRelativeMouseMode=n -AppNeedsArrowKeys=y -AppNeedsTextInput=y -AppUsesJoystick=n -AppUsesAccelerometer=n -AppUsesMultitouch=n -NonBlockingSwapBuffers=n -RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP RETURN ESCAPE F5 F6 F7 F8" -AppTouchscreenKeyboardKeysAmount=1 -AppTouchscreenKeyboardKeysAmountAutoFire=0 -RedefinedKeysScreenKb="RETURN LSHIFT LCTRL LALT" -StartupMenuButtonTimeout=3000 -HiddenMenuOptions='OptionalDownloadConfig' -FirstStartMenuOptions='new Settings.ShowReadme()' -MultiABI=n -AppMinimumRAM=0 -AppVersionCode=07405 -AppVersionName="0.74.05" -ResetSdlConfigForThisVersion=y -DeleteFilesOnUpgrade="prefclub" -CompiledLibraries="jpeg png sdl_net" -CustomBuildScript=y -AppCflags='' -AppLdflags='' -AppSubdirsBuild='' -AppCmdline='dosbox -conf .dosbox/dosbox-0.74.conf' -ReadmeText='Touch upper-left corner to type your name or tip amount^ru:Нажмите левый верхний угол экрана, чтобы ввести своё имя или размер чаевых' -MinimumScreenSize=s -AdmobPublisherId=n -AdmobTestDeviceId= -AdmobBannerSize= diff --git a/project/jni/application/prefclub/AndroidBuild.sh b/project/jni/application/prefclub/AndroidBuild.sh deleted file mode 100755 index 6e5bbff25..000000000 --- a/project/jni/application/prefclub/AndroidBuild.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - - -LOCAL_PATH=`dirname $0` -LOCAL_PATH=`cd $LOCAL_PATH && pwd` - -ln -sf libsdl-1.2.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL.so -ln -sf libsdl_net.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL_net.so -ln -sf libsdl_sound.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL_sound.so - -if [ \! -d dosbox-0.74 ] ; then - wget http://sourceforge.net/projects/dosbox/files/dosbox/0.74/dosbox-0.74.tar.gz && tar xvf dosbox-0.74.tar.gz && patch -p0 < dosbox-0.74-androidSDL.diff || exit 1 -fi - -if [ \! -f dosbox-0.74/configure ] ; then - sh -c "cd dosbox-0.74 && ./autogen.sh" || exit 1 -fi - -if [ \! -f dosbox-0.74/Makefile ] ; then - env CFLAGS="-frtti -fexceptions" LDFLAGS="-frtti -fexceptions" \ - ../setEnvironment.sh sh -c "cd dosbox-0.74 && ./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi" || exit 1 -fi - -../setEnvironment.sh sh -c "cd dosbox-0.74 && make -j4 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -lpng -lgcc -lz -lc -lgnustl_static -lsupc++'" && cp -f dosbox-0.74/src/dosbox libapplication.so || exit 1 -exit 0 diff --git a/project/jni/application/prefclub/AndroidData/prefclub2.zip b/project/jni/application/prefclub/AndroidData/prefclub2.zip deleted file mode 100644 index 734935b2e..000000000 Binary files a/project/jni/application/prefclub/AndroidData/prefclub2.zip and /dev/null differ diff --git a/project/jni/application/prefclub/dosbox-0.74-androidSDL.diff b/project/jni/application/prefclub/dosbox-0.74-androidSDL.diff deleted file mode 100644 index c647a6978..000000000 --- a/project/jni/application/prefclub/dosbox-0.74-androidSDL.diff +++ /dev/null @@ -1,80 +0,0 @@ -diff -r -u old/dosbox-0.74/config.sub dosbox-0.74/config.sub ---- old/dosbox-0.74/config.sub 2010-05-10 20:43:54.000000000 +0300 -+++ dosbox-0.74/config.sub 2012-11-21 21:14:48.428064682 +0200 -@@ -1298,7 +1298,7 @@ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ -- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -+ | -udi* | -eabi* | -androideabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -diff -r -u old/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp ---- old/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 20:43:54.000000000 +0300 -+++ dosbox-0.74/src/dos/drive_local.cpp 2012-11-21 21:14:48.428064682 +0200 -@@ -273,7 +273,7 @@ - - find_size=(Bit32u) stat_block.st_size; - struct tm *time; -- if((time=localtime(&stat_block.st_mtime))!=0){ -+ if((time=localtime((const time_t *) &stat_block.st_mtime))!=0){ - find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); - find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); - } else { -@@ -393,7 +393,7 @@ - if(stat(newname,&temp_stat)!=0) return false; - /* Convert the stat to a FileStat */ - struct tm *time; -- if((time=localtime(&temp_stat.st_mtime))!=0) { -+ if((time=localtime((const time_t *) &temp_stat.st_mtime))!=0) { - stat_block->time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); - stat_block->date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); - } else { -@@ -532,7 +532,7 @@ - struct stat temp_stat; - fstat(fileno(fhandle),&temp_stat); - struct tm * ltime; -- if((ltime=localtime(&temp_stat.st_mtime))!=0) { -+ if((ltime=localtime((const time_t *) &temp_stat.st_mtime))!=0) { - time=DOS_PackTime((Bit16u)ltime->tm_hour,(Bit16u)ltime->tm_min,(Bit16u)ltime->tm_sec); - date=DOS_PackDate((Bit16u)(ltime->tm_year+1900),(Bit16u)(ltime->tm_mon+1),(Bit16u)ltime->tm_mday); - } else { -diff -r -u old/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp ---- old/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 20:43:54.000000000 +0300 -+++ dosbox-0.74/src/gui/sdlmain.cpp 2012-11-21 21:51:37.128044459 +0200 -@@ -32,6 +32,7 @@ - #include - #include - #endif -+#include - - #include "cross.h" - #include "SDL.h" -@@ -755,7 +756,7 @@ - sdl.updating=false; - switch (sdl.desktop.type) { - case SCREEN_SURFACE: -- if (SDL_MUSTLOCK(sdl.surface)) { -+ if (SDL_MUSTLOCK(sdl.surface) || true) { - if (sdl.blit.surface) { - SDL_UnlockSurface(sdl.blit.surface); - int Blit = SDL_BlitSurface( sdl.blit.surface, 0, sdl.surface, &sdl.clip ); -@@ -1453,6 +1454,7 @@ - strcat(buf,"\n"); - va_end(msg); - if(!no_stdout) printf("%s",buf); //Else buf is parsed again. -+ __android_log_print(ANDROID_LOG_INFO, "DosBox", "%s", buf); - } - - -@@ -1743,8 +1745,7 @@ - #if SDL_VERSION_ATLEAST(1, 2, 14) - putenv(const_cast("SDL_DISABLE_LOCK_KEYS=1")); - #endif -- if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM -- |SDL_INIT_NOPARACHUTE -+ if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE - ) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError()); - sdl.inited = true; - diff --git a/project/jni/application/prefclub/icon.png b/project/jni/application/prefclub/icon.png deleted file mode 100644 index 45b5ea616..000000000 Binary files a/project/jni/application/prefclub/icon.png and /dev/null differ diff --git a/project/jni/application/ufoai/.gitignore b/project/jni/application/ufoai/.gitignore deleted file mode 100644 index 0f70023cd..000000000 --- a/project/jni/application/ufoai/.gitignore +++ /dev/null @@ -1 +0,0 @@ -AndroidData/1android.pk3 diff --git a/project/jni/application/ufoai/AndroidAppSettings.cfg b/project/jni/application/ufoai/AndroidAppSettings.cfg deleted file mode 120000 index 1f75436f5..000000000 --- a/project/jni/application/ufoai/AndroidAppSettings.cfg +++ /dev/null @@ -1 +0,0 @@ -ufoai/build/projects/AndroidAppSettings.cfg \ No newline at end of file diff --git a/project/jni/application/ufoai/AndroidData/logo.png b/project/jni/application/ufoai/AndroidData/logo.png deleted file mode 100644 index 1dce85793..000000000 Binary files a/project/jni/application/ufoai/AndroidData/logo.png and /dev/null differ diff --git a/project/jni/application/ufoai/AndroidPreBuild.sh b/project/jni/application/ufoai/AndroidPreBuild.sh deleted file mode 120000 index 600bd8919..000000000 --- a/project/jni/application/ufoai/AndroidPreBuild.sh +++ /dev/null @@ -1 +0,0 @@ -ufoai/build/projects/AndroidPreBuild.sh \ No newline at end of file diff --git a/project/jni/application/ufoai/icon.png b/project/jni/application/ufoai/icon.png deleted file mode 120000 index a4a761eeb..000000000 --- a/project/jni/application/ufoai/icon.png +++ /dev/null @@ -1 +0,0 @@ -ufoai/base/pics/phalanx_badge_big.png \ No newline at end of file diff --git a/project/jni/application/ufoai/readme.txt b/project/jni/application/ufoai/readme.txt deleted file mode 100644 index 37e58c7e7..000000000 --- a/project/jni/application/ufoai/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -Quick build instructions: you have to download GIT repo from https://github.com/pelya/commandergenius , -then install Android SDK 4.0.3, NDK r8b from http://develoiper.android.com/ , and Apache Ant tool (and add them to your PATH), -then you should launch commands - rm project/jni/application/src - ln -s ufoai project/jni/application/src - ./changeAppSettings.sh -a - android update project -p project -then download UFO:AI GIT into the dir project/jni/application/ufoai/ufoai -(or create a symlink to it if you already have downloaded it), and launch build.sh. That should be it. -It will create file project/bin/MainActivity-debug.apk which you can rename to ufoai.apk, sign with release key and put to Releases page. diff --git a/project/jni/application/ufoai/ufoai b/project/jni/application/ufoai/ufoai deleted file mode 120000 index 99ec4340f..000000000 --- a/project/jni/application/ufoai/ufoai +++ /dev/null @@ -1 +0,0 @@ -../../../../../ufoai \ No newline at end of file diff --git a/project/jni/application/uqm-hd/.gitignore b/project/jni/application/uqm-hd/.gitignore index 85de9cf93..50577dab2 100644 --- a/project/jni/application/uqm-hd/.gitignore +++ b/project/jni/application/uqm-hd/.gitignore @@ -1 +1,3 @@ src +uqm-hd +