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 - bucknasty189

Pages: [1] 2
1
Graphics / Fonts not loading
« on: June 23, 2011, 05:55:17 am »
Sorry for the late reply, I've been extremely busy finishing up this project for school. I'm not actually using the entire GQE as a library, just your asset manager and asset classes in my own project of which I've made a few changes, but I've changed nothing to the font asset or any font functions.  Also, I'm using SFML 1.6's dynamic libraries.

2
Graphics / Anchor a pixel to a sprite?
« on: June 14, 2011, 06:56:43 am »
Quote
your not even setting its return to a variable

Wow, I can't believe I didn't notice that.  :oops:
However, it's still not working...
Code: [Select]

void PlayerEntity::SetBarrel(sf::Vector2f relPosition)
{
m_Barrel = relPosition;
}

sf::Vector2f PlayerEntity::UpdateBarrel(float theta)
{
sf::Vector2f point = this->GetPosition() + m_Barrel;
sf::Vector2f RotatedPoint;
int scaler = 2;
RotatedPoint.x = point.x + (cos(theta) * scaler);
RotatedPoint.y = point.y + (-sin(theta)* scaler);
return RotatedPoint;
}

//In the update()

sf::Vector2f Barrel = UpdateBarrel(theta);
m_curWeapon->Shoot(gameTemp, &Barrel);

3
Graphics / Fonts not loading
« on: June 14, 2011, 12:37:15 am »
Sorry I took so long to reply. The path is definitely correct, I'm using the AssetManager from the GameEngine tutorial and it loads fonts and sounds fine, but fonts are giving me a problem. They load in a simple main() context, but it says it cannot find the resource when I use the LoadFont() function.

This error message is from SFML, not from in the AssetManager. You can view the source at
http://www.sfml-dev.org/wiki/en/sources/gqe_en#assetmanager.cpp

Here's the line that produces the error.
Code: [Select]

m_Game->m_AssetManager.AddFont("CheeseBurger", "../data/fonts/cheeseburger.tff", AssetLoadStyleImmediate);
[/url]

4
Graphics / Anchor a pixel to a sprite?
« on: June 11, 2011, 01:15:19 am »
I have a sprite that shoots a bullet. However, the bullet currently starts in the middle of the sprite.I want bullet to shoot from the barrel of the gun. Is there a way I can anchor a vector to a pixel on the sprite so that it remains there after rotating?

This is what I've tried so far, but it just doesn't work right. I feel like I'm overlooking something simple.

Code: [Select]

sf::Vector2f Collision::RotatePoint(const sf::Vector2f& Point, float Angle) {
Angle = Angle * RADIANS_PER_DEGREE;
sf::Vector2f RotatedPoint;
RotatedPoint.x = Point.x * cos(Angle) + Point.y * sin(Angle);
RotatedPoint.y = -Point.x * sin(Angle) + Point.y * cos(Angle);
return RotatedPoint;
}

void PlayerEntity::SetBarrel(sf::Vector2f relPosition)
{
m_Barrel = this->GetPosition() + relPosition;
}


//This code is inside my update for the PlayerEntity which derives from sf::Sprite

// Rotate the sprite towards the mouse
float theta = ((-1* 360 / PI_f * ( atan2((PlayerPos.y - gameTemp->m_Mouse.y),(PlayerPos.x - gameTemp->m_Mouse.x)) ) ) / 2) + 90;
this->SetRotation(theta);

SetBarrel(21.f, 0.f);
Collision::RotatePoint(m_Barrel, theta);

if (inputUser.IsMouseButtonDown(sf::Mouse::Left))
{
m_curWeapon->Shoot(gameTemp, &m_Barrel);
}


The shoot function starts the bullet at the given vector and goes towards where the mouse was at click.

5
General / cant get debug to work
« on: June 11, 2011, 01:05:00 am »
Debug and release are working fine now. I was working on something unrelated in class today and I got those pdb errors. My professor told me that having two instances of visual studio open can cause problems with debugging. I think this was the problem I was having.

6
General / cant get debug to work
« on: May 23, 2011, 07:30:14 pm »
Guessing so cause its working great with them.

7
General / cant get debug to work
« on: May 23, 2011, 06:43:08 pm »
I'm having a lot of problems in debug mode now that I haven't had in release. Should I be using the debug libraries?

8
General / cant get debug to work
« on: May 23, 2011, 06:08:02 pm »
:shock: :oops:
Thank you. Sorry for my stupidity :lol:

9
General / cant get debug to work
« on: May 23, 2011, 05:41:48 pm »
Ok, heres the error list.


Error   4   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   shotgun.obj
Error   9   error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ) referenced in function "public: class std::_Iterator_base & __thiscall std::_Iterator_base::operator=(class std::_Iterator_base const &)" (??4_Iterator_base@std@@QAEAAV01@ABV01@@Z)   shotgun.obj
Error   14   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   shotgun.obj
Error   29   error LNK2001: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Window::GetFrameTime(void)const " (__imp_?GetFrameTime@Window@sf@@QBEMXZ)   projectile.obj
Error   3   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   26   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Input::IsMouseButtonDown(enum sf::Mouse::Button)const " (__imp_?IsMouseButtonDown@Input@sf@@QBE_NW4Button@Mouse@2@@Z) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   27   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (__imp_?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   28   error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Window::GetFrameTime(void)const " (__imp_?GetFrameTime@Window@sf@@QBEMXZ) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   8   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   OptionsState.obj
Error   12   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   OptionsState.obj
Error   17   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   OptionsState.obj
Error   7   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   MenuState.obj
Error   11   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   MenuState.obj
Error   16   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   MenuState.obj
Error   6   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   MapState.obj
Error   10   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   MapState.obj
Error   15   error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ) referenced in function "public: virtual void __thiscall DE::MapState::HandleEvents(class sf::Event &)" (?HandleEvents@MapState@DE@@UAEXAAVEvent@sf@@@Z)   MapState.obj
Error   1   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::ShowMouseCursor(bool)" (__imp_?ShowMouseCursor@Window@sf@@QAEX_N@Z) referenced in function "public: __thiscall DE::LevelState::LevelState(class DE::cGameEngine *)" (??0LevelState@DE@@QAE@PAVcGameEngine@1@@Z)   LevelState.obj
Error   5   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   LevelState.obj
Error   30   fatal error LNK1120: 14 unresolved externals   C:\Users\JT\Dropbox\$MyLocalRepo\DefianceEngine\Debug\CivilDefiance.exe
Error   2   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   cGameEngine.obj
Error   13   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   cGameEngine.obj
Error   18   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   cGameEngine.obj
Error   19   error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function "public: __thiscall DE::cGameEngine::cGameEngine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0cGameEngine@DE@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)   cGameEngine.obj
Error   20   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::UseVerticalSync(bool)" (__imp_?UseVerticalSync@Window@sf@@QAEX_N@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Init(void)" (?Init@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   21   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Create(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_?Create@Window@sf@@QAEXVVideoMode@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@2@@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Init(void)" (?Init@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   22   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   23   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (__imp_?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   24   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpened(void)const " (__imp_?IsOpened@Window@sf@@QBE_NXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   25   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close@Window@sf@@QAEXXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Cleanup(void)" (?Cleanup@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj

Overall unresolved externals is my problem. You still need SFML_DYNAMIC when debugging correct? I don't see an actual Rebuild All (using vs9), but get the same errors when cleaning and then rebuilding the solution.

10
General / cant get debug to work
« on: May 23, 2011, 08:16:07 am »
First I got the the program database errors again.
Then after a clean and another build I got those unresolved errors again.
By rebuild all you mean batch build correct?

I'm in 1.6 btw sorry

11
General / cant get debug to work
« on: May 23, 2011, 08:07:44 am »
Thanks, but now tons of linker errors.

unresolved external symbol for various sf::somethings
all have __declsspec(dllimport)

12
Graphics / Fonts not loading
« on: May 23, 2011, 07:20:26 am »
Ok, this is wierd. Images and sounds both load fine. Fonts fail to load. I've tried the same font in another project and it loads fine. So confused...

13
General / cant get debug to work
« on: May 23, 2011, 06:57:37 am »
I've been coding in release mode just fine. How do I setup debug mode? I'm getting errors no matter what I do.

I get two of these errors
fatal error C1033: cannot open program database 'c:\blahblah\debug\vc90.pdb'

14
Graphics / Anchor a sprite
« on: May 03, 2011, 03:34:44 am »
thank you

15
Graphics / Anchor a sprite
« on: May 02, 2011, 12:40:49 pm »
I have a button class for my GUI that is basically just a sprite with a bounding rect. Right now I just have it moving with the camera, but I was wondering if anyone knows of any other methods of keeping a sprite anchored (e.g. at the bottom of the screen) while the camera moves around.

Pages: [1] 2