JANITORIAL: Remove trailing spaces

This commit is contained in:
Eugene Sandulenko 2016-10-09 14:59:58 +02:00
parent c5efd9f748
commit dead4aa014
379 changed files with 1319 additions and 1319 deletions

View file

@ -1333,7 +1333,7 @@ void Cast::doCast(int param1) {
for (int idx = 0; idx < 5 && !_vm->shouldQuit() &&
!_vm->_events->isKeyMousePressed(); ++idx)
_vm->_events->pollEventsAndWait();
if (_vm->_events->isKeyMousePressed())
break;
@ -1682,7 +1682,7 @@ void River::updateObstacles() {
void River::riverSetPhysX() {
int xAmt = (_vm->_scrollCol * 16) + _vm->_scrollX;
for (RiverStruct *cur = _topList; cur <= _botList; ++cur) {
cur->_xp = xAmt - (_screenVertX - cur->_riverX);
}

View file

@ -61,7 +61,7 @@ public:
virtual ~AmazonRoom();
virtual void init4Quads();
virtual void roomMenu();
};

View file

@ -49,7 +49,7 @@ public:
~AnimationManager();
void freeAnimationData();
void loadAnimations(Resource *res);
Animation *findAnimation(int animId);
Animation *setAnimation(int animId);

View file

@ -173,7 +173,7 @@ void BaseSurface::copyTo(BaseSurface *dest) {
if (dest->empty())
dest->create(this->w, this->h);
dest->blitFrom(*this);
dest->blitFrom(*this);
}
void BaseSurface::saveBlock(const Common::Rect &bounds) {

View file

@ -94,7 +94,7 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
debugPrintf("Unused Room Number\n");
return true;
}
_vm->_player->_roomNumber = newRoom;
_vm->_room->_function = FN_CLEAR1;

View file

@ -31,7 +31,7 @@ namespace Access {
void LzwDecompressor::decompress(byte *source, byte *dest) {
_source = source;
byte litByte = 0;
uint16 oldCode = 0;
uint16 copyLength, maxCodeValue, code, nextCode, lastCode;

View file

@ -65,9 +65,9 @@ void EventsManager::setNormalCursor(CursorType cursorId) {
void EventsManager::setCursor(CursorType cursorId) {
if (cursorId == _cursorId)
return;
return;
_cursorId = cursorId;
if (cursorId == CURSOR_INVENTORY) {
// Set the cursor
CursorMan.replaceCursor(_invCursor.getPixels(), _invCursor.w, _invCursor.h,
@ -209,9 +209,9 @@ void EventsManager::keyControl(Common::KeyCode keycode, bool isKeyDown) {
}
return;
}
_keyCode = keycode;
switch (keycode) {
case Common::KEYCODE_UP:
case Common::KEYCODE_KP8:

View file

@ -77,7 +77,7 @@ private:
* Handles setting up the resource with a stream for the located resource
*/
void handleFile(Resource *res);
/**
* Handles loading a screen surface and palette with decoded resource
*/

View file

@ -119,7 +119,7 @@ public:
int _startTravelItem;
public:
InventoryManager(AccessEngine *vm);
int &operator[](int idx);
int useItem();

View file

@ -142,7 +142,7 @@ void Player::loadTexPalette() {
int size = texPal->_size;
assert(size == 768);
_manPal1 = new byte[size];
memcpy(_manPal1, texPal->data(), size);
memcpy(_manPal1, texPal->data(), size);
}
void Player::loadSprites(const Common::String &name) {

View file

@ -300,10 +300,10 @@ void Screen::cyclePaletteBackwards() {
_vm->_timers[6]._flag++;
byte *pStart = &_rawPalette[_cycleStart * 3];
byte *pEnd = &_rawPalette[_endCycle * 3];
for (int idx = _startCycle; idx < _endCycle; ++idx) {
g_system->getPaletteManager()->setPalette(pStart, idx, 1);
pStart += 3;
if (pStart == pEnd)
pStart = &_rawPalette[_cycleStart * 3];

View file

@ -840,7 +840,7 @@ void Scripts::cmdTexChoice() {
_vm->_fonts._charSet._lo = 1;
_vm->_fonts._charSet._hi = 8;
_vm->_fonts._charFor._hi = 255;
if (_vm->getGameID() == GType_MartianMemorandum) {
_vm->_fonts._charFor._lo = 247;
_vm->_screen->_maxChars = 23;
@ -912,7 +912,7 @@ void Scripts::cmdTexChoice() {
_vm->_events->debounceLeft();
int x = _vm->_events->_mousePos.x;
for (int i = 0; i < BTN_COUNT; i++) {
if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1]))
if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1]))
|| ((_vm->getGameID() == GType_Amazon) && (x >= BTN_RANGES_v2[i][0]) && (x < BTN_RANGES_v2[i][1]))) {
choice = i;
@ -1049,7 +1049,7 @@ void Scripts::cmdDispAbout() {
if (btnSelected == 2)
_vm->_useItem = -1;
else
_vm->_useItem = _vm->_travelBox->_tempListIdx[boxX];
_vm->_useItem = _vm->_travelBox->_tempListIdx[boxX];
}
void Scripts::cmdPushLocation() {

View file

@ -73,12 +73,12 @@ protected:
void cmdAnim();
void cmdSetFlag();
void cmdCheckFlag();
/**
* Jump to another script
*/
void cmdGoto();
void cmdAddScore();
void cmdSetInventory();
void cmdCheckInventory();
@ -162,7 +162,7 @@ public:
void freeScriptData();
void searchForSequence();
int executeScript();
void findNull();

View file

@ -155,7 +155,7 @@ void SoundManager::playSound(Resource *res, int priority, bool loop, int soundIn
error("Unknown format");
if (loop) {
_queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0,
_queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0,
DisposeAfterUse::NO), soundIndex));
} else {
_queue.push_back(QueuedSound(audioStream, soundIndex));

View file

@ -97,7 +97,7 @@ void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, con
void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) {
// Open up video stream
_videoData = _vm->_files->loadFile(videoFile);
setVideo(vidSurface, pt, rate);
}

View file

@ -135,7 +135,7 @@ private:
enum FileType {
kFileTypeText = 0,
kFileTypeAppleSoft = 2,
kFileTypeBinary = 4
kFileTypeBinary = 4
};
enum {

View file

@ -353,7 +353,7 @@ int AgiEngine::playGame() {
if (appleIIgsDelayOverwrite->gameId == getGameID())
break; // game found
appleIIgsDelayOverwrite++;
}
}
}
do {

View file

@ -192,7 +192,7 @@ static const byte MOUSECURSOR_MACINTOSH_BUSY[] = {
1,2,2,2,2,1,2,2,2,1,
1,2,2,2,2,1,2,2,2,1,
1,2,2,2,2,1,2,2,2,1,
1,2,2,1,1,1,2,2,2,1,
1,2,2,1,1,1,2,2,2,1,
1,2,2,2,2,2,2,2,2,1,
1,2,2,2,2,2,2,2,2,1,
0,1,2,2,2,2,2,2,1,0,

View file

@ -975,7 +975,7 @@ void SystemUI::askForVerificationKeyPress(uint16 newKey) {
if (executeButton) {
if (_askForVerificationMouseActiveButtonNr >= 0) {
SystemUIButtonEntry *button = &_buttonArray[_askForVerificationMouseActiveButtonNr];
if (button->active) {
if (!button->isDefault) {
// Not default button? -> that's cancel

View file

@ -69,7 +69,7 @@ public:
bool quitDialog();
private:
public:
const char *getInventoryTextNothing();

View file

@ -179,7 +179,7 @@ int MidiPlayer::open(int gameType, bool isDemo) {
//setTimerRate(_driver->getBaseTempo());
return 0;
}
case kMusicModeMilesAudio: {
switch (musicType) {
case MT_ADLIB: {

View file

@ -1317,7 +1317,7 @@ bool AGOSEngine_Elvira2::loadGame(const Common::String &filename, bool restartMo
if (getGameType() == GType_WW && getPlatform() == Common::kPlatformDOS && derefItem(item->parent) == NULL)
item->parent = 0;
parent_item = derefItem(parent);
setItemParent(item, parent_item);

View file

@ -1624,7 +1624,7 @@ yyparse ()
#endif
#endif
{
int yystate;
int yyn;
int yyresult;

View file

@ -34,7 +34,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@ -52,7 +52,7 @@ typedef uint64_t flex_uint64_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@ -168,7 +168,7 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@ -225,7 +225,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@ -764,7 +764,7 @@ extern int yywrap (void );
#endif
static void yyunput (int c,char *buf_ptr );
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@ -888,7 +888,7 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 69 "engines/director/lingo/lingo-lex.l"
@ -1641,7 +1641,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
@ -1696,7 +1696,7 @@ static int yy_get_next_buffer (void)
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
@ -1739,7 +1739,7 @@ static int yy_get_next_buffer (void)
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@ -1808,12 +1808,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@ -1826,11 +1826,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@ -1870,13 +1870,13 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@ -1899,11 +1899,11 @@ static void yy_load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
*
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@ -1919,7 +1919,7 @@ static void yy_load_buffer_state (void)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
@ -1928,7 +1928,7 @@ extern int isatty (int );
{
int oerrno = errno;
yy_flush_buffer(b );
b->yy_input_file = file;
@ -1944,13 +1944,13 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*
*/
void yy_flush_buffer (YY_BUFFER_STATE b )
{
@ -1979,7 +1979,7 @@ extern int isatty (int );
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*
*/
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
@ -2009,7 +2009,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*
*/
void yypop_buffer_state (void)
{
@ -2033,7 +2033,7 @@ void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@ -2046,9 +2046,9 @@ static void yyensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@ -2076,13 +2076,13 @@ static void yyensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@ -2111,14 +2111,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
return yy_scan_bytes(yystr,strlen(yystr) );
}
@ -2126,7 +2126,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
*
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
@ -2134,7 +2134,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
YY_BUFFER_STATE b;
char *buf;
yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
@ -2188,16 +2188,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*
*/
int yyget_lineno (void)
{
return yylineno;
}
/** Get the input stream.
*
*
*/
FILE *yyget_in (void)
{
@ -2205,7 +2205,7 @@ FILE *yyget_in (void)
}
/** Get the output stream.
*
*
*/
FILE *yyget_out (void)
{
@ -2213,7 +2213,7 @@ FILE *yyget_out (void)
}
/** Get the length of the current token.
*
*
*/
yy_size_t yyget_leng (void)
{
@ -2221,7 +2221,7 @@ yy_size_t yyget_leng (void)
}
/** Get the current token.
*
*
*/
char *yyget_text (void)
@ -2231,18 +2231,18 @@ char *yyget_text (void)
/** Set the current line number.
* @param line_number
*
*
*/
void yyset_lineno (int line_number )
{
yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
*
* @see yy_switch_to_buffer
*/
void yyset_in (FILE * in_str )
@ -2296,7 +2296,7 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );

View file

@ -71,7 +71,7 @@ static const DMADGameDescription gameDescriptions[] = {
{ kDMSavePlatformAcceptAny }
},
{
{
AD_TABLE_END_MARKER, kDMSaveTargetNone, kDMSaveFormatNone, kDMSavePlatformNone,
{kDMSaveTargetNone}, {kDMSaveFormatNone}, {kDMSavePlatformNone}
}

View file

@ -63,7 +63,7 @@ DoorFrames::DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3,
_rightHorizontal[1] = f4_2;
_rightHorizontal[2] = f4_3;
}
DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
_bitmapScreen = nullptr;
_bitmaps = nullptr;
@ -898,7 +898,7 @@ void DisplayMan::fillBoxBitmap(byte *destBitmap, Box &box, Color color, int16 by
void DisplayMan::blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box& box,
int16 lastUnitIndex, int16 firstUnitIndex, int16 destByteWidth, Color transparent,
int16 xPos, int16 yPos, int16 destHeight, int16 height2) {
// FIXME: does not produce the same effect as the original
byte nextUnitIndex = firstUnitIndex;

View file

@ -393,7 +393,7 @@ bool DMEngine::writeCompleteSaveFile(int16 saveSlot, Common::String& saveDescrip
file->flush();
file->finalize();
delete file;
return true;
}

View file

@ -398,7 +398,7 @@ void DrasculaEngine::increaseFrameNum() {
curHeight = (int)newHeight;
curWidth = (int)newWidth;
}
// Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers
// Chapter 5 Room 45 is the castle tower part
// Fixing the character's coordinate(0,0) in the tower section to prevent out of window coordinates and crash

View file

@ -217,7 +217,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) {
int letterY = 0, letterX = 0, i;
uint len = strlen(said);
byte c;
byte *srcSurface = tableSurface;
if (_lang == kSpanish && currentChapter == 6)
srcSurface = extraSurface;
@ -329,7 +329,7 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) {
//if (x > 160)
// x = 315 - x;
//return (halfLen <= x);
// The commented out code above is what the original engine is doing. Instead of testing the
// upper bound if x is greater than 160 it takes the complement to 315 and test only the lower
// bounds.
@ -349,15 +349,15 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) {
void DrasculaEngine::centerText(const char *message, int textX, int textY) {
char msg[200];
Common::strlcpy(msg, message, 200);
// We make sure to have a width of at least 120 pixels by clipping the center.
// In theory since the screen width is 320 I would expect something like this:
// x = CLIP<int>(x, 60, 260);
// return (x - halfLen >= 0 && x + halfLen <= 319);
// The engines does things differently though. It tries to clips text at 315 instead of 319.
// See also the comment in textFitsCentered().
textX = CLIP<int>(textX, 60, 255);
// If the message fits on screen as-is, just print it here
@ -424,7 +424,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
Common::strlcpy(messageLines[curLine++], messageCurLine, 41);
}
}
// The original starts to draw (nbLines + 2) lines above textY.
// Also clip to the screen height although the original does not do it.
int y = textY - (curLine + 2) * CHAR_HEIGHT;

View file

@ -255,7 +255,7 @@ bool DrasculaEngine::loadGame(int slot) {
if (!(in = _saveFileMan->openForLoading(saveFileName))) {
error("missing savegame file %s", saveFileName.c_str());
}
// If we currently are in room 102 while being attached below the pendulum
// the character is invisible and some surface are temporarily used for other
// things. Reset those before loading the savegame otherwise we may have some
@ -267,7 +267,7 @@ bool DrasculaEngine::loadGame(int slot) {
loadPic(97, extraSurface);
loadPic(99, backSurface);
}
loadMetaData(in, slot, true);
Graphics::skipThumbnail(*in);
@ -300,7 +300,7 @@ bool DrasculaEngine::loadGame(int slot) {
if (!sscanf(currentData, "%d.ald", &roomNum)) {
error("Bad save format");
}
// When loading room 102 while being attached below the pendulum Some variables
// are not correctly set and can cause random crashes when calling enterRoom below.
// The crash occurs in moveCharacters() when accessing factor_red[curY + curHeight].
@ -309,10 +309,10 @@ bool DrasculaEngine::loadGame(int slot) {
curY = 108;
curWidth = curHeight = 0;
}
enterRoom(roomNum);
selectVerb(kVerbNone);
// When loading room 102 while being attached below the pendulum we
// need to call activatePendulum() to properly initialized the scene.
if (_roomNumber == 102 && flags[1] == 2)

View file

@ -379,10 +379,10 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
int y_mask_talk = 170;
int face;
// Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers
// Chapter 5 Room 45 is the castle tower part
// We use this variable as a condition below because at the castle towers we don't want to draw out the head
// We use this variable as a condition below because at the castle towers we don't want to draw out the head
bool notTowers = !((currentChapter == 5) && (_roomNumber == 45));
if (currentChapter == 6) {
@ -488,7 +488,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
centerText(said, 160, 25);
}
}
updateScreen();
updateEvents();

View file

@ -32,7 +32,7 @@ struct FONT_CHAR_INFO {
FONT_CHAR_INFO(byte width, uint16 offset) : _width(width), _offset(offset) {}
};
/*
/*
** Font data for DejaVu Sans 9pt
*/

View file

@ -168,7 +168,7 @@ public:
int32 _gameSysClock, _lastUpdateClock;
bool _animationsDone;
Graphics::Surface *_backgroundSurface;
Graphics::Surface *_frontSurface;

View file

@ -1681,7 +1681,7 @@ void Script::o2_copyscreentobg() {
// TODO: Parameter
if (val)
warning("o2_copyscreentobg: Param is %d", val);
Graphics::Surface *screen = _vm->_system->lockScreen();
_vm->_graphicsMan->_background.copyFrom(screen->getSubArea(Common::Rect(0, 80, 640, 320)));
_vm->_system->unlockScreen();

View file

@ -379,7 +379,7 @@ void LabEngine::decIncInv(uint16 *curInv, bool decreaseFl) {
newInv = 1;
interfaceOff();
while (newInv && (newInv <= _numInv)) {
if (_conditions->in(newInv) && !_inventory[newInv]._bitmapName.empty()) {
_nextFileName = getInvName(newInv);

View file

@ -151,7 +151,7 @@ IntuiMessage *EventManager::getMsg() {
message._msgClass = kMessageButtonUp;
message._code = lastButtonHit->_buttonId;
message._qualifier = _keyPressed.flags;
return &message;
} else
return nullptr;

View file

@ -267,7 +267,7 @@ void LabEngine::doActions(const ActionList &actionList) {
// Puts a file into memory
_graphics->loadPict(action->_messages[0]);
break;
case kActionLoadBitmap:
error("Unused opcode kActionLoadBitmap has been called");

View file

@ -147,7 +147,7 @@ void Resource::readViews(uint16 roomNum) {
Common::String Resource::translateFileName(const Common::String filename) {
Common::String upperFilename;
// The DOS and Windows version aren't looking for the right file,
// The DOS and Windows version aren't looking for the right file,
if (!filename.compareToIgnoreCase("P:ZigInt/BLK") && (_vm->getPlatform() != Common::kPlatformAmiga))
upperFilename = "P:ZigInt/ZIGINT.BLK";
else

View file

@ -397,7 +397,7 @@ void LabEngine::processMonitor(const Common::String &ntext, TextFont *monitorFon
// Exit button
return;
}
if (mouseX <= _utils->vgaScaleX(59)) {
// Back button
if (isInteractive) {

View file

@ -51,7 +51,7 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) {
vfxHeight = 0;
_fxPalette = new byte[768];
_blendedPaletteStatus._active = false;
_blendedPaletteStatus._palette = _blendedPaletteStatus._newPalette = nullptr;
_blendedPaletteStatus._colorCount = 0;

View file

@ -148,7 +148,7 @@ bool Camera::camPan(int16 *picture_view, int16 *player_loc, int display_size, in
if (_direction < 0)
newTarget -= _distOffCenter;
else
else
newTarget += _distOffCenter;
newTarget = MAX(0, newTarget);

View file

@ -72,7 +72,7 @@ void GameConversations::load(int id) {
_conversations[slotIndex]._convId = id;
// Load the conversation data
Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id);
Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id);
_conversations[slotIndex]._data.load(cnvFilename);
// Load the conversation's CND data
@ -371,7 +371,7 @@ void GameConversations::update(bool flag) {
_personSpeaking = 0;
executeEntry(_verbId);
generateMessage(_runningConv->_cnd._messageList1, _runningConv->_cnd._messageList3);
if (_heroTrigger && _popupVisible) {
_vm->_game->_scene._action._activeAction._verbId = _verbId;
_vm->_game->_trigger = _heroTrigger;
@ -438,7 +438,7 @@ void GameConversations::generateMessage(Common::Array<int> &messageList, Common:
// Create the new text dialog
_dialog = new TextDialog(_vm, FONT_INTERFACE,
Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]),
Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]),
portrait, _popupMaxLen[_personSpeaking]);
// Add in the lines
@ -785,7 +785,7 @@ void ConversationConditionals::load(const Common::String &filename) {
// **** Section: Imports *************************************************
int streamNum = 1;
_importVariables.resize(importsCount);
if (importsCount > 0) {
convFile = convFileUnpacked.getItemStream(streamNum++);
@ -848,7 +848,7 @@ void DialogScript::load(Common::SeekableReadStream &s, uint startingOffset) {
instructionOffsets[startingOffset + s.pos()] = size();
push_back(ScriptEntry());
ScriptEntry &se = (*this)[size() - 1];
// Load the instruction
se.load(s);
}

View file

@ -172,7 +172,7 @@ struct ScriptEntry {
DialogCommand _command;
Conditional _conditionals[3];
// Extra parameters for different opcodes
int _index;
Common::Array<int> _entries;
@ -338,7 +338,7 @@ private:
int _personSpeaking;
TextDialog *_dialog;
bool _dialogAltFlag;
/**
* Returns the record for the specified conversation, if it's loaded
*/
@ -435,7 +435,7 @@ public:
* Set the hero trigger
*/
void setHeroTrigger(int val);
/**
* Set the interlocutor trigger
*/
@ -473,7 +473,7 @@ public:
void exportValue(int val);
void reset(int id);
/**
* Handles updating the conversation display
*/

View file

@ -35,7 +35,7 @@ class MADSEngine;
namespace Nebular {
enum MADSGameAction {
enum MADSGameAction {
START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT,
SETS, EVOLVE
};

View file

@ -194,7 +194,7 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam
_channelData[i]._freqBase = 0;
_channelData[i]._field6 = 0;
}
for (int i = 0; i < ADLIB_CHANNEL_COUNT; ++i)
_channels[i]._owner = this;

View file

@ -320,11 +320,11 @@ void Player::activateTrigger() {
_commandsAllowed |= _enableAtTarget;
_enableAtTarget = false;
if (_walkTrigger) {
game._trigger = _walkTrigger;
game._triggerMode = SEQUENCE_TRIGGER_DAEMON;
if (game._triggerMode != SEQUENCE_TRIGGER_DAEMON) {
action._activeAction = _walkTriggerAction;
}

View file

@ -254,7 +254,7 @@ public:
/**
* Return the current drawing/clip area
*/
const Common::Rect getClipBounds() const {
const Common::Rect getClipBounds() const {
const Common::Point pt = getOffsetFromOwner();
return Common::Rect(pt.x, pt.y, pt.x + this->w, pt.y + this->h);
}

View file

@ -339,7 +339,7 @@ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm), _dirtyAreas(vm),
Common::fill(&_categoryIndexes[0], &_categoryIndexes[7], 0);
// Map the user interface to the bottom of the game's screen surface
create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH,
create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH,
MADS_SCREEN_HEIGHT));
_surface.create(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT);

View file

@ -81,7 +81,7 @@ public:
virtual void open() override;
virtual void reflowLayout() override;
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
int getLoadSlot() const {return _loadSlot;}
private:
@ -92,7 +92,7 @@ private:
GUI::SaveLoadChooser *_loadDialog;
GUI::SaveLoadChooser *_saveDialog;
int _loadSlot;
void save();

View file

@ -3889,7 +3889,7 @@ bool LBMiniGameItem::togglePlaying(bool playing, bool restart) {
// Go back to the menu if requested, otherwise go to the requested page
if (returnToMenu)
_vm->addNotifyEvent(NotifyEvent(kLBNotifyGoToControls, 1));
else
else
_vm->addNotifyEvent(NotifyEvent(kLBNotifyChangePage, destPage));
return false;

View file

@ -3609,7 +3609,7 @@ void Myst::gullsFly2_run() {
VideoHandle handle = _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack));
if (!handle)
error("Failed to open gulls movie");
handle->moveTo(424, 0);
_gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334;
}

View file

@ -70,7 +70,7 @@ public:
/**
* Play an effect sound
*
*
* @param id Sound ID in the stack
* @param volume Playback volume, between 0 and 255
* @param playOnDraw Start playing when the current card is drawn instead of immediatly

View file

@ -346,7 +346,7 @@ private:
// Utility functions for managing entries
VideoEntryPtr open(uint16 id);
VideoEntryPtr open(const Common::String &fileName);
VideoList::iterator findEntry(VideoEntryPtr ptr);
void removeEntry(VideoEntryPtr ptr);

View file

@ -675,7 +675,7 @@ bool Console::cmdRegisters(int argc, const char **argv) {
bool Console::parseResourceNumber36(const char *userParameter, uint16 &resourceNumber, uint32 &resourceTuple) {
int userParameterLen = strlen(userParameter);
if (userParameterLen != 10) {
debugPrintf("Audio36/Sync36 resource numbers must be specified as RRRNNVVCCS\n");
debugPrintf("where RRR is the resource number/map\n");
@ -760,7 +760,7 @@ void Console::cmdDiskDumpWorker(ResourceType resourceType, int resourceNumber, u
ResourceId resourceId;
Resource *resource = NULL;
char outFileName[50];
switch (resourceType) {
case kResourceTypeAudio36:
case kResourceTypeSync36: {
@ -877,7 +877,7 @@ bool Console::cmdList(int argc, const char **argv) {
currentMap = map;
displayCount = 0;
}
if (displayCount % 3 == 0)
debugPrintf(" ");
@ -2946,7 +2946,7 @@ bool Console::cmdScriptObjects(int argc, const char **argv) {
debugPrintf("<script number> may be * to show objects inside all loaded scripts\n");
return true;
}
if (strcmp(argv[1], "*") == 0) {
// get said-strings of all currently loaded scripts
curScriptNr = -1;
@ -2968,7 +2968,7 @@ bool Console::cmdScriptStrings(int argc, const char **argv) {
debugPrintf("<script number> may be * to show strings inside all loaded scripts\n");
return true;
}
if (strcmp(argv[1], "*") == 0) {
// get strings of all currently loaded scripts
curScriptNr = -1;
@ -2990,7 +2990,7 @@ bool Console::cmdScriptSaid(int argc, const char **argv) {
debugPrintf("<script number> may be * to show said-strings inside all loaded scripts\n");
return true;
}
if (strcmp(argv[1], "*") == 0) {
// get said-strings of all currently loaded scripts
curScriptNr = -1;

View file

@ -805,7 +805,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
if (in) {
SavegameMetadata meta;
if (!get_savegame_metadata(in, &meta)) {
// invalid
delete in;

View file

@ -73,7 +73,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
g_debug_simulated_key = 0;
return make_reg(0, 1);
}
curEvent = g_sci->getEventManager()->getSciEvent(mask);
if (s->_delayedRestoreGame) {

View file

@ -356,7 +356,7 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) {
}
textWidth = dest[3].toUint16(); textHeight = dest[2].toUint16();
uint16 languageSplitter = 0;
Common::String splitText = g_sci->strSplitLanguage(text.c_str(), &languageSplitter, sep);
@ -832,7 +832,7 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) {
uint16 languageSplitter = 0;
Common::String splitText;
switch (type) {
case SCI_CONTROLS_TYPE_BUTTON:
case SCI_CONTROLS_TYPE_TEXTEDIT:
@ -1191,7 +1191,7 @@ reg_t kDisplay(EngineState *s, int argc, reg_t *argv) {
argc--; argc--; argv++; argv++;
text = g_sci->getKernel()->lookupText(textp, index);
}
uint16 languageSplitter = 0;
Common::String splitText = g_sci->strSplitLanguage(text.c_str(), &languageSplitter);

View file

@ -1882,7 +1882,7 @@ static const uint16 kq7SignatureSubtitleFix3[] = {
static const uint16 kq7PatchSubtitleFix3[] = {
PATCH_ADDTOOFFSET(+2), // skip over "pToa initialized code"
0x2f, 0x0c, // bt [skip init code] - saved 1 byte
0x38,
0x38,
PATCH_GETORIGINALBYTE(+6),
PATCH_GETORIGINALBYTE(+7), // pushi (init)
0x76, // push0
@ -3916,7 +3916,7 @@ static const uint16 qfg3PatchRoom750Bounds1[] = {
static const uint16 qfg3SignatureRoom750Bounds2[] = {
// (ego x: 294 y: 39)
0x78, // push1 ("x")
0x78, // push1
0x78, // push1
0x38, SIG_UINT16(294), // pushi 294
0x76, // push0 ("y")
0x78, // push1

View file

@ -834,7 +834,7 @@ public:
}
}
}
/**
* Copies the string data held by this array into a new Common::String.
*/

View file

@ -202,12 +202,12 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu
const byte *textPtr = (const byte *)str.c_str();
byte curChar = 0;
byte curChar2 = 0;
while (1) {
curChar = *textPtr;
if (!curChar)
break;
if ((curChar == '%') || (curChar == '#')) {
curChar2 = *(textPtr + 1);
foundLanguage = charToLanguage(curChar2);
@ -236,7 +236,7 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu
while (1) {
curChar = *textPtr;
switch (curChar) {
case 0: // Terminator NUL
return fullWidth;
@ -257,7 +257,7 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu
continue;
}
}
textPtr++;
mappedChar = s_halfWidthSJISMap[curChar];

View file

@ -75,7 +75,7 @@ private:
byte height;
int16 offset;
};
byte _fontHeight;
uint16 _numChars;
Charinfo *_chars;

View file

@ -91,7 +91,7 @@ void GfxPaint32::plotter(int x, int y, int color, void *data) {
const uint16 bitmapWidth = properties.bitmap->getWidth();
const uint16 bitmapHeight = properties.bitmap->getHeight();
const uint32 index = bitmapWidth * y + x;
// Only draw the points in the bitmap, and ignore the rest. SSCI scripts
// can draw lines ending outside the visible area (e.g. negative coordinates)
if (x >= 0 && x < bitmapWidth && y >= 0 && y < bitmapHeight) {

View file

@ -1004,14 +1004,14 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by
int16 borderRight = curPort->rect.right + curPort->left - 1;
int16 borderBottom = curPort->rect.bottom + curPort->top - 1;
int16 curToLeft, curToRight, a_set, b_set;
// Translate coordinates, if required (needed for Macintosh 480x300)
_screen->vectorAdjustCoordinate(&borderLeft, &borderTop);
_screen->vectorAdjustCoordinate(&borderRight, &borderBottom);
//return;
stack.push(p);
while (stack.size()) {
p = stack.pop();
if ((matchedMask = _screen->vectorIsFillMatch(p.x, p.y, matchMask, searchColor, searchPriority, searchControl, isEGA)) == 0) // already filled
@ -1239,7 +1239,7 @@ void GfxPicture::vectorPatternTexturedCircle(Common::Rect box, byte size, byte c
byte bitNo = 0;
const bool *textureData = &vectorPatternTextures[vectorPatternTextureOffset[texture]];
int y, x;
for (y = box.top; y < box.bottom; y++) {
for (x = box.left; x < box.right; x++) {
if (bitmap & 1) {

View file

@ -37,7 +37,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
// Scale the screen, if needed
_upscaledHires = GFX_SCREEN_UPSCALED_DISABLED;
// we default to scripts running at 320x200
_scriptWidth = 320;
_scriptHeight = 200;
@ -45,7 +45,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_height = 0;
_displayWidth = 0;
_displayHeight = 0;
// King's Quest 6 and Gabriel Knight 1 have hires content, gk1/cd was able
// to provide that under DOS as well, but as gk1/floppy does support
// upscaled hires scriptswise, but doesn't actually have the hires content
@ -58,7 +58,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
// Japanese versions of games use hi-res font on upscaled version of the game.
if ((g_sci->getLanguage() == Common::JA_JPN) && (getSciVersion() <= SCI_VERSION_1_1))
_upscaledHires = GFX_SCREEN_UPSCALED_640x400;
// Macintosh SCI0 games used 480x300, while the scripts were running at 320x200
if (g_sci->getPlatform() == Common::kPlatformMacintosh) {
if (getSciVersion() <= SCI_VERSION_01) {
@ -66,7 +66,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_width = 480;
_height = 300; // regular visual, priority and control map are 480x300 (this is different than other upscaled SCI games)
}
// Some Mac SCI1/1.1 games only take up 190 rows and do not
// have the menu bar.
// TODO: Verify that LSL1 and LSL5 use height 190
@ -145,7 +145,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
}
_displayPixels = _displayWidth * _displayHeight;
// Allocate visual, priority, control and display screen
_visualScreen = (byte *)calloc(_pixels, 1);
_priorityScreen = (byte *)calloc(_pixels, 1);
@ -314,7 +314,7 @@ void GfxScreen::vectorAdjustLineCoordinates(int16 *left, int16 *top, int16 *righ
void GfxScreen::vectorPutLinePixel(int16 x, int16 y, byte drawMask, byte color, byte priority, byte control) {
if (_upscaledHires == GFX_SCREEN_UPSCALED_480x300) {
vectorPutLinePixel480x300(x, y, drawMask, color, priority, control);
return;
return;
}
// For anything else forward to the regular putPixel
@ -628,7 +628,7 @@ void GfxScreen::dither(bool addToFlag) {
byte color, ditheredColor;
byte *visualPtr = _visualScreen;
byte *displayPtr = _displayScreen;
if (!_unditheringEnabled) {
// Do dithering on visual and display-screen
for (y = 0; y < _height; y++) {

View file

@ -289,7 +289,7 @@ public:
default:
break;
}
// For non-upscaled mode and 480x300 Mac put pixels directly
int offset = y * _width + x;

View file

@ -83,7 +83,7 @@ void GfxText16::ClearChar(int16 chr) {
}
// This internal function gets called as soon as a '|' is found in a text. It
// will process the encountered code and set new font/set color.
// will process the encountered code and set new font/set color.
// Returns textcode character count.
int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor, bool doingDrawing) {
const char *textCode = text;
@ -179,7 +179,7 @@ static const uint16 text16_shiftJIS_punctuation_SCI01[] = {
// return max # of chars to fit maxwidth with full words, does not include
// breaking space
// Also adjusts text pointer to the new position for the caller
//
//
// Special cases in games:
// Laura Bow 2 - Credits in the game menu - all the text lines start with spaces (bug #5159)
// Act 6 Coroner questionaire - the text of all control buttons has trailing spaces
@ -245,7 +245,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
break;
}
tempWidth += _font->getCharWidth(curChar);
// Width is too large? -> break out
if (tempWidth > maxWidth)
break;

View file

@ -64,7 +64,7 @@ public:
void Box(const char *text, bool show, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId) {
Box(text, 0, show, rect, alignment, fontId);
}
void DrawString(const char *text);
void DrawStatus(const char *text);

View file

@ -99,7 +99,7 @@ static const byte v0ActorTalk[25] = {
0x06, // Sandy (Cut-Scene)
};
static const byte v0WalkboxSlantedModifier[0x16] = {
static const byte v0WalkboxSlantedModifier[0x16] = {
0x00,0x01,0x02,0x03,0x03,0x04,0x05,0x06,
0x06,0x07,0x08,0x09,0x09,0x0A,0x0B,
0x0C,0x0C,0x0D,0x0E,0x0F,0x10,0x10
@ -237,7 +237,7 @@ void Actor_v0::initActor(int mode) {
_costCommand = 0xFF;
_miscflags = 0;
_speaking = 0;
_walkCountModulo = 0;
_newWalkBoxEntered = false;
_walkDirX = 0;
@ -297,7 +297,7 @@ void Actor_v0::walkboxQueueReverse() {
return;
for (int i = 1; i < j && j >= 1 ; ++i, --j) {
byte tmp = _walkboxQueue[i];
_walkboxQueue[i] = _walkboxQueue[j];
@ -371,7 +371,7 @@ bool Actor_v0::walkBoxQueuePrepare() {
_walkboxQueue[--_walkboxQueueIndex] = kInvalidBox;
BoxFound = _walkboxQueue[_walkboxQueueIndex - 1];
}
}
} while (_walkboxQueueIndex > 0);
@ -616,7 +616,7 @@ bool Actor_v0::calcWalkDistances() {
if (!_walkXCountInc && !_walkYCountInc)
return true;
if (_walkXCountInc <= _walkYCountInc)
if (_walkXCountInc <= _walkYCountInc)
_walkYCountGreaterThanXCount = 1;
// 2FCC
@ -652,7 +652,7 @@ byte Actor_v0::actorWalkX() {
setActorFromTmp();
return 3;
}
}
// 2EBF
if (_tmp_Dest.x == _CurrentWalkTo.x)
return 1;
@ -679,7 +679,7 @@ byte Actor_v0::actorWalkY() {
// 2EF8
setActorFromTmp();
return 4;
}
}
// 2EFE
if (_walkYCountInc != 0) {
if (_walkYCountInc == 0xFF) {
@ -690,7 +690,7 @@ byte Actor_v0::actorWalkY() {
// 2F0D
if (_CurrentWalkTo.y == _tmp_Dest.y)
return 1;
return 0;
}
@ -904,8 +904,8 @@ L2A33:;
}
directionUpdate();
if (_moving & 0x80)
if (_moving & 0x80)
return;
animateActor(newDirToOldDir(_facing));
@ -913,7 +913,7 @@ L2A33:;
} else {
// 2A0A
if ((_moving & 0x7F) != 1) {
if (_NewWalkTo == _pos)
return;
}
@ -1025,7 +1025,7 @@ L2CA3:;
_moving &= 0xF0;
_moving |= A;
} else {
if (A == 4)
if (A == 4)
stopActorMoving();
}
@ -1061,7 +1061,7 @@ L2CA3:;
} else {
_targetFacing = getAngleFromPos(V12_X_MULTIPLIER*-1, V12_Y_MULTIPLIER*0, false);
}
directionUpdate();
animateActor(newDirToOldDir(_facing));
goto L2CA3;
@ -1433,13 +1433,13 @@ void Actor::turnToDirection(int newdir) {
if (_vm->_game.version <= 6) {
_targetFacing = newdir;
if (_vm->_game.version == 0) {
setDirection(newdir);
return;
}
_moving = MF_TURN;
} else {
_moving &= ~MF_TURN;
if (newdir != _facing) {
@ -1637,7 +1637,7 @@ AdjustBoxResult Actor_v0::adjustPosInBorderWalkbox(AdjustBoxResult box) {
int16 A;
boxMask &= 0x7C;
if (boxMask == 0x0C)
if (boxMask == 0x0C)
A = 2;
else {
if (boxMask != 0x08)
@ -2114,7 +2114,7 @@ void ScummEngine::processActors() {
// comment further up in this method for some details.
if (a->_costume) {
// Unfortunately in V0, the 'animateCostume' call happens right after the call to 'walkActor' (which is before drawing the actor)...
// Unfortunately in V0, the 'animateCostume' call happens right after the call to 'walkActor' (which is before drawing the actor)...
// doing it the other way with V0, causes animation glitches (when beginnning to walk, as the costume hasnt been updated).
// Updating the costume directly after 'walkActor' and again, after drawing... causes frame skipping
if (_game.version == 0) {
@ -3476,7 +3476,7 @@ void Actor_v0::saveLoadWithSerializer(Serializer *ser) {
// valid costume command?
if (_costCommand != 0xFF) {
// Do we have a walkbox queue?
if (_walkboxQueueIndex < 1) {
_costCommand = 0xFF;

View file

@ -262,7 +262,7 @@ ScummDiskImage::ScummDiskImage(const char *disk1, const char *disk2, GameSetting
_numGlobalObjects = 256;
_numRooms = 55;
_numCostumes = 25;
if (_game.features & GF_DEMO) {
_numScripts = 55;
_numSounds = 40;

View file

@ -446,7 +446,7 @@ int LogicHEmoonbase::op_net_get_session_player_count(int op, int numArgs, int32
return _vm1->_moonbase->_net->getSessionPlayerCount(args[0] - 1);
}
int LogicHEmoonbase::op_net_destroy_player(int op, int numArgs, int32 *args) {
int LogicHEmoonbase::op_net_destroy_player(int op, int numArgs, int32 *args) {
return _vm1->_moonbase->_net->destroyPlayer(args[0]);
}
@ -506,7 +506,7 @@ int LogicHEmoonbase::op_net_who_am_i(int op, int numArgs, int32 *args) {
}
int LogicHEmoonbase::op_net_set_provider_by_name(int op, int numArgs, int32 *args) {
// Parameter 1 is the provider name and
// Parameter 1 is the provider name and
// Parameter 2 is the (optional) tcp/ip address
return _vm1->_moonbase->_net->setProviderByName(args[0], args[1]);
}

View file

@ -72,7 +72,7 @@ public:
void getSessionName(int sessionNumber, char *buffer, int length);
int getSessionPlayerCount(int sessionNumber);
void getProviderName(int providerIndex, char *buffer, int length);
private:
//mostly getters

View file

@ -1506,7 +1506,7 @@ void ScummEngine_v72he::getStringFromArray(int arrayNumber, char *buffer, int ma
// this is ARRAY_GetStringFromArray() from ARRAYS.cpp of SPUTM
// this function makes a C-string out of <arrayNumber> contents
VAR(0) = arrayNumber; // it was 0 in original code, but I've seen ScummVM Moonbase code which uses VAR_U32_ARRAY_UNK
int i, ch;

View file

@ -39,7 +39,7 @@ void ScummEngine_v2::readClassicIndexFile() {
_numSounds = 40;
} else {
_numScripts = 160;
_numSounds = 70;
_numSounds = 70;
}
} else if (_game.platform == Common::kPlatformNES) {

View file

@ -641,7 +641,7 @@ void ScummEngine_v0::setMode(byte mode) {
// Note: do not change freeze state here
state = USERSTATE_SET_IFACE |
USERSTATE_SET_CURSOR;
break;
case kModeKeypad:
if (_game.features & GF_DEMO) {

View file

@ -905,7 +905,7 @@ void ScummEngine_v0::checkExecVerbs() {
}
}
}
if (_drawDemo && _game.features & GF_DEMO) {
verbDemoMode();
}

View file

@ -57,7 +57,7 @@ public:
* Load the prologue name array
*/
void setPrologueNames(const char *const *names, int count);
/**
* Load the prologue frame array
*/
@ -67,7 +67,7 @@ public:
* Load the title name array
*/
void setTitleNames(const char *const *names, int count);
/**
* Load the title frame array
*/

View file

@ -94,7 +94,7 @@ void Events::setCursor(CursorId cursorId) {
void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) {
_cursorId = INVALID_CURSOR;
_hotspotPos = Common::Point(hotspotX, hotspotY);
if (!IS_3DO) {
// PC 8-bit palettized
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
@ -400,7 +400,7 @@ bool Events::checkInput() {
void Events::incWaitCounter() {
setCursor(WAIT);
++_waitCounter;
++_waitCounter;
}
void Events::decWaitCounter() {

View file

@ -140,7 +140,7 @@ void Fonts::setFont(int fontNum) {
_yOffsets[idx] = 0;
if (IS_ROSE_TATTOO) {
if ((idx >= 129 && idx < 135) || (idx >= 136 && idx < 143) || (idx >= 147 && idx < 155) ||
if ((idx >= 129 && idx < 135) || (idx >= 136 && idx < 143) || (idx >= 147 && idx < 155) ||
(idx >= 156 && idx < 165))
_yOffsets[idx] = 1;
else if ((idx >= 143 && idx < 146) || idx == 165)

View file

@ -44,7 +44,7 @@ protected:
static int _widestChar;
static uint16 _charCount;
static void writeString(BaseSurface *surface, const Common::String &str,
static void writeString(BaseSurface *surface, const Common::String &str,
const Common::Point &pt, int overrideColor = 0);
static inline byte translateChar(byte c);

View file

@ -196,7 +196,7 @@ bool MidiParser_SH::loadMusic(byte *musData, uint32 musDataSize) {
_numTracks = 1;
_tracks[0] = pos;
_ppqn = 1;
setTempo(16667);
setTrack(0);

View file

@ -66,7 +66,7 @@ private:
Audio::SoundHandle _digitalMusicHandle;
MusicType _musicType;
byte *_midiMusicData;
/**
* Play the specified music resource
*/
@ -100,7 +100,7 @@ public:
* Start playing a song
*/
void startSong();
/**
* Free any currently loaded song
*/
@ -110,7 +110,7 @@ public:
* Stop playing the music
*/
void stopMusic();
bool isPlaying();
uint32 getCurrentPosition();

View file

@ -267,7 +267,7 @@ void BaseObject::checkObject() {
break;
}
_frameNumber += 3;
} else {
v -= 128;
@ -306,7 +306,7 @@ void BaseObject::checkObject() {
}
} else if (IS_ROSE_TATTOO && v == 10) {
// Set delta for objects
_delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]),
_delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]),
READ_LE_UINT16(&_sequences[_frameNumber + 3]));
_noShapeSize = Common::Point(0, 0);
_frameNumber += 4;
@ -644,7 +644,7 @@ void Sprite::clear() {
void Sprite::setImageFrame() {
int frameNum = MAX(_frameNumber, 0);
int imageNumber = _walkSequences[_sequenceNumber][frameNum];
if (IS_SERRATED_SCALPEL)
imageNumber = imageNumber + _walkSequences[_sequenceNumber][0] - 2;
else if (imageNumber > _maxFrames)
@ -1014,7 +1014,7 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) {
_oldPosition.y = s.readSint16LE();
_oldSize.x = s.readUint16LE();
_oldSize.y = s.readUint16LE();
_goto.x = s.readSint16LE();
_goto.y = s.readSint16LE();
if (!isRoseTattoo) {
@ -1113,7 +1113,7 @@ void Object::load3DO(Common::SeekableReadStream &s) {
_oldPosition.y = s.readSint16BE();
_oldSize.x = s.readUint16BE();
_oldSize.y = s.readUint16BE();
_goto.x = s.readSint16BE();
_goto.y = s.readSint16BE();
_goto.x = _goto.x * FIXED_INT_MULTIPLIER / 100;
@ -1485,7 +1485,7 @@ void CAnim::load(Common::SeekableReadStream &s, bool isRoseTattoo, uint32 dataOf
_position.x = s.readSint16LE();
_position.y = s.readSint16LE();
if (isRoseTattoo) {
_flags = s.readByte();
_scaleVal = s.readSint16LE();

View file

@ -92,7 +92,7 @@ enum {
#define GOTO_CODE 228
#define TALK_SEQ_CODE 252 // Code specifying start of talk sequence frames in a Sequence
#define TALK_LISTEN_CODE 251 // Code specifying start of talk listen frames in a Sequence
#define ALLOW_TALK_CODE 250
#define ALLOW_TALK_CODE 250
#define UPPER_LIMIT 0
#define LOWER_LIMIT (IS_SERRATED_SCALPEL ? CONTROLS_Y : SHERLOCK_SCREEN_HEIGHT)
@ -124,7 +124,7 @@ public:
PositionFacing() : Point32(), _facing(0) {}
PositionFacing(int xp, int yp, int theFacing) : Point32(xp, yp), _facing(theFacing) {}
PositionFacing &operator=(const Point32 &pt) {
PositionFacing &operator=(const Point32 &pt) {
x = pt.x; y = pt.y;
return *this;
}

View file

@ -244,7 +244,7 @@ bool People::freeWalk() {
if (_data[idx]->_walkLoaded) {
delete _data[idx]->_images;
_data[idx]->_images = nullptr;
_data[idx]->_walkLoaded = false;
result = true;
}

View file

@ -168,10 +168,10 @@ public:
virtual const Common::Point restrictToZone(int zoneId, const Common::Point &destPos) = 0;
/**
* If the specified speaker is a background object, it will set it so that it uses
* the Listen Sequence (specified by the sequence number). If the current sequence
* has an Allow Talk Code in it, the _gotoSeq field will be set so that the object
* begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code,
* If the specified speaker is a background object, it will set it so that it uses
* the Listen Sequence (specified by the sequence number). If the current sequence
* has an Allow Talk Code in it, the _gotoSeq field will be set so that the object
* begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code,
* the Listen Sequence will begin immediately.
* @param speaker Who is speaking
* @param sequenceNum Which listen sequence to use

View file

@ -119,7 +119,7 @@ void Resources::addToCache(const Common::String &filename) {
// Return immediately if the library has already been loaded
if (_indexes.contains(filename))
return;
_cache.load(filename);
// Check to see if the file is a library

View file

@ -100,12 +100,12 @@ public:
* loading its index for future use
*/
void addToCache(const Common::String &filename);
/**
* Adds a resource from a library file to the cache
*/
void addToCache(const Common::String &filename, const Common::String &libFilename);
/**
* Adds a given stream to the cache under the given name
*/

View file

@ -133,7 +133,7 @@ public:
* Load the game in the specified slot
*/
void loadGame(int slot);
/**
* Save the game in the specified slot with the given name
*/

View file

@ -140,7 +140,7 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) {
_stream->readUint32BE(); // Unknown 0x00004000
_stream->readUint32BE(); // Unknown 0x00000000
_stream->readUint32BE(); // Unknown 0x00000010
audioSampleRate = _stream->readUint32BE();
audioSampleRate = _stream->readUint32BE();
audioChannels = _stream->readUint32BE();
audioCodecTag = _stream->readUint32BE();
_stream->readUint32BE(); // Unknown 0x00000004 compression ratio?

View file

@ -42,7 +42,7 @@ protected:
/**
* Draws a surface at a given position within this surface with transparency
*/
virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped,
virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped,
int overrideColor);
public:
Scalpel3DOScreen(SherlockEngine *vm);

View file

@ -507,7 +507,7 @@ bool ScalpelEngine::showAlleyCutscene() {
}
if (finished) {
// quick fade out
// quick fade out
_screen->fadeToBlack(1);
// wait until after third "scream" in music happened

View file

@ -408,7 +408,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
if (!(idx % 8))
events.wait(1);
++idx;
} while (!done);

View file

@ -53,7 +53,7 @@ private:
* Initializes the variables needed for the dart game
*/
void initDarts();
/**
* Frees the images used by the dart game
*/
@ -98,7 +98,7 @@ private:
* Returns true if a mouse button or key is pressed.
*/
int dartHit();
/**
* Return the score of the given location on the dart-board
*/

View file

@ -112,10 +112,10 @@ public:
virtual bool loadWalk();
/**
* If the specified speaker is a background object, it will set it so that it uses
* the Listen Sequence (specified by the sequence number). If the current sequence
* has an Allow Talk Code in it, the _gotoSeq field will be set so that the object
* begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code,
* If the specified speaker is a background object, it will set it so that it uses
* the Listen Sequence (specified by the sequence number). If the current sequence
* has an Allow Talk Code in it, the _gotoSeq field will be set so that the object
* begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code,
* the Listen Sequence will begin immediately.
* @param speaker Who is speaking
* @param sequenceNum Which listen sequence to use

View file

@ -40,7 +40,7 @@ const int ENV_POINTS[6][3] = {
/*----------------------------------------------------------------*/
ScalpelSaveManager::ScalpelSaveManager(SherlockEngine *vm, const Common::String &target) :
ScalpelSaveManager::ScalpelSaveManager(SherlockEngine *vm, const Common::String &target) :
SaveManager(vm, target), _envMode(SAVEMODE_NONE) {
_fixedTextExit = FIXED(LoadSave_Exit);
@ -262,14 +262,14 @@ bool ScalpelSaveManager::promptForDescription(int slot) {
xp -= screen.charWidth(saveName.lastChar());
screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_FOREGROUND);
saveName.deleteLastChar();
} else if (keyState.keycode == Common::KEYCODE_RETURN && saveName.compareToIgnoreCase(EMPTY_SAVEGAME_SLOT)) {
done = 1;
} else if (keyState.keycode == Common::KEYCODE_ESCAPE) {
screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_BACKGROUND);
done = -1;
} else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && saveName.size() < 50
&& (xp + screen.charWidth(keyState.ascii)) < 308) {
char c = (char)keyState.ascii;

View file

@ -136,7 +136,7 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) {
(OpcodeMethod)&ScalpelTalk::cmdHolmesOn,
(OpcodeMethod)&ScalpelTalk::cmdGotoScene,
(OpcodeMethod)&ScalpelTalk::cmdPlayPrologue,
(OpcodeMethod)&ScalpelTalk::cmdAddItemToInventory,
(OpcodeMethod)&ScalpelTalk::cmdSetObject,
(OpcodeMethod)&ScalpelTalk::cmdCallTalkFile,
@ -147,7 +147,7 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) {
(OpcodeMethod)&ScalpelTalk::cmdRemoveItemFromInventory,
(OpcodeMethod)&ScalpelTalk::cmdEnableEndKey,
(OpcodeMethod)&ScalpelTalk::cmdDisableEndKey,
(OpcodeMethod)&ScalpelTalk::cmdEndTextWindow,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
@ -387,7 +387,7 @@ OpcodeReturn ScalpelTalk::cmdClearInfoLine(const byte *&str) {
OpcodeReturn ScalpelTalk::cmdClearWindow(const byte *&str) {
UserInterface &ui = *_vm->_ui;
ui.clearWindow();
_yp = CONTROLS_Y + 12;
_charCount = _line = 0;
@ -450,7 +450,7 @@ OpcodeReturn ScalpelTalk::cmdMoveMouse(const byte *&str) {
if (_talkToAbort)
return RET_EXIT;
str += 3;
return RET_SUCCESS;
}
@ -650,7 +650,7 @@ bool ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
}
Common::Point ScalpelTalk::get3doPortraitPosition() const {
// TODO: This current method is only an assumption of how the original figured
// TODO: This current method is only an assumption of how the original figured
// out where to place each character's portrait movie.
People &people = *_vm->_people;
Scene &scene = *_vm->_scene;
@ -672,7 +672,7 @@ Common::Point ScalpelTalk::get3doPortraitPosition() const {
pt = scene._bgShapes[objNum]._position;
}
// Adjust the top-left so the center of the portrait will be on the character,
// but ensure the portrait will be entirely on-screen
pt -= Common::Point(PORTRAIT_W / 2, PORTRAIT_H / 2);

View file

@ -105,38 +105,38 @@ private:
* Handles input when the file list window is being displayed
*/
void doEnvControl();
/**
* Handle input whilst the inventory is active
*/
void doInvControl();
/**
* Handles waiting whilst an object's description window is open.
*/
void doLookControl();
/**
* Handles input until one of the user interface buttons/commands is selected
*/
void doMainControl();
/**
* Handles the input for the MOVE, OPEN, and CLOSE commands
*/
void doMiscControl(int allowed);
/**
* Handles input for picking up items
*/
void doPickControl();
/**
* Handles input when in talk mode. It highlights the buttons and available statements,
* and handles allowing the user to click on them
*/
void doTalkControl();
/**
* Handles events when the Journal is active.
* @remarks Whilst this would in theory be better in the Journal class, since it displays in
@ -150,7 +150,7 @@ private:
*/
void checkUseAction(const UseType *use, const Common::String &invName, FixedTextActionId fixedTextActionId,
int objNum, bool giveMode);
/**
* Print the previously selected object's decription
*/
@ -212,7 +212,7 @@ public:
/**
* Draw the user interface onto the screen's back buffers
*/
*/
virtual void drawInterface(int bufferNum = 3);
/**
@ -243,7 +243,7 @@ public:
/**
* Print the previously selected object's decription
*/
*/
virtual void printObjectDesc();
};

View file

@ -181,7 +181,7 @@ void Object::setAnimMode(bool isAnimating) {
}
void Object::setDestination(const Common::Point &pt) {
_destination = pt;
_destination = pt;
int moveRate = 10;
_walkStartFrame = _vm->_events->getFrameCounter();
@ -215,7 +215,7 @@ void Object::setDestination(const Common::Point &pt) {
void Object::erase() {
Screen &screen = *_vm->_screen;
if (_visage.isLoaded() && !_oldBounds.isEmpty())
screen.SHblitFrom(screen._backBuffer1, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds);
}
@ -233,7 +233,7 @@ void Object::update() {
move();
}
}
if (_isAnimating) {
if (_frame < _visage.getFrameCount())
_frame = changeFrame();
@ -436,7 +436,7 @@ Logo::Logo(ScalpelEngine *vm) : _vm(vm), _lib("sf3.rlb") {
_animateFrameDelay = 0;
_animateFrames = NULL;
_animateFrame = 0;
// Save a copy of the original palette
_vm->_screen->getPalette(_originalPalette);
@ -630,7 +630,7 @@ void Logo::startAnimation(uint object, uint frameDelay, const AnimationFrame *fr
void Logo::loadBackground() {
Screen &screen = *_vm->_screen;
for (int idx = 0; idx < 4; ++idx) {
// Get the portion of the screen
Common::SeekableReadStream *stream = _lib.getResource(RES_BITMAP, 10, idx);

View file

@ -79,7 +79,7 @@ public:
* Get a frame from the visage
*/
void getFrame(ObjectSurface &s, int frameNum);
/**
* Return the number of frames
*/

View file

@ -374,7 +374,7 @@ bool Scene::loadScene(const Common::String &filename) {
} else {
rrmStream->read(screen._backBuffer1.getPixels(), fullWidth * SHERLOCK_SCREEN_HEIGHT);
}
}
}
// Read in the shapes header info
Common::Array<BgFileHeaderInfo> bgInfo;
@ -528,7 +528,7 @@ bool Scene::loadScene(const Common::String &filename) {
delete[] cAnimOffsetTablePtr;
}
// Read in the room bounding areas
int size = rrmStream->readUint16LE();
@ -627,7 +627,7 @@ bool Scene::loadScene(const Common::String &filename) {
if (IS_ROSE_TATTOO) {
// Load the object sound list
char buffer[27];
_objSoundList.resize(rrmStream->readUint16LE());
for (uint idx = 0; idx < _objSoundList.size(); ++idx) {
rrmStream->read(buffer, 27);
@ -1205,9 +1205,9 @@ void Scene::transitionToScene() {
if (hSavedFacing < 8 && !saves._justLoaded) {
if (IS_ROSE_TATTOO)
hSavedFacing = Tattoo::FS_TRANS[hSavedFacing];
else
else
hSavedFacing = Scalpel::FS_TRANS[hSavedFacing];
hSavedPos.x *= FIXED_INT_MULTIPLIER;
hSavedPos.y *= FIXED_INT_MULTIPLIER;
}
@ -1235,7 +1235,7 @@ void Scene::transitionToScene() {
people[HOLMES]._position = Common::Point(0, 0);
}
// If the scene is capable of scrolling, set the current scroll so that whoever has control
// If the scene is capable of scrolling, set the current scroll so that whoever has control
// of the scroll code is in the middle of the screen
if (screen._backBuffer1.width() > SHERLOCK_SCREEN_WIDTH)
people[people._walkControl].centerScreenOnPerson();
@ -1256,7 +1256,7 @@ void Scene::transitionToScene() {
}
if (Common::Rect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y).contains(
Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER,
Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER,
people[HOLMES]._position.y / FIXED_INT_MULTIPLIER))) {
// Current point is already inside box - impact occurred on
// a previous call. So simply do nothing except talk until the

Some files were not shown because too many files have changed in this diff Show more