Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "endianness.h"
#include <float.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "vsfilesystem.h"
#include "vsimage.h"
#include "aux_texture.h"
#include "gldrv/sdds.h"
Go to the source code of this file.
Classes | |
struct | CubeCoord |
struct | Texmp |
Functions | |
static void | gluSphereMap (CubeCoord &Tex, Vector Normal, float Theta) |
static void | TexMap (CubeCoord &Tex, Vector Normal) |
static bool | LoadTex (char *FileName, unsigned char scdata[lmwid][lmwid][3]) |
static char * | makebgname (char *tmp, size_t size, const char *InputName, const char *add, const char *suffix) |
static void | Spherize (CubeCoord Tex[lmwid][lmwid], CubeCoord gluSph[lmwid][lmwid], unsigned char Col[]) |
static void | GenerateSphereMap () |
void | EnvironmentMapGeneratorMain (const char *inpt, const char *outpt, float a, float m, float p, bool w) |
Variables | |
static char * | InputName = NULL |
static char * | OutputName = NULL |
static bool | pushdown = false |
static float | affine = 0 |
static float | multiplicitive = 1 |
static float | power = 1 |
const int | lmwid = 512 |
const int | lmwido2 = lmwid/2 |
const float | ooWIDTHo2 = 2./lmwid |
const float | PIoWIDTHo2 = 2*3.1415926535/lmwid |
const char | bytepp = 3 |
void EnvironmentMapGeneratorMain | ( | const char * | inpt, |
const char * | outpt, | ||
float | a, | ||
float | m, | ||
float | p, | ||
bool | w | ||
) |
Definition at line 458 of file env_map_gent.cpp.
References a, affine, VSFileSystem::VSFile::Close(), f, GenerateSphereMap(), InputName, multiplicitive, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), OutputName, power, pushdown, VSFileSystem::sharedtextures, size, VSFileSystem::TextureFile, and VSFileSystem::vs_fprintf().
Referenced by GameStarSystem::createBackground().
|
static |
Definition at line 400 of file env_map_gent.cpp.
References gluSphereMap(), lmwid, OutputName, PngImage, Spherize(), UniverseUtil::sqrt(), TexMap(), VSFileSystem::TextureFile, and Vector.
Referenced by EnvironmentMapGeneratorMain().
Definition at line 108 of file env_map_gent.cpp.
References int, lmwid, lmwido2, pushdown, CubeCoord::s, CubeCoord::t, CubeCoord::TexMap, and vert.
Referenced by GenerateSphereMap().
|
static |
Definition at line 183 of file env_map_gent.cpp.
References buffer, ddsDecompress(), DXT1, f, i, j, lmwid, VSFileSystem::Ok, PNG_HAS_ALPHA, PNG_HAS_COLOR, texTransform, and VSFileSystem::TextureFile.
Referenced by Spherize().
|
static |
Definition at line 270 of file env_map_gent.cpp.
References InputName, and size.
Referenced by Spherize().
|
static |
Definition at line 287 of file env_map_gent.cpp.
References affine, b, bytepp, Texmp::D, g, InputName, int, lmwid, LoadTex(), VSFileSystem::LookForFile(), makebgname(), multiplicitive, VSFileSystem::Ok, power, and VSFileSystem::TextureFile.
Referenced by GenerateSphereMap().
find coordinates on this tex map 'box in space'
Definition at line 121 of file env_map_gent.cpp.
References i, lmwido2, CubeCoord::s, CubeCoord::t, and CubeCoord::TexMap.
Referenced by GenerateSphereMap().
|
static |
Definition at line 28 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), and Spherize().
const char bytepp = 3 |
Definition at line 98 of file env_map_gent.cpp.
Referenced by Spherize().
|
static |
Definition at line 25 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), makebgname(), and Spherize().
const int lmwid = 512 |
Definition at line 94 of file env_map_gent.cpp.
Referenced by GenerateSphereMap(), gluSphereMap(), LoadTex(), and Spherize().
Definition at line 95 of file env_map_gent.cpp.
Referenced by gluSphereMap(), and TexMap().
|
static |
Definition at line 29 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), and Spherize().
Definition at line 96 of file env_map_gent.cpp.
|
static |
Definition at line 26 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), and GenerateSphereMap().
Definition at line 97 of file env_map_gent.cpp.
|
static |
Definition at line 30 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), GFXSelectMaterial(), GFXSelectMaterialAlpha(), GFXSelectMaterialHighlights(), Mesh::LoadMeshes(), and Spherize().
|
static |
Definition at line 27 of file env_map_gent.cpp.
Referenced by EnvironmentMapGeneratorMain(), and gluSphereMap().