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

@@ -9,9 +9,8 @@
#include "CThread.hpp"
#include "client/common/Utils.hpp"
#if defined(_XBOX)
#elif defined(_WIN32)
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h> // for Sleep()
#else
#include <unistd.h>
@@ -33,14 +32,15 @@ CThread::CThread(CThreadFunction func, void* param)
#ifdef USE_CPP11_THREADS
std::thread thr(func, param);
m_thrd.swap(thr);
#elif defined(_XBOX)
#elif defined(USE_WIN32_THREADS)
DWORD dwThreadId = 0;
m_thrd = CreateThread(
NULL, // not used
0, // initial stack size
func, // thread function
param, // thread argument
0, // creation option
LPDWORD(1) // thread identifier (but does it really matter if I'm the one managing them...?)
&dwThreadId // thread identifier (but does it really matter if I'm the one managing them...?)
);
#else
pthread_attr_init(&m_thrd_attr);
@@ -53,8 +53,9 @@ CThread::~CThread()
{
#ifdef USE_CPP11_THREADS
m_thrd.join();
#elif defined(_XBOX)
#elif defined(USE_WIN32_THREADS)
WaitForSingleObject(m_thrd, INFINITE);
CloseHandle(m_thrd);
#else
pthread_join(m_thrd, 0);
pthread_attr_destroy(&m_thrd_attr);