Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1298 Excellent

About smart_idiot

  • Rank
  1. smart_idiot

    Parsing an OpenType Font File

    Use FreeType. Don't worry, you can still waste as many days as you want caching glyphs in textures, and if you still get bored, you can even try to get subpixel rendering to work. I don't think anyones ever bothered to do that in a 3D game, but hey, you can be the first.
  2. I think you mean return result;. Also, if the constructor for result throws an exception, str will leak. [/quote] *smart_idiot grumbles incoherently about RAII and wanders away. *smart_idiot pauses for a moment to wonder if he'll be told to use boost::shared_ptr, and then continues walking.
  3. #include <rpc.h> #include <string> #include <stdexcept> std::string GetUnqueIDString(UUID *guid) { std::string result; unsigned char *str = NULL; if(UuidToString(guid, &str) != RPC_S_OK) { OutPutDebug( "ERROR GetUniqueIDString FAILED", //the message to display __PRETTY_FUNCTION__, //the location the message was called Eg. what function true); throw std::runtime_error("Unable to determine GUID."); } try { result = (char *)str; } catch(...) { RpcStringFree(&str); throw; } RpcStringFree(&str); return result; }
  4. This looks like a DailyWTF in the making. GetUnqueIDString does a bunch of nonsense and then returns an empty string.
  5. The only thing that comes to mind is 'backing store', but that's pretty generic and can apply to anything stored in a cache.
  6. smart_idiot

    already defined in main.obj

    I fear the dependency graph for your program is going to look like a bowl of tangled spaghetti.
  7. Where is this pointer and what is the problem you're having with it?
  8. smart_idiot

    already defined in main.obj

    Hello? Hello? Anybody home? Huh? Think, McFly. Think! I gotta have time to get 'em retyped. Do you realize what would happen if I hand in my reports in your handwriting? I'll get fired. You wouldn't want that to happen, would ya? Would ya? The union isn't special, you stick a non-extern copy of it in a source file like you did with everything else... although I'm really doubtful there's a good reason your event object needs to be seen globally.
  9. smart_idiot


    #include <whatever> class Entity { protected: double x, y; public: Entity(double x, double y): x(x), y(y) {} virtual ~Entity() {} void draw() = 0; void update() = 0; }; class Ship: public Entity { public: // whatevers } // ... int main() { // Init drawing code. bool running = false; vector<Entity *> entities; while(running) { while(messages) { if(message.type == KEY_DOWN) switch(message.key) { case KEY_ESCAPE: running = false; break; case KEY_S: shields = !shields; break; // ... } } for(vector<Entity>::iterator i=entities.begin(); i != entities.end(); ++i) { i->update(); i->draw(); } SwapThineBuffersLestThyEntitiesBeInvisible(); } // Clean up code here. }
  10. smart_idiot

    already defined in main.obj

    Now that I added extern it works. But I dont get why? [/quote] Extern is compiler speak for 'Please just take it on faith that this variable exists and that the linker is going to tell you where at some as of yet unknown time and place.'
  11. smart_idiot

    already defined in main.obj

    Put 'extern SDL_Surface *red, *green, *blue, *shimmer;' in the header file, and put 'SDL_Surface *red, *green, *blue, *shimmer;' inside the source file.
  12. I can't see anything obviously wrong with it, other than that I don't see a #include <string> anywhere.
  13. I'm skeptical that m_Strings is of the type std::map<std::string, int>; why is the error message mentioning std::vector?
  14. smart_idiot

    Design Discussion: Perma Death

    Perma-death is fine if: You can't die due to the whims of the RNG. There should be a clear reason for your death that can be learned from and avoided in the future.Your dead characters can leave their mark on the world. You can find your deceased players in Nethack, Oregon Trail you can find their tombstones, in Dwarf Fortress you can explore and read the engravings in your fallen fortresses. It's also a sense of accomplishment, as finding these things means you've surpassed your old character.There's no PvP combat. Humans are no good dirty cheaters and must never be trusted.
  15. smart_idiot

    [.net] LuaInterface issues...

    Sorry, I don't know about LuaInterface. My best shot in the dark is that 'PersonSelectionScreen.LoadBackground(0x3FA)' should be 'PersonSelectionScreen[color="#FF0000"]:LoadBackground(0x3FA)', which is equivalent to 'PersonSelectionScreen.LoadBackground(PersonSelectionScreen, 0x3FA)'
  • 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!