/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
char buf[64];
snprintf(buf, 63, "Textures/%s.png", args);
+ const std::string file_path = Folders::getResourcePath(buf);
+ FILE* tfile;
+ tfile = fopen(file_path.c_str(), "rb");
+ if (tfile == NULL) {
+ perror((std::string("Couldn't find file ") + file_path + " to assign as clothes").c_str());
+
+ // FIXME: Reduce code duplication with GameTick (should come from a Console class)
+ for (int k = 14; k >= 1; k--) {
+ consoletext[k] = consoletext[k - 1];
+ }
+ consoletext[0] = std::string("Could not load the requested texture '") + args + "', aborting.";
+ consoleselected = 0;
+
+ return;
+ }
+
int id = Person::players[pnum]->numclothes;
strncpy(Person::players[pnum]->clothes[id], buf, 64);
Person::players[pnum]->clothestintr[id] = tintr;
{
Person::players[0]->creature = wolftype;
Person::players[0]->skeletonLoad();
+ Person::players[0]->scale = .23;
Person::players[0]->damagetolerance = 300;
set_proportion(0, "1 1 1 1");
}
-void ch_wolfieisgod(const char* args)
-{
- ch_wolfie(args);
-}
-
void ch_wolf(const char*)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/Wolf.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);