No description
Find a file
2025-01-26 22:05:18 -05:00
src fix string enum issue 2025-01-26 22:05:12 -05:00
tests setup 2025-01-21 08:09:10 -05:00
.gitignore push initial version 2025-01-21 16:28:50 -05:00
readme.md Update readme.md wording 2025-01-21 16:31:56 -05:00
steamworksgen.nimble push initial version 2025-01-21 16:28:50 -05:00

steamworksgen

Usage

Use the generateSteamworksAPI(jsonPath: string) proc to read in an export the api calls from steams sdk see the steamworks nimble package for a more general API setup overview.

Differences from the flat API

Callbacks

# The api is init as needed so you dont need to worry about initializing anything

# Interface accessors are wrapped up in simple procs so no need for parenthesis
let userId = steamUser.getSteamID()

# When you call a function that returns a APICallback type, itll return a distinct handle.
# You can then use this handle to add a callback for when the call completes

steamUserStats
  .requestUserStats(userId)
  .onDone do (failed: bool, recieved: ptr UserStatsRecieved) {.stdcall.} =
    discard
    # handle user stats get

# callbacks are handled per frame when you need
steamUtils.runFrame()