mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-29 02:02:13 +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>
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
/* RotateDefs.h -- Rotate functions
|
|
2023-06-18 : Igor Pavlov : Public domain */
|
|
|
|
#ifndef ZIP7_INC_ROTATE_DEFS_H
|
|
#define ZIP7_INC_ROTATE_DEFS_H
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include <stdlib.h>
|
|
|
|
/* don't use _rotl with old MINGW. It can insert slow call to function. */
|
|
|
|
/* #if (_MSC_VER >= 1200) */
|
|
#pragma intrinsic(_rotl)
|
|
#pragma intrinsic(_rotr)
|
|
/* #endif */
|
|
|
|
#define rotlFixed(x, n) _rotl((x), (n))
|
|
#define rotrFixed(x, n) _rotr((x), (n))
|
|
|
|
#if (_MSC_VER >= 1300)
|
|
#define Z7_ROTL64(x, n) _rotl64((x), (n))
|
|
#define Z7_ROTR64(x, n) _rotr64((x), (n))
|
|
#else
|
|
#define Z7_ROTL64(x, n) (((x) << (n)) | ((x) >> (64 - (n))))
|
|
#define Z7_ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
|
|
#endif
|
|
|
|
#else
|
|
|
|
/* new compilers can translate these macros to fast commands. */
|
|
|
|
#if defined(__clang__) && (__clang_major__ >= 4) \
|
|
|| defined(__GNUC__) && (__GNUC__ >= 5)
|
|
/* GCC 4.9.0 and clang 3.5 can recognize more correct version: */
|
|
#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (-(n) & 31)))
|
|
#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (-(n) & 31)))
|
|
#define Z7_ROTL64(x, n) (((x) << (n)) | ((x) >> (-(n) & 63)))
|
|
#define Z7_ROTR64(x, n) (((x) >> (n)) | ((x) << (-(n) & 63)))
|
|
#else
|
|
/* for old GCC / clang: */
|
|
#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
|
|
#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
|
|
#define Z7_ROTL64(x, n) (((x) << (n)) | ((x) >> (64 - (n))))
|
|
#define Z7_ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|