00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019
00020
00021 00022 00023 00024 00025 00026 00027 00028 00029
00030 #ifndef __TEXTURE_DEFINITION_H
00031 #define __TEXTURE_DEFINITION_H
00032
00033 #include <rvtypes.h>
00034 #include "parser.h"
00035
00036
00037 #define TEX_UNKNOWN -10
00038
00039
00041
00045 class TextureDefinition
00046 {
00047 public:
00049 TextureDefinition();
00050 TextureDefinition(rvshort _tex, rvfloat _x0,rvfloat _x1,rvfloat _y0,rvfloat _y1);
00051
00052
00065 bool parseTexSpec(const char *str, TextureDefinition *def, Parser &, bool allow_asterisk);
00066
00072 bool uv_in_def(rvshort sheet, RV_UV *uv);
00073
00077 void rotateRight();
00078
00080 void printtex(FILE *);
00081
00082
00083 rvfloat x0,x1,y0,y1;
00084
00086 rvshort tex;
00087
00088
00089 private:
00090 bool parseTexLetter(char *buf, Parser &, bool allow_asterisk);
00091 bool parseSingleNum(char *buf, int *num, Parser &);
00092 bool parseNumPair(char *obuf, char sepch, int *i1, int *i2, const char *pairname, Parser &);
00093 };
00094
00095
00100 extern TextureDefinition default_src_texdef;
00101
00102
00103
00104 #endif