Redoing everything. Nuke first.
authorchsieh <chester.developer@hotmail.com>
Mon, 18 Apr 2011 06:01:34 +0000 (23:01 -0700)
committerchsieh <chester.developer@hotmail.com>
Mon, 18 Apr 2011 06:01:34 +0000 (23:01 -0700)
49 files changed:
.gitignore [deleted file]
Classes/Foundation/Common/Assert.h [deleted file]
Classes/Foundation/Common/Base.h [deleted file]
Classes/Foundation/Common/GlobalDefines.h [deleted file]
Classes/Foundation/Common/GlobalInclude.h [deleted file]
Classes/Foundation/Common/GlobalTypes.h [deleted file]
Classes/Foundation/Common/Print.h [deleted file]
Classes/Foundation/Common/Singleton.h [deleted file]
Classes/Foundation/Containers/BitEncoder.h [deleted file]
Classes/Foundation/Containers/LocklessRingBuffer.cpp [deleted file]
Classes/Foundation/Containers/LocklessRingBuffer.h [deleted file]
Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.h [deleted file]
Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm [deleted file]
Classes/Foundation/GraphicsServices/OpenGLServices.h [deleted file]
Classes/Foundation/GraphicsServices/OpenGLServices.mm [deleted file]
Classes/Foundation/GraphicsServices/RenderTarget.h [deleted file]
Classes/Foundation/GraphicsServices/RenderTarget.mm [deleted file]
Classes/Foundation/Hash/DJB2.h [deleted file]
Classes/Foundation/Math/MathDefines.h [deleted file]
Classes/Foundation/Math/MathInclude.h [deleted file]
Classes/Foundation/Math/MathOperations.h [deleted file]
Classes/Foundation/Math/MathTypes.h [deleted file]
Classes/Foundation/Math/Matrix.h [deleted file]
Classes/Foundation/Math/Quaternion.h [deleted file]
Classes/Foundation/Math/Vector.h [deleted file]
Classes/Foundation/Memory/MemoryBitset.cpp [deleted file]
Classes/Foundation/Memory/MemoryBitset.h [deleted file]
Classes/Foundation/Memory/MemoryHeap.cpp [deleted file]
Classes/Foundation/Memory/MemoryHeap.h [deleted file]
Classes/Foundation/Memory/MemoryLinear.h [deleted file]
Classes/Foundation/OSInterface/GLView.h [deleted file]
Classes/Foundation/OSInterface/GLView.m [deleted file]
Classes/Foundation/OSInterface/LittlestAppDelegate.h [deleted file]
Classes/Foundation/OSInterface/LittlestAppDelegate.m [deleted file]
Classes/Foundation/OSInterface/LittlestViewController.h [deleted file]
Classes/Foundation/OSInterface/LittlestViewController.m [deleted file]
Classes/Foundation/Synchronization/Atomic32Bit.h [deleted file]
Classes/Foundation/Synchronization/MemorySync.h [deleted file]
Littlest-Info.plist [deleted file]
Littlest.xcodeproj/project.pbxproj [deleted file]
LittlestViewController.xib [deleted file]
Littlest_Prefix.pch [deleted file]
MainWindow.xib [deleted file]
Shaders/Shader.fsh [deleted file]
Shaders/Shader.vsh [deleted file]
Shaders/Standard/Standard.fsh [deleted file]
Shaders/Standard/Standard.vsh [deleted file]
main.m [deleted file]
readme.md [deleted file]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 90c1515..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# ignore built files
-build/*
-Littlest.xcodeproj/*.pbxuser
-Littlest.xcodeproj/*.mode1v3
diff --git a/Classes/Foundation/Common/Assert.h b/Classes/Foundation/Common/Assert.h
deleted file mode 100755 (executable)
index bf465fa..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#pragma once\r
-\r
-#if defined(DEBUG)\r
-\r
-#include <assert.h>\r
-#include <stdbool.h>\r
-#include <signal.h>\r
-#include <sys/types.h>\r
-#include <sys/sysctl.h>\r
-#include <unistd.h>\r
-\r
-#include "GlobalDefines.h"\r
-\r
-#if defined(__WINDOWS__)\r
-\r
-  #define Assert(expression) if (!(expression)) __debugbreak();\r
-\r
-#elif defined(__iOS__)\r
-\r
-  // Returns true if the current process is being debugged (either\r
-  // running under the debugger or has a debugger attached post facto).\r
-  static bool AmIBeingDebugged(void)\r
-  {\r
-    int                 junk;\r
-    int                 mib[4];\r
-    struct kinfo_proc   info;\r
-    size_t              size;\r
-\r
-    // Initialize the flags so that, if sysctl fails for some bizarre\r
-    // reason, we get a predictable result.\r
-    info.kp_proc.p_flag = 0;\r
-\r
-    // Initialize mib, which tells sysctl the info we want, in this case\r
-    // we're looking for information about a specific process ID.\r
-    mib[0] = CTL_KERN;\r
-    mib[1] = KERN_PROC;\r
-    mib[2] = KERN_PROC_PID;\r
-    mib[3] = getpid();\r
-\r
-    // Call sysctl.\r
-    size = sizeof(info);\r
-    junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);\r
-    assert(junk == 0);\r
-\r
-    // We're being debugged if the P_TRACED flag is set.\r
-    return ( (info.kp_proc.p_flag & P_TRACED) != 0 );\r
-  }\r
-\r
-  // http://iphone.m20.nl/wp/?p=1#more-1\r
-  //#define DEBUGSTOP(signal) __asm__ __volatile__ ("mov r0, %0\nmov r1, %1\nmov r12, #37\nswi 128\n" : : "r" (getpid ()), "r" (signal) : "r12", "r0", "r1", "cc");\r
-  //#define DEBUGGER do { int trapSignal = AmIBeingDebugged () ? SIGINT : SIGSTOP; DEBUGSTOP(trapSignal); if (trapSignal == SIGSTOP) { DEBUGSTOP (SIGINT); } } while (false);\r
-\r
-  // Graciously copied from http://cocoawithlove.com/2008/03/break-into-debugger.html\r
-  #define DebugBreak() if (AmIBeingDebugged()) { DebugBreak(); }\r
-\r
-  #define Assert(expression) if (!(expression)) raise(SIGTRAP);\r
-\r
-#endif\r
-\r
-#define AssertMessage(expression, message, ...) \\r
-  if (!(expression)) Printf(message, ##__VA_ARGS__)\r
-\r
-#else\r
-\r
-// Note that the expression is still evaluated, since we declared this as an inlined function, rather than a macro.\r
-slInline void Assert(bool expression) {}\r
-slInline void AssertMsg(bool expression, char* msg, ...) {}\r
-\r
-#endif\r
diff --git a/Classes/Foundation/Common/Base.h b/Classes/Foundation/Common/Base.h
deleted file mode 100755 (executable)
index 4cf66ae..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once\r
-\r
-namespace Foundation\r
-{\r
-  class CBase\r
-  {\r
-  public:\r
-    CBase()  {}\r
-    ~CBase() {}\r
-  };\r
-}\r
diff --git a/Classes/Foundation/Common/GlobalDefines.h b/Classes/Foundation/Common/GlobalDefines.h
deleted file mode 100755 (executable)
index 14712b2..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalTypes.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-// OS and CPU architecture defines\r
-#if defined(_WINDOWS)\r
-  #define __WINDOWS__\r
-  #define __X86__\r
-#elif defined(__iOS__)\r
-  #include <TargetConditionals.h>\r
-  #if TARGET_IPHONE_SIMULATOR\r
-    #define __X86__\r
-  #elif TARGET_OS_IPHONE\r
-    #define __ARM__\r
-  #else\r
-    #error undefined architecture!\r
-  #endif\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// configuration defines\r
-#if defined(_DEBUG) && !defined(DEBUG)\r
-  #define DEBUG\r
-#endif\r
-\r
-#if defined(_NDEBUG) && !defined(RELEASE)\r
-  #define RELEASE\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// some type defines that may or may not be defined already?\r
-#if !defined(NULL)\r
-  #define NULL 0\r
-#endif\r
-\r
-#if !defined(FALSE)\r
-  #define FALSE 0\r
-#endif\r
-\r
-#if !defined(TRUE)\r
-  #define TRUE 1\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// cache information\r
-#if !defined(CACHE_LINE_SIZE)\r
-  #if defined(__X86__)\r
-    #define CACHE_LINE_SIZE         128 // normally equals to 2 lines for intel\r
-  #elif defined(__ARM__)\r
-    #define CACHE_LINE_SIZE         32\r
-  #else\r
-    #define CACHE_LINE_SIZE         32\r
-  #endif\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// force inline on non-debug, might make code explode\r
-#if defined(DEBUG)\r
-  #define slInline                inline\r
-#else\r
-  #define slInline                __forceinline\r
-#endif\r
-\r
-// compiler determined inline\r
-#define clInline                  inline\r
-\r
-#define slRestrict                __restrict\r
-\r
-//----------------------------------------------------------------------------------------\r
-// alignment macros\r
-#if defined(__WINDOWS__)\r
-#define MEM_ALIGN(N)              __declspec(align(N))\r
-#elif defined(__iOS__)\r
-#define MEM_ALIGN(N)              __attribute__((aligned (N)))\r
-#endif\r
-\r
-#define IS_POWER_OF_TWO(x)        ( ((x) & -(x)) == (x) )\r
-\r
-//#pragma warning(disable:4146)     // =(\r
-#define ALIGN_UP(x, ALIGNMENT)    ( ((x) + (ALIGNMENT) - 1) & -(ALIGNMENT) )\r
-#define ALIGN_DOWN(x, ALIGNMENT)  ( (x) & -(ALIGNMENT) )\r
-\r
-#define POWER_OF_TWO_MOD(x, N)    ( (x) & ((N) - 1) )\r
-\r
-#define ALIGN_CACHE               ( ALIGN( CACHE_LINE_SIZE ) )\r
-\r
-//----------------------------------------------------------------------------------------\r
-// cache macros\r
-#if defined(__X86__)\r
-// uhh, nothing?\r
-#elif defined(__ARM__)\r
-#define DCBT(x) __asm__("pld %[input]" : : [input] "r" ((x)))\r
-#else\r
-#error Not implemented yet!\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// string and memory functions\r
-#if defined(__WINDOWS__)\r
-  #pragma intrinsic(memcpy)\r
-  #pragma intrinsic(memset)\r
-  #pragma intrinsic(strcmp)\r
-  #pragma intrinsic(strcpy)\r
-  #pragma intrinsic(strlen)\r
-  #pragma intrinsic(strcat)\r
-#endif\r
-\r
-//----------------------------------------------------------------------------------------\r
-// color constants...this probably needs to consider endianness?\r
-#define NULL_COLOR  0x00000000\r
-#define BLACK_COLOR 0x000000ff\r
-#define RED_COLOR   0xff0000ff\r
-#define GREEN_COLOR 0x00ff00ff\r
-#define BLUE_COLOR  0x0000ffff\r
-#define WHITE_COLOR 0xffffffff\r
-\r
-//----------------------------------------------------------------------------------------\r
-// some intrinsic/asm/fast stuff stuffs -- maybe this should be moved to another file\r
-#define RightMostEnabledBit(x) ((x) & -(x))\r
-\r
-\r
-#if defined(__ARM__)\r
-\r
-slInline uint8_t LZCount(uint64_t x)\r
-{\r
-  uint8_t result;\r
-  __asm__("clz %[result] %[input]" : [result] "=r" (result) : [input] "r" (x));\r
-  return result;\r
-}\r
-\r
-#else\r
-\r
-slInline uint8_t LZCount(uint64_t x)\r
-{\r
-  uint8_t leading_zero_count = 0;\r
-  uint8_t next_shift = 32;\r
-  uint64_t copy = x;\r
-  while (next_shift != 0)\r
-  {\r
-    bool non_zero = copy >= (0x1ULL << next_shift);\r
-    uint8_t actual_shift = (uint8_t)non_zero * next_shift;\r
-    leading_zero_count += actual_shift;\r
-    copy >>= actual_shift;\r
-    next_shift >>= 1;\r
-  }\r
-  leading_zero_count += (copy == 0x1ULL);\r
-  \r
-  return leading_zero_count;\r
-}\r
-\r
-#endif\r
diff --git a/Classes/Foundation/Common/GlobalInclude.h b/Classes/Foundation/Common/GlobalInclude.h
deleted file mode 100755 (executable)
index 83fe092..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once\r
-\r
-#include <string.h>\r
-#include "GlobalDefines.h"\r
-#include "GlobalTypes.h"\r
-#include "Assert.h"\r
-#include "Print.h"\r
diff --git a/Classes/Foundation/Common/GlobalTypes.h b/Classes/Foundation/Common/GlobalTypes.h
deleted file mode 100755 (executable)
index a2d92f0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once\r
-\r
-#if defined(uint32_t)\r
-#undef uint32_t\r
-#endif\r
-\r
-typedef signed char         int8_t;\r
-typedef unsigned char       uint8_t;\r
-typedef short               int16_t;\r
-typedef unsigned short      uint16_t;\r
-typedef int                 int32_t;\r
-typedef unsigned int        uint32_t;\r
-typedef long long           int64_t;\r
-typedef unsigned long long  uint64_t;\r
-typedef uint32_t            color32_t;\r
-\r
-union IntFloat\r
-{\r
-  int8_t    m_Int8[4];\r
-  uint8_t   m_UInt8[4];\r
-  int16_t   m_Int16[2];\r
-  uint16_t  m_UInt16[2];\r
-  int32_t   m_Int32;\r
-  uint32_t  m_UInt32;\r
-  float     m_Float;\r
-};\r
-\r
-union LongDouble\r
-{\r
-  int8_t    m_Int8[8];\r
-  uint8_t   m_UInt8[8];\r
-  int16_t   m_Int16[4];\r
-  uint16_t  m_UInt16[4];\r
-  int32_t   m_Int32[2];\r
-  uint32_t  m_UInt32[2];\r
-  int64_t   m_Int64;\r
-  uint64_t  m_UInt64;\r
-  float     m_Float[2];\r
-  double    m_Double;\r
-};\r
diff --git a/Classes/Foundation/Common/Print.h b/Classes/Foundation/Common/Print.h
deleted file mode 100755 (executable)
index 48c0609..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once\r
-\r
-#include "GlobalDefines.h"\r
-#include <stdio.h>\r
-\r
-#if defined(DEBUG)\r
-  #define Printf(message, ...) printf(message, ##__VA_ARGS__)\r
-#else\r
-  #define Printf(message, ...) {}\r
-#endif\r
diff --git a/Classes/Foundation/Common/Singleton.h b/Classes/Foundation/Common/Singleton.h
deleted file mode 100755 (executable)
index bc1ae03..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-namespace Foundation\r
-{\r
-\r
-template <typename T> \r
-class Singleton\r
-{\r
-private:\r
-  static T* m_Instance; \r
-\r
-protected:\r
-  Singleton() { m_Instance = NULL; }\r
-\r
-public:\r
-  static T* Init()\r
-  {\r
-    Assert( m_Instance == NULL);\r
-    m_Instance = new (16) T();\r
-    return m_Instance;\r
-  }\r
-\r
-  slInline static T* GetInstance()\r
-  {\r
-    return m_Instance;\r
-  }\r
-\r
-  static void DestroyInstance()\r
-  {\r
-    if ( m_Instance )\r
-    {\r
-      delete m_Instance;\r
-    }\r
-  }\r
-};\r
-\r
-template<typename T> T* Singleton<T>::m_Instance = NULL;\r
-\r
-}\r
diff --git a/Classes/Foundation/Containers/BitEncoder.h b/Classes/Foundation/Containers/BitEncoder.h
deleted file mode 100755 (executable)
index 102e7fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-#define SET_BITS(x, new_val, shift, mask) ((x) = (((x) & ~(mask)) | (((new_val) << (shift)) & (mask))))\r
-#define ZERO_BITS(x, mask)                ((x) &= ~(mask))\r
-#define OR_BITS (x, new_val, shift, mask) ((x) |= (((new_val) << (shift)) & (mask)))\r
-#define AND_BITS(x, new_val, shift, mask) ((x) &= (((new_val) << (shift)) & (mask)))\r
-#define GET_BITS(x, mask)                 ((x) & (mask))\r
-#define GET_BITS_RIGHT(x, shift, mask)    (((x) & (mask)) >> (shift))\r
diff --git a/Classes/Foundation/Containers/LocklessRingBuffer.cpp b/Classes/Foundation/Containers/LocklessRingBuffer.cpp
deleted file mode 100755 (executable)
index 0a9f9d6..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-#include "LocklessRingBuffer.h"\r
-#include "Foundation/Synchronization/MemorySync.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-void LocklessRingBuffer::Init(void* buffer, uint32_t buffer_size)\r
-{\r
-  m_Base = (uint8_t*)buffer;\r
-  m_BufferSize = buffer_size;\r
-  m_WriteOffset = 0;\r
-  m_ReadOffset = 0;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void LocklessRingBuffer::Destroy()\r
-{\r
-  m_Base = NULL;\r
-  m_BufferSize = 0;\r
-  m_WriteOffset = 0;\r
-  m_ReadOffset = 0;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool LocklessRingBuffer::Write(void* entry, uint32_t entry_size)\r
-{\r
-  Assert(entry_size < m_BufferSize);\r
-\r
-  uint32_t new_write_offset = m_WriteOffset;\r
-  uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset;\r
-  if (remaining_space < entry_size)\r
-  {\r
-    return false;\r
-  }\r
-\r
-  bool write_will_end_lower = new_write_offset + entry_size >= m_BufferSize;\r
-\r
-  uint32_t distance_to_top = (entry_size > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_size;\r
-  memcpy(m_Base + new_write_offset, entry, distance_to_top);\r
-  new_write_offset += distance_to_top;\r
-\r
-  if (write_will_end_lower)\r
-  {\r
-    uint32_t remainder = entry_size - distance_to_top;\r
-    memcpy(m_Base, (uint8_t*)entry + distance_to_top, remainder);\r
-    new_write_offset = remainder;\r
-  }\r
-\r
-  ReadWriteSync();\r
-\r
-  m_WriteOffset = new_write_offset;\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool LocklessRingBuffer::Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count)\r
-{\r
-  uint32_t total_size = 0;\r
-  for (uint32_t i = 0; i < entry_count; i++)\r
-  {\r
-    total_size += entry_sizes[i];\r
-  }\r
-\r
-  Assert(total_size < m_BufferSize);\r
-\r
-  uint32_t new_write_offset = m_WriteOffset;\r
-  uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset;\r
-  if (remaining_space < total_size)\r
-  {\r
-    return false;\r
-  }\r
-\r
-  for (uint32_t i = 0; i < entry_count; i++)\r
-  {\r
-    bool write_will_end_lower = new_write_offset + entry_sizes[i] >= m_BufferSize;\r
-    uint32_t distance_to_top = (entry_sizes[i] > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_sizes[i];\r
-    memcpy(m_Base + new_write_offset, entries[i], distance_to_top);\r
-    new_write_offset += distance_to_top;\r
-\r
-    if (write_will_end_lower)\r
-    {\r
-      uint32_t remainder = entry_sizes[i] - distance_to_top;\r
-      memcpy(m_Base, (uint8_t*)entries[i] + distance_to_top, remainder);\r
-      new_write_offset = remainder;\r
-    }\r
-  }\r
-\r
-  ReadWriteSync();\r
-\r
-  m_WriteOffset = new_write_offset;\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool LocklessRingBuffer::Peek(void* read_buffer, uint32_t read_size)\r
-{\r
-  uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
-  if (read_remaining < read_size)\r
-  {\r
-    return false;\r
-  }\r
-\r
-  uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
-  memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top);\r
-  if (m_BufferSize - m_ReadOffset <= read_size)\r
-  {\r
-    memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top);\r
-  }\r
-\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool LocklessRingBuffer::Read(void* read_buffer, uint32_t read_size)\r
-{\r
-  uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
-  if (read_remaining < read_size)\r
-  {\r
-    return false;\r
-  }\r
-\r
-  uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
-  memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top);\r
-  uint32_t new_read_offset = m_ReadOffset + read_to_top;\r
-\r
-  if (m_BufferSize - m_ReadOffset <= read_size)\r
-  {\r
-    memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top);\r
-    new_read_offset = read_remaining - read_to_top;\r
-  }\r
-\r
-  ReadWriteSync();\r
-\r
-  m_ReadOffset = new_read_offset;\r
-\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool LocklessRingBuffer::ReadDiscard(uint32_t read_size)\r
-{\r
-  uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
-  if (read_remaining < read_size)\r
-  {\r
-    return false;\r
-  }\r
-\r
-  uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
-  uint32_t new_read_offset = m_ReadOffset + read_to_top;\r
-\r
-  if (m_BufferSize - m_ReadOffset <= read_size)\r
-  {\r
-    new_read_offset = read_remaining - read_to_top;\r
-  }\r
-\r
-  ReadWriteSync();\r
-\r
-  m_ReadOffset = new_read_offset;\r
-\r
-  return true;\r
-}\r
diff --git a/Classes/Foundation/Containers/LocklessRingBuffer.h b/Classes/Foundation/Containers/LocklessRingBuffer.h
deleted file mode 100755 (executable)
index e098a36..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-class LocklessRingBuffer\r
-{\r
-private:\r
-  uint8_t*  m_Base;\r
-  uint32_t  m_BufferSize;\r
-  uint32_t  m_WriteOffset;\r
-  uint32_t  m_ReadOffset;\r
-\r
-public:\r
-  void      Init(void* buffer, uint32_t buffer_size);\r
-  void      Destroy();\r
-\r
-  bool      Write(void* entry, uint32_t entry_size);\r
-  bool      Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count);\r
-\r
-  bool      Peek(void* read_buffer, uint32_t read_size);\r
-  bool      Read(void* read_buffer, uint32_t read_size);\r
-  bool      ReadDiscard(uint32_t read_size);\r
-};\r
diff --git a/Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.h b/Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.h
deleted file mode 100644 (file)
index ba50ba9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-
-#include "Foundation/Common/GlobalInclude.h"
-#include "Foundation/Math/MathInclude.h"
-
-//#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES2/gl.h>
-
-//----------------------------------------------------------------------------------------
-struct Basic2DPrimitive
-{
-protected:
-  Basic2DPrimitive(); // Only the children classes can call this.
-  ~Basic2DPrimitive();
-
-  GLuint    mVertexBuffer;
-  uint16_t  mX, mY;
-};
-
-//----------------------------------------------------------------------------------------
-struct Rectangle : public Basic2DPrimitive
-{
-public:
-  GLuint    mWidth, mHeight;
-  
-  Rectangle( uint16_t width, uint16_t height, uint16_t anchorX, uint16_t anchorY );
-};
diff --git a/Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm b/Classes/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm
deleted file mode 100644 (file)
index 4cc9da1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "BasicPrimitives.h"
-
-//----------------------------------------------------------------------------------------
-Basic2DPrimitive::Basic2DPrimitive() : mVertexBuffer(0), mX(0), mY(0)
-{
-  glGenBuffers( 1, &mVertexBuffer );
-}
-
-//----------------------------------------------------------------------------------------
-Basic2DPrimitive::~Basic2DPrimitive()
-{
-  glDeleteBuffers( 1, &mVertexBuffer );
-}
-
-//----------------------------------------------------------------------------------------
-Rectangle::Rectangle( uint16_t width, uint16_t height, uint16_t anchorX, uint16_t anchorY ) : Basic2DPrimitive()
-{
-  Assert( mVertexBuffer );
-  glBindBuffer( GL_ARRAY_BUFFER, mVertexBuffer );
-  
-  mWidth = width;
-  mHeight = height;
-
-  uint16_t values[4 * 2] = {-anchorX, height + anchorY, -anchorX, };
-  glBufferData( GL_ARRAY_BUFFER, 4 * 2 * sizeof(uint16_t), values, GL_STATIC_DRAW );
-}
diff --git a/Classes/Foundation/GraphicsServices/OpenGLServices.h b/Classes/Foundation/GraphicsServices/OpenGLServices.h
deleted file mode 100644 (file)
index deadd57..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#pragma once
-
-/*****************************************************************************************
- * This is a wrapper class around all OpenGL API calls in iOS. This completely abstracts
- *  away all mixes between the OS-specific calls in Objective-C and the C-style inteface of
- *  OpenGL.
- *
- * Since iPhone/iPad will be single/dual cores for the near-term future, we'll basically
- *  only allow a single rendering context to exist at any given point in time. Therefore,
- *  we should never need to set context other than during startup or shutdown.
- *****************************************************************************************/
-
-//#include <OpenGLES/ES1/gl.h>
-//#include <OpenGLES/ES1/glext.h>
-#include <OpenGLES/ES2/gl.h>
-#include <OpenGLES/ES2/glext.h>
-
-#include "Foundation/Common/GlobalInclude.h"
-
-//----------------------------------------------------------------------------------------
-// Some forward declarations
-@class EAGLContext;
-struct RenderTarget;
-
-//----------------------------------------------------------------------------------------
-// Some typedefs for handles. May want to move this to a separate file.
-typedef GLuint TextureHandle;
-
-//----------------------------------------------------------------------------------------
-// Complete C(++) OpenGL wrapper. We will use this to wrap
-class OpenGLServices
-{
-public:
-  enum
-  {
-    kMaxTextureSize = 512 * 512 * 4,
-  };
-  
-  OpenGLServices();
-  
-       bool init( EAGLContext* mainContext );
-  void destroy();
-  
-  bool initScratchMem();
-  void destroyScratchMem();
-  
-  bool setRenderTarget( RenderTarget& renderTarget );
-  bool present( RenderTarget& renderTarget );
-  
-  TextureHandle loadPNGTexture( const char* fileName );
-  void destroyTexture( TextureHandle texture );
-       
-private:
-  EAGLContext*  mGLContext;
-  void*         mScratchMem;
-  
-  void setContext( EAGLContext* newContext );
-};
diff --git a/Classes/Foundation/GraphicsServices/OpenGLServices.mm b/Classes/Foundation/GraphicsServices/OpenGLServices.mm
deleted file mode 100644 (file)
index 9c1f7a2..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#import <QuartzCore/QuartzCore.h>
-#import <CoreGraphics/CoreGraphics.h>
-
-#include "OpenGLServices.h"
-#include "RenderTarget.h"
-
-//----------------------------------------------------------------------------------------
-OpenGLServices::OpenGLServices() : mGLContext(NULL), mScratchMem(NULL)
-{
-}
-
-//----------------------------------------------------------------------------------------
-bool OpenGLServices::init( EAGLContext* mainContext )
-{
-  if ( mGLContext )
-  {
-    return false;
-  }
-
-  mGLContext = [mainContext retain];
-  Assert( [EAGLContext setCurrentContext:mGLContext] );
-  
-  initScratchMem();
-  
-  // Enable some common states and set their parameters.
-  glEnable( GL_TEXTURE_2D );
-  glEnable( GL_BLEND );
-  // We will premultiply alpha into the color channels of all textures (so no alpha animation).
-  // This is basically the A over B alpha scheme.
-  glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA );
-  glEnable( GL_DEPTH_TEST );
-  glDepthFunc( GL_LEQUAL );
-  glFrontFace( GL_CCW );
-  glCullFace( GL_BACK );
-
-  // Disable unused stuff.
-  glDisable( GL_STENCIL_TEST );
-  glDisable( GL_SCISSOR_TEST );
-  glDisable( GL_DITHER );
-  
-  return true;
-}
-
-//----------------------------------------------------------------------------------------
-void OpenGLServices::destroy()
-{
-  if ( !mGLContext )
-  {
-    return;
-  }
-
-  destroyScratchMem();
-  [mGLContext release];
-  [EAGLContext setCurrentContext:nil];
-}
-
-//----------------------------------------------------------------------------------------
-bool OpenGLServices::initScratchMem()
-{
-  if (!mScratchMem)
-  {
-    mScratchMem = malloc( kMaxTextureSize );
-    return mScratchMem != NULL;
-  }
-  return true;
-}
-
-//----------------------------------------------------------------------------------------
-void OpenGLServices::destroyScratchMem()
-{
-  if (mScratchMem)
-  {
-    free( mScratchMem );
-    mScratchMem = NULL;
-  }
-}
-
-//----------------------------------------------------------------------------------------
-bool OpenGLServices::setRenderTarget( RenderTarget& renderTarget )
-{
-  if (!renderTarget.getFramebuffer() || !glIsFramebuffer( renderTarget.getFramebuffer() ))
-  {
-    return false;
-  }
-  
-  glBindFramebuffer( GL_FRAMEBUFFER, renderTarget.getFramebuffer() );
-  return true;
-}
-
-//----------------------------------------------------------------------------------------
-bool OpenGLServices::present( RenderTarget& renderTarget )
-{
-  GLuint colorBuffer = renderTarget.getColorBuffer();
-  if (!colorBuffer || !glIsRenderbuffer( colorBuffer ))
-  {
-    return false;
-  }
-
-  glBindRenderbuffer( GL_RENDERBUFFER, colorBuffer );
-  return [renderTarget.getContext() presentRenderbuffer:GL_RENDERBUFFER];
-}
-
-//----------------------------------------------------------------------------------------
-TextureHandle OpenGLServices::loadPNGTexture( const char* fileName )
-{
-  GLuint textureHandle;
-  glGenTextures( 1, &textureHandle );
-  if (!textureHandle)
-  {
-    return textureHandle;
-  }
-  
-  glBindTexture( GL_TEXTURE_2D, textureHandle );
-  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
-  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
-  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
-
-  // http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html
-  NSString* nsFileName = [NSString stringWithUTF8String:fileName];
-  NSString* nsPath = [[NSBundle mainBundle] pathForResource:nsFileName ofType:@"png"];
-  NSData* fileData = [[NSData alloc] initWithContentsOfFile:nsPath];
-  UIImage* image = [[UIImage alloc] initWithData:fileData];
-  AssertMessage( image != nil, "Image failed to load!\n" );
-
-  GLuint width  = CGImageGetWidth( image.CGImage );
-  GLuint height = CGImageGetHeight( image.CGImage );
-  CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
-  Assert( width * height * 4 <= kMaxTextureSize );
-  CGContextRef context = CGBitmapContextCreate( mScratchMem, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big );
-  CGColorSpaceRelease( colorSpace );
-  CGContextClearRect( context, CGRectMake( 0, 0, width, height ) );
-  CGContextTranslateCTM( context, 0, 0 );
-  CGContextDrawImage( context, CGRectMake( 0, 0, width, height ), image.CGImage );
-  
-  glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, mScratchMem );
-  glGenerateMipmap( GL_TEXTURE_2D );
-
-  CGContextRelease(context);
-  [image release];
-  [fileData release];
-  
-  return textureHandle;
-}
-
-//----------------------------------------------------------------------------------------
-void OpenGLServices::destroyTexture( TextureHandle texture )
-{
-  glDeleteTextures( 1, &texture );
-}
-
-//----------------------------------------------------------------------------------------
-void OpenGLServices::setContext( EAGLContext* newContext )
-{
-  if (mGLContext != newContext)
-  {
-    mGLContext = newContext;
-    [EAGLContext setCurrentContext:newContext];
-  }
-}
diff --git a/Classes/Foundation/GraphicsServices/RenderTarget.h b/Classes/Foundation/GraphicsServices/RenderTarget.h
deleted file mode 100644 (file)
index aad5d43..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#pragma once
-
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-#include <OpenGLES/ES2/gl.h>
-#include <OpenGLES/ES2/glext.h>
-
-#include "Foundation/Common/GlobalInclude.h"
-
-@class EAGLContext;
-@class CAEAGLLayer;
-
-//----------------------------------------------------------------------------------------
-struct RenderTargetInitParams
-{
-  RenderTargetInitParams();
-  
-  EAGLContext*  mContext;
-  CAEAGLLayer*  mCALayer;
-  
-  // Width and height of color vs. depth buffers have to be the same. We don't resize in iOS.
-  int32_t       mBufferWidth;
-  int32_t       mBufferHeight;
-  
-  GLenum        mColorFormat;
-  GLenum        mDepthStencilFormat;
-
-  uint32_t      mFlags;
-};
-
-//----------------------------------------------------------------------------------------
-class RenderTarget
-{
-public:
-  enum RenderTargetFlags
-  {
-    kSystemFramebuffer = 0x1 << 0,
-  };
-  
-  const static uint32_t MAX_RENDER_BUFFERS = 2;
-
-  RenderTarget();
-  ~RenderTarget();
-  
-  bool          init( RenderTargetInitParams& params );
-  void          destroy();
-  
-  EAGLContext*  getContext() const { return mContext; }
-  uint32_t      getWidth() const  { return mRenderBufferWidth; }
-  uint32_t      getHeight() const { return mRenderBufferHeight; }
-  GLuint        getFramebuffer() const { return mFramebuffer; }
-  GLuint        getColorBuffer() const { return mColorBuffer; }
-
-protected:
-  EAGLContext*  mContext;
-  GLuint        mFramebuffer;
-  
-  GLuint        mColorBuffer;
-  GLuint        mDepthStencilBuffer;
-  
-  int32_t       mRenderBufferWidth;
-  int32_t       mRenderBufferHeight;
-  
-  uint32_t      mFlags;
-};
diff --git a/Classes/Foundation/GraphicsServices/RenderTarget.mm b/Classes/Foundation/GraphicsServices/RenderTarget.mm
deleted file mode 100644 (file)
index 659f7d6..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-#include "RenderTarget.h"
-
-#import <QuartzCore/QuartzCore.h>
-
-//----------------------------------------------------------------------------------------
-RenderTargetInitParams::RenderTargetInitParams() :  mContext(NULL),
-                                                    mCALayer(NULL),
-                                                    mBufferWidth(0),
-                                                    mBufferHeight(0),
-                                                    mColorFormat(GL_NONE),
-                                                    mDepthStencilFormat(GL_NONE),
-                                                    mFlags(0)
-{
-}
-
-//----------------------------------------------------------------------------------------
-RenderTarget::RenderTarget() :  mContext(NULL),
-                                mFramebuffer(0),
-                                mColorBuffer(0),
-                                mDepthStencilBuffer(0),
-                                mRenderBufferWidth(0),
-                                mRenderBufferHeight(0),
-                                mFlags(0)
-{
-};
-
-//----------------------------------------------------------------------------------------
-RenderTarget::~RenderTarget()
-{
-  if ( mFramebuffer )
-  {
-    AssertMessage( !mFramebuffer, "RenderTarget has not been destroyed yet!" );
-    destroy();
-  }
-  else
-  {
-    mContext              = NULL;
-    mFramebuffer          = 0;
-    mColorBuffer          = 0;
-    mDepthStencilBuffer   = 0;
-    mRenderBufferWidth    = 0;
-    mRenderBufferHeight   = 0;
-    mFlags                = 0;
-  }
-};
-
-//----------------------------------------------------------------------------------------
-bool RenderTarget::init( RenderTargetInitParams& params )
-{
-  if (mFramebuffer)
-  {
-    AssertMessage( 0, "RenderTarget already initialized.\n" );
-    return false;
-  }
-
-  mContext = params.mContext;
-  AssertMessage( mContext, "Invalid context provided.\n" );
-
-  // Set the context first.
-  [EAGLContext setCurrentContext:mContext];
-
-  mRenderBufferWidth = params.mBufferWidth;
-  mRenderBufferHeight = params.mBufferHeight;
-  
-  if (params.mFlags & kSystemFramebuffer)
-  {
-    [mContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:params.mCALayer];
-    glGetRenderbufferParameteriv( GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &mRenderBufferWidth );
-    glGetRenderbufferParameteriv( GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &mRenderBufferHeight );
-  }
-  else
-  {
-    if (params.mColorFormat != GL_NONE)
-    {
-      glGenRenderbuffers( 1, &mColorBuffer );
-      Assert( mColorBuffer );
-      glBindRenderbuffer( GL_RENDERBUFFER, mColorBuffer );
-      glRenderbufferStorage( GL_RENDERBUFFER, params.mColorFormat, mRenderBufferWidth, mRenderBufferHeight );
-    }
-  }
-
-  if (params.mDepthStencilFormat != GL_NONE)
-  {
-    // If a depth/stencil buffer is needed, we'll create one with the same dimensions as the color buffer.
-    glGenRenderbuffers( 1, &mDepthStencilBuffer );
-    Assert( mDepthStencilBuffer );
-    glBindRenderbuffer( GL_RENDERBUFFER, mDepthStencilBuffer );
-    glRenderbufferStorage( GL_RENDERBUFFER, params.mDepthStencilFormat, mRenderBufferWidth, mRenderBufferHeight );
-  }
-  
-  if (mColorBuffer || mDepthStencilBuffer)
-  {
-    // Create framebuffer object.
-    glGenFramebuffers( 1, &mFramebuffer );
-    glBindFramebuffer( GL_FRAMEBUFFER, mFramebuffer );
-
-    if (mColorBuffer)
-    {
-      glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mColorBuffer );
-    }
-    
-    if (mDepthStencilBuffer)
-    {
-      glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthStencilBuffer );
-    }
-    
-    AssertMessage( glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Failed to make complete framebuffer object: %x", glCheckFramebufferStatus(GL_FRAMEBUFFER) );
-  }
-  else
-  {
-    return false;
-  }
-
-
-  return true;
-}
-
-//----------------------------------------------------------------------------------------
-void RenderTarget::destroy()
-{
-  if (!mContext)
-  {
-    return;
-  }
-
-  [EAGLContext setCurrentContext:mContext];
-
-  if (mColorBuffer && glIsRenderbuffer(mColorBuffer))
-  {
-    glDeleteRenderbuffers( 1, &mColorBuffer );
-  }
-  
-  if (mDepthStencilBuffer && glIsRenderbuffer(mDepthStencilBuffer))
-  {
-    glDeleteRenderbuffers( 1, &mDepthStencilBuffer );
-  }
-  
-  if (mFramebuffer)
-  {
-    glDeleteFramebuffers( 1, &mFramebuffer );
-  }
-
-  mContext              = NULL;
-  mFramebuffer          = 0;
-  mColorBuffer          = 0;
-  mDepthStencilBuffer   = 0;
-  mRenderBufferWidth    = 0;
-  mRenderBufferHeight   = 0;
-  mFlags                = 0;
-}
diff --git a/Classes/Foundation/Hash/DJB2.h b/Classes/Foundation/Hash/DJB2.h
deleted file mode 100755 (executable)
index 31b863f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-// djb2 string hash function\r
-static slInline uint32_t StrHash(const char* str)\r
-{\r
-  uint32_t hash = 5381; // seed value\r
-  int32_t c = *str;\r
-\r
-       if(!str)\r
-       {\r
-               Assert(false);\r
-               return 0;\r
-       }\r
-\r
-       while ( (*str != 0) )\r
-  {\r
-    hash = ((hash << 5) + hash) + c; /* hash * 33 + c == ((hash * 32) + hash) + c */\r
-               c = *(str++);\r
-       }\r
-\r
-  return hash; \r
-}
\ No newline at end of file
diff --git a/Classes/Foundation/Math/MathDefines.h b/Classes/Foundation/Math/MathDefines.h
deleted file mode 100755 (executable)
index b9bbdaa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once\r
-\r
-#define kEpsilon     1e-6\r
-#define kSqrtEpsilon 1e-3\r
-\r
-#define kPi       3.1415926535897932384626433832795\r
-#define kPi_2     1.5707963267948966192313216916398\r
-#define kPi_3     1.0471975511965977461542144610932\r
-#define kPi_4     0.78539816339744830961566084581988\r
-#define k2Pi_3    2.0943951023931954923084289221863\r
-#define k3Pi_4    2.3561944901923449288469825374596\r
-#define k2Pi      6.283185307179586476925286766559\r
-\r
-#define kE        2.7182818284590452353602874713527\r
diff --git a/Classes/Foundation/Math/MathInclude.h b/Classes/Foundation/Math/MathInclude.h
deleted file mode 100755 (executable)
index 718190a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Math/MathDefines.h"\r
-#include "Foundation/Math/MathOperations.h"\r
-#include "Foundation/Math/MathTypes.h"\r
-#include "Foundation/Math/Vector.h"\r
-#include "Foundation/Math/Quaternion.h"\r
-#include "Foundation/Math/Matrix.h"\r
diff --git a/Classes/Foundation/Math/MathOperations.h b/Classes/Foundation/Math/MathOperations.h
deleted file mode 100755 (executable)
index af49e6f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#pragma once\r
-\r
-#include <math.h>\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-#if defined(__WINDOWS__)\r
-\r
-#pragma intrinsic(sin)\r
-#pragma intrinsic(cos)\r
-#pragma intrinsic(tan)\r
-#pragma intrinsic(abs)\r
-#pragma intrinsic(fabs)\r
-#pragma intrinsic(asin)\r
-#pragma intrinsic(acos)\r
-#pragma intrinsic(atan)\r
-#pragma intrinsic(atan2)\r
-#pragma intrinsic(exp)\r
-#pragma intrinsic(sqrt)\r
-#pragma intrinsic(log)\r
-#pragma intrinsic(log10)\r
-\r
-#endif\r
-\r
-#define Sinf(x)   sin(x)\r
-#define Cosf(x)   cos(x)\r
-#define Tanf(x)   tan(x)\r
-#define Sqrtf(x)  sqrt(x)\r
-\r
-//----------------------------------------------------------------------------------------\r
-#define Min2(x, y)              ( (x) <= (y) ? (x) : (y) )\r
-#define Max2(x, y)              ( (x) >= (y) ? (x) : (y) )\r
-#define Min3(x, y, z)           ( (x) <= (y) ? ((x) <= (z) ? (x) : (z)) : ((y) <= (z) ? (y) : (z)) )\r
-#define Max3(x, y, z)           ( (x) >= (y) ? ((x) >= (z) ? (x) : (z)) : ((y) >= (z) ? (y) : (z)) )\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float Absf(const float& f)\r
-{\r
-  IntFloat int_float;\r
-  int_float.m_Float = f;\r
-  int_float.m_Int32 &= 0x7fffffff;\r
-  return int_float.m_Float;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline bool EpsilonEquals(const float& a, const float& b, const float& epsilon)\r
-{\r
-  return Absf(a - b) <= epsilon;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint16_t ConvertFloatToHalf( unsigned int f )\r
-{\r
-  unsigned int s = f & 0x80000000;\r
-  signed int e = ((f & 0x7f800000) >> 23) - (127 - 15);\r
-  if (e < 0) return 0;\r
-  else if (e > 31)\r
-  {\r
-    e = 31;\r
-  }\r
-  unsigned int fo = f & 0x7fffff;\r
-  return (uint16_t)((s >> 16) | ((e << 10) & 0x7c00) | (fo >> 13));\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float ConvertHalfToFloat( unsigned short h )\r
-{\r
-  unsigned int s = h & 0x8000;\r
-  unsigned int e = ((h & 0x7c00) >> 10) - 15 + 127;\r
-  unsigned int f = h & 0x3ff;\r
-\r
-  IntFloat int_float;\r
-  int_float.m_UInt32 = ((s << 16) | ((e << 23) & 0x7f800000) | (f << 13));\r
-\r
-  return int_float.m_Float;\r
-}\r
diff --git a/Classes/Foundation/Math/MathTypes.h b/Classes/Foundation/Math/MathTypes.h
deleted file mode 100755 (executable)
index 379bf16..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-#include "Foundation/Math/MathOperations.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Vec2\r
-{\r
-  float x;\r
-  float y;\r
-\r
-  slInline explicit Vec2() {}\r
-  slInline explicit Vec2(const float xy) {x = xy; y = xy;}\r
-  slInline explicit Vec2(const float ix, const float iy) {x = ix; y = iy;}\r
-\r
-  slInline Vec2(const Vec2& v) {x = v.x; y = v.y;} // copy constructor\r
-\r
-  slInline float* AsFloatArray() {return &x;}\r
-  slInline const float* AsFloatArray() const {return &x;}\r
-\r
-  slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
-};\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Vec3\r
-{\r
-  float x;\r
-  float y;\r
-  float z;\r
-\r
-  slInline explicit Vec3() {}\r
-  slInline explicit Vec3(const float xyz) {x = xyz; y = xyz; z = xyz;}\r
-  slInline explicit Vec3(const float ix, const float iy, const float iz) {x = ix; y = iy; z = iz;}\r
-\r
-  slInline explicit Vec3(const Vec2& v, const float iz) {x = v.x; y = v.y; z = iz;}\r
-\r
-  slInline Vec3(const Vec3& v) {x = v.x; y = v.y; z = v.z;} // copy constructor\r
-\r
-  slInline Vec2 AsVec2() const {return Vec2(x, y);}\r
-\r
-  slInline float* AsFloatArray() {return &x;}\r
-  slInline const float* AsFloatArray() const {return &x;}\r
-\r
-  slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
-};\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Vec4\r
-{\r
-  float x;\r
-  float y;\r
-  float z;\r
-  float w;\r
-\r
-  slInline explicit Vec4() {}\r
-  slInline explicit Vec4(const float xyzw) {x = xyzw; y = xyzw; z = xyzw; w = xyzw;}\r
-  slInline explicit Vec4(const float xyz, const float iw) {x = xyz; y = xyz; z = xyz; w = iw;}\r
-  slInline explicit Vec4(const float ix, const float iy, const float iz, const float iw) {x = ix; y = iy; z = iz; w = iw;}\r
-\r
-  slInline explicit Vec4(const Vec2& u, const Vec2& v) {x = u.x; y = u.y; z = v.x; w = v.y;}\r
-  slInline explicit Vec4(const Vec2& v, const float iz, const float iw) {x = v.x; y = v.y; z = iz; w = iw;}\r
-\r
-  slInline explicit Vec4(const Vec3& v, const float iw) {x = v.x; y = v.y; z = v.z; w = iw;}\r
-\r
-  slInline Vec4(const Vec4& v) {x = v.x; y = v.y; z = v.z; w = v.w;} // copy constructor\r
-\r
-  slInline Vec2 AsVec2() const {return Vec2(x, y);}\r
-  slInline Vec3 AsVec3() const {return Vec3(x, y, z);}\r
-\r
-  slInline float* AsFloatArray() {return &x;}\r
-  slInline const float* AsFloatArray() const {return &x;}\r
-\r
-  slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
-};\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Quaternion\r
-{\r
-  float i;\r
-  float j;\r
-  float k;\r
-  float s;\r
-\r
-  slInline explicit Quaternion() {}\r
-  explicit Quaternion(const float angle, const Vec3& normalized_axis);\r
-  explicit Quaternion(const float angle, const float x, const float y, const float z);\r
-\r
-  slInline Quaternion(const Quaternion& q) {i = q.i; j = q.j; k = q.k; s = q.s;}\r
-\r
-  Vec4 AsVec4();\r
-  slInline float* AsFloatArray() {return &i;}\r
-\r
-  Vec3 GetImaginary();\r
-  slInline float GetReal() {return s;}\r
-};\r
-\r
-slInline Quaternion::Quaternion(const float angle, const Vec3& normalized_axis)\r
-{\r
-  Assert( EpsilonEquals(normalized_axis.x * normalized_axis.x + normalized_axis.y * normalized_axis.y + normalized_axis.z * normalized_axis.z, 1.0f, kSqrtEpsilon) );\r
-  float half_angle = angle * 0.5f;\r
-  float sin_half_angle = (float)Sinf(half_angle);\r
-  i = normalized_axis.x * sin_half_angle;\r
-  j = normalized_axis.y * sin_half_angle;\r
-  k = normalized_axis.z * sin_half_angle;\r
-  s = (float)Cosf(half_angle);\r
-}\r
-\r
-slInline Quaternion::Quaternion(const float angle, const float x, const float y, const float z)\r
-{\r
-  Assert( EpsilonEquals(x * x + y * y + z * z, 1.0f, kSqrtEpsilon) );\r
-  float half_angle = angle * 0.5f;\r
-  float sin_half_angle = (float)Sinf(half_angle);\r
-  i = x * sin_half_angle;\r
-  j = y * sin_half_angle;\r
-  k = z * sin_half_angle;\r
-  s = (float)Cosf(half_angle);\r
-}\r
-\r
-Vec4 Quaternion::AsVec4()\r
-{\r
-  Vec4 r;\r
-  r.x = i;\r
-  r.y = j;\r
-  r.z = k;\r
-  r.w = s;\r
-  return r;\r
-}\r
-\r
-Vec3 Quaternion::GetImaginary()\r
-{\r
-  Vec3 r;\r
-  r.x = i;\r
-  r.y = j;\r
-  r.z = k;\r
-  return r;\r
-}\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Mat3\r
-{\r
-  Vec3 v[3];\r
-\r
-  slInline explicit Mat3() {}\r
-  explicit Mat3(const Vec3& v0, const Vec3& v1, const Vec3& v2);\r
-  explicit Mat3(const float v00, const float v01, const float v02,\r
-                const float v10, const float v11, const float v12,\r
-                const float v20, const float v21, const float v22);\r
-  Mat3(const Mat3& m); // copy constructor\r
-\r
-  float* AsFloatArray() {return &v[0].x;}\r
-};\r
-\r
-slInline Mat3::Mat3(const Vec3& v0, const Vec3& v1, const Vec3& v2)\r
-{\r
-  v[0] = v0;\r
-  v[1] = v1;\r
-  v[2] = v2;\r
-}\r
-\r
-slInline Mat3::Mat3(const float v00, const float v01, const float v02, const float v10, const float v11, const float v12, const float v20, const float v21, const float v22)\r
-{\r
-  v[0].x = v00; v[0].y = v01; v[0].z = v02;\r
-  v[1].x = v10; v[1].y = v11; v[1].z = v12;\r
-  v[2].x = v20; v[2].y = v21; v[2].z = v22;\r
-}\r
-\r
-slInline Mat3::Mat3(const Mat3& m)\r
-{\r
-  v[0] = m.v[0];\r
-  v[1] = m.v[1];\r
-  v[2] = m.v[2];\r
-}\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Mat4\r
-{\r
-  Vec4 v[4];\r
-\r
-  slInline explicit Mat4() {}\r
-  explicit Mat4(const Vec4& v0, const Vec4& v1, const Vec4& v2, const Vec4& v3);\r
-  explicit Mat4(const float v00, const float v01, const float v02, const float v03,\r
-                const float v10, const float v11, const float v12, const float v13,\r
-                const float v20, const float v21, const float v22, const float v23,\r
-                const float v30, const float v31, const float v32, const float v33);\r
-  explicit Mat4(const Mat3& m);\r
-  Mat4(const Mat4& m); // copy constructor\r
-\r
-  float* AsFloatArray() {return &v[0].x;}\r
-};\r
-\r
-slInline Mat4::Mat4(const Vec4& v0, const Vec4& v1, const Vec4& v2, const Vec4& v3)\r
-{\r
-  v[0] = v0;\r
-  v[1] = v1;\r
-  v[2] = v2;\r
-  v[3] = v3;\r
-}\r
-\r
-slInline Mat4::Mat4(const float v00, const float v01, const float v02, const float v03, const float v10, const float v11, const float v12, const float v13, const float v20, const float v21, const float v22, const float v23, const float v30, const float v31, const float v32, const float v33)\r
-{\r
-  v[0].x = v00; v[0].y = v01; v[0].z = v02; v[0].w = v03;\r
-  v[1].x = v10; v[1].y = v11; v[1].z = v12; v[1].w = v13;\r
-  v[2].x = v20; v[2].y = v21; v[2].z = v22; v[2].w = v23;\r
-  v[3].x = v30; v[3].y = v31; v[3].z = v32; v[3].w = v33;\r
-}\r
-\r
-slInline Mat4::Mat4(const Mat3& m)\r
-{\r
-  v[0].x = m.v[0].x; v[0].y = m.v[0].y; v[0].z = m.v[0].z; v[0].w = 0.0f;\r
-  v[1].x = m.v[1].x; v[1].y = m.v[1].y; v[1].z = m.v[1].z; v[1].w = 0.0f;\r
-  v[2].x = m.v[2].x; v[2].y = m.v[2].y; v[2].z = m.v[2].z; v[2].w = 0.0f;\r
-  v[3].x = 0.0f;     v[3].y = 0.0f;     v[3].z = 0.0f;     v[3].w = 1.0f;\r
-}\r
-\r
-slInline Mat4::Mat4(const Mat4& m)\r
-{\r
-  v[0] = m.v[0];\r
-  v[1] = m.v[1];\r
-  v[2] = m.v[2];\r
-  v[3] = m.v[3];\r
-}\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-typedef MEM_ALIGN(8)  Vec2  AlignedVec2;\r
-typedef MEM_ALIGN(16) Vec3  AlignedVec3;\r
-typedef MEM_ALIGN(16) Vec4  AlignedVec4;\r
-\r
-typedef MEM_ALIGN(64) Mat3  AlignedMat3;\r
-typedef MEM_ALIGN(64) Mat4  AlignedMat4;\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-// SIMD Structures\r
-//----------------------------------------------------------------------------------------\r
-struct Vec2SOA\r
-{\r
-  uint32_t m_Count;\r
-  uint32_t m_MaxCount;\r
-\r
-  float* m_X;\r
-  float* m_Y;\r
-\r
-  slInline explicit Vec2SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL;}\r
-  bool InitVec2SOA(float* buffer, uint32_t buffer_size);\r
-\r
-  void GetVec2AtIndex(Vec2& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index];}\r
-};\r
-\r
-slInline bool Vec2SOA::InitVec2SOA(float* buffer, uint32_t max_count)\r
-{\r
-  m_Count = 0;\r
-\r
-  uint64_t buffer_addr = (uint64_t)buffer;\r
-  uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
-  uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
-\r
-  if (buffer_end - buffer_addr_aligned < 20)\r
-  {\r
-    m_MaxCount = 0;\r
-    m_X = NULL;\r
-    m_Y = NULL;\r
-\r
-    return false;\r
-  }\r
-\r
-  uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
-  uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 32;\r
-\r
-  m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count & 0x1));\r
-\r
-  m_X = (float*)buffer_addr_aligned;\r
-  m_Y = m_X + ALIGN_UP(m_MaxCount, 4);\r
-}\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Vec3SOA : public Vec2SOA\r
-{\r
-  float* m_Z;\r
-\r
-  slInline explicit Vec3SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL;}\r
-  bool InitVec3SOA(float* buffer, uint32_t buffer_size);\r
-\r
-  void GetVec3AtIndex(Vec3& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index];}\r
-};\r
-\r
-slInline bool Vec3SOA::InitVec3SOA(float* buffer, uint32_t max_count)\r
-{\r
-  m_Count = 0;\r
-\r
-  uint64_t buffer_addr = (uint64_t)buffer;\r
-  uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
-  uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
-\r
-  if (buffer_end - buffer_addr_aligned < 36)\r
-  {\r
-    m_MaxCount = 0;\r
-    m_X = NULL;\r
-    m_Y = NULL;\r
-    m_Z = NULL;\r
-\r
-    return false;\r
-  }\r
-\r
-  uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
-  uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 48;\r
-\r
-  m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count % 3 == 2));\r
-\r
-  m_X = (float*)buffer_addr_aligned;\r
-  uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4);\r
-  m_Y = m_X + aligned_count;\r
-  m_Z = m_Y + aligned_count;\r
-}\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-struct Vec4SOA : public Vec3SOA\r
-{\r
-  float* m_W;\r
-\r
-  slInline explicit Vec4SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL; m_W = NULL;}\r
-  bool InitVec4SOA(float* buffer, uint32_t buffer_size);\r
-\r
-  void GetVec4AtIndex(Vec4& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index]; v.w = m_W[index];}\r
-};\r
-\r
-slInline bool Vec4SOA::InitVec4SOA(float* buffer, uint32_t max_count)\r
-{\r
-  m_Count = 0;\r
-\r
-  uint64_t buffer_addr = (uint64_t)buffer;\r
-  uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
-  uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
-\r
-  if (buffer_end - buffer_addr_aligned < 52)\r
-  {\r
-    m_MaxCount = 0;\r
-    m_X = NULL;\r
-    m_Y = NULL;\r
-    m_Z = NULL;\r
-    m_W = NULL;\r
-\r
-    return false;\r
-  }\r
-\r
-  uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
-  uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 64;\r
-\r
-  m_MaxCount = slot_count * 4 + (uint32_t)(remainder * ((slot_count & 0x3) == 4));\r
-\r
-  m_X = (float*)buffer_addr_aligned;\r
-  uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4);\r
-  m_Y = m_X + aligned_count;\r
-  m_Z = m_Y + aligned_count;\r
-  m_W = m_Z + aligned_count;\r
-}\r
diff --git a/Classes/Foundation/Math/Matrix.h b/Classes/Foundation/Math/Matrix.h
deleted file mode 100755 (executable)
index 40e2a70..0000000
+++ /dev/null
@@ -1,660 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-#include "Foundation/Math/MathOperations.h"\r
-#include "Foundation/Math/MathTypes.h"\r
-#include "Foundation/Math/Vector.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Matrix are expressed in post-multiply row-major format.\r
-// That is, matrix multiplication follows the form v = x * A.\r
-// A local-to-world transform with basis a, b, c, expressed in world space, will result\r
-//   in a matrix that looks like:\r
-//    _   _\r
-//   |  a  |\r
-//   |  b  |\r
-//   |  c  |\r
-//    -   -\r
-//\r
-// Therefore, translate t will naturally follow below c, in the illustration above.\r
-// With this, we can stuff the matrix directly into OpenGL and not have to do swizzling.\r
-//----------------------------------------------------------------------------------------\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Mat3\r
-//----------------------------------------------------------------------------------------\r
-void SetMat3(Mat3& r, const Mat3& a);\r
-void SetMat3(Mat3& r, const Vec3& v0, const Vec3& v1, const Vec3& v2);\r
-\r
-void ScaleMat3(Mat3& r, const float s, const Mat3& a);\r
-Mat3 ScaleMat3(const float s, const Mat3& a);\r
-\r
-float DeterminantOfMat3(const Mat3& a);\r
-\r
-void TransposeMat3(Mat3& r, const Mat3& a);\r
-Mat3 TransposeMat3(const Mat3& a);\r
-\r
-void InvertAffineMat3(Mat3& r, const Mat3& a);\r
-Mat3 InvertAffineMat3(const Mat3& a);\r
-\r
-void InvertGeneralMat3(Mat3& r, const Mat3& a);\r
-Mat3 InvertGeneralMat3(const Mat3& a);\r
-\r
-void MulMat3(Mat3& r, const Mat3& a, const Mat3& b);\r
-Mat3 MulMat3(const Mat3& a, const Mat3& b);\r
-\r
-void MulMat3ByTransposedMat3(Mat3& r, const Mat3& a, const Mat3& b);\r
-Mat3 MulMat3ByTransposedMat3(const Mat3& a, const Mat3& b);\r
-\r
-void MulVec3ByMat3(Vec3& r, const Vec3& v, const Mat3& a);\r
-Vec3 MulVec3ByMat3(const Vec3& v, const Mat3& a);\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetMat3(Mat3& r, const Mat3& a)\r
-{\r
-  r.v[0] = a.v[0];\r
-  r.v[1] = a.v[1];\r
-  r.v[2] = a.v[2];\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetMat3(Mat3& r, const Vec3& v0, const Vec3& v1, const Vec3& v2)\r
-{\r
-  r.v[0] = v0;\r
-  r.v[1] = v1;\r
-  r.v[2] = v2;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleMat3(Mat3& r, const float s, const Mat3& a)\r
-{\r
-  ScaleVec3(r.v[0], s, a.v[0]);\r
-  ScaleVec3(r.v[1], s, a.v[1]);\r
-  ScaleVec3(r.v[2], s, a.v[2]);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 ScaleMat3(const float s, const Mat3& a)\r
-{\r
-  Mat3 r;\r
-  ScaleVec3(r.v[0], s, a.v[0]);\r
-  ScaleVec3(r.v[1], s, a.v[1]);\r
-  ScaleVec3(r.v[2], s, a.v[2]);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DeterminantOfMat3(const Mat3& a)\r
-{\r
-  return a.v[0].x * (a.v[1].y * a.v[2].z - a.v[1].z * a.v[2].y)\r
-       + a.v[0].y * (a.v[1].z * a.v[2].x - a.v[1].x * a.v[2].z)\r
-       + a.v[0].z * (a.v[1].x * a.v[2].y - a.v[1].y * a.v[2].x);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void TransposeMat3(Mat3& r, const Mat3& a)\r
-{\r
-  // a might be the same as r\r
-  r.v[0].x = a.v[0].x;\r
-  r.v[1].y = a.v[1].y;\r
-  r.v[2].z = a.v[2].z;\r
-\r
-  float temp;\r
-  temp = r.v[0].y;\r
-  r.v[0].y = r.v[1].x;\r
-  r.v[1].x = temp;\r
-\r
-  temp = r.v[0].z;\r
-  r.v[0].z = r.v[2].x;\r
-  r.v[2].x = temp;\r
-\r
-  temp = r.v[1].z;\r
-  r.v[1].z = r.v[2].y;\r
-  r.v[2].y = temp;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 TransposeMat3(const Mat3& a)\r
-{\r
-  Mat3 r;\r
-  r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x;\r
-  r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y;\r
-  r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void InvertAffineMat3(Mat3& r, const Mat3& a)\r
-{\r
-  TransposeMat3(r, a);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 InvertAffineMat3(const Mat3& a)\r
-{\r
-  return TransposeMat3(a);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void InvertGeneralMat3(Mat3& r, const Mat3& a)\r
-{\r
-  float inv_determinant = 1.0f / DeterminantOfMat3(a);\r
-\r
-  Mat3 a_T;\r
-  TransposeMat3(a_T, a);\r
-  CrossVec3(r.v[0], a_T.v[1], a_T.v[2]);\r
-  CrossVec3(r.v[1], a_T.v[2], a_T.v[0]);\r
-  CrossVec3(r.v[2], a_T.v[0], a_T.v[1]);\r
-\r
-  ScaleMat3(r, inv_determinant, r);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 InvertGeneralMat3(const Mat3& a)\r
-{\r
-  float inv_determinant = 1.0f / DeterminantOfMat3(a);\r
-\r
-  Mat3 r;\r
-  Mat3 a_T = TransposeMat3(a);\r
-  CrossVec3(r.v[0], a_T.v[1], a_T.v[2]);\r
-  CrossVec3(r.v[1], a_T.v[2], a_T.v[0]);\r
-  CrossVec3(r.v[2], a_T.v[0], a_T.v[1]);\r
-\r
-  return ScaleMat3(inv_determinant, r);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulMat3(Mat3& r, const Mat3& a, const Mat3& b)\r
-{\r
-  Mat3 temp;\r
-\r
-  temp.v[0].x = DotVec3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  temp.v[0].y = DotVec3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  temp.v[0].z = DotVec3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  temp.v[1].x = DotVec3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  temp.v[1].y = DotVec3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  temp.v[1].z = DotVec3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  temp.v[2].x = DotVec3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  temp.v[2].y = DotVec3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  temp.v[2].z = DotVec3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  SetMat3(r, temp);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 MulMat3(const Mat3& a, const Mat3& b)\r
-{\r
-  Mat3 r;\r
-\r
-  r.v[0].x = DotVec3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  r.v[0].y = DotVec3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  r.v[0].z = DotVec3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  r.v[1].x = DotVec3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  r.v[1].y = DotVec3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  r.v[1].z = DotVec3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  r.v[2].x = DotVec3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x);\r
-  r.v[2].y = DotVec3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y);\r
-  r.v[2].z = DotVec3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z);\r
-\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulMat3ByTransposedMat3(Mat3& r, const Mat3& a, const Mat3& b)\r
-{\r
-  Mat3 temp;\r
-\r
-  temp.v[0].x = DotVec3(a.v[0], b.v[0]);\r
-  temp.v[0].y = DotVec3(a.v[0], b.v[1]);\r
-  temp.v[0].z = DotVec3(a.v[0], b.v[2]);\r
-\r
-  temp.v[1].x = DotVec3(a.v[1], b.v[0]);\r
-  temp.v[1].y = DotVec3(a.v[1], b.v[1]);\r
-  temp.v[1].z = DotVec3(a.v[1], b.v[2]);\r
-\r
-  temp.v[2].x = DotVec3(a.v[2], b.v[0]);\r
-  temp.v[2].y = DotVec3(a.v[2], b.v[1]);\r
-  temp.v[2].z = DotVec3(a.v[2], b.v[2]);\r
-\r
-  SetMat3(r, temp);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat3 MulMat3ByTransposedMat3(const Mat3& a, const Mat3& b)\r
-{\r
-  Mat3 r;\r
-\r
-  r.v[0].x = DotVec3(a.v[0], b.v[0]);\r
-  r.v[0].y = DotVec3(a.v[0], b.v[1]);\r
-  r.v[0].z = DotVec3(a.v[0], b.v[2]);\r
-\r
-  r.v[1].x = DotVec3(a.v[1], b.v[0]);\r
-  r.v[1].y = DotVec3(a.v[1], b.v[1]);\r
-  r.v[1].z = DotVec3(a.v[1], b.v[2]);\r
-\r
-  r.v[2].x = DotVec3(a.v[2], b.v[0]);\r
-  r.v[2].y = DotVec3(a.v[2], b.v[1]);\r
-  r.v[2].z = DotVec3(a.v[2], b.v[2]);\r
-\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-// do NOT pass in components of a as the r vector\r
-slInline void MulVec3ByMat3(Vec3& r, const Vec3& v, const Mat3& a)\r
-{\r
-  float x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x;\r
-  float y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y;\r
-  float z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z;\r
-  SetVec3(r, x, y, z);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 MulVec3ByMat3(const Vec3& v, const Mat3& a)\r
-{\r
-  Vec3 r;\r
-  r.x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x;\r
-  r.y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y;\r
-  r.z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z;\r
-  return r;\r
-}\r
-\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Mat4\r
-//----------------------------------------------------------------------------------------\r
-void SetMat4(Mat4& r, const Mat4& a);\r
-void SetMat4(Mat4& r, const Mat3& a);\r
-void SetMat4(Mat4& r, const Mat3& a, const Vec3& position);\r
-\r
-void ScaleMat4(Mat4& r, const float s, const Mat4& a);\r
-Mat4 ScaleMat4(const float s, const Mat4& a);\r
-\r
-float DeterminantOfMat4(const Mat4& a);\r
-\r
-void TransposeMat4(Mat4& r, const Mat4& a);\r
-Mat4 TransposeMat4(const Mat4& a);\r
-\r
-void InvertAffineMat4(Mat4& r, const Mat4& a);\r
-Mat4 InvertAffineMat4(const Mat4& a);\r
-\r
-void InvertGeneralMat4(Mat4& r, const Mat4& a);\r
-Mat4 InvertGeneralMat4(const Mat4& a);\r
-\r
-void MulMat4(Mat4& r, const Mat4& a, const Mat4& b);\r
-Mat4 MulMat4(const Mat4& a, const Mat4& b);\r
-\r
-void MulMat4ByTransposedMat4(Mat4& r, const Mat4& a, const Mat4& t);\r
-Mat4 MulMat4ByTransposedMat4(const Mat4& a, Mat4& t);\r
-\r
-void MulVec4ByMat4(Vec4& r, const Vec4& v, const Mat4& a);\r
-Vec4 MulVec4ByMat4(const Vec4& v, const Mat4& a);\r
-\r
-void MulVec3ByMat4(Vec4& r, const Vec3& v, const float w, const Mat4& a);\r
-Vec4 MulVec3ByMat4(const Vec3& v, const float w, const Mat4& a);\r
-\r
-void MulVec4ByTransposedMat4(Vec4& r, const Vec4& v, const Mat4& t);\r
-Vec4 MulVec4ByTransposedMat4(const Vec4& v, const Mat4& t);\r
-\r
-void MulVec3ByTransposedMat4(Vec4& r, const Vec3& v, const float w, const Mat4& t);\r
-Vec4 MulVec3ByTransposedMat4(const Vec3& v, const float w, const Mat4& t);\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetMat4(Mat4& r, const Mat4& a)\r
-{\r
-  r.v[0] = a.v[0];\r
-  r.v[1] = a.v[1];\r
-  r.v[2] = a.v[2];\r
-  r.v[3] = a.v[3];\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetMat4(Mat4& r, const Mat3& a)\r
-{\r
-  SetVec4(r.v[0], a.v[0], 0.0f);\r
-  SetVec4(r.v[1], a.v[1], 0.0f);\r
-  SetVec4(r.v[2], a.v[2], 0.0f);\r
-  SetVec4(r.v[3], 0.0f, 0.0f, 0.0f, 1.0f);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetMat4(Mat4& r, const Mat3& a, const Vec3& position)\r
-{\r
-  SetVec4(r.v[0], a.v[0], 0.0f);\r
-  SetVec4(r.v[1], a.v[1], 0.0f);\r
-  SetVec4(r.v[2], a.v[2], 0.0f);\r
-  SetVec4(r.v[3], position, 1.0f);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleMat4(Mat4& r, const float s, const Mat4& a)\r
-{\r
-  ScaleVec4(r.v[0], s, a.v[0]);\r
-  ScaleVec4(r.v[1], s, a.v[1]);\r
-  ScaleVec4(r.v[2], s, a.v[2]);\r
-  ScaleVec4(r.v[3], s, a.v[3]);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 ScaleMat4(const float s, const Mat4& a)\r
-{\r
-  Mat4 r;\r
-  ScaleVec4(r.v[0], s, a.v[0]);\r
-  ScaleVec4(r.v[1], s, a.v[1]);\r
-  ScaleVec4(r.v[2], s, a.v[2]);\r
-  ScaleVec4(r.v[3], s, a.v[3]);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DeterminantOfMat4(const Mat4& a)\r
-{\r
-  // is this correct?\r
-  Vec4 cross_product;\r
-  CrossVec4(cross_product, a.v[1], a.v[2], a.v[3]);\r
-  return DotVec4(a.v[0], cross_product);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void TransposeMat4(Mat4& r, const Mat4& a)\r
-{\r
-  // a might be the same as r\r
-  r.v[0].x = a.v[0].x;\r
-  r.v[1].y = a.v[1].y;\r
-  r.v[2].z = a.v[2].z;\r
-  r.v[3].w = a.v[3].w;\r
-\r
-  float temp;\r
-  temp = r.v[0].y;\r
-  r.v[0].y = r.v[1].x;\r
-  r.v[1].x = temp;\r
-\r
-  temp = r.v[0].z;\r
-  r.v[0].z = r.v[2].x;\r
-  r.v[2].x = temp;\r
-\r
-  temp = r.v[0].w;\r
-  r.v[0].w = r.v[3].x;\r
-  r.v[3].x = temp;\r
-\r
-  temp = r.v[1].z;\r
-  r.v[1].z = r.v[2].y;\r
-  r.v[2].y = temp;\r
-\r
-  temp = r.v[1].w;\r
-  r.v[1].w = r.v[3].y;\r
-  r.v[3].y = temp;\r
-\r
-  temp = r.v[2].w;\r
-  r.v[2].w = r.v[3].z;\r
-  r.v[3].z = temp;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 TransposeMat4(const Mat4& a)\r
-{\r
-  Mat4 r;\r
-  r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x; r.v[0].w = a.v[3].x;\r
-  r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y; r.v[1].w = a.v[3].y;\r
-  r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z; r.v[2].w = a.v[3].z;\r
-  r.v[3].x = a.v[0].w; r.v[3].y = a.v[1].w; r.v[3].z = a.v[2].w; r.v[3].w = a.v[3].w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void InvertAffineMat4(Mat4& r, const Mat4& a)\r
-{\r
-  // this may not be correct...\r
-  Mat3 a3_T(a.v[0].AsVec3(), a.v[1].AsVec3(), a.v[2].AsVec3());\r
-  InvertAffineMat3(a3_T, a3_T);\r
-\r
-  Vec3 transpose;\r
-  MulVec3ByMat3(transpose, a.v[3].AsVec3(), a3_T);\r
-\r
-  SetMat4(r, a3_T, transpose);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 InvertAffineMat4(const Mat4& a)\r
-{\r
-  Mat4 r;\r
-\r
-  // this may not be correct...\r
-  Mat3 a3_T(a.v[0].AsVec3(), a.v[1].AsVec3(), a.v[2].AsVec3());\r
-  InvertAffineMat3(a3_T, a3_T);\r
-\r
-  Vec3 transpose;\r
-  MulVec3ByMat3(transpose, a.v[3].AsVec3(), a3_T);\r
-\r
-  SetMat4(r, a3_T, transpose);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void InvertGeneralMat4(Mat4& r, const Mat4& a)\r
-{\r
-  // does this work?\r
-  float inv_determinant = 1.0f / DeterminantOfMat4(a);\r
-\r
-  Mat4 a_T;\r
-  TransposeMat4(a_T, a);\r
-  CrossVec4(r.v[0], a_T.v[1], a_T.v[2], a_T.v[3]);\r
-  CrossVec4(r.v[1], a_T.v[2], a_T.v[3], a_T.v[0]);\r
-  CrossVec4(r.v[2], a_T.v[3], a_T.v[0], a_T.v[1]);\r
-  CrossVec4(r.v[3], a_T.v[0], a_T.v[1], a_T.v[2]);\r
-\r
-  ScaleMat4(r, inv_determinant, r);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 InvertGeneralMat4(const Mat4& a)\r
-{\r
-  // does this work?\r
-  Mat4 r;\r
-  float inv_determinant = 1.0f / DeterminantOfMat4(a);\r
-\r
-  Mat4 a_T;\r
-  TransposeMat4(a_T, a);\r
-  r.v[0] = CrossVec4(a_T.v[1], a_T.v[2], a_T.v[3]);\r
-  r.v[1] = CrossVec4(a_T.v[2], a_T.v[3], a_T.v[0]);\r
-  r.v[2] = CrossVec4(a_T.v[3], a_T.v[0], a_T.v[1]);\r
-  r.v[3] = CrossVec4(a_T.v[0], a_T.v[1], a_T.v[2]);\r
-\r
-  return ScaleMat4(inv_determinant, r);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulMat4(Mat4& r, const Mat4& a, const Mat4& b)\r
-{\r
-  Mat4 temp;\r
-\r
-  temp.v[0].x = DotVec4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  temp.v[0].y = DotVec4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  temp.v[0].z = DotVec4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  temp.v[0].w = DotVec4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  temp.v[1].x = DotVec4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  temp.v[1].y = DotVec4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  temp.v[1].z = DotVec4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  temp.v[1].w = DotVec4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  temp.v[2].x = DotVec4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  temp.v[2].y = DotVec4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  temp.v[2].z = DotVec4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  temp.v[2].w = DotVec4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  temp.v[3].x = DotVec4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  temp.v[3].y = DotVec4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  temp.v[3].z = DotVec4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  temp.v[3].w = DotVec4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  SetMat4(r, temp);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 MulMat4(const Mat4& a, const Mat4& b)\r
-{\r
-  Mat4 r;\r
-\r
-  r.v[0].x = DotVec4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  r.v[0].y = DotVec4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  r.v[0].z = DotVec4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  r.v[0].w = DotVec4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  r.v[1].x = DotVec4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  r.v[1].y = DotVec4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  r.v[1].z = DotVec4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  r.v[1].w = DotVec4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  r.v[2].x = DotVec4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  r.v[2].y = DotVec4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  r.v[2].z = DotVec4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  r.v[2].w = DotVec4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  r.v[3].x = DotVec4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
-  r.v[3].y = DotVec4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
-  r.v[3].z = DotVec4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
-  r.v[3].w = DotVec4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
-\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulMat4ByTransposedMat4(Mat4& r, const Mat4& a, const Mat4& t)\r
-{\r
-  Mat4 temp;\r
-\r
-  temp.v[0].x = DotVec4(a.v[0], t.v[0]);\r
-  temp.v[0].y = DotVec4(a.v[0], t.v[1]);\r
-  temp.v[0].z = DotVec4(a.v[0], t.v[2]);\r
-  temp.v[0].w = DotVec4(a.v[0], t.v[3]);\r
-\r
-  temp.v[1].x = DotVec4(a.v[1], t.v[0]);\r
-  temp.v[1].y = DotVec4(a.v[1], t.v[1]);\r
-  temp.v[1].z = DotVec4(a.v[1], t.v[2]);\r
-  temp.v[1].w = DotVec4(a.v[1], t.v[3]);\r
-\r
-  temp.v[2].x = DotVec4(a.v[2], t.v[0]);\r
-  temp.v[2].y = DotVec4(a.v[2], t.v[1]);\r
-  temp.v[2].z = DotVec4(a.v[2], t.v[2]);\r
-  temp.v[2].w = DotVec4(a.v[2], t.v[3]);\r
-\r
-  temp.v[3].x = DotVec4(a.v[3], t.v[0]);\r
-  temp.v[3].y = DotVec4(a.v[3], t.v[1]);\r
-  temp.v[3].z = DotVec4(a.v[3], t.v[2]);\r
-  temp.v[3].w = DotVec4(a.v[3], t.v[3]);\r
-\r
-  SetMat4(r, temp);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Mat4 MulMat4ByTransposedMat4(const Mat4& a, const Mat4& t)\r
-{\r
-  Mat4 r;\r
-\r
-  r.v[0].x = DotVec4(a.v[0], t.v[0]);\r
-  r.v[0].y = DotVec4(a.v[0], t.v[1]);\r
-  r.v[0].z = DotVec4(a.v[0], t.v[2]);\r
-  r.v[0].w = DotVec4(a.v[0], t.v[3]);\r
-\r
-  r.v[1].x = DotVec4(a.v[1], t.v[0]);\r
-  r.v[1].y = DotVec4(a.v[1], t.v[1]);\r
-  r.v[1].z = DotVec4(a.v[1], t.v[2]);\r
-  r.v[1].w = DotVec4(a.v[1], t.v[3]);\r
-\r
-  r.v[2].x = DotVec4(a.v[2], t.v[0]);\r
-  r.v[2].y = DotVec4(a.v[2], t.v[1]);\r
-  r.v[2].z = DotVec4(a.v[2], t.v[2]);\r
-  r.v[2].w = DotVec4(a.v[2], t.v[3]);\r
-\r
-  r.v[3].x = DotVec4(a.v[3], t.v[0]);\r
-  r.v[3].y = DotVec4(a.v[3], t.v[1]);\r
-  r.v[3].z = DotVec4(a.v[3], t.v[2]);\r
-  r.v[3].w = DotVec4(a.v[3], t.v[3]);\r
-\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec4ByMat4(Vec4& r, const Vec4& v, const Mat4& a)\r
-{\r
-  Vec4 result;\r
-  ScaleVec4(result, v.x, a.v[0]);\r
-  ScaleAddVec4(result, v.y, a.v[1], result);\r
-  ScaleAddVec4(result, v.z, a.v[2], result);\r
-  ScaleAddVec4(result, v.w, a.v[3], result);\r
-  SetVec4(r, result);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec4ByMat4(const Vec4& v, const Mat4& a)\r
-{\r
-  Vec4 r;\r
-  ScaleVec4(r, v.x, a.v[0]);\r
-  ScaleAddVec4(r, v.y, a.v[1], r);\r
-  ScaleAddVec4(r, v.z, a.v[2], r);\r
-  ScaleAddVec4(r, v.w, a.v[3], r);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec3ByMat4(Vec4& r, const Vec3& v, const float iw, const Mat4& a)\r
-{\r
-  Vec4 result;\r
-  ScaleVec4(result, v.x, a.v[0]);\r
-  ScaleAddVec4(result, v.y, a.v[1], result);\r
-  ScaleAddVec4(result, v.z, a.v[2], result);\r
-  ScaleAddVec4(result, iw, a.v[3], result);\r
-  SetVec4(r, result);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec3ByMat4(const Vec3& v, const float iw, const Mat4& a)\r
-{\r
-  Vec4 r;\r
-  ScaleVec4(r, v.x, a.v[0]);\r
-  ScaleAddVec4(r, v.y, a.v[1], r);\r
-  ScaleAddVec4(r, v.z, a.v[2], r);\r
-  ScaleAddVec4(r, iw, a.v[3], r);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec4ByTransposedMat4(Vec4& r, const Vec4& v, const Mat4& t)\r
-{\r
-  float x = DotVec4(v, t.v[0]);\r
-  float y = DotVec4(v, t.v[1]);\r
-  float z = DotVec4(v, t.v[2]);\r
-  float w = DotVec4(v, t.v[3]);\r
-  SetVec4(r, x, y, z, w);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec4ByTransposedMat4(const Vec4& v, const Mat4& t)\r
-{\r
-  Vec4 r;\r
-  r.x = DotVec4(v, t.v[0]);\r
-  r.y = DotVec4(v, t.v[1]);\r
-  r.z = DotVec4(v, t.v[2]);\r
-  r.w = DotVec4(v, t.v[3]);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec3ByTransposedMat4(Vec4& r, const Vec3& v, const float w, const Mat4& t)\r
-{\r
-  Vec4 v_new(v, w);\r
-  MulVec4ByTransposedMat4(r, v_new, t);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec3ByTransposedMat4(const Vec3& v, const float w, const Mat4& t)\r
-{\r
-  Vec4 v_as_v4(v, w);\r
-  return MulVec4ByTransposedMat4(v_as_v4, t);\r
-}\r
diff --git a/Classes/Foundation/Math/Quaternion.h b/Classes/Foundation/Math/Quaternion.h
deleted file mode 100755 (executable)
index d9cce5d..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-#include "Foundation/Math/MathTypes.h"\r
-#include "Foundation/Math/Vector.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Quaternion\r
-//----------------------------------------------------------------------------------------\r
-void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z);\r
-void SetQuaternion(Quaternion& r, const float angle, const Vec3& rotation_axis);\r
-void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q);\r
-void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q);\r
-void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q);\r
-float NormOfQuaternion(const Quaternion& q);\r
-float NormSquaredOfQuaternion(const Quaternion& q);\r
-void NormalizeQuaternion(Quaternion& r, Quaternion& q);\r
-void InverseQuaterion(Quaternion& r, const Quaternion& q);\r
-\r
-//----------------------------------------------------------------------------------------\r
-void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z)\r
-{\r
-  Assert( EpsilonEquals(x*x + y*y + z*z, 0.0f, kSqrtEpsilon) );\r
-\r
-  float half_angle = angle * 0.5f;\r
-  float sin_half_angle = (float)Sinf(half_angle);\r
-\r
-  r.i = x * sin_half_angle;\r
-  r.j = y * sin_half_angle;\r
-  r.k = z * sin_half_angle;\r
-  r.s = (float)Cosf(half_angle);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void SetQuaternion(Quaternion& r, const float angle, const Vec3& rotation_axis)\r
-{\r
-  Assert( EpsilonEquals(rotation_axis.x * rotation_axis.x + rotation_axis.y * rotation_axis.y + rotation_axis.z * rotation_axis.z, 0.0f, kSqrtEpsilon) );\r
-\r
-  float half_angle = angle * 0.5f;\r
-  float sin_half_angle = (float)Sinf(half_angle);\r
-\r
-  r.i = rotation_axis.x * sin_half_angle;\r
-  r.j = rotation_axis.y * sin_half_angle;\r
-  r.k = rotation_axis.z * sin_half_angle;\r
-  r.s = (float)Cosf(half_angle);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q)\r
-{\r
-  r.i = q.i * s;\r
-  r.j = q.j * s;\r
-  r.k = q.k * s;\r
-  r.s = q.s * s;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q)\r
-{\r
-  r.i = p.s * q.i + p.i * q.s + p.j * q.k - p.k * q.j;\r
-  r.j = p.s * q.j + p.j * q.s + p.k * q.i - p.i * q.k;\r
-  r.k = p.s * q.k + p.k * q.s + p.i * q.j - p.j * q.i;\r
-  r.s = p.s * q.s - p.i * q.i - p.j * q.j - p.k * q.k;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q)\r
-{\r
-  r.i = -q.i;\r
-  r.j = -q.j;\r
-  r.k = -q.k;\r
-  r.s = q.s;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-float NormOfQuaternion(const Quaternion& q)\r
-{\r
-  return (float)Sqrtf( q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-float NormSquaredOfQuaternion(const Quaternion& q)\r
-{\r
-  return q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void NormalizeQuaternion(Quaternion& r, Quaternion& q)\r
-{\r
-  float norm_scale = 1.0f / NormOfQuaternion( q );\r
-  ScaleQuaternion( r, norm_scale, q );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void InverseQuaterion(Quaternion& r, const Quaternion& q)\r
-{\r
-  ConjugateOfQuaternion( r, q );\r
-  float inv_norm_squared = 1.0f / NormSquaredOfQuaternion( q );\r
-  ScaleQuaternion( r, inv_norm_squared, q );\r
-}\r
diff --git a/Classes/Foundation/Math/Vector.h b/Classes/Foundation/Math/Vector.h
deleted file mode 100755 (executable)
index 91cc817..0000000
+++ /dev/null
@@ -1,1176 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-#include "Foundation/Math/MathTypes.h"\r
-#include "Foundation/Math/MathOperations.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Vec2\r
-//----------------------------------------------------------------------------------------\r
-void SetVec2(Vec2& r, const Vec2& v);\r
-void SetVec2(Vec2& r, const float x, const float y);\r
-void SetVec2(Vec2& r, const float xy);\r
-void AbsVec2(Vec2& r, const Vec2& v);\r
-float MinComponentVec2(const Vec2& v);\r
-float MaxComponentVec2(const Vec2& v);\r
-uint32_t MinIndexVec2(const Vec2& v);\r
-uint32_t MaxIndexVec2(const Vec2& v);\r
-float DotVec2(const Vec2& a, const Vec2& b);\r
-float DotVec2(const Vec2& a, const float x, const float y);\r
-\r
-void PerpendicularVec2(Vec2& r, const Vec2& v);\r
-Vec2 PerpendicularVec2(const Vec2& v);\r
-\r
-void AddVec2ByScalar(Vec2& r, const float s, const Vec2& v);\r
-Vec2 AddVec2ByScalar(const float s, const Vec2& v);\r
-\r
-void AddVec2(Vec2& r, const Vec2& a, const Vec2& b);\r
-Vec2 AddVec2(const Vec2& a, const Vec2& b);\r
-\r
-void AddVec2(Vec2& r, const Vec2& a, const float x, const float y);\r
-Vec2 AddVec2(const Vec2& a, const float x, const float y);\r
-\r
-void SubVec2(Vec2& r, const Vec2& a, const Vec2& b);\r
-Vec2 SubVec2(const Vec2& a, const Vec2& b);\r
-\r
-void SubVec2(Vec2& r, const Vec2& a, const float x, const float y);\r
-Vec2 SubVec2(const Vec2& a, const float x, const float y);\r
-\r
-void ScaleVec2(Vec2& r, const float s, const Vec2& v);\r
-Vec2 ScaleVec2(const float s, const Vec2& v);\r
-\r
-void MulVec2(Vec2& r, const Vec2& a, const Vec2& b);\r
-Vec2 MulVec2(const Vec2& a, const Vec2& b);\r
-\r
-void MulVec2(Vec2& r, const Vec2& a, const float x, const float y);\r
-Vec2 MulVec2(const Vec2& a, const float x, const float y);\r
-\r
-void DivVec2(Vec2& r, const Vec2& a, const Vec2& b);\r
-Vec2 DivVec2(const Vec2& a, const Vec2& b);\r
-\r
-void DivVec2(Vec2& r, const Vec2& a, const float x, const float y);\r
-Vec2 DivVec2(const Vec2& a, const float x, const float y);\r
-\r
-void ScaleAddVec2(Vec2& r, const float s, const Vec2& v_scale, const Vec2& v_add);\r
-Vec2 ScaleAddVec2(const float s, const Vec2& v_scale, const Vec2& v_add);\r
-\r
-void NormalizeVec2(Vec2& r, const Vec2& a);\r
-Vec2 NormalizeVec2(const Vec2& a);\r
-\r
-float LengthOfVec2(const Vec2& a);\r
-float LengthSquaredOfVec2(const Vec2& a);\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec2(Vec2& r, const Vec2& v)\r
-{\r
-  r.x = v.x;\r
-  r.y = v.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec2(Vec2& r, const float x, const float y)\r
-{\r
-  r.x = x;\r
-  r.y = y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec2(Vec2& r, const float xy)\r
-{\r
-  r.x = xy;\r
-  r.y = xy;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void AbsVec2(Vec2& r, const Vec2& v)\r
-{\r
-  r.x = Absf(v.x);\r
-  r.y = Absf(v.y);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-float MinComponentVec2(const Vec2& v)\r
-{\r
-  return v.x <= v.y ? v.x : v.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-float MaxComponentVec2(const Vec2& v)\r
-{\r
-  return v.x >= v.y ? v.x : v.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-uint32_t MinIndexVec2(const Vec2& v)\r
-{\r
-  return v.x <= v.y ? 0 : 1;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-uint32_t MaxIndexVec2(const Vec2& v)\r
-{\r
-  return v.x >= v.y ? 0 : 1;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec2(const Vec2& a, const Vec2& b)\r
-{\r
-  return a.x * b.x + a.y * b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec2(const Vec2& a, const float x, const float y)\r
-{\r
-  return a.x * x + a.y * y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void PerpendicularVec2(Vec2& r, const Vec2& v)\r
-{\r
-  r.x = -v.y;\r
-  r.y = v.x;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 PerpendicularVec2(const Vec2& v)\r
-{\r
-  Vec2 r;\r
-  r.x = -v.y;\r
-  r.y = v.x;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec2ByScalar(Vec2& r, const float s, Vec2& v)\r
-{\r
-  r.x = s + v.x;\r
-  r.y = s + v.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 AddVec2ByScalar(const float s, const Vec2& v)\r
-{\r
-  Vec2 r;\r
-  r.x = s + v.x;\r
-  r.y = s + v.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec2(Vec2& r, const Vec2& a, const Vec2& b)\r
-{\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 AddVec2(const Vec2& a, const Vec2& b)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec2(Vec2& r, const Vec2& a, const float x, const float y)\r
-{\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 AddVec2(const Vec2& a, const float x, const float y)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SubVec2(Vec2& r, const Vec2& a, const Vec2& b)\r
-{\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 SubVec2(const Vec2& a, const Vec2& b)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SubVec2(Vec2& r, const Vec2& a, const float x, const float y)\r
-{\r
-  r.x = a.x - x;\r
-  r.y = a.y - y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 SubVec2(const Vec2& a, const float x, const float y)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x - x;\r
-  r.y = a.y - y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleVec2(Vec2& r, const float s, const Vec2& v)\r
-{\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 ScaleVec2(const float s, const Vec2& v)\r
-{\r
-  Vec2 r;\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec2(Vec2& r, const Vec2& a, const Vec2& b)\r
-{\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 MulVec2(const Vec2& a, const Vec2& b)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec2(Vec2& r, const Vec2& a, const float x, const float y)\r
-{\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 MulVec2(const Vec2& a, const float x, const float y)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec2(Vec2& r, const Vec2& a, const Vec2& b)\r
-{\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 DivVec2(const Vec2& a, const Vec2& b)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec2(Vec2& r, const Vec2& a, const float x, const float y)\r
-{\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 DivVec2(const Vec2& a, const float x, const float y)\r
-{\r
-  Vec2 r;\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleAddVec2(Vec2& r, const float s, const Vec2& v_scale, const Vec2& v_add)\r
-{\r
-  r.x = v_scale.x * s + v_add.x;\r
-  r.y = v_scale.y * s + v_add.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 ScaleAddVec2(const float s, const Vec2& v_scale, const Vec2& v_add)\r
-{\r
-  Vec2 r;\r
-  r.x = v_scale.x * s + v_add.x;\r
-  r.y = v_scale.y * s + v_add.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void NormalizeVec2(Vec2& r, const Vec2& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec2(a);\r
-  ScaleVec2( r, scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec2 NormalizeVec2(const Vec2& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec2(a);\r
-  return ScaleVec2( scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthOfVec2(const Vec2& a)\r
-{\r
-  return (float)Sqrtf( DotVec2(a, a) );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthSquaredOfVec2(const Vec2& a)\r
-{\r
-  return DotVec2(a, a);\r
-}\r
-\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Vec3\r
-//----------------------------------------------------------------------------------------\r
-void SetVec3(Vec3& r, const Vec3& v);\r
-void SetVec3(Vec3& r, const Vec2& v, const float z);\r
-void SetVec3(Vec3& r, const float xyz);\r
-void SetVec3(Vec3& r, const float x, const float y, const float z);\r
-\r
-void AbsVec3(Vec3& r, const Vec3& v);\r
-Vec3 AbsVec3(const Vec3& v);\r
-\r
-float MinComponentVec3(const Vec3& v);\r
-float MaxComponentVec3(const Vec3& v);\r
-uint32_t MinIndexVec3(const Vec3& v);\r
-uint32_t MaxIndexVec3(const Vec3& v);\r
-float DotVec3(const Vec3& a, const Vec3& b);\r
-float DotVec3(const Vec3& a, const float x, const float y, const float z);\r
-\r
-void CrossVec3(Vec3& r, const Vec3& a, const Vec3& b);\r
-Vec3 CrossVec3(const Vec3& a, const Vec3& b);\r
-\r
-void AddVec3ByScalar(Vec3& r, const float s, Vec3& v);\r
-Vec3 AddVec3ByScalar(const float s, Vec3& v);\r
-\r
-void AddVec3(Vec3& r, const Vec3& a, const Vec3& b);\r
-Vec3 AddVec3(const Vec3& a, const Vec3& b);\r
-\r
-void AddVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z);\r
-Vec3 AddVec3(const Vec3& a, const float x, const float y, const float z);\r
-\r
-void SubVec3(Vec3& r, const Vec3& a, const Vec3& b);\r
-Vec3 SubVec3(const Vec3& a, const Vec3& b);\r
-\r
-void SubVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z);\r
-Vec3 SubVec3(const Vec3& a, const float x, const float y, const float z);\r
-\r
-void ScaleVec3(Vec3& r, const float s, const Vec3& v);\r
-Vec3 ScaleVec3(const float s, const Vec3& v);\r
-\r
-void MulVec3(Vec3& r, const Vec3& a, const Vec3& b);\r
-Vec3 MulVec3(const Vec3& a, const Vec3& b);\r
-\r
-void MulVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z);\r
-Vec3 MulVec3(const Vec3& a, const float x, const float y, const float z);\r
-\r
-void DivVec3(Vec3& r, const Vec3& a, const Vec3& b);\r
-Vec3 DivVec3(const Vec3& a, const Vec3& b);\r
-\r
-void DivVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z);\r
-Vec3 DivVec3(const Vec3& a, const float x, const float y, const float z);\r
-\r
-void ScaleAddVec3(Vec3& r, const float s, const Vec3& v_scale, const Vec3& v_add);\r
-Vec3 ScaleAddVec3(const float s, const Vec3& v_scale, const Vec3& v_add);\r
-\r
-void NormalizeVec3(Vec3& r, const Vec3& a);\r
-Vec3 NormalizeVec3(const Vec3& a);\r
-\r
-float LengthOfVec3(const Vec3& a);\r
-float LengthSquaredVec3(const Vec3& a);\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec3(Vec3& r, const Vec3& v)\r
-{\r
-  r.x = v.x;\r
-  r.y = v.y;\r
-  r.z = v.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec3(Vec3& r, const Vec2& v, const float z)\r
-{\r
-  r.x = v.x;\r
-  r.y = v.y;\r
-  r.z = z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec3(Vec3& r, const float xyz)\r
-{\r
-  r.x = xyz;\r
-  r.y = xyz;\r
-  r.z = xyz;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec3(Vec3& r, const float x, const float y, const float z)\r
-{\r
-  r.x = x;\r
-  r.y = y;\r
-  r.z = z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AbsVec3(Vec3& r, const Vec3& v)\r
-{\r
-  r.x = Absf(v.x);\r
-  r.y = Absf(v.y);\r
-  r.z = Absf(v.z);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 AbsVec3(const Vec3& v)\r
-{\r
-  Vec3 r;\r
-  r.x = Absf(v.x);\r
-  r.y = Absf(v.y);\r
-  r.z = Absf(v.z);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float MinComponentVec3(const Vec3& v)\r
-{\r
-  float xy = v.x <= v.y ? v.x : v.y;\r
-  return xy <= v.z ? xy : v.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float MaxComponentVec3(const Vec3& v)\r
-{\r
-  float xy = v.x >= v.y ? v.x : v.y;\r
-  return xy >= v.z ? xy : v.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MinIndexVec3(const Vec3& v)\r
-{\r
-  const float* v_array = &v.x;\r
-  uint32_t xy = v.x <= v.y ? 0 : 1;\r
-  return v_array[xy] <= v.z ? xy : 2;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MaxIndexVec3(const Vec3& v)\r
-{\r
-  const float* v_array = &v.x;\r
-  uint32_t xy = v.x >= v.y ? 0 : 1;\r
-  return v_array[xy] >= v.z ? xy : 2;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  return a.x * b.x + a.y * b.y + a.z * b.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec3(const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  return a.x * x + a.y * y + a.z * z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void CrossVec3(Vec3& r, const Vec3& a, const Vec3& b)\r
-{\r
-  float x = a.y * b.z - b.y * a.z;\r
-  float y = a.z * b.x - b.z * a.x;\r
-  float z = a.x * b.y - b.x * a.y;\r
-  r.x = x;\r
-  r.y = y;\r
-  r.z = z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 CrossVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  Vec3 r;\r
-  r.x = a.y * b.z - b.y * a.z;\r
-  r.y = a.z * b.x - b.z * a.x;\r
-  r.z = a.x * b.y - b.x * a.y;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec3ByScalar(Vec3& r, const float s, Vec3& v)\r
-{\r
-  r.x = s + v.x;\r
-  r.y = s + v.y;\r
-  r.z = s + v.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 AddVec3ByScalar(const float s, Vec3& v)\r
-{\r
-  Vec3 r;\r
-  r.x = s + v.x;\r
-  r.y = s + v.y;\r
-  r.z = s + v.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec3(Vec3& r, const Vec3& a, const Vec3& b)\r
-{\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-  r.z = a.z + b.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 AddVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-  r.z = a.z + b.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-  r.z = a.z + z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 AddVec3(const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-  r.z = a.z + z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SubVec3(Vec3& r, const Vec3& a, const Vec3& b)\r
-{\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-  r.z = a.z - b.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 SubVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-  r.z = a.z - b.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 SubVec3(const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x - x;\r
-  r.y = a.y - y;\r
-  r.z = a.z - z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleVec3(Vec3& r, const float s, const Vec3& v)\r
-{\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 ScaleVec3(const float s, const Vec3& v)\r
-{\r
-  Vec3 r;\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec3(Vec3& r, const Vec3& a, const Vec3& b)\r
-{\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-  r.z = a.z * b.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 MulVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-  r.z = a.z * b.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-  r.z = a.z * z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 MulVec3(const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-  r.z = a.z * z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec3(Vec3& r, const Vec3& a, const Vec3& b)\r
-{\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-  r.z = a.z / b.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 DivVec3(const Vec3& a, const Vec3& b)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-  r.z = a.z / b.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-  r.z = a.z / z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 DivVec3(const Vec3& a, const float x, const float y, const float z)\r
-{\r
-  Vec3 r;\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-  r.z = a.z / z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleAddVec3(Vec3& r, const float s, const Vec3& v_scale, const Vec3& v_add)\r
-{\r
-  r.x = s * v_scale.x + v_add.x;\r
-  r.y = s * v_scale.y + v_add.y;\r
-  r.z = s * v_scale.z + v_add.z;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 ScaleAddVec3(const float s, const Vec3& v_scale, const Vec3& v_add)\r
-{\r
-  Vec3 r;\r
-  r.x = s * v_scale.x + v_add.x;\r
-  r.y = s * v_scale.y + v_add.y;\r
-  r.z = s * v_scale.z + v_add.z;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void NormalizeVec3(Vec3& r, const Vec3& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec3( a );\r
-  ScaleVec3( r, scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec3 NormalizeVec3(const Vec3& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec3( a );\r
-  return ScaleVec3( scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthOfVec3(const Vec3& a)\r
-{\r
-  return (float)Sqrtf( DotVec3(a, a) );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthSquaredOfVec3(const Vec3& a)\r
-{\r
-  return DotVec3( a, a );\r
-}\r
-\r
-\r
-\r
-//----------------------------------------------------------------------------------------\r
-// Vec4\r
-//----------------------------------------------------------------------------------------\r
-void SetVec4(Vec4& r, const Vec4& v);\r
-void SetVec4(Vec4& r, const Vec2& a, const Vec2& b);\r
-void SetVec4(Vec4& r, const Vec3& v, const float w);\r
-void SetVec4(Vec4& r, const float xyzw);\r
-void SetVec4(Vec4& r, const float x, const float y, const float z, const float w);\r
-\r
-void AbsVec4(Vec4& r, const Vec4& v);\r
-Vec4 AbsVec4(const Vec4& v);\r
-\r
-float MinComponentVec4(const Vec4& v);\r
-float MaxComponentVec4(const Vec4& v);\r
-uint32_t MinIndexVec4(const Vec4& v);\r
-uint32_t MaxIndexVec4(const Vec4& v);\r
-float DotVec4(const Vec4& a, const Vec4& b);\r
-float DotVec4(const Vec4& a, const float x, const float y, const float z, const float w);\r
-\r
-void CrossVec4(Vec4& r, const Vec4& a, const Vec4& b, const Vec4& c);\r
-Vec4 CrossVec4(const Vec4& a, const Vec4& b, const Vec4& c);\r
-\r
-void AddVec4ByScalar(Vec4& r, const float s, Vec4& v);\r
-Vec4 AddVec4ByScalar(const float s, Vec4& v);\r
-\r
-void AddVec4(Vec4& r, const Vec4& a, const Vec4& b);\r
-Vec4 AddVec4(const Vec4& a, const Vec4& b);\r
-\r
-void AddVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w);\r
-Vec4 AddVec4(const Vec4& a, const float x, const float y, const float z, const float w);\r
-\r
-void SubVec4(Vec4& r, const Vec4& a, const Vec4& b);\r
-Vec4 SubVec4(const Vec4& a, const Vec4& b);\r
-\r
-void SubVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w);\r
-Vec4 SubVec4(const Vec4& a, const float x, const float y, const float z, const float w);\r
-\r
-void ScaleVec4(Vec4& r, const float s, const Vec4& v);\r
-Vec4 ScaleVec4(const float s, const Vec4& v);\r
-\r
-void MulVec4(Vec4& r, const Vec4& a, const Vec4& b);\r
-Vec4 MulVec4(const Vec4& a, const Vec4& b);\r
-\r
-void MulVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w);\r
-Vec4 MulVec4(const Vec4& a, const float x, const float y, const float z, const float w);\r
-\r
-void DivVec4(Vec4& r, const Vec4& a, const Vec4& b);\r
-Vec4 DivVec4(const Vec4& a, const Vec4& b);\r
-\r
-void DivVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w);\r
-Vec4 DivVec4(const Vec4& a, const float x, const float y, const float z, const float w);\r
-\r
-void ScaleAddVec4(Vec4& r, const float s, const Vec4& v_scale, const Vec4& v_add);\r
-Vec4 ScaleAddVec4(const float s, const Vec4& v_scale, const Vec4& v_add);\r
-\r
-void NormalizeVec4(Vec4& r, const Vec4& a);\r
-Vec4 NormalizeVec4(const Vec4& a);\r
-\r
-float LengthOfVec4(const Vec4& a);\r
-float LengthSquaredVec4(const Vec4& a);\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec4(Vec4& r, const Vec4& v)\r
-{\r
-  r.x = v.x;\r
-  r.y = v.y;\r
-  r.z = v.z;\r
-  r.w = v.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec4(Vec4& r, const Vec2& a, const Vec2& b)\r
-{\r
-  r.x = a.x;\r
-  r.y = a.y;\r
-  r.z = b.x;\r
-  r.w = b.y;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec4(Vec4& r, const Vec3& v, const float w)\r
-{\r
-  r.x = v.x;\r
-  r.y = v.y;\r
-  r.z = v.z;\r
-  r.w = w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec4(Vec4& r, const float xyzw)\r
-{\r
-  r.x = xyzw;\r
-  r.y = xyzw;\r
-  r.z = xyzw;\r
-  r.w = xyzw;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SetVec4(Vec4& r, const float x, const float y, const float z, const float w)\r
-{\r
-  r.x = x;\r
-  r.y = y;\r
-  r.z = z;\r
-  r.w = w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AbsVec4(Vec4& r, const Vec4& v)\r
-{\r
-  r.x = Absf(v.x);\r
-  r.y = Absf(v.y);\r
-  r.z = Absf(v.z);\r
-  r.w = Absf(v.w);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 AbsVec4(const Vec4& v)\r
-{\r
-  Vec4 r;\r
-  r.x = Absf(v.x);\r
-  r.y = Absf(v.y);\r
-  r.z = Absf(v.z);\r
-  r.w = Absf(v.w);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float MinComponentVec4(const Vec4& v)\r
-{\r
-  float xy = v.x <= v.y ? v.x : v.y;\r
-  float zw = v.z <= v.w ? v.z : v.w;\r
-  return xy <= zw ? xy : zw;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float MaxComponentVec4(const Vec4& v)\r
-{\r
-  float xy = v.x >= v.y ? v.x : v.y;\r
-  float zw = v.z >= v.w ? v.z : v.w;\r
-  return xy >= zw ? xy : zw;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MinIndexVec4(const Vec4& v)\r
-{\r
-  const float* v_array = &v.x;\r
-  uint32_t xy = v.x <= v.y ? 0 : 1;\r
-  uint32_t zw = v.x <= v.y ? 2 : 3;\r
-  return v_array[xy] <= v_array[zw] ? xy : zw;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MaxIndexVec4(const Vec4& v)\r
-{\r
-  const float* v_array = &v.x;\r
-  uint32_t xy = v.x >= v.y ? 0 : 1;\r
-  uint32_t zw = v.x >= v.y ? 2 : 3;\r
-  return v_array[xy] >= v_array[zw] ? xy : zw;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec4(const Vec4& a, const Vec4& b)\r
-{\r
-  return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float DotVec4(const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  return a.x * x + a.y * y + a.z * z + a.w * w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void CrossVec4(Vec4& r, const Vec4& a, const Vec4& b, const Vec4& c)\r
-{\r
-  // is this right?\r
-  r.x =  a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y);\r
-  r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x);\r
-  r.z =  a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x);\r
-  r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 CrossVec4(const Vec4& a, const Vec4& b, const Vec4& c)\r
-{\r
-  Vec4 r;\r
-  // is this right?\r
-  r.x =  a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y);\r
-  r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x);\r
-  r.z =  a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x);\r
-  r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x);\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec4ByScalar(Vec4& r, const float s, Vec4& v)\r
-{\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-  r.w = s * v.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 AddVec4ByScalar(const float s, Vec4& v)\r
-{\r
-  Vec4 r;\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-  r.w = s * v.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec4(Vec4& r, const Vec4& a, const Vec4& b)\r
-{\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-  r.z = a.z + b.z;\r
-  r.w = a.w + b.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 AddVec4(const Vec4& a, const Vec4& b)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x + b.x;\r
-  r.y = a.y + b.y;\r
-  r.z = a.z + b.z;\r
-  r.w = a.w + b.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void AddVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-  r.z = a.z + z;\r
-  r.w = a.w + w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 AddVec4(const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x + x;\r
-  r.y = a.y + y;\r
-  r.z = a.z + z;\r
-  r.w = a.w + w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SubVec4(Vec4& r, const Vec4& a, const Vec4& b)\r
-{\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-  r.z = a.z - b.z;\r
-  r.w = a.w - b.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 SubVec4(const Vec4& a, const Vec4& b)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x - b.x;\r
-  r.y = a.y - b.y;\r
-  r.z = a.z - b.z;\r
-  r.w = a.w - b.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void SubVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  r.x = a.x - x;\r
-  r.y = a.y - y;\r
-  r.z = a.z - z;\r
-  r.w = a.w - w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 SubVec4(const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x - x;\r
-  r.y = a.y - y;\r
-  r.z = a.z - z;\r
-  r.w = a.w - w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleVec4(Vec4& r, const float s, const Vec4& v)\r
-{\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-  r.w = s * v.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 ScaleVec4(const float s, const Vec4& v)\r
-{\r
-  Vec4 r;\r
-  r.x = s * v.x;\r
-  r.y = s * v.y;\r
-  r.z = s * v.z;\r
-  r.w = s * v.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec4(Vec4& r, const Vec4& a, const Vec4& b)\r
-{\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-  r.z = a.z * b.z;\r
-  r.w = a.w * b.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec4(const Vec4& a, const Vec4& b)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x * b.x;\r
-  r.y = a.y * b.y;\r
-  r.z = a.z * b.z;\r
-  r.w = a.w * b.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MulVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-  r.z = a.z * z;\r
-  r.w = a.w * w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 MulVec4(const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x * x;\r
-  r.y = a.y * y;\r
-  r.z = a.z * z;\r
-  r.w = a.w * w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec4(Vec4& r, const Vec4& a, const Vec4& b)\r
-{\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-  r.z = a.z / b.z;\r
-  r.w = a.w / b.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 DivVec4(const Vec4& a, const Vec4& b)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x / b.x;\r
-  r.y = a.y / b.y;\r
-  r.z = a.z / b.z;\r
-  r.w = a.w / b.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void DivVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-  r.z = a.z / z;\r
-  r.w = a.w / w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 DivVec4(const Vec4& a, const float x, const float y, const float z, const float w)\r
-{\r
-  Vec4 r;\r
-  r.x = a.x / x;\r
-  r.y = a.y / y;\r
-  r.z = a.z / z;\r
-  r.w = a.w / w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void ScaleAddVec4(Vec4& r, const float s, const Vec4& v_scale, const Vec4& v_add)\r
-{\r
-  r.x = s * v_scale.x + v_add.x;\r
-  r.y = s * v_scale.y + v_add.y;\r
-  r.z = s * v_scale.z + v_add.z;\r
-  r.w = s * v_scale.w + v_add.w;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 ScaleAddVec4(const float s, const Vec4& v_scale, const Vec4& v_add)\r
-{\r
-  Vec4 r;\r
-  r.x = s * v_scale.x + v_add.x;\r
-  r.y = s * v_scale.y + v_add.y;\r
-  r.z = s * v_scale.z + v_add.z;\r
-  r.w = s * v_scale.w + v_add.w;\r
-  return r;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void NormalizeVec4(Vec4& r, const Vec4& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec4( a );\r
-  ScaleVec4( r, scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline Vec4 NormalizeVec4(const Vec4& a)\r
-{\r
-  float scale = 1.0f / LengthOfVec4( a );\r
-  return ScaleVec4( scale, a );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthOfVec4(const Vec4& a)\r
-{\r
-  return (float)Sqrtf( DotVec4(a, a) );\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline float LengthSquaredOfVec4(const Vec4& a)\r
-{\r
-  return DotVec4( a, a );\r
-}\r
diff --git a/Classes/Foundation/Memory/MemoryBitset.cpp b/Classes/Foundation/Memory/MemoryBitset.cpp
deleted file mode 100755 (executable)
index c832cc8..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-#include "MemoryBitset.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-int32_t MemoryBitset::FindLowestUnused(int32_t start_search_index)\r
-{\r
-  int32_t top_index = start_search_index / 4096;\r
-  uint64_t* top_pointer = m_TopBits + top_index;\r
-  int32_t top_offset = (start_search_index - top_index * 4096) / 64;\r
-  uint64_t first_top_mask = ~(0xffffffffffffffffULL << top_offset);\r
-\r
-  // handling the starting case\r
-  if ((*top_pointer | first_top_mask) != 0xffffffffffffffffULL)\r
-  {\r
-    uint64_t valid_top_bits = (*top_pointer | first_top_mask);\r
-    uint64_t top_unused_bits = ~valid_top_bits;\r
-    uint64_t right_most_top_bit = RightMostEnabledBit(top_unused_bits);\r
-    int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_bit);\r
-    uint64_t bottom_bits = m_BottomBits[bottom_index];\r
-\r
-    if (start_search_index > bottom_index * 64)\r
-    {\r
-      // construct the mask for the valid bits\r
-      int32_t bottom_offset = start_search_index - bottom_index * 64;\r
-      uint64_t first_bottom_mask = ~(0xffffffffffffffffULL << bottom_offset);\r
-      bottom_bits |= first_bottom_mask;\r
-    }\r
-\r
-    uint64_t bottom_unused_bits = ~bottom_bits;\r
-    uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(bottom_unused_bits);\r
-    int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
-    return final_index < m_MaxCount ? final_index : INVALID_INDEX;\r
-  }\r
-\r
-  // guess the first dereference didn't get us anything\r
-  top_pointer++;\r
-  top_index++;\r
-\r
-  // skip over all top bits that're fully allocated\r
-  while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer)\r
-  {\r
-    top_pointer++;\r
-    top_index++;\r
-  }\r
-\r
-  if (top_pointer > m_MaxTopPointer)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer);\r
-  int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit);\r
-  uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
-\r
-  // skip over all bottom bits that're fully allocated\r
-  while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer)\r
-  {\r
-    bottom_pointer++;\r
-    bottom_index++;\r
-  }\r
-\r
-  // make sure we didn't overflow\r
-  if (bottom_pointer > m_MaxBottomPointer)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer);\r
-  int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
-\r
-  // make sure we didn't overflow\r
-  if (final_index >= m_MaxCount)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  return final_index;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-int32_t MemoryBitset::FindLowestUnused()\r
-{\r
-  int32_t top_index = 0;\r
-  uint64_t* top_pointer = m_TopBits;\r
-\r
-  // skip over all top bits that're fully allocated\r
-  while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer)\r
-  {\r
-    top_pointer++;\r
-    top_index++;\r
-  }\r
-\r
-  uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer);\r
-  int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit);\r
-  uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
-\r
-  // skip over all bottom bits that're fully allocated\r
-  while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer)\r
-  {\r
-    bottom_pointer++;\r
-    bottom_index++;\r
-  }\r
-\r
-  uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer);\r
-  int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
-\r
-  return final_index;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-int32_t MemoryBitset::FindHighestInUse(int32_t start_search_index)\r
-{\r
-  if (start_search_index < 0 || start_search_index >= m_MaxCount)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  int32_t bottom_index = start_search_index / 64;\r
-  uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
-  int32_t bottom_offset = start_search_index - bottom_index * 64;\r
-  uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset);\r
-\r
-  while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits)\r
-  {\r
-    bottom_index--;\r
-    bottom_pointer--;\r
-    bottom_used_bits = *bottom_pointer;\r
-  }\r
-\r
-  if (bottom_pointer < m_BottomBits)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer));\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-int32_t MemoryBitset::FindHighestInUse()\r
-{\r
-  int32_t bottom_index = m_MaxCount / 64;\r
-  uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
-  int32_t bottom_offset = m_MaxCount - bottom_index * 64;\r
-  uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset);\r
-\r
-  while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits)\r
-  {\r
-    bottom_index--;\r
-    bottom_pointer--;\r
-    bottom_used_bits = *bottom_pointer;\r
-  }\r
-\r
-  if (bottom_pointer < m_BottomBits)\r
-  {\r
-    return INVALID_INDEX;\r
-  }\r
-\r
-  return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer));\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryBitset::GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count)\r
-{\r
-  Assert(entry_count > 0);\r
-\r
-  uint32_t aligned_4096_count = ALIGN_UP(entry_count, 4096);\r
-  top_size = aligned_4096_count / 512;\r
-\r
-  uint32_t aligned_64_count = ALIGN_UP(entry_count, 64);\r
-  bottom_size = aligned_64_count / 8;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool MemoryBitset::Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count)\r
-{\r
-  Assert(entry_count > 0);\r
-\r
-  m_TopBits = top_bits;\r
-  m_BottomBits = bottom_bits;\r
-  m_MaxCount = entry_count;\r
-  m_MaxTopPointer = m_TopBits + ALIGN_UP(m_MaxCount, 4096) / 4096;\r
-  m_MaxBottomPointer = m_BottomBits + ALIGN_UP(m_MaxCount, 64) / 64;\r
-  m_IndicesInUse = 0;\r
-  m_LowestUnused = 0;\r
-  m_HighestInUse = INVALID_INDEX;\r
-\r
-  memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8);\r
-  memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512);\r
-\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryBitset::Reset()\r
-{\r
-  m_IndicesInUse = 0;\r
-  m_LowestUnused = 0;\r
-  m_HighestInUse = -1;\r
-\r
-  memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8);\r
-  memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512);\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryBitset::Destroy()\r
-{\r
-  m_TopBits = NULL;\r
-  m_BottomBits = NULL;\r
-  m_MaxTopPointer = NULL;\r
-  m_MaxBottomPointer = NULL;\r
-  m_MaxCount = 0;\r
-  m_IndicesInUse = 0;\r
-  m_LowestUnused = 0;\r
-  m_HighestInUse = -1;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-int32_t MemoryBitset::AllocateIndex()\r
-{\r
-  if (m_IndicesInUse == m_MaxCount)\r
-  {\r
-    return -1;\r
-  }\r
-\r
-  int32_t return_index = m_LowestUnused;\r
-\r
-  int32_t bottom_index = m_LowestUnused / 64;\r
-  int32_t bottom_offset = m_LowestUnused - bottom_index;\r
-  m_BottomBits[bottom_index] |= (0x1ULL << bottom_offset);\r
-\r
-  if (m_BottomBits[bottom_index] = 0xffffffffffffffffULL)\r
-  {\r
-    int32_t top_index = m_LowestUnused / 4096;\r
-    int32_t top_offset = m_LowestUnused - top_index;\r
-    m_TopBits[top_index] |= (0x1ULL << top_offset);\r
-  }\r
-\r
-  if ((uint32_t)(m_HighestInUse + 1) == m_IndicesInUse)\r
-  {\r
-    m_HighestInUse++;\r
-    m_LowestUnused++;\r
-    m_IndicesInUse++;\r
-  }\r
-  else\r
-  {\r
-    m_IndicesInUse++;\r
-    m_LowestUnused = m_IndicesInUse == m_MaxCount ? m_MaxCount : FindLowestUnused(m_LowestUnused);\r
-  }\r
-\r
-  return return_index;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool MemoryBitset::AllocateSpecificIndex(int32_t index)\r
-{\r
-  uint32_t bottom_index = index / 64;\r
-  uint32_t bottom_offset = index - bottom_index;\r
-  uint64_t bottom_mask = (0x1ULL << bottom_offset);\r
-\r
-  if (m_IndicesInUse == m_MaxCount || index >= m_MaxCount || (m_BottomBits[bottom_index] & bottom_mask))\r
-  {\r
-    return false;\r
-  }\r
-\r
-  m_BottomBits[bottom_index] |= bottom_mask;\r
-\r
-  if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL)\r
-  {\r
-    uint32_t top_index = index / 4096;\r
-    uint32_t top_offset = index - top_index;\r
-    uint64_t top_mask = (0x1ULL << top_offset);\r
-    m_TopBits[top_index] |= top_mask;\r
-  }\r
-\r
-  m_IndicesInUse++;\r
-\r
-  if (index > m_HighestInUse)\r
-  {\r
-    m_HighestInUse = index;\r
-  }\r
-\r
-  if (index == m_LowestUnused)\r
-  {\r
-    m_LowestUnused = (m_IndicesInUse == m_MaxCount) ? m_MaxCount : FindLowestUnused(m_LowestUnused + 1);\r
-  }\r
-\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryBitset::FreeIndex(int32_t index)\r
-{\r
-  uint32_t bottom_index = index / 64;\r
-  uint32_t bottom_offset = index - bottom_index;\r
-  uint64_t bottom_mask = (0x1ULL << bottom_offset);\r
-\r
-  if (m_IndicesInUse == 0 || index >= m_MaxCount || !(m_BottomBits[bottom_index] & bottom_mask))\r
-  {\r
-    return;\r
-  }\r
-\r
-  if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL)\r
-  {\r
-    uint32_t top_index = index / 4096;\r
-    uint32_t top_offset = index - top_index;\r
-    uint64_t top_mask = (0x1ULL << top_offset);\r
-    m_TopBits[top_index] &= ~top_mask;\r
-  }\r
-\r
-  m_BottomBits[bottom_index] &= ~bottom_mask;\r
-  m_IndicesInUse--;\r
-  m_LowestUnused = index < m_LowestUnused ? index : m_LowestUnused;\r
-  if (m_HighestInUse == index)\r
-  {\r
-    m_HighestInUse = FindHighestInUse(index - 1);\r
-  }\r
-}\r
diff --git a/Classes/Foundation/Memory/MemoryBitset.h b/Classes/Foundation/Memory/MemoryBitset.h
deleted file mode 100755 (executable)
index 1e929f7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-class MemoryBitset\r
-{\r
-private:\r
-  uint64_t* m_TopBits;\r
-  uint64_t* m_BottomBits;\r
-\r
-  uint64_t* m_MaxTopPointer;\r
-  uint64_t* m_MaxBottomPointer;\r
-\r
-  int32_t   m_MaxCount;\r
-  int32_t   m_IndicesInUse;\r
-  int32_t   m_LowestUnused;\r
-  int32_t   m_HighestInUse;\r
-\r
-  int32_t   FindLowestUnused(int32_t start_search_index); // finds upwards to m_MaxCount\r
-  int32_t   FindLowestUnused();                           // finds upwards to m_MaxCount\r
-  int32_t   FindHighestInUse(int32_t start_search_index);  // finds downwards to 0\r
-  int32_t   FindHighestInUse();                            // finds downwards to 0\r
-\r
-public:\r
-  static const int32_t INVALID_INDEX = -1;\r
-\r
-  static void GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count);\r
-\r
-  bool      Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count);\r
-  void      Reset();\r
-  void      Destroy();\r
-\r
-  int32_t   AllocateIndex();\r
-  bool      AllocateSpecificIndex(int32_t index);\r
-  void      FreeIndex(int32_t index);\r
-\r
-  bool      IsIndexAllocated(int32_t index);\r
-  int32_t   GetAllocatedCount()    {return m_IndicesInUse;}\r
-  int32_t   GetHighestIndexInUse() {return m_HighestInUse;}\r
-};\r
-\r
-//----------------------------------------------------------------------------------------\r
-inline bool MemoryBitset::IsIndexAllocated(int32_t index)\r
-{\r
-  uint32_t bottom_index = index / 64;\r
-  uint32_t bottom_offset = index - bottom_index;\r
-  return (m_BottomBits[bottom_index] & (0x1ULL << bottom_offset)) > 0;\r
-}\r
diff --git a/Classes/Foundation/Memory/MemoryHeap.cpp b/Classes/Foundation/Memory/MemoryHeap.cpp
deleted file mode 100755 (executable)
index 82c87fd..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "MemoryHeap.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-bool MemoryHeap::Init(void* base, size_t size)\r
-{\r
-  Assert(0);\r
-  if (size <= sizeof(FreeRecordInPage))\r
-  {\r
-    return false;\r
-  }\r
-\r
-  uint64_t base_address = ALIGN_UP( (uint64_t)base, sizeof(FreeRecordInPage) );\r
-  m_Base = (uint8_t*)base_address;\r
-  m_Size = size;\r
-\r
-  return true;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryHeap::Destroy()\r
-{\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void* MemoryHeap::Allocate(uint32_t size, uint32_t alignment)\r
-{\r
-  return NULL;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-void MemoryHeap::Free(void* address)\r
-{\r
-}\r
diff --git a/Classes/Foundation/Memory/MemoryHeap.h b/Classes/Foundation/Memory/MemoryHeap.h
deleted file mode 100755 (executable)
index 4eab6e3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-class MemoryHeap\r
-{\r
-private:\r
-  class MemoryBlock\r
-  {\r
-    static const uint32_t s_Sentinel = 0xdeadbeef;\r
-\r
-    uint32_t  m_BlockSize;\r
-  };\r
-\r
-#if defined(__WINDOWS__)\r
-  static const uint32_t s_PageSize = 4096;\r
-#elif defined(__ARM__)\r
-  static const uint32_t s_PageSize = 4096;\r
-#elif defined(__X86__) && defined(__iOS__)\r
-  static const uint32_t s_PageSize = 4096;\r
-#else\r
-#error NEED TO SPECIFY THIS!\r
-#endif\r
-\r
-  struct FreeRecordInPage\r
-  {\r
-    uint32_t m_FreeBlockSize;\r
-    uint32_t m_NextFreeOffset;\r
-  };\r
-\r
-  size_t   m_Size;\r
-  uint8_t* m_Base;\r
-\r
-  uint32_t m_PageCount;\r
-\r
-  bool  Init(void* base, size_t size);\r
-  void  Destroy();\r
-\r
-  void* Allocate(uint32_t size, uint32_t alignment);\r
-  void  Free(void* address);\r
-};\r
diff --git a/Classes/Foundation/Memory/MemoryLinear.h b/Classes/Foundation/Memory/MemoryLinear.h
deleted file mode 100755 (executable)
index 5b6cc09..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-#include "MemoryHeap.h"\r
-\r
-//----------------------------------------------------------------------------------------\r
-class MemoryLinear\r
-{\r
-private:\r
-  MemoryHeap* m_Heap;\r
-  uint8_t*    m_Base;\r
-  uint32_t    m_Size;\r
-  uint32_t    m_Offset;\r
-  uint32_t    m_OffsetTop;\r
-\r
-public:\r
-  bool      Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1);\r
-  void      Destroy();\r
-\r
-  void*     Allocate(uint32_t size, uint32_t alignment = 1);\r
-  void*     AllocateTop(uint32_t size, uint32_t alignment = 1);\r
-\r
-  uint32_t  GetCurrentOffset();\r
-  void      RollBackOffset(uint32_t offset);\r
-\r
-  uint32_t  GetCurrentOffsetTop();\r
-  void      RollBackOffsetTop(uint32_t offset);\r
-\r
-  void      Reset();\r
-};\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline bool MemoryLinear::Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1)\r
-{\r
-  m_Heap      = heap;\r
-  m_Base      = (uint8_t*)m_Heap->Allocate(size, "MemoryLinear", alignment);\r
-  m_Size      = size;\r
-  m_Offset    = 0;\r
-  m_OffsetTop = 0;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MemoryLinear::Destroy()\r
-{\r
-  m_Heap->Free(m_Base);\r
-  m_Heap      = NULL;\r
-  m_Base      = NULL;\r
-  m_Size      = 0;\r
-  m_Offset    = 0;\r
-  m_OffsetTop = 0;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void* MemoryLinear::Allocate(uint32_t size, uint32_t alignment)\r
-{\r
-  int64_t aligned_address = ALIGN_UP((int64_t)m_Base + m_Offset, alignment);\r
-  if (aligned_address + size > (int64_t)m_Base + m_Size - m_OffsetTop)\r
-  {\r
-    return NULL;\r
-  }\r
-\r
-  m_Offset = aligned_address - (int64_t)m_Base;\r
-  return (void*)aligned_address;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void* MemoryLinear::AllocateTop(uint32_t size, uint32_t alignment)\r
-{\r
-  int64_t aligned_address = ALIGN_DOWN((int64_t)m_Base + m_Size - m_OffsetTop - size, alignment);\r
-  if (aligned_address < (int64_t)m_Base + m_Offset)\r
-  {\r
-    return NULL;\r
-  }\r
-\r
-  m_OffsetTop = (int64_t)m_Base + m_Size - aligned_address);\r
-  return (void*)aligned_address;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MemoryLinear::GetCurrentOffset()\r
-{\r
-  return m_Offset;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MemoryLinear::RollBackOffset(uint32_t offset)\r
-{\r
-  Assert(offset <= m_Offset);\r
-  m_Offset = offset;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline uint32_t MemoryLinear::GetCurrentOffsetTop()\r
-{\r
-  return m_OffsetTop;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MemoryLinear::RollBackOffsetTop(uint32_t offset_top)\r
-{\r
-  Assert(offset_top >= m_OffsetTop);\r
-  m_OffsetTop = offset_top;\r
-}\r
-\r
-//----------------------------------------------------------------------------------------\r
-slInline void MemoryLinear::Reset()\r
-{\r
-  m_Offset = 0;\r
-  m_OffsetTop = 0;\r
-}\r
diff --git a/Classes/Foundation/OSInterface/GLView.h b/Classes/Foundation/OSInterface/GLView.h
deleted file mode 100644 (file)
index 0d2efa8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-#import <UIKit/UIKit.h>
-
-#import <OpenGLES/ES1/gl.h>
-#import <OpenGLES/ES1/glext.h>
-#import <OpenGLES/ES2/gl.h>
-#import <OpenGLES/ES2/glext.h>
-
-//----------------------------------------------------------------------------------------
-// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
-// The view content is basically an EAGL surface you render your OpenGL scene into.
-// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
-@interface GLView : UIView
-{
-@private
-    EAGLContext* context;
-    
-    // The pixel dimensions of the CAEAGLLayer.
-    GLint framebufferWidth;
-    GLint framebufferHeight;
-    
-    // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
-    GLuint defaultFramebuffer, colorRenderbuffer;
-}
-
-@property (nonatomic, retain) EAGLContext* context;
-
-- (void)setFramebuffer;
-- (BOOL)presentFramebuffer;
-
-@end
diff --git a/Classes/Foundation/OSInterface/GLView.m b/Classes/Foundation/OSInterface/GLView.m
deleted file mode 100644 (file)
index 5ef4c57..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-#import <QuartzCore/QuartzCore.h>
-
-#import "GLView.h"
-
-//-----------------------------------------------------------------------------------------------------------
-@interface GLView (PrivateMethods)
-- (void)createFrameBuffer;
-- (void)deleteFramebuffer;
-@end
-
-//-----------------------------------------------------------------------------------------------------------
-@implementation GLView
-
-@dynamic context;
-
-//-----------------------------------------------------------------------------------------------------------
-// You must implement this method
-+ (Class)layerClass
-{
-  return [CAEAGLLayer class];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-//The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:.
-- (id)initWithCoder:(NSCoder*)coder
-{
-  self = [super initWithCoder:coder];
-       if (self)
-  {
-    CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
-
-    eaglLayer.opaque = TRUE;
-    eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
-                                    [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
-                                    kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
-                                    nil];
-  }
-
-  return self;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)dealloc
-{
-  [self deleteFramebuffer];    
-  [context release];
-  
-  [super dealloc];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (EAGLContext *)context
-{
-  return context;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)setContext:(EAGLContext *)newContext
-{
-  if (context != newContext)
-  {
-    [self deleteFramebuffer];
-    [context release];
-    
-    context = [newContext retain];
-    [EAGLContext setCurrentContext:nil];
-  }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)createFrameBuffer
-{
-  if (context && !defaultFramebuffer)
-  {
-    [EAGLContext setCurrentContext:context];
-    
-    // Create default framebuffer object.
-    glGenFramebuffers(1, &defaultFramebuffer);
-    glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
-    
-    // Create color render buffer and allocate backing store.
-    glGenRenderbuffers(1, &colorRenderbuffer);
-    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
-    [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
-    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth);
-    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight);
-    
-    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
-    
-    if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
-      NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
-  }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)deleteFramebuffer
-{
-  if (context)
-  {
-    [EAGLContext setCurrentContext:context];
-    
-    if (defaultFramebuffer)
-    {
-      glDeleteFramebuffers(1, &defaultFramebuffer);
-      defaultFramebuffer = 0;
-    }
-    
-    if (colorRenderbuffer)
-    {
-      glDeleteRenderbuffers(1, &colorRenderbuffer);
-      colorRenderbuffer = 0;
-    }
-  }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)setFramebuffer
-{
-  if (context)
-  {
-    [EAGLContext setCurrentContext:context];
-    
-    if (!defaultFramebuffer)
-      [self createFrameBuffer];
-    
-    glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
-    
-    glViewport(0, 0, framebufferWidth, framebufferHeight);
-  }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (BOOL)presentFramebuffer
-{
-  BOOL success = FALSE;
-  
-  if (context)
-  {
-    [EAGLContext setCurrentContext:context];
-    
-    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
-    
-    success = [context presentRenderbuffer:GL_RENDERBUFFER];
-  }
-  
-  return success;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)layoutSubviews
-{
-  // The framebuffer will be re-created at the beginning of the next setFramebuffer method call.
-  [self deleteFramebuffer];
-}
-
-@end
diff --git a/Classes/Foundation/OSInterface/LittlestAppDelegate.h b/Classes/Foundation/OSInterface/LittlestAppDelegate.h
deleted file mode 100644 (file)
index 7f66aca..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-#import <UIKit/UIKit.h>
-
-@class LittlestViewController;
-
-@interface LittlestAppDelegate : NSObject <UIApplicationDelegate>
-{
-    UIWindow* window;
-    LittlestViewController* viewController;
-}
-
-@property (nonatomic, retain) IBOutlet UIWindow* window;
-@property (nonatomic, retain) IBOutlet LittlestViewController* viewController;
-
-@end
-
diff --git a/Classes/Foundation/OSInterface/LittlestAppDelegate.m b/Classes/Foundation/OSInterface/LittlestAppDelegate.m
deleted file mode 100644 (file)
index ad097b4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#import "LittlestAppDelegate.h"
-#import "LittlestViewController.h"
-
-@implementation LittlestAppDelegate
-
-@synthesize window;
-@synthesize viewController;
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
-    [self.window addSubview:self.viewController.view];
-    return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication *)application
-{
-    [self.viewController stopAnimation];
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
-    [self.viewController startAnimation];
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application
-{
-    [self.viewController stopAnimation];
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application
-{
-    // Handle any background procedures not related to animation here.
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application
-{
-    // Handle any foreground procedures not related to animation here.
-}
-
-- (void)dealloc
-{
-    [viewController release];
-    [window release];
-    
-    [super dealloc];
-}
-
-@end
diff --git a/Classes/Foundation/OSInterface/LittlestViewController.h b/Classes/Foundation/OSInterface/LittlestViewController.h
deleted file mode 100644 (file)
index 3c3ab7d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#pragma once
-
-#import <UIKit/UIKit.h>
-
-#import <OpenGLES/EAGL.h>
-
-#import <OpenGLES/ES1/gl.h>
-#import <OpenGLES/ES1/glext.h>
-#import <OpenGLES/ES2/gl.h>
-#import <OpenGLES/ES2/glext.h>
-
-@class CCDirector;
-
-@interface LittlestViewController : UIViewController
-{
-    EAGLContext *context;
-    GLuint program;
-    
-    BOOL animating;
-    NSInteger animationFrameInterval;
-    CADisplayLink *displayLink;
-}
-
-@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
-@property (nonatomic) NSInteger animationFrameInterval;
-@property (retain, nonatomic) CCDirector* director;
-
-- (void)startAnimation;
-- (void)stopAnimation;
-
-@end
diff --git a/Classes/Foundation/OSInterface/LittlestViewController.m b/Classes/Foundation/OSInterface/LittlestViewController.m
deleted file mode 100644 (file)
index 29407af..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-#import <QuartzCore/QuartzCore.h>
-
-#import "LittlestViewController.h"
-#import "GLView.h"
-#import "cocos2d/cocos2d.h"
-
-
-//-----------------------------------------------------------------------------------------------------------
-// Uniform index.
-enum {
-    UNIFORM_TRANSLATE,
-    NUM_UNIFORMS
-};
-GLint uniforms[NUM_UNIFORMS];
-
-// Attribute index.
-enum {
-    ATTRIB_VERTEX,
-    ATTRIB_COLOR,
-    NUM_ATTRIBUTES
-};
-
-
-//-----------------------------------------------------------------------------------------------------------
-@interface LittlestViewController ()
-@property (nonatomic, retain) EAGLContext *context;
-@property (nonatomic, assign) CADisplayLink *displayLink;
-- (BOOL)loadShaders;
-- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file;
-- (BOOL)linkProgram:(GLuint)prog;
-- (BOOL)validateProgram:(GLuint)prog;
-@end
-
-
-//-----------------------------------------------------------------------------------------------------------
-@implementation LittlestViewController
-
-@synthesize animating, context, displayLink, director;
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)awakeFromNib
-{
-    EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
-    
-    if (!aContext)
-    {
-        aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
-    }
-    
-    if (!aContext)
-        NSLog(@"Failed to create ES context");
-    else if (![EAGLContext setCurrentContext:aContext])
-        NSLog(@"Failed to set ES context current");
-    
-    self.context = aContext;
-    [aContext release];
-       
-    [(GLView *)self.view setContext:context];
-    [(GLView *)self.view setFramebuffer];
-    
-    if ([context API] == kEAGLRenderingAPIOpenGLES2)
-        [self loadShaders];
-    
-    animating = FALSE;
-    animationFrameInterval = 1;
-    self.displayLink = nil;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)dealloc
-{
-    if (program)
-    {
-        glDeleteProgram(program);
-        program = 0;
-    }
-    
-    // Tear down context.
-    if ([EAGLContext currentContext] == context)
-        [EAGLContext setCurrentContext:nil];
-    
-    [context release];
-    
-    [super dealloc];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)viewWillAppear:(BOOL)animated
-{
-    [self startAnimation];
-    
-    [super viewWillAppear:animated];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)viewWillDisappear:(BOOL)animated
-{
-    [self stopAnimation];
-    
-    [super viewWillDisappear:animated];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)viewDidUnload
-{
-       [super viewDidUnload];
-       
-    if (program)
-    {
-        glDeleteProgram(program);
-        program = 0;
-    }
-
-    // Tear down context.
-    if ([EAGLContext currentContext] == context)
-        [EAGLContext setCurrentContext:nil];
-       self.context = nil;     
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (NSInteger)animationFrameInterval
-{
-    return animationFrameInterval;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)setAnimationFrameInterval:(NSInteger)frameInterval
-{
-    /*
-        Frame interval defines how many display frames must pass between each time the display link fires.
-        The display link will only fire 30 times a second when the frame internal is two on a display that refreshes 60 times a second. The default frame interval setting of one will fire 60 times a second when the display refreshes at 60 times a second. A frame interval setting of less than one results in undefined behavior.
-        */
-    if (frameInterval >= 1)
-    {
-        animationFrameInterval = frameInterval;
-        
-        if (animating)
-        {
-            [self stopAnimation];
-            [self startAnimation];
-        }
-    }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)startAnimation
-{
-    if (!animating)
-    {
-        CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawFrame)];
-        [aDisplayLink setFrameInterval:animationFrameInterval];
-        [aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-        self.displayLink = aDisplayLink;
-        
-        animating = TRUE;
-    }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)stopAnimation
-{
-    if (animating)
-    {
-        [self.displayLink invalidate];
-        self.displayLink = nil;
-        animating = FALSE;
-    }
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)drawFrame
-{
-    [(GLView *)self.view setFramebuffer];
-    
-    // Replace the implementation of this method to do your own custom drawing.
-    static const GLfloat squareVertices[] = {
-        -0.5f, -0.33f,
-        0.5f, -0.33f,
-        -0.5f,  0.33f,
-        0.5f,  0.33f,
-    };
-    
-    static const GLubyte squareColors[] = {
-        255, 255,   0, 255,
-        0,   255, 255, 255,
-        0,     0,   0,   0,
-        255,   0, 255, 255,
-    };
-    
-    static float transY = 0.0f;
-    
-    glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
-    glClear(GL_COLOR_BUFFER_BIT);
-    
-    if ([context API] == kEAGLRenderingAPIOpenGLES2)
-    {
-        // Use shader program.
-        glUseProgram(program);
-        
-        // Update uniform value.
-        glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY);
-        transY += 0.075f;      
-        
-        // Update attribute values.
-        glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices);
-        glEnableVertexAttribArray(ATTRIB_VERTEX);
-        glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors);
-        glEnableVertexAttribArray(ATTRIB_COLOR);
-        
-        // Validate program before drawing. This is a good check, but only really necessary in a debug build.
-        // DEBUG macro must be defined in your debug configurations if that's not already the case.
-#if defined(DEBUG)
-        if (![self validateProgram:program])
-        {
-            NSLog(@"Failed to validate program: %d", program);
-            return;
-        }
-#endif
-    }
-    else
-    {
-        glMatrixMode(GL_PROJECTION);
-        glLoadIdentity();
-        glMatrixMode(GL_MODELVIEW);
-        glLoadIdentity();
-        glTranslatef(0.0f, (GLfloat)(sinf(transY)/2.0f), 0.0f);
-        transY += 0.075f;
-        
-        glVertexPointer(2, GL_FLOAT, 0, squareVertices);
-        glEnableClientState(GL_VERTEX_ARRAY);
-        glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors);
-        glEnableClientState(GL_COLOR_ARRAY);
-    }
-    
-    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-    
-    [(GLView *)self.view presentFramebuffer];
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (void)didReceiveMemoryWarning
-{
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-    
-    // Release any cached data, images, etc. that aren't in use.
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file
-{
-    GLint status;
-    const GLchar *source;
-    
-    source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String];
-    if (!source)
-    {
-        NSLog(@"Failed to load vertex shader");
-        return FALSE;
-    }
-    
-    *shader = glCreateShader(type);
-    glShaderSource(*shader, 1, &source, NULL);
-    glCompileShader(*shader);
-    
-#if defined(DEBUG)
-    GLint logLength;
-    glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength);
-    if (logLength > 0)
-    {
-        GLchar *log = (GLchar *)malloc(logLength);
-        glGetShaderInfoLog(*shader, logLength, &logLength, log);
-        NSLog(@"Shader compile log:\n%s", log);
-        free(log);
-    }
-#endif
-    
-    glGetShaderiv(*shader, GL_COMPILE_STATUS, &status);
-    if (status == 0)
-    {
-        glDeleteShader(*shader);
-        return FALSE;
-    }
-    
-    return TRUE;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (BOOL)linkProgram:(GLuint)prog
-{
-    GLint status;
-    
-    glLinkProgram(prog);
-    
-#if defined(DEBUG)
-    GLint logLength;
-    glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength);
-    if (logLength > 0)
-    {
-        GLchar *log = (GLchar *)malloc(logLength);
-        glGetProgramInfoLog(prog, logLength, &logLength, log);
-        NSLog(@"Program link log:\n%s", log);
-        free(log);
-    }
-#endif
-    
-    glGetProgramiv(prog, GL_LINK_STATUS, &status);
-    if (status == 0)
-        return FALSE;
-    
-    return TRUE;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (BOOL)validateProgram:(GLuint)prog
-{
-    GLint logLength, status;
-    
-    glValidateProgram(prog);
-    glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength);
-    if (logLength > 0)
-    {
-        GLchar *log = (GLchar *)malloc(logLength);
-        glGetProgramInfoLog(prog, logLength, &logLength, log);
-        NSLog(@"Program validate log:\n%s", log);
-        free(log);
-    }
-    
-    glGetProgramiv(prog, GL_VALIDATE_STATUS, &status);
-    if (status == 0)
-        return FALSE;
-    
-    return TRUE;
-}
-
-//-----------------------------------------------------------------------------------------------------------
-- (BOOL)loadShaders
-{
-    GLuint vertShader, fragShader;
-    NSString *vertShaderPathname, *fragShaderPathname;
-    
-    // Create shader program.
-    program = glCreateProgram();
-    
-    // Create and compile vertex shader.
-    vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"];
-    if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname])
-    {
-        NSLog(@"Failed to compile vertex shader");
-        return FALSE;
-    }
-    
-    // Create and compile fragment shader.
-    fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"];
-    if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname])
-    {
-        NSLog(@"Failed to compile fragment shader");
-        return FALSE;
-    }
-    
-    // Attach vertex shader to program.
-    glAttachShader(program, vertShader);
-    
-    // Attach fragment shader to program.
-    glAttachShader(program, fragShader);
-    
-    // Bind attribute locations.
-    // This needs to be done prior to linking.
-    glBindAttribLocation(program, ATTRIB_VERTEX, "position");
-    glBindAttribLocation(program, ATTRIB_COLOR, "color");
-    
-    // Link program.
-    if (![self linkProgram:program])
-    {
-        NSLog(@"Failed to link program: %d", program);
-        
-        if (vertShader)
-        {
-            glDeleteShader(vertShader);
-            vertShader = 0;
-        }
-        if (fragShader)
-        {
-            glDeleteShader(fragShader);
-            fragShader = 0;
-        }
-        if (program)
-        {
-            glDeleteProgram(program);
-            program = 0;
-        }
-        
-        return FALSE;
-    }
-    
-    // Get uniform locations.
-    uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate");
-    
-    // Release vertex and fragment shaders.
-    if (vertShader)
-        glDeleteShader(vertShader);
-    if (fragShader)
-        glDeleteShader(fragShader);
-    
-    return TRUE;
-}
-
-@end
diff --git a/Classes/Foundation/Synchronization/Atomic32Bit.h b/Classes/Foundation/Synchronization/Atomic32Bit.h
deleted file mode 100755 (executable)
index 2290a2c..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalInclude.h"\r
-\r
-#if defined(__WINDOWS__)\r
-\r
-#include <Windows.h>\r
-\r
-#pragma intrinsic(InterlockedIncrement)\r
-#pragma intrinsic(InterlockedDecrement)\r
-#pragma intrinsic(InterlockedExchange)\r
-#pragma intrinsic(InterlockedExchangeAdd)\r
-#pragma intrinsic(InterlockedExchangeSubtract)\r
-#pragma intrinsic(InterlockedCompareExchange)\r
-#pragma intrinsic(InterlockedAnd)\r
-#pragma intrinsic(InterlockedOr)\r
-#pragma intrinsic(InterlockedXor)\r
-\r
-class Atomic32Bit\r
-{\r
-private:\r
-  __declspec(align(16)) uint32_t m_LockValue;\r
-\r
-public:\r
-  Atomic32Bit()\r
-  {\r
-    m_LockValue = 0;\r
-  }\r
-\r
-  ~Atomic32Bit()\r
-  {\r
-    m_LockValue = 0;\r
-  }\r
-\r
-  // use intrinsics instead since they r automatically defined for x64 and x86 structs\r
-  uint32_t Increment(const uint32_t lock_value) //returns current value\r
-  {\r
-    return InterlockedIncrement(&m_LockValue);\r
-\r
-    /*\r
-    volatile unsigned int* p_temp = &m_Locker;\r
-    __asm\r
-    {\r
-      mov eax, 1\r
-      mov edx, [p_temp]\r
-      lock xadd [edx],eax\r
-    }\r
-    */\r
-  }\r
-\r
-  uint32_t SetValue(const uint32_t value)\r
-  {\r
-    return InterlockedExchange(&m_LockValue, value);\r
-\r
-    /*\r
-    volatile unsigned int* p_temp = &m_Locker;\r
-    __asm\r
-    {\r
-      mov eax, Value\r
-      mov edx, [p_temp]\r
-      lock xchg [edx],eax\r
-    }\r
-    */\r
-  }\r
-\r
-  uint32_t Decrement(const uint32_t lock_value) //returns current value\r
-  {\r
-    return InterlockedDecrement(&m_LockValue);\r
-\r
-    /*\r
-    volatile unsigned int* p_temp = &m_Locker;\r
-    __asm\r
-    {\r
-      mov eax, -1\r
-      mov edx, [p_temp]\r
-      lock xadd [edx],eax\r
-    }\r
-    */\r
-  }\r
-\r
-  void And(uint32_t& lock_value)\r
-  {\r
-    InterlockedAnd(&m_LockValue, lock_value);\r
-    lock_value = m_LockValue;\r
-  }\r
-\r
-  // this function can be inlined as long as the volatile is here\r
-  slInline uint32_t GetValue()\r
-  {\r
-    volatile uint32_t* p_temp = &m_LockValue;\r
-    return (unsigned int)*p_temp;\r
-  }\r
-};\r
-\r
-#else\r
-\r
-#error Not yet implemented!\r
-\r
-#endif\r
diff --git a/Classes/Foundation/Synchronization/MemorySync.h b/Classes/Foundation/Synchronization/MemorySync.h
deleted file mode 100755 (executable)
index 156060a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#pragma once\r
-\r
-#include "Foundation/Common/GlobalDefines.h"\r
-\r
-#if defined(__WINDOWS__)\r
-\r
-#include <Windows.h>\r
-\r
-#define ReadWriteSync() MemoryBarrier()\r
-\r
-#elif defined(__ARM__)\r
-\r
-#define ReadWriteSync() __asm__("dsb")\r
-\r
-#elif defined(__PPC__)\r
-\r
-#define ReadWriteSync() __asm__("lwsync")\r
-\r
-#elif defined(__X86__) && defined(__iOS__)\r
-\r
-#include <libkern/OSAtomic.h>\r
-#define ReadWriteSync() OSMemoryBarrier()\r
-\r
-#else\r
-\r
-#error MemorySync not yet implemented for this build!\r
-\r
-#endif\r
diff --git a/Littlest-Info.plist b/Littlest-Info.plist
deleted file mode 100644 (file)
index 9d272f3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>English</string>
-       <key>CFBundleDisplayName</key>
-       <string>${PRODUCT_NAME}</string>
-       <key>CFBundleExecutable</key>
-       <string>${EXECUTABLE_NAME}</string>
-       <key>CFBundleIconFile</key>
-       <string></string>
-       <key>CFBundleIdentifier</key>
-       <string>com.CompanyName.${PRODUCT_NAME:rfc1034identifier}</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleName</key>
-       <string>${PRODUCT_NAME}</string>
-       <key>CFBundlePackageType</key>
-       <string>APPL</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>1.0</string>
-       <key>LSRequiresIPhoneOS</key>
-       <true/>
-       <key>NSMainNibFile</key>
-       <string>LittlestViewController</string>
-       <key>UIStatusBarHidden</key>
-       <true/>
-       <key>UISupportedInterfaceOrientations</key>
-       <array>
-               <string>UIInterfaceOrientationPortrait</string>
-               <string>UIInterfaceOrientationPortraitUpsideDown</string>
-               <string>UIInterfaceOrientationLandscapeLeft</string>
-               <string>UIInterfaceOrientationLandscapeRight</string>
-       </array>
-</dict>
-</plist>
diff --git a/Littlest.xcodeproj/project.pbxproj b/Littlest.xcodeproj/project.pbxproj
deleted file mode 100755 (executable)
index 953f9d0..0000000
+++ /dev/null
@@ -1,516 +0,0 @@
-// !$*UTF8*$!
-{
-       archiveVersion = 1;
-       classes = {
-       };
-       objectVersion = 45;
-       objects = {
-
-/* Begin PBXBuildFile section */
-               1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
-               1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-               1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-               2514C27B10084DCA00A42282 /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27910084DCA00A42282 /* Shader.fsh */; };
-               2514C27C10084DCA00A42282 /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27A10084DCA00A42282 /* Shader.vsh */; };
-               28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
-               28EC4C5A11D54ECE0027AA9F /* LittlestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */; };
-               28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
-               28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
-               4B41070912F488D0008FFC1A /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B41070812F488D0008FFC1A /* OpenAL.framework */; };
-               4B4E8F34135BAE2000A4E4DE /* GLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B4E8F33135BAE2000A4E4DE /* GLView.m */; };
-               4B68585B12BC1E97005667D3 /* LocklessRingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */; };
-               4B68585C12BC1E97005667D3 /* MemoryBitset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68585312BC1E97005667D3 /* MemoryBitset.cpp */; };
-               4B68585D12BC1E97005667D3 /* MemoryHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68585512BC1E97005667D3 /* MemoryHeap.cpp */; };
-               4B68588712BC288E005667D3 /* LittlestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B68588312BC288E005667D3 /* LittlestAppDelegate.m */; };
-               4B68588812BC288E005667D3 /* LittlestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B68588512BC288E005667D3 /* LittlestViewController.m */; };
-               4B90648412B41E6500655D84 /* Standard.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 4B90648312B41E6500655D84 /* Standard.vsh */; };
-               4B90648612B426FE00655D84 /* Standard.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 4B90648512B426FE00655D84 /* Standard.fsh */; };
-               4BA0CDCE12BD655200EBB6F0 /* OpenGLServices.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BA0CDCD12BD655200EBB6F0 /* OpenGLServices.mm */; };
-               4BA0CDF112BD6FE100EBB6F0 /* RenderTarget.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BA0CDF012BD6FE100EBB6F0 /* RenderTarget.mm */; };
-               4BA0CF4C12BEA74F00EBB6F0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BA0CF4B12BEA74F00EBB6F0 /* CoreGraphics.framework */; };
-               4BA0CF7A12BEB78600EBB6F0 /* BasicPrimitives.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BA0CF7912BEB78600EBB6F0 /* BasicPrimitives.mm */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-               1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-               1D6058910D05DD3D006BFB54 /* Littlest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Littlest.app; sourceTree = BUILT_PRODUCTS_DIR; };
-               1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-               2514C27910084DCA00A42282 /* Shader.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.fsh; path = Shaders/Shader.fsh; sourceTree = "<group>"; };
-               2514C27A10084DCA00A42282 /* Shader.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.vsh; path = Shaders/Shader.vsh; sourceTree = "<group>"; };
-               28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
-               28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LittlestViewController.xib; sourceTree = "<group>"; };
-               28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
-               28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-               29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-               32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Littlest_Prefix.pch; sourceTree = "<group>"; };
-               4B41070812F488D0008FFC1A /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
-               4B41072F12F48FDF008FFC1A /* Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = Scene/Scene.h; sourceTree = "<group>"; };
-               4B4E8F32135BAE2000A4E4DE /* GLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLView.h; sourceTree = "<group>"; };
-               4B4E8F33135BAE2000A4E4DE /* GLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GLView.m; sourceTree = "<group>"; };
-               4B68583D12BC1E97005667D3 /* Assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Assert.h; sourceTree = "<group>"; };
-               4B68583E12BC1E97005667D3 /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base.h; sourceTree = "<group>"; };
-               4B68583F12BC1E97005667D3 /* GlobalDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalDefines.h; sourceTree = "<group>"; };
-               4B68584012BC1E97005667D3 /* GlobalInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalInclude.h; sourceTree = "<group>"; };
-               4B68584112BC1E97005667D3 /* GlobalTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalTypes.h; sourceTree = "<group>"; };
-               4B68584212BC1E97005667D3 /* Print.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Print.h; sourceTree = "<group>"; };
-               4B68584312BC1E97005667D3 /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = "<group>"; };
-               4B68584512BC1E97005667D3 /* BitEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitEncoder.h; sourceTree = "<group>"; };
-               4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocklessRingBuffer.cpp; sourceTree = "<group>"; };
-               4B68584712BC1E97005667D3 /* LocklessRingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocklessRingBuffer.h; sourceTree = "<group>"; };
-               4B68584912BC1E97005667D3 /* DJB2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJB2.h; sourceTree = "<group>"; };
-               4B68584B12BC1E97005667D3 /* MathDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathDefines.h; sourceTree = "<group>"; };
-               4B68584C12BC1E97005667D3 /* MathInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathInclude.h; sourceTree = "<group>"; };
-               4B68584D12BC1E97005667D3 /* MathOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathOperations.h; sourceTree = "<group>"; };
-               4B68584E12BC1E97005667D3 /* MathTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathTypes.h; sourceTree = "<group>"; };
-               4B68584F12BC1E97005667D3 /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix.h; sourceTree = "<group>"; };
-               4B68585012BC1E97005667D3 /* Quaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quaternion.h; sourceTree = "<group>"; };
-               4B68585112BC1E97005667D3 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = "<group>"; };
-               4B68585312BC1E97005667D3 /* MemoryBitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryBitset.cpp; sourceTree = "<group>"; };
-               4B68585412BC1E97005667D3 /* MemoryBitset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryBitset.h; sourceTree = "<group>"; };
-               4B68585512BC1E97005667D3 /* MemoryHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHeap.cpp; sourceTree = "<group>"; };
-               4B68585612BC1E97005667D3 /* MemoryHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHeap.h; sourceTree = "<group>"; };
-               4B68585712BC1E97005667D3 /* MemoryLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryLinear.h; sourceTree = "<group>"; };
-               4B68585912BC1E97005667D3 /* Atomic32Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomic32Bit.h; sourceTree = "<group>"; };
-               4B68585A12BC1E97005667D3 /* MemorySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemorySync.h; sourceTree = "<group>"; };
-               4B68587412BC27FD005667D3 /* OpenGLServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLServices.h; sourceTree = "<group>"; };
-               4B68588212BC288E005667D3 /* LittlestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestAppDelegate.h; sourceTree = "<group>"; };
-               4B68588312BC288E005667D3 /* LittlestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestAppDelegate.m; sourceTree = "<group>"; };
-               4B68588412BC288E005667D3 /* LittlestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestViewController.h; sourceTree = "<group>"; };
-               4B68588512BC288E005667D3 /* LittlestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestViewController.m; sourceTree = "<group>"; };
-               4B90648312B41E6500655D84 /* Standard.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.vsh; path = Shaders/Standard/Standard.vsh; sourceTree = "<group>"; };
-               4B90648512B426FE00655D84 /* Standard.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.fsh; path = Shaders/Standard/Standard.fsh; sourceTree = "<group>"; };
-               4BA0CDCD12BD655200EBB6F0 /* OpenGLServices.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OpenGLServices.mm; sourceTree = "<group>"; };
-               4BA0CDEF12BD6EB200EBB6F0 /* RenderTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTarget.h; sourceTree = "<group>"; };
-               4BA0CDF012BD6FE100EBB6F0 /* RenderTarget.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderTarget.mm; sourceTree = "<group>"; };
-               4BA0CF4B12BEA74F00EBB6F0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-               4BA0CF7812BEB78600EBB6F0 /* BasicPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicPrimitives.h; path = Geometry/BasicPrimitives.h; sourceTree = "<group>"; };
-               4BA0CF7912BEB78600EBB6F0 /* BasicPrimitives.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BasicPrimitives.mm; path = Geometry/BasicPrimitives.mm; sourceTree = "<group>"; };
-               8D1107310486CEB800E47090 /* Littlest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Littlest-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-               1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
-                       isa = PBXFrameworksBuildPhase;
-                       buildActionMask = 2147483647;
-                       files = (
-                               1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
-                               1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
-                               28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
-                               28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
-                               4BA0CF4C12BEA74F00EBB6F0 /* CoreGraphics.framework in Frameworks */,
-                               4B41070912F488D0008FFC1A /* OpenAL.framework in Frameworks */,
-                       );
-                       runOnlyForDeploymentPostprocessing = 0;
-               };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-               080E96DDFE201D6D7F000001 /* Classes */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B6858C912BC3E80005667D3 /* Game */,
-                               4B68583B12BC1E97005667D3 /* Foundation */,
-                       );
-                       path = Classes;
-                       sourceTree = "<group>";
-               };
-               19C28FACFE9D520D11CA2CBB /* Products */ = {
-                       isa = PBXGroup;
-                       children = (
-                               1D6058910D05DD3D006BFB54 /* Littlest.app */,
-                       );
-                       name = Products;
-                       sourceTree = "<group>";
-               };
-               2514C27610084DB600A42282 /* Shaders */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B90648212B41E0800655D84 /* Standard */,
-                               2514C27910084DCA00A42282 /* Shader.fsh */,
-                               2514C27A10084DCA00A42282 /* Shader.vsh */,
-                       );
-                       name = Shaders;
-                       sourceTree = "<group>";
-               };
-               29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
-                       isa = PBXGroup;
-                       children = (
-                               080E96DDFE201D6D7F000001 /* Classes */,
-                               2514C27610084DB600A42282 /* Shaders */,
-                               29B97315FDCFA39411CA2CEA /* Other Sources */,
-                               29B97317FDCFA39411CA2CEA /* Resources */,
-                               29B97323FDCFA39411CA2CEA /* Frameworks */,
-                               19C28FACFE9D520D11CA2CBB /* Products */,
-                       );
-                       indentWidth = 2;
-                       name = CustomTemplate;
-                       sourceTree = "<group>";
-                       tabWidth = 2;
-               };
-               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-                       isa = PBXGroup;
-                       children = (
-                               32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */,
-                               29B97316FDCFA39411CA2CEA /* main.m */,
-                       );
-                       name = "Other Sources";
-                       sourceTree = "<group>";
-               };
-               29B97317FDCFA39411CA2CEA /* Resources */ = {
-                       isa = PBXGroup;
-                       children = (
-                               28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */,
-                               28AD733E0D9D9553002E5188 /* MainWindow.xib */,
-                               8D1107310486CEB800E47090 /* Littlest-Info.plist */,
-                       );
-                       name = Resources;
-                       sourceTree = "<group>";
-               };
-               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4BA0CF4B12BEA74F00EBB6F0 /* CoreGraphics.framework */,
-                               28FD15070DC6FC5B0079059D /* QuartzCore.framework */,
-                               28FD14FF0DC6FC520079059D /* OpenGLES.framework */,
-                               1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
-                               1D30AB110D05D00D00671497 /* Foundation.framework */,
-                               4B41070812F488D0008FFC1A /* OpenAL.framework */,
-                       );
-                       name = Frameworks;
-                       sourceTree = "<group>";
-               };
-               4B41072E12F48F97008FFC1A /* Scene */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B41072F12F48FDF008FFC1A /* Scene.h */,
-                       );
-                       name = Scene;
-                       sourceTree = "<group>";
-               };
-               4B68583B12BC1E97005667D3 /* Foundation */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68587F12BC288E005667D3 /* OSInterface */,
-                               4B68587312BC27FD005667D3 /* GraphicsServices */,
-                               4B68583C12BC1E97005667D3 /* Common */,
-                               4B68584412BC1E97005667D3 /* Containers */,
-                               4B68584812BC1E97005667D3 /* Hash */,
-                               4B68584A12BC1E97005667D3 /* Math */,
-                               4B68585212BC1E97005667D3 /* Memory */,
-                               4B68585812BC1E97005667D3 /* Synchronization */,
-                       );
-                       path = Foundation;
-                       sourceTree = "<group>";
-               };
-               4B68583C12BC1E97005667D3 /* Common */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68583D12BC1E97005667D3 /* Assert.h */,
-                               4B68583E12BC1E97005667D3 /* Base.h */,
-                               4B68583F12BC1E97005667D3 /* GlobalDefines.h */,
-                               4B68584012BC1E97005667D3 /* GlobalInclude.h */,
-                               4B68584112BC1E97005667D3 /* GlobalTypes.h */,
-                               4B68584212BC1E97005667D3 /* Print.h */,
-                               4B68584312BC1E97005667D3 /* Singleton.h */,
-                       );
-                       path = Common;
-                       sourceTree = "<group>";
-               };
-               4B68584412BC1E97005667D3 /* Containers */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68584512BC1E97005667D3 /* BitEncoder.h */,
-                               4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */,
-                               4B68584712BC1E97005667D3 /* LocklessRingBuffer.h */,
-                       );
-                       path = Containers;
-                       sourceTree = "<group>";
-               };
-               4B68584812BC1E97005667D3 /* Hash */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68584912BC1E97005667D3 /* DJB2.h */,
-                       );
-                       path = Hash;
-                       sourceTree = "<group>";
-               };
-               4B68584A12BC1E97005667D3 /* Math */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68584B12BC1E97005667D3 /* MathDefines.h */,
-                               4B68584C12BC1E97005667D3 /* MathInclude.h */,
-                               4B68584D12BC1E97005667D3 /* MathOperations.h */,
-                               4B68584E12BC1E97005667D3 /* MathTypes.h */,
-                               4B68584F12BC1E97005667D3 /* Matrix.h */,
-                               4B68585012BC1E97005667D3 /* Quaternion.h */,
-                               4B68585112BC1E97005667D3 /* Vector.h */,
-                       );
-                       path = Math;
-                       sourceTree = "<group>";
-               };
-               4B68585212BC1E97005667D3 /* Memory */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68585312BC1E97005667D3 /* MemoryBitset.cpp */,
-                               4B68585412BC1E97005667D3 /* MemoryBitset.h */,
-                               4B68585512BC1E97005667D3 /* MemoryHeap.cpp */,
-                               4B68585612BC1E97005667D3 /* MemoryHeap.h */,
-                               4B68585712BC1E97005667D3 /* MemoryLinear.h */,
-                       );
-                       path = Memory;
-                       sourceTree = "<group>";
-               };
-               4B68585812BC1E97005667D3 /* Synchronization */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B68585912BC1E97005667D3 /* Atomic32Bit.h */,
-                               4B68585A12BC1E97005667D3 /* MemorySync.h */,
-                       );
-                       path = Synchronization;
-                       sourceTree = "<group>";
-               };
-               4B68587312BC27FD005667D3 /* GraphicsServices */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4BA0CF7712BEB74B00EBB6F0 /* Geometry */,
-                               4B68587412BC27FD005667D3 /* OpenGLServices.h */,
-                               4BA0CDCD12BD655200EBB6F0 /* OpenGLServices.mm */,
-                               4BA0CDEF12BD6EB200EBB6F0 /* RenderTarget.h */,
-                               4BA0CDF012BD6FE100EBB6F0 /* RenderTarget.mm */,
-                       );
-                       path = GraphicsServices;
-                       sourceTree = "<group>";
-               };
-               4B68587F12BC288E005667D3 /* OSInterface */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B4E8F32135BAE2000A4E4DE /* GLView.h */,
-                               4B4E8F33135BAE2000A4E4DE /* GLView.m */,
-                               4B68588212BC288E005667D3 /* LittlestAppDelegate.h */,
-                               4B68588312BC288E005667D3 /* LittlestAppDelegate.m */,
-                               4B68588412BC288E005667D3 /* LittlestViewController.h */,
-                               4B68588512BC288E005667D3 /* LittlestViewController.m */,
-                       );
-                       path = OSInterface;
-                       sourceTree = "<group>";
-               };
-               4B6858C912BC3E80005667D3 /* Game */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B41072E12F48F97008FFC1A /* Scene */,
-                       );
-                       path = Game;
-                       sourceTree = "<group>";
-               };
-               4B90648212B41E0800655D84 /* Standard */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4B90648312B41E6500655D84 /* Standard.vsh */,
-                               4B90648512B426FE00655D84 /* Standard.fsh */,
-                       );
-                       name = Standard;
-                       sourceTree = "<group>";
-               };
-               4BA0CF7712BEB74B00EBB6F0 /* Geometry */ = {
-                       isa = PBXGroup;
-                       children = (
-                               4BA0CF7812BEB78600EBB6F0 /* BasicPrimitives.h */,
-                               4BA0CF7912BEB78600EBB6F0 /* BasicPrimitives.mm */,
-                       );
-                       name = Geometry;
-                       sourceTree = "<group>";
-               };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-               1D6058900D05DD3D006BFB54 /* Littlest */ = {
-                       isa = PBXNativeTarget;
-                       buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Littlest" */;
-                       buildPhases = (
-                               1D60588D0D05DD3D006BFB54 /* Resources */,
-                               1D60588E0D05DD3D006BFB54 /* Sources */,
-                               1D60588F0D05DD3D006BFB54 /* Frameworks */,
-                       );
-                       buildRules = (
-                       );
-                       dependencies = (
-                       );
-                       name = Littlest;
-                       productName = Littlest;
-                       productReference = 1D6058910D05DD3D006BFB54 /* Littlest.app */;
-                       productType = "com.apple.product-type.application";
-               };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-               29B97313FDCFA39411CA2CEA /* Project object */ = {
-                       isa = PBXProject;
-                       attributes = {
-                               ORGANIZATIONNAME = Fubar;
-                       };
-                       buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Littlest" */;
-                       compatibilityVersion = "Xcode 3.1";
-                       developmentRegion = English;
-                       hasScannedForEncodings = 1;
-                       knownRegions = (
-                               English,
-                               Japanese,
-                               French,
-                               German,
-                       );
-                       mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
-                       projectDirPath = "";
-                       projectRoot = "";
-                       targets = (
-                               1D6058900D05DD3D006BFB54 /* Littlest */,
-                       );
-               };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-               1D60588D0D05DD3D006BFB54 /* Resources */ = {
-                       isa = PBXResourcesBuildPhase;
-                       buildActionMask = 2147483647;
-                       files = (
-                               4B90648412B41E6500655D84 /* Standard.vsh in Resources */,
-                               4B90648612B426FE00655D84 /* Standard.fsh in Resources */,
-                               2514C27B10084DCA00A42282 /* Shader.fsh in Resources */,
-                               2514C27C10084DCA00A42282 /* Shader.vsh in Resources */,
-                               28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
-                               28EC4C5A11D54ECE0027AA9F /* LittlestViewController.xib in Resources */,
-                       );
-                       runOnlyForDeploymentPostprocessing = 0;
-               };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-               1D60588E0D05DD3D006BFB54 /* Sources */ = {
-                       isa = PBXSourcesBuildPhase;
-                       buildActionMask = 2147483647;
-                       files = (
-                               1D60589B0D05DD56006BFB54 /* main.m in Sources */,
-                               4B68585B12BC1E97005667D3 /* LocklessRingBuffer.cpp in Sources */,
-                               4B68585C12BC1E97005667D3 /* MemoryBitset.cpp in Sources */,
-                               4B68585D12BC1E97005667D3 /* MemoryHeap.cpp in Sources */,
-                               4B68588712BC288E005667D3 /* LittlestAppDelegate.m in Sources */,
-                               4B68588812BC288E005667D3 /* LittlestViewController.m in Sources */,
-                               4BA0CDCE12BD655200EBB6F0 /* OpenGLServices.mm in Sources */,
-                               4BA0CDF112BD6FE100EBB6F0 /* RenderTarget.mm in Sources */,
-                               4BA0CF7A12BEB78600EBB6F0 /* BasicPrimitives.mm in Sources */,
-                               4B4E8F34135BAE2000A4E4DE /* GLView.m in Sources */,
-                       );
-                       runOnlyForDeploymentPostprocessing = 0;
-               };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-               1D6058940D05DD3E006BFB54 /* Debug */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               ALWAYS_SEARCH_USER_PATHS = NO;
-                               COPY_PHASE_STRIP = NO;
-                               GCC_DYNAMIC_NO_PIC = NO;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                               GCC_PREFIX_HEADER = Littlest_Prefix.pch;
-                               "GCC_THUMB_SUPPORT[arch=armv6]" = "";
-                               INFOPLIST_FILE = "Littlest-Info.plist";
-                               PRODUCT_NAME = Littlest;
-                       };
-                       name = Debug;
-               };
-               1D6058950D05DD3E006BFB54 /* Release */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               ALWAYS_SEARCH_USER_PATHS = NO;
-                               COPY_PHASE_STRIP = YES;
-                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                               GCC_PREFIX_HEADER = Littlest_Prefix.pch;
-                               "GCC_THUMB_SUPPORT[arch=armv6]" = "";
-                               INFOPLIST_FILE = "Littlest-Info.plist";
-                               PRODUCT_NAME = Littlest;
-                               VALIDATE_PRODUCT = YES;
-                       };
-                       name = Release;
-               };
-               C01FCF4F08A954540054247B /* Debug */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-                               "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-                               GCC_CHAR_IS_UNSIGNED_CHAR = YES;
-                               GCC_C_LANGUAGE_STANDARD = c99;
-                               GCC_ENABLE_CPP_EXCEPTIONS = NO;
-                               GCC_ENABLE_CPP_RTTI = NO;
-                               GCC_FAST_MATH = YES;
-                               GCC_ONE_BYTE_BOOL = NO;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       __iOS__,
-                                       DEBUG,
-                               );
-                               GCC_VERSION = 4.2;
-                               GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
-                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                               GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                               GCC_WARN_UNUSED_VALUE = YES;
-                               GCC_WARN_UNUSED_VARIABLE = YES;
-                               HEADER_SEARCH_PATHS = "$(COCOS2D_SRC)";
-                               ONLY_ACTIVE_ARCH = NO;
-                               PREBINDING = NO;
-                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
-                               SDKROOT = iphoneos;
-                               TARGETED_DEVICE_FAMILY = "1,2";
-                               USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Classes";
-                       };
-                       name = Debug;
-               };
-               C01FCF5008A954540054247B /* Release */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-                               "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-                               GCC_CHAR_IS_UNSIGNED_CHAR = YES;
-                               GCC_C_LANGUAGE_STANDARD = c99;
-                               GCC_ENABLE_CPP_EXCEPTIONS = NO;
-                               GCC_ENABLE_CPP_RTTI = NO;
-                               GCC_FAST_MATH = YES;
-                               GCC_ONE_BYTE_BOOL = NO;
-                               GCC_PREPROCESSOR_DEFINITIONS = __iOS__;
-                               GCC_VERSION = com.apple.compilers.llvmgcc42;
-                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                               GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                               GCC_WARN_UNUSED_VARIABLE = YES;
-                               HEADER_SEARCH_PATHS = "$(COCOS2D_SRC)";
-                               OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
-                               PREBINDING = NO;
-                               SDKROOT = iphoneos;
-                               TARGETED_DEVICE_FAMILY = "1,2";
-                               USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Classes";
-                       };
-                       name = Release;
-               };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-               1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Littlest" */ = {
-                       isa = XCConfigurationList;
-                       buildConfigurations = (
-                               1D6058940D05DD3E006BFB54 /* Debug */,
-                               1D6058950D05DD3E006BFB54 /* Release */,
-                       );
-                       defaultConfigurationIsVisible = 0;
-                       defaultConfigurationName = Release;
-               };
-               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Littlest" */ = {
-                       isa = XCConfigurationList;
-                       buildConfigurations = (
-                               C01FCF4F08A954540054247B /* Debug */,
-                               C01FCF5008A954540054247B /* Release */,
-                       );
-                       defaultConfigurationIsVisible = 0;
-                       defaultConfigurationName = Release;
-               };
-/* End XCConfigurationList section */
-       };
-       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/LittlestViewController.xib b/LittlestViewController.xib
deleted file mode 100644 (file)
index 503370b..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-       <data>
-               <int key="IBDocument.SystemTarget">1024</int>
-               <string key="IBDocument.SystemVersion">10J869</string>
-               <string key="IBDocument.InterfaceBuilderVersion">1306</string>
-               <string key="IBDocument.AppKitVersion">1038.35</string>
-               <string key="IBDocument.HIToolboxVersion">461.00</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                       <string key="NS.object.0">301</string>
-               </object>
-               <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <string>IBProxyObject</string>
-                       <string>IBUIView</string>
-               </object>
-               <object class="NSArray" key="IBDocument.PluginDependencies">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-               </object>
-               <object class="NSMutableDictionary" key="IBDocument.Metadata">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="NSArray" key="dict.sortedKeys" id="0">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                       </object>
-                       <reference key="dict.values" ref="0"/>
-               </object>
-               <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="IBProxyObject" id="841351856">
-                               <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-                       <object class="IBProxyObject" id="371349661">
-                               <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-                       <object class="IBUIView" id="184854543">
-                               <reference key="NSNextResponder"/>
-                               <int key="NSvFlags">274</int>
-                               <string key="NSFrameSize">{320, 460}</string>
-                               <reference key="NSSuperview"/>
-                               <reference key="NSWindow"/>
-                               <object class="NSColor" key="IBUIBackgroundColor">
-                                       <int key="NSColorSpace">3</int>
-                                       <bytes key="NSWhite">MQA</bytes>
-                                       <object class="NSColorSpace" key="NSCustomColorSpace">
-                                               <int key="NSID">2</int>
-                                       </object>
-                               </object>
-                               <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-               </object>
-               <object class="IBObjectContainer" key="IBDocument.Objects">
-                       <object class="NSMutableArray" key="connectionRecords">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBCocoaTouchOutletConnection" key="connection">
-                                               <string key="label">view</string>
-                                               <reference key="source" ref="841351856"/>
-                                               <reference key="destination" ref="184854543"/>
-                                       </object>
-                                       <int key="connectionID">3</int>
-                               </object>
-                       </object>
-                       <object class="IBMutableOrderedSet" key="objectRecords">
-                               <object class="NSArray" key="orderedObjects">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">0</int>
-                                               <reference key="object" ref="0"/>
-                                               <reference key="children" ref="1000"/>
-                                               <nil key="parent"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-1</int>
-                                               <reference key="object" ref="841351856"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">File's Owner</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-2</int>
-                                               <reference key="object" ref="371349661"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">2</int>
-                                               <reference key="object" ref="184854543"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="flattenedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="NSArray" key="dict.sortedKeys">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>-1.CustomClassName</string>
-                                       <string>-2.CustomClassName</string>
-                                       <string>2.CustomClassName</string>
-                                       <string>2.IBEditorWindowLastContentRect</string>
-                                       <string>2.IBPluginDependency</string>
-                               </object>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>LittlestViewController</string>
-                                       <string>UIResponder</string>
-                                       <string>GLView</string>
-                                       <string>{{401, 662}, {320, 460}}</string>
-                                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="unlocalizedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <reference key="dict.values" ref="0"/>
-                       </object>
-                       <nil key="activeLocalization"/>
-                       <object class="NSMutableDictionary" key="localizations">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <reference key="dict.values" ref="0"/>
-                       </object>
-                       <nil key="sourceID"/>
-                       <int key="maxID">4</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">GLView</string>
-                                       <string key="superclassName">UIView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/GLView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">LittlestViewController</string>
-                                       <string key="superclassName">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/LittlestViewController.h</string>
-                                       </object>
-                               </object>
-                       </object>
-               </object>
-               <int key="IBDocument.localizationMode">0</int>
-               <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-                       <integer value="1024" key="NS.object.0"/>
-               </object>
-               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-                       <integer value="3100" key="NS.object.0"/>
-               </object>
-               <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-               <int key="IBDocument.defaultPropertyAccessControl">3</int>
-               <string key="IBCocoaTouchPluginVersion">301</string>
-       </data>
-</archive>
diff --git a/Littlest_Prefix.pch b/Littlest_Prefix.pch
deleted file mode 100644 (file)
index a8d7d96..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// Prefix header for all source files of the 'Littlest' target in the 'Littlest' project
-//
-
-#import <Availability.h>
-
-#ifndef __IPHONE_3_0
-#warning "This project uses features only available in iPhone SDK 3.0 and later."
-#endif
-
-#ifdef __OBJC__
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#endif
diff --git a/MainWindow.xib b/MainWindow.xib
deleted file mode 100644 (file)
index 748ab77..0000000
+++ /dev/null
@@ -1,485 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
-       <data>
-               <int key="IBDocument.SystemTarget">1056</int>
-               <string key="IBDocument.SystemVersion">10H542</string>
-               <string key="IBDocument.InterfaceBuilderVersion">804</string>
-               <string key="IBDocument.AppKitVersion">1038.35</string>
-               <string key="IBDocument.HIToolboxVersion">461.00</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                       <string key="NS.object.0">131</string>
-               </object>
-               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-               </object>
-               <object class="NSArray" key="IBDocument.PluginDependencies">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-               </object>
-               <object class="NSMutableDictionary" key="IBDocument.Metadata">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="NSArray" key="dict.sortedKeys" id="0">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                       </object>
-                       <object class="NSMutableArray" key="dict.values">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                       </object>
-               </object>
-               <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="IBProxyObject" id="841351856">
-                               <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-                       <object class="IBProxyObject" id="191355593">
-                               <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-                       <object class="IBUICustomObject" id="664661524">
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                       </object>
-                       <object class="IBUIViewController" id="40278677">
-                               <string key="IBUINibName">LittlestViewController</string>
-                               <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-                                       <int key="interfaceOrientation">1</int>
-                               </object>
-                               <bool key="IBUIWantsFullScreenLayout">YES</bool>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                               <bool key="IBUIHorizontal">NO</bool>
-                       </object>
-                       <object class="IBUIWindow" id="380026005">
-                               <nil key="NSNextResponder"/>
-                               <int key="NSvFlags">1316</int>
-                               <object class="NSPSMatrix" key="NSFrameMatrix"/>
-                               <string key="NSFrameSize">{320, 480}</string>
-                               <object class="NSColor" key="IBUIBackgroundColor">
-                                       <int key="NSColorSpace">1</int>
-                                       <bytes key="NSRGB">MSAxIDEAA</bytes>
-                               </object>
-                               <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-                               <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-                               <bool key="IBUIVisibleAtLaunch">YES</bool>
-                               <bool key="IBUIResizesToFullScreen">YES</bool>
-                       </object>
-               </object>
-               <object class="IBObjectContainer" key="IBDocument.Objects">
-                       <object class="NSMutableArray" key="connectionRecords">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBCocoaTouchOutletConnection" key="connection">
-                                               <string key="label">delegate</string>
-                                               <reference key="source" ref="841351856"/>
-                                               <reference key="destination" ref="664661524"/>
-                                       </object>
-                                       <int key="connectionID">4</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBCocoaTouchOutletConnection" key="connection">
-                                               <string key="label">window</string>
-                                               <reference key="source" ref="664661524"/>
-                                               <reference key="destination" ref="380026005"/>
-                                       </object>
-                                       <int key="connectionID">5</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBCocoaTouchOutletConnection" key="connection">
-                                               <string key="label">viewController</string>
-                                               <reference key="source" ref="664661524"/>
-                                               <reference key="destination" ref="40278677"/>
-                                       </object>
-                                       <int key="connectionID">12</int>
-                               </object>
-                       </object>
-                       <object class="IBMutableOrderedSet" key="objectRecords">
-                               <object class="NSArray" key="orderedObjects">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">0</int>
-                                               <reference key="object" ref="0"/>
-                                               <reference key="children" ref="1000"/>
-                                               <nil key="parent"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">2</int>
-                                               <reference key="object" ref="380026005"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                               </object>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-1</int>
-                                               <reference key="object" ref="841351856"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">File's Owner</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">3</int>
-                                               <reference key="object" ref="664661524"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-2</int>
-                                               <reference key="object" ref="191355593"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">10</int>
-                                               <reference key="object" ref="40278677"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="flattenedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="NSArray" key="dict.sortedKeys">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>-1.CustomClassName</string>
-                                       <string>-2.CustomClassName</string>
-                                       <string>10.CustomClassName</string>
-                                       <string>10.IBEditorWindowLastContentRect</string>
-                                       <string>10.IBPluginDependency</string>
-                                       <string>2.IBAttributePlaceholdersKey</string>
-                                       <string>2.IBEditorWindowLastContentRect</string>
-                                       <string>2.IBPluginDependency</string>
-                                       <string>3.CustomClassName</string>
-                                       <string>3.IBPluginDependency</string>
-                               </object>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>UIApplication</string>
-                                       <string>UIResponder</string>
-                                       <string>LittlestViewController</string>
-                                       <string>{{415, 586}, {320, 480}}</string>
-                                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                                       <object class="NSMutableDictionary">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <reference key="dict.sortedKeys" ref="0"/>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                               </object>
-                                       </object>
-                                       <string>{{400, 376}, {320, 480}}</string>
-                                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                                       <string>LittlestAppDelegate</string>
-                                       <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="unlocalizedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                               </object>
-                       </object>
-                       <nil key="activeLocalization"/>
-                       <object class="NSMutableDictionary" key="localizations">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                               </object>
-                       </object>
-                       <nil key="sourceID"/>
-                       <int key="maxID">12</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">LittlestAppDelegate</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>viewController</string>
-                                                       <string>window</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>LittlestViewController</string>
-                                                       <string>UIWindow</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>viewController</string>
-                                                       <string>window</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">viewController</string>
-                                                               <string key="candidateClassName">LittlestViewController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">window</string>
-                                                               <string key="candidateClassName">UIWindow</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">Classes/LittlestAppDelegate.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">LittlestAppDelegate</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBUserSource</string>
-                                               <string key="minorKey"/>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">LittlestViewController</string>
-                                       <string key="superclassName">UIViewController</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <string key="NS.key.0">displayLink</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <string key="NS.key.0">displayLink</string>
-                                               <object class="IBToOneOutletInfo" key="NS.object.0">
-                                                       <string key="name">displayLink</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">Classes/LittlestViewController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">LittlestViewController</string>
-                                       <string key="superclassName">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBUserSource</string>
-                                               <string key="minorKey"/>
-                                       </object>
-                               </object>
-                       </object>
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="212071180">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIApplication</string>
-                                       <string key="superclassName">UIResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIResponder</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="212071180"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UISearchBar</string>
-                                       <string key="superclassName">UIView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UISearchDisplayController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIView</string>
-                                       <string key="superclassName">UIResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIViewController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIViewController</string>
-                                       <string key="superclassName">UIResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">UIWindow</string>
-                                       <string key="superclassName">UIView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
-                                       </object>
-                               </object>
-                       </object>
-               </object>
-               <int key="IBDocument.localizationMode">0</int>
-               <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
-                       <integer value="1056" key="NS.object.0"/>
-               </object>
-               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
-                       <integer value="3100" key="NS.object.0"/>
-               </object>
-               <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-               <string key="IBDocument.LastKnownRelativeProjectPath">Littlest.xcodeproj</string>
-               <int key="IBDocument.defaultPropertyAccessControl">3</int>
-               <string key="IBCocoaTouchPluginVersion">131</string>
-       </data>
-</archive>
diff --git a/Shaders/Shader.fsh b/Shaders/Shader.fsh
deleted file mode 100644 (file)
index 14fe852..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-varying lowp vec4 colorVarying;
-
-void main()
-{
-    gl_FragColor = colorVarying;
-}
diff --git a/Shaders/Shader.vsh b/Shaders/Shader.vsh
deleted file mode 100644 (file)
index 2f42d90..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-attribute vec4 position;
-attribute vec4 color;
-
-varying vec4 colorVarying;
-
-uniform float translate;
-
-void main()
-{
-    gl_Position = position;
-    gl_Position.y += sin(translate) / 2.0;
-
-    colorVarying = color;
-}
diff --git a/Shaders/Standard/Standard.fsh b/Shaders/Standard/Standard.fsh
deleted file mode 100644 (file)
index 0fc2083..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-varying mediump vec4 uv01_vary
-varying lowp vec4 color_vary;
-
-void main()
-{
-  gl_FragColor = colorVarying;
-}
diff --git a/Shaders/Standard/Standard.vsh b/Shaders/Standard/Standard.vsh
deleted file mode 100644 (file)
index e1fc78a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-attribute vec2 position;
-attribute vec4 color;
-attribute vec2 uv0;
-attribute vec2 uv1;
-
-varying vec4 color_vary;
-varying vec4 uv01_vary;
-
-uniform mat3 modelview_transform;
-
-void main()
-{
-  vec3 pos_2D = modelview_transform * position;
-  gl_Position = vec4(pos_2D.x, pos_2D.y, 1.0f, pos_2D.z); // don't do computataions where we don't need to!
-
-  color_vary = color;
-  uv01_vary = vec4(uv0, uv1);
-}
diff --git a/main.m b/main.m
deleted file mode 100644 (file)
index c3bf457..0000000
--- a/main.m
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-//  main.m
-//  Littlest
-//
-//  Created by Doris Chen on 12/4/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-int main(int argc, char *argv[]) {
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    int retVal = UIApplicationMain(argc, argv, nil, nil);
-    [pool release];
-    return retVal;
-}
diff --git a/readme.md b/readme.md
deleted file mode 100644 (file)
index 6deac5c..0000000
--- a/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# Tanks for great justice and prosperity