MOHAWK: Prepare empty classes for the Riven stacks

This commit is contained in:
Bastien Bouclet 2016-11-01 09:45:33 +01:00 committed by Eugene Sandulenko
parent ab2d151541
commit e2c5609e81
21 changed files with 726 additions and 2 deletions

View File

@ -60,7 +60,16 @@ MODULE_OBJS += \
riven_scripts.o \
riven_sound.o \
riven_stack.o \
riven_vars.o
riven_vars.o \
riven_stacks/aspit.o \
riven_stacks/bspit.o \
riven_stacks/domespit.o \
riven_stacks/gspit.o \
riven_stacks/jspit.o \
riven_stacks/ospit.o \
riven_stacks/pspit.o \
riven_stacks/rspit.o \
riven_stacks/tspit.o
endif
# This module can be built as a plugin

View File

@ -37,6 +37,14 @@
#include "mohawk/riven_saveload.h"
#include "mohawk/riven_sound.h"
#include "mohawk/riven_stack.h"
#include "mohawk/riven_stacks/aspit.h"
#include "mohawk/riven_stacks/bspit.h"
#include "mohawk/riven_stacks/gspit.h"
#include "mohawk/riven_stacks/jspit.h"
#include "mohawk/riven_stacks/ospit.h"
#include "mohawk/riven_stacks/pspit.h"
#include "mohawk/riven_stacks/rspit.h"
#include "mohawk/riven_stacks/tspit.h"
#include "mohawk/dialogs.h"
#include "mohawk/video.h"
#include "mohawk/console.h"
@ -341,7 +349,30 @@ void MohawkEngine_Riven::changeToStack(uint16 n) {
_sound->stopAllSLST();
delete _stack;
_stack = new RivenStack(this, n);
_stack = constructStackById(n);
}
RivenStack *MohawkEngine_Riven::constructStackById(uint16 id) {
switch (id) {
case kStackAspit:
return new RivenStacks::ASpit(this);
case kStackBspit:
return new RivenStacks::BSpit(this);
case kStackGspit:
return new RivenStacks::GSpit(this);
case kStackJspit:
return new RivenStacks::JSpit(this);
case kStackOspit:
return new RivenStacks::OSpit(this);
case kStackPspit:
return new RivenStacks::PSpit(this);
case kStackRspit:
return new RivenStacks::RSpit(this);
case kStackTspit:
return new RivenStacks::TSpit(this);
default:
error("Unknown stack id '%d'", id);
}
}
// Riven uses some hacks to change stacks for linking books

View File

@ -172,6 +172,8 @@ public:
void installCardTimer();
void checkTimer();
void removeTimer();
RivenStack *constructStackById(uint16 id);
};
} // End of namespace Mohawk

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/aspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
ASpit::ASpit(MohawkEngine_Riven *vm) :
RivenStack(vm, kStackAspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_ASPIT_H
#define RIVEN_STACKS_ASPIT_H
#include "mohawk/riven_stack.h"
namespace Mohawk {
namespace RivenStacks {
class ASpit : public RivenStack {
public:
ASpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/bspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
BSpit::BSpit(MohawkEngine_Riven *vm) :
DomeSpit(vm, kStackBspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_BSPIT_H
#define RIVEN_STACKS_BSPIT_H
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
class BSpit : public DomeSpit {
public:
BSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,34 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
DomeSpit::DomeSpit(MohawkEngine_Riven *vm, uint16 id) :
RivenStack(vm, id) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_DOMESPIT_H
#define RIVEN_STACKS_DOMESPIT_H
#include "mohawk/riven_stack.h"
namespace Mohawk {
namespace RivenStacks {
class DomeSpit : public RivenStack {
public:
DomeSpit(MohawkEngine_Riven *vm, uint16 id);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/gspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
GSpit::GSpit(MohawkEngine_Riven *vm) :
DomeSpit(vm, kStackGspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_GSPIT_H
#define RIVEN_STACKS_GSPIT_H
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
class GSpit : public DomeSpit {
public:
GSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/jspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
JSpit::JSpit(MohawkEngine_Riven *vm) :
DomeSpit(vm, kStackJspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_JSPIT_H
#define RIVEN_STACKS_JSPIT_H
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
class JSpit : public DomeSpit {
public:
JSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/ospit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
OSpit::OSpit(MohawkEngine_Riven *vm) :
RivenStack(vm, kStackOspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_OSPIT_H
#define RIVEN_STACKS_OSPIT_H
#include "mohawk/riven_stack.h"
namespace Mohawk {
namespace RivenStacks {
class OSpit : public RivenStack {
public:
OSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/pspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
PSpit::PSpit(MohawkEngine_Riven *vm) :
DomeSpit(vm, kStackPspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_PSPIT_H
#define RIVEN_STACKS_PSPIT_H
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
class PSpit : public DomeSpit {
public:
PSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/rspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
RSpit::RSpit(MohawkEngine_Riven *vm) :
RivenStack(vm, kStackRspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_RSPIT_H
#define RIVEN_STACKS_RSPIT_H
#include "mohawk/riven_stack.h"
namespace Mohawk {
namespace RivenStacks {
class RSpit : public RivenStack {
public:
RSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "mohawk/riven_stacks/tspit.h"
#include "engines/mohawk/riven.h"
namespace Mohawk {
namespace RivenStacks {
TSpit::TSpit(MohawkEngine_Riven *vm) :
DomeSpit(vm, kStackTspit) {
}
} // End of namespace RivenStacks
} // End of namespace Mohawk

View File

@ -0,0 +1,40 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef RIVEN_STACKS_TSPIT_H
#define RIVEN_STACKS_TSPIT_H
#include "mohawk/riven_stacks/domespit.h"
namespace Mohawk {
namespace RivenStacks {
class TSpit : public DomeSpit {
public:
TSpit(MohawkEngine_Riven *vm);
};
} // End of namespace RivenStacks
} // End of namespace Mohawk
#endif