mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-22 02:19:31 +00:00
f07e180b53
* remove more unnecessary code * todo? * 1.5.5.0 * change GetHash from in_out parameter to return the hash * remove ForceReload bool for textures * remove textureserver, place logic in textureclient, not yet finished next up change FileToMod and shit to use modded_textures map * fix debug compilation errors * fix typo * should_update boolean, replace the entire MergeUpdate logic later * tidy up d3d9_dll.cpp and bits (#12) * define `ASSERT` Added minhook lib to tidy up hooks Remove cruft from dx9_dll.cpp * Bug fix * Another typo --------- Co-authored-by: Jon <> * gitignore * Proxy functions, cache dx9 device type * simplify LoadModsFromFile * move minhook dependency to fetch content * Make it work * Tweaked debug for file reads * Fixed inverse check * unordered_map * set should_update (yikes) * simplify libzippp.cmake * remove unnecessary code * rename project files (keep uMod_ prefix only for d3d9 classes) * remove unused Nothing() function * remove unnecessary fields * remove some code duplication refactor methods together * refactor SwitchTextures and UnswitchTextures together * move loaded_size into function * enable libzippp encryption again * copy data from opened zipentry and then delete the entry * fix hash bug in volume textures * const * change uMod_TextureClient to TextureClient * revert libzippp.cmake * 1.5.6
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
#pragma once
|
|
|
|
// define return values, a value less than zero indicates an error
|
|
#define RETURN_OK 0
|
|
#define RETURN_EXISTS -70
|
|
|
|
#define RETURN_FATAL_ERROR -1
|
|
#define RETURN_NO_MEMORY -2
|
|
#define RETURN_BAD_ARGUMENT -3
|
|
|
|
#define RETURN_NO_IDirect3DDevice9 -10
|
|
|
|
#define RETURN_TEXTURE_NOT_LOADED -20
|
|
#define RETURN_TEXTURE_NOT_SAVED -21
|
|
#define RETURN_TEXTURE_NOT_FOUND -22
|
|
#define RETURN_TEXTURE_ALLREADY_ADDED -23
|
|
#define RETURN_TEXTURE_NOT_SWITCHED -24
|
|
|
|
#define RETURN_LockRect_FAILED -30
|
|
#define RETURN_UnlockRect_FAILED -31
|
|
#define RETURN_GetLevelDesc_FAILED -32
|
|
|
|
|
|
#define RETURN_NO_MUTEX -40
|
|
#define RETURN_MUTEX_LOCK -41
|
|
#define RETURN_MUTEX_UNLOCK -42
|
|
|
|
#define RETURN_UPDATE_ALLREADY_ADDED -50
|
|
#define RETURN_FILE_NOT_LOADED -51
|
|
|
|
#define RETURN_PIPE_NOT_OPENED 60
|
|
|
|
|
|
// define error states
|
|
#define uMod_ERROR_FATAL 1u
|
|
#define uMod_ERROR_MUTEX 1u<<1
|
|
#define uMod_ERROR_PIPE 1u<<2
|
|
#define uMod_ERROR_MEMORY 1u<<3
|
|
#define uMod_ERROR_TEXTURE 1u<<4
|
|
#define uMod_ERROR_MULTIPLE_IDirect3D9 1u<<5
|
|
#define uMod_ERROR_MULTIPLE_IDirect3DDevice9 1u<<6
|
|
#define uMod_ERROR_UPDATE 1u<<7
|
|
#define uMod_ERROR_SERVER 1u<<8
|
|
|
|
__declspec(noreturn) void FatalAssert(
|
|
const char* expr,
|
|
const char* file,
|
|
unsigned int line,
|
|
const char* function);
|
|
|
|
#define ASSERT(expr) ((void)(!!(expr) || (FatalAssert(#expr, __FILE__, (unsigned)__LINE__, __FUNCTION__), 0)))
|
|
|