// Genesaver: copyright 2003 Sam Stafford. #include <GL/glut.h> #include "globals.h" #include "Thing.h" Thing::Thing(void) { } Thing::~Thing(void) { } void Thing::RenderBy( float ax, float ay ) { bool vis = (x - ax)*(x - ax) + (y - ay)*(y - ay) <= A_V*A_V; if ( !vis && settings.drawvis ) { return; } if ( !vis ) settings.alpha = 0.2; glMatrixMode( GL_MODELVIEW ); glPushMatrix(); glTranslatef( 0, 0.5, 0 ); //move to top of screen glScalef( 0.5 / A_V, 0.5 / A_V, 0.5 / A_V ); //scale to vis range glTranslatef( -ax, -ay, 0 ); //center on target creature Render(); glPopMatrix(); settings.alpha = 1.0; return; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 4448 | Sam Stafford | Turn this thing into a Windows screensaver. | ||
#2 | 4433 | Sam Stafford |
More work on this little project. The AI is still nonexistent. |
||
#1 | 4430 | Sam Stafford |
Start importing alife/AI code from Genesaver. Much tweaking will need to be done. |
||
//guest/sam_stafford/genesaver/src/Thing.cpp | |||||
#1 | 3052 | Sam Stafford |
Add Genesaver to the Public Depot. It's not in any way Perforce-related, but it does share a bit of code with Jamgraph, and it feels strange to have an open-source project that's not in the PD. |