mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-22 00:19:20 +02:00
initial port of Freedroid
This commit is contained in:
parent
f7f5545022
commit
88b28ae9ce
80
freedroid/Makefile
Normal file
80
freedroid/Makefile
Normal file
@ -0,0 +1,80 @@
|
||||
# Copyright (C) 2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=freedroid
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/freedroid/freedroidClassic/FreedroidClassic-1.0.2/
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/freedroid-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/freedroid
|
||||
TITLE:=FreeDroid
|
||||
SECTION:=games
|
||||
CATEGORY:=Games
|
||||
URL:=http://freedroid.sourceforge.net/
|
||||
DEPENDS:=libsdl-image libsdl-mixer libvorbis
|
||||
endef
|
||||
|
||||
define Package/freedroid/description
|
||||
A free clone of the C64-classic "Paradroid"
|
||||
endef
|
||||
|
||||
CONFIGURE_VARS:=LDFLAGS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
|
||||
CONFIGURE_ARGS:=--prefix=/usr
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Package/freedroid/install
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/usr/bin/ \
|
||||
$(1)/usr/share/freedroid/ \
|
||||
$(1)/usr/share/freedroid/graphics/ \
|
||||
$(1)/usr/share/freedroid/graphics/classic_theme/ \
|
||||
$(1)/usr/share/freedroid/graphics/lanzz_theme/ \
|
||||
$(1)/usr/share/freedroid/map/ \
|
||||
$(1)/usr/share/freedroid/sound
|
||||
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_BUILD_DIR)/src/freedroid \
|
||||
$(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/graphics/*.png \
|
||||
$(PKG_BUILD_DIR)/graphics/*.jpg \
|
||||
$(1)/usr/share/freedroid/graphics/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/graphics/classic_theme/*.png \
|
||||
$(PKG_BUILD_DIR)/graphics/classic_theme/config.theme \
|
||||
$(1)/usr/share/freedroid/graphics/classic_theme/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/graphics/lanzz_theme/*.png \
|
||||
$(PKG_BUILD_DIR)/graphics/lanzz_theme/config.theme \
|
||||
$(1)/usr/share/freedroid/graphics/lanzz_theme/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/map/freedroid.ruleset \
|
||||
$(PKG_BUILD_DIR)/map/Paradroid.* \
|
||||
$(1)/usr/share/freedroid/map/
|
||||
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/sound/*.wav \
|
||||
$(PKG_BUILD_DIR)/sound/*.mod \
|
||||
$(PKG_BUILD_DIR)/sound/*.ogg \
|
||||
$(1)/usr/share/freedroid/sound/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,freedroid))
|
86
freedroid/patches/001-screen-cursor-tab.patch
Normal file
86
freedroid/patches/001-screen-cursor-tab.patch
Normal file
@ -0,0 +1,86 @@
|
||||
diff -u /tmp/freedroid-1.0.2/src/defs.h ./src/defs.h
|
||||
--- /tmp/freedroid-1.0.2/src/defs.h 2003-08-09 22:42:08.000000000 +1200
|
||||
+++ ./src/defs.h 2010-07-28 22:57:36.000000000 +1200
|
||||
@@ -43,6 +43,9 @@
|
||||
#define DROID_ROTATION_TIME 3.0
|
||||
#define NUM_DECAL_PICS 2
|
||||
|
||||
+// Don't want the mouse cursor at all on the NanoNote
|
||||
+#define SDL_ShowCursor( visible) 1
|
||||
+
|
||||
#define UserCenter_x (User_Rect.x + User_Rect.w/2)
|
||||
#define UserCenter_y (User_Rect.y + User_Rect.h/2)
|
||||
|
||||
@@ -72,11 +75,11 @@
|
||||
#define RightPressed() (KeyIsPressed(SDLK_RIGHT)||KeyIsPressed('d'))
|
||||
|
||||
#define EscapePressed() KeyIsPressed(SDLK_ESCAPE)
|
||||
-#define SpacePressed() KeyIsPressed(SDLK_SPACE)
|
||||
+#define SpacePressed() KeyIsPressed(SDLK_TAB)
|
||||
#define FirePressed() (SpacePressed()||MouseLeftPressed())
|
||||
|
||||
#define EscapePressedR() KeyIsPressedR (SDLK_ESCAPE)
|
||||
-#define SpacePressedR() KeyIsPressedR (SDLK_SPACE)
|
||||
+#define SpacePressedR() KeyIsPressedR (SDLK_TAB)
|
||||
#define FirePressedR() (SpacePressedR()||MouseLeftPressedR())
|
||||
|
||||
#define UpPressedR() (KeyIsPressedR(SDLK_UP)||KeyIsPressedR('w'))
|
||||
Only in ./src/: .deps
|
||||
diff -u /tmp/freedroid-1.0.2/src/init.c ./src/init.c
|
||||
--- /tmp/freedroid-1.0.2/src/init.c 2003-08-10 00:19:32.000000000 +1200
|
||||
+++ ./src/init.c 2010-07-28 22:13:15.000000000 +1200
|
||||
@@ -912,7 +912,7 @@
|
||||
GameConfig.TakeoverActivates = TRUE;
|
||||
GameConfig.ShowDecals = TRUE;
|
||||
GameConfig.AllMapVisible = TRUE; // classic setting: map always visible
|
||||
- GameConfig.scale = 1.0; // overall scaling of _all_ graphics (e.g. for 320x200 displays)
|
||||
+ GameConfig.scale = 0.5; // overall scaling of _all_ graphics (e.g. for 320x200 displays)
|
||||
|
||||
// now load saved options from the config-file
|
||||
LoadGameConfig ();
|
||||
diff -u /tmp/freedroid-1.0.2/src/main.c ./src/main.c
|
||||
--- /tmp/freedroid-1.0.2/src/main.c 2003-08-09 22:30:43.000000000 +1200
|
||||
+++ ./src/main.c 2010-07-28 22:55:08.000000000 +1200
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
extern bool show_cursor;
|
||||
void UpdateCountersForThisFrame (void);
|
||||
+void turn_off_cursor();
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
* @Desc: the heart of the Game
|
||||
@@ -72,6 +73,8 @@
|
||||
now = SDL_GetTicks();
|
||||
InitFreedroid (argc, argv); // Initialisation of global variables and arrays
|
||||
|
||||
+ turn_off_cursor();
|
||||
+
|
||||
SDL_ShowCursor (SDL_DISABLE);
|
||||
|
||||
#ifdef __WIN32__
|
||||
@@ -246,4 +249,11 @@
|
||||
} /* UpdateCountersForThisFrame() */
|
||||
|
||||
|
||||
+void turn_off_cursor()
|
||||
+{
|
||||
+ #undef SDL_ShowCursor
|
||||
+ SDL_ShowCursor( SDL_DISABLE);
|
||||
+}
|
||||
+
|
||||
+
|
||||
#undef _main_c
|
||||
Only in ./src/: Makefile
|
||||
diff -u /tmp/freedroid-1.0.2/src/sound.c ./src/sound.c
|
||||
--- /tmp/freedroid-1.0.2/src/sound.c 2003-08-09 03:09:20.000000000 +1200
|
||||
+++ ./src/sound.c 2010-07-29 00:16:45.000000000 +1200
|
||||
@@ -347,8 +347,7 @@
|
||||
if ( Tmp_MOD_File == NULL )
|
||||
{
|
||||
DebugPrintf (0, "\nError loading sound-file: %s\n", filename_raw);
|
||||
- DebugPrintf (0, "SDL Mixer Error: %s\n Continuing with sound disabled\n", Mix_GetError());
|
||||
- sound_on = FALSE;
|
||||
+ DebugPrintf (0, "SDL Mixer Error: %s\n", Mix_GetError());
|
||||
return;
|
||||
} // if ( !Loaded_WAV...
|
||||
Mix_PlayMusic (Tmp_MOD_File, -1);
|
Loading…
Reference in New Issue
Block a user