This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------// | |
void MOAITouchSensor::HandleEvent ( ZLStream& eventStream ) { | |
u32 eventType = eventStream.Read < u32 >( 0 ); | |
if ( eventType == TOUCH_CANCEL ) { | |
this->Clear (); | |
if ( this->mCallback && this->mAcceptCancel ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOAISim.openWindow ( "test", 1536, 2048 ) | |
viewport = MOAIViewport.new () | |
viewport:setSize ( 1536, 2048 ) | |
viewport:setScale ( 1536, 2048 ) | |
layerMesh = MOAILayer.new () | |
layerMesh:setViewport ( viewport ) | |
layerMesh:setSortMode ( MOAILayer.SORT_NONE ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
-- src/layout/quest_dialog.lua | |
-- | |
-- WARNING: Do not edit! | |
-- This file is auto generated, all changes will be lost. | |
-------------------------------------------------------------------------------- | |
local Button = Gui.Button | |
local Sprite = Display.Sprite | |
local Group = Display.Group | |
local Label = Display.Label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
-- JsonStorageEngine.lua | |
-- | |
-- Store lua tables as json documents | |
-------------------------------------------------------------------------------- | |
local JsonStorageEngine = {} | |
JsonStorageEngine.DOCUMENTS_DIR = MOAIEnvironment.documentDirectory or 'docs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TracebackHandler = function(err) | |
local err = err or '' | |
local task = MOAIHttpTask.new() | |
local str = STP and STP.stacktrace() or debug.traceback() | |
local trace = err .. '\n' .. str | |
local params = {} | |
params.err = err | |
params.error = trace | |
params.os = MOAIEnvironment.osBrand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <moai-core/host.h> | |
#include <moai-android/moaiext-jni.h> | |
#include <jni.h> | |
#include "game_script.h" | |
#include "crash_handler.h" | |
void AKURunGame () { | |
AKULoadFuncFromBuffer ( crash_handler, crash_handler_SIZE, AKU_DATA_STRING, AKU_DATA_ZIPPED ); | |
AKUCallFunc (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include $(CLEAR_VARS) | |
LOCAL_C_INCLUDES := $(LOCAL_PATH) | |
LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include | |
LOCAL_MODULE := game | |
LOCAL_SRC_FILES := game.cpp | |
LOCAL_SHARED_LIBRARIES := moai | |
include $(BUILD_SHARED_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
-- DynamicTexturePack.lua | |
-- | |
-- | |
-------------------------------------------------------------------------------- | |
local DynamicTexturePack = class() | |
local Page = class() | |
local MAX_SIZE = MOAIGfxDevice.getMaxTextureSize() or 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ResourceMgr:loadTable(filePath) | |
local tbl = assert(loadfile(filePath)) | |
setfenv(tbl, {}) | |
return tbl() | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ResourceMgr:initAtlasDeck(luaFilePath) | |
local atlas = self:loadTable(luaFilePath) | |
local frames = atlas.frames | |
local deck = MOAIGfxQuadDeck2D.new() | |
local boundsDeck = MOAIBoundsDeck.new() | |
deck:setBoundsDeck(boundsDeck) | |
deck.boundsDeck = boundsDeck | |
boundsDeck:reserveBounds(#frames) |
OlderNewer