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 - Dark Goomba

Pages: [1]
1
General / #include Puzzle
« on: June 21, 2014, 07:07:42 am »
Hi everyone. I am working on a game that has a lot of files. The problem is that I don't think that I am including the header files in the right sequence, so some of the classes are undefined. The files are Battlefield.h, Creature.h, Enemy.h, Button.h. I've spent hours trying to code it so:

Battlefield.h  has Creature.h, Enemy.h, and Button.h defined.
Creature.h    has Enemy.h and Battlefield.h defined.
Enemy.h       has Creature.h and Battlefield.h defined.
Button.h       has Creature.h and Battlefield.h defined.

Thanks in advance.

2
Graphics / Organizing Code with Load Texture
« on: March 22, 2014, 10:15:54 pm »
Hello everyone.
I am still a beginner on sfml. But I was wondering if there's a way to separate all the messy texture.loadFromFile("picture") with the rest of the code. Because Main.cpp is getting overloaded with this:

     sf::Texture texGoomba;
     sf::Sprite sprGoomba;
     if (!texGoomba.loadFromFile("goomba.png"))
          std::cout << "Error: goomba.png could not load" << std::endl;
     sprGoomba.setTexture(texGoomba);
     sprGoomba.setPosition(0,0);

So I tried putting all of that on to resource.cpp as a static member function,

     //resource.cpp
     void CResource::loadGoomba()
     {
          sf::Texture texGoomba;
          ...
     }

Though it's loaded on resource.cpp, main.cpp doesn't seem to recognize sprGoomba.
Well, if there's any better way to do this, any help would be appreciated.

3
General / Setting up SFML
« on: January 28, 2014, 04:36:20 am »
Hello everyone!

I'm quite new to sfml 2.1 but I can't manage to even pass the first step: the set up. I went through the installation instructions almost ten times but when I run my program on visual studio 2010 I get these warnings:

C:\...\NewProject\Debug\sfml-system-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-window-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-network-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-graphics-d-2.dll', Cannot find or open the PDB file
C:\...\NewProject\Debug\sfml-audio-d-2.dll', Cannot find or open the PDB file

I put my working directory to C:\...\NewProject\Debug so I thought that might work but it didn't.
I know there's probably something I did wrong or I'm just bad with dlls
Either way, any help is appreciated! :)

Pages: [1]
anything