mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-29 04:02:56 +01:00
Frame Studio now builds for Windows (x64, x86, ARM64), Linux (x64, x86, ARM64)
and macOS (Apple Silicon, Intel):
- studio/platform.h with Win32 and POSIX implementations (dialogs through
tinyfiledialogs on Linux/macOS), a GLFW window beside the Win32 one, and a
platform-neutral frame pacer
- MoltenVK support in the renderer (portability enumeration) and bundled in
the macOS app
- 32-bit builds: large-address-aware, LZMA packing within a 32-bit address space
- unaligned file reads in the loaders go through loadUnaligned (no UB)
- scripts/build-studio.sh, studio/build_windows.bat [x64|x86|arm64],
cmake/llvm-mingw.cmake, and a GitHub Actions workflow building every target
Frame Home installs without Studio: frame/install-frame-home.{sh,ps1} and
"Install Frame Home.bat" (packaged as FrameHome-installer.zip).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
2.1 KiB
C++
35 lines
2.1 KiB
C++
#pragma once
|
|
// A loaded home, baked: everything HslScene holds after the slow part of loading (APK unzip, HSTF / RENDMESH /
|
|
// RENDSHAD parsing, SMOL-V decode, lightmap HDR decode, override resolution) written as one binary blob, so a
|
|
// .fenv opens in a fraction of the time. Textures (HDR lightmaps too) stay as their cooked ASTC chains (the Frame's GPU samples them
|
|
// directly), so the blob is GPU-ready and about the size of the home's own data.
|
|
//
|
|
// Clay (.opa / .ovrscene) and glTF homes animate on the CPU: their animation goes in as data too (anim_bake.h), played by
|
|
// the loader's own code from it.
|
|
#include "hsl_scene.h"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
constexpr u32 kSceneBakeVersion = 13; // 2: world; 3: HDR maps as ASTC, binary world; 4: roles; 5: mesh refs; 6: gravity; 7: mesh paths; 8: ambience name; 9: compressed 8-bit lightmaps; 10: reflection cube as ASTC; 11: walkable area (and simplified colliders); 12: prepared and specialized shaders; 13: Clay / glTF CPU animation
|
|
|
|
struct VisibilityResult;
|
|
struct ObjectEdit;
|
|
|
|
// What a bake leaves out or adds beyond the scene itself: the visibility pass's index lists (visibility_bake.h) and
|
|
// the walkable area to carry (the scene's own when empty).
|
|
struct BakeOptions {
|
|
const VisibilityResult* visibility = nullptr;
|
|
std::string walkGrid;
|
|
};
|
|
|
|
// False (with `error`) when the scene can't be baked (an animation that can't be stored).
|
|
bool bakeScene(const HslScene& scene, std::vector<u8>& out, std::string& error, const BakeOptions* options = nullptr);
|
|
|
|
// The mesh optimizer for a save: the visibility pass over the scene's walkable area (Frame Studio's object edits kept
|
|
// whole), its result in `vis` and the options for bakeScene in `options` (the walkable area it was worked out from
|
|
// goes with it: Frame Home must not bake one from the thinned meshes). False when it didn't run (`vis.skipped`).
|
|
// FH_NO_VIS_CULL=1: never.
|
|
bool optimizeForBake(const HslScene& scene, const std::vector<ObjectEdit>* edits, VisibilityResult& vis, BakeOptions& options);
|
|
bool unbakeScene(const u8* data, size_t size, HslScene& scene, std::string& error);
|