XYZ bounceness;
const int numrepeats = 3;
float groundlevel = .15;
- int k, m;
+ int m;
unsigned i;
XYZ temp;
XYZ terrainnormal;
}
if (terrain.patchobjectnum[whichpatchx][whichpatchz])
for (m = 0; m < terrain.patchobjectnum[whichpatchx][whichpatchz]; m++) {
- k = terrain.patchobjects[whichpatchx][whichpatchz][m];
- if (k < Object::objects.size() && k >= 0)
+ unsigned int k = terrain.patchobjects[whichpatchx][whichpatchz][m];
+ if (k < Object::objects.size()) {
if (Object::objects[k]->possible) {
friction = Object::objects[k]->friction;
XYZ start = joints[i].realoldposition;
broken = 1;
}
}
+ }
}
joints[i].realoldposition = joints[i].position * (*scale) + *coords;
}
if (terrain.patchobjectnum[whichpatchx][whichpatchz])
for (m = 0; m < terrain.patchobjectnum[whichpatchx][whichpatchz]; m++) {
- k = terrain.patchobjects[whichpatchx][whichpatchz][m];
+ unsigned int k = terrain.patchobjects[whichpatchx][whichpatchz][m];
if (Object::objects[k]->possible) {
for (i = 0; i < 26; i++) {
//Make this less stupid
XYZ start = joints[jointlabels[whichjointstartarray[i]]].position * (*scale) + *coords;
XYZ end = joints[jointlabels[whichjointendarray[i]]].position * (*scale) + *coords;
- whichhit = Object::objects[k]->model.LineCheckSlidePossible(&start, &end, &temp, &Object::objects[k]->position, &Object::objects[k]->yaw);
+ whichhit = Object::objects[k]->model.LineCheckSlidePossible(&start, &end, &Object::objects[k]->position, &Object::objects[k]->yaw);
if (whichhit != -1) {
joints[jointlabels[whichjointendarray[i]]].position = (end - *coords) / (*scale);
for (unsigned j = 0; j < muscles.size(); j++) {
model[i].CalculateNormals(0);
}
- drawmodel.load(modelfilename, 0);
+ drawmodel.load(modelfilename);
drawmodel.Rotate(180, 0, 0);
drawmodel.Scale(.04, .04, .04);
drawmodel.FlipTexCoords();
modellow.Scale(.04, .04, .04);
modellow.CalculateNormals(0);
- drawmodellow.load(modellowfilename, 0);
+ drawmodellow.load(modellowfilename);
drawmodellow.Rotate(180, 0, 0);
drawmodellow.Scale(.04, .04, .04);
drawmodellow.FlipTexCoords();
modelclothes.Scale(.041, .04, .041);
modelclothes.CalculateNormals(0);
- drawmodelclothes.load(modelclothesfilename, 0);
+ drawmodelclothes.load(modelclothesfilename);
drawmodelclothes.Rotate(180, 0, 0);
drawmodelclothes.Scale(.04, .04, .04);
drawmodelclothes.FlipTexCoords();
void emit_sound_at(int soundid, const XYZ &pos, float vol)
{
PlaySoundEx (soundid, samp[soundid], NULL, true);
- OPENAL_3D_SetAttributes_ (channels[soundid], pos, NULL);
+ OPENAL_3D_SetAttributes_ (channels[soundid], pos);
OPENAL_SetVolume (channels[soundid], vol);
OPENAL_SetPaused (channels[soundid], false);
}
void emit_stream_at(int soundid, const XYZ &pos, float vol)
{
PlayStreamEx (soundid, samp[soundid], NULL, true);
- OPENAL_3D_SetAttributes_ (channels[soundid], pos, NULL);
+ OPENAL_3D_SetAttributes_ (channels[soundid], pos);
OPENAL_SetVolume (channels[soundid], vol);
OPENAL_SetPaused (channels[soundid], false);
}
}
-AL_API void OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz)
+AL_API void OPENAL_3D_Listener_SetAttributes(const float *pos, const float *, float fx, float fy, float fz, float tx, float ty, float tz)
{
if (!initialized)
return;
listener_position[2] = -pos[2];
}
- ALfloat vec[6] = { fx, fy, -fz, tz, ty, -tz };
+ ALfloat vec[6] = { fx, fy, -fz, tx, ty, -tz };
alListenerfv(AL_ORIENTATION, vec);
// we ignore velocity, since doppler's broken in the Linux AL at the moment...
}
}
-AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos, const float *vel)
+AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos)
{
if (!initialized)
return false;
return true;
}
-AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos, const float *vel)
+AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos)
{
if (!initialized)
return false;
alcProcessContext(alcGetCurrentContext());
}
-AL_API signed char OPENAL_SetOutput(int outputtype)
-{
- return true;
-}
-
extern int channels[];
extern "C" void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused)
typedef OPENAL_SAMPLE OPENAL_STREAM;
typedef struct OPENAL_DSPUNIT OPENAL_DSPUNIT;
-enum OPENAL_OUTPUTTYPES {
- OPENAL_OUTPUT_NOSOUND, /* NoSound driver, all calls to this succeed but do nothing. */
- OPENAL_OUTPUT_OSS, /* Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. */
- OPENAL_OUTPUT_ALSA, /* Linux Alsa driver. */
-};
-
#define OPENAL_LOOP_OFF 0x00000001 /* For non looping samples. */
#define OPENAL_LOOP_NORMAL 0x00000002 /* For forward looping samples. */
#define OPENAL_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
#define AL_API
AL_API void OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
- AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos, const float *vel);
- AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos, const float *vel);
+ AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos);
+ AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos);
AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
AL_API void OPENAL_Close();
AL_API OPENAL_SAMPLE *OPENAL_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
AL_API signed char OPENAL_StopSound(int channel);
AL_API signed char OPENAL_Stream_SetMode(OPENAL_STREAM *stream, unsigned int mode);
AL_API void OPENAL_Update();
- AL_API signed char OPENAL_SetOutput(int outputtype);
void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
void PlayStreamEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
Person::players[pnum]->metallow = low;
}
-static void set_noclothes(int pnum, const char *args)
+static void set_noclothes(int pnum, const char*)
{
Person::players[pnum]->numclothes = 0;
Person::players[pnum]->skeleton.drawmodel.textureptr.load(
/* Console commands themselves */
-void ch_quit(const char *args)
+void ch_quit(const char *)
{
tryquit = 1;
}
fpackf(tfile, "Bi", Object::objects.size());
- for (int k = 0; k < Object::objects.size(); k++)
+ for (unsigned int k = 0; k < Object::objects.size(); k++) {
fpackf(tfile, "Bi Bf Bf Bf Bf Bf Bf", Object::objects[k]->type, Object::objects[k]->yaw, Object::objects[k]->pitch,
Object::objects[k]->position.x, Object::objects[k]->position.y, Object::objects[k]->position.z, Object::objects[k]->scale);
+ }
fpackf(tfile, "Bi", Hotspot::hotspots.size());
for (unsigned i = 0; i < Hotspot::hotspots.size(); i++) {
fclose(tfile);
}
-void ch_cellar(const char *args)
+void ch_cellar(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/Furdarko.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
set_armor(closest, args);
}
-void ch_protectionreset(const char *args)
+void ch_protectionreset(const char *)
{
set_protection(0, "1 1 1");
set_armor(0, "1 1 1");
set_clothes(closest, args);
}
-void ch_belt(const char *args)
+void ch_belt(const char *)
{
Person::players[0]->skeleton.clothes = !Person::players[0]->skeleton.clothes;
}
-void ch_cellophane(const char *args)
+void ch_cellophane(const char *)
{
cellophane = !cellophane;
float mul = (cellophane ? 0 : 1);
}
}
-void ch_funnybunny(const char *args)
+void ch_funnybunny(const char *)
{
Person::players[0]->creature = rabbittype;
Person::players[0]->skeletonLoad(true);
set_proportion(0, "1 1 1 1");
}
-void ch_wolfie(const char *args)
+void ch_wolfie(const char *)
{
Person::players[0]->creature = wolftype;
Person::players[0]->skeletonLoad();
ch_wolfie(args);
}
-void ch_wolf(const char *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);
}
-void ch_snowwolf(const char *args)
+void ch_snowwolf(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/SnowWolf.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_darkwolf(const char *args)
+void ch_darkwolf(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/DarkWolf.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_lizardwolf(const char *args)
+void ch_lizardwolf(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/LizardWolf.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_white(const char *args)
+void ch_white(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/Fur.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_brown(const char *args)
+void ch_brown(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/Fur3.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_black(const char *args)
+void ch_black(const char *)
{
Person::players[0]->skeleton.drawmodel.textureptr.load("Textures/Fur2.jpg", 1, &Person::players[0]->skeleton.skinText[0], &Person::players[0]->skeleton.skinsize);
}
-void ch_sizemin(const char *args)
+void ch_sizemin(const char *)
{
for (unsigned i = 1; i < Person::players.size(); i++)
if (Person::players[i]->scale < 0.8 * 0.2)
Dialog::dialogs[0].type = dlg;
}
-void ch_fixrotation(const char *args)
+void ch_fixrotation(const char *)
{
int playerId = Dialog::currentScene().participantfocus;
Dialog::currentDialog().participantyaw[playerId] = Person::players[playerId]->yaw;
}
-void ch_ddialogue(const char *args)
+void ch_ddialogue(const char *)
{
if (!Dialog::dialogs.empty()) {
Dialog::dialogs.pop_back();
}
}
-void ch_dhs(const char *args)
+void ch_dhs(const char *)
{
if (!Hotspot::hotspots.empty()) {
Hotspot::hotspots.pop_back();
}
}
-void ch_immobile(const char *args)
+void ch_immobile(const char *)
{
Person::players[0]->immobile = 1;
}
-void ch_allimmobile(const char *args)
+void ch_allimmobile(const char *)
{
for (unsigned i = 1; i < Person::players.size(); i++)
Person::players[i]->immobile = 1;
}
-void ch_mobile(const char *args)
+void ch_mobile(const char *)
{
Person::players[0]->immobile = 0;
}
-void ch_default(const char *args)
+void ch_default(const char *)
{
Person::players[0]->armorhead = 1;
Person::players[0]->armorhigh = 1;
Dialog::currentDialog().play();
}
-void ch_mapkilleveryone(const char *args)
+void ch_mapkilleveryone(const char *)
{
maptype = mapkilleveryone;
}
-void ch_mapkillmost(const char *args)
+void ch_mapkillmost(const char *)
{
maptype = mapkillmost;
}
-void ch_mapkillsomeone(const char *args)
+void ch_mapkillsomeone(const char *)
{
maptype = mapkillsomeone;
}
-void ch_mapgosomewhere(const char *args)
+void ch_mapgosomewhere(const char *)
{
maptype = mapgosomewhere;
}
Object::DoShadows();
}
-void ch_skybox(const char *args)
+void ch_skybox(const char*)
{
skyboxtexture = !skyboxtexture;
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
-void Terrain::drawpatchotherother(int whichx, int whichy, float opacity)
+void Terrain::drawpatchotherother(int whichx, int whichy)
{
glEnable(GL_BLEND);
UpdateTransparencyotherother(whichx, whichy);
if (layer == 1 && textureness[i][j] != allfirst)
drawpatchother(i, j, opacity);
if (layer == 2 && textureness[i][j] != allfirst)
- drawpatchotherother(i, j, opacity);
+ drawpatchotherother(i, j);
}
glPopMatrix();
}
short size;
int patchobjectnum[subdivision][subdivision];
- int patchobjects[subdivision][subdivision][300];
+ unsigned int patchobjects[subdivision][subdivision][300];
float scale;
int type;
private:
void drawpatch(int whichx, int whichy, float opacity);
void drawpatchother(int whichx, int whichy, float opacity);
- void drawpatchotherother(int whichx, int whichy, float opacity);
+ void drawpatchotherother(int whichx, int whichy);
void UpdateTransparency(int whichx, int whichy);
void UpdateTransparencyother(int whichx, int whichy);
void UpdateTransparencyotherother(int whichx, int whichy);
extern int accountcampaignchoicesmade[10];
extern int accountcampaignchoices[10][5000];
-void LOG(const std::string &fmt, ...)
+void LOG(const std::string &, ...)
{
// !!! FIXME: write me.
}
-void LoadSave(const std::string& fileName, GLuint *textureid, bool mipmap, GLubyte *array, int *skinsize)
+void LoadSave(const std::string& fileName, GLubyte *array)
{
LOGFUNC;
LOG("Initializing sound system...");
-#if PLATFORM_LINUX
- unsigned char rc = 0;
- int output = OPENAL_OUTPUT_ALSA; // Try alsa first...
- if (commandLineOptions[SOUND]) {
- output = commandLineOptions[SOUND].last()->type(); // ...but let user override that.
- }
-
- OPENAL_SetOutput(output);
- if ((rc = OPENAL_Init(44100, 32, 0)) == false) {
- // if we tried ALSA and failed, fall back to OSS.
- if ( (output == OPENAL_OUTPUT_ALSA) && (commandLineOptions[SOUND].last()->type() != OPENAL_OUTPUT_ALSA) ) {
- OPENAL_Close();
- output = OPENAL_OUTPUT_OSS;
- OPENAL_SetOutput(output);
- rc = OPENAL_Init(44100, 32, 0);
- }
- }
-
- if (rc == false) {
- OPENAL_Close();
- output = OPENAL_OUTPUT_NOSOUND; // we tried! just do silence.
- OPENAL_SetOutput(output);
- rc = OPENAL_Init(44100, 32, 0);
- }
-#else
OPENAL_Init(44100, 32, 0);
-#endif
OPENAL_SetSFXMasterVolume((int)(volume * 255));
loadAllSounds();
Weapon::lightbloodswordtextureptr.load("Textures/SwordBloodLight.jpg", 1);
Weapon::stafftextureptr.load("Textures/Staff.jpg", 1);
- Weapon::throwingknifemodel.load("Models/ThrowingKnife.solid", 1);
+ Weapon::throwingknifemodel.load("Models/ThrowingKnife.solid");
Weapon::throwingknifemodel.Scale(.001, .001, .001);
Weapon::throwingknifemodel.Rotate(90, 0, 0);
Weapon::throwingknifemodel.Rotate(0, 90, 0);
Weapon::throwingknifemodel.flat = 0;
Weapon::throwingknifemodel.CalculateNormals(1);
- Weapon::swordmodel.load("Models/Sword.solid", 1);
+ Weapon::swordmodel.load("Models/Sword.solid");
Weapon::swordmodel.Scale(.001, .001, .001);
Weapon::swordmodel.Rotate(90, 0, 0);
Weapon::swordmodel.Rotate(0, 90, 0);
Weapon::swordmodel.flat = 1;
Weapon::swordmodel.CalculateNormals(1);
- Weapon::staffmodel.load("Models/Staff.solid", 1);
+ Weapon::staffmodel.load("Models/Staff.solid");
Weapon::staffmodel.Scale(.005, .005, .005);
Weapon::staffmodel.Rotate(90, 0, 0);
Weapon::staffmodel.Rotate(0, 90, 0);
viewer.x = terrain.size / 2 * terrain.scale;
viewer.z = terrain.size / 2 * terrain.scale;
- hawk.load("Models/Hawk.solid", 1);
+ hawk.load("Models/Hawk.solid");
hawk.Scale(.03, .03, .03);
hawk.Rotate(90, 1, 1);
hawk.CalculateNormals(0);
hawkcoords.z = terrain.size / 2 * terrain.scale - 5 - 7;
hawkcoords.y = terrain.getHeight(hawkcoords.x, hawkcoords.z) + 25;
- eye.load("Models/Eye.solid", 1);
+ eye.load("Models/Eye.solid");
eye.Scale(.03, .03, .03);
eye.CalculateNormals(0);
- cornea.load("Models/Cornea.solid", 1);
+ cornea.load("Models/Cornea.solid");
cornea.Scale(.03, .03, .03);
cornea.CalculateNormals(0);
- iris.load("Models/Iris.solid", 1);
+ iris.load("Models/Iris.solid");
iris.Scale(.03, .03, .03);
iris.CalculateNormals(0);
- LoadSave("Textures/BloodFur.png", 0, 1, &bloodText[0], 0);
- LoadSave("Textures/WolfBloodFur.png", 0, 1, &wolfbloodText[0], 0);
+ LoadSave("Textures/BloodFur.png", &bloodText[0]);
+ LoadSave("Textures/WolfBloodFur.png", &wolfbloodText[0]);
oldenvironment = -4;
return firstintersecting;
}
-int Model::LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate)
+int Model::LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *move, float *rotate)
{
static int j;
static float distance;
}
-bool Model::load(const std::string& filename, bool texture)
+bool Model::load(const std::string& filename)
{
FILE *tfile;
long i;
return true;
}
-bool Model::loaddecal(const std::string& filename, bool texture )
+bool Model::loaddecal(const std::string& filename)
{
FILE *tfile;
long i, j;
int SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate);
int LineCheck(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
int LineCheckPossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
- int LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
+ int LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *move, float *rotate);
void UpdateVertexArray();
void UpdateVertexArrayNoTex();
void UpdateVertexArrayNoTexNoNorm();
bool loadnotex(const std::string& filename);
bool loadraw(const std::string& filename);
- bool load(const std::string& filename, bool texture);
- bool loaddecal(const std::string& filename, bool texture);
+ bool load(const std::string& filename);
+ bool loaddecal(const std::string& filename);
void Scale(float xscale, float yscale, float zscale);
void FlipTexCoords();
void UniformTexCoords();
}
-int setKeySelected_thread(void* data)
+int setKeySelected_thread(void*)
{
using namespace Game;
int scancode = -1;
switch(type) {
case boxtype:
- model.loaddecal("Models/Box.solid", 0);
+ model.loaddecal("Models/Box.solid");
friction = 1.5;
break;
case cooltype:
- model.loaddecal("Models/Cool.solid", 0);
+ model.loaddecal("Models/Cool.solid");
friction = 1.5;
break;
case walltype:
- model.loaddecal("Models/Wall.solid", 0);
+ model.loaddecal("Models/Wall.solid");
friction = 1.5;
break;
case tunneltype:
- model.loaddecal("Models/Tunnel.solid", 0);
+ model.loaddecal("Models/Tunnel.solid");
friction = 1.5;
break;
case chimneytype:
- model.loaddecal("Models/Chimney.solid", 0);
+ model.loaddecal("Models/Chimney.solid");
friction = 1.5;
break;
case spiketype:
- model.load("Models/Spike.solid", 0);
+ model.load("Models/Spike.solid");
friction = .4;
break;
case weirdtype:
- model.loaddecal("Models/Weird.solid", 0);
+ model.loaddecal("Models/Weird.solid");
friction = 1.5;
break;
case rocktype:
- model.loaddecal("Models/Rock.solid", 0);
+ model.loaddecal("Models/Rock.solid");
if (scale > .5) {
friction = 1.5;
} else {
}
break;
case treetrunktype:
- model.load("Models/TreeTrunk.solid", 0);
+ model.load("Models/TreeTrunk.solid");
friction = .4;
break;
case treeleavestype:
scale += fabs((float)(Random() % 100) / 900) * scale;
- model.load("Models/Leaves.solid", 0);
+ model.load("Models/Leaves.solid");
friction = 0;
break;
case bushtype:
position.y = terrain.getHeight(position.x, position.z) - .3;
- model.load("Models/Bush.solid", 0);
+ model.load("Models/Bush.solid");
break;
case platformtype:
- model.loaddecal("Models/Platform.solid", 0);
+ model.loaddecal("Models/Platform.solid");
model.Rotate(90, 0, 0);
friction = 1.5;
break;
vel[2] = velocity.z;
if (id == 0) {
- OPENAL_3D_SetAttributes(channels[whooshsound], gLoc, vel);
+ OPENAL_3D_SetAttributes(channels[whooshsound], gLoc);
OPENAL_SetVolume(channels[whooshsound], 64 * findLength(&velocity) / 5);
}
if (((velocity.y < -15) || (crouchkeydown && velocity.y < -8)) && abs(velocity.y) * 4 > fast_sqrt(velocity.x * velocity.x * velocity.z * velocity.z))
static XYZ flatfacing;
static XYZ flatvelocity;
static float flatvelspeed;
- static int i, l;
+ static int l;
static int bloodsize;
static int startx, starty, endx, endy;
static GLubyte color;
vel[2] = velocity.z;
if (id == 0) {
- OPENAL_3D_SetAttributes(channels[whooshsound], gLoc, vel);
+ OPENAL_3D_SetAttributes(channels[whooshsound], gLoc);
OPENAL_SetVolume(channels[whooshsound], 64 * findLength(&velocity) / 5);
}
}
if (endy < starty)
endy = starty;
- for (i = startx; i < endx; i++) {
+ for (int i = startx; i < endx; i++) {
for (int j = starty; j < endy; j++) {
if (Random() % 2 == 0) {
color = Random() % 85 + 170;
}
}
- if (dead != 1)
+ if (dead != 1) {
unconscioustime = 0;
+ }
if (dead == 1 || howactive == typesleeping) {
unconscioustime += multiplier;
damage += 20;
}
- if (!dead)
+ if (!dead) {
damage -= multiplier * 13;
- if (!dead)
permanentdamage -= multiplier * 4;
- if (isIdle() || isCrouch()) {
- if (!dead)
+ if (isIdle() || isCrouch()) {
permanentdamage -= multiplier * 4;
+ }
}
if (damage < 0)
damage = 0;
canrecover = 0;
if (velocity.y < -30)
canrecover = 0;
- for (i = 0; i < Object::objects.size(); i++) {
+ for (unsigned int i = 0; i < Object::objects.size(); i++) {
if (Object::objects[i]->type != treeleavestype && Object::objects[i]->type != bushtype && Object::objects[i]->type != firetype) {
colviewer = startpoint;
coltarget = endpoint;
if (aitype != passivetype || skeleton.free == 1)
if (findLengthfast(&velocity) > .1)
- for (i = 0; i < Object::objects.size(); i++) {
+ for (unsigned int i = 0; i < Object::objects.size(); i++) {
if (Object::objects[i]->type == firetype)
if (distsqflat(&coords, &Object::objects[i]->position) < Object::objects[i]->scale*Object::objects[i]->scale * 12 && distsq(&coords, &Object::objects[i]->position) < Object::objects[i]->scale*Object::objects[i]->scale * 49) {
if (onfire) {
play = 0;
if (play && aitype != playercontrolled) {
int whichsound = -1;
- i = abs(Random() % 4);
if (speechdelay <= 0) {
+ unsigned int i = abs(Random() % 4);
if (creature == rabbittype) {
if (i == 0)
whichsound = rabbitchitter;
int findPathDist(int start, int end)
{
- int smallestcount, connected;
+ int connected;
int closest;
- smallestcount = 1000;
+ unsigned int smallestcount = 1000;
for (char i = 0; i < 50; i++) {
- unsigned count = 0;
+ unsigned int count = 0;
int last = start;
int last2 = -1;
int last3 = -1;
last = closest;
count++;
}
- if (count < smallestcount)
+ if (count < smallestcount) {
smallestcount = count;
+ }
}
return smallestcount;
}
{FULLSCREEN, 0, "w", "windowed", option::Arg::None, " -w, --windowed Start the game in windowed mode (default)." },
{NOMOUSEGRAB, 1, "", "nomousegrab", option::Arg::None, " --nomousegrab Disable mousegrab." },
{NOMOUSEGRAB, 0, "", "mousegrab", option::Arg::None, " --mousegrab Enable mousegrab (default)." },
- {SOUND, OPENAL_OUTPUT_NOSOUND, "", "nosound", option::Arg::None, " --nosound Disable sound." },
- {SOUND, OPENAL_OUTPUT_ALSA, "", "force-alsa", option::Arg::None, " --force-alsa Force use of ALSA back-end." },
- {SOUND, OPENAL_OUTPUT_OSS, "", "force-oss", option::Arg::None, " --force-oss Force use of OSS back-end." },
+ {SOUND, 1, "", "nosound", option::Arg::None, " --nosound Disable sound." },
{OPENALINFO, 0, "", "openal-info", option::Arg::None, " --openal-info Print info about OpenAL at launch." },
{SHOWRESOLUTIONS, 0, "", "showresolutions", option::Arg::None, " --showresolutions List the resolutions found by SDL at launch." },
{DEVTOOLS, 0, "d", "devtools", option::Arg::None, " -d, --devtools Enable dev tools: console, level editor and debug info." },