Преглед на файлове

Moved the example Sprite Engine to a separate folder.

David Piuva преди 5 години
родител
ревизия
1f107d72e8

+ 1 - 1
Source/SDK/sandbox/sprite/DirtyRectangles.h → Source/SDK/SpriteEngine/DirtyRectangles.h

@@ -2,7 +2,7 @@
 #ifndef DFPSR_DIRTY_RECTANGLES
 #define DFPSR_DIRTY_RECTANGLES
 
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 
 namespace dsr {
 

+ 1 - 1
Source/SDK/sandbox/sprite/Octree.h → Source/SDK/SpriteEngine/Octree.h

@@ -2,7 +2,7 @@
 #ifndef DFPSR_OCTREE
 #define DFPSR_OCTREE
 
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 #include <memory>
 
 namespace dsr {

+ 5 - 0
Source/SDK/SpriteEngine/README.md

@@ -0,0 +1,5 @@
+# Sprite engine for the DFPSR SDK
+
+Created for the SDK and used as an example for how to make your own isometric rendering engine on top of DFPSR.
+Instead of feeling limited by what it can't do, try modifying the code and optimizing your own filters using the SIMD and threading abstractions.
+This engine is currently re-using some DFPSR internals of the "image" and "render" folders, but these are not version stable APIs and might break backward compatibility.

+ 0 - 0
Source/SDK/sandbox/sprite/importer.cpp → Source/SDK/SpriteEngine/importer.cpp


+ 1 - 1
Source/SDK/sandbox/sprite/importer.h → Source/SDK/SpriteEngine/importer.h

@@ -2,7 +2,7 @@
 #ifndef DFPSR_IMPORTER
 #define DFPSR_IMPORTER
 
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 
 namespace dsr {
 

+ 2 - 2
Source/SDK/sandbox/sprite/lightAPI.cpp → Source/SDK/SpriteEngine/lightAPI.cpp

@@ -1,7 +1,7 @@
 
 #include "lightAPI.h"
-#include "../../../DFPSR/base/simd3D.h"
-#include "../../../DFPSR/base/threading.h" // TODO: Make an official "dangerous" API for multi-threading
+#include "../../DFPSR/base/simd3D.h"
+#include "../../DFPSR/base/threading.h" // TODO: Make an official "dangerous" API for multi-threading
 
 namespace dsr {
 

+ 1 - 1
Source/SDK/sandbox/sprite/lightAPI.h → Source/SDK/SpriteEngine/lightAPI.h

@@ -3,7 +3,7 @@
 #define DFPSR_DEFERRED_LIGHT_ENGINE
 
 #include <assert.h>
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 #include "orthoAPI.h"
 
 namespace dsr {

+ 0 - 0
Source/SDK/sandbox/sprite/orthoAPI.cpp → Source/SDK/SpriteEngine/orthoAPI.cpp


+ 1 - 1
Source/SDK/sandbox/sprite/orthoAPI.h → Source/SDK/SpriteEngine/orthoAPI.h

@@ -3,7 +3,7 @@
 #define DFPSR_ORTHO
 
 #include <assert.h>
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 
 namespace dsr {
 

+ 3 - 3
Source/SDK/sandbox/sprite/spriteAPI.cpp → Source/SDK/SpriteEngine/spriteAPI.cpp

@@ -3,9 +3,9 @@
 #include "Octree.h"
 #include "DirtyRectangles.h"
 #include "importer.h"
-#include "../../../DFPSR/render/ITriangle2D.h"
-#include "../../../DFPSR/base/endian.h"
-#include "../../../DFPSR/math/scalar.h"
+#include "../../DFPSR/render/ITriangle2D.h"
+#include "../../DFPSR/base/endian.h"
+#include "../../DFPSR/math/scalar.h"
 
 // Comment out a flag to disable an optimization when debugging
 #define DIRTY_RECTANGLE_OPTIMIZATION

+ 1 - 1
Source/SDK/sandbox/sprite/spriteAPI.h → Source/SDK/SpriteEngine/spriteAPI.h

@@ -2,7 +2,7 @@
 #ifndef DFPSR_SPRITE_ENGINE
 #define DFPSR_SPRITE_ENGINE
 
-#include "../../../DFPSR/includeFramework.h"
+#include "../../DFPSR/includeFramework.h"
 #include "orthoAPI.h"
 #include "lightAPI.h"
 #include <assert.h>

+ 2 - 2
Source/SDK/sandbox/build.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Assuming that you called build.sh from its own folder, you should already be in the project folder.
-PROJECT_FOLDER=.
+PROJECT_FOLDERS=". ../SpriteEngine"
 # Placing your executable in the project folder allow using the same relative paths in the final release.
 TARGET_FILE=./sandbox
 # The root folder is where DFPSR, SDK and tools are located.
@@ -20,4 +20,4 @@ LINKER_FLAGS=""
 # Give execution permission
 chmod +x ${ROOT_PATH}/tools/buildAndRun.sh;
 # Compile everything
-${ROOT_PATH}/tools/buildAndRun.sh "${PROJECT_FOLDER}" "${TARGET_FILE}" "${ROOT_PATH}" "${TEMP_DIR}" "${WINDOW_MANAGER}" "${COMPILER_FLAGS}" "${LINKER_FLAGS}";
+${ROOT_PATH}/tools/buildAndRun.sh "${PROJECT_FOLDERS}" "${TARGET_FILE}" "${ROOT_PATH}" "${TEMP_DIR}" "${WINDOW_MANAGER}" "${COMPILER_FLAGS}" "${LINKER_FLAGS}";

+ 2 - 3
Source/SDK/sandbox/sandbox.cpp

@@ -114,9 +114,8 @@ LATER:
 */
 
 #include "../../DFPSR/includeFramework.h"
-#include "sprite/spriteAPI.h"
-#include "sprite/importer.h"
-#include "../../DFPSR/image/PackOrder.h"
+#include "../SpriteEngine/spriteAPI.h"
+#include "../SpriteEngine/importer.h"
 #include <assert.h>
 #include <limits>
 

+ 2 - 2
Source/SDK/sandbox/tool.cpp

@@ -3,8 +3,8 @@
 #include <limits>
 #include <functional>
 #include "../../DFPSR/includeFramework.h"
-#include "sprite/spriteAPI.h"
-#include "sprite/importer.h"
+#include "../SpriteEngine/spriteAPI.h"
+#include "../SpriteEngine/importer.h"
 
 using namespace dsr;