goat3dgfx

diff src/texgen.cc @ 15:7d6b667821cf

wrapped everything in the goatgfx namespace
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 30 Nov 2013 20:52:21 +0200
parents 1873dfd13f2d
children
line diff
     1.1 --- a/src/texgen.cc	Sat Nov 30 15:15:34 2013 +0200
     1.2 +++ b/src/texgen.cc	Sat Nov 30 20:52:21 2013 +0200
     1.3 @@ -1,8 +1,10 @@
     1.4  #include "texgen.h"
     1.5  
     1.6 +using namespace goatgfx;
     1.7 +
     1.8  static void intcolor(const Vector4 &color, int *icol);
     1.9  
    1.10 -Image *texgen_solid(int xsz, int ysz, const Vector4 &color)
    1.11 +Image *goatgfx::texgen_solid(int xsz, int ysz, const Vector4 &color)
    1.12  {
    1.13  	Image *img = new Image;
    1.14  	if(!img->create(xsz, ysz, Image::FMT_RGBA)) {
    1.15 @@ -23,7 +25,7 @@
    1.16  	return img;
    1.17  }
    1.18  
    1.19 -Image *texgen_chess(int xsz, int ysz, int usub, int vsub, const Vector4 &col1, const Vector4 &col2)
    1.20 +Image *goatgfx::texgen_chess(int xsz, int ysz, int usub, int vsub, const Vector4 &col1, const Vector4 &col2)
    1.21  {
    1.22  	Image *img = new Image;
    1.23  	if(!img->create(xsz, ysz, Image::FMT_RGBA)) {
    1.24 @@ -58,7 +60,7 @@
    1.25  }
    1.26  
    1.27  
    1.28 -Image *texgen(int xsz, int ysz, float usize, float vsize, Vector4 (*eval)(float, float, void*), void *cls)
    1.29 +Image *goatgfx::texgen(int xsz, int ysz, float usize, float vsize, Vector4 (*eval)(float, float, void*), void *cls)
    1.30  {
    1.31  	Image *img = new Image;
    1.32  	if(!img->create(xsz, ysz, Image::FMT_RGBA)) {
    1.33 @@ -109,7 +111,7 @@
    1.34  }
    1.35  
    1.36  
    1.37 -Image *texgen_fbm(int xsz, int ysz, float usize, float vsize, int octaves, const Vector4 &col1, const Vector4 &col2)
    1.38 +Image *goatgfx::texgen_fbm(int xsz, int ysz, float usize, float vsize, int octaves, const Vector4 &col1, const Vector4 &col2)
    1.39  {
    1.40  	NoiseArg arg = {octaves, col1, col2};
    1.41  	if(arg.octaves < 1) {
    1.42 @@ -119,7 +121,7 @@
    1.43  	return texgen(xsz, ysz, usize, vsize, fbm_eval, &arg);
    1.44  }
    1.45  
    1.46 -Image *texgen_fbm_abs(int xsz, int ysz, float usize, float vsize, int octaves, const Vector4 &col1, const Vector4 &col2)
    1.47 +Image *goatgfx::texgen_fbm_abs(int xsz, int ysz, float usize, float vsize, int octaves, const Vector4 &col1, const Vector4 &col2)
    1.48  {
    1.49  	NoiseArg arg = {octaves, col1, col2};
    1.50  	if(arg.octaves < 1) {