Initial commit
This commit is contained in:
commit
810100abab
|
@ -0,0 +1,3 @@
|
|||
[submodule "p8btools"]
|
||||
path = p8btools
|
||||
url = https://git.tilde.team/khuxkm/p8btools
|
|
@ -0,0 +1,8 @@
|
|||
NAME:=blazzle
|
||||
SRC:=$(wildcard *.lua)
|
||||
$(NAME).p8: $(SRC)
|
||||
python combine.py $(NAME).p8 base.p8 $(SRC)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm $(NAME).p8
|
|
@ -0,0 +1,4 @@
|
|||
pico-8 cartridge // http://www.pico-8.com
|
||||
version 16
|
||||
__lua__
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
import p8btools,argparse,io
|
||||
|
||||
parser = argparse.ArgumentParser(prog="python combine.py",description="Combines a lua file into a .p8 cart.")
|
||||
parser.add_argument("result",help="The filename for the resulting cart.")
|
||||
parser.add_argument("p8cart",help="A .p8 cart.")
|
||||
parser.add_argument("luafile",help="The lua file to inject into the .p8 cart.",nargs="+")
|
||||
args = parser.parse_args()
|
||||
|
||||
cart = p8btools.Cart(args.p8cart)
|
||||
t = ""
|
||||
for luafile in args.luafile:
|
||||
lua = p8btools.LuaCode(luafile)
|
||||
lua.parse()
|
||||
t += lua.text
|
||||
t += "\n"
|
||||
cart.lua = t.rstrip()
|
||||
with io.open(args.result,"w",encoding="utf-8") as f:
|
||||
f.write(cart.fulltext)
|
|
@ -0,0 +1,9 @@
|
|||
--!define pico8 1
|
||||
--!ifndef pico8
|
||||
print("This is a PICO-8 cartridge, stupid.")
|
||||
--!endif
|
||||
function _update() end
|
||||
|
||||
function _draw()
|
||||
cls(0)
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4ca6b1c7a063a6a834ed709d2d1327bf68c68c3d
|
Loading…
Reference in New Issue