Skip to content

Commit

Permalink
ocgapi change: preload_script (Fluorohydride#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 authored Oct 18, 2024
1 parent 55594fe commit 5380234
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Get all cards in some location.

- `void set_responseb(intptr_t pduel, byte* buf);`

- `int32 preload_script(intptr_t pduel, const char* script, int32 len);`
- `int32 preload_script(intptr_t pduel, const char* script_name);`


# Lua functions
Expand Down
4 changes: 2 additions & 2 deletions ocgapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,6 @@ extern "C" DECL_DLLEXPORT void set_responsei(intptr_t pduel, int32 value) {
extern "C" DECL_DLLEXPORT void set_responseb(intptr_t pduel, byte* buf) {
((duel*)pduel)->set_responseb(buf);
}
extern "C" DECL_DLLEXPORT int32 preload_script(intptr_t pduel, const char* script, int32 len) {
return ((duel*)pduel)->lua->load_script(script);
extern "C" DECL_DLLEXPORT int32 preload_script(intptr_t pduel, const char* script_name) {
return ((duel*)pduel)->lua->load_script(script_name);
}
2 changes: 1 addition & 1 deletion ocgapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
extern "C" DECL_DLLEXPORT int32 query_field_info(intptr_t pduel, byte* buf);
extern "C" DECL_DLLEXPORT void set_responsei(intptr_t pduel, int32 value);
extern "C" DECL_DLLEXPORT void set_responseb(intptr_t pduel, byte* buf);
extern "C" DECL_DLLEXPORT int32 preload_script(intptr_t pduel, const char* script, int32 len);
extern "C" DECL_DLLEXPORT int32 preload_script(intptr_t pduel, const char* script_name);
byte* default_script_reader(const char* script_name, int* len);
uint32 default_card_reader(uint32 code, card_data* data);
uint32 default_message_handler(intptr_t pduel, uint32 msg_type);
Expand Down

0 comments on commit 5380234

Please sign in to comment.