// Genesaver: copyright 2003 Sam Stafford. #include <GL/glut.h> #include "globals.h" #include "Thing.h" #include "Plant.h" Plant::Plant(void) { prev = NULL; next = NULL; energy = P_E; } Plant::~Plant(void) { } void Plant::Render() { SetColor( P_C ); glBegin( GL_POLYGON ); glVertex2f( x + P_R, y + P_R * 0.5 ); glVertex2f( x + P_R, y - P_R * 0.5 ); glVertex2f( x + P_R * 0.5, y - P_R ); glVertex2f( x - P_R * 0.5, y - P_R ); glVertex2f( x - P_R, y - P_R * 0.5 ); glVertex2f( x - P_R, y + P_R * 0.5 ); glVertex2f( x - P_R * 0.5, y + P_R ); glVertex2f( x + P_R * 0.5, y + P_R ); glEnd(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 28901 | marc_tooley | "" | ||
#2 | 4902 | marc |
Working Genesaver under NetBSD.. . Fixed all default-level compiler warnings such as: .. Missing newline at end of files; .. Eliminating NULLs in non-pointer comparisons; .. Fixing all case inconsistencies; .. Added appropriate includes for math-functions under NetBSD; .. Added missing extern World *world pointers; .. #ifdef'd redefinition of NULL .. Deleted :) unnecessary sln/vcproj/scc clutter (shh don't tell Sam) . Submitting advanced long-ish term creature DNA as a cheat for the impatient. (Move Genes.txt out of the way to see them evolve right from the start.) . Added Jamfile for building an in-place executable called 'gene' . Added a build.sh script for users who don't have access to Jam. . Made it into standard resizeable window operation (no fullsc) . Removed winmain.cpp because we don't need it for UNIX! :) |
||
#1 | 4899 | marc |
branch from Stafford's genesaver Intent is to get it working under NetBSD, my (current) favourite OS. |
||
//guest/sam_stafford/genesaver/src/Plant.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. |