mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Unix: set -std=c++17 explicitly
remove register keyword, add cstdint include
This commit is contained in:
parent
67d68f1f4d
commit
26266d625c
@ -14,6 +14,11 @@ PROJECT(Descent3)
|
||||
IF (UNIX)
|
||||
SET (D3_GAMEDIR "~/Descent3/")
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SET(CMAKE_CXX_EXTENSIONS OFF)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
IF (APPLE)
|
||||
SET(EXTRA_CXX_FLAGS "-Wno-address-of-temporary")
|
||||
ELSE()
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include "renderer.h"
|
||||
#include "bitmap.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
// Movie Cinematic
|
||||
typedef struct tCinematic {
|
||||
intptr_t mvehandle;
|
||||
|
@ -234,7 +234,7 @@ extern bool FVI_always_check_ceiling;
|
||||
inline bool FastVectorBBox(const float *min, const float *max, const float *origin, const float *dir) {
|
||||
bool f_inside = true;
|
||||
char quad[3];
|
||||
register int i;
|
||||
int i;
|
||||
float max_t[3];
|
||||
float can_plane[3];
|
||||
int which_plane;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include "renderer.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define MVELIB_NOERROR 0
|
||||
#define MVELIB_FILE_ERROR -1
|
||||
#define MVELIB_NOTINIT_ERROR -2
|
||||
|
@ -261,7 +261,7 @@ void MD5::MD5Final(unsigned char digest[16]) {
|
||||
* the data and converts bytes into longwords for this routine.
|
||||
*/
|
||||
void MD5::MD5Transform(uint32_t buf[4], uint32_t const in[16]) {
|
||||
register uint32_t a, b, c, d;
|
||||
uint32_t a, b, c, d;
|
||||
|
||||
a = buf[0];
|
||||
b = buf[1];
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
// Returns 1 if string contains globbing characters in it
|
||||
int PSGlobHasPattern(char *string) {
|
||||
register char *p = string;
|
||||
register char c;
|
||||
char *p = string;
|
||||
char c;
|
||||
int open = 0;
|
||||
|
||||
while ((c = *p++) != '\0') {
|
||||
@ -70,8 +70,8 @@ int PSGlobHasPattern(char *string) {
|
||||
// 8) If dot_special is not zero, '*' and '?' do not match '.' at the beginning of text
|
||||
// 9) If case_sensitive is 0, than case does not matter for the non-pattern characters
|
||||
int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special) {
|
||||
register char *p = pattern, *t = text;
|
||||
register char c;
|
||||
char *p = pattern, *t = text;
|
||||
char c;
|
||||
|
||||
while ((c = *p++) != '\0') {
|
||||
switch (c) {
|
||||
@ -90,7 +90,7 @@ int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special)
|
||||
return 0;
|
||||
return PSGlobMatchAfterStar(p, case_sensitive, t);
|
||||
case '[': {
|
||||
register char c1 = *t++;
|
||||
char c1 = *t++;
|
||||
int invert;
|
||||
|
||||
if (!c1)
|
||||
@ -102,7 +102,7 @@ int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special)
|
||||
c = *p++;
|
||||
|
||||
while (1) {
|
||||
register char cstart = c, cend = c;
|
||||
char cstart = c, cend = c;
|
||||
if (c == '\\') {
|
||||
cstart = *p++;
|
||||
cend = cstart;
|
||||
@ -162,8 +162,8 @@ int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special)
|
||||
|
||||
// Like PSGlobMatch, but match pattern against any final segment of text
|
||||
int PSGlobMatchAfterStar(char *pattern, int case_sensitive, char *text) {
|
||||
register char *p = pattern, *t = text;
|
||||
register char c, c1;
|
||||
char *p = pattern, *t = text;
|
||||
char c, c1;
|
||||
|
||||
while ((c = *p++) == '?' || c == '*') {
|
||||
if (c == '?' && *t++ == '\0')
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#ifdef __LINUX__
|
||||
#ifndef MACOSX
|
||||
typedef unsigned int size_t;
|
||||
// typedef unsigned int size_t;
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);
|
||||
|
Loading…
Reference in New Issue
Block a user