update copyright date, some formating stuff, rest later

This commit is contained in:
Pawel Kolodziejski 2004-02-24 08:20:45 +00:00
parent 978b6691b6
commit fd4d04c3a3
10 changed files with 446 additions and 448 deletions

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -27,8 +27,7 @@
Actor::Actor(const char *name) :
name_(name), talkColor_(255, 255, 255), pos_(0, 0, 0),
pitch_(0), yaw_(0), roll_(0), walkRate_(0), turnRate_(0),
visible_(true), talkSound_(NULL), turning_(false), walking_(false), walkChore_(-1)
{
visible_(true), talkSound_(NULL), turning_(false), walking_(false), walkChore_(-1) {
Engine::instance()->registerActor(this);
lookingMode_ = false;
}
@ -39,8 +38,7 @@ void Actor::turnTo(float pitch, float yaw, float roll) {
if (yaw_ != yaw) {
turning_ = true;
destYaw_ = yaw;
}
else
} else
turning_ = false;
}
@ -60,8 +58,8 @@ void Actor::walkTo(Vector3d p) {
}
bool Actor::validBoxVector(Vector3d forwardVec, float dist) {
// TODO: Obey Actor 'constrain' flags. Verify if any other sector flags allow walking
// Possibly use a box-aware TraceLine function instead of just checking dest point
//TODO: Obey Actor 'constrain' flags. Verify if any other sector flags allow walking
//Possibly use a box-aware TraceLine function instead of just checking dest point
Vector3d tempVec = pos_ + (forwardVec * dist);
int numSectors = Engine::instance()->currScene()->getSectorCount();
@ -124,20 +122,20 @@ void Actor::sayLine(const char *msg) {
if (talkSound_ != NULL)
Mixer::instance()->playVoice(talkSound_);
// FIXME: Ender - Disabled until I work out why the wrong Chores play
// if (!costumeStack_.empty()) {
// printf("Requesting talk chore\n");
// costumeStack_.back()->playTalkChores();
// }
}
//FIXME: Ender - Disabled until I work out why the wrong Chores play
// if (!costumeStack_.empty()) {
// printf("Requesting talk chore\n");
// costumeStack_.back()->playTalkChores();
//}
}
bool Actor::talking() {
if (talkSound_ == NULL)
return false;
if (talkSound_->done()) {
// FIXME: Ender - Disabled until I work out why the wrong Chores play
// if (!costumeStack_.empty())
// costumeStack_.back()->stopTalkChores();
//FIXME: Ender - Disabled until I work out why the wrong Chores play
//if (!costumeStack_.empty())
//costumeStack_.back()->stopTalkChores();
talkSound_ = NULL;
return false;
}
@ -213,9 +211,12 @@ void Actor::update() {
if (walking_) {
Vector3d dir = destPos_ - pos_;
float dist = dir.magnitude();
if (dist > 0)
dir /= dist;
float walkAmt = Engine::instance()->perSecond(walkRate_);
if (walkAmt >= dist) {
pos_ = destPos_;
walking_ = false;
@ -226,8 +227,7 @@ void Actor::update() {
}
for (std::list<Costume *>::iterator i = costumeStack_.begin();
i != costumeStack_.end(); i++)
{
i != costumeStack_.end(); i++) {
(*i)->setPosRotate( pos_, pitch_, yaw_, roll_ );
(*i)->update();
}
@ -243,4 +243,4 @@ void Actor::draw() {
costumeStack_.back()->draw();
g_driver->finishActorDraw();
}
}
}

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -97,8 +97,7 @@ public:
void setLookAtVectorZero() {
lookAtVector_.set( 0.f, 0.f, 0.f );
}
void setLookAtVector( Vector3d vector )
{
void setLookAtVector( Vector3d vector ) {
lookAtVector_ = vector;
}
void setLookAtRate( float rate ) {
@ -107,7 +106,7 @@ public:
float lookAtRate() {
return(lookAtRate_);
}
void setHead( int joint1, int joint2, int joint3, float maxRoll, float maxPitch, float maxYaw );
void setHead( int joint1, int joint2, int joint3, float maxRoll, float maxPitch, float maxYaw);
private:
std::string name_;

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -20,6 +20,7 @@
#include <cstring>
#include "bitmap.h"
#include "bits.h"
#include "smush.h"
#include "debug.h"
#include "driver_gl.h"
@ -29,8 +30,7 @@
static void decompress_codec3(const char *compressed, char *result);
Bitmap::Bitmap(const char *filename, const char *data, int len) :
Resource(filename)
{
Resource(filename) {
if (len < 8 || memcmp(data, "BM F\0\0\0", 8) != 0)
error("Invalid magic loading bitmap\n");
@ -117,7 +117,7 @@ void Bitmap::prepareDraw() {
// For now, just keep this here :-)
glDisable(GL_LIGHTING);
glEnable(GL_TEXTURE_2D);
}
}
void Bitmap::draw() const {
if (format_ == 1) { // Normal image
@ -179,7 +179,7 @@ Bitmap::~Bitmap() {
bitstr_len = 16; \
compressed += 2; \
} \
} while (0)
} while (0)
static void decompress_codec3(const char *compressed, char *result) {
int bitstr_value = READ_LE_UINT16(compressed);
@ -200,8 +200,7 @@ static void decompress_codec3(const char *compressed, char *result) {
GET_BIT;
copy_len += bit + 3;
copy_offset = *(uint8 *)(compressed++) - 0x100;
}
else {
} else {
copy_offset = (*(uint8 *)(compressed) |
(*(uint8 *)(compressed + 1) & 0xf0) << 4) - 0x1000;
copy_len = (*(uint8 *)(compressed + 1) & 0xf) + 3;

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public