Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Yee7i

Pages: [1]
1
General / Attempting to reference a deleted function
« on: October 08, 2019, 03:02:25 pm »
I've created a namespace for my game, and inside it a class with sf::Texture and sf::Sprite inside.

The code looks like this:

Classes.h

namespace at
{
        class Effect
        {
        public:

                int rotation = 0;

                std::string currentAnimation = "";

                sf::Vector2f position = sf::Vector2f(0.0f, 0.0f);

                sf::Texture texture;

                sf::Sprite sprite;

                thor::AnimationMap<sf::Sprite, std::string> aMap;

                thor::Animator<sf::Sprite, std::string> animator;
        };
}

Globals.h

extern at::Effect fireballGlow;

Globals.cpp

at::Effect fireballGlow;

Now I created an at::Effect in order to store a fireball glow inside. But when I try to build it VS throws
Error C2280 'at::Effect::Effect(void)': attempting to reference a deleted function
when I declare the glow in Globals.cpp.

I need an idea what's wrong here. I never call a missing function. I don't even have a void in that class, in fact.

2
I want to enable particles on a fireball, but the fireball's position is dynamically changing via a Vector2f position, to which the Sprite position is adjusted. Basically I've got a Vector2f fireball.position and then I'm using sprFireball.setPosition(fireball.position). It's for convenience only.

But to the point. I've got a ParticleSystem and most basic Emitter properties declared outside the game loop, but as the fireball's position is changing in the game loop, I need to somehow move the Emitter's particle position to that of the fireball. I've looked up Bromeon's tutorial on Particles and Connections, but that didn't help in my case. I was toying around with it for the past 2 hours or so and can't find a solution.

I'll try to minimize the code and put it below

        thor::ParticleSystem fireballParticleSystem;
        //adding textures

        thor::UniversalEmitter fireballEmitter;
        //setting properties

        fireballParticleSystem.addEmitter(fireballEmitter);
        // adding the emitter for the first time

        sf::Clock fireballFrameTime;
        // for emitter updates      

        // window and isOpen,

        { // game loop

       

        // setting the position of the fireball, its rotation, moving it and using the fireball.position to store the
           position
       
           

        }

     
 

3
General / [Thor] Animator class constructor
« on: September 17, 2019, 02:28:45 pm »
I'm using newly-built Thor 2.0 in VS2019 Community.

Yesterday I've encountered a problem, which I sadly cannot resolve myself

I was trying to animate an sf::Sprite, using thor::Animator class, referring to a guide on Bromeon's website under http://www.bromeon.ch/libraries/thor/tutorials/v2.0/animations.html

The problem is, even when copying that code into my VS, it automatically underlines the code red and says I'm missing default constructor (as in attachment 1).

In attachment 2 the code is literally copied.
I'm including <Thor/Animations/Animator.hpp> and overall <Thor/Animations.hpp> and have Thor linked both under release and debug versions, with and without -d respectively.

4
I've rebuilt the SFML code, along with Thor's code, to use with VS2019 (Community, to be exact). I used CMake and NMake, referring to the tutorial on the forums.
The thing is, I can't load any textures, the output is buggy. I'll attach screenshots below.
I've got everything linked correctly (at least I think I do). -d libs in debug mode, normal ones in release mode, every path set correctly. I've built everything with CMake for NMake, 32-bit, changing the parameters to Release and Debug respectively.
Everything is working fine in Release mode, textures loading, no weird output.
I'm linking dynamically.
In both debug and release modes there are no missing libs or anything that Visual Studio would notify me of.

Below screenshots of linkers and console output.


Pages: [1]