Squashed 'deps/nostalgia/' changes from f847289b..671b8eda
671b8eda [ox/std] Make StringLiteral constructors consteval 952637a1 Merge commit 'cbf4414fcaf00c00a2abf73b5c04a055180ad980' 7569698e [nostalgia,studio] Add FileExts_TileSheet const, and corresponding FilePickerPopup constructor 21713ba9 [ox/std] Fix StringLiteral::operator= to work with DevkitARM 73273b6f [nostalgia/gfx] Add isTileSheet function for checking paths against both file extensions 9f040392 [olympic,nostalgia] Cleanup style f4f7e5d0 Merge commit '9b5f7886cadc5c3dc826d00fa5b2e71696151dfd' c27726a4 Merge commit '6bbcae10cc7b21b73171ec0ff196f4baf6304404' bd24a775 Merge commit '7371df429534f264c179684412f6197f7968ebfa' 4419dff2 Merge commit '7688c05bac8c20bc267cae62ec78d55e5d0c493b' 536999c0 Merge commit '47eee1d56d591e3631d16e95a78ea3629ee312ee' a5535ef5 Merge commit '08236fc790e711afe886b6ef545511d35e4e5c6c' a90380f3 Merge commit 'e90dd887477452922f783535edb3d4c55e9a0d2c' 2000b2de [nostalgia/gfx/studio] Cleanup 7d92400f [nostalgia/gfx/studio] Add type specific navigateTo functions git-subtree-dir: deps/nostalgia git-subtree-split: 671b8edaadefe1872fb8954ad13d221b24f676c0
This commit is contained in:
@@ -28,7 +28,7 @@ class ClipboardObject: public BaseClipboardObject {
|
||||
}
|
||||
};
|
||||
|
||||
ox::String getClipboardText(Context &ctx) noexcept;
|
||||
ox::String getClipboardText(Context const &ctx) noexcept;
|
||||
|
||||
void setClipboardText(Context &ctx, ox::StringViewCR text) noexcept;
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ class Context;
|
||||
|
||||
void safeDelete(Context *p);
|
||||
|
||||
keel::Context const&keelCtx(Context const&ctx) noexcept;
|
||||
keel::Context const &keelCtx(Context const &ctx) noexcept;
|
||||
|
||||
keel::Context &keelCtx(Context &ctx) noexcept;
|
||||
|
||||
inline ox::FileSystem const*rom(Context const&ctx) noexcept {
|
||||
inline ox::FileSystem const*rom(Context const &ctx) noexcept {
|
||||
return keelCtx(ctx).rom.get();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ inline ox::FileSystem *rom(Context &ctx) noexcept {
|
||||
return keelCtx(ctx).rom.get();
|
||||
}
|
||||
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept;
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept;
|
||||
|
||||
template<typename T>
|
||||
void setApplicationData(Context &ctx, T *applicationData) noexcept {
|
||||
@@ -35,7 +35,7 @@ void setApplicationData(Context &ctx, T *applicationData) noexcept {
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept;
|
||||
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept;
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]]
|
||||
|
||||
@@ -41,7 +41,7 @@ ox::Size getScreenSize(Context const &ctx) noexcept;
|
||||
|
||||
ox::Bounds getWindowBounds(Context const &ctx) noexcept;
|
||||
|
||||
ox::Error setWindowBounds(Context &ctx, ox::Bounds const&bnds) noexcept;
|
||||
ox::Error setWindowBounds(Context &ctx, ox::Bounds const &bnds) noexcept;
|
||||
|
||||
/**
|
||||
* Tells Turbine to refresh the screen within the specified period of time.
|
||||
|
||||
@@ -89,7 +89,7 @@ void setMouseButtonEventHandler(Context &ctx, MouseButtonEventHandler h) noexcep
|
||||
KeyEventHandler keyEventHandler(Context const &ctx) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
bool buttonDown(Context const&ctx, Key) noexcept;
|
||||
bool buttonDown(Context const &ctx, Key) noexcept;
|
||||
|
||||
ox::Result<ox::UPtr<Context>> init(ox::UPtr<ox::FileSystem> &&fs, ox::StringViewCR appName) noexcept;
|
||||
|
||||
@@ -100,7 +100,7 @@ ox::Error run(Context &ctx) noexcept;
|
||||
// Returns the number of milliseconds that have passed since the start of the
|
||||
// program.
|
||||
[[nodiscard]]
|
||||
TimeMs ticksMs(Context const&ctx) noexcept;
|
||||
TimeMs ticksMs(Context const &ctx) noexcept;
|
||||
|
||||
void requestShutdown(Context &ctx, bool force = false) noexcept;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace turbine {
|
||||
|
||||
ox::String getClipboardText(Context&) noexcept {
|
||||
ox::String getClipboardText(Context const &) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ void safeDelete(Context *p) {
|
||||
delete p;
|
||||
}
|
||||
|
||||
keel::Context const&keelCtx(Context const&ctx) noexcept {
|
||||
keel::Context const &keelCtx(Context const &ctx) noexcept {
|
||||
return ctx.keelCtx;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ keel::Context &keelCtx(Context &ctx) noexcept {
|
||||
return ctx.keelCtx;
|
||||
}
|
||||
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept {
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept {
|
||||
ctx.applicationData = applicationData;
|
||||
}
|
||||
|
||||
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept {
|
||||
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept {
|
||||
return ctx.applicationData;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ class Context final {
|
||||
|
||||
Context() noexcept = default;
|
||||
Context(Context &other) noexcept = delete;
|
||||
Context(Context const&other) noexcept = delete;
|
||||
Context(Context const&&other) noexcept = delete;
|
||||
Context(Context const &other) noexcept = delete;
|
||||
Context(Context const &&other) noexcept = delete;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace turbine {
|
||||
|
||||
ox::String getClipboardText(Context &ctx) noexcept {
|
||||
ox::String getClipboardText(Context const &ctx) noexcept {
|
||||
return ox::String(glfwGetClipboardString(ctx.window));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ void safeDelete(Context *p) {
|
||||
delete p;
|
||||
}
|
||||
|
||||
keel::Context const&keelCtx(Context const&ctx) noexcept {
|
||||
keel::Context const &keelCtx(Context const &ctx) noexcept {
|
||||
return ctx.keelCtx;
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ keel::Context &keelCtx(Context &ctx) noexcept {
|
||||
return ctx.keelCtx;
|
||||
}
|
||||
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept {
|
||||
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept {
|
||||
ctx.applicationData = applicationData;
|
||||
}
|
||||
|
||||
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept {
|
||||
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept {
|
||||
return ctx.applicationData;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ class Context {
|
||||
|
||||
Context() noexcept = default;
|
||||
|
||||
Context(Context const&other) noexcept = delete;
|
||||
Context(Context const&&other) noexcept = delete;
|
||||
Context(Context const &other) noexcept = delete;
|
||||
Context(Context const &&other) noexcept = delete;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ ox::Bounds getWindowBounds(Context const &ctx) noexcept {
|
||||
return bnds;
|
||||
}
|
||||
|
||||
ox::Error setWindowBounds(Context &ctx, ox::Bounds const&bnds) noexcept {
|
||||
ox::Error setWindowBounds(Context &ctx, ox::Bounds const &bnds) noexcept {
|
||||
glfwSetWindowPos(ctx.window, bnds.x, bnds.y);
|
||||
glfwSetWindowSize(ctx.window, bnds.width, bnds.height);
|
||||
return {};
|
||||
@@ -430,13 +430,13 @@ ox::Error run(Context &ctx) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
TimeMs ticksMs(Context const&ctx) noexcept {
|
||||
TimeMs ticksMs(Context const &ctx) noexcept {
|
||||
using namespace std::chrono;
|
||||
auto const now = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
||||
return static_cast<TimeMs>(now) - ctx.startTime;
|
||||
}
|
||||
|
||||
bool buttonDown(Context const&ctx, Key const key) noexcept {
|
||||
bool buttonDown(Context const &ctx, Key const key) noexcept {
|
||||
return (ctx.keysDown >> static_cast<int>(key)) & 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user