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.


Messages - Druidpeter

Pages: [1]
1
I have exactly the same issue. I've followed the instructions on the tutorial on the website for a 64-bit version using static debug libraries, and the visual studio 2019 says that it can't access the file in question.

I have attached my project. Hopefully you guys can figure out what's going on?

:Edit:

Hey, so I figured out what was wrong with my build. I built the libraries for x64 projects, but the active platform was x86 for the project. I changed the project platform to x64, and I was good to go. Kvaz1r, hopefully, this will help you with your setup as well?


2
General / Re: Error: 'RenderWindow' in namespace 'sf' does not name a type.
« on: September 24, 2020, 06:03:24 pm »
Fallahn!!!!!

Thank you so much!!! :D This was precisely the issue. :D

3
General / Error: 'RenderWindow' in namespace 'sf' does not name a type.
« on: September 24, 2020, 05:18:32 pm »
So, I have game.hpp and game.cpp

Game.hpp:

#ifndef __GAME_HPP__
#define __GAME_HPP__

#include <list>
#include <string>
#include <mutex>

#include <SFML/Window.hpp>

namespace gm{
    // Bunch of class definitions, et al.
}

#endif


And here's game.cpp

#include <cstdlib>
#include <iostream>
#include <memory>
#include <thread>

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>

#include "game.hpp"

using namespace gm;

    // Bunch of class implementations and int main.


If I compile this code with g++ game.cpp -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-network -lsfml-pthread it works absolutely fine, and I get a nice executable.

But now I have two other files: testCage.hpp and testCage.cpp.

testCage.hpp:

#ifndef __TEST_CAGE__
#define __TEST_CAGE__

#include <map>
#include <SFML/Window.hpp>
#include "game.hpp"

class TestEntity : public gm::Entity{
public:
    TestEntity():Entity(gm::EntityType::NULL_TYPE){};
    void testFoo(int m);
};

#endif


testCage.cpp:

#include "testCage.hpp"

void TestEntity::testFoo(int m){
    m += 1; // some garbage statement.
};


If I THEN try to compile and link both files with g++ game.cpp testCage.cpp -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-network -lsfml-pthread

I get error: ‘RenderWindow’ in namespace ‘sf’ does not name a type in file included from testCage.hpp(e.g. game.hpp).

Even though testCage is just some test code, the architecture is worth mentioning. Everything in game.hpp is completely self-contained, and will never require any other locally developed header files. So, for example, game.hpp will never have a line like include "someCageHeader.hpp". Likewise, all cage headers should have ONLY "game.hpp" as their sole dependency, and will never include each other. Also likewise, all cage headers are perfectly self-contained in themselves, and the only file that mixes and matches calls to functions and classes defined in multiple different headers is in "game.cpp". This is the ONLY file that actually needs to include multiple cageHeader files.

Beyond that, I'm stumped. What's going on here? Any information that could help me figure out why trying to set things up this way is causing this error for me?

Thank you very much for your time.

4
Graphics / Re: Undo Setting Texture Colors
« on: March 26, 2019, 05:55:40 pm »
Ah. Thank you. I feel very silly now. P_P

5
Graphics / Undo Setting Texture Colors
« on: March 25, 2019, 03:13:06 pm »
So, I'm currently working on building a map from a tilesheet. I figured I would only have one set of blocks, and then adjust the transparency of a block and the color block to get "glass blocks" and "dark blocks". I have one sprite which adjusts the texture rectangle over the source tileset texture, and applies the relevant transformations.

Problem is, once a modulation is done, e.g., adjusting the transparency of single block, in the rendering process, all of a sudden all the blocks are now semi-transparent! I thought that changing the color of a sprite would only have an effect in that particular draw instance! Oops.

So now, my question is, is there an easy way to reset the colors of a sprite back to the texture default on file?

6
General / Re: Basic Joystick Help Needed
« on: February 28, 2019, 03:33:53 pm »
Ah! All right. Thank you very much, Arcade. Sorry for all the trouble. :D

7
General / Basic Joystick Help Needed
« on: February 22, 2019, 02:56:21 pm »
I want to start adding Joystick functionality to my game, but I have no experience with Joysticks, and the documentation is confusing on some points.

1. Does "Joystick" refer only to an analog stick, or does it refer to multiple types of non keyboard mouse controller objects?

2. I'm having a hard time understanding the Axis part of the documentation. The documentation says that SFML supports 8 axes, and lists X,Y,Z,R,U,V,POV X, POVY. Are all of these Axes components of a single analog stick? How do I use them to basically read analog stick movement and translate that into, say, player movement on screen? Are these Axes part of different analog sticks? Do some of them go unused?

3. The controllers basically just enumerate buttons from 0-31. How do you figure out if a certain button maps to, say, the Xbox 360 'A' button, for example?

Sorry for the trouble, and thank you for your time.

Pages: [1]
anything