AGS: Changing Common namespace to Shared

This commit is contained in:
Paul Gilbert 2020-11-21 16:10:55 -08:00
parent 76a2e90366
commit d8e471b03c
337 changed files with 575 additions and 575 deletions

View file

@ -36,12 +36,12 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
}
}
using AGS::Common::Stream;
using AGS::Common::String;
using AGS::Shared::Stream;
using AGS::Shared::String;
// Looks for valid asset library everywhere and returns path, or empty string if failed
String find_assetlib(const String &filename);

View file

@ -29,7 +29,7 @@
#include "script/runtimescriptvalue.h"
#include "media/audio/audio_system.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameState play;
extern RoomStruct thisroom;

View file

@ -32,7 +32,7 @@
#include "gui/animatingguibutton.h"
#include "gui/guimain.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern ViewStruct *views;

View file

@ -27,7 +27,7 @@
namespace AGS3 {
using AGS::Common::GUIButton;
using AGS::Shared::GUIButton;
void Button_Animate(GUIButton *butt, int view, int loop, int speed, int repeat);
const char *Button_GetText_New(GUIButton *butt);

View file

@ -71,7 +71,7 @@
#include "media/audio/audio_system.h"
#include "ac/movelist.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern int displayed_room, starting_room;

View file

@ -166,7 +166,7 @@ int Character_GetSpeakingFrame(CharacterInfo *chaa);
struct MoveList;
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
}
}

View file

@ -26,7 +26,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
}
}

View file

@ -23,7 +23,7 @@
#include "ac/characterextras.h"
#include "util/stream.h"
using AGS::Common::Stream;
using AGS::Shared::Stream;
void CharacterExtras::ReadFromFile(Stream *in) {
in->ReadArrayOfInt16(invorder, MAX_INVORDER);

View file

@ -29,7 +29,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
}
}

View file

@ -35,7 +35,7 @@
#include "main/update.h"
#include "media/audio/audio_system.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern ViewStruct *views;
extern GameSetupStruct game;

View file

@ -60,7 +60,7 @@
#include "ac/mouse.h"
#include "media/audio/audio_system.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern GameState play;

View file

@ -55,8 +55,8 @@
#include "media/audio/audio_system.h"
#include "ac/timer.h"
using namespace AGS::Common;
using namespace AGS::Common::BitmapHelper;
using namespace AGS::Shared;
using namespace AGS::Shared::BitmapHelper;
extern GameState play;
extern GameSetupStruct game;

View file

@ -27,7 +27,7 @@
namespace AGS3 {
using AGS::Common::GUIMain;
using AGS::Shared::GUIMain;
// options for 'disp_type' parameter
#define DISPLAYTEXT_SPEECH 0

View file

@ -71,7 +71,7 @@
#include "media/audio/audio_system.h"
#include "ac/game.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
#if AGS_PLATFORM_OS_ANDROID

View file

@ -32,7 +32,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
typedef std::shared_ptr<Common::Bitmap> PBitmap;
}

View file

@ -52,7 +52,7 @@
#include "gfx/bitmap.h"
#include "util/scaling.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
// TODO: choose these values depending on game resolution?

View file

@ -51,10 +51,10 @@ void invalidate_all_rects();
void invalidate_all_camera_rects(int view_index);
void invalidate_rect_ds(int x1, int y1, int x2, int y2, bool in_room);
// Paints the black screen background in the regions marked as dirty
void update_black_invreg_and_reset(AGS::Common::Bitmap *ds);
void update_black_invreg_and_reset(AGS::Shared::Bitmap *ds);
// Copies the room regions marked as dirty from source (src) to destination (ds) with the given offset (x, y)
// no_transform flag tells the system that the regions should be plain copied to the ds.
void update_room_invreg_and_reset(int view_index, AGS::Common::Bitmap *ds, AGS::Common::Bitmap *src, bool no_transform);
void update_room_invreg_and_reset(int view_index, AGS::Shared::Bitmap *ds, AGS::Shared::Bitmap *src, bool no_transform);
} // namespace AGS3

View file

@ -42,7 +42,7 @@
#include "gfx/gfx_def.h"
#include "gfx/gfx_util.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -41,7 +41,7 @@
#include "gfx/graphicsdriver.h"
#include "script/runtimescriptvalue.h"
using namespace Common;
using namespace Shared;
using namespace Engine;
extern GameSetupStruct game;

View file

@ -26,7 +26,7 @@
#include "ac/common.h" // quit()
#include "util/bbop.h"
using namespace AGS::Common;
using namespace AGS::Shared;
// *** The script serialization routines for built-in types

View file

@ -45,7 +45,7 @@
#include "script/script_common.h"
#include "util/stream.h"
using namespace AGS::Common;
using namespace AGS::Shared;
ICCStringClass *stringClassImpl = nullptr;

View file

@ -36,7 +36,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
}
}

View file

@ -25,7 +25,7 @@
#include "gui/guimain.h"
#include "gui/guiobject.h"
using AGS::Common::GUIObject;
using AGS::Shared::GUIObject;
// return the type name of the object
const char *CCGUIObject::GetType() {

View file

@ -30,7 +30,7 @@
#include "script/script_common.h"
#include "util/stream.h"
using namespace AGS::Common;
using namespace AGS::Shared;
const auto OBJECT_CACHE_MAGIC_NUMBER = 0xa30b;
const auto SERIALIZE_BUFFER_SIZE = 10240;

View file

@ -32,7 +32,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS

View file

@ -24,7 +24,7 @@
#include "ac/gamestate.h"
#include "util/bbop.h"
using namespace AGS::Common;
using namespace AGS::Shared;
ScriptCamera::ScriptCamera(int id) : _id(id) {}

View file

@ -45,7 +45,7 @@
namespace AGS3 {
using namespace AGS::Common;
using namespace AGS::Shared;
class ScriptDictBase : public AGSCCDynamicObject {
public:

View file

@ -30,7 +30,7 @@
#include "game/roomstruct.h"
#include "gfx/bitmap.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern RoomStruct thisroom;
extern SpriteCache spriteset;

View file

@ -29,7 +29,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS

View file

@ -44,7 +44,7 @@
namespace AGS3 {
using namespace AGS::Common;
using namespace AGS::Shared;
class ScriptSetBase : public AGSCCDynamicObject {
public:

View file

@ -24,7 +24,7 @@
#include "ac/gamestate.h"
#include "util/bbop.h"
using namespace AGS::Common;
using namespace AGS::Shared;
ScriptViewport::ScriptViewport(int id) : _id(id) {}

View file

@ -42,7 +42,7 @@
#include "media/audio/audio_system.h"
#include "ac/timer.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -46,7 +46,7 @@
#include "util/string.h"
#include "util/string_utils.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetup usetup;
extern GameSetupStruct game;

View file

@ -34,7 +34,7 @@
namespace AGS3 {
using AGS::Common::Stream;
using AGS::Shared::Stream;
int File_Exists(const char *fnmm);
int File_Delete(const char *fnmm);

View file

@ -98,7 +98,7 @@
#include "util/string_utils.h"
#include "ac/keycode.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern ScriptAudioChannel scrAudioChannel[MAX_SOUND_CHANNELS + 1];

View file

@ -37,7 +37,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
class Stream;
} // namespace Shared

View file

@ -43,7 +43,7 @@ enum MouseSpeedDef {
kNumMouseSpeedDefs
};
using AGS::Common::String;
using AGS::Shared::String;
// TODO: reconsider the purpose of this struct.
// Earlier I was trying to remove the uses of this struct from the engine

View file

@ -39,7 +39,7 @@
#include "util/alignedstream.h"
#include "util/string_utils.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -40,7 +40,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
class Stream;
typedef std::shared_ptr<Bitmap> PBitmap;
@ -224,14 +224,14 @@ struct GameState {
short temporarily_turned_off_character; // Hide Player Charactr ticked
short inv_backwards_compatibility;
int *gui_draw_order;
std::vector<AGS::Common::String> do_once_tokens;
std::vector<AGS::Shared::String> do_once_tokens;
int text_min_display_time_ms;
int ignore_user_input_after_text_timeout_ms;
int default_audio_type_volumes[MAX_AUDIO_TYPES];
// Dynamic custom property values for characters and items
std::vector<AGS::Common::StringIMap> charProps;
AGS::Common::StringIMap invProps[MAX_INV];
std::vector<AGS::Shared::StringIMap> charProps;
AGS::Shared::StringIMap invProps[MAX_INV];
// Dynamic speech state
//

View file

@ -36,7 +36,7 @@
#include "ac/timer.h"
#include "util/string_compat.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetup usetup;
extern GameState play;

View file

@ -28,7 +28,7 @@
#include "gui/guimain.h"
#include "gui/guibutton.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;

View file

@ -47,7 +47,7 @@
#include "main/game_run.h"
#include "script/script.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;

View file

@ -47,7 +47,7 @@
#include "gfx/graphicsdriver.h"
#include "main/graphics_mode.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -28,7 +28,7 @@
namespace AGS3 {
AGS::Common::String GetRuntimeInfo();
AGS::Shared::String GetRuntimeInfo();
void script_debug(int cmdd, int dataa);
} // namespace AGS3

View file

@ -31,7 +31,7 @@
#include "debug/out.h"
#include "script/script.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern GameState play;

View file

@ -41,7 +41,7 @@
#include "game/roomstruct.h"
#include "main/game_run.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern TopBarSettings topBar;
extern GameState play;

View file

@ -37,7 +37,7 @@
#include "gfx/gfx_def.h"
#include "gfx/gfx_util.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern Bitmap *raw_saved_screen;

View file

@ -30,7 +30,7 @@
#include "gfx/graphicsdriver.h"
#include "gfx/bitmap.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern SpriteCache spriteset;

View file

@ -32,7 +32,7 @@
#include "util/path.h"
#include "util/stream.h"
using namespace AGS::Common;
using namespace AGS::Shared;
int32_t FileOpenCMode(const char *fnmm, const char *cmode) {
Common::FileOpenMode open_mode;

View file

@ -27,7 +27,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS

View file

@ -69,7 +69,7 @@
#include "util/string_utils.h"
#include "media/audio/audio_system.h"
using namespace AGS::Common;
using namespace AGS::Shared;
#define ALLEGRO_KEYBOARD_HANDLER

View file

@ -36,7 +36,7 @@
#include "script/runtimescriptvalue.h"
#include "util/string_compat.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern ScriptGUI *scrGui;

View file

@ -37,7 +37,7 @@
#include "game/roomstruct.h"
#include "script/script.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern RoomStruct thisroom;
extern RoomStatus *croom;

View file

@ -34,7 +34,7 @@
#include "ac/event.h"
#include "ac/gamestate.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern GameState play;

View file

@ -27,7 +27,7 @@
#include "ac/string.h"
#include "gui/guimain.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;

View file

@ -45,7 +45,7 @@
#include "gfx/bitmap.h"
#include "gfx/gfx_def.h"
using namespace AGS::Common;
using namespace AGS::Shared;
#define OVERLAPPING_OBJECT 1000

View file

@ -25,7 +25,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS

View file

@ -35,7 +35,7 @@
#include "ac/system.h"
#include "gfx/bitmap.h"
using namespace Common;
using namespace Shared;
using namespace Engine;
extern SpriteCache spriteset;

View file

@ -32,7 +32,7 @@
#include "script/script.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern RoomStruct thisroom;
extern RoomStatus *croom;

View file

@ -39,7 +39,7 @@
#include "script/script.h"
#include "util/math.h"
using namespace Common;
using namespace Shared;
extern GameState play;
extern GameSetupStruct game;

View file

@ -35,7 +35,7 @@
#include "gfx/graphicsdriver.h"
#include "gfx/bitmap.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetup usetup;

View file

@ -27,7 +27,7 @@
#include "gui/guimain.h"
#include "gui/guislider.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;

View file

@ -28,7 +28,7 @@
#include "gui/guimain.h"
#include "gui/guitextbox.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;

View file

@ -33,7 +33,7 @@
#include "util/memory.h"
#include "core/types.h"
using namespace AGS::Common::Memory;
using namespace AGS::Shared::Memory;
extern GameState play;
extern AGSPlatformDriver *platform;

View file

@ -28,7 +28,7 @@
#include "debug/debug_log.h"
#include "game/roomstruct.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern RoomStruct thisroom;

View file

@ -56,7 +56,7 @@
#include "util/string_compat.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;

View file

@ -28,8 +28,8 @@
namespace AGS3 {
using AGS::Common::GUIMain;
using AGS::Common::GUIObject;
using AGS::Shared::GUIMain;
using AGS::Shared::GUIObject;
ScriptGUI *GUI_AsTextWindow(ScriptGUI *tehgui);
int GUI_GetPopupStyle(ScriptGUI *tehgui);
@ -71,7 +71,7 @@ ScriptGUI *GetGUIAtLocation(int xx, int yy);
void remove_popup_interface(int ifacenum);
void process_interface_click(int ifce, int btn, int mbut);
void replace_macro_tokens(const char *text, AGS::Common::String &fixed_text);
void replace_macro_tokens(const char *text, AGS::Shared::String &fixed_text);
void update_gui_zorder();
void export_gui_controls(int ee);
void unexport_gui_controls(int ee);

View file

@ -35,7 +35,7 @@
#include "ac/dynobj/cc_gui.h"
#include "ac/dynobj/cc_guiobject.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern ScriptGUI *scrGui;
extern CCGUI ccDynamicGUI;

View file

@ -34,13 +34,13 @@
namespace AGS3 {
using AGS::Common::GUIObject;
using AGS::Common::GUIButton;
using AGS::Common::GUIInvWindow;
using AGS::Common::GUILabel;
using AGS::Common::GUIListBox;
using AGS::Common::GUISlider;
using AGS::Common::GUITextBox;
using AGS::Shared::GUIObject;
using AGS::Shared::GUIButton;
using AGS::Shared::GUIInvWindow;
using AGS::Shared::GUILabel;
using AGS::Shared::GUIListBox;
using AGS::Shared::GUISlider;
using AGS::Shared::GUITextBox;
GUIObject *GetGUIControlAtLocation(int xx, int yy);
int GUIControl_GetVisible(GUIObject *guio);

View file

@ -38,7 +38,7 @@ extern SpriteCache spriteset;
namespace AGS {
namespace Common {
namespace Shared {
int GUIInvWindow::GetCharacterId() const {
if (CharId < 0)
@ -91,5 +91,5 @@ void GUIInvWindow::Draw(Bitmap *ds) {
}
}
} // namespace Common
} // namespace Shared
} // namespace AGS

View file

@ -33,7 +33,7 @@
#include "gfx/bitmap.h"
#include "script/runtimescriptvalue.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern RoomStruct thisroom;
extern RoomStatus *croom;

View file

@ -45,7 +45,7 @@
#include "media/audio/audio_system.h"
#include "ac/timer.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern GameState play;

View file

@ -29,7 +29,7 @@
namespace AGS3 {
using AGS::Common::GUIInvWindow;
using AGS::Shared::GUIInvWindow;
void InvWindow_SetCharacterToUse(GUIInvWindow *guii, CharacterInfo *chaa);
CharacterInfo *InvWindow_GetCharacterToUse(GUIInvWindow *guii);

View file

@ -27,7 +27,7 @@
namespace AGS3 {
using AGS::Common::GUILabel;
using AGS::Shared::GUILabel;
const char *Label_GetText_New(GUILabel *labl);
void Label_GetText(GUILabel *labl, char *buffer);

View file

@ -32,7 +32,7 @@
#include "gui/guimain.h"
#include "debug/debug_log.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameState play;
extern GameSetupStruct game;

View file

@ -27,7 +27,7 @@
namespace AGS3 {
using AGS::Common::GUIListBox;
using AGS::Shared::GUIListBox;
int ListBox_AddItem(GUIListBox *lbb, const char *text);
int ListBox_InsertItemAt(GUIListBox *lbb, int index, const char *text);

View file

@ -42,7 +42,7 @@
#include "gfx/graphicsdriver.h"
#include "gfx/gfxfilter.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -24,7 +24,7 @@
#include "ac/common.h"
#include "util/stream.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
void MoveList::ReadFromFile_Legacy(Stream *in) {

View file

@ -30,7 +30,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS

View file

@ -46,7 +46,7 @@
#include "ac/dynobj/cc_object.h"
#include "ac/movelist.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern ScriptObject scrObj[MAX_ROOM_OBJECTS];

View file

@ -37,7 +37,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS

View file

@ -38,7 +38,7 @@
#include "gfx/bitmap.h"
#include "script/runtimescriptvalue.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetupStruct game;

View file

@ -30,7 +30,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS

View file

@ -32,7 +32,7 @@
#include "util/string.h"
#include "util/string_compat.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern GameState play;

View file

@ -33,7 +33,7 @@
namespace AGS3 {
using AGS::Common::String;
using AGS::Shared::String;
// Filepath tokens, which are replaced by platform-specific directory names
extern const String UserSavedgamesRootToken;

View file

@ -28,7 +28,7 @@
#include "script/runtimescriptvalue.h"
#include "util/string_utils.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern GameSetupStruct game;
extern ScriptString myScriptStringImpl;

View file

@ -27,7 +27,7 @@
namespace AGS3 {
using AGS::Common::StringIMap;
using AGS::Shared::StringIMap;
// Getting a property value requires static and runtime property maps.
// Key is first searched in runtime map, if not found - static map is taken,

View file

@ -32,7 +32,7 @@
#include "game/roomstruct.h"
#include "script/runtimescriptvalue.h"
using namespace AGS::Common;
using namespace AGS::Shared;
extern ScriptRegion scrRegion[MAX_ROOM_REGIONS];
extern RoomStruct thisroom;

View file

@ -23,7 +23,7 @@
#include "ac/richgamemedia.h"
#include "util/stream.h"
using AGS::Common::Stream;
using AGS::Shared::Stream;
void RICH_GAME_MEDIA_HEADER::ReadFromFile(Stream *in) {
dwMagicNumber = in->ReadInt32();

View file

@ -32,7 +32,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS

View file

@ -77,7 +77,7 @@
#include "util/math.h"
#include "media/audio/audio_system.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
extern GameSetup usetup;

View file

@ -76,7 +76,7 @@ struct MoveList;
// Convert move path from room's mask resolution to room resolution
void convert_move_path_to_room_resolution(MoveList *ml);
extern AGS::Common::RoomStruct thisroom;
extern AGS::Shared::RoomStruct thisroom;
} // namespace AGS3

View file

@ -30,7 +30,7 @@
#include "main/update.h"
#include "util/stream.h"
using AGS::Common::Stream;
using AGS::Shared::Stream;
extern ViewStruct *views;
extern GameState play;

View file

@ -28,7 +28,7 @@
namespace AGS3 {
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS

View file

@ -29,7 +29,7 @@
#include "game/savegame_components.h"
#include "util/alignedstream.h"
using namespace AGS::Common;
using namespace AGS::Shared;
using namespace AGS::Engine;
RoomStatus::RoomStatus() {

View file

@ -32,13 +32,13 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Stream;
} // namespace Shared
} // namespace AGS
using AGS::Common::Stream;
using AGS::Common::Interaction;
using AGS::Shared::Stream;
using AGS::Shared::Interaction;
// This struct is saved in the save games - it contains everything about
// a room that could change

View file

@ -27,7 +27,7 @@
#include "debug/out.h"
using AGS::Common::Bitmap;
using AGS::Shared::Bitmap;
class IRouteFinder {
public:
@ -101,10 +101,10 @@ static IRouteFinder *route_finder_impl = nullptr;
void init_pathfinder(GameDataVersion game_file_version) {
if (game_file_version >= kGameVersion_350) {
AGS::Common::Debug::Printf(AGS::Common::MessageType::kDbgMsg_Info, "Initialize path finder library");
AGS::Shared::Debug::Printf(AGS::Shared::MessageType::kDbgMsg_Info, "Initialize path finder library");
route_finder_impl = new AGSRouteFinder();
} else {
AGS::Common::Debug::Printf(AGS::Common::MessageType::kDbgMsg_Info, "Initialize legacy path finder library");
AGS::Shared::Debug::Printf(AGS::Shared::MessageType::kDbgMsg_Info, "Initialize legacy path finder library");
route_finder_impl = new AGSLegacyRouteFinder();
}

View file

@ -29,7 +29,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS
@ -39,14 +39,14 @@ struct MoveList;
void init_pathfinder(GameDataVersion game_file_version);
void shutdown_pathfinder();
void set_wallscreen(AGS::Common::Bitmap *wallscreen);
void set_wallscreen(AGS::Shared::Bitmap *wallscreen);
int can_see_from(int x1, int y1, int x2, int y2);
void get_lastcpos(int &lastcx, int &lastcy);
// NOTE: pathfinder implementation mostly needs to know proportion between x and y speed
void set_route_move_speed(int speed_x, int speed_y);
int find_route(short srcx, short srcy, short xx, short yy, AGS::Common::Bitmap *onscreen, int movlst, int nocross = 0, int ignore_walls = 0);
int find_route(short srcx, short srcy, short xx, short yy, AGS::Shared::Bitmap *onscreen, int movlst, int nocross = 0, int ignore_walls = 0);
void calculate_move_stage(MoveList *mlsp, int aaa);
} // namespace AGS3

View file

@ -41,7 +41,7 @@
extern MoveList *mls;
using AGS::Common::Bitmap;
using AGS::Shared::Bitmap;
// #define DEBUG_PATHFINDER
@ -238,14 +238,14 @@ int find_route(short srcx, short srcy, short xx, short yy, Bitmap *onscreen, int
assert(num_navpoints <= MAXNAVPOINTS);
#ifdef DEBUG_PATHFINDER
AGS::Common::Debug::Printf("Route from %d,%d to %d,%d - %d stages", srcx, srcy, xx, yy, num_navpoints);
AGS::Shared::Debug::Printf("Route from %d,%d to %d,%d - %d stages", srcx, srcy, xx, yy, num_navpoints);
#endif
int mlist = movlst;
mls[mlist].numstage = num_navpoints;
memcpy(&mls[mlist].pos[0], &navpoints[0], sizeof(int) * num_navpoints);
#ifdef DEBUG_PATHFINDER
AGS::Common::Debug::Printf("stages: %d\n", num_navpoints);
AGS::Shared::Debug::Printf("stages: %d\n", num_navpoints);
#endif
for (i = 0; i < num_navpoints - 1; i++)

View file

@ -29,7 +29,7 @@ namespace AGS3 {
// Forward declaration
namespace AGS {
namespace Common {
namespace Shared {
class Bitmap;
} // namespace Shared
} // namespace AGS
@ -43,14 +43,14 @@ namespace RouteFinder {
void init_pathfinder();
void shutdown_pathfinder();
void set_wallscreen(AGS::Common::Bitmap *wallscreen);
void set_wallscreen(AGS::Shared::Bitmap *wallscreen);
int can_see_from(int x1, int y1, int x2, int y2);
void get_lastcpos(int &lastcx, int &lastcy);
void set_route_move_speed(int speed_x, int speed_y);
int find_route(short srcx, short srcy, short xx, short yy, AGS::Common::Bitmap *onscreen, int movlst, int nocross = 0, int ignore_walls = 0);
int find_route(short srcx, short srcy, short xx, short yy, AGS::Shared::Bitmap *onscreen, int movlst, int nocross = 0, int ignore_walls = 0);
void calculate_move_stage(MoveList *mlsp, int aaa);
} // namespace RouteFinder

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