Browse Source

new example

Denis Muratshin 12 years ago
parent
commit
5847e20624
62 changed files with 325 additions and 1632 deletions
  1. 2 2
      .hg_archival.txt
  2. 2 0
      .hgignore
  3. BIN
      doc.zip
  4. 1 1
      examples/CMakeLists.txt
  5. 1 0
      examples/Demo/src/TestUserShader.h
  6. 11 0
      examples/Game/CMakeLists.txt
  7. 1 1
      examples/Game/part1/data/app.icf
  8. 7 7
      examples/Game/part1/data/development.icf
  9. BIN
      examples/Game/part1/data/images/finger.png
  10. BIN
      examples/Game/part1/data/images/joystick.png
  11. BIN
      examples/Game/part1/data/images/ship.png
  12. BIN
      examples/Game/part1/data/images/shipengine.png
  13. BIN
      examples/Game/part1/data/images/sky.jpg
  14. 7 0
      examples/Game/part1/data/xmls/res.xml
  15. 14 0
      examples/Game/part1/data/xmls/ui.xml
  16. 3 3
      examples/Game/part1/game.mkb
  17. 30 0
      examples/Game/part1/src/Game.cpp
  18. 22 0
      examples/Game/part1/src/Game.h
  19. 56 0
      examples/Game/part1/src/Joystick.cpp
  20. 19 0
      examples/Game/part1/src/Joystick.h
  21. 36 0
      examples/Game/part1/src/Player.cpp
  22. 16 0
      examples/Game/part1/src/Player.h
  23. 21 0
      examples/Game/part1/src/Unit.cpp
  24. 21 0
      examples/Game/part1/src/Unit.h
  25. 0 0
      examples/Game/part1/src/entry_point.cpp
  26. 27 0
      examples/Game/part1/src/example.cpp
  27. 0 0
      examples/Game/part1/src/example.h
  28. 17 0
      examples/Game/part1/src/res.cpp
  29. 10 0
      examples/Game/part1/src/res.h
  30. 0 1
      examples/GameTemplate/.oxbuild
  31. 0 31
      examples/GameTemplate/CMakeLists.txt
  32. 0 295
      examples/GameTemplate/data/fonts/main24.fnt
  33. BIN
      examples/GameTemplate/data/fonts/main24_0.png
  34. BIN
      examples/GameTemplate/data/images/bg/bg_hd.jpg
  35. BIN
      examples/GameTemplate/data/images/button.png
  36. BIN
      examples/GameTemplate/data/images/go.png
  37. 0 32
      examples/GameTemplate/data/strings_en_GB.xml
  38. 0 29
      examples/GameTemplate/data/strings_ru_RU.xml
  39. 0 16
      examples/GameTemplate/data/xmls/res.xml
  40. 0 1
      examples/GameTemplate/prepare_res.bat
  41. 0 9
      examples/GameTemplate/readme.txt
  42. 0 114
      examples/GameTemplate/src/GameActor.cpp
  43. 0 38
      examples/GameTemplate/src/GameActor.h
  44. 0 73
      examples/GameTemplate/src/GameMenu.cpp
  45. 0 36
      examples/GameTemplate/src/GameMenu.h
  46. 0 58
      examples/GameTemplate/src/GameResult.cpp
  47. 0 24
      examples/GameTemplate/src/GameResult.h
  48. 0 157
      examples/GameTemplate/src/MainMenu.cpp
  49. 0 56
      examples/GameTemplate/src/MainMenu.h
  50. 0 66
      examples/GameTemplate/src/Modal.cpp
  51. 0 34
      examples/GameTemplate/src/Modal.h
  52. 0 43
      examples/GameTemplate/src/ModalActor.cpp
  53. 0 24
      examples/GameTemplate/src/ModalActor.h
  54. 0 103
      examples/GameTemplate/src/Options.cpp
  55. 0 36
      examples/GameTemplate/src/Options.h
  56. 0 142
      examples/GameTemplate/src/OptionsMenu.cpp
  57. 0 35
      examples/GameTemplate/src/OptionsMenu.h
  58. 0 78
      examples/GameTemplate/src/example.cpp
  59. 0 73
      examples/GameTemplate/src/shared.cpp
  60. 0 13
      examples/GameTemplate/src/shared.h
  61. BIN
      examples/GameTemplate/visual_profiler.png
  62. 1 1
      tools/others/build_oxygine_zip.py

+ 2 - 2
.hg_archival.txt

@@ -1,5 +1,5 @@
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: 7f5aaebb97cd72bedfe0f0a34eb9d8b56538b978
+node: a35e9abd419682e02adde7ffb9bd3fa9e79b53fa
 branch: default
 latesttag: oldrender
-latesttagdistance: 68
+latesttagdistance: 70

+ 2 - 0
.hgignore

@@ -86,5 +86,7 @@ examples/Demo/win32/My Inspector XE Results *
 examples/DemoBox2D/build_box2d_vc11/
 examples/Demo/build_demo_vc11/
 examples/TutorialResources/build_tutorialresources_vc10
+examples/Game/part1/build_game_vc
+examples/Game/part1/build_game_vc10/
 syntax: regexp
 ^build/

BIN
doc.zip


+ 1 - 1
examples/CMakeLists.txt

@@ -11,6 +11,6 @@ link_directories(${OXYGINE_LIBRARY_DIRS})
 add_subdirectory(Demo)
 add_subdirectory(HelloWorld)
 add_subdirectory(Match3)
-add_subdirectory(GameTemplate)
+add_subdirectory(Game)
 add_subdirectory(DemoBox2D)
 add_subdirectory(TutorialResources)

+ 1 - 0
examples/Demo/src/TestUserShader.h

@@ -110,6 +110,7 @@ public:
 
 	~TestUserShader()
 	{
+		delete _shaderInvert;
 		delete _shaderMono;
 		delete _shaderAddColor;
 	}

+ 11 - 0
examples/Game/CMakeLists.txt

@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 2.6)
+project (Game)
+
+file(GLOB_RECURSE PART1SRC
+		part1/src/*.cpp
+		part1/src/*.h)
+
+add_executable(GamePart1
+	${PART1SRC})
+
+target_link_libraries(GamePart1 ${OXYGINE_CORE_LIBS})

+ 1 - 1
examples/GameTemplate/data/app.icf → examples/Game/part1/data/app.icf

@@ -1,6 +1,6 @@
 [S3E]
 MemSize = 64777216
-DispFixRot=2
+DispFixRot=Landscape
 SysGlesVersion=2
 SysStackSize=131072
 

+ 7 - 7
examples/GameTemplate/data/development.icf → examples/Game/part1/data/development.icf

@@ -1,14 +1,14 @@
 # Settings ICF file automatically generated by S3E development environment
 
 AccelEnabled                   = Type=bool, Default="true", Value = "true"
-AudioAAC                       = Type=bool, Default="false", Value = "true"
-AudioAACPlus                   = Type=bool, Default="false", Value = "true"
+AudioAAC                       = Type=bool, Default="false", Value = "false"
+AudioAACPlus                   = Type=bool, Default="false", Value = "false"
 AudioMIDI                      = Type=bool, Default="true", Value = "true"
 AudioMP3                       = Type=bool, Default="true", Value = "true"
 AudioPCM                       = Type=bool, Default="true", Value = "true"
-AudioQCP                       = Type=bool, Default="false", Value = "true"
+AudioQCP                       = Type=bool, Default="false", Value = "false"
 AudioVolumeDefault             = Type=int, Min=0.000000, Max=256.000000, Default="256", Value = "256"
-BacklightTimeout               = Type=int, Min=0.000000, Max=120000.000000, Default="10000", Value = "100000"
+BacklightTimeout               = Type=int, Min=0.000000, Max=120000.000000, Default="10000", Value = "10000"
 CompassEnabled                 = Type=bool, Default="true", Value = "true"
 ContactsFromAddrBook           = Type=bool, Default="false", Value = "false"
 DeviceAdvanceSoftkeyPosition   = Type=string, Allowed="Bottom Left" "Bottom Right" "Top Right" "Top Left", Default="Bottom Left", Value = "Bottom Left"
@@ -25,7 +25,7 @@ DeviceLSKIsBack                = Type=bool, Default="false", Value = "false"
 DeviceLanguage                 = Type=string, Allowed="UNKNOWN" "ENGLISH" "FRENCH" "GERMAN" "SPANISH" "ITALIAN" "PORTUGUESE" "DUTCH" "TURKISH" "CROATIAN" "CZECH" "DANISH" "FINNISH" "HUNGARIAN" "NORWEGIAN" "POLISH" "RUSSIAN" "SERBIAN" "SLOVAK" "SLOVENIAN" "SWEDISH" "UKRAINIAN" "GREEK" "JAPANESE" "SIMPL_CHINESE" "TRAD_CHINESE" "KOREAN" "ICELANDIC" "FLEMISH" "THAI" "AFRIKAANS" "ALBANIAN" "AMHARIC" "ARABIC" "ARMENIAN" "AZERBAIJANI" "TAGALOG" "BELARUSSIAN" "BENGALI" "BULGARIAN" "BURMESE" "CATALAN" "ESTONIAN" "FARSI" "GAELIC" "GEORGIAN" "GUJARATI" "HEBREW" "HINDI" "INDONESIAN" "IRISH" "KANNADA" "KAZAKH" "KHMER" "LAO" "LATVIAN" "LITHUANIAN" "MACEDONIAN" "MALAY" "MALAYALAM" "MARATHI" "MOLDOVIAN" "MONGOLIAN" "PUNJABI" "ROMANIAN" "SINHALESE" "SOMALI" "SWAHILI" "TAJIK" "TAMIL" "TELUGU" "TIBETAN" "TIGRINYA" "TURKMEN" "URDU" "UZBEK" "VIETNAMESE" "WELSH" "ZULU" "<Use Native Language>", Default="<Use Native Language>", Value = "<Use Native Language>"
 DeviceMainsPower               = Type=bool, Default="false", Value = "false"
 DeviceName                     = Type=string, Default="My Computer", Value = "My Computer"
-DeviceOS                       = Type=string, Allowed="NONE" "SYMBIAN" "BREW" "WINDOWS" "WINMOBILE" "LINUX" "WIPI" "NDS" "ARM_SEMIH" "NUCLEUS" "NGI" "WINCE" "SHARPEMP" "OSX" "IPHONE" "UIQ" "PS3" "X360" "BADA" "ANDROID" "WEBOS" "QNX", Default="NONE", Value = "NONE"
+DeviceOS                       = Type=string, Allowed="NONE" "SYMBIAN" "BREW" "WINDOWS" "WINMOBILE" "LINUX" "WIPI" "NDS" "ARM_SEMIH" "NUCLEUS" "NGI" "WINCE" "SHARPEMP" "OSX" "IPHONE" "UIQ" "PS3" "X360" "ANDROID" "WEBOS" "QNX", Default="NONE", Value = "NONE"
 DeviceOSVersion                = Type=string, Default="", Value = ""
 DeviceOSVersionNumber          = Type=int, Default="0", Value = "0"
 DevicePhoneNumber              = Type=string, Default="0044123456789", Value = "0044123456789"
@@ -36,7 +36,7 @@ DeviceUniqueIDInt              = Type=int, Default="01234567890", Value = "01234
 FileTotalStorageSize           = Type=int, Min=0.000000, Max=2147483648.000000, Default="67108864", Value = "67108864"
 FileUseSeparateRomRam          = Type=bool, Default="true", Value = "true"
 FileUseTotalStorageSize        = Type=bool, Default="false", Value = "false"
-GLAPI                          = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
+GLAPI                          = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE" "GLES 2.0 ANGLE DirectX 11", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
 GLDontUseHiddenWindow          = Type=bool, Default="false", Value = "false"
 GLTerminateOnSuspend           = Type=bool, Default="false", Value = "false"
 GLUsePVRVFrame                 = Type=bool, Default="false", Value = "false"
@@ -101,7 +101,7 @@ TimerAccuracy                  = Type=int, Min=0.000000, Max=1000.000000, Defaul
 TimerHiRes                     = Type=bool, Default="false", Value = "false"
 TimerLocaltimeOffsetHours      = Type=string, Allowed="-12" "-11" "-10" "-9" "-8" "-7" "-6" "-5" "-4" "-3" "-2" "-1" "0" "+1" "+2" "+3" "+4" "+5" "+6" "+7" "+8" "+9" "+10" "+11" "+12" "+13" "SYSTEM", Default="SYSTEM", Value = "SYSTEM"
 VibraEnabled                   = Type=bool, Default="true", Value = "true"
-Video3GPP                      = Type=bool, Default="false", Value = "true"
+Video3GPP                      = Type=bool, Default="false", Value = "false"
 VideoJPEG                      = Type=bool, Default="true", Value = "true"
 VideoMPEG4                     = Type=bool, Default="true", Value = "true"
 VideoVolumeDefault             = Type=int, Min=0.000000, Max=256.000000, Default="256", Value = "256"

BIN
examples/Game/part1/data/images/finger.png


BIN
examples/Game/part1/data/images/joystick.png


BIN
examples/Game/part1/data/images/ship.png


BIN
examples/Game/part1/data/images/shipengine.png


BIN
examples/Game/part1/data/images/sky.jpg


+ 7 - 0
examples/Game/part1/data/xmls/res.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<resources>
+	<set path = "images" />
+	<atlas>
+		<image file="controller.png" />
+	</atlas>
+</resources>

+ 14 - 0
examples/Game/part1/data/xmls/ui.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<resources>
+	<set path = "images" />
+	<atlas>
+		<image file="joystick.png" />
+		<image file="finger.png" />
+	</atlas>
+
+	<atlas>
+		<image file="sky.jpg" />
+		<image file="ship.png" />
+		<image file="shipengine.png" />
+	</atlas>
+</resources>

+ 3 - 3
examples/GameTemplate/GameTemplate.mkb → examples/Game/part1/game.mkb

@@ -2,8 +2,8 @@
 
 options
 {
-	module_path="../../oxygine/marmalade/"
-	enable-exceptions=1	
+	module_path="../../../oxygine/marmalade/"
+	enable-exceptions=1
 }
 
 includepath src
@@ -19,7 +19,7 @@ files
 subprojects
 {
 	oxygine-framework
-	iwgl
+	iwgl 
 }
 
 assets

+ 30 - 0
examples/Game/part1/src/Game.cpp

@@ -0,0 +1,30 @@
+#include "Game.h"
+#include "Joystick.h"
+#include "Player.h"
+#include "res.h"
+
+Game::Game()
+{
+	
+}
+
+void Game::init()
+{
+	setSize(getRoot()->getSize());
+
+	spSprite sky = new Sprite;
+	sky->setResAnim(res::ui.getResAnim("sky"));
+	sky->attachTo(this);
+	
+	_player = new Player;
+	_player->init(this);
+
+	_move = new Joystick;
+	_move->attachTo(this);
+	_move->setY(getHeight() - _move->getHeight());
+}
+
+void Game::doUpdate(const UpdateState &us)
+{
+	_player->update(us);
+}

+ 22 - 0
examples/Game/part1/src/Game.h

@@ -0,0 +1,22 @@
+#pragma once
+#include "oxygine-framework.h"
+using namespace oxygine;
+
+DECLARE_SMART(Player, spPlayer);
+DECLARE_SMART(Joystick, spJoystick);
+DECLARE_SMART(Game, spGame);
+class Game: public Actor
+{
+public:
+	Game();
+
+	void init();
+
+private:
+	friend class Player;
+	void doUpdate(const UpdateState &us);
+
+	spJoystick _move;
+
+	spPlayer _player;
+};

+ 56 - 0
examples/Game/part1/src/Joystick.cpp

@@ -0,0 +1,56 @@
+#include "Joystick.h"
+#include "res.h"
+
+Joystick::Joystick():_pressed(false), _dir(0,0)
+{
+	setResAnim(res::ui.getResAnim("joystick"));
+	setAlpha(128);
+
+	addEventListener(TouchEvent::TOUCH_DOWN, CLOSURE(this, &Joystick::onEvent));
+	addEventListener(TouchEvent::TOUCH_UP, CLOSURE(this, &Joystick::onEvent));
+	addEventListener(TouchEvent::MOVE, CLOSURE(this, &Joystick::onEvent));
+
+	_finger = new Sprite;
+	_finger->setResAnim(res::ui.getResAnim("finger"));
+	_finger->attachTo(this);
+	_finger->setVisible(false);
+	_finger->setAnchor(Vector2(0.5f, 0.5f));
+	_finger->setInputEnabled(false);
+}
+
+void Joystick::onEvent(Event *ev)
+{
+	TouchEvent *te = safeCast<TouchEvent *>(ev);
+	if (te->type == TouchEvent::TOUCH_DOWN)
+	{
+		_finger->setVisible(true);
+		setColor(Color::Red);
+		_pressed = true;
+	}
+
+	if (te->type == TouchEvent::TOUCH_UP)
+	{
+		_finger->setVisible(false);
+		setColor(Color::White);
+		_pressed = false;
+	}
+
+	Vector2 center = getSize()/2;
+	_dir = te->localPosition - center;
+
+	if (_dir.length() > 100)
+		_dir.normalizeTo(100);
+
+	_finger->setPosition(center + _dir);
+
+	if (!_pressed)
+	{
+		_dir = Vector2(0,0);
+	}
+}
+
+bool Joystick::getDirection(Vector2 &dir) const
+{
+	dir = _dir;
+	return _pressed;
+}

+ 19 - 0
examples/Game/part1/src/Joystick.h

@@ -0,0 +1,19 @@
+#pragma once
+#include "oxygine-framework.h"
+using namespace oxygine;
+
+DECLARE_SMART(Joystick, spController);
+class Joystick: public Sprite
+{
+public:
+	Joystick();
+	
+	bool getDirection(Vector2 &dir) const;
+
+private:
+	void onEvent(Event *ev);
+	bool _pressed;
+	Vector2 _dir;
+
+	spSprite _finger;
+};

+ 36 - 0
examples/Game/part1/src/Player.cpp

@@ -0,0 +1,36 @@
+#include "Player.h"
+#include "Game.h"
+#include "res.h"
+#include "Joystick.h"
+
+void Player::_init()
+{
+	_view->setPosition(_game->getSize()/2);
+
+	_ship = new Sprite;
+	_ship->setResAnim(res::ui.getResAnim("ship"));
+	_ship->attachTo(_view);
+	_ship->setAnchor(Vector2(0.5f, 0.5f));
+
+	_engine = new Sprite;
+	_engine->setResAnim(res::ui.getResAnim("shipengine"));
+	_engine->attachTo(_ship);
+	_engine->addTween(Sprite::TweenColor(Color::Red), 500, -1, true);
+	_engine->setVisible(false);
+}
+
+void Player::_update(const UpdateState &us)
+{
+	_engine->setVisible(false);
+	Vector2 dir;
+	if (_game->_move->getDirection(dir))
+	{
+		Vector2 pos = _view->getPosition();
+		float angle = atan2f(dir.y, dir.x);
+		_view->setRotation(angle);
+		pos = pos + dir * (us.dt / 1000.0f) * 5;
+		_view->setPosition(pos);
+
+		_engine->setVisible(true);
+	}
+}

+ 16 - 0
examples/Game/part1/src/Player.h

@@ -0,0 +1,16 @@
+#pragma once
+#include "Unit.h"
+
+DECLARE_SMART(Player, spPlayer);
+class Player: public Unit
+{
+public:
+
+	
+protected:
+	void _init();
+	void _update(const UpdateState &us);
+
+	spSprite _engine;	
+	spSprite _ship;	
+};

+ 21 - 0
examples/Game/part1/src/Unit.cpp

@@ -0,0 +1,21 @@
+#include "Unit.h"
+#include "Game.h"
+
+Unit::Unit():_game(0)
+{
+
+}
+
+void Unit::init(Game *game)
+{
+	_game = game;
+	_view = new Actor;
+	_view->attachTo(game);
+
+	_init();
+}
+
+void Unit::update(const UpdateState &us)
+{
+	_update(us);
+}

+ 21 - 0
examples/Game/part1/src/Unit.h

@@ -0,0 +1,21 @@
+#pragma once
+#include "oxygine-framework.h"
+using namespace oxygine;
+
+class Game;
+class Unit: public Object
+{
+public:
+	Unit();
+
+	void init(Game *game);
+
+	void update(const UpdateState &us);
+
+protected:
+	virtual void _init(){}
+	virtual void _update(const UpdateState &us){}
+
+	spActor _view;
+	Game *_game;
+};

+ 0 - 0
examples/GameTemplate/src/entry_point.cpp → examples/Game/part1/src/entry_point.cpp


+ 27 - 0
examples/Game/part1/src/example.cpp

@@ -0,0 +1,27 @@
+#include "oxygine-framework.h"
+#include "res.h"
+#include "Game.h"
+using namespace oxygine;
+
+void example_preinit()
+{
+}
+
+void example_init()
+{
+	res::load();
+	
+	spGame game = new Game;
+	game->init();
+	game->attachTo(getRoot());
+}
+
+void example_update()
+{
+	
+}
+
+void example_destroy()
+{
+	res::free();
+}

+ 0 - 0
examples/GameTemplate/src/example.h → examples/Game/part1/src/example.h


+ 17 - 0
examples/Game/part1/src/res.cpp

@@ -0,0 +1,17 @@
+#include "res.h"
+
+namespace res
+{
+	Resources ui;
+
+	void load()
+	{
+		ui.loadXML("xmls/ui.xml");
+	}
+
+	void free()
+	{
+		ui.free();
+
+	}
+}

+ 10 - 0
examples/Game/part1/src/res.h

@@ -0,0 +1,10 @@
+#pragma once
+#include "oxygine-framework.h"
+using namespace oxygine;
+
+namespace res
+{
+	extern Resources ui;
+	void load();
+	void free();
+}

+ 0 - 1
examples/GameTemplate/.oxbuild

@@ -1 +0,0 @@
-GameTemplate_src.mkb

+ 0 - 31
examples/GameTemplate/CMakeLists.txt

@@ -1,31 +0,0 @@
-cmake_minimum_required (VERSION 2.6)
-project (GAMETEMPLATE)
-
-
-file(GLOB SRC
-	src/entry_point.cpp
-	src/example.cpp
-	src/example.h
-	src/GameActor.cpp
-	src/GameActor.h
-	src/GameMenu.cpp
-	src/GameMenu.h
-	src/GameResult.cpp
-	src/GameResult.h
-	src/MainMenu.cpp
-	src/MainMenu.h
-	src/Modal.cpp
-	src/Modal.h
-	src/ModalActor.cpp
-	src/ModalActor.h
-	src/Options.cpp
-	src/Options.h
-	src/OptionsMenu.cpp
-	src/OptionsMenu.h
-	src/shared.cpp
-	src/shared.h
-	)
-
-add_executable(GameTemplate ${SRC})
-
-target_link_libraries(GameTemplate ${OXYGINE_CORE_LIBS})

+ 0 - 295
examples/GameTemplate/data/fonts/main24.fnt

@@ -1,295 +0,0 @@
-<?xml version="1.0"?>
-<font>
-  <info face="Century Gothic" size="-24" bold="1" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
-  <common lineHeight="28" base="23" scaleW="512" scaleH="256" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>
-  <pages>
-    <page id="0" file="main24_0.png" />
-  </pages>
-  <chars count="285">
-    <char id="32" x="509" y="110" width="1" height="1" xoffset="0" yoffset="23" xadvance="7" page="0" chnl="15" />
-    <char id="33" x="506" y="77" width="4" height="17" xoffset="1" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="34" x="55" y="134" width="8" height="6" xoffset="0" yoffset="6" xadvance="9" page="0" chnl="15" />
-    <char id="35" x="44" y="84" width="13" height="17" xoffset="0" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="36" x="500" y="0" width="11" height="21" xoffset="0" yoffset="5" xadvance="13" page="0" chnl="15" />
-    <char id="37" x="486" y="22" width="20" height="18" xoffset="1" yoffset="6" xadvance="21" page="0" chnl="15" />
-    <char id="38" x="471" y="61" width="14" height="17" xoffset="1" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="39" x="64" y="134" width="3" height="6" xoffset="1" yoffset="6" xadvance="5" page="0" chnl="15" />
-    <char id="40" x="247" y="0" width="7" height="23" xoffset="1" yoffset="5" xadvance="9" page="0" chnl="15" />
-    <char id="41" x="239" y="0" width="7" height="23" xoffset="1" yoffset="5" xadvance="9" page="0" chnl="15" />
-    <char id="42" x="474" y="111" width="10" height="9" xoffset="0" yoffset="6" xadvance="11" page="0" chnl="15" />
-    <char id="43" x="462" y="111" width="11" height="11" xoffset="1" yoffset="9" xadvance="14" page="0" chnl="15" />
-    <char id="44" x="48" y="134" width="6" height="7" xoffset="0" yoffset="19" xadvance="7" page="0" chnl="15" />
-    <char id="45" x="118" y="133" width="6" height="3" xoffset="2" yoffset="15" xadvance="10" page="0" chnl="15" />
-    <char id="46" x="103" y="133" width="4" height="4" xoffset="1" yoffset="19" xadvance="7" page="0" chnl="15" />
-    <char id="47" x="101" y="24" width="10" height="21" xoffset="0" yoffset="6" xadvance="11" page="0" chnl="15" />
-    <char id="48" x="170" y="83" width="12" height="17" xoffset="0" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="49" x="169" y="101" width="6" height="17" xoffset="2" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="50" x="339" y="80" width="11" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="51" x="209" y="82" width="12" height="17" xoffset="0" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="52" x="326" y="80" width="12" height="17" xoffset="0" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="53" x="459" y="79" width="11" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="54" x="33" y="102" width="10" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="55" x="435" y="79" width="11" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="56" x="274" y="82" width="12" height="17" xoffset="0" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="57" x="22" y="103" width="10" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="58" x="432" y="111" width="4" height="13" xoffset="1" yoffset="10" xadvance="7" page="0" chnl="15" />
-    <char id="59" x="211" y="100" width="6" height="16" xoffset="0" yoffset="10" xadvance="7" page="0" chnl="15" />
-    <char id="60" x="483" y="79" width="11" height="17" xoffset="1" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="61" x="485" y="111" width="11" height="8" xoffset="1" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="62" x="423" y="79" width="11" height="17" xoffset="1" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="63" x="411" y="80" width="11" height="17" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="64" x="192" y="64" width="18" height="17" xoffset="0" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="65" x="230" y="64" width="17" height="17" xoffset="0" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="66" x="399" y="80" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="67" x="248" y="64" width="17" height="17" xoffset="1" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="68" x="15" y="85" width="14" height="17" xoffset="2" yoffset="6" xadvance="17" page="0" chnl="15" />
-    <char id="69" x="96" y="101" width="9" height="17" xoffset="2" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="70" x="66" y="102" width="9" height="17" xoffset="2" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="71" x="97" y="65" width="18" height="17" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="72" x="222" y="82" width="12" height="17" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="73" x="184" y="101" width="3" height="17" xoffset="2" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="74" x="126" y="101" width="9" height="17" xoffset="1" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="75" x="86" y="83" width="13" height="17" xoffset="2" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="76" x="145" y="101" width="8" height="17" xoffset="2" yoffset="6" xadvance="11" page="0" chnl="15" />
-    <char id="77" x="388" y="44" width="21" height="17" xoffset="0" yoffset="6" xadvance="22" page="0" chnl="15" />
-    <char id="78" x="486" y="60" width="14" height="17" xoffset="2" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="79" x="211" y="64" width="18" height="17" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="80" x="495" y="78" width="10" height="17" xoffset="2" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="81" x="0" y="48" width="19" height="18" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="82" x="261" y="82" width="12" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="83" x="55" y="102" width="10" height="17" xoffset="1" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="84" x="86" y="101" width="9" height="17" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
-    <char id="85" x="471" y="79" width="11" height="17" xoffset="2" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="86" x="266" y="64" width="17" height="17" xoffset="0" yoffset="6" xadvance="17" page="0" chnl="15" />
-    <char id="87" x="340" y="44" width="23" height="17" xoffset="-1" yoffset="6" xadvance="22" page="0" chnl="15" />
-    <char id="88" x="495" y="41" width="16" height="17" xoffset="0" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="89" x="439" y="61" width="15" height="17" xoffset="0" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="90" x="11" y="103" width="10" height="17" xoffset="1" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="91" x="275" y="0" width="5" height="23" xoffset="2" yoffset="5" xadvance="8" page="0" chnl="15" />
-    <char id="92" x="54" y="24" width="11" height="21" xoffset="2" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="93" x="269" y="0" width="5" height="23" xoffset="0" yoffset="5" xadvance="8" page="0" chnl="15" />
-    <char id="94" x="100" y="119" width="13" height="13" xoffset="1" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="95" x="136" y="133" width="12" height="1" xoffset="0" yoffset="25" xadvance="12" page="0" chnl="15" />
-    <char id="96" x="81" y="134" width="7" height="5" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
-    <char id="97" x="86" y="119" width="13" height="13" xoffset="1" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="98" x="114" y="83" width="13" height="17" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="99" x="210" y="117" width="12" height="13" xoffset="2" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="100" x="100" y="83" width="13" height="17" xoffset="1" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="101" x="72" y="120" width="13" height="13" xoffset="1" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="102" x="162" y="101" width="6" height="17" xoffset="1" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="103" x="92" y="46" width="13" height="18" xoffset="1" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="104" x="375" y="80" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="105" x="282" y="45" width="3" height="18" xoffset="1" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="106" x="255" y="0" width="6" height="23" xoffset="-1" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="107" x="72" y="83" width="13" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="108" x="176" y="101" width="3" height="17" xoffset="1" yoffset="6" xadvance="6" page="0" chnl="15" />
-    <char id="109" x="384" y="98" width="19" height="13" xoffset="2" yoffset="10" xadvance="23" page="0" chnl="15" />
-    <char id="110" x="261" y="116" width="11" height="13" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="111" x="58" y="120" width="13" height="13" xoffset="1" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="112" x="134" y="46" width="13" height="18" xoffset="2" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="113" x="148" y="46" width="13" height="18" xoffset="1" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="114" x="424" y="111" width="7" height="13" xoffset="1" yoffset="10" xadvance="8" page="0" chnl="15" />
-    <char id="115" x="386" y="112" width="9" height="13" xoffset="1" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="116" x="154" y="101" width="7" height="17" xoffset="0" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="117" x="320" y="113" width="10" height="13" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="118" x="44" y="120" width="13" height="13" xoffset="0" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="119" x="320" y="99" width="21" height="13" xoffset="-1" yoffset="10" xadvance="19" page="0" chnl="15" />
-    <char id="120" x="30" y="121" width="13" height="13" xoffset="0" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="121" x="20" y="47" width="14" height="18" xoffset="0" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="122" x="285" y="116" width="11" height="13" xoffset="0" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="123" x="447" y="0" width="8" height="22" xoffset="0" yoffset="6" xadvance="8" page="0" chnl="15" />
-    <char id="124" x="456" y="0" width="2" height="22" xoffset="6" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="125" x="438" y="0" width="8" height="22" xoffset="0" yoffset="6" xadvance="8" page="0" chnl="15" />
-    <char id="126" x="68" y="134" width="12" height="5" xoffset="1" yoffset="12" xadvance="14" page="0" chnl="15" />
-    <char id="160" x="295" y="114" width="1" height="1" xoffset="0" yoffset="23" xadvance="7" page="0" chnl="15" />
-    <char id="161" x="507" y="22" width="4" height="18" xoffset="1" yoffset="10" xadvance="7" page="0" chnl="15" />
-    <char id="162" x="441" y="23" width="11" height="19" xoffset="1" yoffset="7" xadvance="13" page="0" chnl="15" />
-    <char id="163" x="313" y="81" width="12" height="17" xoffset="0" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="164" x="437" y="111" width="12" height="12" xoffset="1" yoffset="8" xadvance="14" page="0" chnl="15" />
-    <char id="165" x="58" y="84" width="13" height="17" xoffset="-1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="166" x="459" y="0" width="2" height="22" xoffset="6" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="167" x="427" y="0" width="10" height="22" xoffset="1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="168" x="108" y="133" width="9" height="3" xoffset="1" yoffset="5" xadvance="12" page="0" chnl="15" />
-    <char id="169" x="78" y="65" width="18" height="17" xoffset="0" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="170" x="9" y="135" width="8" height="8" xoffset="0" yoffset="6" xadvance="9" page="0" chnl="15" />
-    <char id="171" x="249" y="116" width="11" height="13" xoffset="0" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="172" x="497" y="110" width="11" height="8" xoffset="1" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="173" x="125" y="133" width="6" height="3" xoffset="2" yoffset="15" xadvance="10" page="0" chnl="15" />
-    <char id="174" x="59" y="65" width="18" height="17" xoffset="0" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="175" x="149" y="133" width="12" height="1" xoffset="0" yoffset="3" xadvance="12" page="0" chnl="15" />
-    <char id="176" x="0" y="135" width="8" height="8" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
-    <char id="177" x="188" y="101" width="11" height="16" xoffset="1" yoffset="7" xadvance="13" page="0" chnl="15" />
-    <char id="178" x="35" y="135" width="7" height="8" xoffset="0" yoffset="6" xadvance="8" page="0" chnl="15" />
-    <char id="179" x="27" y="135" width="7" height="8" xoffset="0" yoffset="6" xadvance="8" page="0" chnl="15" />
-    <char id="180" x="89" y="133" width="7" height="5" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
-    <char id="181" x="204" y="45" width="12" height="18" xoffset="1" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="182" x="416" y="0" width="10" height="22" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="183" x="132" y="133" width="3" height="3" xoffset="6" yoffset="13" xadvance="8" page="0" chnl="15" />
-    <char id="184" x="97" y="133" width="5" height="4" xoffset="1" yoffset="23" xadvance="8" page="0" chnl="15" />
-    <char id="185" x="43" y="135" width="4" height="8" xoffset="1" yoffset="6" xadvance="8" page="0" chnl="15" />
-    <char id="186" x="18" y="135" width="8" height="8" xoffset="1" yoffset="6" xadvance="9" page="0" chnl="15" />
-    <char id="187" x="297" y="114" width="11" height="13" xoffset="-1" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="188" x="116" y="65" width="18" height="17" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="189" x="135" y="65" width="18" height="17" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="190" x="20" y="66" width="19" height="17" xoffset="0" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="191" x="217" y="45" width="11" height="18" xoffset="1" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="192" x="104" y="0" width="17" height="23" xoffset="0" yoffset="0" xadvance="18" page="0" chnl="15" />
-    <char id="193" x="86" y="0" width="17" height="23" xoffset="0" yoffset="0" xadvance="18" page="0" chnl="15" />
-    <char id="194" x="0" y="26" width="17" height="21" xoffset="0" yoffset="2" xadvance="18" page="0" chnl="15" />
-    <char id="195" x="341" y="0" width="17" height="22" xoffset="0" yoffset="1" xadvance="18" page="0" chnl="15" />
-    <char id="196" x="36" y="24" width="17" height="21" xoffset="0" yoffset="2" xadvance="18" page="0" chnl="15" />
-    <char id="197" x="68" y="0" width="17" height="23" xoffset="0" yoffset="0" xadvance="18" page="0" chnl="15" />
-    <char id="198" x="432" y="43" width="21" height="17" xoffset="0" yoffset="6" xadvance="22" page="0" chnl="15" />
-    <char id="199" x="18" y="25" width="17" height="21" xoffset="1" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="200" x="202" y="0" width="10" height="23" xoffset="1" yoffset="0" xadvance="12" page="0" chnl="15" />
-    <char id="201" x="191" y="0" width="10" height="23" xoffset="2" yoffset="0" xadvance="12" page="0" chnl="15" />
-    <char id="202" x="90" y="24" width="10" height="21" xoffset="1" yoffset="2" xadvance="12" page="0" chnl="15" />
-    <char id="203" x="123" y="24" width="9" height="21" xoffset="2" yoffset="2" xadvance="12" page="0" chnl="15" />
-    <char id="204" x="223" y="0" width="7" height="23" xoffset="-1" yoffset="0" xadvance="7" page="0" chnl="15" />
-    <char id="205" x="231" y="0" width="7" height="23" xoffset="1" yoffset="0" xadvance="7" page="0" chnl="15" />
-    <char id="206" x="112" y="24" width="10" height="21" xoffset="-2" yoffset="2" xadvance="7" page="0" chnl="15" />
-    <char id="207" x="153" y="24" width="9" height="21" xoffset="-1" yoffset="2" xadvance="7" page="0" chnl="15" />
-    <char id="208" x="338" y="62" width="16" height="17" xoffset="1" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="209" x="374" y="0" width="14" height="22" xoffset="2" yoffset="1" xadvance="18" page="0" chnl="15" />
-    <char id="210" x="49" y="0" width="18" height="23" xoffset="1" yoffset="0" xadvance="20" page="0" chnl="15" />
-    <char id="211" x="30" y="0" width="18" height="23" xoffset="1" yoffset="0" xadvance="20" page="0" chnl="15" />
-    <char id="212" x="481" y="0" width="18" height="21" xoffset="1" yoffset="2" xadvance="20" page="0" chnl="15" />
-    <char id="213" x="304" y="0" width="18" height="22" xoffset="1" yoffset="1" xadvance="20" page="0" chnl="15" />
-    <char id="214" x="462" y="0" width="18" height="21" xoffset="1" yoffset="2" xadvance="20" page="0" chnl="15" />
-    <char id="215" x="450" y="111" width="11" height="11" xoffset="1" yoffset="9" xadvance="14" page="0" chnl="15" />
-    <char id="216" x="394" y="23" width="18" height="19" xoffset="1" yoffset="5" xadvance="20" page="0" chnl="15" />
-    <char id="217" x="167" y="0" width="11" height="23" xoffset="2" yoffset="0" xadvance="15" page="0" chnl="15" />
-    <char id="218" x="179" y="0" width="11" height="23" xoffset="2" yoffset="0" xadvance="15" page="0" chnl="15" />
-    <char id="219" x="66" y="24" width="11" height="21" xoffset="2" yoffset="2" xadvance="15" page="0" chnl="15" />
-    <char id="220" x="78" y="24" width="11" height="21" xoffset="2" yoffset="2" xadvance="15" page="0" chnl="15" />
-    <char id="221" x="122" y="0" width="15" height="23" xoffset="0" yoffset="0" xadvance="15" page="0" chnl="15" />
-    <char id="222" x="44" y="102" width="10" height="17" xoffset="2" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="223" x="363" y="80" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="224" x="280" y="24" width="13" height="20" xoffset="1" yoffset="3" xadvance="16" page="0" chnl="15" />
-    <char id="225" x="266" y="24" width="13" height="20" xoffset="1" yoffset="3" xadvance="16" page="0" chnl="15" />
-    <char id="226" x="50" y="46" width="13" height="18" xoffset="1" yoffset="5" xadvance="16" page="0" chnl="15" />
-    <char id="227" x="427" y="23" width="13" height="19" xoffset="1" yoffset="4" xadvance="16" page="0" chnl="15" />
-    <char id="228" x="176" y="45" width="13" height="18" xoffset="1" yoffset="5" xadvance="16" page="0" chnl="15" />
-    <char id="229" x="252" y="24" width="13" height="20" xoffset="1" yoffset="3" xadvance="16" page="0" chnl="15" />
-    <char id="230" x="295" y="100" width="24" height="13" xoffset="1" yoffset="10" xadvance="26" page="0" chnl="15" />
-    <char id="231" x="196" y="82" width="12" height="17" xoffset="2" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="232" x="308" y="23" width="13" height="20" xoffset="1" yoffset="3" xadvance="15" page="0" chnl="15" />
-    <char id="233" x="238" y="24" width="13" height="20" xoffset="1" yoffset="3" xadvance="15" page="0" chnl="15" />
-    <char id="234" x="162" y="46" width="13" height="18" xoffset="1" yoffset="5" xadvance="15" page="0" chnl="15" />
-    <char id="235" x="106" y="46" width="13" height="18" xoffset="1" yoffset="5" xadvance="15" page="0" chnl="15" />
-    <char id="236" x="378" y="23" width="7" height="20" xoffset="-2" yoffset="3" xadvance="6" page="0" chnl="15" />
-    <char id="237" x="370" y="23" width="7" height="20" xoffset="0" yoffset="3" xadvance="6" page="0" chnl="15" />
-    <char id="238" x="229" y="45" width="10" height="18" xoffset="-3" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="239" x="262" y="45" width="9" height="18" xoffset="-2" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="240" x="30" y="84" width="13" height="17" xoffset="1" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="241" x="453" y="23" width="11" height="19" xoffset="2" yoffset="4" xadvance="14" page="0" chnl="15" />
-    <char id="242" x="224" y="24" width="13" height="20" xoffset="1" yoffset="3" xadvance="15" page="0" chnl="15" />
-    <char id="243" x="294" y="23" width="13" height="20" xoffset="1" yoffset="3" xadvance="15" page="0" chnl="15" />
-    <char id="244" x="64" y="46" width="13" height="18" xoffset="1" yoffset="5" xadvance="15" page="0" chnl="15" />
-    <char id="245" x="413" y="23" width="13" height="19" xoffset="1" yoffset="4" xadvance="15" page="0" chnl="15" />
-    <char id="246" x="190" y="45" width="13" height="18" xoffset="1" yoffset="5" xadvance="15" page="0" chnl="15" />
-    <char id="247" x="197" y="118" width="12" height="13" xoffset="1" yoffset="8" xadvance="13" page="0" chnl="15" />
-    <char id="248" x="272" y="100" width="14" height="15" xoffset="1" yoffset="9" xadvance="16" page="0" chnl="15" />
-    <char id="249" x="348" y="23" width="10" height="20" xoffset="2" yoffset="3" xadvance="14" page="0" chnl="15" />
-    <char id="250" x="359" y="23" width="10" height="20" xoffset="2" yoffset="3" xadvance="14" page="0" chnl="15" />
-    <char id="251" x="240" y="45" width="10" height="18" xoffset="2" yoffset="5" xadvance="14" page="0" chnl="15" />
-    <char id="252" x="251" y="45" width="10" height="18" xoffset="2" yoffset="5" xadvance="14" page="0" chnl="15" />
-    <char id="253" x="0" y="0" width="14" height="25" xoffset="0" yoffset="3" xadvance="14" page="0" chnl="15" />
-    <char id="254" x="359" y="0" width="14" height="22" xoffset="1" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="255" x="138" y="0" width="14" height="23" xoffset="0" yoffset="5" xadvance="14" page="0" chnl="15" />
-    <char id="1025" x="133" y="24" width="9" height="21" xoffset="2" yoffset="2" xadvance="12" page="0" chnl="15" />
-    <char id="1026" x="372" y="62" width="16" height="17" xoffset="0" yoffset="6" xadvance="17" page="0" chnl="15" />
-    <char id="1027" x="213" y="0" width="9" height="23" xoffset="2" yoffset="0" xadvance="11" page="0" chnl="15" />
-    <char id="1028" x="173" y="65" width="18" height="17" xoffset="1" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="1029" x="501" y="59" width="10" height="17" xoffset="1" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="1030" x="180" y="101" width="3" height="17" xoffset="2" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="1031" x="143" y="24" width="9" height="21" xoffset="-1" yoffset="2" xadvance="7" page="0" chnl="15" />
-    <char id="1032" x="116" y="101" width="9" height="17" xoffset="1" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="1033" x="315" y="44" width="24" height="17" xoffset="-1" yoffset="6" xadvance="24" page="0" chnl="15" />
-    <char id="1034" x="454" y="43" width="20" height="17" xoffset="2" yoffset="6" xadvance="23" page="0" chnl="15" />
-    <char id="1035" x="423" y="61" width="15" height="17" xoffset="0" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1036" x="153" y="0" width="13" height="23" xoffset="2" yoffset="0" xadvance="15" page="0" chnl="15" />
-    <char id="1038" x="323" y="0" width="17" height="22" xoffset="-1" yoffset="1" xadvance="15" page="0" chnl="15" />
-    <char id="1039" x="322" y="23" width="12" height="20" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1040" x="284" y="64" width="17" height="17" xoffset="0" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="1041" x="387" y="80" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1042" x="447" y="79" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1043" x="136" y="101" width="8" height="17" xoffset="2" yoffset="6" xadvance="11" page="0" chnl="15" />
-    <char id="1044" x="187" y="24" width="19" height="20" xoffset="0" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="1045" x="106" y="101" width="9" height="17" xoffset="2" yoffset="6" xadvance="12" page="0" chnl="15" />
-    <char id="1046" x="290" y="45" width="24" height="17" xoffset="-1" yoffset="6" xadvance="22" page="0" chnl="15" />
-    <char id="1047" x="128" y="83" width="13" height="17" xoffset="-1" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="1048" x="287" y="82" width="12" height="17" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1049" x="403" y="0" width="12" height="22" xoffset="2" yoffset="1" xadvance="16" page="0" chnl="15" />
-    <char id="1050" x="142" y="83" width="13" height="17" xoffset="2" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="1051" x="0" y="67" width="19" height="17" xoffset="-1" yoffset="6" xadvance="17" page="0" chnl="15" />
-    <char id="1052" x="410" y="43" width="21" height="17" xoffset="0" yoffset="6" xadvance="22" page="0" chnl="15" />
-    <char id="1053" x="248" y="82" width="12" height="17" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1054" x="154" y="65" width="18" height="17" xoffset="1" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="1055" x="235" y="82" width="12" height="17" xoffset="2" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1056" x="0" y="103" width="10" height="17" xoffset="2" yoffset="6" xadvance="13" page="0" chnl="15" />
-    <char id="1057" x="320" y="62" width="17" height="17" xoffset="1" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="1058" x="76" y="101" width="9" height="17" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
-    <char id="1059" x="302" y="63" width="17" height="17" xoffset="-1" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="1060" x="389" y="62" width="16" height="17" xoffset="1" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="1061" x="406" y="62" width="16" height="17" xoffset="0" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1062" x="207" y="24" width="16" height="20" xoffset="2" yoffset="6" xadvance="18" page="0" chnl="15" />
-    <char id="1063" x="300" y="82" width="12" height="17" xoffset="1" yoffset="6" xadvance="15" page="0" chnl="15" />
-    <char id="1064" x="475" y="42" width="19" height="17" xoffset="2" yoffset="6" xadvance="23" page="0" chnl="15" />
-    <char id="1065" x="163" y="24" width="23" height="20" xoffset="2" yoffset="6" xadvance="25" page="0" chnl="15" />
-    <char id="1066" x="455" y="61" width="15" height="17" xoffset="0" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1067" x="355" y="62" width="16" height="17" xoffset="2" yoffset="6" xadvance="20" page="0" chnl="15" />
-    <char id="1068" x="351" y="80" width="11" height="17" xoffset="2" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1069" x="40" y="66" width="18" height="17" xoffset="0" yoffset="6" xadvance="19" page="0" chnl="15" />
-    <char id="1070" x="364" y="44" width="23" height="17" xoffset="2" yoffset="6" xadvance="26" page="0" chnl="15" />
-    <char id="1071" x="183" y="83" width="12" height="17" xoffset="0" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1072" x="114" y="119" width="13" height="13" xoffset="1" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="1073" x="0" y="85" width="14" height="17" xoffset="1" yoffset="6" xadvance="16" page="0" chnl="15" />
-    <char id="1074" x="309" y="114" width="10" height="13" xoffset="2" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1075" x="416" y="112" width="7" height="13" xoffset="2" yoffset="10" xadvance="10" page="0" chnl="15" />
-    <char id="1076" x="240" y="100" width="16" height="15" xoffset="0" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="1077" x="142" y="119" width="13" height="13" xoffset="1" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="1078" x="342" y="98" width="21" height="13" xoffset="-1" yoffset="10" xadvance="19" page="0" chnl="15" />
-    <char id="1079" x="342" y="112" width="10" height="13" xoffset="0" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="1080" x="331" y="113" width="10" height="13" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1081" x="465" y="22" width="10" height="19" xoffset="2" yoffset="4" xadvance="14" page="0" chnl="15" />
-    <char id="1082" x="184" y="119" width="12" height="13" xoffset="2" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1083" x="480" y="97" width="15" height="13" xoffset="-1" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1084" x="364" y="98" width="19" height="13" xoffset="0" yoffset="10" xadvance="19" page="0" chnl="15" />
-    <char id="1085" x="353" y="112" width="10" height="13" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1086" x="128" y="119" width="13" height="13" xoffset="1" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="1087" x="364" y="112" width="10" height="13" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1088" x="78" y="46" width="13" height="18" xoffset="2" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="1089" x="223" y="116" width="12" height="13" xoffset="2" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="1090" x="273" y="116" width="11" height="13" xoffset="1" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1091" x="35" y="47" width="14" height="18" xoffset="0" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1092" x="281" y="0" width="22" height="22" xoffset="1" yoffset="6" xadvance="24" page="0" chnl="15" />
-    <char id="1093" x="156" y="119" width="13" height="13" xoffset="0" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1094" x="257" y="100" width="14" height="15" xoffset="2" yoffset="10" xadvance="16" page="0" chnl="15" />
-    <char id="1095" x="375" y="112" width="10" height="13" xoffset="1" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1096" x="424" y="97" width="18" height="13" xoffset="2" yoffset="10" xadvance="22" page="0" chnl="15" />
-    <char id="1097" x="218" y="100" width="21" height="15" xoffset="2" yoffset="10" xadvance="23" page="0" chnl="15" />
-    <char id="1098" x="170" y="119" width="13" height="13" xoffset="0" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1099" x="496" y="96" width="14" height="13" xoffset="2" yoffset="10" xadvance="18" page="0" chnl="15" />
-    <char id="1100" x="396" y="112" width="9" height="13" xoffset="2" yoffset="10" xadvance="12" page="0" chnl="15" />
-    <char id="1101" x="15" y="121" width="14" height="13" xoffset="0" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="1102" x="443" y="97" width="18" height="13" xoffset="2" yoffset="10" xadvance="21" page="0" chnl="15" />
-    <char id="1103" x="236" y="116" width="12" height="13" xoffset="-1" yoffset="10" xadvance="13" page="0" chnl="15" />
-    <char id="1105" x="120" y="46" width="13" height="18" xoffset="1" yoffset="5" xadvance="15" page="0" chnl="15" />
-    <char id="1106" x="389" y="0" width="13" height="22" xoffset="0" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1107" x="386" y="23" width="7" height="20" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
-    <char id="1108" x="0" y="121" width="14" height="13" xoffset="1" yoffset="10" xadvance="15" page="0" chnl="15" />
-    <char id="1109" x="406" y="112" width="9" height="13" xoffset="1" yoffset="10" xadvance="11" page="0" chnl="15" />
-    <char id="1110" x="286" y="45" width="3" height="18" xoffset="1" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="1111" x="272" y="45" width="9" height="18" xoffset="-2" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="1112" x="262" y="0" width="6" height="23" xoffset="-1" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="1113" x="404" y="98" width="19" height="13" xoffset="-1" yoffset="10" xadvance="19" page="0" chnl="15" />
-    <char id="1114" x="462" y="97" width="17" height="13" xoffset="2" yoffset="10" xadvance="20" page="0" chnl="15" />
-    <char id="1115" x="156" y="83" width="13" height="17" xoffset="0" yoffset="6" xadvance="14" page="0" chnl="15" />
-    <char id="1116" x="335" y="23" width="12" height="20" xoffset="2" yoffset="3" xadvance="13" page="0" chnl="15" />
-    <char id="1118" x="15" y="0" width="14" height="24" xoffset="0" yoffset="4" xadvance="14" page="0" chnl="15" />
-    <char id="1119" x="200" y="100" width="10" height="16" xoffset="2" yoffset="10" xadvance="14" page="0" chnl="15" />
-    <char id="1168" x="476" y="22" width="9" height="19" xoffset="2" yoffset="4" xadvance="12" page="0" chnl="15" />
-    <char id="1169" x="287" y="100" width="7" height="15" xoffset="2" yoffset="8" xadvance="10" page="0" chnl="15" />
-  </chars>
-</font>

BIN
examples/GameTemplate/data/fonts/main24_0.png


BIN
examples/GameTemplate/data/images/bg/bg_hd.jpg


BIN
examples/GameTemplate/data/images/button.png


BIN
examples/GameTemplate/data/images/go.png


+ 0 - 32
examples/GameTemplate/data/strings_en_GB.xml

@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<strings>
-	<main_menu>
-		<play>Play</play>
-		<play1>1 Player</play1>
-		<play2>2 Players</play2>
-		<options>Options</options>
-		<high_scores>High Scores</high_scores>
-		<achievements>Achievements</achievements>
-	</main_menu>
-	<options>
-		<music_on>Music On</music_on>
-		<music_off>Music Off</music_off>
-		<sounds_on>Sounds On</sounds_on>
-		<sounds_off>Sounds Off</sounds_off>
-		<high_quality_on>Quality High</high_quality_on>
-		<high_quality_off>Quality Low</high_quality_off>
-		<back>Back</back>
-	</options>
-	<game_menu>
-		<paused>Paused</paused>
-		<message>Put thumbs down to return to game</message>
-		<main_menu>Main Menu</main_menu>		
-	</game_menu>	
-	<game>
-		<lvl>LVL </lvl>
-		<tier>TIER </tier>		
-	</game>	
-	<result>
-		<done>Done</done>
-	</result>	
-</strings> 

+ 0 - 29
examples/GameTemplate/data/strings_ru_RU.xml

@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<strings>
-	<main_menu>
-		<play>Играть</play>
-		<options>Настройки</options>
-		<high_scores>Рекорды</high_scores>
-	</main_menu>
-	<options>
-		<music_on>Музыка ВКЛ</music_on>
-		<music_off>Музыка ВЫКЛ</music_off>
-		<sounds_on>Звуки ВКЛ</sounds_on>
-		<sounds_off>Звуки ВЫКЛ</sounds_off>
-		<high_quality_on>Графика Высокая</high_quality_on>
-		<high_quality_off>Графика Низкая</high_quality_off>
-		<back>Назад</back>
-	</options>
-	<game_menu>
-		<paused>Пауза</paused>
-		<message>Опустите пальцы на джойстики, чтобы продолжить игру</message>
-		<main_menu>Главное Меню</main_menu>		
-	</game_menu>	
-	<game>
-		<lvl>ВОЛНА </lvl>
-		<tier>УР </tier>		
-	</game>	
-	<result>
-		<done>Готово</done>
-	</result>
-</strings> 

+ 0 - 16
examples/GameTemplate/data/xmls/res.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<resources>	
-	<atlas>
-		<set path = "images/bg" />		
-		<set scale_factor="0.5" />
-		<image id="bg" file="bg_hd.jpg"/>
-		<set scale_factor="1" />
-
-		<set path = "images" />
-		<image id="button" file="button.png" cols="3"/>
-		<image file="go.png" />						
-	</atlas>
-	
-	<set path = "fonts" />
-	<font file="main24.fnt" />	
-</resources>

+ 0 - 1
examples/GameTemplate/prepare_res.bat

@@ -1 +0,0 @@
-python ..\..\tools\process_xml2.py -x xmls/res.xml --src_data data --dest_data data -s 0.5 --resize

+ 0 - 9
examples/GameTemplate/readme.txt

@@ -1,9 +0,0 @@
-It is example of almost completed template for game.
-It demonstrates:
-1. localization En/Ru
-2. atlasses genereated in offline
-3. HD assets mode
-4. visual profiler
-5. options
-6. simple dialogs system
-

+ 0 - 114
examples/GameTemplate/src/GameActor.cpp

@@ -1,114 +0,0 @@
-#include <sstream>
-#include "GameActor.h"
-#include "GameMenu.h"
-#include "shared.h"
-#include "oxygine-framework.h"
-
-//#include "s3eAudio.h"
-
-spGameActor GameActor::instance;
-
-void GameActor::initialize()
-{	
-}
-
-void GameActor::clean()
-{
-}
-
-GameActor::GameActor()
-{	
-	instance = this;
-	_actor->setInputEnabled(false);
-
-	_actor->setSize(480, 320);
-
-
-	spClock clock = new Clock();
-	clock->setFixedStep(1000.0f/60);
-	_actor->setClock(clock);
-	
-	
-
-
-	_menu = new ButtonWithText();
-	EventCallback cb = CLOSURE(this, &GameActor::generateActionByEvent);
-	_menu->init("Menu", cb, Vector2(60, 30), "menu");
-	_menu->setScale(Vector2(0.5f, 0.5f));
-	_actor->addChild(_menu);
-
-	_score = new TextActor;	
-	TextStyle s = basicStyle;
-	s.color = Color(255,128,255,255);
-	s.hAlign = TextStyle::HALIGN_LEFT;
-	s.vAlign = TextStyle::VALIGN_BASELINE;
-	_score->setStyle(s);
-	_score->setPosition(Vector2(0.0f, (float)virtualSize.y));	
-	_actor->addChild(_score);
-
-	_result = new GameResult;
-	_result->init();
-
-	_actor->setCallbackDoUpdate(CLOSURE(this, &GameActor::doUpdate));
-
-}
-
-GameActor::~GameActor()
-{
-
-}
-void GameActor::preShowing()
-{	
-	_points = 0;	
-	_score->setAlpha(0);
-	_score->addTween(Actor::TweenAlpha(255), 300);	
-}
-
-void GameActor::postShowing()
-{	
-	spSprite go = new Sprite();
-	go->setResAnim(gameResources.getResAnim("go"));
-	go->setAnchor(Vector2(0.5f, 0.5f));
-	go->setScale(Vector2(2.0f, 2.0f));	
-	go->setPosition(virtualSize/2);
-	spTweenQueue queue = new TweenQueue();
-	queue->add(Actor::TweenScale(Vector2(1.0f, 1.0f)), 200);
-	queue->add(Actor::TweenAlpha(0), 400, 3, true);
-	queue->add(Actor::TweenAlpha(255), 400);
-	go->addTween(queue);
-	//queue->setDetachActor(true);
-
-	_actor->addChild(go);
-}
-
-void GameActor::doLoop()
-{
-	while (1)
-	{
-		string action = waitAction();
-
-		if (action == "menu")
-		{
-			_result->setup((int)_points);
-
-			_actor->addChild(_result->_actor);
-			_result->loop();
-			_result->_actor->detach();
-			break;
-		}
-	}	
-}
-
-
-void GameActor::doUpdate(const UpdateState &us)
-{
-	int points = int(_points);
-	_points += (us.dt/1000.0f) * 5;
-
-	if (points != int(_points))
-	{
-		char str[255];
-		safe_sprintf(str, "Score: %d", (int)_points);
-		_score->setText(str);
-	}	
-}

+ 0 - 38
examples/GameTemplate/src/GameActor.h

@@ -1,38 +0,0 @@
-#pragma once
-#include "oxygine-framework.h"
-#include "ModalActor.h"
-#include "GameResult.h"
-using namespace oxygine;
-
-
-DECLARE_SMART(GameActor, spGameActor);
-
-class GameActor: public ModalActor
-{
-public:
-	static spGameActor instance;
-
-	GameActor();
-	~GameActor();
-
-	
-
-	static void initialize();
-	static void clean();
-
-	void doLoop();
-	void postShowing();
-	void preShowing();
-
-
-private:
-	void doUpdate(const UpdateState &us);
-
-	spButtonWithText _menu;
-	spTextActor _score;
-
-	float _points;
-
-
-	spGameResult _result;
-};

+ 0 - 73
examples/GameTemplate/src/GameMenu.cpp

@@ -1,73 +0,0 @@
-#include "GameMenu.h"
-#include "RootActor.h"
-#include "GameActor.h"
-#include "shared.h"
-#include "blocking.h"
-
-spGameMenu GameMenu::instance;
-
-GameMenu::GameMenu()
-{
-	_actor->setSize(getRoot()->getSize());
-
-	Vector2 size(_actor->getSize());
-
-	EventCallback cb;
-
-	Vector2 pos(virtualSize.x/2.0f, 50);
-
-	_paused = new ButtonWithText;
-	_paused->init(getString("game_menu", "paused"), cb, pos, "paused");
-	_actor->addChild(_paused);
-
-	_tip = new ButtonWithText;
-	_tip->init(getString("game_menu", "message"), cb, pos, "tip");
-	_actor->addChild(_tip);
-
-	//_options.init(L"Options", 100, cb, "options");
-	//addChild(&_options);
-
-	cb = CLOSURE(this, &GameMenu::clickedMainMenu);
-
-	_gotoMainMenu = new ButtonWithText;
-	_gotoMainMenu->init(getString("game_menu", "main_menu"), cb, pos, "main_menu");
-
-	_actor->addChild(_gotoMainMenu);
-
-	_timeFadeOut = 50;
-}
-
-void GameMenu::clickedMainMenu(Event *es)
-{
-	return generateActionByEvent(es);
-}
-
-GameMenu::~GameMenu()
-{
-
-}
-
-
-
-void GameMenu::doLoop()
-{
-	while(1)
-	{
-		string action = waitAction();
-
-		if (action == "play")
-			break;
-
-		
-		blocking::yield();//avoid unhandled exception bug
-		if (action == "main_menu")
-		{
-			throw ExitGame();
-		}
-	}	
-}
-
-void GameMenu::doUpdate(const UpdateState &us)
-{
-
-}

+ 0 - 36
examples/GameTemplate/src/GameMenu.h

@@ -1,36 +0,0 @@
-#pragma once
-#include "Actor.h"
-#include "TextActor.h"
-#include "MainMenu.h"
-#include "ModalActor.h"
-using namespace oxygine;
-
-DECLARE_SMART(GameMenu, spGameMenu);
-
-class ExitGame
-{
-public:
-	ExitGame():button(false){}
-	bool button;
-	virtual ~ExitGame(){}
-};
-
-class GameMenu:public ModalActor
-{
-public:
-	static spGameMenu instance;
-
-	GameMenu();
-	~GameMenu();
-
-	void doUpdate(const UpdateState &us);
-
-	spButtonWithText _paused;
-	spButtonWithText _options;
-	spButtonWithText _gotoMainMenu;
-	spButtonWithText _tip;
-
-	void clickedMainMenu(Event *es);
-
-	void doLoop();
-};

+ 0 - 58
examples/GameTemplate/src/GameResult.cpp

@@ -1,58 +0,0 @@
-#include "GameResult.h"
-#include <sstream>
-#include "oxygine-framework.h"
-#include "shared.h"
-
-spGameResult GameResult::instance;
-GameResult::GameResult()
-{	
-}
-
-GameResult::~GameResult()
-{
-
-}
-
-void GameResult::init()
-{
-	ColorRectSprite *p = new ColorRectSprite;
-	_bg = p;
-	_bg->setSize(getRoot()->getSize());
-	_bg->setColor(Color(30, 30, 30, (int)(255 * 0.9f)));
-	_actor->addChild(_bg);
-
-	_score = new ButtonWithText;
-	_done = new ButtonWithText;
-
-	EventCallback cb;
-	Vector2 pos(virtualSize.x/2.0f, 50);
-	_score->init("", cb, pos, "score");
-	_actor->addChild(_score);
-	
-
-	pos.y = 250;
-	cb = CLOSURE(this, &Modal::generateActionByEvent);
-	_done->init(getString("result", "done"), cb, pos, "done");
-	_actor->addChild(_done);
-}
-
-void GameResult::setup(int score)
-{
-	char str[255];
-	safe_sprintf(str, "%d", score);
-	_score->setText(str);
-}
-
-
-void GameResult::doLoop()
-{
-	while(1)
-	{
-		string action = waitAction();
-
-		if (!action.empty())
-		{
-			break;
-		}
-	}
-}

+ 0 - 24
examples/GameTemplate/src/GameResult.h

@@ -1,24 +0,0 @@
-#pragma once
-#include "ModalActor.h"
-#include "MainMenu.h"
-#include "ColorRectSprite.h"
-
-DECLARE_SMART(GameResult, spGameResult);
-class GameResult: public ModalActor
-{
-public:
-	static spGameResult instance;
-
-	GameResult();
-	~GameResult();
-
-	void init();
-	void setup(int score);
-	void doLoop();
-
-private:
-	spColorRectSprite _bg;
-
-	spButtonWithText _score;
-	spButtonWithText _done;
-};

+ 0 - 157
examples/GameTemplate/src/MainMenu.cpp

@@ -1,157 +0,0 @@
-#include "MainMenu.h"
-#include "RootActor.h"
-#include "GameActor.h"
-#include "Tweener.h"
-#include "OptionsMenu.h"
-#include "shared.h"
-
-
-spMainMenu MainMenu::instance;
-
-ButtonWithText::ButtonWithText():enabled(true)
-{
-	_text = new TextActor;
-	addChild(_text);
-	setAnchor(Vector2(0.5f, 0.5f));
-}
-
-ButtonWithText::~ButtonWithText()
-{
-
-}
-
-void ButtonWithText::init(const string &text, EventCallback &cb, const Vector2 &pos, const string &name)
-{
-	setName(name);
-	setPosition(pos);
-	addEventListener(TouchEvent::CLICK, cb);
-	setChildrenRelative(false);
-
-	setResAnim(gameResources.getResAnim("button"));
-
-
-	TextStyle style = basicStyle;	
-	style.hAlign = TextStyle::HALIGN_CENTER;
-	style.vAlign = TextStyle::VALIGN_MIDDLE;
-	style.multiline = false;
-
-	_text->setStyle(style);	
-	setText(text);	
-}
-
-void ButtonWithText::setText(const string &str)
-{
-	_text->setText(str);
-}
-
-MainMenu::MainMenu()
-{	
-	spClock clock = new Clock();
-	clock->setFixedStep(1000/50.0f);
-	_actor->setClock(clock);
-			
-	_actor->setSize(getRoot()->getSize());
-
-
-	spSprite bg = new Sprite();
-	bg->setResAnim(gameResources.getResAnim("bg"));
-	_actor->addChild(bg);
-	
-
-
-	EventCallback cb = CLOSURE(this, &MainMenu::clickedButton);
-
-	int dy = 70;
-	Vector2 pos(virtualSize.x/2.0f, 100);
-
-	_play = new ButtonWithText;
-	_play->init(getString("main_menu", "play"), cb, pos, "play");
-
-	
-	pos.y += dy;
-	_options = new ButtonWithText;
-	_options->init(getString("main_menu", "options"), cb, pos, "options");
-	
-	pos.y += dy;
-	
-	
-	_menu = new Actor;
-	_menu->addChild(_play);	
-	_menu->addChild(_options);
-
-	_actor->addChild(_menu);
-}
-
-MainMenu::~MainMenu()
-{
-
-}
-
-void MainMenu::doLoop()
-{
-	while(1)
-	{
-		string action = waitAction();
-
-		if (action == "play")
-		{
-			hiding();
-
-			spActor parent = _actor->detach();
-
-			spGameActor game = new GameActor();
-			getRoot()->addChild(game->_actor);
-								
-			game->loop();
-
-			game->_actor->detach();
-
-			parent->addChild(this->_actor);
-
-			showing();
-		}
-		if (action == "options")
-		{				
-			_menu->setInputEnabled(false);
-
-			_menu->setAlpha(255);
-			spTween t = _menu->addTween(Actor::TweenAlpha(0), 250);
-			blocking::waitTween(t);
-
-			_menu->setInputEnabled(true);				
-
-			spOptionsMenu opt = OptionsMenu::instance;
-			getRoot()->addChild(opt->_actor);
-
-			opt->loop();
-			opt->_actor->detach();
-				
-			_menu->setInputEnabled(false);
-
-			_menu->setAlpha(0);
-			t = _menu->addTween(Actor::TweenAlpha(255), 250);
-			blocking::waitTween(t);
-
-			_menu->setInputEnabled(true);
-		}
-		
-	}
-}
-
-void MainMenu::postHiding()
-{
-}
-
-void MainMenu::postShowing()
-{	
-}
-
-void MainMenu::doUpdate(const UpdateState &us)
-{
-
-}
-
-void MainMenu::clickedButton(Event *es)
-{
-	generateActionByEvent(es);
-}

+ 0 - 56
examples/GameTemplate/src/MainMenu.h

@@ -1,56 +0,0 @@
-#pragma once
-#include "Actor.h"
-#include "TextActor.h"
-#include "ModalActor.h"
-#include "Button.h"
-using namespace oxygine;
-
-DECLARE_SMART(ButtonWithText, spButtonWithText);
-class ButtonWithText: public Button
-{
-public:
-	ButtonWithText();
-	~ButtonWithText();
-
-	bool enabled;//used for options
-
-	void init(const string &text, EventCallback &cb, const Vector2 &pos, const string &name);
-	void setText(const string &str);
-
-private:
-	spTextActor _text;
-};
-
-DECLARE_SMART(MainMenu, spMainMenu);
-DECLARE_SMART(GameActor, spGameActor);
-
-
-class MainMenu:public ModalActor
-{
-public:
-	static spMainMenu instance;
-
-	MainMenu();
-	~MainMenu();
-
-	void postShowing();
-	void postHiding();
-
-	void doLoop();
-
-	void clickedButton(Event *es);
-
-	void doUpdate(const UpdateState &us);
-
-	//string waitAction();
-
-	spButtonWithText _play;
-	spButtonWithText _options;
-	spActor _menu;
-
-
-private:
-	void fadeOutDone(Tween *tween, Actor *actor);
-	string _action;
-
-};

+ 0 - 66
examples/GameTemplate/src/Modal.cpp

@@ -1,66 +0,0 @@
-#include "Modal.h"
-#include "blocking.h"
-
-
-namespace oxygine
-{
-	Modal::Modal()
-	{
-
-	}
-
-	Modal::~Modal()
-	{
-
-	}	
-
-	void Modal::showing()
-	{
-		_action = "";
-
-		preShowing();				
-		doShowing();		
-		postShowing();
-	}
-
-	
-
-	void Modal::hiding()
-	{
-		preHiding();		
-		doHiding();
-		postHiding();
-	}
-
-	string Modal::waitAction()
-	{
-		while (_action.empty())
-		{
-			blocking::yield();
-		}
-
-		string act = _action;
-		_action = "";
-
-		return act;
-	}
-
-	void Modal::generateActionByEvent(Event *ev)
-	{
-		generateAction(ev->currentTarget->getName());
-	}
-
-	bool Modal::generateAction(const string &action)
-	{
-		_action = action;
-		return true;
-	}
-
-
-	void Modal::loop()
-	{
-		showing();
-		doLoop();
-		hiding();
-	}
-}

+ 0 - 34
examples/GameTemplate/src/Modal.h

@@ -1,34 +0,0 @@
-#pragma once
-#include "oxygine-framework.h"
-
-namespace oxygine
-{
-	DECLARE_SMART(Modal, spModal);
-	class Modal: public Object
-	{
-	public:
-		Modal();
-		~Modal();
-		
-		void generateActionByEvent(Event *ev);
-		bool generateAction(const string &action);
-
-		void loop();
-		string waitAction();
-
-		virtual void showing();
-		virtual void preShowing(){}
-		virtual void doShowing(){}
-		virtual void postShowing(){}
-
-		virtual void doLoop(){}
-
-		virtual void hiding();
-		virtual void preHiding(){}
-		virtual void doHiding(){}
-		virtual void postHiding(){}		
-
-	protected:		
-		string _action;
-	};
-}

+ 0 - 43
examples/GameTemplate/src/ModalActor.cpp

@@ -1,43 +0,0 @@
-#include "ModalActor.h"
-#include "blocking.h"
-#include "Actor.h"
-
-ModalActor::ModalActor():_timefadeIn(250), _timeFadeOut(250)
-{
-	_actor = new Actor;
-}
-
-ModalActor::~ModalActor()
-{
-
-}
-
-void ModalActor::showing()
-{
-	_actor->setInputEnabled(false);
-	Modal::showing();
-	_actor->setInputEnabled(true);
-}
-
-void ModalActor::hiding()
-{
-	_actor->setInputEnabled(false);
-	Modal::hiding();
-	_actor->setInputEnabled(true);
-}
-
-void ModalActor::doShowing()
-{
-	_actor->setAlpha(0);
-	spTween t = createTween(Actor::TweenAlpha(255), _timefadeIn);
-	_actor->addTween(t);
-	blocking::waitTween(t);
-	
-}
-
-void ModalActor::doHiding()
-{
-	spTween t = createTween(Actor::TweenAlpha(0), _timeFadeOut);
-	_actor->addTween(t);
-	blocking::waitTween(t);
-}

+ 0 - 24
examples/GameTemplate/src/ModalActor.h

@@ -1,24 +0,0 @@
-#pragma once
-#include "Modal.h"
-
-using namespace oxygine;
-DECLARENS_SMART(oxygine, Actor, spActor);
-
-class ModalActor: public Modal
-{
-public:
-	ModalActor();
-	~ModalActor();
-
-	void showing();
-	void hiding();
-
-	void doShowing();
-	void doHiding();
-
-
-
-	timeMS _timefadeIn;
-	timeMS _timeFadeOut;
-	spActor _actor;
-};

+ 0 - 103
examples/GameTemplate/src/Options.cpp

@@ -1,103 +0,0 @@
-#include "core/oxygine.h"
-#include "Options.h"
-#include <vector>
-#include "core/files_io.h"
-
-namespace oxygine
-{
-	Options Options::instance;
-
-
-	struct xml_string_writer: pugi::xml_writer
-	{
-		std::string result;
-
-		virtual void write(const void* data, size_t size)
-		{
-			result += std::string(static_cast<const char*>(data), size);
-		}
-	};
-
-	Options::Options():_path("options.xml")
-	{
-
-	}
-
-	Options::~Options()
-	{
-
-	}
-
-	void Options::setPath(const string &path)
-	{
-		_path = path;
-	}
-
-	void Options::init(const string &version)
-	{
-		_version = version;
-		load();
-		if (_doc.child("options").attribute("version").value() != _version)
-			reset();
-	}
-
-	void Options::reset()
-	{
-		_doc.reset();
-		pugi::xml_node root = _doc.append_child("options");
-		root.append_attribute("version").set_value(_version.c_str());
-	}
-
-
-	void Options::load()
-	{
-		_doc.reset();
-		file::buffer fb;
-		file::read(_path.c_str(), fb, ep_ignore_error);
-		if (fb.getSize())
-			_doc.load_buffer(fb.getData(), fb.getSize());
-	}
-	
-	pugi::xml_attribute Options::addValue(const string &name)
-	{
-		pugi::xml_node root = _doc.child("options");
-		if (!root)
-			root = _doc.append_child("options");
-		pugi::xml_node child = root.child(name.c_str());
-		if (!child)
-			child = root.append_child(name.c_str());
-
-		pugi::xml_attribute attr = child.attribute("value");
-		if (!attr)
-			attr = child.append_attribute("value");
-		else
-			attr = pugi::xml_attribute();
-
-		return attr;
-	}
-
-	pugi::xml_attribute Options::getValue(const string &name)
-	{
-		pugi::xml_node root = _doc.child("options");
-		OX_ASSERT(root);
-		pugi::xml_node child = root.child(name.c_str());
-		OX_ASSERT(child);
-		pugi::xml_attribute attr = child.attribute("value");
-		OX_ASSERT(attr);
-
-		return attr;
-	}
-
-	void Options::save()
-	{
-		xml_string_writer sw;
-		_doc.save(sw);
-
-		int size = sw.result.size();
-		const char *buf = sw.result.c_str();
-
-		file::handle h = file::open(_path.c_str(), "wb");
-		file::write(h, buf, size);
-		file::close(h);
-	}
-}

+ 0 - 36
examples/GameTemplate/src/Options.h

@@ -1,36 +0,0 @@
-#pragma once
-#include <string>
-#include "pugixml/pugixml.hpp"
-
-namespace oxygine
-{
-	using namespace std;
-
-	class Options
-	{
-	public:
-		static Options instance;
-
-		Options();
-		~Options();
-
-		void init(const string &version = "1");
-		void reset();
-		void load();
-		void save();
-
-
-		void setPath(const string &path);
-
-		pugi::xml_node getRoot() const {return _doc.root();}
-
-		pugi::xml_attribute addValue(const string &name);
-		pugi::xml_attribute getValue(const string &name);
-
-
-	private:
-		string _version;
-		string _path;
-		pugi::xml_document _doc;
-	};
-}

+ 0 - 142
examples/GameTemplate/src/OptionsMenu.cpp

@@ -1,142 +0,0 @@
-#include "OptionsMenu.h"
-#include <sstream>
-#include "Options.h"
-#include "shared.h"
-#include "RootActor.h"
-#include "blocking.h"
-
-spOptionsMenu OptionsMenu::instance;
-
-void OptionsApply()
-{
-	int volume = 0;
-	volume = Options::instance.getValue("music").as_int();	
-
-	volume = Options::instance.getValue("sounds").as_int();	
-}
-
-OptionsMenu::OptionsMenu()
-{
-	_timefadeIn = 500;
-	_timeFadeOut = 500;
-
-	EventCallback cb = CLOSURE(this, &OptionsMenu::clickedButton);
-	_music = new ButtonWithText;
-	_sounds = new ButtonWithText;
-	_quality = new ButtonWithText;
-	_back = new ButtonWithText;
-
-	Vector2 pos(virtualSize.x/2.0f, 50);
-	_music->init(getString("options", "music_on"), cb, pos, "music");
-	pos.y += 70;
-	_sounds->init(getString("options", "sounds_on"), cb, pos, "sounds");
-	pos.y += 70;
-	_quality->init(getString("options", "high_quality_on"), cb, pos, "high_quality");
-	pos.y += 70;
-	_back->init(getString("options", "back"), cb, pos, "back");
-
-
-	_actor->addChild(_music);
-	_actor->addChild(_sounds);
-	_actor->addChild(_quality);
-	_actor->addChild(_back);
-
-	int volume = 0;
-	volume = Options::instance.getValue("sounds").as_int();
-	if (!volume)
-		switchButton(_sounds);
-
-	volume = Options::instance.getValue("music").as_int();
-	if (!volume)
-		switchButton(_music);
-
-	bool high = Options::instance.getValue("high_quality").as_bool();
-	if (!high)
-		switchButton(_quality);
-
-	OptionsApply();
-
-	_actor->setSize(getRoot()->getSize());
-	_actor->setAnchor(Vector2(0.5f, 0.5f));
-	_actor->setPosition(getRoot()->getSize()/2);
-}
-
-OptionsMenu::~OptionsMenu()
-{
-
-}
-
-
-void OptionsMenu::doShowing()
-{
-	_actor->setAlpha(0);
-	_actor->setScale(1.0f);
-	_actor->setRotation(0);
-	spTween t = createTween(Actor::TweenAlpha(255), _timefadeIn);
-	spTween rot = createTween(Actor::TweenRotation(MATH_PI*2), _timefadeIn);
-	_actor->addTween(t);
-	_actor->addTween(rot);
-
-	blocking::waitTween(t);
-}
-
-void OptionsMenu::doHiding()
-{
-	spTween t = createTween(Actor::TweenAlpha(0), _timeFadeOut);
-	spTween sc = createTween(Actor::TweenScale(Vector2(10, 10)), _timeFadeOut);
-	_actor->addTween(t);
-	_actor->addTween(sc);
-	blocking::waitTween(t);
-}
-
-void OptionsMenu::clickedButton(Event *event)
-{
-	spActor btn = safeSpCast<Actor>(event->currentTarget);
-	const string &name = btn->getName();
-	if (name == "back")
-		generateActionByEvent(event);
-	if (name == "music")
-	{
-		switchButton(_music);
-
-		int volume = _music->enabled ? 100 : 0;
-		Options::instance.getValue("music").set_value(volume);
-		
-	}
-
-	if (name == "sounds")
-	{
-		switchButton(_sounds);
-
-		int volume = _sounds->enabled ? 100 : 0;
-		Options::instance.getValue("sounds").set_value(volume);		
-	}
-
-	if (name == "high_quality")
-	{
-		switchButton(_quality);
-		Options::instance.getValue("high_quality").set_value(_quality->enabled);
-	}
-
-	Options::instance.save();
-
-	OptionsApply();	
-}
-
-void OptionsMenu::doLoop()
-{
-	while(1)
-	{
-		string action = waitAction();
-
-		if (action == "back")
-			break;
-	}
-}
-
-void OptionsMenu::switchButton(spButtonWithText btn)
-{
-	btn->enabled = !btn->enabled;
-	string s = btn->getName() + (btn->enabled ? "_on" : "_off");
-	btn->setText(getString("options", s.c_str()));
-}

+ 0 - 35
examples/GameTemplate/src/OptionsMenu.h

@@ -1,35 +0,0 @@
-#pragma once
-#include "ModalActor.h"
-#include "MainMenu.h"
-using namespace oxygine;
-
-
-DECLARE_SMART(OptionsMenu, spOptionsMenu);
-
-
-class OptionsMenu: public ModalActor
-{
-public:
-
-	static spOptionsMenu instance;
-
-	OptionsMenu();
-	~OptionsMenu();
-
-	bool isHighQuality(){return _quality->enabled;}
-
-	void doShowing();
-	void doHiding();
-
-private:
-	void clickedButton(Event *event);
-	void doLoop();
-
-	void switchButton(spButtonWithText btn);
-
-
-	spButtonWithText _music;
-	spButtonWithText _sounds;
-	spButtonWithText _quality;
-	spButtonWithText _back;		
-};

+ 0 - 78
examples/GameTemplate/src/example.cpp

@@ -1,78 +0,0 @@
-#include "oxygine-framework.h"
-#include "Options.h"
-#include "shared.h"
-#include "GameActor.h"
-#include "GameMenu.h"
-#include "MainMenu.h"
-#include "OptionsMenu.h"
-using namespace oxygine;
-
-int mainloop();//declared in entry_point.cpp
-
-class Exit
-{
-public:
-
-};
-
-void example_preinit()
-{
-}
-
-void example_init()
-{
-	Point size = core::getDisplaySize();
-
-	//getRoot()->init(size, Point(480, 320));	
-
-	bool high_quality = true;
-
-	//init default options
-	Options::instance.init("1");
-	Options::instance.addValue("high_quality").set_value(high_quality);
-	Options::instance.addValue("sounds").set_value(100);
-	Options::instance.addValue("music").set_value(100);
-
-	initResources();	
-
-	GameActor::initialize();
-
-	GameMenu::instance = new GameMenu();
-	MainMenu::instance = new MainMenu();
-	OptionsMenu::instance = new OptionsMenu();
-
-	blocking::setYieldCallback(mainloop);
-
-	try
-	{
-		spMainMenu mm = MainMenu::instance;
-		getRoot()->addChild(mm->_actor);
-
-		mm->loop();
-	}
-	catch(const Exit &)
-	{
-		printf("exit\n");
-	}
-
-}
-
-
-
-void example_update()
-{
-
-
-}
-
-void example_destroy()
-{
-	GameActor::clean();
-
-	MainMenu::instance = 0;
-	GameMenu::instance = 0;
-	GameActor::instance = 0;
-	OptionsMenu::instance = 0;
-
-	freeResources();
-}

+ 0 - 73
examples/GameTemplate/src/shared.cpp

@@ -1,73 +0,0 @@
-#include "oxygine-framework.h"
-#include "shared.h"
-
-#ifdef MARMALADE
-#include "s3eDevice.h"
-#include "IwUTF8.h"
-#endif
-
-#include <stdio.h>
-
-Point virtualSize(480, 320);
-Resources gameResources;
-TextStyle basicStyle; 
-
-pugi::xml_node strings;
-pugi::xml_document doc;
-
-void initResources()
-{	
-	float scale = getRoot()->getScaleX();
-	/*
-	bool hd = scale > 1.5f;
-
-	if (hd)
-	{
-		file::setExtendedFolder("hd");
-	}
-	*/
-
-	gameResources.loadXML("xmls/res.xml");
-	
-	Font *fontMain = gameResources.getResFont("main24")->getFont();
-	
-	basicStyle.color = Color(64, 0, 128, 255);
-	basicStyle.font = fontMain;
-
-	
-	//if (hd)	
-	//	basicStyle.font->setScaleFactor(2.0f);
-
-	const char *locale_ = "en_GB";
-
-#ifdef MARMALADE
-	locale_ = s3eDeviceGetString(S3E_DEVICE_LOCALE);
-#endif
-
-	printf("locale: %s\n", locale_);
-	file::buffer fb;
-	string fname = string("strings_") + locale_ +".xml";
-	file::read(fname.c_str(), fb);
-	if (!fb.getSize())
-	{
-		file::read("strings_en_GB.xml", fb);
-	}
-
-	doc.load_buffer(&fb.data[0], fb.data.size());
-	strings = doc.first_child();
-}
-
-void freeResources()
-{
-	gameResources.free();
-}
-
-std::string getString(const char *group, const char *id)
-{
-	bool b = strings.empty();
-	pugi::xml_node gr = strings.child(group);
-	b = gr.empty();
-	pugi::xml_node v = gr.child(id); 
-	b = v.empty();
-	return v.first_child().value();
-}

+ 0 - 13
examples/GameTemplate/src/shared.h

@@ -1,13 +0,0 @@
-#pragma once
-#include "oxygine-framework.h"
-using namespace oxygine;
-
-extern Point virtualSize;//display virtual resolution
-
-extern Resources gameResources;
-extern TextStyle basicStyle; 
-
-void initResources();
-void freeResources();
-
-std::string getString(const char *group, const char *id);

BIN
examples/GameTemplate/visual_profiler.png


+ 1 - 1
tools/others/build_oxygine_zip.py

@@ -6,7 +6,7 @@ import zipfile
 dest = "../../temp/oxygine-framework/"
 
 print "cleaning temp..."
-shutil.rmtree("temp", True)
+shutil.rmtree("../../temp", True)
 
 print "hg archive..."
 os.system("hg archive " + dest)