mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Fix runtime error on creating multiplayer game
Update dll typedefs to reflect cfile API changes.
This commit is contained in:
parent
de75a80ae7
commit
0bae89dd05
@ -117,6 +117,8 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "DMFC.h"
|
||||
#include "dmfcinternal.h"
|
||||
#include "dmfcinputcommands.h"
|
||||
@ -187,10 +189,10 @@ void (*DLLbm_DestroyChunkedBitmap)(chunked_bitmap *chunk);
|
||||
void (*DLLrend_DrawChunkedBitmap)(chunked_bitmap *chunk, int x, int y, uint8_t alpha);
|
||||
void (*DLLrend_DrawScaledChunkedBitmap)(chunked_bitmap *chunk, int x, int y, int neww, int newh,
|
||||
uint8_t alpha);
|
||||
void (*DLLOpenCFILE)(CFILE **handle, const char *filename, const char *mode);
|
||||
void (*DLLOpenCFILE)(CFILE **handle, const std::filesystem::path &filename, const char *mode);
|
||||
void (*DLLcfclose)(CFILE *cfp);
|
||||
int (*DLLcfeof)(CFILE *cfp);
|
||||
int (*DLLcfexist)(const char *filename);
|
||||
int (*DLLcfexist)(const std::filesystem::path &filename);
|
||||
int (*DLLcf_ReadBytes)(uint8_t *buf, int count, CFILE *cfp);
|
||||
int (*DLLcf_ReadInt)(CFILE *cfp);
|
||||
int16_t (*DLLcf_ReadShort)(CFILE *cfp);
|
||||
@ -221,7 +223,7 @@ void (*FatalError)(const char *reason);
|
||||
int (*DLLMultiMatchWeapon)(uint32_t unique_id);
|
||||
uint32_t (*DLLMultiGetMatchChecksum)(int type, int id);
|
||||
int (*DLLFindWeaponName)(const char *name);
|
||||
int (*DLLcf_OpenLibrary)(const char *libname);
|
||||
int (*DLLcf_OpenLibrary)(const std::filesystem::path &libname);
|
||||
void (*DLLcf_CloseLibrary)(int handle);
|
||||
void (*DLLMultiSendRequestToObserve)(int mode, int on, int objnum);
|
||||
int (*DLLFindTextureName)(const char *name);
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef GAMEDLL_HEADER_H
|
||||
#define GAMEDLL_HEADER_H
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "spew.h"
|
||||
#include "gamefont.h"
|
||||
#include "hud.h"
|
||||
@ -384,7 +386,7 @@ DMFCDLLOUT(rend_DrawScaledChunkedBitmap_fp DLLrend_DrawScaledChunkedBitmap;)
|
||||
// Parameters: filename - the name if the file, with or without a path
|
||||
// mode - the standard C mode string
|
||||
// Returns: the CFile handle, or NULL if file not opened
|
||||
typedef void (*OpenCFILE_fp)(CFILE **handle, const char *filename, const char *mode);
|
||||
typedef void (*OpenCFILE_fp)(CFILE **handle, const std::filesystem::path &filename, const char *mode);
|
||||
DMFCDLLOUT(OpenCFILE_fp DLLOpenCFILE;)
|
||||
|
||||
// Closes an open CFILE.
|
||||
@ -399,7 +401,7 @@ DMFCDLLOUT(cfeof_fp DLLcfeof;)
|
||||
// Tells if the file exists
|
||||
// Returns non-zero if file exists. Also tells if the file is on disk
|
||||
// or in a hog - See return values in cfile.h
|
||||
typedef int (*cfexist_fp)(const char *filename);
|
||||
typedef int (*cfexist_fp)(const std::filesystem::path &filename);
|
||||
DMFCDLLOUT(cfexist_fp DLLcfexist;)
|
||||
|
||||
// Reads the specified number of bytes from a file into the buffer
|
||||
@ -577,7 +579,7 @@ DMFCDLLOUT(FindWeaponName_fp DLLFindWeaponName;)
|
||||
// Opens a HOG file. Future calls to cfopen(), etc. will look in this HOG.
|
||||
// Parameters: libname - the path & filename of the HOG file
|
||||
// Returns: 0 if error, else library handle that can be used to close the library
|
||||
typedef int (*cf_OpenLibrary_fp)(const char *libname);
|
||||
typedef int (*cf_OpenLibrary_fp)(const std::filesystem::path &libname);
|
||||
DMFCDLLOUT(cf_OpenLibrary_fp DLLcf_OpenLibrary;)
|
||||
|
||||
// Closes a library file.
|
||||
|
Loading…
Reference in New Issue
Block a user