Skip to content

Commit

Permalink
ACCESS: gcc compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent 89b20c6 commit 7434c76
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
1 change: 0 additions & 1 deletion engines/access/access.cpp
Expand Up @@ -220,7 +220,6 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) {
soundsLeft = _countTbl[curPage];
_events->zeroKeys();

Common::String line;
int width = 0;
bool lastLine = _fonts._font2.getLine(lines, s->_maxChars * 6, line, width);

Expand Down
2 changes: 1 addition & 1 deletion engines/access/access.h
Expand Up @@ -117,7 +117,7 @@ class AccessEngine : public Engine {
* Support method that generates a savegame name
* @param slot Slot number
*/
Common::String AccessEngine::generateSaveName(int slot);
Common::String generateSaveName(int slot);

/**
* Play back an entire video
Expand Down
2 changes: 1 addition & 1 deletion engines/access/amazon/amazon_game.cpp
Expand Up @@ -672,7 +672,7 @@ void AmazonEngine::helpTitle() {

Common::String iqText = "IQ: ";
calcIQ();
Common::String IQSCORE = Common::String::format("d", _iqValue);
Common::String IQSCORE = Common::String::format("%d", _iqValue);
while (IQSCORE.size() != 4)
IQSCORE = " " + IQSCORE;

Expand Down
2 changes: 1 addition & 1 deletion engines/access/amazon/amazon_game.h
Expand Up @@ -165,7 +165,7 @@ class AmazonEngine : public AccessEngine {
bool _deathFlag;
int _deathCount;
int _deathType;
byte *_mapPtr;
const byte *_mapPtr;
int _canoeVXPos;
int _canoeMoveCount;
int _canoeFrame;
Expand Down
6 changes: 3 additions & 3 deletions engines/access/amazon/amazon_resources.cpp
Expand Up @@ -1653,7 +1653,7 @@ RiverStruct RIVER0OBJECTS[45] = {
{17, 30, 305, 0, 2, 15}
};

RiverStruct ENDRIVER0[1] = {16, 31, 260, 0, 7, 12};
RiverStruct ENDRIVER0[1] = { { 16, 31, 260, 0, 7, 12 } };

RiverStruct RIVER1OBJECTS[49] = {
{16, 31, 6920, 0, 1, 12},
Expand Down Expand Up @@ -1707,7 +1707,7 @@ RiverStruct RIVER1OBJECTS[49] = {
{17, 30, 305, 0, 3, 15}
};

RiverStruct ENDRIVER1[1] = {16, 31, 260, 0, 1, 12};
RiverStruct ENDRIVER1[1] = { { 16, 31, 260, 0, 1, 12 } };

RiverStruct RIVER2OBJECTS[53] = {
{16, 31, 8230, 0, 6, 12},
Expand Down Expand Up @@ -1765,7 +1765,7 @@ RiverStruct RIVER2OBJECTS[53] = {
{17, 30, 305, 0, 3, 15}
};

RiverStruct ENDRIVER2[1] = {16, 31, 260, 0, 6, 12};
RiverStruct ENDRIVER2[1] = { { 16, 31, 260, 0, 6, 12 } };

RiverStruct *RIVEROBJECTTBL[6] = {
RIVER0OBJECTS, ENDRIVER0, RIVER1OBJECTS,
Expand Down
6 changes: 3 additions & 3 deletions engines/access/amazon/amazon_scripts.cpp
Expand Up @@ -1282,7 +1282,7 @@ void AmazonScripts::ANT() {

void AmazonScripts::boatWalls(int param1, int param2) {
if (param1 == 1)
_vm->_room->_plotter._walls[42] = Common::Rect(96, 27, 87, 42);
_vm->_room->_plotter._walls[42] = Common::Rect(96, 27, 96 + 87, 27 + 42);
else {
_vm->_room->_plotter._walls[39].bottom = _vm->_room->_plotter._walls[41].bottom = 106;
_vm->_room->_plotter._walls[40].left = 94;
Expand Down Expand Up @@ -1439,7 +1439,7 @@ void AmazonScripts::initRiver() {
++_game->_timers[3]._flag;

_game->_canoeFrame = 0;
_game->_mapPtr = (byte *)MAPTBL[_game->_riverFlag] + 1;
_game->_mapPtr = (const byte *)MAPTBL[_game->_riverFlag] + 1;
if (_game->_saveRiver == 1) {
_game->_mapPtr--;
_game->_mapPtr += _game->_mapOffset;
Expand Down Expand Up @@ -1771,7 +1771,7 @@ void AmazonScripts::RIVER() {
while (true) {
_vm->_events->_vbCount = 4;

int bx = _vm->_player->_scrollAmount - _screenVertX;
// int bx = _vm->_player->_scrollAmount - _screenVertX;
if (_vm->_screen->_scrollX == 0) {
_vm->_sound->midiRepeat();
if (riverJumpTest()) {
Expand Down
6 changes: 3 additions & 3 deletions engines/access/files.cpp
Expand Up @@ -59,10 +59,10 @@ Resource::~Resource() {
delete _stream;
}

Resource::Resource(byte *data, int size) {
_data = data;
Resource::Resource(byte *p, int size) {
_data = p;
_size = size;
_stream = new Common::MemoryReadStream(data, size);
_stream = new Common::MemoryReadStream(p, size);
}

byte *Resource::data() {
Expand Down
2 changes: 1 addition & 1 deletion engines/access/files.h
Expand Up @@ -62,7 +62,7 @@ class Resource {
int _size;

Resource();
Resource::Resource(byte *data, int size);
Resource(byte *data, int size);
~Resource();
byte *data();
};
Expand Down
2 changes: 1 addition & 1 deletion engines/access/player.h
Expand Up @@ -111,7 +111,7 @@ class Player: public ImageEntry, public Manager {
Common::Point _rawPlayer;
public:
Player(AccessEngine *vm);
~Player();
virtual ~Player();
static Player *init(AccessEngine *vm);

virtual void load();
Expand Down
2 changes: 0 additions & 2 deletions engines/access/scripts.cpp
Expand Up @@ -610,13 +610,11 @@ void Scripts::cmdTexChoice() {

findNull();

bool choice2Fl = false;
tmpStr = "";
while ((v = _data->readByte()) != 0)
tmpStr += (char)v;

if (tmpStr.size() != 0) {
choice2Fl = true;
_vm->_bubbleBox->_bubblePtr = Common::String("RESPONSE 2").c_str();
_vm->_bubbleBox->calcBubble(tmpStr);
_vm->_bubbleBox->printBubble(tmpStr);
Expand Down

0 comments on commit 7434c76

Please sign in to comment.