Skip to content

Commit 28ce664

Browse files
committed
update deps
1 parent fd96a8a commit 28ce664

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

dep/gw2al_api.h

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#pragma once
22

3+
#define GW2AL_API_VER_MAJOR 1
4+
#define GW2AL_API_VER_MINOR 0
5+
6+
#define GW2AL_CORE_DEP_ENTRY { L"loader_core", L"core gw2 al API", GW2AL_API_VER_MAJOR, GW2AL_API_VER_MINOR, 1, 0 }
7+
38
#define gw2al_hashed_name unsigned long long
49
#define gw2al_event_id unsigned long
510

11+
612
typedef struct gw2al_addon_dsc {
713
const wchar_t* name;
814
const wchar_t* description;
@@ -43,44 +49,47 @@ typedef void(*gw2al_api_event_handler)(void* data);
4349
#define GW2AL_CORE_FUNN_QUERY_EVENT 11
4450
#define GW2AL_CORE_FUNN_TRIGGER_EVENT 12
4551
#define GW2AL_CORE_FUNN_CLIENT_UNLOAD 13
46-
#define GW2AL_CORE_FUNN_LOG_TEXT 14
47-
#define GW2AL_CORE_FUNN_D3DCREATE_HOOK 15
52+
#define GW2AL_CORE_FUNN_LOG_TEXT_SYNC 14
53+
#define GW2AL_CORE_FUNN_LOG_TEXT 15
54+
#define GW2AL_CORE_FUNN_D3DCREATE_HOOK 16
55+
#define GW2AL_CORE_FUNN_D3D11CREATE_HOOK 17
56+
#define GW2AL_CORE_FUNN_DXGICREATE_HOOK 18
4857

4958
typedef enum gw2al_log_level {
5059
LL_INFO = 0,
5160
LL_ERR,
52-
LL_WARN,
61+
LL_WARN,
5362
LL_DEBUG
5463
} gw2al_log_level;
5564

5665
typedef struct gw2al_core_vtable {
5766
//converts string to hash for usage in other functions
58-
gw2al_hashed_name (*hash_name)(wchar_t* name);
67+
gw2al_hashed_name(*hash_name)(const wchar_t* name);
5968

6069
//register/unregister user functions to be called by other addons
61-
gw2al_api_ret (*register_function)(void* function, gw2al_hashed_name name);
70+
gw2al_api_ret(*register_function)(void* function, gw2al_hashed_name name);
6271
void (*unregister_function)(gw2al_hashed_name name);
6372

6473
//query function pointer from registered list
6574
void* (*query_function)(gw2al_hashed_name name);
6675

6776
//fills table of functions using query_function
68-
void (*fill_vtable)(gw2al_hashed_name* nameList, void** vtable);
69-
77+
void (*fill_vtable)(const gw2al_hashed_name* nameList, void** vtable);
78+
7079
//functions to unload/load addons
71-
gw2al_api_ret (*unload_addon)(gw2al_hashed_name name);
72-
gw2al_api_ret (*load_addon)(wchar_t* name);
80+
gw2al_api_ret(*unload_addon)(gw2al_hashed_name name);
81+
gw2al_api_ret(*load_addon)(const wchar_t* name);
7382

7483
//function to get currently loaded addon description
7584
gw2al_addon_dsc* (*query_addon)(gw2al_hashed_name name);
76-
85+
7786
//simple event api
7887
//watch event can add a number of handlers on event name with priority
7988
//query event will get internal event id to speedup trigger_event calls
8089

81-
gw2al_api_ret (*watch_event)(gw2al_event_id id, gw2al_hashed_name subscriber, gw2al_api_event_handler handler, unsigned int priority);
90+
gw2al_api_ret(*watch_event)(gw2al_event_id id, gw2al_hashed_name subscriber, gw2al_api_event_handler handler, unsigned int priority);
8291
void (*unwatch_event)(gw2al_event_id id, gw2al_hashed_name subscriber);
83-
gw2al_event_id (*query_event)(gw2al_hashed_name name);
92+
gw2al_event_id(*query_event)(gw2al_hashed_name name);
8493
unsigned int (*trigger_event)(gw2al_event_id id, void* data);
8594

8695
//unload function to delete properly unload things on client exit
@@ -89,7 +98,8 @@ typedef struct gw2al_core_vtable {
8998

9099
//simple logging function
91100

92-
void (*log_text)(gw2al_log_level level, wchar_t* source, wchar_t* text);
101+
void (*log_text_sync)(gw2al_log_level level, const wchar_t* source, const wchar_t* text);
102+
void (*log_text)(gw2al_log_level level, const wchar_t* source, const wchar_t* text);
93103

94104
} gw2al_core_vtable;
95105

dep/gw2al_lib_imgui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <gw2al_api.h>
44
#include <imgui.h>
55

6-
#define LIB_IMGUI_DEP_ENTRY { L"lib_imgui", L" ", 1, 0, 1, 0 }
6+
#define LIB_IMGUI_DEP_ENTRY { L"lib_imgui", L" ", 2, 0, 1, 0 }
77

88
template<typename UserHandler>
99
class lib_imgui

src/addon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "stdafx.h"
22

33
gw2al_addon_dsc gAddonDeps[] = {
4-
{ L"loader_core", L"whatever", 0, 1, 1, 0 },
4+
GW2AL_CORE_DEP_ENTRY,
55
LIB_IMGUI_DEP_ENTRY,
66
{ 0,0,0,0,0,0 }
77
};

0 commit comments

Comments
 (0)