Skip to content

Commit

Permalink
GameKit on Windows
Browse files Browse the repository at this point in the history
GameKit updated for Windows and Mac with latest Rive Renderer.
- [x] Cleanup Windows includes
- [ ] Add image decoding from Flutter so procedural rendering can draw images.

I want to do the first one before submitting the PR and push the image decoding to a new PR. We can even start integrating it into the editor without that right now.

Diffs=
e96739328 GameKit on Windows (#7150)

Co-authored-by: Luigi Rosso <[email protected]>
  • Loading branch information
luigi-rosso and luigi-rosso committed Apr 30, 2024
1 parent d32253e commit aaacf51
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1c7e61b8a075b2eaacbcce4f5438d6072b30e420
e96739328b7eb82870c5a642f6e3213c7b423d51
28 changes: 27 additions & 1 deletion build/rive_build_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,36 @@ do
linkoptions({ '-flto=full' })
end

filter('system:windows')
newoption({
trigger = 'use_default_runtime',
description = 'Don\'t set windows static runtime and runtime values.',
})

newoption({
trigger = 'runtime',
description = 'Choose whether to use staticruntime on/off/default',
allowed = {
{ 'default', 'Use default runtime' },
{ 'static', 'Use static runtime' },
{ 'dynamic', 'Use dynamic runtime' },
},
default = 'static',
})

filter({ 'system:windows', 'options:runtime=static' })
do
staticruntime('on') -- Match Skia's /MT flag for link compatibility
runtime('Release') -- Use /MT even in debug (/MTd is incompatible with Skia)
end

filter({ 'system:windows', 'options:runtime=dynamic' })
do
staticruntime('off')
runtime('Release')
end

filter('system:windows')
do
architecture('x64')
defines({ '_USE_MATH_DEFINES', 'NOMINMAX' })
end
Expand Down
4 changes: 2 additions & 2 deletions include/rive/artboard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class Artboard : public ArtboardBase, public CoreContext, public ShapePaintConta
void onDirty(ComponentDirt dirt) override;

bool advance(double elapsedSeconds);
bool hasChangedDrawOrderInLastUpdate() { return m_HasChangedDrawOrderInLastUpdate; };
Drawable* firstDrawable() { return m_FirstDrawable; };
bool hasChangedDrawOrderInLastUpdate() { return m_HasChangedDrawOrderInLastUpdate; }
Drawable* firstDrawable() { return m_FirstDrawable; }

enum class DrawOption
{
Expand Down
5 changes: 2 additions & 3 deletions src/animation/state_machine_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class HitComponent
HitComponent(Component* component, StateMachineInstance* stateMachineInstance) :
m_component(component), m_stateMachineInstance(stateMachineInstance)
{}
virtual ~HitComponent(){};
virtual ~HitComponent() {}
virtual HitResult processEvent(Vec2D position, ListenerType hitType, bool canHit) = 0;

protected:
Expand All @@ -409,7 +409,6 @@ class HitShape : public HitComponent
HitShape(Component* shape, StateMachineInstance* stateMachineInstance) :
HitComponent(shape, stateMachineInstance)
{}
~HitShape() {}
bool isHovered = false;
float hitRadius = 2;
std::vector<const StateMachineListener*> listeners;
Expand Down Expand Up @@ -459,7 +458,7 @@ class HitNestedArtboard : public HitComponent
HitNestedArtboard(Component* nestedArtboard, StateMachineInstance* stateMachineInstance) :
HitComponent(nestedArtboard, stateMachineInstance)
{}
~HitNestedArtboard() {}
~HitNestedArtboard() override {}
HitResult processEvent(Vec2D position, ListenerType hitType, bool canHit) override
{
auto nestedArtboard = m_component->as<NestedArtboard>();
Expand Down

0 comments on commit aaacf51

Please sign in to comment.