===================================================== Liste_Funktionen_Beginn: Tex_getBitmap provide Bitmap in <tmpDir>; return filename of BitmapFile. Tex_Init__ Tex_act_upd GA_Tex__ (3) Tex_setSurfInd save & display surf-DBi & sur-dli merken Tex_addBas__ load Texture from filename + dirname Tex_addBas1 load Texture from symNam Tex_getBas__ get BasicTextureNr for Image <symNam>; else create new TexBas Tex_getBas1 get textureNr for File; else create new BasicTexture Tex_actBas_get get TexBasAct (index of active TexBas) Tex_actBas_set set TexBas-index TexBasAct Tex_addRef search if TexRef-Record exists else create new Tex_setRefInd save the active TexRef-index Tex_getRefInd returns TexRefAct Tex_savRef overwrite active TexRef-Record Tex_getRef returns TexRef-index & pointer to TexRef-Record Tex_TexRef_UpdU update the userparamters of the active texture Tex_TexRef_InitU init the userparamters of the active texture Tex_TexRef_InitS SurfData auf defaults setzen TexBas_realloc TexRef_realloc Tex_DelAll delete all OpenGL-textures Tex_dump__ dump TexBasTab and TexRefTab Liste_Funktionen_Ende: Tex_loadBas UNUSED Liste_Funktionen_Ende: ===================================================== see also: GA_Tex__ GL_Tex_Ini GL_Tex_End GRU_tex_pos* UI_Tex__
#include "MS_Def0.h"
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../gr/ut_UI.h"
#include "../xa/xa_mem.h"
#include "../xa/xa.h"
Defines | |
#define | TexBasINC 32 |
#define | TexRefINC 32 |
Functions | |
int | Tex_getBas1 (TexBas **tbAct, char *symNam) |
================================================================ | |
int | Tex_DelAll () |
================================================================ | |
int | Tex_act_upd () |
================================================================ | |
int | Tex_setSurfInd (long sur, long dli) |
================================================================ | |
int | Tex_TexRef_UpdU (TexRef *rtex) |
================================================================ | |
int | Tex_TexRef_InitU (int ii) |
================================================================ | |
int | Tex_TexRef_InitS (int ii) |
================================================================ | |
int | Tex_actSur_get () |
================================================================ | |
int | Tex_actBas_set (int ii) |
================================================================ | |
int | Tex_actBas_get () |
================================================================ | |
int | Tex_getBitmap (char *bNam, char *symNam, int overWrite) |
================================================================ | |
int | Tex_Init__ () |
================================================================ | |
int | TexRef_realloc () |
================================================================ | |
int | TexBas_realloc () |
================================================================ | |
int | Tex_addBas__ (char *fnam, char *dirNam, int keepFlag) |
================================================================ | |
int | Tex_addBas1 (char *symNam, int overWrite) |
================================================================ | |
int | Tex_getBas__ (TexBas **txb, long ind) |
================================================================ | |
int | Tex_getRef (TexRef **tex, long ind) |
================================================================ | |
int | Tex_addRef () |
================================================================ | |
int | Tex_savRef (TexRef *texr) |
================================================================ | |
int | Tex_getRefInd () |
================================================================ | |
int | Tex_setRefInd (int ind) |
================================================================ | |
int | Tex_RefTest () |
int | Tex_dump__ (FILE *fpo) |
================================================================ | |
Variables | |
AP_STAT | AP_stat |
progress of Start | |
int | TexBasNr = 0 |
int | TexBasSiz = 0 |
void * | TexTbFn = NULL |
int | TexRefNr = 0 |
static int | TexRefSiz = 0 |
static int | TexRefAct = 0 |
TexRef * | TexRefTab = NULL |
static long | actSur |
static long | actDli |
int | TexBasAct = -1 |
TexBas * | TexBasTab = NULL |
static TexBas * | actTexBas |
#define TexBasINC 32 |
#define TexRefINC 32 |
int Tex_getBas1 | ( | TexBas ** | tbAct, | |
char * | symNam | |||
) |
================================================================
================================================================ get BasicTextureNr for Image <symNam>; else create new BasicTexture get textureNr of File; else create new BasicTexture search ImageName in BasicTextureTable; sets TexBasAct = index of tbAct Input: symbolicFilename Output: tbAct Pointer into TexBasTab RetCode: -1=Error. 0=new; 1=exists.
int Tex_DelAll | ( | ) |
================================================================
================================================================ GL_Tex_DelAll delete all OpenGL-textures
int Tex_act_upd | ( | ) |
================================================================
================================================================
int Tex_setSurfInd | ( | long | sur, | |
long | dli | |||
) |
================================================================
================================================================
int Tex_TexRef_UpdU | ( | TexRef * | rtex | ) |
================================================================
================================================================ update the userparamters of the active texture
int Tex_TexRef_InitU | ( | int | ii | ) |
================================================================
================================================================ UserData auf defaults setzen
int Tex_TexRef_InitS | ( | int | ii | ) |
================================================================
================================================================ SurfData auf defaults setzen
int Tex_actSur_get | ( | ) |
================================================================
================================================================
int Tex_actBas_set | ( | int | ii | ) |
================================================================
================================================================
int Tex_actBas_get | ( | ) |
================================================================
================================================================
int Tex_getBitmap | ( | char * | bNam, | |
char * | symNam, | |||
int | overWrite | |||
) |
================================================================
================================================================ provide Bitmap in <tmpDir>; return filename of BitmapFile. test if Bitmap already exists; if not: create it. copy BMP; convert JPG.
Input: symNam symbolic-name overWrite 0=do nothing if destinationfile exists; 1 overWrite Output: bNam Bitmapfilename RetCod: 0=Ok; file created; 1=Ok; file did exist; -1=Error; cannot create BitmapFile. -2=Error; unsupported Filetyp.
int Tex_Init__ | ( | ) |
================================================================
================================================================
int TexRef_realloc | ( | ) |
================================================================
================================================================
int TexBas_realloc | ( | ) |
================================================================
================================================================
int Tex_addBas__ | ( | char * | fnam, | |
char * | dirNam, | |||
int | keepFlag | |||
) |
================================================================
================================================================ save & load Texture Input: fnam dirNam keepFlag: 0=do not keep active texture; 1=keep. RetCod: ?
int Tex_addBas1 | ( | char * | symNam, | |
int | overWrite | |||
) |
================================================================
================================================================ load Texture:
int Tex_getBas__ | ( | TexBas ** | txb, | |
long | ind | |||
) |
================================================================
================================================================ get the Bas.Texture
int Tex_getRef | ( | TexRef ** | tex, | |
long | ind | |||
) |
================================================================
================================================================
int Tex_addRef | ( | ) |
================================================================
================================================================ create new TexRef-Record RetCod = Index of TexRef-Record; is also stored as TexRefAct
int Tex_savRef | ( | TexRef * | texr | ) |
================================================================
================================================================ copy the Ref-Record texr -> Record TexRefAct
int Tex_getRefInd | ( | ) |
================================================================
================================================================ Tex_getRefInd returns TexRefAct
int Tex_setRefInd | ( | int | ind | ) |
================================================================
================================================================
int Tex_RefTest | ( | ) |
int Tex_dump__ | ( | FILE * | fpo | ) |
================================================================
================================================================ print to terminal: fpo=NULL
int TexBasNr = 0 |
int TexBasSiz = 0 |
void* TexTbFn = NULL |
int TexRefNr = 0 |
int TexRefSiz = 0 [static] |
int TexRefAct = 0 [static] |
long actSur [static] |
long actDli [static] |
int TexBasAct = -1 |