massively expand steam api

This commit is contained in:
2025-07-17 20:28:47 -05:00
parent e677832b12
commit 881407a64f
8 changed files with 2829 additions and 59 deletions

View File

@@ -1,6 +1,7 @@
debug: FORCE
meson setup build_dbg -Dbuildtype=debugoptimized
meson install --only-changed -C build_dbg
cp build_dbg/cell . && chmod +x cell
fast: FORCE
meson setup build_fast

View File

@@ -267,8 +267,12 @@ else
deps += qr_dep
endif
# Storefront SDK support
storefront = get_option('storefront')
# Always build for Steam unless it's Emscripten
if host_machine.system() == 'emscripten'
storefront = 'none'
else
storefront = 'steam'
endif
if storefront == 'steam'
steam_sdk_path = meson.current_source_dir() / 'sdk'

View File

@@ -11,6 +11,8 @@
#include <sys/stat.h>
#include <time.h>
#include <mimalloc.h>
#ifdef __APPLE__
#include <sys/types.h>
#include <sys/sysctl.h>

View File

@@ -7,12 +7,12 @@
#include "qjs_blob.h"
#include "blob.h"
#include <mimalloc.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct mi_heap_s mi_heap_t;
/* Letter type for unified message queue */
typedef enum {
LETTER_BLOB, /* Blob message */

View File

@@ -4,6 +4,10 @@
#include "cell.h"
#include "blob.h"
#ifdef __cplusplus
extern "C" {
#endif
JSValue js_blob_use(JSContext *ctx);
// makes a new stone blob from data, copying the data over
@@ -14,4 +18,8 @@ void *js_get_blob_data(JSContext *js, size_t *size, JSValue v);
int js_is_blob(JSContext *js, JSValue v);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,14 @@
#include "cell.h"
#ifdef __cplusplus
extern "C" {
#endif
JSValue js_steam_use(JSContext *js);
#ifdef __cplusplus
}
#endif
#endif // QJS_STEAM_H

View File

@@ -50,10 +50,6 @@ static inline rgba vec2rgba(HMM_Vec4 v) {
}
// rectangles are always defined with [x,y] in the bottom left
struct rect {
float x,y,w,h;
};
typedef SDL_FRect rect;
typedef SDL_Rect irect;