Expand description
The “ffi” face: the C ABI over the Rust API, for C/C++ hosts on DX12 / Vulkan / Metal.
This module is a translation layer and nothing else. Every entry point
does the same three things: validate the C arguments, convert them to Rust
types, and call NativeHost (the wgpu host) or SSPlayer
(playback). No rendering or playback logic lives here — when something needs
doing it belongs in host.rs or player.rs, where the Rust API gets it too.
Raw window handles cannot cross the ABI as Rust traits, so the
caller fills in a flat SsWindowHandle (HWND / NSView / CAMetalLayer /
Xlib / Wayland) which surface_target turns into what wgpu wants.
Two handles, not one. ss_scene_t is the window — surface, device,
renderer, scene — and ss_player_t is one character drawn into it. Fusing
them would make a second character in one window need a second surface, and
the two would clear and present over each other.
Conventions:
- Status is
int32_t:SS_OK(0), positive = anssruntimeerror code (same numbering as the SDK’s C-API), negative = a player/host error.ss_last_errorcarries the human-readable detail. - No entry point unwinds: the workspace builds with
panic = "abort". - Nothing here retains the window; the caller must keep it (and its layer)
alive until
ss_scene_destroy.
Structs§
- SsCrowd
Member - One copy of a player in a crowd: where it stands, in
ss_player_set_transformterms and composed under that, and its alpha (0..1) and tint (0xRRGGBB), each multiplied into the player’s own.{0, 0, 1, 1, 0, 1, 0xFFFFFF}stands where the player does, unchanged. - SsEvent
Data - One timeline event, flattened for the ABI.
- SsMissing
Asset - Something a load needed and did not get, flattened for the ABI.
What
ss_player_missing_atfills in. - SsPlaced
- What
ss_player_fit_intowrote, inss_player_set_transformterms: pixels from the view centre,ydownward. - SsPlacement
- Everything
ss_player_fit_intoneeds. - SsPlayer
- Opaque player handle: which scene, and which player within it.
- SsRect
- A box in player-local units — the space
ss_player_part_transformreports in, withydownward. - SsScene
- Opaque scene handle: one window’s
NativeHost, the player handles it has issued, and the buffers backing the strings its players hand back to C. - SsScene
Desc - Everything
ss_scene_createneeds: where to draw, how big, and how to clear. - SsScene
Stats - What the last frame cost, flattened for the ABI.
- SsSignal
Param Data - One signal parameter, flattened for the ABI.
value_typesays which field to read;SS_SIGNAL_VALUE_NONEmeans the parameter exists but was left unset. - SsTexture
Ref - One atlas a pack asks for, flattened for the ABI. What
ss_player_texture_atfills in. - SsWindow
Handle - A platform window, flattened for the ABI. Which fields are read depends on
kind(SS_WINDOW_*); unused ones must be null/zero.
Constants§
- SS_
ALIGN_ BOTTOM - SS_
ALIGN_ BOTTOM_ LEFT - SS_
ALIGN_ BOTTOM_ RIGHT - SS_
ALIGN_ CENTER - Which point of the content box lands on the matching point of the view. On the vertical axis, “top” is the top of the screen.
- SS_
ALIGN_ LEFT - SS_
ALIGN_ RIGHT - SS_
ALIGN_ TOP - SS_
ALIGN_ TOP_ LEFT - SS_
ALIGN_ TOP_ RIGHT - SS_
BACKEND_ AUTO - Let wgpu pick the platform’s primary backend.
- SS_
BACKEND_ DX12 - Force Direct3D 12 (Windows).
- SS_
BACKEND_ METAL - Force Metal (macOS / iOS).
- SS_
BACKEND_ VULKAN - Force Vulkan (Linux / Windows / Android).
- SS_
ERROR_ GPU - wgpu could not provide what was asked for (no adapter/device, surface creation or presentation failed).
- SS_
ERROR_ INVALID_ ARGUMENT - A pointer argument was null, a string was not UTF-8, or a value was out of range.
- SS_
EVENT_ AUDIO - See
SS_EVENT_USER_DATA. - SS_
EVENT_ SIGNAL - See
SS_EVENT_USER_DATA. - SS_
EVENT_ USER_ DATA - What kind of thing an
ss_event_data_tis; read it before the payload. - SS_
FIT_ CONTAIN - Scale the content box until it fits entirely inside the view.
- SS_
FIT_ COVER - Scale until the content box covers the view. The spill is not clipped — the player has no scissor of its own.
- SS_
FIT_ NONE - No fit: scale 1, centred, and
scale/offset_x/offset_yare the whole placement. - SS_
INVALID_ SOURCE ss_player_track_main_sourceon a track with no animation.- SS_
MAX_ CROWD_ MEMBERS - The most members
ss_player_set_crowdtakes. - SS_
MISSING_ PACK - An animation pack that did not load. The instance parts playing it do not appear.
- SS_
MISSING_ TEXTURE - An atlas that did not load. The parts using it draw against the white fallback, so they appear as silhouettes.
- SS_OK
- Success.
- SS_
SIGNAL_ VALUE_ BOOL - See
SS_SIGNAL_VALUE_NONE. - SS_
SIGNAL_ VALUE_ FLOATING - See
SS_SIGNAL_VALUE_NONE. - SS_
SIGNAL_ VALUE_ INDEX - A choice from a list, as its index. See
SS_SIGNAL_VALUE_NONE. - SS_
SIGNAL_ VALUE_ INTEGER - See
SS_SIGNAL_VALUE_NONE. - SS_
SIGNAL_ VALUE_ NONE - Which field of an
ss_signal_param_data_tcarries the value. - SS_
SIGNAL_ VALUE_ TEXT - See
SS_SIGNAL_VALUE_NONE. - SS_
TRACK_ BLEND_ ADDITIVE ss_player_set_track_blend: add the track’s offset from the setup pose.- SS_
TRACK_ BLEND_ MIX ss_player_set_track_blend: lerp toward the track’s pose.- SS_
TRACK_ SYNC_ FREE ss_player_set_track_sync: an animation laid on the track starts from its head.- SS_
TRACK_ SYNC_ START ss_player_set_track_sync: it starts at the phase track 0 stands at.- SS_
WINDOW_ APPKIT - macOS
NSView*. wgpu attaches (or reuses) the view’sCAMetalLayer; must be passed from the main thread. - SS_
WINDOW_ METAL_ LAYER - macOS
CAMetalLayer*directly. Apple targets only. - SS_
WINDOW_ WAYLAND - Wayland
wl_surface*inwindow,wl_display*indisplay. - SS_
WINDOW_ WIN32 - Win32
HWND(+ optionalHINSTANCEindisplay). - SS_
WINDOW_ XLIB - X11
WindowXID inwindow,Display*indisplay, screen inscreen.
Functions§
- ss_
last_ ⚠error - The message for the most recent failure on this thread.
- ss_
placement_ ⚠default - Fill
outwith the default placement: contain, centred, unscaled, unflipped, unrotated, and the animation’s own canvas as the box. - ss_
player_ ⚠add_ ssab - Register an
.ssabpack underpack_namewithout changing what plays. - ss_
player_ ⚠add_ track_ source - Lay
anim_nameontrackbeside what it already carries, atweight, and write its handle toout_source. On an empty track it becomes the main source.out_sourceis untouched on failure. - ss_
player_ ⚠alpha - The player-level fade in effect, after
ss_player_set_alphaclamped it to 0..1;1for a null handle. - ss_
player_ ⚠animation_ count - How many animations the main pack holds (0 if nothing is loaded).
- ss_
player_ ⚠animation_ name - The
index-th animation name of the main pack, or null if out of range. - ss_
player_ ⚠cancel_ track_ fade - Stop the fade on
track, leaving alpha and weights where they stand. - ss_
player_ ⚠canvas_ rect - Write the authored canvas of the animation now playing into
out, as a box in player-local units — whatss_player_fit_intofits whenhas_frameis false. - ss_
player_ ⚠canvas_ size - Canvas size of the animation currently playing. Either out-pointer may be null.
- ss_
player_ ⚠cell_ count - How many cells
cellmapholds: 0 when no pack is bound, the cellmap is not in it, orcellmapis not valid UTF-8. - ss_
player_ ⚠cell_ name - The
index-th cell name insidecellmap— the other half of whatss_player_set_part_cell_overridetakes. Null if out of range, or when the cellmap is not in the main pack. - ss_
player_ ⚠cellmap_ count - How many cellmaps the main pack holds (0 if nothing is loaded).
- ss_
player_ ⚠cellmap_ name - The
index-th cellmap name of the main pack, without the.ssceextension — the namespacess_player_set_part_cell_overridetakes. Null if out of range. - ss_
player_ ⚠cellmap_ texture_ count - How many cellmap and TextureChange-target names a pack offers for replacement.
pack_namenull selects the main pack; 0 if nothing is loaded. - ss_
player_ ⚠cellmap_ texture_ name - The
index-th replaceable name of a pack — what to passss_player_set_cellmap_texture.pack_namenull selects the main pack. - ss_
player_ ⚠clear_ all_ part_ overrides - Drop every override on the root animation at once.
- ss_
player_ ⚠clear_ part_ cell_ override - Revert a part to the animation’s own cell, by part name.
- ss_
player_ ⚠clear_ part_ cell_ override_ by_ index - Revert a part to the animation’s own cell.
- ss_
player_ ⚠clear_ part_ color_ override - Revert a part to the animation’s own colour, by part name.
- ss_
player_ ⚠clear_ part_ color_ override_ by_ index - Revert a part to the animation’s own colour.
- ss_
player_ ⚠clear_ part_ visibility_ override - Revert a part to the animation’s own visibility, by part name.
- ss_
player_ ⚠clear_ part_ visibility_ override_ by_ index - Revert a part to the animation’s own visibility.
- ss_
player_ ⚠clear_ track - Silence a track. Track 0 is refused — fade it to alpha 0 instead.
- ss_
player_ ⚠crossfade - Fade
tracktoanim_nameoverduration_ms, starting from whatever it is playing. Advanced byss_scene_update. On track 0,anim_nametakes over from the call on: it is the current animation, its state is whatss_player_is_finishedreports, and it plays with the speed, direction and loop count the host set. The instance tree is not rebuilt; the instance and effect parts belong to the pack, so the running children carry on. - ss_
player_ ⚠crowd_ count - How many members
ss_player_set_crowdlast gave the player; 0 when it draws once, and for a null handle. - ss_
player_ ⚠current_ animation - The animation currently set up, or null before the first
ss_player_set_animationand again after a load replaced the pack. No animation is not a failure, so that null leavesss_last_erroralone. - ss_
player_ ⚠destroy - Remove a player from its scene. Null, or a handle already destroyed, is a safe no-op — the handle itself stays allocated until the scene goes.
- ss_
player_ ⚠end_ frame - Last frame of that range.
- ss_
player_ ⚠event_ at - Fill
outwith theindex-th event of the last update. - ss_
player_ ⚠event_ count - How many timeline events the last
ss_scene_updatecrossed. - ss_
player_ ⚠event_ signal_ param_ at - Fill
outwith parameterparamof theindex-th event, which must be a signal. - ss_
player_ ⚠event_ signal_ param_ count - How many parameters the
index-th event carries, or 0 when it is not a signal. - ss_
player_ ⚠fade_ track - Drive
track’s alpha totargetoverduration_ms. Fading track 0 to 0 settles the character onto the setup pose. - ss_
player_ ⚠find_ part_ index - Resolve a part name to its index in the current animation, or -1 when the
name is unknown,
nameis not valid UTF-8, or no animation is set up. - ss_
player_ ⚠fit_ into - Fit the animation into a
widthxheightbox and place it there, asss_player_set_transformwould. - ss_
player_ ⚠frame_ no - Current playhead position, fractional. 0 when nothing is loaded.
- ss_
player_ ⚠frame_ rate - The rate the animation advances at. 0 when nothing is loaded.
- ss_
player_ ⚠frame_ skip_ enabled - See
ss_player_set_frame_skip_enabled. - ss_
player_ ⚠is_ cellmap_ overridden - Whether a cellmap currently carries a runtime override on this player.
pack_namenull selects the main pack; a null/destroyed handle reads false. - ss_
player_ ⚠is_ culled - Whether the player is culled, as
ss_player_set_culledset it;falsefor a null handle. - ss_
player_ ⚠is_ finished - Whether every configured loop has played. Sticky until the next play or
ss_player_set_animation, and never true under an infinite loop. - ss_
player_ ⚠is_ part_ hidden - Whether
partis hidden on the frame the lastss_scene_updatebuilt:1hidden,0shown or no frame built yet, or-1when the name is unknown,partis not valid UTF-8, or no animation is set up. An override shows from the next update. - ss_
player_ ⚠is_ part_ hidden_ by_ index - Index form of
ss_player_is_part_hidden:1hidden,0shown,-1whenpartis out of range or no animation is set up. - ss_
player_ ⚠is_ part_ skinned_ mesh - Whether
partis a skinned mesh — a mesh part whose vertices are drawn by bone skinning:1if it is,0if it is not (a rigid deform-only mesh, or any non-mesh part — all good follow targets), or-1when the name is unknown,partis not valid UTF-8, or no pack is bound. - ss_
player_ ⚠is_ part_ skinned_ mesh_ by_ index - Index form of
ss_player_is_part_skinned_mesh:1skinned,0not,-1whenpartis out of range or no pack is bound. - ss_
player_ ⚠is_ pausing - Whether playback is held in place.
ss_player_is_playingstays true. - ss_
player_ ⚠is_ playing - Whether an animation has been started and has neither stopped nor finished.
ss_player_pauseleaves it true;ss_player_is_pausingsays whether it is held. - ss_
player_ ⚠is_ playing_ forward - Which way the playhead is actually travelling — not the heading
ss_player_set_playback_directionconfigured, whichss_player_playback_directionreports. Under ping-pong the return leg runs backward while the configured heading still reads forward. Gate audio on this: SpriteStudio has no reverse audio. True with no animation set up. - ss_
player_ ⚠is_ track_ finished - Whether
track’s animation has played its loop count out and holds its last frame. A state, asss_player_is_finishedis for track 0; there is no edge. - ss_
player_ ⚠is_ visible - Whether the player draws, as
ss_player_set_visibleset it;truefor a null handle. - ss_
player_ ⚠just_ finished - Whether the last
ss_scene_updatecompleted playback: true for exactly one update, unlike the stickyss_player_is_finished. Never true under an infinite loop, and not raised byss_player_stop. - ss_
player_ ⚠just_ looped - Whether the last
ss_scene_updatecrossed a loop boundary. An edge: true only inside the update that crossed. - ss_
player_ ⚠just_ started - Whether the last
ss_scene_updatewas the first to run after anss_player_play/ss_player_play_from: true for exactly one update. Not raised byss_player_resume, which carries on rather than starting. - ss_
player_ ⚠load - Load a
.ssabfrompathand everything it depends on, then select it. - ss_
player_ ⚠load_ ssab - Register
pack_nameand make it the packss_player_set_animationselects from. - ss_
player_ ⚠loop_ count - The configured loop count — before an animation is set up, the one
ss_player_set_loop_countis holding for it, or 0 when none was set. - ss_
player_ ⚠missing_ at - Detail of one entry in the list
ss_player_missing_countsizes. - ss_
player_ ⚠missing_ count - How many things the player’s last load could not get.
- ss_
player_ ⚠order - The draw order
ss_player_set_orderset;0for a null handle. - ss_
player_ ⚠part_ count - How many parts the root animation has; 0 before one is set up.
- ss_
player_ ⚠part_ name - The name of part
index, in part-index order — what turns thepart_indexan event carries back into something a human reads. An unnamed part reads as an empty string; null past the last part or with no pack bound. - ss_
player_ ⚠part_ transform - Write a part’s current-frame transform into
out, by part name. - ss_
player_ ⚠part_ transform_ by_ index - Write the part’s current-frame transform into
outas the 2D affine[m00, m01, m10, m11, tx, ty], in animation-local (Y-down) space with neitherss_player_set_transformnor the scene’s projection applied. A point maps asx' = m00*x + m01*y + tx,y' = m10*x + m11*y + ty. - ss_
player_ ⚠pause - Hold playback on the current frame. Idempotent, and ignored while nothing is
playing. Lift it with
ss_player_resume. - ss_
player_ ⚠play - Start the selected animation from the head of its section, re-arming the loop
count. Not a resume: it rewinds, so lifting a
ss_player_pauseisss_player_resume’s job. Does nothing untilss_player_set_animationhas succeeded. - ss_
player_ ⚠play_ from ss_player_playfromstart_framerather than the head of the section. The family spells thisplay(startFrame); C has no overloads, so it is a second entry point here. Re-arms the loop count exactly asss_player_playdoes. A frame outside the section is brought inside it, asss_player_seekdoes.- ss_
player_ ⚠playback_ direction - 0 forward, 1 backward.
- ss_
player_ ⚠playback_ style - 0 normal, 1 ping-pong.
- ss_
player_ ⚠remaining_ loops - How many cycles of the loop count are left; 0 with no animation.
- ss_
player_ ⚠reset_ transform - Back to the identity placement: centred, unscaled, unrotated.
- ss_
player_ ⚠resume - Lift a
ss_player_pause, carrying on from the same frame. Idempotent, and a no-op on a stopped animation — starting one isss_player_play’s job. - ss_
player_ ⚠seek - Jump to
frame. Fractional values are honoured. - ss_
player_ ⚠set_ alpha - Player-level fade, clamped to 0..1. Mask coverage is unaffected: a faded player clips exactly as it would at full opacity.
- ss_
player_ ⚠set_ animation - Select the animation to play, rebuilding the instance tree. It is left at its
start frame and not playing — call
ss_player_playto start it. - ss_
player_ ⚠set_ animation_ section - Restrict playback to
start..=endof the current animation, so looping and ping-pong turn around inside that range. Both ends are included; an end outside the animation (-1, say) stands for the animation’s edge on that side. An end before the start, both inside the animation, is refused with the runtime’s invalid-parameter code, and the section and the playhead stay as they were. - ss_
player_ ⚠set_ cellmap_ texture - Replace the texture a cellmap binds, on one player, from straight-alpha RGBA8 pixels — a costume change or dynamic expression, driven from the program rather than the authoring data.
- ss_
player_ ⚠set_ crowd - Draw this one playhead
counttimes, once at each member’s placement: a crowd that costs one player’s evaluation and draw calls, however large.count0 draws the player once again, wheress_player_set_transformput it. The members are copied;membersmay be null whencountis 0. - ss_
player_ ⚠set_ culled - Skip this player entirely when
true: its timeline does not advance and it produces no geometry, and the time spent culled is dropped. For a player the caller knows cannot be seen; usess_player_set_visible(false)to hide one that should keep playing. - ss_
player_ ⚠set_ frame_ rate - Override the advance rate in fps. Prefer
ss_player_set_speed_scale, which scales playback without replacing the authored rate. - ss_
player_ ⚠set_ frame_ skip_ enabled - True (the default) keeps playback on the wall clock by dropping frames under
load; false advances exactly one frame per
ss_scene_update. - ss_
player_ ⚠set_ loop_ count countcycles then stop;-1(or0) loops forever. Under ping-pong one cycle is a full round trip.- ss_
player_ ⚠set_ order - Draw order within the scene; lower draws first. The order among equal values is not guaranteed, so give players that overlap distinct orders.
- ss_
player_ ⚠set_ part_ cell_ override - Make a part draw a different cell, by part name.
- ss_
player_ ⚠set_ part_ cell_ override_ by_ index - Make a part draw a different cell.
cellmap_nameis written without the.ssceextension. Normal and Mask parts only; fails when the cell cannot be resolved against the loaded pack. - ss_
player_ ⚠set_ part_ color_ override - Override a part’s colour, by part name. Arguments as the
_by_indexsibling. - ss_
player_ ⚠set_ part_ color_ override_ by_ index - Override a part’s colour.
blend_op: 0 mix, 1 mul, 2 add, 3 sub.rgbais packed0xRRGGBBAAin the authored 8-bit sRGB space — do not pre-multiply it.priority: 0 until the next keyframe, 1 until the next animation, 2 permanent. Normal parts only; other kinds ignore it and still returnSS_OK. - ss_
player_ ⚠set_ part_ color_ override_ corners - Four-corner colour override, by part name. Arguments as the
_by_indexsibling. - ss_
player_ ⚠set_ part_ color_ override_ corners_ by_ index - Four-corner colour override, for a gradient.
cornerspoints at 16 bytes in the runtime’s order — left-top, right-top, left-bottom, right-bottom, each[r, g, b, a]. Otherwise asss_player_set_part_color_override. - ss_
player_ ⚠set_ part_ visibility_ override - Force-hide a part (
hidetrue) or revert it to the animation, by part name. - ss_
player_ ⚠set_ part_ visibility_ override_ by_ index - Force-hide a part (
hidetrue) or revert it to the animation.cascadepropagates a force-hide to the part’s descendants — a keyframe hide never cascades, so this is the only way to hide a sub-tree. - ss_
player_ ⚠set_ playback_ direction direction: 0 forward, 1 backward.style: 0 normal, 1 ping-pong. Set as a pair — pass the current value for whichever you are not changing.- ss_
player_ ⚠set_ source_ event_ threshold - The weight at or above which
sourcefires its events. Only track 0’s main source fires by default (the default threshold is infinity); lower this to the source’s weight or below to have it fire too. - ss_
player_ ⚠set_ source_ frame - Seek one source — how a host keeps sources of different lengths in step.
- ss_
player_ ⚠set_ source_ weight - A source’s share within its track; weights are ratios.
- ss_
player_ ⚠set_ speed_ scale - Scale playback speed; 1.0 is the authored speed.
- ss_
player_ ⚠set_ sub_ frame_ enabled - True (the default) draws between authored frames; false floors the frame that is drawn, pinning playback to whole ones.
- ss_
player_ ⚠set_ tint - Player-level tint,
0xRRGGBB, multiplied into every part after the PartColor blend.0xFFFFFF— the default — leaves colours untouched. Mask coverage is unaffected, as withss_player_set_alpha. - ss_
player_ ⚠set_ track_ alpha - How much of
tracksurvives onto the pose the tracks below produced. Not clamped: above 1 extrapolates, 0 or below contributes nothing. - ss_
player_ ⚠set_ track_ animation - Put
anim_nameontrack, replacing what it was playing. Track 0 is better set withss_player_set_animation, which rebuilds the instance tree; this is for the overlay tracks above it. On track 0 it still makesanim_namethe current animation. - ss_
player_ ⚠set_ track_ blend blendis one ofSS_TRACK_BLEND_*.- ss_
player_ ⚠set_ track_ frame - Seek
track’s animation — how a continuous-control axis is driven. - ss_
player_ ⚠set_ track_ frame_ rate ss_player_set_frame_ratefor one track.- ss_
player_ ⚠set_ track_ frame_ skip_ enabled ss_player_set_frame_skip_enabledfor one track.- ss_
player_ ⚠set_ track_ loop_ count - How many times
track’s animation plays before it holds its last frame;-1(or0) loops forever. Set it after laying the animation: one is laid looping forever. On track 0 this isss_player_set_loop_count, and the player keeps the count for every animation laid there. - ss_
player_ ⚠set_ track_ outgoing_ event_ threshold - How far into a crossfade on
trackthe outgoing animation keeps firing events: while its share of the track,1 - progress, is at leastthreshold. The default, infinity, silences it from the moment the fade begins;0.5keeps it firing for the first half. Kept by the track. The update that completes the fade has already released the outgoing animation, so it fires nothing there, even at 0. - ss_
player_ ⚠set_ track_ playback_ direction ss_player_set_playback_directionfor one track:directionandstyletake the same0/1values.- ss_
player_ ⚠set_ track_ speed track’s own playback speed; 0 parks it, which is how a scrubbed axis stays wheress_player_set_track_frameputs it.- ss_
player_ ⚠set_ track_ sync syncis one ofSS_TRACK_SYNC_*: where the animations laid ontrackfrom now on start. Set it before laying; a track with nothing on it yet is created for it, andss_player_set_animationresets every track toFREE.- ss_
player_ ⚠set_ transform - Place this player in its scene: translation in pixels from the centre, scale, then rotation in radians.
- ss_
player_ ⚠set_ visible - Draw nothing when
false, while the timeline keeps running: the playhead advances and events are reported, so hiding a character for a moment does not slow it down. Usess_player_set_culledto stop paying for a player that cannot be seen at all. - ss_
player_ ⚠source_ event_ threshold - A source’s event threshold (infinity by default); 0 for a handle that names nothing.
- ss_
player_ ⚠source_ frame - A source’s playhead; 0 for a handle that names nothing.
- ss_
player_ ⚠source_ weight - A source’s weight; 0 for a handle that names nothing.
- ss_
player_ ⚠speed_ scale - The speed in effect, as a multiple of the frame rate:
0for a speed that was set to zero or below, since that is the stop it became. - ss_
player_ ⚠start_ frame - First frame of the range being played; follows
ss_player_set_animation_section. - ss_
player_ ⚠stop - Stop playback. The playhead stays where it stands; nothing rewinds.
- ss_
player_ ⚠sub_ frame_ enabled - See
ss_player_set_sub_frame_enabled. - ss_
player_ ⚠texture_ at - Describe the
index-th atlas of a registered pack, so a reference-mode host knows what to load and where the exporter put it. - ss_
player_ ⚠texture_ count - How many atlases a registered pack asks for.
pack_namenull selects the main pack; 0 means nothing is registered under that name. - ss_
player_ ⚠tint - The player-level tint as
0xRRGGBB;0xFFFFFFfor a null handle. - ss_
player_ ⚠total_ frames - Length of that range, both ends inclusive.
- ss_
player_ ⚠track_ alpha track’s alpha; 0 for a track that does not exist.- ss_
player_ ⚠track_ blend - One of
SS_TRACK_BLEND_*;SS_TRACK_BLEND_MIXfor a track that does not exist. - ss_
player_ ⚠track_ count - Number of tracks, empty ones included; 0 before an animation is set up.
- ss_
player_ ⚠track_ fade_ progress - How far the fade on
trackhas got, 0 to 1; -1 when it is not fading, since 0 is a fade that has just started. - ss_
player_ ⚠track_ frame track’s playhead; 0 for a track with no animation.- ss_
player_ ⚠track_ frame_ rate - The rate
track’s animation plays at, the override or the authored rate; 0 for a track with neither, or that does not exist. - ss_
player_ ⚠track_ frame_ skip_ enabled falsefor a track that does not exist.- ss_
player_ ⚠track_ just_ looped - Whether the last
ss_scene_updatewrappedtrack’s animation back to its start, asss_player_just_loopedis for track 0. - ss_
player_ ⚠track_ loop_ count -1for a track that loops forever; 0 for one with no animation, a count no animation reads back as.- ss_
player_ ⚠track_ main_ source - The source carrying
track’s animation;SS_INVALID_SOURCEwhen the track has none, since 0 is a handle. - ss_
player_ ⚠track_ outgoing_ event_ threshold - The track’s outgoing event threshold (infinity by default); 0 for a track that does not exist.
- ss_
player_ ⚠track_ playback_ direction 0forward,1backward; 0 for a track that does not exist.- ss_
player_ ⚠track_ playback_ style 0normal,1ping-pong; 0 for a track that does not exist.- ss_
player_ ⚠track_ speed - What
ss_player_set_track_speedstored; 0 for a track that does not exist. - ss_
player_ ⚠track_ sync - One of
SS_TRACK_SYNC_*;SS_TRACK_SYNC_FREEfor a track that does not exist. - ss_
scene_ ⚠add_ texture - Supply a texture for a reference-mode pack under
ss_texture_ref_t.key— whatss_player_texture_atreports for the atlas. It identifies the image, not the cell map hash inDrawBatch.texture_hash.rgbais straight-alpha RGBA8,width * height * 4bytes; it is premultiplied on the way to the GPU. - ss_
scene_ ⚠add_ texture_ png ss_scene_add_texturefrom encoded image bytes (PNG) instead of raw RGBA: the library decodes, premultiplies and uploads.- ss_
scene_ ⚠create - Create a scene that renders into the window described by
desc. - ss_
scene_ ⚠create_ player - Add a player to
sceneand return its handle, or null ifsceneis null. - ss_
scene_ ⚠destroy - Destroy a scene, its players and its wgpu resources. Null is a no-op.
- ss_
scene_ ⚠group_ alpha - Whether
ss_scene_set_group_alphais on;falsefor a null scene. - ss_
scene_ ⚠is_ device_ lost - Whether the driver has taken the GPU device away. False for a null
scene. While this is true
ss_scene_update/ss_scene_renderdo nothing andss_scene_resizeonly records the size. - ss_
scene_ ⚠player_ count - How many players
scenecurrently holds. - ss_
scene_ ⚠render - Acquire the swapchain image, draw the prepared frame into it, and present.
- ss_
scene_ ⚠resize - Resize the swapchain, the depth/stencil buffer and the projection to a new
drawable size in pixels. Zero in either dimension is ignored, and a size
past the device’s
max_texture_dimension_2ddraws at that limit. - ss_
scene_ ⚠restore_ device - Rebuild the GPU stack after a device loss and restore every player drawing into this window, resuming playback where it was interrupted.
- ss_
scene_ ⚠set_ group_ alpha - Fade each player whose alpha is below 1 as one layer, composited at its alpha, rather than part by part — so overlapping parts of a half-faded character read half, not three quarters. Off by default.
- ss_
scene_ ⚠stats - What the last frame cost. Writes
outand returnsSS_OK, or leaves it untouched and reports the reason. - ss_
scene_ ⚠update - Advance every player in the scene by
delta_secondsand build this frame’s GPU buffers. Call once per frame, beforess_scene_render. - ss_
sdk_ version - The SpriteStudio-SDK version whose runtime this library links, written as
its release tag (
v7.0.0), orlocalfrom a plaincargo build. The release zips carry the same string inlib/VERSION. - ss_
version - This library’s version.