Jump to content
  • Advertisement

JimmyFo

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

122 Neutral

About JimmyFo

  • Rank
    Newbie
  1. JimmyFo

    Already defined in .obj

    Files: Main.cpp Gameworld.cpp - the implimentations of whats declared in the .h Gameworld.h I've collapsed it all down to just main.cpp and gameworld.h at one point and it still won't work. It still gives me the exact same number of linker errors. I have to make main include gameworld.cpp which in turn includes the .h because otherwise I get over a hundred errors. There has to be some trick I'm missing. Edit: just so you know, the .h only contains class declarations. The cpp contains the implementations of those functions.
  2. JimmyFo

    Already defined in .obj

    Ok, I have no idea what the problem is - I've gone as far as to compact it all to one cpp file for main to include and it STILL says already defined... what's up?
  3. JimmyFo

    Little opengl help

    It's tough because I'm not sure exactly where you're coming from - to change to Ortho2D, your display and reshape code will have no modelview matrix. ... glViewport(...) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluOrtho2D(left, right, bottom, top) ... The thing is, that makes for very simple paint programs and 2D interactive projects. However, it has lots of constraints. When you're using, say, gluPerspective along with the Projection and Modelview matrices, you have lots of flexibility, but something as exact as filling the screen and only the screen with what you want becomes much more difficult. Considering NeHe is very thorough, you probably have MFC and the 3D code, so what you should consider is perhaps creating tiles via GL_QUAD or GL_QUAD_STRIP in your display function and then maybe going for a nice camera angle. The Red book is very helpful in this matter.
  4. JimmyFo

    Little opengl help

    Ok, I'm still a little confused, but if you are NOT using Ortho2D, then it becomes a bit more difficult to make sure the tile is at the right corner - basically, you'll need to do a little experimentation (or calculation beforehand) and have the tiles drawn out along whatever plane you want (probable the x/z plane) and then play with the camera till it contains only the tiles. You can find out the total area the tiles will take up and then use the camera angle to determine what will be seen.
  5. JimmyFo

    Little opengl help

    That's really confusing - I assume you're using gluOrtho2D? That makes things a breeze if you have no need for the Ortho or the other matrices. Please provide some more information first: bmp or pixel, camera movement? What do you mean by tile scrolling?
  6. Hi, I'm not sure what forum to put this under, but I'm getting a really frustrating error I can't get rid off. It reads like: Fickleton error LNK2005: "public: void __thiscall world::removeGoal(class goal)" (?removeGoal@world@@$$FQAEXVgoal@@@Z) already defined in Gameworld.obj There are 25 errors, 24 of which are 2 occurences of class functions like the ones above, then one final that says: Fickleton fatal error LNK1169: one or more multiply defined symbols found I only have three files, because I've been trying to compress the files to get rid of this error to no avail. I have a main cpp file which includes only: windows.h, gl/gl.h, and a custom cpp file. This cpp file has #ifndef/#define/#endif statements in it and includes only my custom header. This is ALSO covered with #ifndef/#define/#endif statements and includes only vector, stdlib, and using namespace std. What is wrong with this picture?
  7. JimmyFo

    Using matrices for rotation

    Thanks for that, I did a brief perusal and I think it may work - what I was trying to do was basically make my own graphics pipeline instead of using opengls (i.e. the glulookat/perspective/rotate/translate etc) - I understand the matrix manipulations, I just am wondering about how to use code to take them and manipulate them ( the display). Thanks :) -james
  8. Hi all - I have a question concerning using my own matrices for translating and rotating the camera without the help of the opengl functions like gluLookAt, gluPerspective, and MatrixMode etc. I am familiar with the theory and have that understood - what I don't get is what to put in my display and reshape functions: void display() { ... glBegin(etc) glEnd } void reshape(height width) { setIdentity() ... } How to I reference the arrays I want and make sure they get displayed? Thanks a lot -james
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!