70 Discussion / Question Topics
Remove Filter Hey, I keep getting this error: error LNK2019: unresolved external symbol "public: struct IDirect3DDevice9 * __thiscall Engine::GetDevice(void)" when I try to compile my project. MSDN says that IDirect3DDevice9 uses d3d9.lib, but it still won't work even with that lib in additional dependencies. (using VC++ 2008) I tried linking to a … | |
Hey, I'm having problems with my OS. At random times - right after I press Ctrl + 'S', the system just restarts (which is annoying because whatever I just tried to save is lost). It's happened around 4 or 5 times so far, but they've all been spread apart. But … | |
Hey - so I'm writing this game engine with help from a book. I'm encountering some difficulties with DirectInput. I keep having problems when I try to poll the keyboard. When I first try to poll the keyboard - i get DIERR_NOTACQUIRED - which I found out means that the … | |
[CODE] ResourceManager(void (*CreateResourceFunction) (Type** resource, char* name, char* path) = NULL) { m_list = new LinkedList<Type>; CreateResource = CreateResourceFunction; }[/CODE] hey - this is code for a contructer for a class (taking the code from a book I bought). What exactly is the parameter of the function? Is the parameter … | |
Is there a difference between a class and a struct? At first I thought a struct could not have methods/constructors/destructors, but now I found out they can, so what is the difference? | |
Hey - sorry if this is the wrong place for this. I have this basic chess game I'm making, and I'm done with the first alpha build of it. It works fine when I compile it on my own computer, but when I bring the exe to a different computer, … | |
Does anyone know how to make a surface tile when using DirectX? I tried to write the code for it myself, and I couldn't get it right. I had the right basic idea (I think), but I couldn't quite figure out how to organize the finer details. I'm wondering if … | |
Is there any reason why the code below won't work (I mean as far as writing output to file, not as far as writing the correct output to the file): [CODE] #include <cstdio> #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout ("ride.out"); ifstream fin ("ride.in"); char … | |
Hey, So, my understanding of header files so far are that they're basically code that can be used by multiple .cpp files. But if you have a prototype in a file.h that's declared in a file.cpp that includes file.h, and then FILE.cpp includes file.h, does FILE.cpp have access to the … | |
I'm trying to make my game pause if the user presses the 'P' button, and then unpause again with the P button. The pausing works when it's only pausing: [CODE]game_state = PAUSED;[/CODE] I've currently tried the following with pausing and unpausing - none have worked: [CODE]switch(game_state) { case RUNNING: { … | |
nvm - this topic can be closed sorry for wasting space | |
Don't know if anyone here will be able to help me - but here I go. I'm reading [i]Beginning Game Design[/i] by Jonathon S. Harbour. In a chapter on DirectSound, the author says to go the DirectX SDK, and then go to \samples\c++\common to get four files (dsutil.h, dxutil.h, dsutil.cpp, … | |
Hey, Is there anyway to control a volatile number of objects (don't know if I'm using the right term here... I mean when you don't know how many of an object you're going to have at any one time), like bullets in a shooter. If you have a bullet class, … | |
Does anyone have some good logic (not necessarily code, but if you happen to have to urge to give C++ code snippets, be my guest) for collision checking? I know about the IntersectRect function from DirectX, but using that isn't enough. I was planning on moving the player back to … | |
Hey, I'm trying to use trig to create a rotating tank (you rotate the tank by pressing left and right, and move forward and back by using up and down). I'm using this formula (C++): [CODE] tank.movex = cos(tank.direction*0.0174532925)*tank.move; tank.movey = sin(tank.direction*0.0174532925)*tank.move; tank.x += tank.movex; tank.y += tank.movey;[/CODE] tank.move is … | |
Quick question: what is OpenGL? Is it an equivalent to DirectX? | |
Hey, sorry if I'm in the wrong forum, but I need some help with getting the left and top values for a tile from a tile set. A book I have gives these two formulae: [CODE]left = (current frame % number of columns) * sprite width top = (current frame … | |
Hey, I'm trying to learn DirectX from this book ([I]Beginning Game Design[/I] by John S. Harbour, if anyone knows the book). I keep getting a LNK2019 error because [ICODE]Direct3DCreate9(D3D_SDK_VERSION)[/ICODE] is an "unresolved external symbol". Based on my slightly limited knowledge on libraries and include files and a little of my … | |
Hey, just wondering - I've seen numbers like 1.0f in examples and in books, but what does the 'f' mean? Does it just mean that the number is a floating point number? And does including/excluding it change anything? | |
Hey - does anyone know how to create a .exe file with Visual C++ express? Thanks. |