Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

223 Neutral

About AverageMidget

  • Rank
  1. This may be a stupid question but I've search my little butt off and can't find anything about it. I know in a game loop you want continuous rendering because there's usually action happening but in a cad (computer aided design) system, there's no need for that, right? You really only need to redraw the window when the user moves the camera or modifies the content.    Maybe I'm over-thinking it and I should just do it the game way. I figured I could save some CPU cycles if it wasn't trying to constantly render.   Has anyone programmed a CAD application and, if so, how did you set up your message loop?
  2. AverageMidget

    debug error in DX(

  3. AverageMidget

    binary string to decimal

    Help with what? I don't see a question. I'm pretty sure I know what you're asking, but still, no question. Did you try searching for this? It's not exactly a hard to find answer. Google returns 10,500,000 results for binary string to decimal http://www.cplusplus.../general/13492/ Sixth post down. EDIT: Ninja'd by several people!
  4. AverageMidget

    win32 - Purpose of string table?

    It's a way to have all your strings in one location. Say you have a bunch of different strings that get displayed to your user (labels, message boxes, etc.). Instead of having them peppered throughout your code, you can put them in a string table and use the LoadString() function in your code, where you wanted the string to appear. If it's practical or not, you can decide. It would, however, come in very handy if you ever wanted to ship your software in other languages, though.
  5. AverageMidget

    maya to physX

    I assume you looked on page 41 (the section on exporting) of the PhysX plugin pdf and decided that isn't what you want?
  6. AverageMidget

    PHP cant see directory?

    Two things to look at... There use to be a bug in php 5.3 (you didn't say what version you are running), under windows and this stackoverflow question which claims the parent directory needs read permissions.
  7. AverageMidget

    WM_SHOWWINDOW question

    I got a little crazy with the copy/paste, without giving it much thought.
  8. AverageMidget

    WM_SHOWWINDOW question

    I haven't read the article in question, so there might be an explanation as to why they're putting it that way. The OnCreate, OnActivate, On***** are commonly used to separate implementation code from the WndProc. It would look a little like this... //--------------------------------------------------------------------------- LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_CREATE: OnCreate(hWnd, Msg, wParam, lParam); break; case WM_SHOWWINDOW: OnShowWindow(hWnd, Msg, wParam, lParam); break; case WM_DESTROY: OnDestroy(hWnd, Msg, wParam, lParam); PostQuitMessage(WM_QUIT); break; default: return DefWindowProc(hWnd, Msg, wParam, lParam); } return 0; } //--------------------------------------------------------------------------- OnCreate(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here } OnShowWindow(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here } OnDestroy(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here } Maybe they explained that in a different tutorial?
  9. AverageMidget

    Linker Nightmares

    I would imagine that D3DXLoadMeshFromX is being called from within the D3DModel::Load method. I, however, am having a hard time finding that. It seems like that method (and most of the other methods listed in your linker errors) are from some DirectX SDK samples. Not actual documented Microsoft source. That is sometimes the case. If the author of the code you're trying to use left it as a plain .cpp file (not compiled into a .dll or .lib), you would add that to your project and include the header, where you want to use the code. In my poking around, I found the [color="#1C2837"]CD3DMesh[color="#1C2837"] and [color="#1C2837"]CD3DFrame[color="#1C2837"] classes defined in a file named d3dfile.cpp. Also, these samples appear to be part of the DirectX 9 SDK samples.
  10. AverageMidget

    PHP cant see directory?

    A few guesses would be, you're either running in php's safe mode, or the privileges on the "Site" folder make it so php can't access it.
  11. AverageMidget

    Linker Nightmares

    I'll try and help in a way that'll help you figure these things out for yourself. If you look at the msdn entry for D3DXLoadMeshFromX function (which is one of your linker errors) and you scroll down, you'll see the requirments. The library is D3dx9.lib Is that lib included in your dependencies list? EDIT: I'll add that unresolved external symbol basically means it can't find the proper signature of the following function(s), so you have to tell the linker where to find it. In case you were confused by that part.
  12. AverageMidget

    Another c++ error

    Well, one problem is with your class_player.h file#ifndef CLASS_PLAYER_H #define CLAS_PLAYER_H
  13. AverageMidget

    Another c++ error

    The inclusion of main.h could very well be the issue. I, having nothing better to do , threw together a minimal example project and, if I include main.h in my tile.h, I get the same errors as you... main.h(7): error C2143: syntax error : missing ';' before '*' main.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int main.h(7): error C2065: 'TOTAL_TILES' : undeclared identifier main.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Here are the files, if you want to test it out. tile.h#ifndef TILE_H #define TILE_H #include <iostream> //#include "main.h" const int TOTAL_TILES = 225; class Tile { public: Tile(const std::string name); ~Tile(); std::string GetName(); private: std::string name_; }; #endif // TILE_H tile.cpp#include "tile.h" Tile::Tile(const std::string name) : name_(name) { //std::cout << name_.c_str() << std::endl; } Tile::~Tile() { } std::string Tile::GetName() { return name_; } main.h#ifndef MAIN_H #define MAIN_H #include <iostream> #include "tile.h" extern Tile *tiles[TOTAL_TILES]; #endif // MAIN_H main.cpp#include "main.h" Tile *tiles[TOTAL_TILES]; int main() { tiles[0] = new Tile("One"); std::cout << tiles[0]->GetName().c_str(); delete tiles[0]; // quick and dirty way to keep the cmd window open. int i; std::cin >> i; return 0; } Compile it and test, then un-comment the //#include "main.h" in tile.h and re-compile it.
  14. AverageMidget

    Another c++ error

    What is the reason behind your tile_load.h including main.h? I don't see a reason for it to be included. Also, your main.h and main.cpp both include tile_load.h. Not saying that's going to be a miracle fix, but if your include guards or #pragma once...es aren't doing their job, you're going to get cyclical inclusion.
  15. AverageMidget

    Another c++ error

    Anyone else thinking this needs a psychic debugger? I don't know if it's possible, or if you even want to, but maybe you could zip up your whole project and post it? It seems like this back-and-forth exchange isn't going anywhere at all.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!