[v0.6.1]
- Restablert el exemplet de game.lua - Ficat Makefile per a tots, falta provar el de mac - Bàsicament, açò es per fer una release de binaris (fill de osiris).
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@ scr_min.c
|
|||||||
tests.lua
|
tests.lua
|
||||||
fake_editor.lua
|
fake_editor.lua
|
||||||
*.bin
|
*.bin
|
||||||
|
bin/*
|
||||||
25
Makefile
25
Makefile
@@ -1,4 +1,27 @@
|
|||||||
executable = ascii
|
executable = ascii
|
||||||
|
source = *.cpp ./lua/*.c
|
||||||
|
|
||||||
|
windows:
|
||||||
|
@echo off
|
||||||
|
g++ $(source) -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lmingw32 -lSDL2main -lSDL2 -mwindows -o "$(executable).exe"
|
||||||
|
strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable).exe"
|
||||||
|
|
||||||
|
windows_debug:
|
||||||
|
@echo off
|
||||||
|
g++ $(source) -D DEBUG -g -Wall -Os -lmingw32 -lSDL2main -lSDL2 -o "$(executable)_debug.exe"
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
g++ *.cpp ./lua/*.c -lSDL2 -o $(executable)
|
clang++ $(source) -Wall -Os -std=c++11 -ffunction-sections -fdata-sections -lSDL2 -o "$(executable)"
|
||||||
|
|
||||||
|
macos_debug:
|
||||||
|
clang++ $(source) -D DEBUG -g -Wall -Os -std=c++11 -ffunction-sections -fdata-sections -lSDL2 -o "$(executable)_debug"
|
||||||
|
|
||||||
|
macos_bundle:
|
||||||
|
clang++ $(source) -D MACOS_BUNDLE -Wall -Os -std=c++11 -framework SDL2 -F /Library/Frameworks -ffunction-sections -fdata-sections -o mini_bundle -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
||||||
|
|
||||||
|
linux:
|
||||||
|
g++ $(source) -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o "$(executable)"
|
||||||
|
strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable)"
|
||||||
|
|
||||||
|
linux_debug:
|
||||||
|
g++ $(source) -D DEBUG -g -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o "$(executable)_debug"
|
||||||
|
|||||||
21
game.lua
21
game.lua
@@ -1 +1,20 @@
|
|||||||
/Users/sergio/Gitea/miniascii_jaildoc/miniascii/demos/ticker.lua
|
function init()
|
||||||
|
mode(0)
|
||||||
|
cls()
|
||||||
|
play("o4v5l1crcl4dcferl1crcl4dcgfr")
|
||||||
|
end
|
||||||
|
|
||||||
|
function update()
|
||||||
|
cls()
|
||||||
|
locate(0,0)
|
||||||
|
if mousebutton(1) then
|
||||||
|
print("Has pulsat el boto esquerre")
|
||||||
|
elseif mousebutton(2) then
|
||||||
|
print("Has pulsat el boto del mig")
|
||||||
|
elseif mousebutton(3) then
|
||||||
|
print("Has pulsat el boto dret")
|
||||||
|
else
|
||||||
|
print("No has pulsat cap boto")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
2
lua.cpp
2
lua.cpp
@@ -417,7 +417,7 @@ bool lua_is_playing() {
|
|||||||
return lua_state == STATE_PLAYING;
|
return lua_state == STATE_PLAYING;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char boot[] = "function init()mode(1)cls()play('o5l0v5cegv4cegv3cegv2cegv1ceg')memcpy(360,4608,240)memcpy(1560,4848,240)ink(1)print('G A M E',8,16)ink(4)print('S Y S T E M',20,16)ink(7)print('mini',9,8)ink(8)print('v0.5.4',34,29)w=0 end function update()w=w+1 if w>90 then cls()load()end end";
|
const char boot[] = "function init()mode(1)cls()play('o5l0v5cegv4cegv3cegv2cegv1ceg')memcpy(360,4608,240)memcpy(1560,4848,240)ink(1)print('G A M E',8,16)ink(4)print('S Y S T E M',20,16)ink(7)print('mini',9,8)ink(8)print('v0.6.1',34,29)w=0 end function update()w=w+1 if w>90 then cls()load()end end";
|
||||||
|
|
||||||
void lua_init(const char* filename, const bool start_playing) {
|
void lua_init(const char* filename, const bool start_playing) {
|
||||||
if (lua_state != STATE_STOPPED) lua_quit();
|
if (lua_state != STATE_STOPPED) lua_quit();
|
||||||
|
|||||||
Reference in New Issue
Block a user