Skip to content

Commit c4121b7

Browse files
authored
clarify the undef in event export macro
1 parent 30f6800 commit c4121b7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

mods/dependencies.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ Two versions of the macro are available:
134134
#pragma once
135135

136136
#include <Geode/loader/Dispatch.hpp>
137+
// This undef is not strictly required, however the define that follows will throw a warning
138+
// if MY_MOD_ID happens to be set by some other api and it is not undefined like this.
137139
#undef MY_MOD_ID
138140
// You must **manually** declare the mod id, as macros like GEODE_MOD_ID will not
139141
// behave correctly to other mods using your api.
@@ -178,6 +180,8 @@ Event exported functions currently **cannot** be called from within the mod (att
178180

179181
```cpp
180182
int EditorIDs::getID(GJGameLevel* level) {
183+
// In this example EditorIDs::getID is the exported function accessible to other mods
184+
// and EditorIDs::Internal::getID is only accessible from within the mod itself.
181185
return EditorIDs::Internal::getID(level);
182186
}
183187
```

0 commit comments

Comments
 (0)