[Scummvm-git-logs] scummvm master -> 6d7663b1b1ec1eaf7d43d7396304470d380a4708
digitall
noreply at scummvm.org
Wed Mar 9 15:28:58 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6d7663b1b1 AGS: Fix Redundant Declaration Warnings
Commit: 6d7663b1b1ec1eaf7d43d7396304470d380a4708
https://github.com/scummvm/scummvm/commit/6d7663b1b1ec1eaf7d43d7396304470d380a4708
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-09T15:28:19Z
Commit Message:
AGS: Fix Redundant Declaration Warnings
These are emitted by GCC when -Wredundant-decls is passed.
Changed paths:
engines/ags/engine/ac/button.h
engines/ags/engine/ac/character.h
engines/ags/engine/ac/draw.h
engines/ags/engine/ac/mouse.cpp
engines/ags/engine/ac/route_finder_impl_legacy.cpp
engines/ags/engine/debugging/debug_log.h
engines/ags/engine/device/mouse_w32.h
engines/ags/engine/gui/gui_engine.cpp
engines/ags/engine/main/config.h
engines/ags/engine/script/script_engine.cpp
engines/ags/lib/allegro/color.h
engines/ags/shared/font/fonts.cpp
engines/ags/shared/gui/gui_button.h
engines/ags/shared/gui/gui_main.cpp
engines/ags/shared/gui/gui_main.h
diff --git a/engines/ags/engine/ac/button.h b/engines/ags/engine/ac/button.h
index 3e654c8934f..98ddd7a3b7e 100644
--- a/engines/ags/engine/ac/button.h
+++ b/engines/ags/engine/ac/button.h
@@ -22,6 +22,7 @@
#ifndef AGS_ENGINE_AC_BUTTON_H
#define AGS_ENGINE_AC_BUTTON_H
+#include "ags/globals.h"
#include "ags/shared/gui/gui_button.h"
namespace AGS3 {
diff --git a/engines/ags/engine/ac/character.h b/engines/ags/engine/ac/character.h
index 8566cdaabd2..43d139347ac 100644
--- a/engines/ags/engine/ac/character.h
+++ b/engines/ags/engine/ac/character.h
@@ -192,7 +192,6 @@ int doNextCharMoveStep(CharacterInfo *chi, int &char_index, CharacterExtras *ch
bool is_char_walking_ndirect(CharacterInfo *chi);
int find_nearest_walkable_area_within(int *xx, int *yy, int range, int step);
void find_nearest_walkable_area(int *xx, int *yy);
-void walk_character(int chac, int tox, int toy, int ignwal, bool autoWalkAnims);
void FindReasonableLoopForCharacter(CharacterInfo *chap);
void walk_or_move_character(CharacterInfo *chaa, int x, int y, int blocking, int direct, bool isWalk);
int is_valid_character(int newchar);
@@ -210,7 +209,6 @@ int is_char_on_another(int sourceChar, int ww, int *fromxptr, int *cwidptr);
int my_getpixel(Shared::Bitmap *blk, int x, int y);
// X and Y co-ordinates must be in 320x200 format
int check_click_on_character(int xx, int yy, int mood);
-int is_pos_on_character(int xx, int yy);
void _DisplaySpeechCore(int chid, const char *displbuf);
void _DisplayThoughtCore(int chid, const char *displbuf);
void _displayspeech(const char *texx, int aschar, int xx, int yy, int widd, int isThought);
diff --git a/engines/ags/engine/ac/draw.h b/engines/ags/engine/ac/draw.h
index daeb58de516..455757b604c 100644
--- a/engines/ags/engine/ac/draw.h
+++ b/engines/ags/engine/ac/draw.h
@@ -123,7 +123,7 @@ void draw_sprite_support_alpha(Shared::Bitmap *ds, bool ds_has_alpha, int xpos,
Shared::BlendMode blend_mode = Shared::kBlendMode_Alpha, int alpha = 0xFF);
void draw_sprite_slot_support_alpha(Shared::Bitmap *ds, bool ds_has_alpha, int xpos, int ypos, int src_slot,
Shared::BlendMode blend_mode = Shared::kBlendMode_Alpha, int alpha = 0xFF);
-void draw_gui_sprite(Shared::Bitmap *ds, int pic, int x, int y, bool use_alpha, Shared::BlendMode blend_mode);
+void draw_gui_sprite(Shared::Bitmap *ds, int pic, int x, int y, bool use_alpha = true, Shared::BlendMode blend_mode = Shared::kBlendMode_Alpha);
void draw_gui_sprite_v330(Shared::Bitmap *ds, int pic, int x, int y, bool use_alpha = true, Shared::BlendMode blend_mode = Shared::kBlendMode_Alpha);
// Render game on screen
void render_to_screen();
@@ -148,7 +148,7 @@ void setpal();
// This conversion is done before anything else (like moving from room to
// viewport on screen, or scaling game further in the window by the graphic
// renderer).
-extern AGS_INLINE int get_fixed_pixel_size(int pixels);
+AGS_INLINE int get_fixed_pixel_size(int pixels);
// coordinate conversion data,script ---> final game resolution
extern AGS_INLINE int data_to_game_coord(int coord);
extern AGS_INLINE void data_to_game_coords(int *x, int *y);
diff --git a/engines/ags/engine/ac/mouse.cpp b/engines/ags/engine/ac/mouse.cpp
index b25590b8e41..ac6bbdf9223 100644
--- a/engines/ags/engine/ac/mouse.cpp
+++ b/engines/ags/engine/ac/mouse.cpp
@@ -53,8 +53,6 @@ namespace AGS3 {
using namespace AGS::Shared;
using namespace AGS::Engine;
-extern void ags_domouse(int str);
-
// The mouse functions are static so the script doesn't pass
// in an object parameter
void Mouse_SetVisible(int isOn) {
diff --git a/engines/ags/engine/ac/route_finder_impl_legacy.cpp b/engines/ags/engine/ac/route_finder_impl_legacy.cpp
index 3d74db313fc..bda7ad44350 100644
--- a/engines/ags/engine/ac/route_finder_impl_legacy.cpp
+++ b/engines/ags/engine/ac/route_finder_impl_legacy.cpp
@@ -39,8 +39,6 @@
namespace AGS3 {
-extern void update_polled_stuff_if_runtime();
-
using AGS::Shared::Bitmap;
namespace BitmapHelper = AGS::Shared::BitmapHelper;
diff --git a/engines/ags/engine/debugging/debug_log.h b/engines/ags/engine/debugging/debug_log.h
index 2c334058ca7..07c16851528 100644
--- a/engines/ags/engine/debugging/debug_log.h
+++ b/engines/ags/engine/debugging/debug_log.h
@@ -23,6 +23,7 @@
#define AGS_ENGINE_DEBUGGING_DEBUG_LOG_H
#include "ags/engine/ac/runtime_defines.h"
+#include "ags/shared/ac/common.h"
#include "ags/shared/debugging/out.h"
#include "ags/shared/util/ini_util.h"
#include "ags/shared/util/string.h"
@@ -47,9 +48,6 @@ void debug_script_warn(const char *texx, ...);
// prepending it with current room number and script position info
void debug_script_log(const char *msg, ...);
-// Same as quit(), but with message formatting
-void quitprintf(const char *texx, ...);
-
// Connect engine to external debugger, if one is available
bool init_editor_debugging();
// allow LShift to single-step, RShift to pause flow
diff --git a/engines/ags/engine/device/mouse_w32.h b/engines/ags/engine/device/mouse_w32.h
index 50fd54d736a..3222e856b1a 100644
--- a/engines/ags/engine/device/mouse_w32.h
+++ b/engines/ags/engine/device/mouse_w32.h
@@ -34,7 +34,6 @@ class Bitmap;
using namespace AGS; // FIXME later
-void msetgraphpos(int, int);
void mgetgraphpos();
// Sets the area of the game frame (zero-based coordinates) where the mouse cursor is allowed to move;
// this function was meant to be used to achieve gameplay effect
diff --git a/engines/ags/engine/gui/gui_engine.cpp b/engines/ags/engine/gui/gui_engine.cpp
index 1940fe7e8de..a6e7e7eb030 100644
--- a/engines/ags/engine/gui/gui_engine.cpp
+++ b/engines/ags/engine/gui/gui_engine.cpp
@@ -43,6 +43,8 @@
namespace AGS3 {
+extern void wouttext_outline(Shared::Bitmap *ds, int xxp, int yyp, int usingfont, color_t text_color, const char *texx);
+
using namespace AGS::Shared;
// For engine these are defined in ac.cpp
diff --git a/engines/ags/engine/main/config.h b/engines/ags/engine/main/config.h
index c7e1365bf7c..6ea11c6280b 100644
--- a/engines/ags/engine/main/config.h
+++ b/engines/ags/engine/main/config.h
@@ -64,7 +64,6 @@ float INIreadfloat(const ConfigTree &cfg, const String §n, const String &ite
String INIreadstring(const ConfigTree &cfg, const String §n, const String &item, const String &def_value = "");
void INIwriteint(ConfigTree &cfg, const String §n, const String &item, int value);
void INIwritestring(ConfigTree &cfg, const String §n, const String &item, const String &value);
-void INIwriteint(ConfigTree &cfg, const String §n, const String &item, int value);
} // namespace AGS3
diff --git a/engines/ags/engine/script/script_engine.cpp b/engines/ags/engine/script/script_engine.cpp
index 491655928d9..f7c31a77d54 100644
--- a/engines/ags/engine/script/script_engine.cpp
+++ b/engines/ags/engine/script/script_engine.cpp
@@ -47,9 +47,6 @@ class RoomStruct;
using namespace AGS::Shared;
-extern void quit(const char *);
-// in script/script_common
-
std::pair<String, String> cc_error_at_line(const char *error_msg) {
ccInstance *sci = ccInstance::GetCurrentInstance();
if (!sci) {
diff --git a/engines/ags/lib/allegro/color.h b/engines/ags/lib/allegro/color.h
index 38f955b5c63..d9737e95d15 100644
--- a/engines/ags/lib/allegro/color.h
+++ b/engines/ags/lib/allegro/color.h
@@ -148,11 +148,6 @@ extern int getg32(int c);
extern int getb32(int c);
extern int geta32(int c);
-extern int getr_depth(int color_depth, int c);
-extern int getg_depth(int color_depth, int c);
-extern int getb_depth(int color_depth, int c);
-extern int geta_depth(int color_depth, int c);
-
} // namespace AGS3
#endif
diff --git a/engines/ags/shared/font/fonts.cpp b/engines/ags/shared/font/fonts.cpp
index e8075e8b754..bc385ad262a 100644
--- a/engines/ags/shared/font/fonts.cpp
+++ b/engines/ags/shared/font/fonts.cpp
@@ -35,10 +35,6 @@
namespace AGS3 {
-// Project-dependent implementation
-extern int wgettextwidth_compensate(const char *tex, int font);
-extern int get_fixed_pixel_size(int pixels);
-
using namespace AGS::Shared;
namespace AGS {
diff --git a/engines/ags/shared/gui/gui_button.h b/engines/ags/shared/gui/gui_button.h
index 36f5678b372..3e0f0c133ac 100644
--- a/engines/ags/shared/gui/gui_button.h
+++ b/engines/ags/shared/gui/gui_button.h
@@ -23,6 +23,7 @@
#define AGS_SHARED_GUI_GUI_BUTTON_H
#include "ags/lib/std/vector.h"
+#include "ags/engine/ac/button.h"
#include "ags/shared/gui/gui_object.h"
#include "ags/shared/util/string.h"
@@ -130,9 +131,6 @@ private:
} // namespace Shared
} // namespace AGS
-int UpdateAnimatingButton(int bu);
-void StopButtonAnimation(int idxn);
-
} // namespace AGS3
#endif
diff --git a/engines/ags/shared/gui/gui_main.cpp b/engines/ags/shared/gui/gui_main.cpp
index 8412e17279d..ca9790647cc 100644
--- a/engines/ags/shared/gui/gui_main.cpp
+++ b/engines/ags/shared/gui/gui_main.cpp
@@ -38,6 +38,8 @@
namespace AGS3 {
+extern void wouttext_outline(Shared::Bitmap *ds, int xxp, int yyp, int usingfont, color_t text_color, const char *texx);
+
using namespace AGS::Shared;
#define MOVER_MOUSEDOWNLOCKED -4000
diff --git a/engines/ags/shared/gui/gui_main.h b/engines/ags/shared/gui/gui_main.h
index 331fe299e0f..c451bc0e2f3 100644
--- a/engines/ags/shared/gui/gui_main.h
+++ b/engines/ags/shared/gui/gui_main.h
@@ -23,6 +23,8 @@
#define AGS_SHARED_GUI_GUI_MAIN_H
#include "ags/lib/std/vector.h"
+#include "ags/engine/ac/draw.h"
+#include "ags/shared/ac/common.h"
#include "ags/shared/ac/common_defines.h" // TODO: split out gui drawing helpers
#include "ags/shared/gfx/gfx_def.h" // TODO: split out gui drawing helpers
#include "ags/shared/gui/gui_defines.h"
@@ -239,20 +241,9 @@ extern int get_adjusted_spritewidth(int spr);
extern int get_adjusted_spriteheight(int spr);
extern bool is_sprite_alpha(int spr);
-// This function has distinct implementations in Engine and Editor
-extern void draw_gui_sprite(Shared::Bitmap *ds, int spr, int x, int y, bool use_alpha = true,
- Shared::BlendMode blend_mode = Shared::kBlendMode_Alpha);
-
-extern AGS_INLINE int game_to_data_coord(int coord);
-extern AGS_INLINE int data_to_game_coord(int coord);
-extern AGS_INLINE void data_to_game_coords(int *x, int *y);
-extern AGS_INLINE int get_fixed_pixel_size(int pixels);
-
// Those function have distinct implementations in Engine and Editor
-extern void wouttext_outline(Shared::Bitmap *ds, int xxp, int yyp, int usingfont, color_t text_color, const char *texx);
extern int wgettextwidth_compensate(Shared::Bitmap *ds, const char *tex, int font);
-extern void set_our_eip(int eip);
#define SET_EIP(x) set_our_eip(x);
extern void set_eip_guiobj(int eip);
extern int get_eip_guiobj();
More information about the Scummvm-git-logs
mailing list