Let's get this rendering on PSP and Dolphin.
This commit is contained in:
@@ -4,56 +4,56 @@ module('scene')
|
||||
module('locale')
|
||||
|
||||
-- Default Input bindings.
|
||||
-- if PLATFORM == "psp" then
|
||||
-- inputBind("up", INPUT_ACTION_UP)
|
||||
-- inputBind("down", INPUT_ACTION_DOWN)
|
||||
-- inputBind("left", INPUT_ACTION_LEFT)
|
||||
-- inputBind("right", INPUT_ACTION_RIGHT)
|
||||
-- inputBind("circle", INPUT_ACTION_CANCEL)
|
||||
-- inputBind("cross", INPUT_ACTION_ACCEPT)
|
||||
-- inputBind("select", INPUT_ACTION_RAGEQUIT)
|
||||
-- inputBind("lstick_up", INPUT_ACTION_UP)
|
||||
-- inputBind("lstick_down", INPUT_ACTION_DOWN)
|
||||
-- inputBind("lstick_left", INPUT_ACTION_LEFT)
|
||||
-- inputBind("lstick_right", INPUT_ACTION_RIGHT)
|
||||
if PLATFORM == "psp" then
|
||||
inputBind("up", INPUT_ACTION_UP)
|
||||
inputBind("down", INPUT_ACTION_DOWN)
|
||||
inputBind("left", INPUT_ACTION_LEFT)
|
||||
inputBind("right", INPUT_ACTION_RIGHT)
|
||||
inputBind("circle", INPUT_ACTION_CANCEL)
|
||||
inputBind("cross", INPUT_ACTION_ACCEPT)
|
||||
inputBind("select", INPUT_ACTION_RAGEQUIT)
|
||||
inputBind("lstick_up", INPUT_ACTION_UP)
|
||||
inputBind("lstick_down", INPUT_ACTION_DOWN)
|
||||
inputBind("lstick_left", INPUT_ACTION_LEFT)
|
||||
inputBind("lstick_right", INPUT_ACTION_RIGHT)
|
||||
|
||||
-- elseif DOLPHIN then
|
||||
-- inputBind("up", INPUT_ACTION_UP)
|
||||
-- inputBind("down", INPUT_ACTION_DOWN)
|
||||
-- inputBind("left", INPUT_ACTION_LEFT)
|
||||
-- inputBind("right", INPUT_ACTION_RIGHT)
|
||||
-- inputBind("b", INPUT_ACTION_CANCEL)
|
||||
-- inputBind("a", INPUT_ACTION_ACCEPT)
|
||||
-- inputBind("z", INPUT_ACTION_RAGEQUIT)
|
||||
-- inputBind("lstick_up", INPUT_ACTION_UP)
|
||||
-- inputBind("lstick_down", INPUT_ACTION_DOWN)
|
||||
-- inputBind("lstick_left", INPUT_ACTION_LEFT)
|
||||
-- inputBind("lstick_right", INPUT_ACTION_RIGHT)
|
||||
elseif DOLPHIN then
|
||||
inputBind("up", INPUT_ACTION_UP)
|
||||
inputBind("down", INPUT_ACTION_DOWN)
|
||||
inputBind("left", INPUT_ACTION_LEFT)
|
||||
inputBind("right", INPUT_ACTION_RIGHT)
|
||||
inputBind("b", INPUT_ACTION_CANCEL)
|
||||
inputBind("a", INPUT_ACTION_ACCEPT)
|
||||
inputBind("z", INPUT_ACTION_RAGEQUIT)
|
||||
inputBind("lstick_up", INPUT_ACTION_UP)
|
||||
inputBind("lstick_down", INPUT_ACTION_DOWN)
|
||||
inputBind("lstick_left", INPUT_ACTION_LEFT)
|
||||
inputBind("lstick_right", INPUT_ACTION_RIGHT)
|
||||
|
||||
-- else
|
||||
-- if INPUT_KEYBOARD then
|
||||
-- inputBind("w", INPUT_ACTION_UP)
|
||||
-- inputBind("s", INPUT_ACTION_DOWN)
|
||||
-- inputBind("a", INPUT_ACTION_LEFT)
|
||||
-- inputBind("d", INPUT_ACTION_RIGHT)
|
||||
else
|
||||
if INPUT_KEYBOARD then
|
||||
inputBind("w", INPUT_ACTION_UP)
|
||||
inputBind("s", INPUT_ACTION_DOWN)
|
||||
inputBind("a", INPUT_ACTION_LEFT)
|
||||
inputBind("d", INPUT_ACTION_RIGHT)
|
||||
|
||||
-- inputBind("left", INPUT_ACTION_LEFT)
|
||||
-- inputBind("right", INPUT_ACTION_RIGHT)
|
||||
-- inputBind("up", INPUT_ACTION_UP)
|
||||
-- inputBind("down", INPUT_ACTION_DOWN)
|
||||
inputBind("left", INPUT_ACTION_LEFT)
|
||||
inputBind("right", INPUT_ACTION_RIGHT)
|
||||
inputBind("up", INPUT_ACTION_UP)
|
||||
inputBind("down", INPUT_ACTION_DOWN)
|
||||
|
||||
-- inputBind("enter", INPUT_ACTION_ACCEPT)
|
||||
-- inputBind("e", INPUT_ACTION_ACCEPT)
|
||||
inputBind("enter", INPUT_ACTION_ACCEPT)
|
||||
inputBind("e", INPUT_ACTION_ACCEPT)
|
||||
|
||||
-- inputBind("q", INPUT_ACTION_CANCEL)
|
||||
inputBind("q", INPUT_ACTION_CANCEL)
|
||||
|
||||
-- inputBind("escape", INPUT_ACTION_RAGEQUIT)
|
||||
-- end
|
||||
inputBind("escape", INPUT_ACTION_RAGEQUIT)
|
||||
end
|
||||
|
||||
-- if INPUT_POINTER then
|
||||
-- inputBind("mouse_x", INPUT_ACTION_POINTERX)
|
||||
-- inputBind("mouse_y", INPUT_ACTION_POINTERY)
|
||||
-- end
|
||||
-- end
|
||||
if INPUT_POINTER then
|
||||
inputBind("mouse_x", INPUT_ACTION_POINTERX)
|
||||
inputBind("mouse_y", INPUT_ACTION_POINTERY)
|
||||
end
|
||||
end
|
||||
|
||||
-- sceneSet('scene/minesweeper.lua')
|
||||
sceneSet('scene/minesweeper.lua')
|
||||
@@ -183,24 +183,30 @@ function sceneRender()
|
||||
camera.bottom = screenGetHeight()
|
||||
camera.right = screenGetWidth()
|
||||
|
||||
spriteBatchPush(
|
||||
nil,
|
||||
0, 0, 32, 32,
|
||||
colorBlue()
|
||||
)
|
||||
|
||||
-- Update mouse position
|
||||
if INPUT_POINTER then
|
||||
mouseX = inputGetValue(INPUT_ACTION_POINTERX) * screenGetWidth()
|
||||
mouseY = inputGetValue(INPUT_ACTION_POINTERY) * screenGetHeight()
|
||||
-- if INPUT_POINTER then
|
||||
-- mouseX = inputGetValue(INPUT_ACTION_POINTERX) * screenGetWidth()
|
||||
-- mouseY = inputGetValue(INPUT_ACTION_POINTERY) * screenGetHeight()
|
||||
|
||||
-- Draw cursor
|
||||
spriteBatchPush(
|
||||
nil,
|
||||
mouseX - 2, mouseY - 2,
|
||||
mouseX + 2, mouseY + 2,
|
||||
colorRed(),
|
||||
0, 0,
|
||||
1, 1
|
||||
)
|
||||
end
|
||||
-- -- Draw cursor
|
||||
-- spriteBatchPush(
|
||||
-- nil,
|
||||
-- mouseX - 2, mouseY - 2,
|
||||
-- mouseX + 2, mouseY + 2,
|
||||
-- colorRed(),
|
||||
-- 0, 0,
|
||||
-- 1, 1
|
||||
-- )
|
||||
-- end
|
||||
|
||||
|
||||
textDraw(10, 10, "Hello World")
|
||||
-- textDraw(10, 10, "Hello World")
|
||||
|
||||
-- centerX = math.floor(screenGetWidth() / 2)
|
||||
-- centerY = math.floor(screenGetHeight() / 2)
|
||||
|
||||
Reference in New Issue
Block a user