Improve Survival Mode + others (#56)

* * Undo some of the changes done in the "* Work on survival mode." commit.
* TEST_SURVIVAL_MODE is now on by default.

* * Dying no longer crashes the game.

* * Death seems to work ok.

* * Improve some of the damage code.

* x

* work

* Fixed the Makefile (#54)

* * Finally fix the crack texture appearing to flicker/restart

* * Add VS2010 as an optional target.

Fix build with VS2010 (both windows_vs and xenon_vs).

* * Disable survival mode. Getting ready to merge now!

---------

Co-authored-by: Alexander Argentakis <38327951+MFDGaming@users.noreply.github.com>
This commit is contained in:
iProgramInCpp
2023-08-16 22:32:09 +03:00
committed by GitHub
parent 5e8119d279
commit 9a24abc603
63 changed files with 3599 additions and 184 deletions

View File

@@ -8,22 +8,48 @@
#pragma once
#if !defined(_XBOX)
// CThread - Object oriented pthread wrapper
#define USE_CPP11_THREADS //__cplusplus >= 201103L
#if defined(_WIN32)
#if defined(_XBOX) || defined(USE_OLD_CPP)
// USE_WIN32_THREADS - Use a Win32 implementation of threads instead of using pthread
#define USE_WIN32_THREADS
#else
// USE_CPP11_THREADS - Use a C++11 implementation of threads instead of using pthread
#define USE_CPP11_THREADS
#endif
// USE_CPP11_THREADS - Use a C++11 implementation of threads instead of using pthread
#ifdef USE_CPP11_THREADS
#include <thread>
#elif defined(_XBOX)
#include <stdint.h>
#include <xtl.h>
#else
#include <pthread.h>
#define USE_PTHREADS
#endif
#ifdef USE_CPP11_THREADS
// C++11
#include <thread>
#elif defined(USE_WIN32_THREADS)
// win32
#include <stdint.h>
#ifdef _XBOX
#include <xtl.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#else
// pthreads
#include <pthread.h>
#endif
#ifdef USE_WIN32_THREADS
typedef LPTHREAD_START_ROUTINE CThreadFunction;
#else
typedef void* (*CThreadFunction)(void*);
@@ -42,7 +68,7 @@ private:
#ifdef USE_CPP11_THREADS
std::thread m_thrd;
#elif defined(_XBOX)
#elif defined (USE_WIN32_THREADS)
HANDLE m_thrd;
#else
pthread_t m_thrd;