Files
gMod/source/Error.cpp
T
DubbleClick f07e180b53 1.5.6, severely improve memory footprint and loading speed (#13)
* 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
2023-11-22 21:50:11 +01:00

24 lines
505 B
C++

#include "Error.h"
#include <Windows.h>
#include <stdio.h>
#include <process.h>
__declspec(noreturn) void FatalAssert(
const char *expr,
const char *file,
unsigned int line,
const char *function)
{
const char* fmt = "%s\n%s\n%s line %d";
int len = snprintf(NULL, 0, fmt, expr, file, function, line);
char* buf = new char[len + 1];
snprintf(buf,len + 1, fmt, expr, file, function, line);
MessageBox(0, "uMod Assertion", buf, MB_OK | MB_ICONERROR);
delete[] buf;
abort();
}