Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

133 Neutral

About DaDweeDow

  • Rank
  1.     I don't see this anywhere in the VS 2012 EULA.  Most restrictive thing I see on there is that you can only distribute programs for use windows, but since it won't compile anything for another operating system that seems a tad moot.    The license is available in the "licenses" folder in the main install directory.     Also, for games on windows right now I'd recommend directx for basically everything, since that's the only thing that is clearly going to be around for a while at this point.  As for books, you might want to get one that covers C++11, since that adds a ton of new features, but I don't have any recomendations for that since all my books are old.  Microsoft's compiler is dragging its feet a little bit on some of the c++11 stuff, but other than that it should be fine.    
  2. DaDweeDow

    Recommend: Assembly Book

    I went through an online mips course a while ago, there is an emulator program that runs on pc which makes it makes it really simple to try out your programs.  It's at http://chortle.ccsu.edu/assemblytutorial/index.html, it just took a while to load.     Anyway, as far as how C++ goes into assembly, it's really not any different per se than how C goes into assembly, as most of the features could be implemented as a preprocessor for C (which is how it got started i believe) though implementing exceptions via longjumps would not be pretty.  And I think after most assembler tutorials you'd probably be of the opinion that the hardest part of a C compiler to write would be the parser, since C syntax is a bit icky and context dependant in some places, and C++ syntax is much more complicated than that.   The x86 instruction set is available from intel http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html.      Also, the actual code produced by a specific compiler doesn't always look like the code that would be produced by a straight forward compiler, optimization is something that is entirely compiler dependent.  Knowing how a particular compiler generates assembly is the type of knowledge that could get you into some trouble if you write code that relies on it, but I know gcc at least has a switch for outputting the assembler code from C++, "-S" (case sensitive).
  3. I know in gcc (mingw anyway) adding the move constructor deletes the copy constructor, so you have to explicitly set the copy constructor to default.  I.e., in the class definition in the header, add something like: Matrix<DATA_TYPE,INT_TYPE,DATA_CONTAINER>::Matrix(Matrix<DATA_TYPE,INT_TYPE,DATA_CONTAINER> const &) = default;   And that's with the -std=c++11 flag.  And, also just throwing this out in case it helps, gcc will tend to bug out when you use classes defined within a function and try to use that with a standard template or a standard algorithm, even though msvc will compile that stuff fine.     Haven't really gone through this code too thoroughly, just throwing out ideas.   
  4.   Ah ok, must have just assumed it wasn't in there then, as I do seem to have it on the hard drive, and I wouldn't have bothered installing it explicitly.
  5. I just did this a couple weeks ago, switched IDE's later but it was working fine.  I just installed the directx sdk and started a win32 project, i think i may have allowed it to autogenerate some of the windows start up code, but the process wasn't too different from starting an empty project.  Just add in the directx libs, lib directory, and include directory in the solution properties and you are all set to go.  I think the moving of directx into the standard sdk is only true of the sdk for windows 8, which I couldn't use anyway since I don't have windows 8.  
  6. DaDweeDow

    OpenGL with SDL doesn't show anything

    SDL_Flip() is the wrong function, SDL_GL_SwapBuffers() or something is necessary for opengl, flip is for the SDL drawing.   edit: And I think those vertexes are going to be in the next county with those matrices loaded, but I think they will cover the screen.     edit: also not sure the backbuffer is guaranteed to work that way in OpenGL, where repeated calls to flip without drawing will maintain the image.  I would just draw it once with an SDL_Delay(2000); or something just to see if it's working.  and while I'm at it:   glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); make the glOrtho call essentially a no op, since you LoadIdentity afterwards.   glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(.......);   is basically the way you always do it.  
  7. DaDweeDow

    Console Game Problem

    this is totally it, I just swapped them in the isValidLevelMove and it worked fine.       bool DrawEngine::isValidLevelMove(int x, int y) {     using namespace std;     ofstream fout("Test.txt", ios_base::out | ios_base::app);     fout << boolalpha;     if (map[y][x] != OBSAD)     {         fout << map[y][x] << true << endl;         return true;     }     fout << map[y][x] << false << endl;     return false; }   Also, for what it's worth, i'm pretty positive the nethack source is available, though I have a feeling it's fairly complicated for what it is.  Anyhow, good luck and have fun.  
  8. DaDweeDow

    std::vector issues

    yeah that's a no op assignment.  So node1 = node2 doesn't do anything.  Not sure a memcpy(this, &copy, sizeof(Node)) is legal, probably better to just assign all the fields.  You don't need a deep copy though, at least not for this purpose, you could just copy the pointers, since the old copy is going to be dead in a nanosecond.     Edit: whoops, I realized that was bad advice.  If the destructor of frees an allocated resource, you are going to be dereferencing an invalid pointer (probably, unless that memory gets reused) when you later try to use the copy.  Sorry about that, hope it didn't cause any problems.  
  9. DaDweeDow

    std::vector issues

    Is there a copy constructor on the Nodes?  Not sure what would cause this but that's the only thing I can think of, everything else looks pretty typical.     Edit: Check assignment constructor also.  Failing that you could just break on it in the debugger and just keep clicking "step into" through all the compiler mumbo jumbo to see if anything comes up.     Edit #2 (for reals this time) : It's an assignment operator, not a constructor.   I think that's what's broken, there's a typo in there that's keeping stuff from getting moved over.  vector.erase(iter) moves everything after iter over, and iter is basically just a pointer.  If this is no good, you can use a vector of pointers to Nodes, or a std::list of nodes (I'm not sure that's guaranteed not to copy on erase, but I have never seen it do it).  
  • 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!