import vodovod-1.10
The goal of vodovod is to reach the highest possible score. You get a limited number of pipes on each level and need to combine them to lead the water from the house at the top of the screen to the storage tank at the bottom. help & ok jasper@
This commit is contained in:
parent
d6a080f846
commit
cb0072859f
39
games/vodovod/Makefile
Normal file
39
games/vodovod/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
|
||||
COMMENT= combine pipes to lead water from the house to the tank
|
||||
|
||||
DISTNAME= vodovod-1.10-src
|
||||
PKGNAME= vodovod-1.10
|
||||
CATEGORIES= games
|
||||
|
||||
HOMEPAGE= http://home.gna.org/vodovod/
|
||||
|
||||
MAINTAINER= Simon Bertrang <simon@openbsd.org>
|
||||
|
||||
# GPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB= X11 Xext c m pthread stdc++ usbhid
|
||||
|
||||
MASTER_SITES= http://download.gna.org/vodovod/
|
||||
|
||||
LIB_DEPENDS= SDL::devel/sdl \
|
||||
SDL_image::devel/sdl-image \
|
||||
SDL_mixer::devel/sdl-mixer
|
||||
|
||||
USE_X11= Yes
|
||||
NO_REGRESS= Yes
|
||||
|
||||
MAKE_ENV+= DATADIR="${LOCALBASE}/share/vodovod" CC="${CXX}"
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/vodovod ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/vodovod
|
||||
${INSTALL_DATA} ${WRKSRC}/vodovod.rc \
|
||||
${PREFIX}/share/vodovod/vodovod.conf
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/vodovod/data
|
||||
${INSTALL_DATA} ${WRKSRC}/data/* ${PREFIX}/share/vodovod/data
|
||||
|
||||
.include <bsd.port.mk>
|
5
games/vodovod/distinfo
Normal file
5
games/vodovod/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (vodovod-1.10-src.tar.gz) = /JuqFwSwBnYb7F5OZLfunQ==
|
||||
RMD160 (vodovod-1.10-src.tar.gz) = Fk2wzy/8WvRgYnph9wlHYgIk8sc=
|
||||
SHA1 (vodovod-1.10-src.tar.gz) = lDM1pZwfwcr1+Lc0WmzFuXRY9/w=
|
||||
SHA256 (vodovod-1.10-src.tar.gz) = ujCRnu1nbp0at9xXtygTA562WPomRCuSHCmkidXAgt8=
|
||||
SIZE (vodovod-1.10-src.tar.gz) = 403216
|
28
games/vodovod/patches/patch-Makefile
Normal file
28
games/vodovod/patches/patch-Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- Makefile.orig Sun Jun 10 16:16:22 2007
|
||||
+++ Makefile Thu Jul 5 16:09:05 2007
|
||||
@@ -18,20 +18,16 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
-# directory where the games are installed (/usr, /usr/local, ... or something)
|
||||
-ifndef PREFIX
|
||||
-PREFIX=/usr
|
||||
-endif
|
||||
-
|
||||
PROGRAM = vodovod
|
||||
OBJECTS = game.o map.o resource.o main.o allmenus.o njamfont.o sutils.o menu.o hiscore.o effects.o config.o keys.o
|
||||
-CC = g++
|
||||
|
||||
# If you hate warnings under Cygwin use these flags instead
|
||||
# MY_CFLAGS = -I/usr/local/include/SDL -Dmain=SDL_main -DWIN32 -Uunix -mno-cygwin
|
||||
-MY_CFLAGS = `sdl-config --cflags`
|
||||
+MY_CFLAGS = `sdl-config --cflags` -DDATADIR=\"${DATADIR}\"
|
||||
|
||||
-%.o: %.cpp
|
||||
+.SUFFIXES: .o .cpp
|
||||
+
|
||||
+.cpp.o:
|
||||
$(CC) -c $(MY_CFLAGS) $< -o $@
|
||||
|
||||
all: $(PROGRAM)
|
21
games/vodovod/patches/patch-allmenus_cpp
Normal file
21
games/vodovod/patches/patch-allmenus_cpp
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-allmenus_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- allmenus.cpp.orig Thu Jul 5 15:20:07 2007
|
||||
+++ allmenus.cpp Thu Jul 5 15:20:24 2007
|
||||
@@ -36,7 +36,7 @@ extern ResourceManager *Data;
|
||||
//-----------------------------------------------------------------------------
|
||||
MainMenu::MainMenu(NjamFont *font_ptr, int x, int y):
|
||||
Menu(font_ptr, x, y),
|
||||
- whiteFontM("data/font-white.bmp", 8, 14)
|
||||
+ whiteFontM(DATADIR "/data/font-white.bmp", 8, 14)
|
||||
{
|
||||
options.push_back("START NEW GAME");
|
||||
options.push_back("OPTIONS");
|
||||
@@ -68,7 +68,7 @@ void DrawHelp()
|
||||
{
|
||||
RenderBackground(300);
|
||||
|
||||
- NjamFont font("data/font-white.bmp", 8, 14);
|
||||
+ NjamFont font(DATADIR "/data/font-white.bmp", 8, 14);
|
||||
int row = 10;
|
||||
const int col = 16;
|
||||
font.WriteTextColRow(Screen, col, row++, "GOAL OF THE GAME IS TO USE PIPES TO CONNECT THE HOUSE AT THE TOP");
|
41
games/vodovod/patches/patch-config_cpp
Normal file
41
games/vodovod/patches/patch-config_cpp
Normal file
@ -0,0 +1,41 @@
|
||||
$OpenBSD: patch-config_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- config.cpp.orig Sun Jun 3 13:09:24 2007
|
||||
+++ config.cpp Thu Jul 5 15:42:13 2007
|
||||
@@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include "config.h"
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
//------------------------------------------------------------------------------
|
||||
using namespace std;
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -155,7 +157,18 @@ Config::~Config()
|
||||
//-----------------------------------------------------------------------------
|
||||
bool Config::save()
|
||||
{
|
||||
- std::ofstream file("vodovod.conf");
|
||||
+ const char *home;
|
||||
+ char path[FILENAME_MAX];
|
||||
+ int n;
|
||||
+
|
||||
+ if ((home = getenv("HOME")) == NULL)
|
||||
+ false;
|
||||
+
|
||||
+ if ((n = snprintf(path, FILENAME_MAX, "%s/.vodovod.conf", home) >=
|
||||
+ FILENAME_MAX) || n <= 0)
|
||||
+ false;
|
||||
+
|
||||
+ std::ofstream file(path);
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
@@ -171,7 +184,7 @@ bool Config::save()
|
||||
// this gets called from main() so we're sure config.ini is in the right place
|
||||
bool Config::load()
|
||||
{
|
||||
- std::ifstream file("vodovod.conf");
|
||||
+ std::ifstream file(DATADIR "/vodovod.conf");
|
||||
if (!file)
|
||||
return false;
|
||||
|
15
games/vodovod/patches/patch-config_h
Normal file
15
games/vodovod/patches/patch-config_h
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-config_h,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- config.h.orig Sun Jun 3 13:09:24 2007
|
||||
+++ config.h Thu Jul 5 15:16:26 2007
|
||||
@@ -27,6 +27,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
+
|
||||
+#ifndef DATADIR
|
||||
+#define DATADIR "."
|
||||
+#endif
|
||||
+
|
||||
//---------------------------------------------------------------------------------------
|
||||
enum taAction { taLeft, taRight, taDown, taUp, taDrop, taFlood };
|
||||
//---------------------------------------------------------------------------------------
|
21
games/vodovod/patches/patch-game_cpp
Normal file
21
games/vodovod/patches/patch-game_cpp
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-game_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- game.cpp.orig Sat Jun 9 22:36:53 2007
|
||||
+++ game.cpp Thu Jul 5 15:17:08 2007
|
||||
@@ -29,7 +29,7 @@ extern SDL_Surface *Screen; // global objects
|
||||
extern ResourceManager *Data;
|
||||
//-----------------------------------------------------------------------------
|
||||
Game::Game(int difficulty):
|
||||
- fontM("data/font-white.bmp", 8, 14), mapM(13, 7, 10, 110)
|
||||
+ fontM(DATADIR "/data/font-white.bmp", 8, 14), mapM(13, 7, 10, 110)
|
||||
{
|
||||
difficultyM = difficulty;
|
||||
SetupGame();
|
||||
@@ -176,7 +176,7 @@ void Game::RenderScene(bool flip)
|
||||
mapM.RenderNextShape(*(queueM.begin()));
|
||||
|
||||
SDL_Rect r;
|
||||
- SDL_Surface *next = Data->getGfx("next", "data/next.png");
|
||||
+ SDL_Surface *next = Data->getGfx("next", DATADIR "/data/next.png");
|
||||
NjamSetRect(r, 363, 533);
|
||||
SDL_BlitSurface(next, 0, Screen, &r);
|
||||
|
65
games/vodovod/patches/patch-main_cpp
Normal file
65
games/vodovod/patches/patch-main_cpp
Normal file
@ -0,0 +1,65 @@
|
||||
$OpenBSD: patch-main_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- main.cpp.orig Sun Jun 10 16:15:27 2007
|
||||
+++ main.cpp Thu Jul 5 15:17:36 2007
|
||||
@@ -101,38 +101,38 @@ int main(int /* argc */, char ** /* argv */)
|
||||
InitVideo(Fullscreen);
|
||||
audio = InitAudio();
|
||||
|
||||
- SDL_Surface *vodovod = Data->getGfx("vodovod", "data/vodovod.png");
|
||||
- Data->getGfx("dirt", "data/slate.png");
|
||||
- Data->getGfx("queue", "data/queue.png");
|
||||
- Data->getGfx("blocks", "data/block.png");
|
||||
+ SDL_Surface *vodovod = Data->getGfx("vodovod", DATADIR "/data/vodovod.png");
|
||||
+ Data->getGfx("dirt", DATADIR "/data/slate.png");
|
||||
+ Data->getGfx("queue", DATADIR "/data/queue.png");
|
||||
+ Data->getGfx("blocks", DATADIR "/data/block.png");
|
||||
|
||||
// house
|
||||
- SDL_Surface *house = Data->getGfx("house", "data/house.png");
|
||||
+ SDL_Surface *house = Data->getGfx("house", DATADIR "/data/house.png");
|
||||
Uint32 green = SDL_MapRGB(house->format, 0, 255, 0);
|
||||
SDL_SetColorKey(house, SDL_SRCCOLORKEY, green);
|
||||
|
||||
// tree
|
||||
- SDL_Surface *tree = Data->getGfx("tree1", "data/tree1.png");
|
||||
+ SDL_Surface *tree = Data->getGfx("tree1", DATADIR "/data/tree1.png");
|
||||
Uint32 red = SDL_MapRGB(tree->format, 255, 0, 0);
|
||||
SDL_SetColorKey(tree, SDL_SRCCOLORKEY, red);
|
||||
|
||||
// human walking
|
||||
- SDL_Surface *human = Data->getGfx("human", "data/walk.png");
|
||||
+ SDL_Surface *human = Data->getGfx("human", DATADIR "/data/walk.png");
|
||||
Uint32 back = SDL_MapRGB(human->format, 223, 232, 255);
|
||||
SDL_SetColorKey(human, SDL_SRCCOLORKEY, back);
|
||||
|
||||
// preload music
|
||||
if (audio)
|
||||
{
|
||||
- Data->getMusic("walk", "data/walk.xm");
|
||||
- Data->getMusic("flow", "data/flow.xm");
|
||||
- Data->getMusic("tune", "data/vodovod.xm");
|
||||
+ Data->getMusic("walk", DATADIR "/data/walk.xm");
|
||||
+ Data->getMusic("flow", DATADIR "/data/flow.xm");
|
||||
+ Data->getMusic("tune", DATADIR "/data/vodovod.xm");
|
||||
|
||||
// preload sounds
|
||||
- Data->getSfx("drop", "data/drop.wav");
|
||||
- Data->getSfx("levelend", "data/mapend.wav");
|
||||
- Data->getSfx("bubbles", "data/bubbles.wav");
|
||||
- Data->getSfx("metal", "data/metal.wav");
|
||||
+ Data->getSfx("drop", DATADIR "/data/drop.wav");
|
||||
+ Data->getSfx("levelend", DATADIR "/data/mapend.wav");
|
||||
+ Data->getSfx("bubbles", DATADIR "/data/bubbles.wav");
|
||||
+ Data->getSfx("metal", DATADIR "/data/metal.wav");
|
||||
}
|
||||
|
||||
// render some background picture for menu
|
||||
@@ -143,7 +143,7 @@ int main(int /* argc */, char ** /* argv */)
|
||||
SDL_BlitSurface(vodovod, 0, Screen, &r);
|
||||
SDL_Flip(Screen);
|
||||
|
||||
- NjamFont font("data/font-yellow.bmp", 11, 22);
|
||||
+ NjamFont font(DATADIR "/data/font-yellow.bmp", 11, 22);
|
||||
MainMenu m(&font, 95, 280);
|
||||
m.start();
|
||||
}
|
12
games/vodovod/patches/patch-map_cpp
Normal file
12
games/vodovod/patches/patch-map_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-map_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- map.cpp.orig Thu Jul 5 15:22:16 2007
|
||||
+++ map.cpp Thu Jul 5 15:22:29 2007
|
||||
@@ -433,7 +433,7 @@ void Map::Render()
|
||||
{
|
||||
SDL_Rect r;
|
||||
RenderBackground(xStartM*60 - 27); // 633 = 11
|
||||
- SDL_Surface *tank = Data->getGfx("tank", "data/tank.png");
|
||||
+ SDL_Surface *tank = Data->getGfx("tank", DATADIR "/data/tank.png");
|
||||
NjamSetRect(r, 12, 529);
|
||||
SDL_BlitSurface(tank, 0, Screen, &r);
|
||||
|
12
games/vodovod/patches/patch-sutils_cpp
Normal file
12
games/vodovod/patches/patch-sutils_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-sutils_cpp,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
--- sutils.cpp.orig Sat Jun 9 22:36:53 2007
|
||||
+++ sutils.cpp Thu Jul 5 15:17:41 2007
|
||||
@@ -374,7 +374,7 @@ void InitVideo(bool fullscreen)
|
||||
throw Exiter(SDL_GetError());
|
||||
printf("Ok.\n");
|
||||
|
||||
- SDL_Surface *icon = Data->getGfx("icon", "data/abicon.bmp");
|
||||
+ SDL_Surface *icon = Data->getGfx("icon", DATADIR "/data/abicon.bmp");
|
||||
if (!icon)
|
||||
throw Exiter(SDL_GetError());
|
||||
SDL_WM_SetIcon(icon, NULL);
|
4
games/vodovod/pkg/DESCR
Normal file
4
games/vodovod/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
The goal of vodovod is to reach the highest possible score. You get a
|
||||
limited number of pipes on each level and need to combine them to lead
|
||||
the water from the house at the top of the screen to the storage tank at
|
||||
the bottom.
|
25
games/vodovod/pkg/PLIST
Normal file
25
games/vodovod/pkg/PLIST
Normal file
@ -0,0 +1,25 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/07/05 16:13:27 simon Exp $
|
||||
bin/vodovod
|
||||
share/vodovod/
|
||||
share/vodovod/data/
|
||||
share/vodovod/data/abicon.bmp
|
||||
share/vodovod/data/block.png
|
||||
share/vodovod/data/bubbles.wav
|
||||
share/vodovod/data/drop.wav
|
||||
share/vodovod/data/flow.xm
|
||||
share/vodovod/data/font-white.bmp
|
||||
share/vodovod/data/font-yellow.bmp
|
||||
share/vodovod/data/house.png
|
||||
share/vodovod/data/mapend.wav
|
||||
share/vodovod/data/metal.wav
|
||||
share/vodovod/data/next.png
|
||||
share/vodovod/data/queue.png
|
||||
share/vodovod/data/replace.wav
|
||||
share/vodovod/data/slate.png
|
||||
share/vodovod/data/tank.png
|
||||
share/vodovod/data/tree1.png
|
||||
share/vodovod/data/vodovod.png
|
||||
share/vodovod/data/vodovod.xm
|
||||
share/vodovod/data/walk.png
|
||||
share/vodovod/data/walk.xm
|
||||
share/vodovod/vodovod.conf
|
Loading…
Reference in New Issue
Block a user