GH33DA

GDNet+ Basic
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

122 Neutral

About GH33DA

  • Rank
    GDNet+
  1. a new way to invision an mmorpg

    http://www.gamedev.net/community/forums/topic.asp?topic_id=260813
  2. Need an advice for a math book

    The more we know about what you are doing, the more specific direction we can point you in. Are we talking 2D? 3D? Are you using DirectX, XNA, OpenGL? Are you even coding? These are all important questions. Otherwise, all the suggestions are a shot in the dark. But, if that's all you want, I'll just say I like "Essential Mathematics for Games & Interactive Applications" more than "Geometric Tools for Computer Graphics" because it's examples are based around math concepts instead of game dev concepts.
  3. A simple one about Triangles

    How are you rotating the triangle if you don't know the center?
  4. Quote:Original post by Stowelly what did you change?, did you just comment out the line?, where did you set the breakpoints? from the sounds of it you just put them on the lines in your main function.... step through the initialisation line by line and check everything is valid including return values etc I swapped the Init and SetTitle lines. I'll step through the functions. EDIT: I stepped through the functions. I seems to happen right after the SQL_Quit(); in the deconstructor in the Engine.cpp. EDIT AGAIN: I told the linker to ignore msvcrt.lib. That seems to have fixed the problem.
  5. Quote:Original post by Stowelly Actually i think i see it now you dont initialise SDL before calling setTitle (SDL_WM_SetCaption( title, 0);) Same results Quote:Original post by Palidine Try taking SDL_Quit() out of your Engine destructor and call it right before return 0; instead. -me Same results here's my Engine.h: #pragma once #include "SDL.h" class Engine { private: int winWidth; int winHeight; const char* winTitle; SDL_Surface* winScreen; protected: void Input(); void Render(); void Logic(); void SetSize(const int& width, const int& height); public: Engine(); virtual ~Engine(); SDL_Surface* GetScreen(); void Init(); void Loop(); void SetTitle(const char* title); };
  6. Quote:Original post by Stowelly which line does it break on? either use a debugger, or brute force output text before and after lines to try and assess where it is breaking I've put breakpoint on all the lines, it gives me the violation the line after "return 0" in main.cpp.
  7. Error: 0xC0000005: Access violation writing location 0x00000010. My Guess: A null pointer somewhere I missed. Can't find it though. Code: main.cpp #ifdef WIN32 #pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #endif //#include <iostream> //#include "Blok.h" //#include "ColorMath.h" //#include "Swatch.h" #include "Engine.h" //using namespace std; int main(int argc, char *argv[]) { /*Blok Block1(1,1,BLACK,false); Blok Block2(2,2,RED,false); cout << Block1.get_color() << endl; cout << Block2.get_color() << endl; mix(Block1,Block2); cout << Block1.get_color() << endl; cout << Block2.get_color() << endl; cin.get();*/ Engine theEngine; theEngine.SetTitle("SDL_Stuff"); theEngine.Init(); return 0; } engine.cpp #include "Engine.h" Engine::Engine() { winWidth = 800; winHeight = 600; winTitle = 0; winScreen = 0; } Engine::~Engine() { SDL_Quit(); } void Engine::Input() { } void Engine::Render() { } void Engine::Logic() { } void Engine::SetSize(const int& width, const int& height) { winWidth = width; winHeight = height; winScreen = SDL_SetVideoMode( width, height, 0, SDL_ANYFORMAT); } SDL_Surface* Engine::GetScreen() { return winScreen; } void Engine::Init() { if( SDL_Init(SDL_INIT_VIDEO) < 0) { fprintf(stderr,"SDL failed to initalize."); SDL_Quit(); } SetSize( winWidth, winHeight); if( winScreen == NULL) { fprintf(stderr,"SDL failed to display screen."); SDL_Quit(); } } void Engine::Loop() { } void Engine::SetTitle(const char* title) { winTitle = title; SDL_WM_SetCaption( title, 0); }