Random changes here and there, preparation to make libSDL aware of Menu key - this won't work yet!
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
# The namespace in Java file, with dots replaced with underscores
|
||||
SDL_JAVA_PACKAGE_PATH := com_googlecode_opentyrian
|
||||
SDL_JAVA_PACKAGE_PATH := com_teeworlds
|
||||
|
||||
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
|
||||
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
|
||||
@@ -10,7 +10,7 @@ SDL_JAVA_PACKAGE_PATH := com_googlecode_opentyrian
|
||||
# Typically /sdcard/alienblaster
|
||||
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
|
||||
# Your application will just set current directory there
|
||||
SDL_CURDIR_PATH := com.googlecode.opentyrian
|
||||
SDL_CURDIR_PATH := com.teeworlds
|
||||
|
||||
# Android Dev Phone G1 has trackball instead of cursor keys, and
|
||||
# sends trackball movement events as rapid KeyDown/KeyUp events,
|
||||
@@ -21,15 +21,15 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
|
||||
|
||||
# If the application designed for higher screen resolution enable this to get the screen
|
||||
# resized in HW-accelerated way, however it eats a tiny bit of CPU
|
||||
SDL_VIDEO_RENDER_RESIZE := 1
|
||||
SDL_VIDEO_RENDER_RESIZE := 0
|
||||
|
||||
COMPILED_LIBRARIES := sdl_net
|
||||
COMPILED_LIBRARIES := sdl_image sdl_mixer
|
||||
|
||||
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2
|
||||
APPLICATION_ADDITIONAL_CFLAGS := -O2 -DCONF_FAMILY_UNIX=1
|
||||
|
||||
APPLICATION_ADDITIONAL_LDFLAGS :=
|
||||
APPLICATION_ADDITIONAL_LDFLAGS := -Lbin/ndk/local/armeabi -lfreetype
|
||||
|
||||
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=SPACE -DSDL_ANDROID_KEYCODE_1=RETURN -DSDL_ANDROID_KEYCODE_2=LCTRL -DSDL_ANDROID_KEYCODE_3=LALT -DSDL_ANDROID_KEYCODE_4=RETURN
|
||||
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=RETURN -DSDL_ANDROID_KEYCODE_1=RSHIFT -DSDL_ANDROID_KEYCODE_2=KP_PLUS -DSDL_ANDROID_KEYCODE_3=KP_MINUS -DSDL_ANDROID_KEYCODE_4=ESCAPE -DSDL_ANDROID_KEYCODE_5=F10
|
||||
|
||||
# If SDL_Mixer should link to libMAD
|
||||
SDL_MIXER_USE_LIBMAD :=
|
||||
|
||||
@@ -5,6 +5,6 @@ APP_PROJECT_PATH := $(call my-dir)/..
|
||||
# sdl_image depends on png and jpeg
|
||||
# sdl_ttf depends on freetype
|
||||
|
||||
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype sdl_net
|
||||
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype sdl_image sdl_mixer
|
||||
|
||||
APP_ABI := armeabi
|
||||
|
||||
@@ -18,6 +18,7 @@ LOCAL_CFLAGS := $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \
|
||||
-I$(LOCAL_PATH)/../png \
|
||||
-I$(LOCAL_PATH)/../jpeg \
|
||||
-I$(LOCAL_PATH)/../intl \
|
||||
-I$(LOCAL_PATH)/../freetype/include \
|
||||
-I$(LOCAL_PATH)/..
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ RedefinedKeys="RETURN RSHIFT KP_PLUS KP_MINUS ESCAPE F10"
|
||||
AppTouchscreenKeyboardKeysAmount=2
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=2
|
||||
MultiABI=n
|
||||
AppVersionCode=1006
|
||||
AppVersionName="1.0.06"
|
||||
AppVersionCode=1007
|
||||
AppVersionName="1.0.07"
|
||||
CompiledLibraries="sdl_image"
|
||||
AppCflags='-O0 -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1'
|
||||
AppLdflags='-Lbin/ndk/local/armeabi -ltremor'
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
#define _CONFIG_UNIX_H
|
||||
|
||||
/* Directory where the UQM game data is located */
|
||||
#define CONTENTDIR "."
|
||||
#define CONTENTDIR "./"
|
||||
|
||||
/* Directory where game data will be stored */
|
||||
#define USERDIR "."
|
||||
#define USERDIR "./config/"
|
||||
|
||||
/* Directory where config files will be stored */
|
||||
#define CONFIGDIR USERDIR
|
||||
|
||||
/* Directory where supermelee teams will be stored */
|
||||
#define MELEEDIR "${UQM_CONFIG_DIR}/teams/"
|
||||
#define MELEEDIR "./teams/"
|
||||
|
||||
/* Directory where save games will be stored */
|
||||
#define SAVEDIR "${UQM_CONFIG_DIR}/save/"
|
||||
#define SAVEDIR "./save/"
|
||||
|
||||
/* Defined if words are stored with the most significant byte first */
|
||||
#ifdef __ARMEL__
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "port.h"
|
||||
#include "resintrn.h"
|
||||
#include "libs/uio.h"
|
||||
#include "libs/log.h"
|
||||
|
||||
uio_Stream *
|
||||
res_OpenResFile (uio_DirHandle *dir, const char *filename, const char *mode)
|
||||
@@ -34,7 +35,10 @@ res_OpenResFile (uio_DirHandle *dir, const char *filename, const char *mode)
|
||||
struct stat sb;
|
||||
|
||||
if (uio_stat (dir, filename, &sb) == 0 && S_ISDIR(sb.st_mode))
|
||||
{
|
||||
log_add (log_Debug, "res_OpenResFile('%s', '%s') - cannot open dir as file", filename, mode);
|
||||
return ((uio_Stream *) ~0);
|
||||
}
|
||||
|
||||
fp = uio_fopen (dir, filename, mode);
|
||||
|
||||
|
||||
@@ -707,6 +707,7 @@ uio_open(uio_DirHandle *dir, const char *path, int flags, mode_t mode) {
|
||||
&readMountInfo, &readPDirHandle, NULL,
|
||||
&writeMountInfo, &writePDirHandle, NULL, &name) == -1) {
|
||||
// errno is set
|
||||
log_add (log_Info, "uio_open: uio_getPhysicalAccess failed for '%s'", path);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -733,6 +734,7 @@ uio_open(uio_DirHandle *dir, const char *path, int flags, mode_t mode) {
|
||||
uio_PDirHandle_unref(readPDirHandle);
|
||||
uio_PDirHandle_unref(writePDirHandle);
|
||||
errno = EEXIST;
|
||||
log_add (log_Info, "uio_open: O_CREAT | O_EXCL: file already exists '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
if ((flags & O_TRUNC) == O_TRUNC) {
|
||||
@@ -749,6 +751,7 @@ uio_open(uio_DirHandle *dir, const char *path, int flags, mode_t mode) {
|
||||
uio_PDirHandle_unref(readPDirHandle);
|
||||
uio_PDirHandle_unref(writePDirHandle);
|
||||
errno = savedErrno;
|
||||
log_add (log_Info, "uio_open: uio_copyFilePhysical failed '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -770,6 +773,7 @@ uio_open(uio_DirHandle *dir, const char *path, int flags, mode_t mode) {
|
||||
handle = (pDirHandle->pRoot->handler->open)(pDirHandle, name, flags, mode);
|
||||
// Also adds a new entry to the physical dir if appropriate.
|
||||
if (handle == NULL) {
|
||||
log_add (log_Info, "uio_open: open file failed '%s'", name);
|
||||
int savedErrno = errno;
|
||||
uio_free(name);
|
||||
uio_PDirHandle_unref(pDirHandle);
|
||||
|
||||
@@ -33,9 +33,13 @@
|
||||
#include "libs/threadlib.h"
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
#define ACCELERATION_INCREMENT (ONE_SECOND)
|
||||
#define MENU_REPEAT_DELAY (ONE_SECOND)
|
||||
#else
|
||||
#define ACCELERATION_INCREMENT (ONE_SECOND / 12)
|
||||
#define MENU_REPEAT_DELAY (ONE_SECOND / 2)
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
opentyrian
|
||||
teeworlds
|
||||
@@ -44,11 +44,8 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeInit) ( JNIEnv* env, jobject thiz )
|
||||
strcat(curdir, "/files");
|
||||
}
|
||||
chdir(curdir);
|
||||
/*
|
||||
__android_log_print(ANDROID_LOG_INFO, "libSDL", "Waiting 30s for debugger");
|
||||
sleep(30); // Wait for debugger to attach
|
||||
__android_log_print(ANDROID_LOG_INFO, "libSDL", "Starting main()");
|
||||
*/
|
||||
setenv("HOME", curdir, 1);
|
||||
|
||||
main( argc, argv );
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user