Browse Source

Updating all tutorials to be compatible with the latest Rocket bits

Updated each of the tutorials in the following ways:

- Fixed the path parameter in the Shell::Initialise call in each
tutorial's main.cpp
- Removed PNG files as the Shell render interface only supports TGA
files. Updated references to these PNG files (inline RCSS in the RML
files, or in RCSS files themselves) to reference TGAs in the assets
folder. Copied some assets from the Invaders sample to the Sample
assets where there were missing TGA equivalents.
- Replaced references to EMP namespace with Rocket namespace
- Replaced EMP_* macros with ROCKET_* macros (e.g. ROCKET_UNUSED,
ROCKET_ASSERT)
- Replaced Rocket::Core::DataSource references with
Rocket::Controls::DataSource
- Replaced EMP includes with Rocket includes
Noam Chitayat 13 years ago
parent
commit
a372a9e107
37 changed files with 171 additions and 171 deletions
  1. BIN
      Samples/assets/high_scores_alien_1.tga
  2. BIN
      Samples/assets/high_scores_alien_2.tga
  3. BIN
      Samples/assets/high_scores_alien_3.tga
  4. BIN
      Samples/assets/high_scores_defender.tga
  5. BIN
      Samples/tutorial/datagrid/data/high_scores_defender.png
  6. BIN
      Samples/tutorial/datagrid/data/tutorial.png
  7. 19 19
      Samples/tutorial/datagrid/data/tutorial.rcss
  8. 9 9
      Samples/tutorial/datagrid/src/DecoratorDefender.cpp
  9. 1 1
      Samples/tutorial/datagrid/src/DecoratorDefender.h
  10. 4 4
      Samples/tutorial/datagrid/src/DecoratorInstancerDefender.cpp
  11. 1 1
      Samples/tutorial/datagrid/src/DecoratorInstancerDefender.h
  12. 13 13
      Samples/tutorial/datagrid/src/HighScores.cpp
  13. 4 4
      Samples/tutorial/datagrid/src/HighScores.h
  14. 4 4
      Samples/tutorial/datagrid/src/main.cpp
  15. BIN
      Samples/tutorial/datagrid_tree/data/high_scores_alien_1.png
  16. BIN
      Samples/tutorial/datagrid_tree/data/high_scores_alien_2.png
  17. BIN
      Samples/tutorial/datagrid_tree/data/high_scores_alien_3.png
  18. BIN
      Samples/tutorial/datagrid_tree/data/high_scores_defender.png
  19. BIN
      Samples/tutorial/datagrid_tree/data/tutorial.png
  20. 19 19
      Samples/tutorial/datagrid_tree/data/tutorial.rcss
  21. 16 16
      Samples/tutorial/datagrid_tree/data/tutorial.rml
  22. 9 9
      Samples/tutorial/datagrid_tree/src/DecoratorDefender.cpp
  23. 1 1
      Samples/tutorial/datagrid_tree/src/DecoratorDefender.h
  24. 4 4
      Samples/tutorial/datagrid_tree/src/DecoratorInstancerDefender.cpp
  25. 1 1
      Samples/tutorial/datagrid_tree/src/DecoratorInstancerDefender.h
  26. 21 21
      Samples/tutorial/datagrid_tree/src/HighScores.cpp
  27. 8 8
      Samples/tutorial/datagrid_tree/src/HighScores.h
  28. 5 5
      Samples/tutorial/datagrid_tree/src/HighScoresShipFormatter.cpp
  29. 1 1
      Samples/tutorial/datagrid_tree/src/HighScoresShipFormatter.h
  30. 4 4
      Samples/tutorial/datagrid_tree/src/main.cpp
  31. BIN
      Samples/tutorial/template/data/tutorial.png
  32. 8 8
      Samples/tutorial/template/data/tutorial.rcss
  33. 5 5
      Samples/tutorial/template/src/main.cpp
  34. 1 1
      Samples/tutorial/tutorial_drag/data/tutorial.rcss
  35. 3 3
      Samples/tutorial/tutorial_drag/src/Inventory.cpp
  36. 3 3
      Samples/tutorial/tutorial_drag/src/Inventory.h
  37. 7 7
      Samples/tutorial/tutorial_drag/src/main.cpp

BIN
Samples/assets/high_scores_alien_1.tga


BIN
Samples/assets/high_scores_alien_2.tga


BIN
Samples/assets/high_scores_alien_3.tga


BIN
Samples/assets/high_scores_defender.tga


BIN
Samples/tutorial/datagrid/data/high_scores_defender.png


BIN
Samples/tutorial/datagrid/data/tutorial.png


+ 19 - 19
Samples/tutorial/datagrid/data/tutorial.rcss

@@ -10,14 +10,14 @@ body
 body.window
 body.window
 {
 {
 	background-decorator: tiled-box;
 	background-decorator: tiled-box;
-	background-top-left-image: tutorial.png 0px 0px 133px 140px;
-	background-top-right-image: tutorial.png 136px 0px 146px 140px;
-	background-top-image: tutorial.png stretch 134px 0px 135px 140px;
-	background-bottom-left-image: tutorial.png 0px 140px 11px 151px;
-	background-bottom-right-image: tutorial.png 136px 140px 146px 151px;
-	background-bottom-image: tutorial.png stretch 11px 140px 12px 151px;
-	background-left-image: tutorial.png stretch 0px 139px 10px 140px;
-	background-center-image: tutorial.png stretch 11px 139px 12px 140px;
+	background-top-left-image: ../../../assets/invader.tga 0px 0px 133px 140px;
+	background-top-right-image: ../../../assets/invader.tga 136px 0px 146px 140px;
+	background-top-image: ../../../assets/invader.tga stretch 134px 0px 135px 140px;
+	background-bottom-left-image: ../../../assets/invader.tga 0px 140px 11px 151px;
+	background-bottom-right-image: ../../../assets/invader.tga 136px 140px 146px 151px;
+	background-bottom-image: ../../../assets/invader.tga stretch 11px 140px 12px 151px;
+	background-left-image: ../../../assets/invader.tga stretch 0px 139px 10px 140px;
+	background-center-image: ../../../assets/invader.tga stretch 11px 139px 12px 140px;
 	
 	
 	padding: 10px 15px;
 	padding: 10px 15px;
 }
 }
@@ -41,9 +41,9 @@ div#title-bar span
 	text-shadow: 2px 2px black;
 	text-shadow: 2px 2px black;
 
 
 	background-decorator: tiled-horizontal;
 	background-decorator: tiled-horizontal;
-	background-left-image: tutorial.png 147px 0px 229px 85px;
-	background-center-image: tutorial.png stretch 229px 0px 230px 85px;
-	background-right-image: tutorial.png 231px 0px 246px 85px;
+	background-left-image: ../../../assets/invader.tga 147px 0px 229px 85px;
+	background-center-image: ../../../assets/invader.tga stretch 229px 0px 230px 85px;
+	background-right-image: ../../../assets/invader.tga 231px 0px 246px 85px;
 }
 }
 
 
 div#content
 div#content
@@ -65,9 +65,9 @@ scrollbarvertical
 scrollbarvertical slidertrack
 scrollbarvertical slidertrack
 {
 {
 	background-decorator: tiled-vertical;
 	background-decorator: tiled-vertical;
-	background-top-image: tutorial.png 56px 199px 83px 201px;
-	background-center-image: tutorial.png stretch 56px 201px 83px 202px;
-	background-bottom-image: tutorial.png 56px 203px 83px 204px;
+	background-top-image: ../../../assets/invader.tga 56px 199px 83px 201px;
+	background-center-image: ../../../assets/invader.tga stretch 56px 201px 83px 202px;
+	background-bottom-image: ../../../assets/invader.tga 56px 203px 83px 204px;
 }
 }
 
 
 scrollbarvertical sliderbar
 scrollbarvertical sliderbar
@@ -77,9 +77,9 @@ scrollbarvertical sliderbar
 	min-height: 46px;
 	min-height: 46px;
 
 
 	background-decorator: tiled-vertical;
 	background-decorator: tiled-vertical;
-	background-top-image: tutorial.png 56px 152px 79px 175px;
-	background-center-image: tutorial.png stretch 56px 175px 79px 175px;
-	background-bottom-image: tutorial.png 56px 176px 79px 198px;
+	background-top-image: ../../../assets/invader.tga 56px 152px 79px 175px;
+	background-center-image: ../../../assets/invader.tga stretch 56px 175px 79px 175px;
+	background-bottom-image: ../../../assets/invader.tga 56px 176px 79px 198px;
 }
 }
 
 
 scrollbarvertical sliderbar:hover
 scrollbarvertical sliderbar:hover
@@ -106,13 +106,13 @@ scrollbarvertical sliderarrowinc
 scrollbarvertical sliderarrowdec
 scrollbarvertical sliderarrowdec
 {
 {
 	icon-decorator: image;
 	icon-decorator: image;
-	icon-image: tutorial.png 0px 152px 27px 176px;
+	icon-image: ../../../assets/invader.tga 0px 152px 27px 176px;
 }
 }
 
 
 scrollbarvertical sliderarrowinc
 scrollbarvertical sliderarrowinc
 {
 {
 	icon-decorator: image;
 	icon-decorator: image;
-	icon-image: tutorial.png 28px 152px 55px 176px;
+	icon-image: ../../../assets/invader.tga 28px 152px 55px 176px;
 }
 }
 
 
 scrollbarvertical sliderarrowdec:hover,
 scrollbarvertical sliderarrowdec:hover,

+ 9 - 9
Samples/tutorial/datagrid/src/DecoratorDefender.cpp

@@ -10,7 +10,7 @@
  */
  */
 
 
 #include "DecoratorDefender.h"
 #include "DecoratorDefender.h"
-#include <EMP/Core/Math.h>
+#include <Rocket/Core/Math.h>
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/Texture.h>
 #include <Rocket/Core/Texture.h>
 #include <ShellOpenGL.h>
 #include <ShellOpenGL.h>
@@ -19,7 +19,7 @@ DecoratorDefender::~DecoratorDefender()
 {
 {
 }
 }
 
 
-bool DecoratorDefender::Initialise(const EMP::Core::String& image_source, const EMP::Core::String& image_path)
+bool DecoratorDefender::Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path)
 {
 {
 	image_index = LoadTexture(image_source, image_path);
 	image_index = LoadTexture(image_source, image_path);
 	if (image_index == -1)
 	if (image_index == -1)
@@ -31,26 +31,26 @@ bool DecoratorDefender::Initialise(const EMP::Core::String& image_source, const
 }
 }
 
 
 /// Called on a decorator to generate any required per-element data for a newly decorated element.
 /// Called on a decorator to generate any required per-element data for a newly decorated element.
-Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* EMP_UNUSED(element))
+Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* ROCKET_UNUSED(element))
 {
 {
 	return NULL;
 	return NULL;
 }
 }
 
 
 // Called to release element data generated by this decorator.
 // Called to release element data generated by this decorator.
-void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 {
 }
 }
 
 
 // Called to render the decorator on an element.
 // Called to render the decorator on an element.
-void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 {
-	EMP::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING);
-	EMP::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING);
+	Rocket::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING);
+	Rocket::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING);
 
 
 	glEnable(GL_TEXTURE_2D);
 	glEnable(GL_TEXTURE_2D);
 	glBindTexture(GL_TEXTURE_2D, (GLuint) GetTexture(image_index)->GetHandle(element->GetRenderInterface()));
 	glBindTexture(GL_TEXTURE_2D, (GLuint) GetTexture(image_index)->GetHandle(element->GetRenderInterface()));
-	EMP::Core::Colourb colour = element->GetProperty< EMP::Core::Colourb >("color");
-	glColor4ubv(element->GetProperty< EMP::Core::Colourb >("color"));
+	Rocket::Core::Colourb colour = element->GetProperty< Rocket::Core::Colourb >("color");
+	glColor4ubv(element->GetProperty< Rocket::Core::Colourb >("color"));
 	glBegin(GL_QUADS);
 	glBegin(GL_QUADS);
 
 
 		glVertex2f(position.x, position.y);
 		glVertex2f(position.x, position.y);

+ 1 - 1
Samples/tutorial/datagrid/src/DecoratorDefender.h

@@ -24,7 +24,7 @@ class DecoratorDefender : public Rocket::Core::Decorator
 public:
 public:
 	virtual ~DecoratorDefender();
 	virtual ~DecoratorDefender();
 
 
-	bool Initialise(const EMP::Core::String& image_source, const EMP::Core::String& image_path);
+	bool Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path);
 
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
 	/// @param element[in] The newly decorated element.

+ 4 - 4
Samples/tutorial/datagrid/src/DecoratorInstancerDefender.cpp

@@ -10,8 +10,8 @@
  */
  */
 
 
 #include "DecoratorInstancerDefender.h"
 #include "DecoratorInstancerDefender.h"
-#include <EMP/Core/Math.h>
-#include <EMP/Core/String.h>
+#include <Rocket/Core/Math.h>
+#include <Rocket/Core/String.h>
 #include "DecoratorDefender.h"
 #include "DecoratorDefender.h"
 
 
 DecoratorInstancerDefender::DecoratorInstancerDefender()
 DecoratorInstancerDefender::DecoratorInstancerDefender()
@@ -24,10 +24,10 @@ DecoratorInstancerDefender::~DecoratorInstancerDefender()
 }
 }
 
 
 // Instances a decorator given the property tag and attributes from the RCSS file.
 // Instances a decorator given the property tag and attributes from the RCSS file.
-Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const EMP::Core::String& EMP_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
+Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
 {
 {
 	const Rocket::Core::Property* image_source_property = properties.GetProperty("image-src");
 	const Rocket::Core::Property* image_source_property = properties.GetProperty("image-src");
-	EMP::Core::String image_source = image_source_property->Get< EMP::Core::String >();
+	Rocket::Core::String image_source = image_source_property->Get< Rocket::Core::String >();
 
 
 	DecoratorDefender* decorator = new DecoratorDefender();
 	DecoratorDefender* decorator = new DecoratorDefender();
 	if (decorator->Initialise(image_source, image_source_property->source))
 	if (decorator->Initialise(image_source, image_source_property->source))

+ 1 - 1
Samples/tutorial/datagrid/src/DecoratorInstancerDefender.h

@@ -29,7 +29,7 @@ public:
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param properties All RCSS properties associated with the decorator.
 	/// @param properties All RCSS properties associated with the decorator.
 	/// @return The decorator if it was instanced successful, NULL if an error occured.
 	/// @return The decorator if it was instanced successful, NULL if an error occured.
-	Rocket::Core::Decorator* InstanceDecorator(const EMP::Core::String& name, const Rocket::Core::PropertyDictionary& properties);
+	Rocket::Core::Decorator* InstanceDecorator(const Rocket::Core::String& name, const Rocket::Core::PropertyDictionary& properties);
 	/// Releases the given decorator.
 	/// Releases the given decorator.
 	/// @param decorator Decorator to release. This is guaranteed to have been constructed by this instancer.
 	/// @param decorator Decorator to release. This is guaranteed to have been constructed by this instancer.
 	void ReleaseDecorator(Rocket::Core::Decorator* decorator);
 	void ReleaseDecorator(Rocket::Core::Decorator* decorator);

+ 13 - 13
Samples/tutorial/datagrid/src/HighScores.cpp

@@ -10,8 +10,8 @@
  */
  */
 
 
 #include "HighScores.h"
 #include "HighScores.h"
-#include <EMP/Core/StringUtilities.h>
-#include <EMP/Core/TypeConverter.h>
+#include <Rocket/Core/StringUtilities.h>
+#include <Rocket/Core/TypeConverter.h>
 #include <Rocket/Core.h>
 #include <Rocket/Core.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
@@ -19,7 +19,7 @@ HighScores* HighScores::instance = NULL;
 
 
 HighScores::HighScores()
 HighScores::HighScores()
 {
 {
-	EMP_ASSERT(instance == NULL);
+	ROCKET_ASSERT(instance == NULL);
 	instance = this;
 	instance = this;
 
 
 	for (int i = 0; i < NUM_SCORES; i++)
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -32,7 +32,7 @@ HighScores::HighScores()
 
 
 HighScores::~HighScores()
 HighScores::~HighScores()
 {
 {
-	EMP_ASSERT(instance == this);
+	ROCKET_ASSERT(instance == this);
 	instance = NULL;
 	instance = NULL;
 }
 }
 
 
@@ -46,7 +46,7 @@ void HighScores::Shutdown()
 	delete instance;
 	delete instance;
 }
 }
 
 
-void HighScores::SubmitScore(const EMP::Core::String& name, const EMP::Core::Colourb& colour, int wave, int score)
+void HighScores::SubmitScore(const Rocket::Core::String& name, const Rocket::Core::Colourb& colour, int wave, int score)
 {
 {
 	for (size_t i = 0; i < NUM_SCORES; i++)
 	for (size_t i = 0; i < NUM_SCORES; i++)
 	{
 	{
@@ -88,23 +88,23 @@ void HighScores::LoadScores()
 			file_interface->Close(scores_file);
 			file_interface->Close(scores_file);
 			buffer[scores_length] = 0;
 			buffer[scores_length] = 0;
 
 
-			EMP::Core::StringList score_lines;
-			EMP::Core::StringUtilities::ExpandString(score_lines, buffer, '\n');
+			Rocket::Core::StringList score_lines;
+			Rocket::Core::StringUtilities::ExpandString(score_lines, buffer, '\n');
 			delete[] buffer;
 			delete[] buffer;
 			
 			
 			for (size_t i = 0; i < score_lines.size(); i++)
 			for (size_t i = 0; i < score_lines.size(); i++)
 			{
 			{
-				EMP::Core::StringList score_parts;
-				EMP::Core::StringUtilities::ExpandString(score_parts, score_lines[i], '\t');
+				Rocket::Core::StringList score_parts;
+				Rocket::Core::StringUtilities::ExpandString(score_parts, score_lines[i], '\t');
 				if (score_parts.size() == 4)
 				if (score_parts.size() == 4)
 				{
 				{
-					EMP::Core::Colourb colour;
+					Rocket::Core::Colourb colour;
 					int wave;
 					int wave;
 					int score;
 					int score;
 
 
-					if (EMP::Core::TypeConverter< EMP::Core::String , EMP::Core::Colourb >::Convert(score_parts[1], colour) &&
-						EMP::Core::TypeConverter< EMP::Core::String, int >::Convert(score_parts[2], wave) &&
-						EMP::Core::TypeConverter< EMP::Core::String, int >::Convert(score_parts[3], score))
+					if (Rocket::Core::TypeConverter< Rocket::Core::String , Rocket::Core::Colourb >::Convert(score_parts[1], colour) &&
+						Rocket::Core::TypeConverter< Rocket::Core::String, int >::Convert(score_parts[2], wave) &&
+						Rocket::Core::TypeConverter< Rocket::Core::String, int >::Convert(score_parts[3], score))
 					{
 					{
 						SubmitScore(score_parts[0], colour, wave, score);
 						SubmitScore(score_parts[0], colour, wave, score);
 					}
 					}

+ 4 - 4
Samples/tutorial/datagrid/src/HighScores.h

@@ -12,7 +12,7 @@
 #ifndef HIGHSCORES_H
 #ifndef HIGHSCORES_H
 #define HIGHSCORES_H
 #define HIGHSCORES_H
 
 
-#include <EMP/Core/Types.h>
+#include <Rocket/Core/Types.h>
 
 
 const int NUM_SCORES = 10;
 const int NUM_SCORES = 10;
 
 
@@ -33,13 +33,13 @@ private:
 
 
 	static HighScores* instance;
 	static HighScores* instance;
 
 
-	void SubmitScore(const EMP::Core::String& name, const EMP::Core::Colourb& colour, int wave, int score);
+	void SubmitScore(const Rocket::Core::String& name, const Rocket::Core::Colourb& colour, int wave, int score);
 	void LoadScores();
 	void LoadScores();
 
 
 	struct Score
 	struct Score
 	{
 	{
-		EMP::Core::String name;
-		EMP::Core::Colourb colour;
+		Rocket::Core::String name;
+		Rocket::Core::Colourb colour;
 		int score;
 		int score;
 		int wave;
 		int wave;
 	};
 	};

+ 4 - 4
Samples/tutorial/datagrid/src/main.cpp

@@ -31,13 +31,13 @@ void GameLoop()
 
 
 #if defined EMP_PLATFORM_WIN32
 #if defined EMP_PLATFORM_WIN32
 #include <windows.h>
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 #endif
 {
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.
 	// Generic OS initialisation, creates a window and attaches OpenGL.
-	if (!Shell::Initialise("../../projects/Rocket/samples/tutorials/datagrid/") ||
+	if (!Shell::Initialise("../Samples/tutorial/datagrid/") ||
 		!Shell::OpenWindow("Datagrid Tutorial", true))
 		!Shell::OpenWindow("Datagrid Tutorial", true))
 	{
 	{
 		Shell::Shutdown();
 		Shell::Shutdown();
@@ -55,7 +55,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Rocket::Controls::Initialise();
 	Rocket::Controls::Initialise();
 
 
 	// Create the main Rocket context and set it on the shell's input layer.
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
 	if (context == NULL)
 	if (context == NULL)
 	{
 	{
 		Rocket::Core::Shutdown();
 		Rocket::Core::Shutdown();

BIN
Samples/tutorial/datagrid_tree/data/high_scores_alien_1.png


BIN
Samples/tutorial/datagrid_tree/data/high_scores_alien_2.png


BIN
Samples/tutorial/datagrid_tree/data/high_scores_alien_3.png


BIN
Samples/tutorial/datagrid_tree/data/high_scores_defender.png


BIN
Samples/tutorial/datagrid_tree/data/tutorial.png


+ 19 - 19
Samples/tutorial/datagrid_tree/data/tutorial.rcss

@@ -10,14 +10,14 @@ body
 body.window
 body.window
 {
 {
 	background-decorator: tiled-box;
 	background-decorator: tiled-box;
-	background-top-left-image: tutorial.png 0px 0px 133px 140px;
-	background-top-right-image: tutorial.png 136px 0px 146px 140px;
-	background-top-image: tutorial.png stretch 134px 0px 135px 140px;
-	background-bottom-left-image: tutorial.png 0px 140px 11px 151px;
-	background-bottom-right-image: tutorial.png 136px 140px 146px 151px;
-	background-bottom-image: tutorial.png stretch 11px 140px 12px 151px;
-	background-left-image: tutorial.png stretch 0px 139px 10px 140px;
-	background-center-image: tutorial.png stretch 11px 139px 12px 140px;
+	background-top-left-image: ../../../assets/invader.tga 0px 0px 133px 140px;
+	background-top-right-image: ../../../assets/invader.tga 136px 0px 146px 140px;
+	background-top-image: ../../../assets/invader.tga stretch 134px 0px 135px 140px;
+	background-bottom-left-image: ../../../assets/invader.tga 0px 140px 11px 151px;
+	background-bottom-right-image: ../../../assets/invader.tga 136px 140px 146px 151px;
+	background-bottom-image: ../../../assets/invader.tga stretch 11px 140px 12px 151px;
+	background-left-image: ../../../assets/invader.tga stretch 0px 139px 10px 140px;
+	background-center-image: ../../../assets/invader.tga stretch 11px 139px 12px 140px;
 	
 	
 	padding: 10px 15px;
 	padding: 10px 15px;
 }
 }
@@ -41,9 +41,9 @@ div#title-bar span
 	text-shadow: 2px 2px black;
 	text-shadow: 2px 2px black;
 
 
 	background-decorator: tiled-horizontal;
 	background-decorator: tiled-horizontal;
-	background-left-image: tutorial.png 147px 0px 229px 85px;
-	background-center-image: tutorial.png stretch 229px 0px 230px 85px;
-	background-right-image: tutorial.png 231px 0px 246px 85px;
+	background-left-image: ../../../assets/invader.tga 147px 0px 229px 85px;
+	background-center-image: ../../../assets/invader.tga stretch 229px 0px 230px 85px;
+	background-right-image: ../../../assets/invader.tga 231px 0px 246px 85px;
 }
 }
 
 
 div#content
 div#content
@@ -65,9 +65,9 @@ scrollbarvertical
 scrollbarvertical slidertrack
 scrollbarvertical slidertrack
 {
 {
 	background-decorator: tiled-vertical;
 	background-decorator: tiled-vertical;
-	background-top-image: tutorial.png 56px 199px 83px 201px;
-	background-center-image: tutorial.png stretch 56px 201px 83px 202px;
-	background-bottom-image: tutorial.png 56px 203px 83px 204px;
+	background-top-image: ../../../assets/invader.tga 56px 199px 83px 201px;
+	background-center-image: ../../../assets/invader.tga stretch 56px 201px 83px 202px;
+	background-bottom-image: ../../../assets/invader.tga 56px 203px 83px 204px;
 }
 }
 
 
 scrollbarvertical sliderbar
 scrollbarvertical sliderbar
@@ -77,9 +77,9 @@ scrollbarvertical sliderbar
 	min-height: 46px;
 	min-height: 46px;
 
 
 	background-decorator: tiled-vertical;
 	background-decorator: tiled-vertical;
-	background-top-image: tutorial.png 56px 152px 79px 175px;
-	background-center-image: tutorial.png stretch 56px 175px 79px 175px;
-	background-bottom-image: tutorial.png 56px 176px 79px 198px;
+	background-top-image: ../../../assets/invader.tga 56px 152px 79px 175px;
+	background-center-image: ../../../assets/invader.tga stretch 56px 175px 79px 175px;
+	background-bottom-image: ../../../assets/invader.tga 56px 176px 79px 198px;
 }
 }
 
 
 scrollbarvertical sliderbar:hover
 scrollbarvertical sliderbar:hover
@@ -106,13 +106,13 @@ scrollbarvertical sliderarrowinc
 scrollbarvertical sliderarrowdec
 scrollbarvertical sliderarrowdec
 {
 {
 	icon-decorator: image;
 	icon-decorator: image;
-	icon-image: tutorial.png 0px 152px 27px 176px;
+	icon-image: ../../../assets/invader.tga 0px 152px 27px 176px;
 }
 }
 
 
 scrollbarvertical sliderarrowinc
 scrollbarvertical sliderarrowinc
 {
 {
 	icon-decorator: image;
 	icon-decorator: image;
-	icon-image: tutorial.png 28px 152px 55px 176px;
+	icon-image: ../../../assets/invader.tga 28px 152px 55px 176px;
 }
 }
 
 
 scrollbarvertical sliderarrowdec:hover,
 scrollbarvertical sliderarrowdec:hover,

+ 16 - 16
Samples/tutorial/datagrid_tree/data/tutorial.rml

@@ -18,22 +18,22 @@
 			height: 16px;
 			height: 16px;
 			
 			
 			defender-decorator: defender;
 			defender-decorator: defender;
-			defender-image-src: high_scores_defender.png;
+			defender-image-src: ../../../assets/high_scores_defender.tga;
 		}
 		}
 		
 		
 		defender.alien_1
 		defender.alien_1
 		{
 		{
-			defender-image-src: high_scores_alien_1.png;
+			defender-image-src: ../../../assets/high_scores_alien_1.tga;
 		}
 		}
 		
 		
 		defender.alien_2
 		defender.alien_2
 		{
 		{
-			defender-image-src: high_scores_alien_2.png;
+			defender-image-src: ../../../assets/high_scores_alien_2.tga;
 		}
 		}
 		
 		
 		defender.alien_3
 		defender.alien_3
 		{
 		{
-			defender-image-src: high_scores_alien_3.png;
+			defender-image-src: ../../../assets/high_scores_alien_3.tga;
 		}
 		}
 		
 		
 		datagridheader
 		datagridheader
@@ -43,9 +43,9 @@
 			padding: 5px 10px 0px 10px;
 			padding: 5px 10px 0px 10px;
 		
 		
 			background-decorator: tiled-horizontal;
 			background-decorator: tiled-horizontal;
-			background-left-image: ../../../assets/invader.png 127px 192px 143px 223px;
-			background-center-image: ../../../assets/invader.png stretch 143px 192px 145px 223px;
-			background-right-image: ../../../assets/invader.png 145px 192px 160px 223px;
+			background-left-image: ../../../assets/invader.tga 127px 192px 143px 223px;
+			background-center-image: ../../../assets/invader.tga stretch 143px 192px 145px 223px;
+			background-right-image: ../../../assets/invader.tga 145px 192px 160px 223px;
 		}
 		}
 		
 		
 		datagridbody
 		datagridbody
@@ -58,14 +58,14 @@
 			padding: 0px 4px 4px 4px;
 			padding: 0px 4px 4px 4px;
 			
 			
 			background-decorator: tiled-box;
 			background-decorator: tiled-box;
-			background-top-left-image: ../../../assets/invader.png 281px 275px 292px 284px;
-			background-top-right-image: ../../../assets/invader.png 294px 275px 305px 284px;
-			background-top-image: ../../../assets/invader.png stretch 292px 275px 293px 284px;
-			background-bottom-left-image: ../../../assets/invader.png 281px 285px 292px 296px;
-			background-bottom-right-image: ../../../assets/invader.png 294px 285px 305px 296px;
-			background-bottom-image: ../../../assets/invader.png stretch 292px 285px 293px 296px;
-			background-left-image: ../../../assets/invader.png stretch 281px 283px 292px 284px;
-			background-center-image: ../../../assets/invader.png stretch 292px 283px 293px 284px;
+			background-top-left-image: ../../../assets/invader.tga 281px 275px 292px 284px;
+			background-top-right-image: ../../../assets/invader.tga 294px 275px 305px 284px;
+			background-top-image: ../../../assets/invader.tga stretch 292px 275px 293px 284px;
+			background-bottom-left-image: ../../../assets/invader.tga 281px 285px 292px 296px;
+			background-bottom-right-image: ../../../assets/invader.tga 294px 285px 305px 296px;
+			background-bottom-image: ../../../assets/invader.tga stretch 292px 285px 293px 296px;
+			background-left-image: ../../../assets/invader.tga stretch 281px 283px 292px 284px;
+			background-center-image: ../../../assets/invader.tga stretch 292px 283px 293px 284px;
 		}
 		}
 		
 		
 		datagrid datagridrow:nth-child(even)
 		datagrid datagridrow:nth-child(even)
@@ -82,7 +82,7 @@
 			width: 17px;
 			width: 17px;
 			
 			
 			icon-decorator: image;
 			icon-decorator: image;
-			icon-image: ../../../assets/invader.png 3px 232px 20px 249px;
+			icon-image: ../../../assets/invader.tga 3px 232px 20px 249px;
 		}
 		}
 		
 		
 		datagridexpand:hover
 		datagridexpand:hover

+ 9 - 9
Samples/tutorial/datagrid_tree/src/DecoratorDefender.cpp

@@ -10,7 +10,7 @@
  */
  */
 
 
 #include "DecoratorDefender.h"
 #include "DecoratorDefender.h"
-#include <EMP/Core/Math.h>
+#include <Rocket/Core/Math.h>
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/Texture.h>
 #include <Rocket/Core/Texture.h>
 #include <ShellOpenGL.h>
 #include <ShellOpenGL.h>
@@ -19,7 +19,7 @@ DecoratorDefender::~DecoratorDefender()
 {
 {
 }
 }
 
 
-bool DecoratorDefender::Initialise(const EMP::Core::String& image_source, const EMP::Core::String& image_path)
+bool DecoratorDefender::Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path)
 {
 {
 	image_index = LoadTexture(image_source, image_path);
 	image_index = LoadTexture(image_source, image_path);
 	if (image_index == -1)
 	if (image_index == -1)
@@ -31,26 +31,26 @@ bool DecoratorDefender::Initialise(const EMP::Core::String& image_source, const
 }
 }
 
 
 /// Called on a decorator to generate any required per-element data for a newly decorated element.
 /// Called on a decorator to generate any required per-element data for a newly decorated element.
-Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* EMP_UNUSED(element))
+Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* ROCKET_UNUSED(element))
 {
 {
 	return NULL;
 	return NULL;
 }
 }
 
 
 // Called to release element data generated by this decorator.
 // Called to release element data generated by this decorator.
-void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 {
 }
 }
 
 
 // Called to render the decorator on an element.
 // Called to render the decorator on an element.
-void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 {
-	EMP::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING);
-	EMP::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING);
+	Rocket::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING);
+	Rocket::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING);
 
 
 	glEnable(GL_TEXTURE_2D);
 	glEnable(GL_TEXTURE_2D);
 	glBindTexture(GL_TEXTURE_2D, (GLuint) GetTexture(image_index)->GetHandle(element->GetRenderInterface()));
 	glBindTexture(GL_TEXTURE_2D, (GLuint) GetTexture(image_index)->GetHandle(element->GetRenderInterface()));
-	EMP::Core::Colourb colour = element->GetProperty< EMP::Core::Colourb >("color");
-	glColor4ubv(element->GetProperty< EMP::Core::Colourb >("color"));
+	Rocket::Core::Colourb colour = element->GetProperty< Rocket::Core::Colourb >("color");
+	glColor4ubv(element->GetProperty< Rocket::Core::Colourb >("color"));
 	glBegin(GL_QUADS);
 	glBegin(GL_QUADS);
 
 
 		glVertex2f(position.x, position.y);
 		glVertex2f(position.x, position.y);

+ 1 - 1
Samples/tutorial/datagrid_tree/src/DecoratorDefender.h

@@ -24,7 +24,7 @@ class DecoratorDefender : public Rocket::Core::Decorator
 public:
 public:
 	virtual ~DecoratorDefender();
 	virtual ~DecoratorDefender();
 
 
-	bool Initialise(const EMP::Core::String& image_source, const EMP::Core::String& image_path);
+	bool Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path);
 
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
 	/// @param element[in] The newly decorated element.

+ 4 - 4
Samples/tutorial/datagrid_tree/src/DecoratorInstancerDefender.cpp

@@ -10,8 +10,8 @@
  */
  */
 
 
 #include "DecoratorInstancerDefender.h"
 #include "DecoratorInstancerDefender.h"
-#include <EMP/Core/Math.h>
-#include <EMP/Core/String.h>
+#include <Rocket/Core/Math.h>
+#include <Rocket/Core/String.h>
 #include "DecoratorDefender.h"
 #include "DecoratorDefender.h"
 
 
 DecoratorInstancerDefender::DecoratorInstancerDefender()
 DecoratorInstancerDefender::DecoratorInstancerDefender()
@@ -24,10 +24,10 @@ DecoratorInstancerDefender::~DecoratorInstancerDefender()
 }
 }
 
 
 // Instances a decorator given the property tag and attributes from the RCSS file.
 // Instances a decorator given the property tag and attributes from the RCSS file.
-Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const EMP::Core::String& EMP_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
+Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
 {
 {
 	const Rocket::Core::Property* image_source_property = properties.GetProperty("image-src");
 	const Rocket::Core::Property* image_source_property = properties.GetProperty("image-src");
-	EMP::Core::String image_source = image_source_property->Get< EMP::Core::String >();
+	Rocket::Core::String image_source = image_source_property->Get< Rocket::Core::String >();
 
 
 	DecoratorDefender* decorator = new DecoratorDefender();
 	DecoratorDefender* decorator = new DecoratorDefender();
 	if (decorator->Initialise(image_source, image_source_property->source))
 	if (decorator->Initialise(image_source, image_source_property->source))

+ 1 - 1
Samples/tutorial/datagrid_tree/src/DecoratorInstancerDefender.h

@@ -29,7 +29,7 @@ public:
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param properties All RCSS properties associated with the decorator.
 	/// @param properties All RCSS properties associated with the decorator.
 	/// @return The decorator if it was instanced successful, NULL if an error occured.
 	/// @return The decorator if it was instanced successful, NULL if an error occured.
-	Rocket::Core::Decorator* InstanceDecorator(const EMP::Core::String& name, const Rocket::Core::PropertyDictionary& properties);
+	Rocket::Core::Decorator* InstanceDecorator(const Rocket::Core::String& name, const Rocket::Core::PropertyDictionary& properties);
 	/// Releases the given decorator.
 	/// Releases the given decorator.
 	/// @param decorator Decorator to release. This is guaranteed to have been constructed by this instancer.
 	/// @param decorator Decorator to release. This is guaranteed to have been constructed by this instancer.
 	void ReleaseDecorator(Rocket::Core::Decorator* decorator);
 	void ReleaseDecorator(Rocket::Core::Decorator* decorator);

+ 21 - 21
Samples/tutorial/datagrid_tree/src/HighScores.cpp

@@ -10,8 +10,8 @@
  */
  */
 
 
 #include "HighScores.h"
 #include "HighScores.h"
-#include <EMP/Core/StringUtilities.h>
-#include <EMP/Core/TypeConverter.h>
+#include <Rocket/Core/StringUtilities.h>
+#include <Rocket/Core/TypeConverter.h>
 #include <Rocket/Core.h>
 #include <Rocket/Core.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
@@ -20,9 +20,9 @@ static int ALIEN_SCORES[] = { 10, 20, 40 };
 
 
 HighScores* HighScores::instance = NULL;
 HighScores* HighScores::instance = NULL;
 
 
-HighScores::HighScores() : EMP::Core::DataSource("high_scores")
+HighScores::HighScores() : Rocket::Controls::DataSource("high_scores")
 {
 {
-	EMP_ASSERT(instance == NULL);
+	ROCKET_ASSERT(instance == NULL);
 	instance = this;
 	instance = this;
 
 
 	for (int i = 0; i < NUM_SCORES; i++)
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -35,7 +35,7 @@ HighScores::HighScores() : EMP::Core::DataSource("high_scores")
 
 
 HighScores::~HighScores()
 HighScores::~HighScores()
 {
 {
-	EMP_ASSERT(instance == this);
+	ROCKET_ASSERT(instance == this);
 	instance = NULL;
 	instance = NULL;
 }
 }
 
 
@@ -49,7 +49,7 @@ void HighScores::Shutdown()
 	delete instance;
 	delete instance;
 }
 }
 
 
-void HighScores::GetRow(EMP::Core::StringList& row, const EMP::Core::String& table, int row_index, const EMP::Core::StringList& columns)
+void HighScores::GetRow(Rocket::Core::StringList& row, const Rocket::Core::String& table, int row_index, const Rocket::Core::StringList& columns)
 {
 {
 	if (table == "scores")
 	if (table == "scores")
 	{
 	{
@@ -61,23 +61,23 @@ void HighScores::GetRow(EMP::Core::StringList& row, const EMP::Core::String& tab
 			}
 			}
 			else if (columns[i] == "score")
 			else if (columns[i] == "score")
 			{
 			{
-				row.push_back(EMP::Core::String(32, "%d", scores[row_index].score));
+				row.push_back(Rocket::Core::String(32, "%d", scores[row_index].score));
 			}
 			}
 			else if (columns[i] == "colour")
 			else if (columns[i] == "colour")
 			{
 			{
-				EMP::Core::String colour_string;
-				EMP::Core::TypeConverter< EMP::Core::Colourb, EMP::Core::String >::Convert(scores[row_index].colour, colour_string);
+				Rocket::Core::String colour_string;
+				Rocket::Core::TypeConverter< Rocket::Core::Colourb, Rocket::Core::String >::Convert(scores[row_index].colour, colour_string);
 				row.push_back(colour_string);
 				row.push_back(colour_string);
 			}
 			}
 			else if (columns[i] == "wave")
 			else if (columns[i] == "wave")
 			{
 			{
-				row.push_back(EMP::Core::String(8, "%d", scores[row_index].wave));
+				row.push_back(Rocket::Core::String(8, "%d", scores[row_index].wave));
 			}
 			}
 		}
 		}
 	}
 	}
 }
 }
 
 
-int HighScores::GetNumRows(const EMP::Core::String& table)
+int HighScores::GetNumRows(const Rocket::Core::String& table)
 {
 {
 	if (table == "scores")
 	if (table == "scores")
 	{
 	{
@@ -95,7 +95,7 @@ int HighScores::GetNumRows(const EMP::Core::String& table)
 	return 0;
 	return 0;
 }
 }
 
 
-void HighScores::SubmitScore(const EMP::Core::String& name, const EMP::Core::Colourb& colour, int wave, int score, int alien_kills[])
+void HighScores::SubmitScore(const Rocket::Core::String& name, const Rocket::Core::Colourb& colour, int wave, int score, int alien_kills[])
 {
 {
 	for (size_t i = 0; i < NUM_SCORES; i++)
 	for (size_t i = 0; i < NUM_SCORES; i++)
 	{
 	{
@@ -144,28 +144,28 @@ void HighScores::LoadScores()
 			file_interface->Close(scores_file);
 			file_interface->Close(scores_file);
 			buffer[scores_length] = 0;
 			buffer[scores_length] = 0;
 
 
-			EMP::Core::StringList score_lines;
-			EMP::Core::StringUtilities::ExpandString(score_lines, buffer, '\n');
+			Rocket::Core::StringList score_lines;
+			Rocket::Core::StringUtilities::ExpandString(score_lines, buffer, '\n');
 			delete[] buffer;
 			delete[] buffer;
 
 
 			for (size_t i = 0; i < score_lines.size(); i++)
 			for (size_t i = 0; i < score_lines.size(); i++)
 			{
 			{
-				EMP::Core::StringList score_parts;
-				EMP::Core::StringUtilities::ExpandString(score_parts, score_lines[i], '\t');
+				Rocket::Core::StringList score_parts;
+				Rocket::Core::StringUtilities::ExpandString(score_parts, score_lines[i], '\t');
 				if (score_parts.size() == 4 + NUM_ALIEN_TYPES)
 				if (score_parts.size() == 4 + NUM_ALIEN_TYPES)
 				{
 				{
-					EMP::Core::Colourb colour;
+					Rocket::Core::Colourb colour;
 					int wave;
 					int wave;
 					int score;
 					int score;
 					int alien_kills[NUM_ALIEN_TYPES];
 					int alien_kills[NUM_ALIEN_TYPES];
 
 
-					if (EMP::Core::TypeConverter< EMP::Core::String , EMP::Core::Colourb >::Convert(score_parts[1], colour) &&
-						EMP::Core::TypeConverter< EMP::Core::String, int >::Convert(score_parts[2], wave) &&
-						EMP::Core::TypeConverter< EMP::Core::String, int >::Convert(score_parts[3], score))
+					if (Rocket::Core::TypeConverter< Rocket::Core::String , Rocket::Core::Colourb >::Convert(score_parts[1], colour) &&
+						Rocket::Core::TypeConverter< Rocket::Core::String, int >::Convert(score_parts[2], wave) &&
+						Rocket::Core::TypeConverter< Rocket::Core::String, int >::Convert(score_parts[3], score))
 					{
 					{
 						for (int j = 0; j < NUM_ALIEN_TYPES; j++)
 						for (int j = 0; j < NUM_ALIEN_TYPES; j++)
 						{
 						{
-							if (!EMP::Core::TypeConverter< EMP::Core::String, int >::Convert(score_parts[4 + j], alien_kills[j]))
+							if (!Rocket::Core::TypeConverter< Rocket::Core::String, int >::Convert(score_parts[4 + j], alien_kills[j]))
 							{
 							{
 								break;
 								break;
 							}
 							}

+ 8 - 8
Samples/tutorial/datagrid_tree/src/HighScores.h

@@ -12,8 +12,8 @@
 #ifndef HIGHSCORES_H
 #ifndef HIGHSCORES_H
 #define HIGHSCORES_H
 #define HIGHSCORES_H
 
 
-#include <EMP/Core/Types.h>
-#include <EMP/Core/DataSource.h>
+#include <Rocket/Core/Types.h>
+#include <Rocket/Controls/DataSource.h>
 
 
 const int NUM_SCORES = 10;
 const int NUM_SCORES = 10;
 const int NUM_ALIEN_TYPES = 3;
 const int NUM_ALIEN_TYPES = 3;
@@ -23,14 +23,14 @@ const int NUM_ALIEN_TYPES = 3;
 	@author Robert Curry
 	@author Robert Curry
  */
  */
 
 
-class HighScores : public EMP::Core::DataSource
+class HighScores : public Rocket::Controls::DataSource
 {
 {
 public:
 public:
 	static void Initialise();
 	static void Initialise();
 	static void Shutdown();
 	static void Shutdown();
 
 
-	void GetRow(EMP::Core::StringList& row, const EMP::Core::String& table, int row_index, const EMP::Core::StringList& columns);
-	int GetNumRows(const EMP::Core::String& table);
+	void GetRow(Rocket::Core::StringList& row, const Rocket::Core::String& table, int row_index, const Rocket::Core::StringList& columns);
+	int GetNumRows(const Rocket::Core::String& table);
 
 
 private:
 private:
 	HighScores();
 	HighScores();
@@ -38,13 +38,13 @@ private:
 
 
 	static HighScores* instance;
 	static HighScores* instance;
 
 
-	void SubmitScore(const EMP::Core::String& name, const EMP::Core::Colourb& colour, int wave, int score, int alien_kills[]);
+	void SubmitScore(const Rocket::Core::String& name, const Rocket::Core::Colourb& colour, int wave, int score, int alien_kills[]);
 	void LoadScores();
 	void LoadScores();
 
 
 	struct Score
 	struct Score
 	{
 	{
-		EMP::Core::String name;
-		EMP::Core::Colourb colour;
+		Rocket::Core::String name;
+		Rocket::Core::Colourb colour;
 		int score;
 		int score;
 		int wave;
 		int wave;
 
 

+ 5 - 5
Samples/tutorial/datagrid_tree/src/HighScoresShipFormatter.cpp

@@ -10,7 +10,7 @@
  */
  */
 
 
 #include "HighScoresShipFormatter.h"
 #include "HighScoresShipFormatter.h"
-#include <EMP/Core/TypeConverter.h>
+#include <Rocket/Core/TypeConverter.h>
 
 
 HighScoresShipFormatter::HighScoresShipFormatter() : Rocket::Controls::DataFormatter("ship")
 HighScoresShipFormatter::HighScoresShipFormatter() : Rocket::Controls::DataFormatter("ship")
 {
 {
@@ -20,15 +20,15 @@ HighScoresShipFormatter::~HighScoresShipFormatter()
 {
 {
 }
 }
 
 
-void HighScoresShipFormatter::FormatData(EMP::Core::String& formatted_data, const EMP::Core::StringList& raw_data)
+void HighScoresShipFormatter::FormatData(Rocket::Core::String& formatted_data, const Rocket::Core::StringList& raw_data)
 {
 {
 	// Data format:
 	// Data format:
 	// raw_data[0] is the colour, in "%d, %d, %d, %d" format.
 	// raw_data[0] is the colour, in "%d, %d, %d, %d" format.
 
 
-	EMP::Core::Colourb ship_colour;
-	EMP::Core::TypeConverter< EMP::Core::String, EMP::Core::Colourb >::Convert(raw_data[0], ship_colour);
+	Rocket::Core::Colourb ship_colour;
+	Rocket::Core::TypeConverter< Rocket::Core::String, Rocket::Core::Colourb >::Convert(raw_data[0], ship_colour);
 
 
-	EMP::Core::String colour_string(32, "%d,%d,%d", ship_colour.red, ship_colour.green, ship_colour.blue);
+	Rocket::Core::String colour_string(32, "%d,%d,%d", ship_colour.red, ship_colour.green, ship_colour.blue);
 
 
 	formatted_data = "<defender style=\"color: rgb(" + colour_string + ");\" />";
 	formatted_data = "<defender style=\"color: rgb(" + colour_string + ");\" />";
 }
 }

+ 1 - 1
Samples/tutorial/datagrid_tree/src/HighScoresShipFormatter.h

@@ -25,7 +25,7 @@ class HighScoresShipFormatter : public Rocket::Controls::DataFormatter
 		HighScoresShipFormatter();
 		HighScoresShipFormatter();
 		~HighScoresShipFormatter();
 		~HighScoresShipFormatter();
 
 
-		void FormatData(EMP::Core::String& formatted_data, const EMP::Core::StringList& raw_data);
+		void FormatData(Rocket::Core::String& formatted_data, const Rocket::Core::StringList& raw_data);
 };
 };
 
 
 #endif
 #endif

+ 4 - 4
Samples/tutorial/datagrid_tree/src/main.cpp

@@ -32,13 +32,13 @@ void GameLoop()
 
 
 #if defined EMP_PLATFORM_WIN32
 #if defined EMP_PLATFORM_WIN32
 #include <windows.h>
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 #endif
 {
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.
 	// Generic OS initialisation, creates a window and attaches OpenGL.
-	if (!Shell::Initialise("../../projects/Rocket/samples/tutorials/datagrid_tree/") ||
+	if (!Shell::Initialise("../Samples/tutorial/datagrid_tree/") ||
 		!Shell::OpenWindow("Datagrid Tree Tutorial", true))
 		!Shell::OpenWindow("Datagrid Tree Tutorial", true))
 	{
 	{
 		Shell::Shutdown();
 		Shell::Shutdown();
@@ -56,7 +56,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Rocket::Controls::Initialise();
 	Rocket::Controls::Initialise();
 
 
 	// Create the main Rocket context and set it on the shell's input layer.
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
 	if (context == NULL)
 	if (context == NULL)
 	{
 	{
 		Rocket::Core::Shutdown();
 		Rocket::Core::Shutdown();

BIN
Samples/tutorial/template/data/tutorial.png


+ 8 - 8
Samples/tutorial/template/data/tutorial.rcss

@@ -10,14 +10,14 @@ body
 body.window
 body.window
 {
 {
 	background-decorator: tiled-box;
 	background-decorator: tiled-box;
-	background-top-left-image: tutorial.png 0px 0px 133px 140px;
-	background-top-right-image: tutorial.png 136px 0px 146px 140px;
-	background-top-image: tutorial.png stretch 134px 0px 135px 140px;
-	background-bottom-left-image: tutorial.png 0px 140px 11px 151px;
-	background-bottom-right-image: tutorial.png 136px 140px 146px 151px;
-	background-bottom-image: tutorial.png stretch 11px 140px 12px 151px;
-	background-left-image: tutorial.png stretch 0px 139px 10px 140px;
-	background-center-image: tutorial.png stretch 11px 139px 12px 140px;
+	background-top-left-image: ../../../assets/invader.tga 0px 0px 133px 140px;
+	background-top-right-image: ../../../assets/invader.tga 136px 0px 146px 140px;
+	background-top-image: ../../../assets/invader.tga stretch 134px 0px 135px 140px;
+	background-bottom-left-image: ../../../assets/invader.tga 0px 140px 11px 151px;
+	background-bottom-right-image: ../../../assets/invader.tga 136px 140px 146px 151px;
+	background-bottom-image: ../../../assets/invader.tga stretch 11px 140px 12px 151px;
+	background-left-image: ../../../assets/invader.tga stretch 0px 139px 10px 140px;
+	background-center-image: ../../../assets/invader.tga stretch 11px 139px 12px 140px;
 }
 }
 
 
 div
 div

+ 5 - 5
Samples/tutorial/template/src/main.cpp

@@ -26,15 +26,15 @@ void GameLoop()
 	Shell::FlipBuffers();
 	Shell::FlipBuffers();
 }
 }
 
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 #endif
 {
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.
 	// Generic OS initialisation, creates a window and attaches OpenGL.
-	if (!Shell::Initialise("../../projects/Rocket/samples/tutorials/template/") ||
+	if (!Shell::Initialise("../Samples/tutorial/template/") ||
 		!Shell::OpenWindow("Template Tutorial", true))
 		!Shell::OpenWindow("Template Tutorial", true))
 	{
 	{
 		Shell::Shutdown();
 		Shell::Shutdown();
@@ -51,7 +51,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Rocket::Core::Initialise();
 	Rocket::Core::Initialise();
 
 
 	// Create the main Rocket context and set it on the shell's input layer.
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
 	if (context == NULL)
 	if (context == NULL)
 	{
 	{
 		Rocket::Core::Shutdown();
 		Rocket::Core::Shutdown();

+ 1 - 1
Samples/tutorial/tutorial_drag/data/tutorial.rcss

@@ -17,7 +17,7 @@ icon
     margin: 10px;
     margin: 10px;
     
     
     background-decorator: image;
     background-decorator: image;
-    background-image: ../../../assets/present.png 0px 0px 100px 100px;
+    background-image: ../../../assets/present.tga 0px 0px 100px 100px;
     
     
     font-size: 12;
     font-size: 12;
     text-align: center;
     text-align: center;

+ 3 - 3
Samples/tutorial/tutorial_drag/src/Inventory.cpp

@@ -2,7 +2,7 @@
 #include <Rocket/Core/Factory.h>
 #include <Rocket/Core/Factory.h>
 
 
 // Constructs a new inventory and opens its window.
 // Constructs a new inventory and opens its window.
-Inventory::Inventory(const EMP::Core::String& title, const EMP::Core::Vector2f& position, Rocket::Core::Context* context)
+Inventory::Inventory(const Rocket::Core::String& title, const Rocket::Core::Vector2f& position, Rocket::Core::Context* context)
 {
 {
 	document = context->LoadDocument("data/inventory.rml");
 	document = context->LoadDocument("data/inventory.rml");
 	if (document != NULL)
 	if (document != NULL)
@@ -25,7 +25,7 @@ Inventory::~Inventory()
 }
 }
 
 
 // Adds a brand-new item into this inventory.
 // Adds a brand-new item into this inventory.
-void Inventory::AddItem(const EMP::Core::String& name)
+void Inventory::AddItem(const Rocket::Core::String& name)
 {
 {
 	if (document == NULL)
 	if (document == NULL)
 		return;
 		return;
@@ -35,7 +35,7 @@ void Inventory::AddItem(const EMP::Core::String& name)
 		return;
 		return;
 
 
 	// Create the new 'icon' element.
 	// Create the new 'icon' element.
-	Rocket::Core::Element* icon = Rocket::Core::Factory::InstanceElement(content, "icon", "icon", EMP::Core::XMLAttributes());
+	Rocket::Core::Element* icon = Rocket::Core::Factory::InstanceElement(content, "icon", "icon", Rocket::Core::XMLAttributes());
 	icon->SetInnerRML(name);
 	icon->SetInnerRML(name);
 	content->AppendChild(icon);
 	content->AppendChild(icon);
 
 

+ 3 - 3
Samples/tutorial/tutorial_drag/src/Inventory.h

@@ -1,7 +1,7 @@
 #ifndef INVENTORY_H
 #ifndef INVENTORY_H
 #define INVENTORY_H
 #define INVENTORY_H
 
 
-#include <EMP/Core/String.h>
+#include <Rocket/Core/String.h>
 #include <Rocket/Core/Context.h>
 #include <Rocket/Core/Context.h>
 #include <Rocket/Core/ElementDocument.h>
 #include <Rocket/Core/ElementDocument.h>
 
 
@@ -16,13 +16,13 @@ public:
 	/// @param[in] title The title of the new inventory.
 	/// @param[in] title The title of the new inventory.
 	/// @param[in] position The position of the inventory window.
 	/// @param[in] position The position of the inventory window.
 	/// @param[in] context The context to open the inventory window in.
 	/// @param[in] context The context to open the inventory window in.
-	Inventory(const EMP::Core::String& title, const EMP::Core::Vector2f& position, Rocket::Core::Context* context);
+	Inventory(const Rocket::Core::String& title, const Rocket::Core::Vector2f& position, Rocket::Core::Context* context);
 	/// Destroys the inventory and closes its window.
 	/// Destroys the inventory and closes its window.
 	~Inventory();
 	~Inventory();
 
 
 	/// Adds a brand-new item into this inventory.
 	/// Adds a brand-new item into this inventory.
 	/// @param[in] name The name of this item.
 	/// @param[in] name The name of this item.
-	void AddItem(const EMP::Core::String& name);
+	void AddItem(const Rocket::Core::String& name);
 
 
 private:
 private:
 	Rocket::Core::ElementDocument* document;
 	Rocket::Core::ElementDocument* document;

+ 7 - 7
Samples/tutorial/tutorial_drag/src/main.cpp

@@ -27,15 +27,15 @@ void GameLoop()
 	Shell::FlipBuffers();
 	Shell::FlipBuffers();
 }
 }
 
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 #endif
 {
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.
 	// Generic OS initialisation, creates a window and attaches OpenGL.
-	if (!Shell::Initialise("../../projects/Rocket/samples/tutorials/drag/") ||
+	if (!Shell::Initialise("../Samples/tutorial/tutorial_drag/") ||
 		!Shell::OpenWindow("Drag Tutorial", true))
 		!Shell::OpenWindow("Drag Tutorial", true))
 	{
 	{
 		Shell::Shutdown();
 		Shell::Shutdown();
@@ -52,7 +52,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Rocket::Core::Initialise();
 	Rocket::Core::Initialise();
 
 
 	// Create the main Rocket context and set it on the shell's input layer.
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
 	if (context == NULL)
 	if (context == NULL)
 	{
 	{
 		Rocket::Core::Shutdown();
 		Rocket::Core::Shutdown();
@@ -66,8 +66,8 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Shell::LoadFonts("../../assets/");
 	Shell::LoadFonts("../../assets/");
 
 
 	// Load and show the inventory document.
 	// Load and show the inventory document.
-	Inventory* inventory_1 = new Inventory("Inventory 1", EMP::Core::Vector2f(50, 200), context);
-	Inventory* inventory_2 = new Inventory("Inventory 2", EMP::Core::Vector2f(540, 240), context);
+	Inventory* inventory_1 = new Inventory("Inventory 1", Rocket::Core::Vector2f(50, 200), context);
+	Inventory* inventory_2 = new Inventory("Inventory 2", Rocket::Core::Vector2f(540, 240), context);
 
 
 	// Add items into the inventory.
 	// Add items into the inventory.
 	inventory_1->AddItem("Mk III L.A.S.E.R.");
 	inventory_1->AddItem("Mk III L.A.S.E.R.");