소스 검색

Merge pull request #260 from blackberry-gaming/next-dgough

Next dgough
Sean Paul Taylor 13 년 전
부모
커밋
1f23b60458
3개의 변경된 파일70개의 추가작업 그리고 67개의 파일을 삭제
  1. 10 7
      gameplay.sln
  2. 2 2
      gameplay/src/Animation.cpp
  3. 58 58
      gameplay/src/DebugNew.cpp

+ 10 - 7
gameplay.sln

@@ -25,7 +25,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample03-character", "gamep
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gameplay-encoder", "gameplay-encoder\gameplay-encoder.vcxproj", "{9D69B743-4872-4DD1-8E30-0087C64298D7}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample04-particles", "gameplay-samples\sample04-particles\sample04-particles.vcxproj", "{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample04-particles", "gameplay-samples\sample04-particles\sample04-particles.vcxproj", "{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
+	EndProjectSection
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -70,12 +73,12 @@ Global
 		{9D69B743-4872-4DD1-8E30-0087C64298D7}.DebugMem|Win32.Build.0 = Debug|Win32
 		{9D69B743-4872-4DD1-8E30-0087C64298D7}.Release|Win32.ActiveCfg = Release|Win32
 		{9D69B743-4872-4DD1-8E30-0087C64298D7}.Release|Win32.Build.0 = Release|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Debug|Win32.ActiveCfg = Debug|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Debug|Win32.Build.0 = Debug|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.DebugMem|Win32.ActiveCfg = DebugMem|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.DebugMem|Win32.Build.0 = DebugMem|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Release|Win32.ActiveCfg = Release|Win32
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Release|Win32.Build.0 = Release|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.Debug|Win32.Build.0 = Debug|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.DebugMem|Win32.ActiveCfg = DebugMem|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.DebugMem|Win32.Build.0 = DebugMem|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.Release|Win32.ActiveCfg = Release|Win32
+		{1D20D446-ED1A-C1A6-21EE-0A973D7DA6E3}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 2 - 2
gameplay/src/Animation.cpp

@@ -71,8 +71,8 @@ Animation::Channel::Channel(Animation* animation, AnimationTarget* target, int p
 
 Animation::Channel::Channel(const Channel& copy, Animation* animation, AnimationTarget* target)
     : _animation(animation), _target(target), _propertyId(copy._propertyId), _curve(copy._curve), _duration(copy._duration)
-{
-    _curve->addRef();
+{
+    _curve->addRef();
     _target->addChannel(this);
 }
 

+ 58 - 58
gameplay/src/DebugNew.cpp

@@ -200,64 +200,64 @@ void debugFree(void* p)
 
 #ifdef WIN32
 void printStackTrace(MemoryAllocationRecord* rec)
-{
-    const unsigned int bufferSize = 512;
-
-    // Resolve the program counter to the corresponding function names.
-    unsigned int pc;
-    for (int i = 0; i < MAX_STACK_FRAMES; i++)
-    {
-        // Check to see if we are at the end of the stack trace.
-        pc = rec->pc[i];
-        if (pc == 0)
-            break;
-
-        // Get the function name.
-        unsigned char buffer[sizeof(IMAGEHLP_SYMBOL64) + bufferSize];
-        IMAGEHLP_SYMBOL64* symbol = (IMAGEHLP_SYMBOL64*)buffer;
-        DWORD64 displacement;
-        memset(symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + bufferSize);
-        symbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
-        symbol->MaxNameLength = bufferSize;
-        if (!SymGetSymFromAddr64(GetCurrentProcess(), pc, &displacement, symbol))
-        {
-            gameplay::printError("[memory] STACK TRACE: <unknown location>");
-        }
-        else
-        {
-            symbol->Name[bufferSize - 1] = '\0';
-
-            // Check if we need to go further up the stack.
-            if (strncmp(symbol->Name, "operator new", 12) == 0)
-            {
-                // In operator new or new[], keep going...
-            }
-            else
-            {
-                // Get the file and line number.
-                if (pc != 0)
-                {
-                    IMAGEHLP_LINE64 line;
-                    DWORD displacement;
-                    memset(&line, 0, sizeof(line));
-                    line.SizeOfStruct = sizeof(line);
-                    if (!SymGetLineFromAddr64(GetCurrentProcess(), pc, &displacement, &line))
-                    {
-                        gameplay::printError("[memory] STACK TRACE: %s - <unknown file>:<unknown line number>", symbol->Name);
-                    }
-                    else
-                    {
-                        const char* file = strrchr(line.FileName, '\\');
-                        if(!file) 
-                            file = line.FileName;
-                        else
-                            file++;
-                        
-                        gameplay::printError("[memory] STACK TRACE: %s - %s:%d", symbol->Name, file, line.LineNumber);
-                    }
-                }
-            }
-        }
+{
+    const unsigned int bufferSize = 512;
+
+    // Resolve the program counter to the corresponding function names.
+    unsigned int pc;
+    for (int i = 0; i < MAX_STACK_FRAMES; i++)
+    {
+        // Check to see if we are at the end of the stack trace.
+        pc = rec->pc[i];
+        if (pc == 0)
+            break;
+
+        // Get the function name.
+        unsigned char buffer[sizeof(IMAGEHLP_SYMBOL64) + bufferSize];
+        IMAGEHLP_SYMBOL64* symbol = (IMAGEHLP_SYMBOL64*)buffer;
+        DWORD64 displacement;
+        memset(symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + bufferSize);
+        symbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
+        symbol->MaxNameLength = bufferSize;
+        if (!SymGetSymFromAddr64(GetCurrentProcess(), pc, &displacement, symbol))
+        {
+            gameplay::printError("[memory] STACK TRACE: <unknown location>");
+        }
+        else
+        {
+            symbol->Name[bufferSize - 1] = '\0';
+
+            // Check if we need to go further up the stack.
+            if (strncmp(symbol->Name, "operator new", 12) == 0)
+            {
+                // In operator new or new[], keep going...
+            }
+            else
+            {
+                // Get the file and line number.
+                if (pc != 0)
+                {
+                    IMAGEHLP_LINE64 line;
+                    DWORD displacement;
+                    memset(&line, 0, sizeof(line));
+                    line.SizeOfStruct = sizeof(line);
+                    if (!SymGetLineFromAddr64(GetCurrentProcess(), pc, &displacement, &line))
+                    {
+                        gameplay::printError("[memory] STACK TRACE: %s - <unknown file>:<unknown line number>", symbol->Name);
+                    }
+                    else
+                    {
+                        const char* file = strrchr(line.FileName, '\\');
+                        if(!file) 
+                            file = line.FileName;
+                        else
+                            file++;
+                        
+                        gameplay::printError("[memory] STACK TRACE: %s - %s:%d", symbol->Name, file, line.LineNumber);
+                    }
+                }
+            }
+        }
     }
 }
 #endif