func names are no longer mangled to death

This commit is contained in:
2025-08-25 18:22:23 -05:00
parent e626c94f4a
commit d0c1d9fb93
4 changed files with 86 additions and 24 deletions

View File

@@ -54,8 +54,8 @@ static std::map<uint, Point*> id_to_point; // Use a pool allocator possibly late
static std::map<Point*, uint> point_to_id;
// Constants
const char* vertex_filepath = "src/shaders/vertex.glsl";
const char* fragment_filepath = "src/shaders/fragment.glsl";
const char* vertex_filepath = "vertex.glsl";
const char* fragment_filepath = "fragment.glsl";
// Private foward decls
void _resize_cb(GLFWwindow* win, int w, int h);
@@ -67,7 +67,7 @@ bool _glfw_setup();
void _refresh_win();
double _time();
DllExport bool __cdecl start(int win_w, int win_h) {
extern DllExport bool __cdecl start(int win_w, int win_h) {
if (!InitializeCriticalSectionAndSpinCount(&cs, 0x00000400))
return false;
@@ -92,7 +92,7 @@ DllExport bool __cdecl start(int win_w, int win_h) {
return running;
}
DllExport bool __cdecl stop() {
extern DllExport bool __cdecl stop() {
stop_flag = true;
DWORD res = WaitForSingleObject(win_thread_h, STOP_WAIT_TIME_MS);
bool success = res == WAIT_OBJECT_0;
@@ -103,7 +103,7 @@ DllExport bool __cdecl stop() {
return success;
}
DllExport pointid __cdecl create_point(float x, float y, float z) {
extern DllExport pointid __cdecl create_point(float x, float y, float z) {
EnterCriticalSection(&cs);
Point* p = (Point*)malloc(sizeof(Point));
@@ -124,21 +124,21 @@ DllExport pointid __cdecl create_point(float x, float y, float z) {
return id;
}
DllExport void __cdecl set_color(pointid id, float r, float g, float b) {
extern DllExport void __cdecl set_color(pointid id, float r, float g, float b) {
EnterCriticalSection(&cs);
Point* p = id_to_point[id];
p->b.color = { r, g, b, p->b.color[3] };
LeaveCriticalSection(&cs);
}
DllExport void __cdecl set_scale(pointid id, float scale) {
extern DllExport void __cdecl set_scale(pointid id, float scale) {
EnterCriticalSection(&cs);
Point* p = id_to_point[id];
p->b.scale = scale;
LeaveCriticalSection(&cs);
}
DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
extern DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
EnterCriticalSection(&cs);
Point* p = id_to_point[id];
p->targetloc = { x, y, z };
@@ -147,7 +147,7 @@ DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
LeaveCriticalSection(&cs);
}
DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
extern DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
EnterCriticalSection(&cs);
Point* p = id_to_point[id];
p->start_s = _time();
@@ -155,7 +155,7 @@ DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
LeaveCriticalSection(&cs);
}
DllExport void __cdecl clear_point(pointid id) {
extern DllExport void __cdecl clear_point(pointid id) {
EnterCriticalSection(&cs);
Point* p = id_to_point[id];
id_to_point.erase(id);