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)
|
IF (UNIX)
|
||||||
SET (D3_GAMEDIR "~/Descent3/")
|
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)
|
IF (APPLE)
|
||||||
SET(EXTRA_CXX_FLAGS "-Wno-address-of-temporary")
|
SET(EXTRA_CXX_FLAGS "-Wno-address-of-temporary")
|
||||||
ELSE()
|
ELSE()
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
// Movie Cinematic
|
// Movie Cinematic
|
||||||
typedef struct tCinematic {
|
typedef struct tCinematic {
|
||||||
intptr_t mvehandle;
|
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) {
|
inline bool FastVectorBBox(const float *min, const float *max, const float *origin, const float *dir) {
|
||||||
bool f_inside = true;
|
bool f_inside = true;
|
||||||
char quad[3];
|
char quad[3];
|
||||||
register int i;
|
int i;
|
||||||
float max_t[3];
|
float max_t[3];
|
||||||
float can_plane[3];
|
float can_plane[3];
|
||||||
int which_plane;
|
int which_plane;
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#define MVELIB_NOERROR 0
|
#define MVELIB_NOERROR 0
|
||||||
#define MVELIB_FILE_ERROR -1
|
#define MVELIB_FILE_ERROR -1
|
||||||
#define MVELIB_NOTINIT_ERROR -2
|
#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.
|
* the data and converts bytes into longwords for this routine.
|
||||||
*/
|
*/
|
||||||
void MD5::MD5Transform(uint32_t buf[4], uint32_t const in[16]) {
|
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];
|
a = buf[0];
|
||||||
b = buf[1];
|
b = buf[1];
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
// Returns 1 if string contains globbing characters in it
|
// Returns 1 if string contains globbing characters in it
|
||||||
int PSGlobHasPattern(char *string) {
|
int PSGlobHasPattern(char *string) {
|
||||||
register char *p = string;
|
char *p = string;
|
||||||
register char c;
|
char c;
|
||||||
int open = 0;
|
int open = 0;
|
||||||
|
|
||||||
while ((c = *p++) != '\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
|
// 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
|
// 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) {
|
int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special) {
|
||||||
register char *p = pattern, *t = text;
|
char *p = pattern, *t = text;
|
||||||
register char c;
|
char c;
|
||||||
|
|
||||||
while ((c = *p++) != '\0') {
|
while ((c = *p++) != '\0') {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@ -90,7 +90,7 @@ int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special)
|
|||||||
return 0;
|
return 0;
|
||||||
return PSGlobMatchAfterStar(p, case_sensitive, t);
|
return PSGlobMatchAfterStar(p, case_sensitive, t);
|
||||||
case '[': {
|
case '[': {
|
||||||
register char c1 = *t++;
|
char c1 = *t++;
|
||||||
int invert;
|
int invert;
|
||||||
|
|
||||||
if (!c1)
|
if (!c1)
|
||||||
@ -102,7 +102,7 @@ int PSGlobMatch(char *pattern, char *text, int case_sensitive, int dot_special)
|
|||||||
c = *p++;
|
c = *p++;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
register char cstart = c, cend = c;
|
char cstart = c, cend = c;
|
||||||
if (c == '\\') {
|
if (c == '\\') {
|
||||||
cstart = *p++;
|
cstart = *p++;
|
||||||
cend = cstart;
|
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
|
// Like PSGlobMatch, but match pattern against any final segment of text
|
||||||
int PSGlobMatchAfterStar(char *pattern, int case_sensitive, char *text) {
|
int PSGlobMatchAfterStar(char *pattern, int case_sensitive, char *text) {
|
||||||
register char *p = pattern, *t = text;
|
char *p = pattern, *t = text;
|
||||||
register char c, c1;
|
char c, c1;
|
||||||
|
|
||||||
while ((c = *p++) == '?' || c == '*') {
|
while ((c = *p++) == '?' || c == '*') {
|
||||||
if (c == '?' && *t++ == '\0')
|
if (c == '?' && *t++ == '\0')
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
#ifndef MACOSX
|
#ifndef MACOSX
|
||||||
typedef unsigned int size_t;
|
// typedef unsigned int size_t;
|
||||||
#endif
|
#endif
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);
|
void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);
|
||||||
|
Loading…
Reference in New Issue
Block a user