Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : "Simple" guide to the DROD Source Code ((not a substitute for real programming experience. You have been warned))
New Topic New Poll Post Reply
Poster Message
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon "Simple" guide to the DROD Source Code (+3)  
I've decided that to increase the people poking around in the DROD source code (which I personally believe may lead only to good things), I have decided to create a guide to all the source files in the DROD source code. This is merely a guide that tells perspective programmers where to find code X. It does not at all substitute for the ability to code, and I will assume you understand basic project layout and programming design. (such as what .cpp and .h files are)

Okay, so first you'll notice that there are 4 source folders: FrontEndLib, DROD, DRODLib, and BackEndLib.

BackEndLib contains parts of DROD that interface with lower-level components of the operating system, or else very basic, fundamental code.
* Assert.* contains the declarations for the never-disable debugging assertions common through DROD. AssertErr in particular is a spectacular point to put a breakpoint.
* AttachableObject.* provides the basis for a generic object when you need to attach any type of object (think Boost.Any). There is also a CRTP wrapper. You see this a lot in the cue events system.
* Base64.* is base 64 encoding/decoding.
* Browser.* contains the code to open an external browser application (not the Deadly Browser of Death)
* CharTraits.h is a GCC-only header which provides some useful character operations.
* Clipboard.* contains clipboard operations (copying and pasting)
* Coord.h is the mandatory coordinate class.
* CoordIndex.h has a quick lookup system for coordinates (to check whether a coordinate is in a specific set)
* CoordSet.h has a more generic coordinate set based on std::set.
* CoordStack.h has a coordinate stack/queue, for iteration.
* Date.* has code for date and time
* Dyn.* is very complex, obtuse Unix code for dynamic library loading and interfacing with graphics functions.
* Exception.h is the base exception class (yes, it does use std::exception)
* Files.* is the filesystem interface.
* GameStream.* is a Metakit stream for Unicode filenames.
* Heap.h contains heap checks for debugging on Windows.
* IDList.* provides a method of keeping track of primary IDs for database use.
* IDSet.h is a set for IDs.
* IniFile.* is the configuration interface.
* Internet.* is the internet code. This is present even in the source distribution; the code regarding what information to send/receive to CaravelNet is not present, however (and reverse-engineering it violates your EULA, just so you know).
* MessageIDs.* contains all the languages DROD can theoretically support - that's far too many.
* PortsBase.h contains some important platform-specific stuff.
* Ports.* contains platform-specific functions
* StretchyBuffer.* contains a resizable data buffer class.
* SysTimer.* provides a method of accessing the system's clock to determine how time is passing.
* Types.h is a lot of useful typedefs.
* UtilFuncs.h is.... utility functions!
* Wchar.* is the wide character file, containing functions and declarations that give DROD portable Unicode.

Ooof... that's a lot. I'll go over the other folders later.

[Last edited by coppro at 07-01-2008 07:28 PM]
07-01-2008 at 05:34 AM
View Profile Show all user's posts Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1300
Registered: 06-14-2005
IP: Logged
icon Re: Simple guide to the DROD Source Code (0)  
coppro wrote:
Ooof... that's a lot. I'll go over the other folders later.
Pfft.

[Last edited by Someone Else at 07-01-2008 05:13 PM]
07-01-2008 at 05:13 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
halyavin
Level: Delver
Rank Points: 52
Registered: 02-20-2006
IP: Logged
icon Re: Simple guide to the DROD Source Code (-1)  
I have decided to create a guide to all the source files in the DROD source code.
I think that making DROD source really portable is at least equally important. Currently, you can't use MinGW compiler and a lot of ide's in Windows based on it (MinGW Studio, Code Blocks, Eclipse CDT). In reality, C++ is not as portable as its fans like to brag.

Thanks for the info anyway.
07-01-2008 at 05:41 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Simple guide to the DROD Source Code (0)  
I've done it in MinGW and so have others; there's just some hoops you have to go through. Andy101 has a nice guide here. (it might be a tad out of date, but most of the advice is still good). The {{'e'},{'r'},{'r'},{'o'},{'r'}} has been fixed in a number of places, so it's pretty rare if at all present in the current code. There's only one other portability issue with the code, the rest is all about using the correct libraries.
07-01-2008 at 07:27 PM
View Profile Show all user's posts Quote Reply
halyavin
Level: Delver
Rank Points: 52
Registered: 02-20-2006
IP: Logged
icon Re: Simple guide to the DROD Source Code (0)  
coppro wrote:
I've done it in MinGW and so have others; there's just some hoops you have to go through. Andy101 has a nice guide here. (it might be a tad out of date, but most of the advice is still good). The {{'e'},{'r'},{'r'},{'o'},{'r'}} has been fixed in a number of places, so it's pretty rare if at all present in the current code. There's only one other portability issue with the code, the rest is all about using the correct libraries.
I used the latest versions and faced a lot of very strange problems (further to mentioned in that post) with include files (problem with POINT structure and the same-named define statement and winsock includes when using curl). I would understand if an interface of the library has changed, but compile errors are much worse (in the end I gave up to find their source and erased the project). May be I will try again with versions in that post one day.
07-02-2008 at 08:57 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : "Simple" guide to the DROD Source Code ((not a substitute for real programming experience. You have been warned))
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.