Skip to content

Commit

Permalink
Merge pull request #674 from Cebion/afternoonstalker
Browse files Browse the repository at this point in the history
New Port: Afternoon Stalker
  • Loading branch information
kloptops authored Sep 20, 2024
2 parents ca4d41b + 537fc86 commit 6531e97
Show file tree
Hide file tree
Showing 97 changed files with 2,897 additions and 0 deletions.
44 changes: 44 additions & 0 deletions ports/afternoonstalker/Afternoon Stalker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/afternoonstalker
CONFDIR="$GAMEDIR/conf/"
BINARY=afternoonstalker

> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

mkdir -p "$GAMEDIR/conf"

export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"
export AFTERNOON_STALKER_DATA="$GAMEDIR/data"

cd $GAMEDIR

$ESUDO chmod 666 /dev/uinput

$GPTOKEYB "$BINARY" -c ./$BINARY.gptk &
./$BINARY --full-screen

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
51 changes: 51 additions & 0 deletions ports/afternoonstalker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Notes
Thanks to the [Pierre Sarrazin](http://perso.b2b2c.ca/~sarrazip/dev/afternoonstalker.html) for creating this game and making it available for free!

## Controls

| Button | Action |
|--|--|
|DPAD| Move|
|A| Shoot|
|B| Start Game|

## Compile

```shell
wget http://perso.b2b2c.ca/~sarrazip/dev/flatzebra-0.2.0.tar.gz
cd flatzebra-0.2.0/

// Replace Joystick Initation

Joystick::Joystick()
: joystick(NULL),
previousButtonStates(),
currentButtonStates(),
xAxis(),
yAxis()
{
xAxis[0] = xAxis[1] = 0;
yAxis[0] = yAxis[1] = 0;
// Joystick initialization is disabled
}

// In GameEngine.cpp, replace the existing fontFilePath initialization with:

string fontFilePath;
const char* customPath = getenv("AFTERNOON_STALKER_DATA");
if (customPath != nullptr) {
fontFilePath = string(customPath) + "/font_13x7.xpm";
} else {
fontFilePath = getDirPathFromEnv(PKGPIXMAPDIR, "PKGPIXMAPDIR") + "font_13x7.xpm";
}
fixedWidthFontPixmap = createTextureFromFile(fontFilePath); // may throw

./configure
make

wget http://perso.b2b2c.ca/~sarrazip/dev/afternoonstalker-1.2.0.tar.gz
cd afternoonstalker-1.2.0
./configure
# adjust prefix_path inside Makefile
make
```
339 changes: 339 additions & 0 deletions ports/afternoonstalker/afternoonstalker/COPYING

Large diffs are not rendered by default.

Binary file not shown.
34 changes: 34 additions & 0 deletions ports/afternoonstalker/afternoonstalker/afternoonstalker.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
back = esc
start = enter

a = leftctrl
b = esc
x = \"
y = \"

l1 = \"
l2 = \"
r1 = \"
r2 = \"

up = up
down = down
left = left
right = right

left_analog_up = up
left_analog_down = down
left_analog_left = left
left_analog_right = right

right_analog_up = \"
right_analog_down = \"
right_analog_left = \"
right_analog_right = \"

deadzone_mode = scaled_radial
deadzone = 2000
deadzone_scale = 8
deadzone_delay = 16
mouse_scale = 512
mouse_delay = 16
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
20
12
WWWWWWWWWWWWWWWWWWWW
WCCCW W
W b W cWWa c0 b ca W
W W W W W W
W W d b 5D4 W 2Wa cW
W W W 6B7 d W
W W b W 1WWa W
W d W d cWWW0 d W
W W W 10 W
WWa d cWWWa d cWW3 W
W_ W
WWWWWWWWWWWWWWWWWWWW
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
20
12
WWWWWWWWWWWWWWWWWWWW
WCCC W W
W W b cWa d cW0 cWWW
W d W W d W
W d b 5D4 b 2a W
WWa W 6B7 d cW
W b W b b W
W b d WWWa c0 d 2a W
W W W W W
W d b d cWa d b ca W
W_ W W W
WWWWWWWWWWWWWWWWWWWW
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
20
12
WWWWWWWWWWWWWWWWWWWW
W_ W
W W
W W
W C W
W C b W
W C d W
W W
W 5D4 W
W 6B7 W
W W
WWWWWWWWWWWWWWWWWWWW
161 changes: 161 additions & 0 deletions ports/afternoonstalker/afternoonstalker/data/font_13x7.xpm

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* XPM */
static const char * bat_explosion_0_xpm[] = {
"4 4 2 1",
" c None",
". c #303030",
". .",
" .. ",
" .. ",
". ."};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* XPM */
static const char * bat_flying_0_xpm[] = {
"30 30 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ................ ",
" .................. ",
" .. ........ .. ",
" .. ...... .. ",
" .. .. ",
" .. .. ",
" .. .. ",
".. ..",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* XPM */
static const char * bat_flying_1_xpm[] = {
"30 30 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. .. ",
" .... .... ",
" .. .. .. .. ",
" .. .......... .. ",
" .. ........ .. ",
" .. ........ .. ",
" .. ...... .. ",
".. ..",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* XPM */
static const char * bat_flying_2_xpm[] = {
"30 30 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
".. ..",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .......... ",
" ........ ",
" ........ ",
" ...... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* XPM */
static const char * bat_flying_3_xpm[] = {
"30 30 2 1",
" c None",
". c #000000",
".. ..",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .......... ",
" ........ ",
" ........ ",
" ...... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* XPM */
static const char * big_robot_bullet_0_xpm[] = {
"23 23 2 1",
" c None",
". c #FFFF00",
" . ",
" ... ",
" ..... ",
" ....... ",
" ......... ",
" ........... ",
" ............. ",
" ............... ",
" ................. ",
" ................... ",
" ..................... ",
".......................",
" ..................... ",
" ................... ",
" ................. ",
" ............... ",
" ............. ",
" ........... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . "};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* XPM */
static const char * big_robot_bullet_1_xpm[] = {
"23 23 2 1",
" c None",
". c #FFFF00",
" . ",
" ... ",
" ..... ",
" ..... ",
" ..... ",
" ..... ",
" ........... ",
" ........... ",
" ........... ",
" ................... ",
" ..................... ",
".......................",
" ..................... ",
" ................... ",
" ........... ",
" ........... ",
" ........... ",
" ..... ",
" ..... ",
" ..... ",
" ..... ",
" ... ",
" . "};
Loading

0 comments on commit 6531e97

Please sign in to comment.