if (musictoggle)
emit_stream_np(stream_menutheme);
- cursortexture.load(":Data:Textures:Cursor.png", 0, 1);
+ cursortexture.load(":Data:Textures:Cursor.png", 0);
- Mapcircletexture.load(":Data:Textures:MapCircle.png", 0, 1);
- Mapboxtexture.load(":Data:Textures:MapBox.png", 0, 1);
- Maparrowtexture.load(":Data:Textures:MapArrow.png", 0, 1);
+ Mapcircletexture.load(":Data:Textures:MapCircle.png", 0);
+ Mapboxtexture.load(":Data:Textures:MapBox.png", 0);
+ Maparrowtexture.load(":Data:Textures:MapArrow.png", 0);
temptexdetail = texdetail;
if (texdetail > 2)
texdetail = 2;
- Mainmenuitems[0].load(":Data:Textures:Lugaru.png", 0, 0);
- Mainmenuitems[1].load(":Data:Textures:Newgame.png", 0, 0);
- Mainmenuitems[2].load(":Data:Textures:Options.png", 0, 0);
- Mainmenuitems[3].load(":Data:Textures:Quit.png", 0, 0);
- Mainmenuitems[4].load(":Data:Textures:Eyelid.png", 0, 1);
- Mainmenuitems[5].load(":Data:Textures:Resume.png", 0, 0);
- Mainmenuitems[6].load(":Data:Textures:Endgame.png", 0, 0);
-
- //LoadTexture(":Data:Textures:Eye.jpg",&Mainmenuitems[5],0,1);
- //~ LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0); // LoadCampaign will take care of that
+ Mainmenuitems[0].load(":Data:Textures:Lugaru.png", 0);
+ Mainmenuitems[1].load(":Data:Textures:Newgame.png", 0);
+ Mainmenuitems[2].load(":Data:Textures:Options.png", 0);
+ Mainmenuitems[3].load(":Data:Textures:Quit.png", 0);
+ Mainmenuitems[4].load(":Data:Textures:Eyelid.png", 0);
+ Mainmenuitems[5].load(":Data:Textures:Resume.png", 0);
+ Mainmenuitems[6].load(":Data:Textures:Endgame.png", 0);
+
texdetail = temptexdetail;
FadeLoadingScreen(95);
i = abs(Random() % 4);
visibleloading = 0; //don't use loadscreentexture yet
- loadscreentexture.load(":Data:Textures:fire.jpg", 1, 0);
+ loadscreentexture.load(":Data:Textures:fire.jpg", 1);
visibleloading = 1;
temptexdetail = texdetail;
LOG("Loading weapon data...");
- Weapon::knifetextureptr.load(":Data:Textures:knife.png", 0, 1);
- Weapon::bloodknifetextureptr.load(":Data:Textures:bloodknife.png", 0, 1);
- Weapon::lightbloodknifetextureptr.load(":Data:Textures:lightbloodknife.png", 0, 1);
- Weapon::swordtextureptr.load(":Data:Textures:sword.jpg", 1, 0);
- Weapon::bloodswordtextureptr.load(":Data:Textures:Swordblood.jpg", 1, 0);
- Weapon::lightbloodswordtextureptr.load(":Data:Textures:Swordbloodlight.jpg", 1, 0);
- Weapon::stafftextureptr.load(":Data:Textures:Staff.jpg", 1, 0);
+ Weapon::knifetextureptr.load(":Data:Textures:knife.png", 0);
+ Weapon::bloodknifetextureptr.load(":Data:Textures:bloodknife.png", 0);
+ Weapon::lightbloodknifetextureptr.load(":Data:Textures:lightbloodknife.png", 0);
+ Weapon::swordtextureptr.load(":Data:Textures:sword.jpg", 1);
+ Weapon::bloodswordtextureptr.load(":Data:Textures:Swordblood.jpg", 1);
+ Weapon::lightbloodswordtextureptr.load(":Data:Textures:Swordbloodlight.jpg", 1);
+ Weapon::stafftextureptr.load(":Data:Textures:Staff.jpg", 1);
Weapon::throwingknifemodel.load((char *)":Data:Models:throwingknife.solid", 1);
Weapon::throwingknifemodel.Scale(.001, .001, .001);
Weapon::staffmodel.flat = 1;
Weapon::staffmodel.CalculateNormals(1);
- terrain.shadowtexture.load(":Data:Textures:shadow.png", 0, 1);
- terrain.bloodtexture.load(":Data:Textures:blood.png", 0, 1);
- terrain.breaktexture.load(":Data:Textures:break.png", 0, 1);
- terrain.bloodtexture2.load(":Data:Textures:blood.png", 0, 1);
+ terrain.shadowtexture.load(":Data:Textures:shadow.png", 0);
+ terrain.bloodtexture.load(":Data:Textures:blood.png", 0);
+ terrain.breaktexture.load(":Data:Textures:break.png", 0);
+ terrain.bloodtexture2.load(":Data:Textures:blood.png", 0);
- terrain.footprinttexture.load(":Data:Textures:footprint.png", 0, 1);
- terrain.bodyprinttexture.load(":Data:Textures:bodyprint.png", 0, 1);
- hawktexture.load(":Data:Textures:hawk.png", 0, 1);
+ terrain.footprinttexture.load(":Data:Textures:footprint.png", 0);
+ terrain.bodyprinttexture.load(":Data:Textures:bodyprint.png", 0);
+ hawktexture.load(":Data:Textures:hawk.png", 0);
- Sprite::cloudtexture.load(":Data:Textures:cloud.png", 1, 1);
- Sprite::cloudimpacttexture.load(":Data:Textures:cloudimpact.png", 1, 1);
- Sprite::bloodtexture.load(":Data:Textures:bloodparticle.png", 1, 1);
- Sprite::snowflaketexture.load(":Data:Textures:snowflake.png", 1, 1);
- Sprite::flametexture.load(":Data:Textures:flame.png", 1, 1);
- Sprite::bloodflametexture.load(":Data:Textures:bloodflame.png", 1, 1);
- Sprite::smoketexture.load(":Data:Textures:smoke.png", 1, 1);
- Sprite::shinetexture.load(":Data:Textures:shine.png", 1, 0);
- Sprite::splintertexture.load(":Data:Textures:splinter.png", 1, 1);
- Sprite::leaftexture.load(":Data:Textures:leaf.png", 1, 1);
- Sprite::toothtexture.load(":Data:Textures:tooth.png", 1, 1);
+ Sprite::cloudtexture.load(":Data:Textures:cloud.png", 1);
+ Sprite::cloudimpacttexture.load(":Data:Textures:cloudimpact.png", 1);
+ Sprite::bloodtexture.load(":Data:Textures:bloodparticle.png", 1);
+ Sprite::snowflaketexture.load(":Data:Textures:snowflake.png", 1);
+ Sprite::flametexture.load(":Data:Textures:flame.png", 1);
+ Sprite::bloodflametexture.load(":Data:Textures:bloodflame.png", 1);
+ Sprite::smoketexture.load(":Data:Textures:smoke.png", 1);
+ Sprite::shinetexture.load(":Data:Textures:shine.png", 1);
+ Sprite::splintertexture.load(":Data:Textures:splinter.png", 1);
+ Sprite::leaftexture.load(":Data:Textures:leaf.png", 1);
+ Sprite::toothtexture.load(":Data:Textures:tooth.png", 1);
yaw = 0;
pitch = 0;
if (ambientsound)
emit_stream_np(stream_wind);
- objects.treetextureptr.load(":Data:Textures:snowtree.png", 0, 1);
- objects.bushtextureptr.load(":Data:Textures:bushsnow.png", 0, 1);
- objects.rocktextureptr.load(":Data:Textures:bouldersnow.jpg", 1, 0);
- objects.boxtextureptr.load(":Data:Textures:snowbox.jpg", 1, 0);
+ objects.treetextureptr.load(":Data:Textures:snowtree.png", 0);
+ objects.bushtextureptr.load(":Data:Textures:bushsnow.png", 0);
+ objects.rocktextureptr.load(":Data:Textures:bouldersnow.jpg", 1);
+ objects.boxtextureptr.load(":Data:Textures:snowbox.jpg", 1);
footstepsound = footstepsn1;
footstepsound2 = footstepsn2;
footstepsound3 = footstepst1;
footstepsound4 = footstepst2;
- terraintexture.load(":Data:Textures:snow.jpg", 1, 0);
- terraintexture2.load(":Data:Textures:rock.jpg", 1, 0);
+ terraintexture.load(":Data:Textures:snow.jpg", 1);
+ terraintexture2.load(":Data:Textures:rock.jpg", 1);
temptexdetail = texdetail;
} else if (environment == desertenvironment) {
windvector = 0;
windvector.z = 2;
- objects.treetextureptr.load(":Data:Textures:deserttree.png", 0, 1);
- objects.bushtextureptr.load(":Data:Textures:bushdesert.png", 0, 1);
- objects.rocktextureptr.load(":Data:Textures:boulderdesert.jpg", 1, 0);
- objects.boxtextureptr.load(":Data:Textures:desertbox.jpg", 1, 0);
+ objects.treetextureptr.load(":Data:Textures:deserttree.png", 0);
+ objects.bushtextureptr.load(":Data:Textures:bushdesert.png", 0);
+ objects.rocktextureptr.load(":Data:Textures:boulderdesert.jpg", 1);
+ objects.boxtextureptr.load(":Data:Textures:desertbox.jpg", 1);
if (ambientsound)
footstepsound3 = footstepsn1;
footstepsound4 = footstepsn2;
- terraintexture.load(":Data:Textures:sand.jpg", 1, 0);
- terraintexture2.load(":Data:Textures:sandslope.jpg", 1, 0);
+ terraintexture.load(":Data:Textures:sand.jpg", 1);
+ terraintexture2.load(":Data:Textures:sandslope.jpg", 1);
temptexdetail = texdetail;
} else if (environment == grassyenvironment) {
windvector = 0;
windvector.z = 2;
- objects.treetextureptr.load(":Data:Textures:tree.png", 0, 1);
- objects.bushtextureptr.load(":Data:Textures:bush.png", 0, 1);
- objects.rocktextureptr.load(":Data:Textures:boulder.jpg", 1, 0);
- objects.boxtextureptr.load(":Data:Textures:grassbox.jpg", 1, 0);
+ objects.treetextureptr.load(":Data:Textures:tree.png", 0);
+ objects.bushtextureptr.load(":Data:Textures:bush.png", 0);
+ objects.rocktextureptr.load(":Data:Textures:boulder.jpg", 1);
+ objects.boxtextureptr.load(":Data:Textures:grassbox.jpg", 1);
if (ambientsound)
emit_stream_np(stream_wind, 100.);
footstepsound3 = footstepst1;
footstepsound4 = footstepst2;
- terraintexture.load(":Data:Textures:grassdirt.jpg", 1, 0);
- terraintexture2.load(":Data:Textures:mossrock.jpg", 1, 0);
+ terraintexture.load(":Data:Textures:grassdirt.jpg", 1);
+ terraintexture2.load(":Data:Textures:mossrock.jpg", 1);
temptexdetail = texdetail;
ifstream test(ConvertFileName((":Data:Textures:" + accountactive->getCurrentCampaign() + ":World.png").c_str()));
if (test.good()) {
- Mainmenuitems[7].load((":Data:Textures:" + accountactive->getCurrentCampaign() + ":World.png").c_str(), 0, 0);
+ Mainmenuitems[7].load((":Data:Textures:" + accountactive->getCurrentCampaign() + ":World.png").c_str(), 0);
} else {
- Mainmenuitems[7].load(":Data:Textures:World.png", 0, 0);
+ Mainmenuitems[7].load(":Data:Textures:World.png", 0);
}
if (accountactive->getCampaignChoicesMade() == 0) {
(char *)":Data:Models:Body7.solid",
(char *)":Data:Models:Bodylow.solid",
(char *)":Data:Models:Belt.solid", 1);
- Person::players[i]->skeleton.drawmodelclothes.textureptr.load(":Data:Textures:Belt.png", 1, 1);
+ Person::players[i]->skeleton.drawmodelclothes.textureptr.load(":Data:Textures:Belt.png", 1);
}
if (Person::players[i]->creature == wolftype) {
Person::players[i]->skeleton.Load(
Person::players.back()->whichskin = 2;
}
- Person::players.back()->skeleton.drawmodelclothes.textureptr.load(":Data:Textures:Belt.png", 1, 1);
+ Person::players.back()->skeleton.drawmodelclothes.textureptr.load(":Data:Textures:Belt.png", 1);
Person::players.back()->power = 1;
Person::players.back()->speedmult = 1;
Person::players.back()->animCurrent = bounceidleanim;
void SkyBox::load (const char *ffront, const char *fleft, const char *fback,
const char *fright, const char *fup, const char *fdown)
{
- front.load(ffront, true, false);
- left.load(fleft, true, false);
- back.load(fback, true, false);
- right.load(fright, true, false);
- up.load(fup, true, false);
- down.load(fdown, true, false);
+ front.load(ffront, true);
+ left.load(fleft, true);
+ back.load(fback, true);
+ right.load(fright, true);
+ up.load(fup, true);
+ down.load(fdown, true);
}
void SkyBox::draw()
LOG(std::string("Loading font texture...") + fileName);
- FontTexture.load(fileName, false, false);
+ FontTexture.load(fileName, false);
if (base) {
glDeleteLists(base, 512);
base = 0;
glBindTexture(GL_TEXTURE_2D, id);
}
-TextureRes::TextureRes(const string& _filename, bool _hasMipmap, bool _hasAlpha):
- id(0), filename(_filename), hasMipmap(_hasMipmap), hasAlpha(_hasAlpha), isSkin(false),
+TextureRes::TextureRes(const string& _filename, bool _hasMipmap):
+ id(0), filename(_filename), hasMipmap(_hasMipmap), isSkin(false),
skinsize(0), data(NULL), datalen(0)
{
load();
}
TextureRes::TextureRes(const string& _filename, bool _hasMipmap, GLubyte* array, int* skinsizep):
- id(0), filename(_filename), hasMipmap(_hasMipmap), hasAlpha(false), isSkin(true),
+ id(0), filename(_filename), hasMipmap(_hasMipmap), isSkin(true),
skinsize(0), data(NULL), datalen(0)
{
load();
}
}
-void Texture::load(const string& filename, bool hasMipmap, bool hasAlpha)
+void Texture::load(const string& filename, bool hasMipmap)
{
destroy();
- tex = new TextureRes(filename, hasMipmap, hasAlpha);
+ tex = new TextureRes(filename, hasMipmap);
}
void Texture::load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep)
GLuint id;
string filename;
bool hasMipmap;
- bool hasAlpha;
bool isSkin;
int skinsize;
GLubyte* data;
void load();
public:
- TextureRes(const string& filename, bool hasMipmap, bool hasAlpha);
+ TextureRes(const string& filename, bool hasMipmap);
TextureRes(const string& filename, bool hasMipmap, GLubyte* array, int* skinsize);
~TextureRes();
void bind();
TextureRes* tex;
public:
inline Texture(): tex(NULL) {}
- void load(const string& filename, bool hasMipmap, bool hasAlpha);
+ void load(const string& filename, bool hasMipmap);
void load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep);
void destroy();
void bind();