Commits

Anonymous committed 1e3be93

Loading of emitters from external files.

  • Participants
  • Parent commits 965c37c

Comments (0)

Files changed (5)

File Terrain/Main.cpp

 
 TODO:
 
-x Fix canopy trees
-x Fix UV mapping on trees.
-x Clouds
 * More biomes
 x World saving
-* Undergrowth
-x Terrains eat less CPU cycles per frame
-x Grass rotate
-x Fix avatar rendering
+x Undergrowth
 ? Fix opaque trees on mike's PC
 * shadows
 * Collision
 * Particles
+* Weather
+
+http://awesomium.com/
 
 http://www.bramstein.com/projects/gui/
 
   GameInit ();
   PlayerInit ();
   AvatarInit ();
+  ParticleInit ();
   TextureInit ();
   WorldInit ();
   SceneInit ();

File Terrain/Texture.cpp

                            t e x t u r e   i d
 -----------------------------------------------------------------------------*/
 
-static GLtexture* LoadTexture (char* name)
+static GLtexture* LoadTexture (const char* name)
 {
 
   GLtexture*        t;
 
 }
 
-GLtexture* TextureFromName (char* name)
+GLtexture* TextureFromName (const char* name)
 {
 
   GLtexture*       t;
 
 }
 
-unsigned TextureIdFromName (char* name)
+unsigned TextureIdFromName (const char* name)
 {
 
   GLtexture*       t;

File Terrain/Texture.h

   short             bpp;//bytes per pixel
 };
 
-unsigned    TextureIdFromName (char* name);
-GLtexture*  TextureFromName (char* name);
+unsigned    TextureIdFromName (const char* name);
+GLtexture*  TextureFromName (const char* name);
 byte*       TextureRaw (char* name, int* width, int* height);
 void        TextureInit (void);
 void        TextureTerm (void);

File Terrain/glTypes.h

   OPERATORS(GLvector);
 };
 
+std::ostream &operator<<(std::ostream &stream, GLvector &point);
+std::istream &operator>>(std::istream &stream, GLvector &point);
+
 typedef GLvector       GLvector3;
 
 struct GLvector2

File Terrain/glVector3.cpp

   z *= norm;
 
 }
+
+std::ostream &operator<<(std::ostream &stream, GLvector &v)
+{
+  stream << "[ " << v.x << ",  " << v.y << ",  " << v.z << " ]";
+  return stream;
+}
+
+/**
+ * Overloaded stream in for Point3D. Converts it from a string
+ */
+std::istream &operator>>(std::istream &stream, GLvector &v)
+{
+    char str[NAME_MAX] = {0};
+    stream.readsome( str, NAME_MAX );
+    sscanf( str, "[ %f, %f, %f ]", &v.x, &v.y, &v.z );
+
+    return stream;
+}