The source code for
DROD: Architects' Edition is on
Krugle, a new search engine for programmers that is in late beta. I've got access to it through beta now, but later on it will be open to everybody.
So if you wanted to know, for example, what objects Evil Eyes in DROD can't see through, you could go to Krugle and search for "
Evil Eyes"
and find pretty quickly:
Click here to view the secret text
×
//*****************************************************************************************
void CEvilEye:: Process(
//Process an Evil Eye for movement.
//
//Params:
const int /*nLastCommand*/, //(in) Last swordsman command.
CCueEvents &CueEvents) //(in/out) Accepts pointer to an IDList object that will be populated
//with codes indicating events that happened that may correspond to
//sound or graphical effects.
{
if (!this->isActive && CanFindSwordsman()) {
//Check whether evil eye sees player and wakes up.
const int dx = nGetOX(this->wO);
const int dy = nGetOY(this->wO);
UINT cx = this->wX, cy = this->wY;
bool done = false;
while (!done)
{
cx += dx;
cy += dy;
if (cx == this->pCurrentGame->swordsman.wX &&
cy == this->pCurrentGame->swordsman.wY)
{
this->isActive = true;
CueEvents.Add(CID_EvilEyeWoke, this);
break;
}
if (cx >= this->pCurrentGame->pRoom->wRoomCols ||
cy >= this->pCurrentGame->pRoom->wRoomRows)
break;
switch (this->pCurrentGame->pRoom->GetOSquare(cx, cy)) {
case T_FLOOR:
case T_CHECKPOINT:
case T_PIT:
case T_DOOR_YO:
case T_TRAPDOOR:
if (this->pCurrentGame->pRoom->GetTSquare(cx,cy) != T_ORB)
break;
default:
done = true;
}
}
}
if (!this->isActive)
return;
//Get movement offsets.
int dxFirst, dyFirst, dx, dy;
if (!GetDirectMovement(dxFirst, dyFirst, dx, dy))
return;
//Move evil eye to new destination square.
MakeStandardMove(CueEvents,dx,dy);
SetOrientation(dxFirst, dyFirst);
}
...and you could find that anyhow by just grabbing the source code off SourceForge, but it will be a fair amount easier to search for stuff with Krugle. It also seems likely that more lazy coders will grab up snippets of our code and use it without proper credit and licensing, but... oh well. The source code was found on SourceForge by Krugle. I didn't do anything to add it.
Krugle, by the way, works really well and will be fantastic for finding code to use on programming projects.
-Erik
____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals |
twitch stream |
youtube archive (NSFW)
[Last edited by mrimer at 06-13-2006 04:12 AM : Krugle spelling]