Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

294 Neutral

About DarkMage139

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. DarkMage139

    Choose my next read for me

    Anything by Terry Pratchett is good. Speaking of which, they're re-publishing some of his older books in a "cooler" format...
  2. DarkMage139

    Worst drink you ever had.

    I went to this one restaurant near Beverly Hills, and they had this fruity alcoholic drink... it tasted like medicine. @_@
  3. DarkMage139

    I want to see 'em sexy lines of code!

    How to make a linked list node... BOOL CLinkedListNode::Create( void* lpData, unsigned int iSize ) { // check pointer if( !lpData ) { return FALSE; } // check if there was some existing data before if( m_lpData ) { // check if there's actual memory if( m_iSize > 0 ) { free( m_lpData ); } // set the pointer to NULL m_lpData = NULL; // set size m_iSize = 0; } // copy size m_iSize = iSize; // check if it's just a pointer and not actual data if( m_iSize == 0 ) { // copy pointer m_lpData = lpData; // cool return TRUE; } // allocate memory m_lpData = malloc( m_iSize ); // check if it worked if( !m_lpData ) { return FALSE; } // copy memory CopyMemory( m_lpData, lpData, m_iSize ); return TRUE; }
  • 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!