Jump to content
  • Advertisement

walkingbush

Member
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

102 Neutral

About walkingbush

  • Rank
    Member
  1. walkingbush

    SDL Timer help

    well you could probably make a timer class, eg class Timer { public: int start, newtime; void startTimer(); int getTicks(); }; I wouldnt copy n paste that though, not really professional work. Anyways, with classes each instance has its own start and newtime, so one function (say drawCombatBar()) could feed off of Timer combatBarTimer, while say drawCombatSprites() relies on Timer combatSpritesTimer. If you dont know about classes, you should really really really REALLY look them up ;) For one thing, youd learn about how to define all of those functions and where to put class definitions. Also might i recommend this site: lazyfoo.net. Its the shizzle for SDL. Sorry if I missed the point of your post and went on a tangent, but at least I think im helping lol.
  2. walkingbush

    [SDL] Player won't move

    try using sdl_event instead of sdl_event* for your function. I feel like youre supposed to be calling event.dothis instead of event->dothis. I also assume you call the move function in g.OnEvent, so Itd be cool if you showed us that. ;D I think thats what the poster above was talkin 'bout: you dont call Player::Move() in main.cpp.
  • 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!