Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind2009-Louse committed Dec 29, 2024
2 parents d595155 + 1a0b712 commit fa044eb
Show file tree
Hide file tree
Showing 28 changed files with 5,146 additions and 5,139 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:

- name: Install lua
run: |
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz ; exit 0"
tar xzf lua-5.4.7.tar.gz
bash -c "curl -Z --retry 5 --connect-timeout 30 --location --create-dirs --output-dir temp --remote-name-all https://www.lua.org/ftp/lua-5.4.7.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip ; exit 0"
tar -xzf temp/lua-5.4.7.tar.gz
move lua-5.4.7 lua
- name: Premake
run: |
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip ; exit 0"
7z x premake-5.0.0-beta2-windows.zip
move premake\lua.lua lua\premake5.lua
move premake\dll.lua dll.lua
.\premake5.exe vs2022 --file=dll.lua
7z x temp/premake-5.0.0-beta2-windows.zip -opremake-5
move premake/lua.lua lua/premake5.lua
move premake/dll.lua dll.lua
./premake-5/premake5.exe vs2022 --file=dll.lua
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.vscode/
/.vscode/
/build/
/lua/
/temp/
/premake-5/
/premake5.exe
/build
/lua
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,44 @@ These functions create the game itself and then manipulate it.
- `intptr_t create_duel(uint_fast32_t seed);`
Create a the instance of the duel with a PRNG seed.

- `void start_duel(intptr_t pduel, uint32 options);`
- `void start_duel(intptr_t pduel, uint32_t options);`
Start the duel.

- `void end_duel(intptr_t pduel);`
End the duel.

- `void set_player_info(intptr_t pduel, int32 playerid, int32 lp, int32 startcount, int32 drawcount);`
- `void set_player_info(intptr_t pduel, int32_t playerid, int32_t lp, int32_t startcount, int32_t drawcount);`
Set up the duel information.

- `void get_log_message(intptr_t pduel, char* buf);`

- `int32 get_message(intptr_t pduel, byte* buf);`
- `int32_t get_message(intptr_t pduel, byte* buf);`

- `int32 process(intptr_t pduel);`
- `int32_t process(intptr_t pduel);`
Do a game tick.

- `void new_card(intptr_t pduel, uint32 code, uint8 owner, uint8 playerid, uint8 location, uint8 sequence, uint8 position);`
- `void new_card(intptr_t pduel, uint32_t code, uint8_t owner, uint8_t playerid, uint8_t location, uint8_t sequence, uint8_t position);`
Add a card to the duel state.

- `void new_tag_card(intptr_t pduel, uint32 code, uint8 owner, uint8 location);`
- `void new_tag_card(intptr_t pduel, uint32_t code, uint8_t owner, uint8_t location);`
Add a new card to the tag pool.

- `int32 query_field_card(intptr_t pduel, uint8 playerid, uint8 location, uint32 query_flag, byte* buf, int32 use_cache);`
- `int32_t query_field_card(intptr_t pduel, uint8_t playerid, uint8_t location, uint32_t query_flag, byte* buf, int32_t use_cache);`
Get a card in a specific location.

- `int32 query_field_count(intptr_t pduel, uint8 playerid, uint8 location);`
- `int32_t query_field_count(intptr_t pduel, uint8_t playerid, uint8_t location);`
Get the number of cards in a specific location.

- `int32 query_field_card(intptr_t pduel, uint8 playerid, uint8 location, uint32 query_flag, byte* buf, int32 use_cache);`
- `int32_t query_field_card(intptr_t pduel, uint8_t playerid, uint8_t location, uint32_t query_flag, byte* buf, int32_t use_cache);`
Get all cards in some location.

- `int32 query_field_info(intptr_t pduel, byte* buf);`
- `int32_t query_field_info(intptr_t pduel, byte* buf);`

- `void set_responsei(intptr_t pduel, int32 value);`
- `void set_responsei(intptr_t pduel, int32_t value);`

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

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


# Lua functions
Expand Down
Loading

0 comments on commit fa044eb

Please sign in to comment.