mirror of
https://github.com/clockworkpi/launcher.git
synced 2026-03-19 02:12:38 +01:00
Comm software package alpha
This commit is contained in:
5
Menu/GameShell/50_PICO-8/PICO-8.sh
Executable file
5
Menu/GameShell/50_PICO-8/PICO-8.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
#SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico-8/pico8_dyn -splore -draw_rect 32,0,256,240
|
||||
cd /home/cpi/games/PICO-8/pico-8
|
||||
SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico8_dyn -draw_rect 32,0,256,240
|
||||
8
Menu/GameShell/50_PICO-8/Post-Up.sh
Executable file
8
Menu/GameShell/50_PICO-8/Post-Up.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir ~/.lexaloffle
|
||||
|
||||
cp -rf pico-8 ~/.lexaloffle
|
||||
|
||||
touch .done
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import pygame
|
||||
import validators
|
||||
|
||||
from UI.constants import Width,Height,ICON_TYPES,RUNEVT
|
||||
#from UI.simple_name_space import SimpleNamespace
|
||||
from UI.page import Page
|
||||
from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.icon_item import IconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.skin_manager import MySkinManager
|
||||
from UI.lang_manager import MyLangManager
|
||||
from UI.text_bulletinboard import Textbulletinboard,Text
|
||||
from UI.util_funcs import FileExists
|
||||
|
||||
|
||||
class NOPICOPage(Page):
|
||||
_FootMsg = ["Nav","","","Back",""]
|
||||
|
||||
def Init(self):
|
||||
self._PosX = self._Index*self._Screen._Width
|
||||
self._Width = self._Screen._Width
|
||||
self._Height = self._Screen._Height
|
||||
|
||||
self._CanvasHWND = self._Screen._CanvasHWND
|
||||
|
||||
self._Board = Textbulletinboard()
|
||||
|
||||
self._Board._PosX = 4
|
||||
self._Board._PosY = 20
|
||||
self._Board._Width= self._Width - 4*2
|
||||
self._Board._Height = 100
|
||||
self._Board._CanvasHWND = self._CanvasHWND
|
||||
self._Board.Init()
|
||||
|
||||
a = Text("Please Go to \n",None,MyLangManager.TrFont("varela14"),True)
|
||||
b = Text("https://www.lexaloffle.com/pico-8.php",MySkinManager.GiveColor("URL"),None,True,True)
|
||||
c = Text("buy a pico-8 raspi and put zip into \n/home/cpi/games/PICO-8")
|
||||
|
||||
d = a.Words()+b.Words()+c.Words()
|
||||
self._Board.SetAndBlitText(d)
|
||||
|
||||
def KeyDown(self,event):
|
||||
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
|
||||
self.ReturnToUpLevelPage()
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
return
|
||||
|
||||
def Draw(self):
|
||||
self.ClearCanvas()
|
||||
self._Board.Draw()
|
||||
|
||||
|
||||
class PICO8ZipHashErrPage(Page):
|
||||
_FootMsg = ["Nav","","","Cancel","Continue"]
|
||||
|
||||
def Init(self):
|
||||
self._PosX = self._Index*self._Screen._Width
|
||||
self._Width = self._Screen._Width
|
||||
self._Height = self._Screen._Height
|
||||
|
||||
self._CanvasHWND = self._Screen._CanvasHWND
|
||||
|
||||
self._Board = Textbulletinboard()
|
||||
|
||||
self._Board._PosX = 4
|
||||
self._Board._PosY = self._Height/2 - 35
|
||||
self._Board._Width= self._Width - 4*2
|
||||
self._Board._Height = 100
|
||||
self._Board._CanvasHWND = self._CanvasHWND
|
||||
self._Board._Align = "Center"
|
||||
self._Board.Init()
|
||||
|
||||
a = Text("Md5sum check error\n",None,MyLangManager.TrFont("varela24"))
|
||||
b = Text("continue anyway?\n",None,MyLangManager.TrFont("varela24"))
|
||||
|
||||
self._Board.SetAndBlitText(a.Words()+b.Words())
|
||||
|
||||
def KeyDown(self,event):
|
||||
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
|
||||
self.ReturnToUpLevelPage()
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
return
|
||||
|
||||
def Draw(self):
|
||||
self.ClearCanvas()
|
||||
self._Board.Draw()
|
||||
|
||||
|
||||
class APIOBJ(object):
|
||||
|
||||
_Page = None
|
||||
_pico8 ="/home/cpi/games/PICO-8/pico-8"
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def CheckPico8(self):
|
||||
if FileExists(self._pico8):
|
||||
return True
|
||||
|
||||
def Init(self,main_screen):
|
||||
self._NOPicoPage = NOPICOPage()
|
||||
self._NOPicoPage._Name = "Not Found"
|
||||
self._NOPicoPage._Screen = main_screen
|
||||
self._NOPicoPage.Init()
|
||||
|
||||
self._HashErrPage = PICO8ZipHashErrPage()
|
||||
self._HashErrPage._Name = "Md5sum check failed"
|
||||
self._HashErrPage._Screen = main_screen
|
||||
self._HashErrPage.Init()
|
||||
|
||||
def API(self,main_screen):
|
||||
if main_screen !=None:
|
||||
if self.CheckPico8() == False:
|
||||
main_screen._MsgBox.SetText("Starting pico-8")
|
||||
main_screen._MsgBox.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
pygame.time.delay(300)
|
||||
cmdpath = "/home/cpi/games/PICO-8/PICO-8.sh"
|
||||
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
|
||||
else:
|
||||
main_screen.PushPage(self._NOPicoPage)
|
||||
#main_screen.PushPage(self._HashErrPage)
|
||||
main_screen.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
|
||||
OBJ = APIOBJ()
|
||||
def Init(main_screen):
|
||||
OBJ.Init(main_screen)
|
||||
def API(main_screen):
|
||||
OBJ.API(main_screen)
|
||||
9
Menu/GameShell/50_PICO-8/compkginfo.json
Normal file
9
Menu/GameShell/50_PICO-8/compkginfo.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"GameDir":"/home/cpi/games/PICO-8/",
|
||||
"InstallDir":"pico-8",
|
||||
"NotFoundMsg":["Please purchase the PICO-8 \n|None|varela16",
|
||||
"and copy it to the \"Games\" folder|None|varela16"],
|
||||
|
||||
"MD5":{"pico-8_0.1.11g_raspi.zip":"a3f2995cf117499f880bd964d6a0e1f2","pico-8_0.1.11g_amd64.zip":"6726141c784afd4a41be6b7414c1b932"},
|
||||
"Post-Up":"bash Post-Up.sh"
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
a3f2995cf117499f880bd964d6a0e1f2 pico-8_0.1.11g_raspi.zip
|
||||
6726141c784afd4a41be6b7414c1b932 pico-8_0.1.11g_amd64.zip
|
||||
99
Menu/GameShell/50_PICO-8/pico-8/config.txt
Normal file
99
Menu/GameShell/50_PICO-8/pico-8/config.txt
Normal file
@@ -0,0 +1,99 @@
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Configuration for pico-8
|
||||
//
|
||||
// config.txt is read on startup and saved on exit.
|
||||
// To generate the default config.txt, delete this file.
|
||||
//
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
// :: Video Settings
|
||||
|
||||
window_size 0 0 // window width, height
|
||||
screen_size 0 0 // screen width, height (stretched to window)
|
||||
show_fps 0 // Draw frames per second in the corner
|
||||
|
||||
|
||||
// :: Window Settings
|
||||
|
||||
windowed 0 // 1 to start up in windowed mode
|
||||
window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
|
||||
frameless 0 // 1 to use a window with no frame
|
||||
fullscreen_method 1 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
|
||||
|
||||
|
||||
// :: System Settings
|
||||
|
||||
foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
|
||||
|
||||
background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
|
||||
|
||||
sessions 4 // number of times program has been run
|
||||
|
||||
// (scancode) hold this key down and left-click to simulate right-click
|
||||
rmb_key 0 // 0 for none 226 for LALT
|
||||
|
||||
// 0:off 1: ignore SDL_TEXTINPUT and use SDL_GetKeyboardState instead (mapped to a US layout)
|
||||
emulate_textinput 1
|
||||
|
||||
// Desktop for saving screenshots etc. Defaults to $HOME/Desktop
|
||||
desktop_path
|
||||
|
||||
|
||||
|
||||
// :: Audio Settings
|
||||
|
||||
sound_volume 256 // 0..256
|
||||
music_volume 256 // 0..256
|
||||
mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
|
||||
|
||||
|
||||
// ::
|
||||
|
||||
version 0.1.11g
|
||||
|
||||
|
||||
// Location of pico-8's root folder
|
||||
root_path /home/cpi/.lexaloffle/pico-8/carts/
|
||||
|
||||
|
||||
// Location of cartridge save data
|
||||
cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
|
||||
|
||||
|
||||
// Specify which player index joystick control begins at (0..7)
|
||||
joystick_index 0
|
||||
|
||||
|
||||
// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5
|
||||
button_keys 0 0 0 0 13 14 0 0 0 0 0 0 0
|
||||
|
||||
// Play notes as they are plotted in frequency mode
|
||||
live_notes 0
|
||||
|
||||
// iff 1: when using keyboard cursor, snap to closest pixel / map cel
|
||||
cursor_snap 0
|
||||
|
||||
// maximum length of gif in seconds (1..120, default 8)
|
||||
gif_len 8
|
||||
|
||||
// 0 classic 1 dark blue background in code editor
|
||||
gui_theme 0
|
||||
|
||||
// scale of screenshots and gifs // 2 means 256x256
|
||||
screenshot_scale 3
|
||||
gif_scale 2
|
||||
|
||||
// when 1 can enter glyphs using shift-A..Z
|
||||
shift_glyphs 1
|
||||
|
||||
// 0 for off. 1 to notify whenever unsaved changes are backed up
|
||||
show_backup_messages 1
|
||||
|
||||
// 0 for off. 1 to allow control of a cart's framerate due to host machine's cpu capacity (recommended)
|
||||
host_framerate_control 1
|
||||
|
||||
// filter splore content
|
||||
// 0 for no filter (18+) 1 medium (13+) 2 maximum (kid-friendly)
|
||||
content_filter 1
|
||||
|
||||
90
Menu/GameShell/50_PICO-8/pico-8/log.txt
Normal file
90
Menu/GameShell/50_PICO-8/pico-8/log.txt
Normal file
@@ -0,0 +1,90 @@
|
||||
codo_init
|
||||
platform: Linux
|
||||
Found config.txt
|
||||
|
||||
01 window_size 0 0 // window width, height
|
||||
02 screen_size 0 0 // screen width, height (stretched to window)
|
||||
03 show_fps 0 // Draw frames per second in the corner
|
||||
04 windowed 0 // 1 to start up in windowed mode
|
||||
05 window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
|
||||
new window position: -1, -1
|
||||
06 frameless 0 // 1 to use a window with no frame
|
||||
07 fullscreen_method 1 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
|
||||
08 foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
|
||||
09 background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
|
||||
10 sessions 3 // number of times program has been run
|
||||
11 rmb_key 0 // 0 for none 226 for LALT
|
||||
12 emulate_textinput 1
|
||||
13 desktop_path
|
||||
14 sound_volume 256 // 0..256
|
||||
15 music_volume 256 // 0..256
|
||||
16 mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
|
||||
17 version 0.1.11g
|
||||
18 root_path /home/cpi/.lexaloffle/pico-8/carts/
|
||||
19 cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
|
||||
20 joystick_index 0
|
||||
21 button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
22 live_notes 0
|
||||
23 cursor_snap 0
|
||||
24 gif_len 8
|
||||
25 gui_theme 0
|
||||
26 screenshot_scale 3
|
||||
27 gif_scale 2
|
||||
28 shift_glyphs 1
|
||||
29 show_backup_messages 1
|
||||
30 host_framerate_control 1
|
||||
31 content_filter 1
|
||||
|
||||
codo_system_init
|
||||
Compiled against SDL version: 2.0.7
|
||||
Linked against SDL version: 2.0.5
|
||||
Built-in video drivers: 0 x11 1 wayland 2 dummy
|
||||
Current video driver: x11
|
||||
Built-in render drivers:
|
||||
Renderer opengl:
|
||||
Flags: 0x0000000E ( | | )
|
||||
Texture formats (1): ARGB8888
|
||||
Renderer opengles2:
|
||||
Flags: 0x0000000E ( | | )
|
||||
Texture formats (4): ARGB8888, ABGR8888, RGB888, BGR888
|
||||
Renderer software:
|
||||
Flags: 0x00000009 ( | )
|
||||
Texture formats (8): ARGB8888, ABGR8888, RGBA8888, BGRA8888, RGB888, BGR888, RGB565, RGB555
|
||||
codo_reset_timer
|
||||
codo_gui_init
|
||||
codo_keys_init
|
||||
codo_text_init
|
||||
codo_video_init
|
||||
codo_mouse_init
|
||||
codo_joystick_init
|
||||
Reading controller mappings: /home/cpi/.lexaloffle/pico-8/sdl_controllers.txt
|
||||
searching for joysticks
|
||||
found 0 joysticks
|
||||
ok
|
||||
ok
|
||||
codo_load_pod: /home/cpi/apps/Menu/50_PICO-8/pico8.dat ok
|
||||
codo_set_screen 128 128 8 100
|
||||
set pixel_perfect 1
|
||||
window size: 640 480
|
||||
codo_plat_pi: forcing fullscreen mode
|
||||
Current renderer:
|
||||
Renderer opengl:
|
||||
Flags: 0x0000000A ( | )
|
||||
Texture formats (5): ARGB8888, YV12, IYUV, 0x3231564e, 0x3132564e
|
||||
Max Texture Size: 8192x8192
|
||||
codo_sound_init mix_buffer_size: 1024
|
||||
codo_sound_init
|
||||
SDL_INIT_AUDIO ok
|
||||
SDL_OpenAudio ok
|
||||
Built-in audio drivers: 0 pulseaudio 1 alsa 2 sndio 3 dsp 4 disk 5 dummy
|
||||
Current audio driver: alsa
|
||||
codo_exit
|
||||
cmusic_stop
|
||||
codo_main_exit
|
||||
codo_config_save
|
||||
codo_sound_exit
|
||||
codo_video_exit
|
||||
codo_joystick_exit
|
||||
codo_system_exit
|
||||
codo_items_created: 1023
|
||||
ok
|
||||
1
Menu/GameShell/50_PICO-8/pico-8/sdl_controllers.txt
Normal file
1
Menu/GameShell/50_PICO-8/pico-8/sdl_controllers.txt
Normal file
@@ -0,0 +1 @@
|
||||
// add SDL2 game controller mappings to this file
|
||||
Reference in New Issue
Block a user