Skip to content

Commit

Permalink
Removed includes from sword2.h so that (hopefully) there will eventua…
Browse files Browse the repository at this point in the history
…lly be

less dependencies.

svn-id: r20741
  • Loading branch information
Torbjörn Andersson committed Feb 17, 2006
1 parent bf79947 commit 002c587
Show file tree
Hide file tree
Showing 34 changed files with 96 additions and 21 deletions.
2 changes: 2 additions & 0 deletions engines/sword2/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/maketext.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"
#include "sword2/animation.h"

Expand Down
1 change: 1 addition & 0 deletions engines/sword2/anims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/screen.h"
#include "sword2/interpreter.h"
#include "sword2/logic.h"
Expand Down
4 changes: 4 additions & 0 deletions engines/sword2/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
*/

#include "common/stdafx.h"
#include "common/rect.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/console.h"
#include "sword2/logic.h"
#include "sword2/maketext.h"
#include "sword2/memory.h"
#include "sword2/mouse.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

#include "common/debugger.cpp"
Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/controls.h"
#include "sword2/mouse.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

#define MAX_STRING_LEN 64 // 20 was too low; better to be safe ;)
Expand Down
1 change: 1 addition & 0 deletions engines/sword2/controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SWORD2_CONTROL_H

#include "sword2/defs.h"
#include "sword2/saveload.h"

#define MAX_WIDGETS 25

Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/d_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@

#include "common/stdafx.h"
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/mouse.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
6 changes: 5 additions & 1 deletion engines/sword2/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@
*/

#include "common/stdafx.h"
#include "common/rect.h"

#include "sword2/sword2.h"
#include "sword2/console.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/console.h"
#include "sword2/logic.h"
#include "sword2/maketext.h"
#include "sword2/memory.h"
#include "sword2/mouse.h"
#include "sword2/resman.h"
#include "sword2/router.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
*/

#include "common/stdafx.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"

namespace Sword2 {
Expand Down
1 change: 1 addition & 0 deletions engines/sword2/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/screen.h"
#include "sword2/console.h"
#include "sword2/interpreter.h"
Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

#include "common/stdafx.h"
#include "common/stream.h"
#include "common/rect.h"

#include "sword2/sword2.h"
#include "sword2/header.h"
#include "sword2/defs.h"
#include "sword2/logic.h"
#include "sword2/mouse.h"
Expand Down
12 changes: 1 addition & 11 deletions engines/sword2/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,10 @@
#ifndef SWORD2_ICONS_H
#define SWORD2_ICONS_H

#define MENU_MASTER_OBJECT 44
#define TOTAL_subjects (375 - 256 + 1) // the speech subject bar
#define TOTAL_engine_pockets (15 + 10) // +10 for overflow
#error "This file is about to be removed"

namespace Sword2 {

// define these in a script and then register them with the system

struct MenuObject {
int32 icon_resource; // icon graphic graphic
int32 luggage_resource; // luggage icon resource (for attaching to
// mouse pointer)
};

} // End of namespace Sword2

#endif
2 changes: 2 additions & 0 deletions engines/sword2/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

#include "common/stdafx.h"
#include "common/util.h"

#include "sword2/sword2.h"
#include "sword2/header.h"
#include "sword2/defs.h"
#include "sword2/interpreter.h"
#include "sword2/logic.h"
Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@
// up to 2 foreground parallax layers

#include "common/stdafx.h"
#include "common/rect.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/mouse.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

namespace Sword2 {
Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
*/

#include "common/stdafx.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/resman.h"
#include "sword2/router.h"
Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/maketext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@

#include "common/stdafx.h"
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/maketext.h"
#include "sword2/resman.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
*/

#include "common/stdafx.h"
#include "common/rect.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/mouse.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
#include "sword2/console.h"
#include "sword2/controls.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/maketext.h"
#include "sword2/mouse.h"
#include "sword2/object.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

namespace Sword2 {
Expand Down
15 changes: 15 additions & 0 deletions engines/sword2/mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@
* $Id$
*/

#include "common/rect.h"

#ifndef SWORD2_MOUSE_H
#define SWORD2_MOUSE_H

#define MENU_MASTER_OBJECT 44

#define MAX_SUBJECT_LIST 30 // is that enough?

#define TOTAL_subjects (375 - 256 + 1) // the speech subject bar
#define TOTAL_engine_pockets (15 + 10) // +10 for overflow
#define TOTAL_mouse_list 50

namespace Sword2 {

class MenuObject;
struct BuildUnit;

// Menubar defines.
Expand Down Expand Up @@ -104,6 +111,14 @@ struct MouseUnit {
uint32 ref;
};

// define these in a script and then register them with the system

struct MenuObject {
int32 icon_resource; // icon graphic graphic
int32 luggage_resource; // luggage icon resource (for attaching to
// mouse pointer)
};

class Mouse {
private:
Sword2Engine *_vm;
Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "common/stdafx.h"
#include "common/file.h"
#include "common/system.h"

#include "sound/mp3.h"
#include "sound/vorbis.h"
#include "sound/flac.h"
Expand All @@ -36,6 +37,7 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/resman.h"
#include "sword2/sound.h"

Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@

#include "common/stdafx.h"
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/resman.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*/

#include "common/stdafx.h"

#include "sword2/sword2.h"
#include "sword2/header.h"
#include "sword2/resman.h"

namespace Sword2 {
Expand Down
2 changes: 2 additions & 0 deletions engines/sword2/rdwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

#include "common/stdafx.h"
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/resman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
#include "common/stdafx.h"
#include "common/file.h"
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/console.h"
#include "sword2/logic.h"
#include "sword2/memory.h"
#include "sword2/resman.h"
#include "sword2/router.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

#define Debug_Printf _vm->_debugger->DebugPrintf
Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@

#include "common/stdafx.h"
#include "common/stream.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/resman.h"
#include "sword2/router.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
5 changes: 5 additions & 0 deletions engines/sword2/saveload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@

#include "common/stdafx.h"
#include "common/savefile.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/object.h"
#include "sword2/mouse.h"
#include "sword2/resman.h"
#include "sword2/saveload.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

namespace Sword2 {
Expand Down
5 changes: 4 additions & 1 deletion engines/sword2/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
#include "common/system.h"

#include "sword2/sword2.h"
#include "sword2/console.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/console.h"
#include "sword2/logic.h"
#include "sword2/maketext.h"
#include "sword2/mouse.h"
#include "sword2/object.h"
#include "sword2/resman.h"
#include "sword2/screen.h"
#include "sword2/sound.h"

namespace Sword2 {
Expand Down
3 changes: 3 additions & 0 deletions engines/sword2/scroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
*/

#include "common/stdafx.h"

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/screen.h"

namespace Sword2 {

Expand Down
1 change: 1 addition & 0 deletions engines/sword2/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/header.h"
#include "sword2/logic.h"
#include "sword2/resman.h"
#include "sword2/sound.h"
Expand Down
Loading

0 comments on commit 002c587

Please sign in to comment.