Added Parse cloud code example to project.
Added Parse to project. Created OnlineGameService Java object and wrapper C++ class to manage communication with Parse (via cloud code).
Replaced old OnlineGameService and OnlineGameRequest classes with OnlineGameClient. OnlineGameClient uses the Parse REST API directly to make cloud function calls and retrieve the function result as JSON. Added AndroidAsyncHTTP library to project.
OnlineGameClient now returns request result for errors, if set. Added stub code for user authentication.
OnlineGameClient now only polls for responses if there is at least one open request.
Basic GameState management. Added rapidjson library to project.
Added GameStateManager to project. Moved main game code into GameplayState class. The Game now maintains its own Database of GameData. Made Record an internal class of the template class Table. Subclasses of Table are now expected to extend Table< TableType, RecordType >, which must inherit from Table< TableType, RecordType >::Record. Table now keeps track of a table name and record name, which it uses as tag names when parsing XML files. Added MAGE_AUTO_GENERATE_TABLE_NAME macro to automatically generate a table name and record name from a class name (e.g. "TerrainTypes" and "TerrainType" for a table storing the TerrainType class). Game data is now loaded from a single XML file ("Data.xml") that stores all game data, separated by data type. XmlReader now has LoadFile() and LoadData() functions for parsing either a file or a C-string. Added MAGE_IMPLEMENT_RTTI_BASE macro for defining an RTTI object that has no superclass. Object now uses MAGE_IMPLEMENT_RTTI_BASE to declare its own RTTI info. Capitalized all functions of OnlineGameClient.
Created template Callback class that can be used to define function parameters accepting a function pointer or lambda expression matching a specific signature (replacing the functionality of std::function, which is not supported by stl-port on Android). OnlineGameClient requests now take a single (optional) RequestCallback parameter that fires when the request finishes, if specified.
Fixed header include problem with OnlineGameClient and Callback.h, which was causing compilation in GameplayState to fail.
Refactored OnlineGameClient to allow sending both GET and POST requests, as necessary. SendGetRequest() accepts an OnlineRequestParameters object (a.k.a. std::vector< std::pair< std::string, std::string > >) to allow sending URL-encoded parameters. Fixed JNI reference getting cleaned up too early due to multiple functions calling javaVM->DetachCurrentThread(). Created JNI wrapper class to facilitate JNIEnv usage while preventing premature detachment from the Java thread.
Added simple example to create a matchmaking game.
Added example that creates a game request on the AndroidWarsOnline service. The cloud service now runs a background job to create games from pending game requests issued by different players. Added a cloud function to retrieve the list of current games for the logged-in user.
Created widget and art for Main Menu login screen. Added functions for displaying and hiding the Android keyboard to MainActivity.
Added InputState system for managing state within a GameState. User can now log in and out using the user interface. Widgets can now be loaded from XML or from a Dictionary.
User can request the list of current games from the online service from the dashboard and log out (sending him back to the login screen).
Added convenience functions for parsing JSON values.
Major overhaul of Widget system (still in progress). All Widgets now created through WidgetManager class. Widgets can be loaded either from XML or a Dictionary. WidgetManagers can create Widgets using a class name. Factories can be registered with a WidgetManager that will be called when a Widget is created from its class name. Widgets can be resized or repositioned, and will automatically update the position of their children. Getting the position of a Widget can cause the bounds of several Widgets to be recalculated before returning an answer, and thus the bounds of each Widget are always up-to-date when needed.
Defined methods for loading Widget templates.
WidgetManager now loads WidgetTemplates when loading a theme. WidgetTemplates have properties and children (i.e. sub-templates) that can be set, cleared, and merged.
Widgets now load themselves from properties specified in a WidgetTemplate. Added draw layer and draw sorting system for Widgets. Changed how pointer events behave for widgets. Graphic now has several draw modes that determine how it behaves.