forked from Derailedzack/Client-C-Version
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntityLoader.c
More file actions
40 lines (34 loc) · 862 Bytes
/
EntityLoader.c
File metadata and controls
40 lines (34 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "EntityLoader.h"
void LoadEntityDrawFromDLL(const char* path)
{
HINSTANCE result = LoadLibrary(path);
if (result == NULL) {
printf("Failed to load DLL:%i",GetLastError());
}
else {
Draw_func* draw2 = (Draw_func*)GetProcAddress(result, "draw");
draw2();
}
}
void LoadEntityRedrawFromDLL(const char* path)
{
HINSTANCE result = LoadLibrary(path);
if (result == NULL) {
printf("Failed to load DLL:%i", GetLastError());
}
else {
Redraw_func* redraw2 = (Redraw_func*)GetProcAddress(result, "redraw");
redraw2();
}
}
void LoadEntityCullsionCheckFromDLL(const char* path,rect* entity_rect)
{
HINSTANCE result = LoadLibrary(path);
if (result == NULL) {
printf("Failed to load DLL:%i", GetLastError());
}
else {
OnCullsion_func* cullTest = (OnCullsion_func*)GetProcAddress(result, "OnCullsion");
cullTest(entity_rect);
}
}