mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
Cleanups. Mostly whitespace.
svn-id: r19022
This commit is contained in:
parent
f405adae1f
commit
e44213c832
@ -1033,7 +1033,7 @@ void Actor::handleSpeech(int msec) {
|
||||
_activeSpeech.drawRect.left = _activeSpeech.speechBox.left;
|
||||
}
|
||||
|
||||
height2 = actor->_screenPosition.y - 50;
|
||||
height2 = actor->_screenPosition.y - 50;
|
||||
_activeSpeech.speechBox.top = _activeSpeech.drawRect.top = MAX(10, (height2 - height) / 2);
|
||||
} else {
|
||||
_activeSpeech.drawRect.left = _activeSpeech.speechBox.left;
|
||||
|
@ -52,7 +52,7 @@ Events::~Events(void) {
|
||||
|
||||
// Function to process event list once per frame.
|
||||
// First advances event times, then processes each event with the appropriate
|
||||
// handler depending on the type of event.
|
||||
// handler depending on the type of event.
|
||||
int Events::handleEvents(long msec) {
|
||||
Event *event_p;
|
||||
|
||||
@ -100,7 +100,7 @@ int Events::handleEvents(long msec) {
|
||||
} else {
|
||||
// If there is an event chain present, move the next event
|
||||
// in the chain up, adjust it by the previous delta time,
|
||||
// and reprocess the event */
|
||||
// and reprocess the event
|
||||
delta_time = event_p->time;
|
||||
Event *from_chain = event_p->chain;
|
||||
memcpy(event_p, from_chain, sizeof(*event_p));
|
||||
|
@ -222,7 +222,7 @@ void Font::createOutline(FontData *font) {
|
||||
// "Hollow out" character to prevent overdraw
|
||||
for (row = 0; row < font->normal.header.charHeight; row++) {
|
||||
for (currentByte = 0; currentByte < font->outline.fontCharEntry[i].byteWidth; currentByte++) {
|
||||
destPointer2 = font->outline.font + font->outline.header.rowLength * (row + 1) + font->outline.fontCharEntry[i].index + currentByte;
|
||||
destPointer2 = font->outline.font + font->outline.header.rowLength * (row + 1) + font->outline.fontCharEntry[i].index + currentByte;
|
||||
if (currentByte > 0) {
|
||||
// Get last two columns from previous byte
|
||||
srcPointer = font->normal.font + font->normal.header.rowLength * row + font->normal.fontCharEntry[i].index + (currentByte - 1);
|
||||
|
@ -54,7 +54,7 @@ Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height, GameDetector &d
|
||||
}
|
||||
|
||||
Gfx::~Gfx() {
|
||||
_backBuffer.free();
|
||||
_backBuffer.free();
|
||||
}
|
||||
|
||||
void Surface::drawPalette() {
|
||||
|
@ -1505,7 +1505,7 @@ void Interface::drawStatusBar() {
|
||||
|
||||
rect.right = rect.left + _vm->getDisplayInfo().saveReminderWidth;
|
||||
rect.bottom = rect.top + _vm->getDisplayInfo().saveReminderHeight;
|
||||
_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_saveReminderSprites,
|
||||
_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_saveReminderSprites,
|
||||
_saveReminderState == 1 ? _vm->getDisplayInfo().saveReminderFirstSpriteNumber : _vm->getDisplayInfo().saveReminderSecondSpriteNumber,
|
||||
rect, 256);
|
||||
|
||||
@ -1606,7 +1606,7 @@ void Interface::handleMainUpdate(const Point& mousePoint) {
|
||||
//inventory stuff
|
||||
void Interface::inventoryChangePos(int chg) {
|
||||
if ((chg < 0 && _inventoryStart + chg >= 0) ||
|
||||
(chg > 0 && _inventoryStart < _inventoryEnd)) {
|
||||
(chg > 0 && _inventoryStart < _inventoryEnd)) {
|
||||
_inventoryStart += chg;
|
||||
draw();
|
||||
}
|
||||
@ -1632,7 +1632,7 @@ void Interface::updateInventory(int pos) {
|
||||
_inventoryStart = 0;
|
||||
}
|
||||
|
||||
_inventoryEnd = (_inventoryCount - 1 - cols) / cols * cols;
|
||||
_inventoryEnd = (_inventoryCount - 1 - cols) / cols * cols;
|
||||
if (_inventoryEnd < 0) {
|
||||
_inventoryEnd = 0;
|
||||
}
|
||||
@ -1962,7 +1962,7 @@ void Interface::converseClear(void) {
|
||||
}
|
||||
|
||||
bool Interface::converseAddText(const char *text, int replyId, byte replyFlags, int replyBit) {
|
||||
int count = 0; // count how many pieces of text per string
|
||||
int count = 0; // count how many pieces of text per string
|
||||
int i;
|
||||
int len;
|
||||
byte c;
|
||||
@ -1994,10 +1994,10 @@ bool Interface::converseAddText(const char *text, int replyId, byte replyFlags,
|
||||
|
||||
_converseText[_converseTextCount].text[i] = 0;
|
||||
_converseText[_converseTextCount].textNum = count;
|
||||
_converseText[_converseTextCount].stringNum = _converseStrCount;
|
||||
_converseText[_converseTextCount].replyId = replyId;
|
||||
_converseText[_converseTextCount].replyFlags = replyFlags;
|
||||
_converseText[_converseTextCount].replyBit = replyBit;
|
||||
_converseText[_converseTextCount].stringNum = _converseStrCount;
|
||||
_converseText[_converseTextCount].replyId = replyId;
|
||||
_converseText[_converseTextCount].replyFlags = replyFlags;
|
||||
_converseText[_converseTextCount].replyBit = replyBit;
|
||||
|
||||
_converseTextCount++;
|
||||
count++;
|
||||
@ -2104,7 +2104,7 @@ void Interface::converseDisplayTextLines(Surface *ds) {
|
||||
|
||||
void Interface::converseChangePos(int chg) {
|
||||
if ((chg < 0 && _converseStartPos + chg >= 0) ||
|
||||
(chg > 0 && _converseStartPos < _converseEndPos)) {
|
||||
(chg > 0 && _converseStartPos < _converseEndPos)) {
|
||||
_converseStartPos += chg;
|
||||
draw();
|
||||
}
|
||||
@ -2298,7 +2298,7 @@ void Interface::mapPanelDrawCrossHair() {
|
||||
_mapPanelCrossHairState = !_mapPanelCrossHairState;
|
||||
|
||||
Point mapPosition = _vm->_isoMap->getMapPosition();
|
||||
Rect screen(_vm->getDisplayWidth(), _vm->_scene->getHeight());
|
||||
Rect screen(_vm->getDisplayWidth(), _vm->_scene->getHeight());
|
||||
|
||||
if (screen.contains(mapPosition)) {
|
||||
_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_mainSprites,
|
||||
|
@ -426,7 +426,7 @@ void IsoMap::drawSprite(Surface *ds, SpriteList &spriteList, int spriteNumber, c
|
||||
}
|
||||
|
||||
|
||||
void IsoMap::drawTiles(Surface *ds, const Location *location) {
|
||||
void IsoMap::drawTiles(Surface *ds, const Location *location) {
|
||||
Point view1;
|
||||
Point fineScroll;
|
||||
Point tileScroll;
|
||||
|
@ -45,13 +45,13 @@ struct MacResMap {
|
||||
struct MacResource {
|
||||
int16 id;
|
||||
int16 nameOffset;
|
||||
byte attr;
|
||||
byte attr;
|
||||
int32 dataOffset;
|
||||
byte name[255];
|
||||
};
|
||||
|
||||
struct MacResType {
|
||||
uint32 id;
|
||||
uint32 id;
|
||||
int16 items;
|
||||
int16 maxItemId;
|
||||
int16 offset;
|
||||
@ -178,7 +178,7 @@ bool Resource::loadMacContext(ResourceContext *context) {
|
||||
macMapLength = context->file->readUint32BE();
|
||||
|
||||
if (macDataOffset >= context->file->size() || macMapOffset >= context->file->size() ||
|
||||
macDataLength + macMapLength > context->file->size()) {
|
||||
macDataLength + macMapLength > context->file->size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ void Resource::clearContexts() {
|
||||
|
||||
uint32 Resource::convertResourceId(uint32 resourceId) {
|
||||
|
||||
if ((_vm->getGameType() == GType_ITE) && (_vm->getFeatures() & GF_MAC_RESOURCES)) {
|
||||
if (_vm->getGameType() == GType_ITE && _vm->isMacResources()) {
|
||||
if (resourceId > 1537) {
|
||||
return resourceId - 2;
|
||||
} else {
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
static const GameSettings saga_games[] = {
|
||||
{"ite", "Inherit the Earth", 0},
|
||||
{"ite-demo", "Inherit the Earth (Demo)", 0},
|
||||
{"ite-demo", "Inherit the Earth (Demo)", 0},
|
||||
{"ihnm", "I Have No Mouth and I Must Scream", GF_DEFAULT_TO_1X_SCALER },
|
||||
{"ihnm-demo", "I Have No Mouth and I Must Scream (Demo)", GF_DEFAULT_TO_1X_SCALER },
|
||||
{0, 0, 0}
|
||||
|
@ -200,7 +200,7 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
|
||||
|
||||
void SagaEngine::load(const char *fileName) {
|
||||
Common::InSaveFile *in;
|
||||
int commonBufferSize;
|
||||
int commonBufferSize;
|
||||
int sceneNumber, insetSceneNumber;
|
||||
int mapx, mapy;
|
||||
|
||||
|
@ -304,7 +304,7 @@ void Scene::nextScene() {
|
||||
|
||||
endScene();
|
||||
|
||||
// Delete the current head in scene queue
|
||||
// Delete the current head in scene queue
|
||||
queueIterator = _sceneQueue.begin();
|
||||
if (queueIterator == _sceneQueue.end()) {
|
||||
return;
|
||||
@ -316,7 +316,7 @@ void Scene::nextScene() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the head in scene queue
|
||||
// Load the head in scene queue
|
||||
sceneQueue = queueIterator.operator->();
|
||||
|
||||
loadScene(sceneQueue);
|
||||
@ -364,12 +364,12 @@ void Scene::skipScene() {
|
||||
}
|
||||
|
||||
static struct SceneSubstitutes {
|
||||
int sceneId;
|
||||
const char *message;
|
||||
const char *title;
|
||||
const char *image;
|
||||
int sceneId;
|
||||
const char *message;
|
||||
const char *title;
|
||||
const char *image;
|
||||
} sceneSubstitutes[] = {
|
||||
{
|
||||
{
|
||||
7,
|
||||
"Tycho says he knows much about the northern lands. Can Rif convince "
|
||||
"the Dog to share this knowledge?",
|
||||
@ -377,7 +377,7 @@ static struct SceneSubstitutes {
|
||||
"tycho.bbm"
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
27,
|
||||
"The scene of the crime may hold many clues, but will the servants of "
|
||||
"the Sanctuary trust Rif?",
|
||||
@ -385,7 +385,7 @@ static struct SceneSubstitutes {
|
||||
"sanctuar.bbm"
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
5,
|
||||
"The Rats hold many secrets that could guide Rif on his quest -- assuming "
|
||||
"he can get past the doorkeeper.",
|
||||
@ -393,7 +393,7 @@ static struct SceneSubstitutes {
|
||||
"ratdoor.bbm"
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
2,
|
||||
"The Ferrets enjoy making things and have the materials to do so. How can "
|
||||
"that help Rif?",
|
||||
@ -401,14 +401,14 @@ static struct SceneSubstitutes {
|
||||
"ferrets.bbm"
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
67,
|
||||
"What aid can the noble King of the Elks provide to Rif and his companions?",
|
||||
"The Realm of the Forest King",
|
||||
"elkenter.bbm"
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
3,
|
||||
"The King holds Rif's sweetheart hostage. Will the Boar provide any "
|
||||
"assistance to Rif?",
|
||||
|
@ -419,7 +419,7 @@ void Script::sfSetActorFacing(SCRIPTFUNC_PARAMS) {
|
||||
ActorData *actor;
|
||||
|
||||
actorId = thread->pop();
|
||||
actorDirection = thread->pop();
|
||||
actorDirection = thread->pop();
|
||||
|
||||
actor = _vm->_actor->getActor(actorId);
|
||||
actor->_facingDirection = actor->_actionDirection = actorDirection;
|
||||
@ -959,7 +959,7 @@ void Script::sfCycleFrames(SCRIPTFUNC_PARAMS) {
|
||||
actorId = thread->pop();
|
||||
flags = thread->pop();
|
||||
cycleFrameSequence = thread->pop();
|
||||
cycleDelay = thread->pop();
|
||||
cycleDelay = thread->pop();
|
||||
|
||||
actor = _vm->_actor->getActor(actorId);
|
||||
|
||||
@ -1067,7 +1067,7 @@ void Script::sfScriptSpecialWalk(SCRIPTFUNC_PARAMS) {
|
||||
actorId = thread->pop();
|
||||
actorLocation.x = thread->pop();
|
||||
actorLocation.y = thread->pop();
|
||||
walkFrameSequence = thread->pop();
|
||||
walkFrameSequence = thread->pop();
|
||||
|
||||
actor = _vm->_actor->getActor(actorId);
|
||||
actorLocation.z = actor->_location.z;
|
||||
@ -1096,9 +1096,9 @@ void Script::sfPlaceActor(SCRIPTFUNC_PARAMS) {
|
||||
actorId = thread->pop();
|
||||
actorLocation.x = thread->pop();
|
||||
actorLocation.y = thread->pop();
|
||||
actorDirection = thread->pop();
|
||||
frameType = thread->pop();
|
||||
frameOffset = thread->pop();
|
||||
actorDirection = thread->pop();
|
||||
frameType = thread->pop();
|
||||
frameOffset = thread->pop();
|
||||
|
||||
debug(1, "sfPlaceActor(id = 0x%x, x=%d, y=%d, dir=%d, frameType=%d, frameOffset=%d)", actorId, actorLocation.x,
|
||||
actorLocation.y, actorDirection, frameType, frameOffset);
|
||||
@ -1152,7 +1152,7 @@ void Script::sfScriptWalkRelative(SCRIPTFUNC_PARAMS) {
|
||||
objectId = thread->pop();
|
||||
actorLocation.x = thread->pop();
|
||||
actorLocation.y = thread->pop();
|
||||
walkFlags = thread->pop();
|
||||
walkFlags = thread->pop();
|
||||
|
||||
actor = _vm->_actor->getActor(actorId);
|
||||
actorLocation.z = actor->_location.z;
|
||||
@ -1189,7 +1189,7 @@ void Script::sfScriptMoveRelative(SCRIPTFUNC_PARAMS) {
|
||||
objectId = thread->pop();
|
||||
actorLocation.x = thread->pop();
|
||||
actorLocation.y = thread->pop();
|
||||
walkFlags = thread->pop();
|
||||
walkFlags = thread->pop();
|
||||
|
||||
actor = _vm->_actor->getActor(actorId);
|
||||
actorLocation.z = actor->_location.z;
|
||||
@ -1834,7 +1834,7 @@ void Script::finishDialog(int replyID, int flags, int bitOffset) {
|
||||
|
||||
if (flags & kReplyOnce) {
|
||||
addr = _conversingThread->_staticBase + (bitOffset >> 3);
|
||||
*addr |= (1 << (bitOffset & 7));
|
||||
*addr |= (1 << (bitOffset & 7));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ void Script::abortAllThreads(void) {
|
||||
void Script::completeThread(void) {
|
||||
int limit = (_vm->getGameType() == GType_IHNM) ? 100 : 40;
|
||||
|
||||
for (int i = 0; i < limit && !_threadList.isEmpty() ; i++)
|
||||
for (int i = 0; i < limit && !_threadList.isEmpty(); i++)
|
||||
executeThreads(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user