Compare commits
5 Commits
f7a5cd8ca4
...
v1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c3e01d3e4 | |||
| 9a4f41541f | |||
| 3898289f57 | |||
| 33af343c80 | |||
| dba989ca24 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
|||||||
release/*
|
release/*
|
||||||
*.exe
|
*.exe
|
||||||
*.dll
|
*.dll
|
||||||
|
mini
|
||||||
|
mini_debug
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.8</string>
|
<string>1.1.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0.8</string>
|
<string>1.1.0</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
@@ -41,4 +41,4 @@
|
|||||||
<key>SUPublicDSAKeyFile</key>
|
<key>SUPublicDSAKeyFile</key>
|
||||||
<string>dsa_pub.pem</string>
|
<string>dsa_pub.pem</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ function abad_state_normal()
|
|||||||
elseif btn(keyLeft) or pad(btnLeft) then
|
elseif btn(keyLeft) or pad(btnLeft) then
|
||||||
abad.update=abad_state_walking
|
abad.update=abad_state_walking
|
||||||
abad.flip=true
|
abad.flip=true
|
||||||
elseif btn(keyUp) or pad(btnUp) then
|
elseif btn(keyJump) or pad(btnJump) then
|
||||||
abad.update=abad_state_jumping
|
abad.update=abad_state_jumping
|
||||||
abad.step=0
|
abad.step=0
|
||||||
abad.jumpfwd=false
|
abad.jumpfwd=false
|
||||||
@@ -185,7 +185,7 @@ function abad_state_walking()
|
|||||||
|
|
||||||
abad_make_safe()
|
abad_make_safe()
|
||||||
|
|
||||||
if btn(keyUp) or pad(btnUp) then
|
if btn(keyJump) or pad(btnJump) then
|
||||||
abad.update=abad_state_jumping
|
abad.update=abad_state_jumping
|
||||||
abad.step=0
|
abad.step=0
|
||||||
abad.jumpfwd=true
|
abad.jumpfwd=true
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ function batman.init()
|
|||||||
batman.draw=batman.draw
|
batman.draw=batman.draw
|
||||||
local habs={5,9,46,36,18}
|
local habs={5,9,46,36,18}
|
||||||
batman.hab=habs[1+rnd(#habs)]
|
batman.hab=habs[1+rnd(#habs)]
|
||||||
|
batman.x=24
|
||||||
|
batman.y=24
|
||||||
end
|
end
|
||||||
|
|
||||||
function batman.draw()
|
function batman.draw()
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ function update_menu()
|
|||||||
|
|
||||||
redraw_menu_hab()
|
redraw_menu_hab()
|
||||||
|
|
||||||
if btnp(keyShoot) or padp(btnShoot) then
|
if btnp(keyShoot) or btnp(KEY_SPACE) or padp(BTN_A) or padp(btnShoot) then
|
||||||
if menu_sel==0 then
|
if menu_sel==0 then
|
||||||
game_exit()
|
game_exit()
|
||||||
game_init()
|
game_init()
|
||||||
@@ -382,10 +382,10 @@ function update_menu()
|
|||||||
menu_count=0
|
menu_count=0
|
||||||
menu_state=2
|
menu_state=2
|
||||||
end
|
end
|
||||||
elseif btnp(keyDown) or padp(btnDown) then
|
elseif btnp(keyDown) or btnp(KEY_DOWN) or padp(BTN_DOWN) or padp(btnDown) then
|
||||||
menu_sel=menu_sel+1
|
menu_sel=menu_sel+1
|
||||||
if menu_sel==3 then menu_sel=0 end
|
if menu_sel==3 then menu_sel=0 end
|
||||||
elseif btnp(keyUp) or padp(btnUp) then
|
elseif btnp(keyUp) or btnp(KEY_UP) or padp(BTN_UP) or padp(btnUp) then
|
||||||
menu_sel=menu_sel-1
|
menu_sel=menu_sel-1
|
||||||
if menu_sel==-1 then menu_sel=2 end
|
if menu_sel==-1 then menu_sel=2 end
|
||||||
elseif btnp(KEY_M) then
|
elseif btnp(KEY_M) then
|
||||||
@@ -399,10 +399,14 @@ function update_menu()
|
|||||||
quit()
|
quit()
|
||||||
end
|
end
|
||||||
elseif menu_state==1 then
|
elseif menu_state==1 then
|
||||||
|
if btnp(KEY_ESCAPE) then
|
||||||
|
menu_count = 0
|
||||||
|
menu_state = 0
|
||||||
|
end
|
||||||
if menu_count==0 then
|
if menu_count==0 then
|
||||||
text("PULSA TECLA PER A AMUNT", 20, 24, 13)
|
text("PULSA TECLA PER A AMUNT", 20, 24, 13)
|
||||||
local key = btnp();
|
local key = btnp();
|
||||||
if key ~= 0 then
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
menu_count = 1
|
menu_count = 1
|
||||||
keyUp=key
|
keyUp=key
|
||||||
setconf("keyup", keyUp)
|
setconf("keyup", keyUp)
|
||||||
@@ -410,7 +414,7 @@ function update_menu()
|
|||||||
elseif menu_count==1 then
|
elseif menu_count==1 then
|
||||||
text("PULSA TECLA PER A AVALL", 20, 24, 13)
|
text("PULSA TECLA PER A AVALL", 20, 24, 13)
|
||||||
local key = btnp();
|
local key = btnp();
|
||||||
if key ~= 0 then
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
menu_count = 2
|
menu_count = 2
|
||||||
keyDown=key
|
keyDown=key
|
||||||
setconf("keydown", keyDown)
|
setconf("keydown", keyDown)
|
||||||
@@ -418,7 +422,7 @@ function update_menu()
|
|||||||
elseif menu_count==2 then
|
elseif menu_count==2 then
|
||||||
text("PULSA TECLA PER A ESQUERRA", 14, 24, 13)
|
text("PULSA TECLA PER A ESQUERRA", 14, 24, 13)
|
||||||
local key = btnp();
|
local key = btnp();
|
||||||
if key ~= 0 then
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
menu_count = 3
|
menu_count = 3
|
||||||
keyLeft=key
|
keyLeft=key
|
||||||
setconf("keleft", keyLeft)
|
setconf("keleft", keyLeft)
|
||||||
@@ -426,15 +430,23 @@ function update_menu()
|
|||||||
elseif menu_count==3 then
|
elseif menu_count==3 then
|
||||||
text("PULSA TECLA PER A DRETA", 20, 24, 13)
|
text("PULSA TECLA PER A DRETA", 20, 24, 13)
|
||||||
local key = btnp();
|
local key = btnp();
|
||||||
if key ~= 0 then
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
menu_count = 4
|
menu_count = 4
|
||||||
keyRight=key
|
keyRight=key
|
||||||
setconf("keyright", keyRight)
|
setconf("keyright", keyRight)
|
||||||
end
|
end
|
||||||
elseif menu_count==4 then
|
elseif menu_count==4 then
|
||||||
|
text("PULSA TECLA PER A BOTAR", 20, 24, 13)
|
||||||
|
local key = btnp();
|
||||||
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
|
menu_count = 5
|
||||||
|
keyJump=key
|
||||||
|
setconf("keyjump", keyJump)
|
||||||
|
end
|
||||||
|
elseif menu_count==5 then
|
||||||
text("PULSA TECLA PER A DISPAR", 18, 24, 13)
|
text("PULSA TECLA PER A DISPAR", 18, 24, 13)
|
||||||
local key = btnp();
|
local key = btnp();
|
||||||
if key ~= 0 then
|
if key ~= 0 and key~=KEY_ESCAPE then
|
||||||
menu_count = 0
|
menu_count = 0
|
||||||
menu_state = 0
|
menu_state = 0
|
||||||
keyShoot=key
|
keyShoot=key
|
||||||
@@ -442,10 +454,14 @@ function update_menu()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
if btnp(KEY_ESCAPE) then
|
||||||
|
menu_count = 0
|
||||||
|
menu_state = 0
|
||||||
|
end
|
||||||
if menu_count==0 then
|
if menu_count==0 then
|
||||||
text("PULSA BOTÓ PER A AMUNT", 22, 24, 13)
|
text("PULSA BOTÓ PER A AMUNT", 22, 24, 13)
|
||||||
local btn = padp();
|
local btn = padp();
|
||||||
if btn ~= 0 then
|
if btn ~= -1 then
|
||||||
menu_count = 1
|
menu_count = 1
|
||||||
btnUp=btn
|
btnUp=btn
|
||||||
setconf("btnup", btnUp)
|
setconf("btnup", btnUp)
|
||||||
@@ -453,7 +469,7 @@ function update_menu()
|
|||||||
elseif menu_count==1 then
|
elseif menu_count==1 then
|
||||||
text("PULSA BOTÓ PER A AVALL", 22, 24, 13)
|
text("PULSA BOTÓ PER A AVALL", 22, 24, 13)
|
||||||
local btn = padp();
|
local btn = padp();
|
||||||
if btn ~= 0 then
|
if btn ~= -1 then
|
||||||
menu_count = 2
|
menu_count = 2
|
||||||
btnDown=btn
|
btnDown=btn
|
||||||
setconf("btndown", btnDown)
|
setconf("btndown", btnDown)
|
||||||
@@ -461,7 +477,7 @@ function update_menu()
|
|||||||
elseif menu_count==2 then
|
elseif menu_count==2 then
|
||||||
text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13)
|
text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13)
|
||||||
local btn = padp();
|
local btn = padp();
|
||||||
if btn ~= 0 then
|
if btn ~= -1 then
|
||||||
menu_count = 3
|
menu_count = 3
|
||||||
btnLeft=btn
|
btnLeft=btn
|
||||||
setconf("keleft", btnLeft)
|
setconf("keleft", btnLeft)
|
||||||
@@ -469,15 +485,23 @@ function update_menu()
|
|||||||
elseif menu_count==3 then
|
elseif menu_count==3 then
|
||||||
text("PULSA BOTÓ PER A DRETA", 22, 24, 13)
|
text("PULSA BOTÓ PER A DRETA", 22, 24, 13)
|
||||||
local btn = padp();
|
local btn = padp();
|
||||||
if btn ~= 0 then
|
if btn ~= -1 then
|
||||||
menu_count = 4
|
menu_count = 4
|
||||||
btnRight=btn
|
btnRight=btn
|
||||||
setconf("btnright", btnRight)
|
setconf("btnright", btnRight)
|
||||||
end
|
end
|
||||||
elseif menu_count==4 then
|
elseif menu_count==4 then
|
||||||
|
text("PULSA BOTÓ PER A BOTAR", 22, 24, 13)
|
||||||
|
local btn = padp();
|
||||||
|
if btn ~= -1 then
|
||||||
|
menu_count = 5
|
||||||
|
btnJump=btn
|
||||||
|
setconf("btnjump", btnJump)
|
||||||
|
end
|
||||||
|
elseif menu_count==5 then
|
||||||
text("PULSA BOTÓ PER A DISPAR", 20, 24, 13)
|
text("PULSA BOTÓ PER A DISPAR", 20, 24, 13)
|
||||||
local btn = padp();
|
local btn = padp();
|
||||||
if btn ~= 0 then
|
if btn ~= -1 then
|
||||||
menu_count = 0
|
menu_count = 0
|
||||||
menu_state = 0
|
menu_state = 0
|
||||||
btnShoot=btn
|
btnShoot=btn
|
||||||
|
|||||||
@@ -29,12 +29,14 @@ function _init()
|
|||||||
keyDown = tonumber(getconf("keydown")) or KEY_DOWN
|
keyDown = tonumber(getconf("keydown")) or KEY_DOWN
|
||||||
keyLeft = tonumber(getconf("keyleft")) or KEY_LEFT
|
keyLeft = tonumber(getconf("keyleft")) or KEY_LEFT
|
||||||
keyRight = tonumber(getconf("keyright")) or KEY_RIGHT
|
keyRight = tonumber(getconf("keyright")) or KEY_RIGHT
|
||||||
|
keyJump = tonumber(getconf("keyjump")) or KEY_UP
|
||||||
keyShoot = tonumber(getconf("keyshoot")) or KEY_SPACE
|
keyShoot = tonumber(getconf("keyshoot")) or KEY_SPACE
|
||||||
|
|
||||||
btnUp = tonumber(getconf("btnup")) or BTN_UP
|
btnUp = tonumber(getconf("btnup")) or BTN_UP
|
||||||
btnDown = tonumber(getconf("btndown")) or BTN_DOWN
|
btnDown = tonumber(getconf("btndown")) or BTN_DOWN
|
||||||
btnLeft = tonumber(getconf("btnleft")) or BTN_LEFT
|
btnLeft = tonumber(getconf("btnleft")) or BTN_LEFT
|
||||||
btnRight = tonumber(getconf("btnright")) or BTN_RIGHT
|
btnRight = tonumber(getconf("btnright")) or BTN_RIGHT
|
||||||
|
btnJump = tonumber(getconf("btnjump")) or BTN_UP
|
||||||
btnShoot = tonumber(getconf("btnshoot")) or BTN_A
|
btnShoot = tonumber(getconf("btnshoot")) or BTN_A
|
||||||
|
|
||||||
--game_init()
|
--game_init()
|
||||||
|
|||||||
Reference in New Issue
Block a user