[Scummvm-git-logs] scummvm master -> aaf61c1ade43c2b9de4386aae90a15b60ba504b1
dreammaster
noreply at scummvm.org
Fri Jul 3 11:42:42 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
da4d013ea4 MADS: Janitorial
aaf61c1ade MADS: Fix gcc compiler warnings
Commit: da4d013ea45681ff57124366a96d2c3cb796d53e
https://github.com/scummvm/scummvm/commit/da4d013ea45681ff57124366a96d2c3cb796d53e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-07-03T21:40:15+10:00
Commit Message:
MADS: Janitorial
Changed paths:
R engines/mads/madsv2/core/demo.h
engines/mads/madsv2/core/anim.cpp
engines/mads/madsv2/core/anim.h
engines/mads/madsv2/core/btype.h
engines/mads/madsv2/core/buffer.cpp
engines/mads/madsv2/core/buffer.h
engines/mads/madsv2/core/camera.cpp
engines/mads/madsv2/core/camera.h
engines/mads/madsv2/core/color.cpp
engines/mads/madsv2/core/config.cpp
engines/mads/madsv2/core/conv.cpp
engines/mads/madsv2/core/cursor.cpp
engines/mads/madsv2/core/cycle.cpp
engines/mads/madsv2/core/cycle.h
engines/mads/madsv2/core/dialog.cpp
engines/mads/madsv2/core/dialog.h
engines/mads/madsv2/core/ems.h
engines/mads/madsv2/core/env.h
engines/mads/madsv2/core/error.cpp
engines/mads/madsv2/core/error.h
engines/mads/madsv2/core/font.h
engines/mads/madsv2/core/game.cpp
engines/mads/madsv2/core/game.h
engines/mads/madsv2/core/general.h
engines/mads/madsv2/core/global.h
engines/mads/madsv2/core/heap.h
engines/mads/madsv2/core/himem.cpp
engines/mads/madsv2/core/himem.h
engines/mads/madsv2/core/hspot.h
engines/mads/madsv2/core/implode.cpp
engines/mads/madsv2/core/inter.cpp
engines/mads/madsv2/core/inter.h
engines/mads/madsv2/core/kernel.cpp
engines/mads/madsv2/core/kernel.h
engines/mads/madsv2/core/keys.cpp
engines/mads/madsv2/core/keys.h
engines/mads/madsv2/core/lbm.h
engines/mads/madsv2/core/lib.h
engines/mads/madsv2/core/loader.h
engines/mads/madsv2/core/lock.h
engines/mads/madsv2/core/magic.h
engines/mads/madsv2/core/matte.cpp
engines/mads/madsv2/core/matte.h
engines/mads/madsv2/core/mcga.cpp
engines/mads/madsv2/core/mem.cpp
engines/mads/madsv2/core/object.cpp
engines/mads/madsv2/core/object.h
engines/mads/madsv2/core/pack.cpp
engines/mads/madsv2/core/pack.h
engines/mads/madsv2/core/pal.h
engines/mads/madsv2/core/pfab.cpp
engines/mads/madsv2/core/popup.cpp
engines/mads/madsv2/core/popup.h
engines/mads/madsv2/core/qual.h
engines/mads/madsv2/core/quote.h
engines/mads/madsv2/core/rail.cpp
engines/mads/madsv2/core/rail.h
engines/mads/madsv2/core/room.cpp
engines/mads/madsv2/core/room.h
engines/mads/madsv2/core/screen.cpp
engines/mads/madsv2/core/screen.h
engines/mads/madsv2/core/sprite.cpp
engines/mads/madsv2/core/sprite.h
engines/mads/madsv2/core/text.h
engines/mads/madsv2/core/tile.h
engines/mads/madsv2/core/timer.h
engines/mads/madsv2/core/video.h
engines/mads/madsv2/core/vocab.h
engines/mads/madsv2/core/window.cpp
engines/mads/madsv2/core/window.h
engines/mads/madsv2/dragonsphere/asound.cpp
engines/mads/madsv2/dragonsphere/main_menu.h
engines/mads/madsv2/dragonsphere/rooms/room108.cpp
engines/mads/madsv2/dragonsphere/rooms/room112.cpp
engines/mads/madsv2/dragonsphere/rooms/room113.cpp
engines/mads/madsv2/dragonsphere/rooms/room114.cpp
engines/mads/madsv2/dragonsphere/rooms/room120.cpp
engines/mads/madsv2/dragonsphere/rooms/room607.cpp
engines/mads/madsv2/forest/extra.cpp
engines/mads/madsv2/forest/inventory.cpp
engines/mads/madsv2/phantom/main_menu.cpp
engines/mads/madsv2/phantom/main_menu.h
engines/mads/madsv2/phantom/rooms/room101.cpp
engines/mads/madsv2/phantom/rooms/room102.cpp
engines/mads/madsv2/phantom/rooms/room103.cpp
engines/mads/madsv2/phantom/rooms/room104.h
engines/mads/madsv2/phantom/rooms/room105.h
engines/mads/madsv2/phantom/rooms/room106.h
engines/mads/madsv2/phantom/rooms/room107.h
engines/mads/madsv2/phantom/rooms/room108.h
engines/mads/madsv2/phantom/rooms/room250.cpp
engines/mads/madsv2/phantom/rooms/room301.cpp
engines/mads/madsv2/phantom/rooms/room302.cpp
engines/mads/madsv2/phantom/rooms/room303.cpp
engines/mads/madsv2/phantom/rooms/room408.cpp
diff --git a/engines/mads/madsv2/core/anim.cpp b/engines/mads/madsv2/core/anim.cpp
index f4d7a792ea0..f66a9c6adf5 100644
--- a/engines/mads/madsv2/core/anim.cpp
+++ b/engines/mads/madsv2/core/anim.cpp
@@ -433,7 +433,6 @@ AnimPtr anim_load(const char *file_name, Buffer *orig, Buffer *depth,
// we'll get back a pointer to the actual sprite series for
// each id number
- // printf("temp_buf=%s",temp_buf); keys_get();
anim->series_id[count] = matte_load_series(temp_buf, load_flags, 0);
if (anim->series_id[count] < 0) {
anim_error = 9;
diff --git a/engines/mads/madsv2/core/anim.h b/engines/mads/madsv2/core/anim.h
index 453fccf6e40..98c4ecbbb3e 100644
--- a/engines/mads/madsv2/core/anim.h
+++ b/engines/mads/madsv2/core/anim.h
@@ -34,9 +34,6 @@
namespace MADS {
namespace MADSV2 {
-
-#define anim_file_version "3.02" /* Animate definition file version */
-
/* Flags to be passed to anim_load(). Note that all PAL_MAP... flags */
/* can be passed through as well. */
@@ -210,7 +207,7 @@ struct SegmentBuf {
word sprite_change_target[AA_MAX_CHANGES];
};
-typedef struct SegmentBuf Segment;
+typedef SegmentBuf Segment;
typedef Segment *SegmentPtr;
@@ -229,7 +226,7 @@ struct ImageEditBuf {
byte scale;
};
-typedef struct ImageEditBuf ImageEdit;
+typedef ImageEditBuf ImageEdit;
typedef ImageEdit *ImageEditPtr;
struct ImageInter {
@@ -259,7 +256,7 @@ struct MessageBuf {
char *text;
};
-typedef struct MessageBuf Message;
+typedef MessageBuf Message;
typedef Message *MessagePtr;
@@ -274,7 +271,7 @@ struct FrameEditBuf {
int8 yank_y;
};
-typedef struct FrameEditBuf FrameEdit;
+typedef FrameEditBuf FrameEdit;
typedef FrameEdit *FrameEditPtr;
@@ -369,7 +366,7 @@ struct AnimDefBuf {
};
-typedef struct AnimDefBuf AnimDef;
+typedef AnimDefBuf AnimDef;
typedef AnimDef *AnimDefPtr;
/* aa file header */
diff --git a/engines/mads/madsv2/core/btype.h b/engines/mads/madsv2/core/btype.h
index 0c844167a04..818f41ba631 100644
--- a/engines/mads/madsv2/core/btype.h
+++ b/engines/mads/madsv2/core/btype.h
@@ -27,15 +27,15 @@
namespace MADS {
namespace MADSV2 {
-byte upcaseb(byte inp);
+extern byte upcaseb(byte inp);
-int upcasei(int inp);
+extern int upcasei(int inp);
-int xtoi(char *string);
+extern int xtoi(char *string);
-int btoi(char *string);
+extern int btoi(char *string);
-int stoi(char *string);
+extern int stoi(char *string);
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/buffer.cpp b/engines/mads/madsv2/core/buffer.cpp
index c88bae5aea0..9ac20646424 100644
--- a/engines/mads/madsv2/core/buffer.cpp
+++ b/engines/mads/madsv2/core/buffer.cpp
@@ -393,10 +393,14 @@ int buffer_legal(const Buffer &walk, int orig_wrap,
word legality = LEGAL;
word currently_illegal = false;
- if (walk.data == NULL) return legality;
- if (x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0) return legality;
- if (x1 >= orig_wrap || x2 >= orig_wrap) return legality;
- if (y1 >= walk.y || y2 >= walk.y) return legality;
+ if (walk.data == NULL)
+ return legality;
+ if (x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0)
+ return legality;
+ if (x1 >= orig_wrap || x2 >= orig_wrap)
+ return legality;
+ if (y1 >= walk.y || y2 >= walk.y)
+ return legality;
int delta_y = y2 - y1;
int y_sign = walk.x;
@@ -418,7 +422,7 @@ int buffer_legal(const Buffer &walk, int orig_wrap,
int y_count = delta_y + 1;
byte *ptr = walk.data + y1 * walk.x + (x1 / 8);
- uint bit_pos = 8 - (x1 % 8); // cl: 1=MSB side, 8=LSB side
+ uint bit_pos = 8 - (x1 % 8);
for (int col = x_count; col > 0; col--) {
dAccum += y_count;
@@ -465,7 +469,7 @@ int buffer_legal(const Buffer &walk, int orig_wrap,
/**
* Advance the pattern accumulator one step.
*/
-static void pattern_math(void) {
+static void pattern_math() {
word bx = accum;
accum += pattern_control_value;
bx = (bx >> 9) | (bx << 7); // ror 9
diff --git a/engines/mads/madsv2/core/buffer.h b/engines/mads/madsv2/core/buffer.h
index 5ffce131b79..d946d6de1df 100644
--- a/engines/mads/madsv2/core/buffer.h
+++ b/engines/mads/madsv2/core/buffer.h
@@ -113,49 +113,49 @@ extern bool buffer_rect_copy_2(const Buffer &from, Buffer &unto,
/**
* Given X and Y, sets pixel to color C
*/
-void buffer_put_pixel(Buffer &buf, word x, word y, byte c);
+extern void buffer_put_pixel(Buffer &buf, word x, word y, byte c);
/**
* Given X and Y, gets the pixel at that position.
*/
-byte buffer_get_pixel(const Buffer &buf, word x, word y);
+extern byte buffer_get_pixel(const Buffer &buf, word x, word y);
/**
* Given starting and ending points on the X axis, and the constant
* Y value, draws a line in the given color on the live MCGA screen.
*/
-void buffer_hline(Buffer &buf, word x1, word x2, word y, byte color);
+extern void buffer_hline(Buffer &buf, word x1, word x2, word y, byte color);
/**
* Given starting and ending points on the Y axis, and the constant
* X value, draws a line in the given color on the live MCGA screen.
*/
-void buffer_vline(Buffer &buf, word x, word y1, word y2, byte color);
+extern void buffer_vline(Buffer &buf, word x, word y1, word y2, byte color);
/**
* Draws outside edge of retangle given home and size along both axis.
*/
-void buffer_draw_box(Buffer &buf, word x1, word y1, word x2, word y2, byte color);
+extern void buffer_draw_box(Buffer &buf, word x1, word y1, word x2, word y2, byte color);
/**
* Draws a horizontal line by xoring/inverting the existing pixels
*/
-void buffer_hline_xor(Buffer &buf, int x1, int x2, int y);
+extern void buffer_hline_xor(Buffer &buf, int x1, int x2, int y);
/**
* Draws a vertical line by xoring/inverting the existing pixels
*/
-void buffer_vline_xor(Buffer &buf, int x, int y1, int y2);
+extern void buffer_vline_xor(Buffer &buf, int x, int y1, int y2);
/**
* Draws a cross-hairs at the specified x, y
*/
-void buffer_draw_crosshair(Buffer &buf, int x, int y);
+extern void buffer_draw_crosshair(Buffer &buf, int x, int y);
/**
* Draws a box using pixel xor inversion
*/
-void buffer_draw_box_xor(Buffer &buf, int x1, int y1, int x2, int y2);
+extern void buffer_draw_box_xor(Buffer &buf, int x1, int y1, int x2, int y2);
/**
* Scans the two buffers. Locations that are not the same on both buffers
@@ -222,7 +222,7 @@ extern void buffer_line_xor(Buffer target, int x1, int y1, int x2, int y2);
*/
extern int buffer_legal(const Buffer &walk, int orig_wrap, int x1, int y1, int x2, int y2);
-word buffer_rect_fill_pattern(Buffer target, int ul_x, int ul_y, int size_x, int size_y,
+extern word buffer_rect_fill_pattern(Buffer target, int ul_x, int ul_y, int size_x, int size_y,
int base_x, int base_y, int base_xs, byte value1, byte value2,
word start_accum, word note_line);
@@ -236,14 +236,14 @@ word buffer_rect_fill_pattern(Buffer target, int ul_x, int ul_y, int size_x, int
extern bool buffer_rect_fill_swap(Buffer target, int ul_x, int ul_y,
int size_x, int size_y, byte value1, byte value2);
-void buffer_peel_horiz(Buffer *target, int peel);
+extern void buffer_peel_horiz(Buffer *target, int peel);
-void buffer_peel_vert(Buffer *target, int peel,
+extern void buffer_peel_vert(Buffer *target, int peel,
byte *work_memory, long work_size);
-int buffer_to_disk(Buffer *source, int x, int y,
+extern int buffer_to_disk(Buffer *source, int x, int y,
int xs, int ys);
-void buffer_from_disk(Buffer *source, int buffer_id,
+extern void buffer_from_disk(Buffer *source, int buffer_id,
int keep_flag, int x, int y, int xs, int ys);
extern bool buffer_to_ems(Buffer *source, int page_handle,
@@ -251,9 +251,9 @@ extern bool buffer_to_ems(Buffer *source, int page_handle,
extern bool buffer_from_ems(Buffer *source, int page_handle,
int target_ems_handle, int x, int y, int xs, int ys);
-int buffer_preserve(Buffer *source, int flags,
+extern int buffer_preserve(Buffer *source, int flags,
int source_ems_handle, int x, int y, int xs, int ys);
-void buffer_restore(Buffer *source, int preserve_handle,
+extern void buffer_restore(Buffer *source, int preserve_handle,
int target_ems_handle, int x, int y, int xs, int ys);
extern bool buffer_rect_translate(Buffer from, Buffer unto,
diff --git a/engines/mads/madsv2/core/camera.cpp b/engines/mads/madsv2/core/camera.cpp
index cae5add405f..c99479bafa3 100644
--- a/engines/mads/madsv2/core/camera.cpp
+++ b/engines/mads/madsv2/core/camera.cpp
@@ -38,7 +38,7 @@ int camera_old_x_target = 0;/* For saving/restoring game */
int camera_old_y_target = 0;
-void camera_init_default(void) {
+void camera_init_default() {
camera_x.panning = false;
camera_y.panning = false;
diff --git a/engines/mads/madsv2/core/camera.h b/engines/mads/madsv2/core/camera.h
index 7724615d935..8d1655c57be 100644
--- a/engines/mads/madsv2/core/camera.h
+++ b/engines/mads/madsv2/core/camera.h
@@ -42,7 +42,7 @@ namespace MADSV2 {
#define CAMERA_DEFAULT_Y_OFF_CENTER 80
-typedef struct {
+struct Camera {
int pans; /* Flag if camera can pan in this room */
int panning; /* Flag if camera now panning */
int pan_mode; /* Panning mode (CAMERA_PLAYER, etc.) */
@@ -55,7 +55,7 @@ typedef struct {
int pan_direction; /* Pan initial direction */
long pan_clock; /* Pan clock for next update */
int pan_this_frame; /* Flag if panned this frame */
-} Camera;
+};
extern Camera camera_x; /* Horizontal panning camera */
diff --git a/engines/mads/madsv2/core/color.cpp b/engines/mads/madsv2/core/color.cpp
index 2c4201012b2..7ae436c3788 100644
--- a/engines/mads/madsv2/core/color.cpp
+++ b/engines/mads/madsv2/core/color.cpp
@@ -593,8 +593,6 @@ void color_buffer_list_to_main(ColorListPtr color_list, Buffer *scan_buf) {
for (int r = 0; r < row; r++) {
for (int c = 0; c < col; c++) {
byte pixel = scan_ptr[c];
- // Original: ax = pixel, bx = pixel*2, ax = pixel*4,
- // bx = pixel*2 + pixel*4 = pixel*6
int offset = (int)pixel * 6;
scan_ptr[c] = table_x16[offset];
}
diff --git a/engines/mads/madsv2/core/config.cpp b/engines/mads/madsv2/core/config.cpp
index b61afec841e..e6e97a3ab7f 100644
--- a/engines/mads/madsv2/core/config.cpp
+++ b/engines/mads/madsv2/core/config.cpp
@@ -100,7 +100,7 @@ void global_load_config_parameters() {
}
}
-void global_unload_config_parameters(void) {
+void global_unload_config_parameters() {
config_file.interface_hotspots = inter_report_hotspots ? INTERFACE_BRAINDEAD : INTERFACE_MACINTOSH;
config_file.panning_speed = kernel_panning_speed;
diff --git a/engines/mads/madsv2/core/conv.cpp b/engines/mads/madsv2/core/conv.cpp
index 66faa7aebb8..8340b2ff668 100644
--- a/engines/mads/madsv2/core/conv.cpp
+++ b/engines/mads/madsv2/core/conv.cpp
@@ -1206,8 +1206,8 @@ void conv_start(ConvData *convData, Conv *convIn) {
void conv_get(int convNum) {
char fname[40];
int free_slot = -1;
- int error_occurred = -1; // matches original si: -1 = error, 0 = success
- int stage_error = 0; // which stage failed (1/2/3); used as data2 in error_report
+ int error_occurred = -1;
+ int stage_error = 0; // which stage failed (1/2/3); used as data2 in error_report
// Find first free slot (stops as soon as one is found, matching original loop)
for (int i = 0; i < CONV_MAX_DATA; ++i) {
diff --git a/engines/mads/madsv2/core/cursor.cpp b/engines/mads/madsv2/core/cursor.cpp
index bf651a82aba..e113f4d8593 100644
--- a/engines/mads/madsv2/core/cursor.cpp
+++ b/engines/mads/madsv2/core/cursor.cpp
@@ -45,7 +45,7 @@ void cursor_set_mode(int my_type) {
// No implementation
}
-void cursor_toggle_insert(void) {
+void cursor_toggle_insert() {
if (cursor_mode == CURSOR_OVERWRITE) {
cursor_set_mode(CURSOR_INSERT);
} else {
diff --git a/engines/mads/madsv2/core/cycle.cpp b/engines/mads/madsv2/core/cycle.cpp
index b6791617077..9d5e69f2c9d 100644
--- a/engines/mads/madsv2/core/cycle.cpp
+++ b/engines/mads/madsv2/core/cycle.cpp
@@ -38,7 +38,6 @@ int cycling_threshold;
int total_cycle_colors;
long cycle_timing[COLOR_MAX_CYCLES];
-//static RGBcolor temp_color;
void cycle_init(CycleListPtr new_cycle_list, int activate) {
int count;
@@ -64,7 +63,7 @@ void cycle_init(CycleListPtr new_cycle_list, int activate) {
cycling_active = activate;
}
-void cycle_colors(void) {
+void cycle_colors() {
int num;
int first;
int count;
diff --git a/engines/mads/madsv2/core/cycle.h b/engines/mads/madsv2/core/cycle.h
index 6e45ed4ea37..f5880e41969 100644
--- a/engines/mads/madsv2/core/cycle.h
+++ b/engines/mads/madsv2/core/cycle.h
@@ -38,7 +38,7 @@ extern int total_cycle_colors; /* Total # of colors being cycled */
extern long cycle_timing[COLOR_MAX_CYCLES]; /* Timing for each cycle */
void cycle_init(CycleListPtr new_cycle_list, int activate);
-void cycle_colors(void);
+void cycle_colors();
extern void init_cycle();
diff --git a/engines/mads/madsv2/core/demo.h b/engines/mads/madsv2/core/demo.h
deleted file mode 100644
index c4101af881c..00000000000
--- a/engines/mads/madsv2/core/demo.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_CORE_DEMO_H
-#define MADS_CORE_DEMO_H
-
-#include "mads/madsv2/core/general.h"
-
-namespace MADS {
-namespace MADSV2 {
-
-int demo_checksum(byte **source, int *pack_size, int *unpack_size);
-int demo_check(void);
-
-void demo_log_in(char *release_version, char *release_date);
-void demo_verify(void);
-
-} // namespace MADSV2
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/madsv2/core/dialog.cpp b/engines/mads/madsv2/core/dialog.cpp
index 19a53106ada..837b164f6a9 100644
--- a/engines/mads/madsv2/core/dialog.cpp
+++ b/engines/mads/madsv2/core/dialog.cpp
@@ -3018,7 +3018,7 @@ ItemPtr dialog_execute(DialogPtr dialog, ItemPtr active_item, ItemPtr default_bu
return item;
}
-DialogPtr dialog_create_default(void) {
+DialogPtr dialog_create_default() {
return(dialog_create(NULL, DD_CENTER, DD_CENTER, DD_AUTO,
DD_DEFAULT, DD_DEFAULT, DD_DEFAULT));
}
@@ -3332,7 +3332,7 @@ int dialog_get_number(DialogPtr dialog, ItemPtr item) {
void dialog_trap_critical() {
}
-void dialog_restore_critical(void) {
+void dialog_restore_critical() {
}
void init_dialog() {
diff --git a/engines/mads/madsv2/core/dialog.h b/engines/mads/madsv2/core/dialog.h
index 8e32b44815a..d312726c4c4 100644
--- a/engines/mads/madsv2/core/dialog.h
+++ b/engines/mads/madsv2/core/dialog.h
@@ -145,7 +145,7 @@ struct DialogItem {
char *prompt; /* Item prompt/string */
};
-typedef struct DialogItem Item;
+typedef DialogItem Item;
typedef Item *ItemPtr;
struct DialogList {
@@ -161,7 +161,7 @@ struct DialogList {
short max_elements;
};
-typedef struct DialogList List;
+typedef DialogList List;
typedef List *ListPtr;
struct DialogBox {
@@ -213,7 +213,7 @@ struct DialogBox {
long string_space_remaining; /* Amount of string space left */
};
-typedef struct DialogBox Dialog;
+typedef DialogBox Dialog;
typedef Dialog *DialogPtr;
#define StringMode(x) (((x).type == DD_I_STRING) || ((x).type == DD_I_FILENAME) || ((x).type == DD_I_LISTBASED))
diff --git a/engines/mads/madsv2/core/ems.h b/engines/mads/madsv2/core/ems.h
index 664bca73cb7..974ece0605f 100644
--- a/engines/mads/madsv2/core/ems.h
+++ b/engines/mads/madsv2/core/ems.h
@@ -44,21 +44,21 @@ namespace MADSV2 {
#define EMS_DIRECTORY_ADDRESS 2048
-typedef struct {
+struct EmsDirectory {
byte flag;
byte level;
char list[14];
long size;
int num_packets;
long packet_size[PACK_MAX_LIST_LENGTH];
-} EmsDirectory;
+};
-typedef struct {
+struct EmsPtr {
int handle; /* EMS block handle */
int page_marker; /* Page marker in EMS block */
int page_offset; /* Offset within the page */
-} EmsPtr;
+};
extern bool ems_driver; /* Flag if EMS driver is installed */
diff --git a/engines/mads/madsv2/core/env.h b/engines/mads/madsv2/core/env.h
index 37cf6bf63d1..5747b2c39c2 100644
--- a/engines/mads/madsv2/core/env.h
+++ b/engines/mads/madsv2/core/env.h
@@ -74,7 +74,7 @@ extern long env_concat_file_size; /* Size of last concat file opened */
extern char env_null[7];
-extern int env_verify(void);
+extern int env_verify();
extern Common::SeekableReadStream *env_open(const char *file_path, const char *options = "rb");
extern int env_exist(const char *file_name);
extern long env_get_file_size(Common::SeekableReadStream *handle);
@@ -92,41 +92,41 @@ extern char *env_get(char *target, const char *env);
* to the next variable in the environment list (if pointer is
* to a null string, the end of the list has been reached).
*/
-char *env_next(char *variable);
+extern char *env_next(char *variable);
/**
* Given a pointer to an environment, returns a pointer to one
* byte after the end of the entire environment.
*/
-char *env_find_end(char *environment);
+extern char *env_find_end(char *environment);
/**
* Given a pointer to the start of an environment, returns the
* size in bytes of that environment.
*/
-int env_size(char *environment);
+extern int env_size(char *environment);
-int env_free(char *environment);
+extern int env_free(char *environment);
/**
* Given a pointer to an environment and a variable, returns a
* pointer to that variable name in the environment. Returns
* NULL if no match found.
*/
-char *env_find(char *environment, const char *variable);
+extern char *env_find(char *environment, const char *variable);
/**
* Given an environment and a variable name, deletes that
* variable from the environment table.
*/
-void env_delete(char *environment, const char *variable);
+extern void env_delete(char *environment, const char *variable);
/**
* Given a pointer to an environment, a variable name, and a value,
* inserts that variable into the environment table with the
* designated value. Returns 0 for success, -1 for failure.
*/
-int env_insert(char *environment, const char *variable, const char *value);
+extern int env_insert(char *environment, const char *variable, const char *value);
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/error.cpp b/engines/mads/madsv2/core/error.cpp
index ffd9a82c258..85129c3b034 100644
--- a/engines/mads/madsv2/core/error.cpp
+++ b/engines/mads/madsv2/core/error.cpp
@@ -222,7 +222,7 @@ done:
;
}
-void error_check_memory(void) {
+void error_check_memory() {
if (mem_last_alloc_failed) {
error_report(ERROR_NO_MORE_MEMORY, ERROR, mem_last_alloc_loader,
mem_last_alloc_size, mem_last_alloc_avail);
diff --git a/engines/mads/madsv2/core/error.h b/engines/mads/madsv2/core/error.h
index 38424a5830b..71ab63cb463 100644
--- a/engines/mads/madsv2/core/error.h
+++ b/engines/mads/madsv2/core/error.h
@@ -140,7 +140,7 @@ extern int error_scan(char *target, const char *name, int number);
extern void error_dump_file(const char *file_name);
extern void error_break_point(int data1, int data2);
extern void error_watch_point(char *message, long data1, long data2);
-extern void error_check_memory(void);
+extern void error_check_memory();
extern void error_file_point(char *message, long data1, long data2);
extern void error_entry(char *name, char *message);
extern void error_exit(char *name, char *message);
diff --git a/engines/mads/madsv2/core/font.h b/engines/mads/madsv2/core/font.h
index dd36b4b07d2..f7a5ebf9bdc 100644
--- a/engines/mads/madsv2/core/font.h
+++ b/engines/mads/madsv2/core/font.h
@@ -39,7 +39,7 @@ struct FontBuf {
byte *data[FONT_SIZE];
};
-typedef struct FontBuf Font;
+typedef FontBuf Font;
typedef Font *FontPtr;
extern byte font_colors[4];
diff --git a/engines/mads/madsv2/core/game.cpp b/engines/mads/madsv2/core/game.cpp
index 803e3317a34..b1aec27fb3a 100644
--- a/engines/mads/madsv2/core/game.cpp
+++ b/engines/mads/madsv2/core/game.cpp
@@ -50,7 +50,6 @@
#include "mads/madsv2/core/error.h"
#include "mads/madsv2/core/popup.h"
#include "mads/madsv2/core/object.h"
-#include "mads/madsv2/core/demo.h"
#include "mads/madsv2/core/himem.h"
#include "mads/madsv2/core/lock.h"
#include "mads/madsv2/core/magic.h"
diff --git a/engines/mads/madsv2/core/game.h b/engines/mads/madsv2/core/game.h
index 2755de20a9c..27f4df0bca2 100644
--- a/engines/mads/madsv2/core/game.h
+++ b/engines/mads/madsv2/core/game.h
@@ -227,31 +227,31 @@ extern int report_version;
extern int art_hags_are_on_hd;
extern void game_save_name(int id);
-extern void game_set_camera_speed(void);
+extern void game_set_camera_speed();
/**
* Execute a function-pointer routine.
*/
extern void game_exec_function(void (*(target))());
-extern void game_debugger_reset(void);
-extern void game_debugger(void);
+extern void game_debugger_reset();
+extern void game_debugger();
/**
* Sets up for the main menu routines to run--this mainly involves
* getting enough memory to hold the save directory and menu heap.
*/
-extern void game_menu_setup(void);
+extern void game_menu_setup();
/**
* Tells the menu structures to bite down hard.
*/
-extern void game_menu_shutdown(void);
+extern void game_menu_shutdown();
extern int main_cheating_key(int mykey);
extern int main_normal_key(int mykey);
-extern int main_copy_verify(void);
+extern int main_copy_verify();
extern void game_cold_data_init();
/**
diff --git a/engines/mads/madsv2/core/general.h b/engines/mads/madsv2/core/general.h
index 35e9c60c5cd..e44cadb92c0 100644
--- a/engines/mads/madsv2/core/general.h
+++ b/engines/mads/madsv2/core/general.h
@@ -55,11 +55,11 @@ typedef byte PaletteMap[256][3]; /* An entire Mcga palette #2 */
#define pal_color(p,i,c) (*(((byte *)&p[i])+c))
-typedef struct { /* Video buffer structure */
+struct Buffer { /* Video buffer structure */
int y; /* Wrap value for buffer (y size) */
int x; /* X size of buffer */
byte *data; /* Pointer to actual data */
-} Buffer;
+};
#define far_string(v,s) char _based(_segname("FARSTRING")) v[] = s;
diff --git a/engines/mads/madsv2/core/global.h b/engines/mads/madsv2/core/global.h
index 340781bb014..1829cf7072c 100644
--- a/engines/mads/madsv2/core/global.h
+++ b/engines/mads/madsv2/core/global.h
@@ -75,18 +75,18 @@ extern char global_release_copyright[];
extern int16 global[];
extern int global_list_size;
-void global_init_code(void);
-void global_daemon_code(void);
-void global_pre_parser_code(void);
-void global_parser_code(void);
-void global_error_code(void);
-void global_room_init(void);
-void global_verb_filter(void);
-void global_sound_driver(void);
-void global_section_constructor(void);
-void global_write_config_file(void);
-void global_load_config_parameters(void);
-void global_unload_config_parameters(void);
+extern void global_init_code();
+extern void global_daemon_code();
+extern void global_pre_parser_code();
+extern void global_parser_code();
+extern void global_error_code();
+extern void global_room_init();
+extern void global_verb_filter();
+extern void global_sound_driver();
+extern void global_section_constructor();
+extern void global_write_config_file();
+extern void global_load_config_parameters();
+extern void global_unload_config_parameters();
extern void init_global();
diff --git a/engines/mads/madsv2/core/heap.h b/engines/mads/madsv2/core/heap.h
index ff44cbec971..d9cfa9c4654 100644
--- a/engines/mads/madsv2/core/heap.h
+++ b/engines/mads/madsv2/core/heap.h
@@ -27,20 +27,20 @@
namespace MADS {
namespace MADSV2 {
-typedef struct {
+struct Heap {
byte module; /* Identifier for heap module */
byte destruct; /* Flag if can be destroyed */
char *base; /* Base memory pointer for heap */
char *marker; /* Pointer to free area */
long base_size; /* Original size of the heap */
long size; /* Free space remaining */
-} Heap;
+};
-int heap_create(Heap *heap, int module_id, long heap_size, const char *heap_name);
-void heap_destroy(Heap *heap);
-void heap_declare(Heap *heap, int module_id, char *buffer, long heap_size);
+extern int heap_create(Heap *heap, int module_id, long heap_size, const char *heap_name);
+extern void heap_destroy(Heap *heap);
+extern void heap_declare(Heap *heap, int module_id, char *buffer, long heap_size);
-void *heap_get(Heap *heap, long size);
+extern void *heap_get(Heap *heap, long size);
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/himem.cpp b/engines/mads/madsv2/core/himem.cpp
index 697c3f1d8c0..196fcaef359 100644
--- a/engines/mads/madsv2/core/himem.cpp
+++ b/engines/mads/madsv2/core/himem.cpp
@@ -52,7 +52,7 @@ int himem_ems_preloaded = 0;
int himem_xms_preloaded = 0;
-int himem_activate_directory(void) {
+int himem_activate_directory() {
int error_flag = false;
if (himem_directory_allocation == MEM_EMS) {
@@ -155,7 +155,7 @@ done:
return id;
}
-int himem_directory_setup(void) {
+int himem_directory_setup() {
int error_flag = true;
int count;
long dir_size = 0;
@@ -207,7 +207,7 @@ done:
}
-void himem_shutdown(void) {
+void himem_shutdown() {
int count;
if (!himem_activate_directory()) {
@@ -229,7 +229,7 @@ void himem_shutdown(void) {
ems_shutdown();
}
-void himem_startup(void) {
+void himem_startup() {
ems_detect();
ems_paging_setup();
diff --git a/engines/mads/madsv2/core/himem.h b/engines/mads/madsv2/core/himem.h
index c28d4648dc8..ad9bac1f82f 100644
--- a/engines/mads/madsv2/core/himem.h
+++ b/engines/mads/madsv2/core/himem.h
@@ -31,7 +31,7 @@ namespace MADSV2 {
#define HIMEM_MAX_RESIDENT 150
-typedef struct {
+struct HimemDirectory {
byte memory_type; /* Memory type */
byte ems_page_handle; /* EMS paging info */
byte level; /* Preload level */
@@ -40,7 +40,7 @@ typedef struct {
long size; /* Size in bytes */
int num_packets; /* Number of packets */
long packet_size[PACK_MAX_LIST_LENGTH]; /* Sizes of packets */
-} HimemDirectory;
+};
extern byte himem_preload_ems_disabled;
diff --git a/engines/mads/madsv2/core/hspot.h b/engines/mads/madsv2/core/hspot.h
index 1ccf188ed01..ed754ea261e 100644
--- a/engines/mads/madsv2/core/hspot.h
+++ b/engines/mads/madsv2/core/hspot.h
@@ -34,14 +34,14 @@ namespace MADSV2 {
#define HS_DEATH -1 /* Used for marking spots to be killed */
#define HS_STACK_SIZE 5 /* Size of stack */
-typedef struct {
+struct Spot {
int ul_x, ul_y; /* Upper Left */
int lr_x, lr_y; /* Lower Right */
int _class; /* Clasification */
int num; /* Spot number */
int video_mode; /* Spot video mode */
int active; /* TRUE if active */
-} Spot;
+};
#define HS_SIZE 16 /* Size of above structure */
diff --git a/engines/mads/madsv2/core/implode.cpp b/engines/mads/madsv2/core/implode.cpp
index 10fca7dac7e..e1077a6b041 100644
--- a/engines/mads/madsv2/core/implode.cpp
+++ b/engines/mads/madsv2/core/implode.cpp
@@ -81,7 +81,7 @@ typedef unsigned short word;
* as the data, keeping si pointing into [1..EXP_RBLEN] (mirrors assembly SI
* pointing into RBuff[0..RBlen-1], with the guard word sitting just below).
*/
-typedef struct {
+struct ExpState {
word(*read_buff) (char *buf, word *size);
word(*write_buff)(char *buf, word *size);
@@ -103,7 +103,7 @@ typedef struct {
*/
byte flat[EXP_LEMPEL + EXP_WBLEN];
int di; /* write index into flat[], starts at EXP_LEMPEL */
-} ExpState;
+};
/**
* Fill the read buffer.
@@ -410,7 +410,7 @@ word explode(
/* Packet buffer: Huffman word (2 bytes) + up to 128 data bytes */
#define IMP_PKTMAX (2 + 128)
-typedef struct {
+struct ImpState {
word(*read_buff) (char *buf, word *size);
word(*write_buff)(char *buf, word *size);
@@ -453,7 +453,7 @@ typedef struct {
*/
word hash[IMP_LEMPEL + 1 + IMP_HASH];
word undo[IMP_LEMPEL + 1];
-} ImpState;
+};
/* ---- I/O helpers ---- */
diff --git a/engines/mads/madsv2/core/inter.cpp b/engines/mads/madsv2/core/inter.cpp
index 3534c2ca379..1e97e06e534 100644
--- a/engines/mads/madsv2/core/inter.cpp
+++ b/engines/mads/madsv2/core/inter.cpp
@@ -516,7 +516,7 @@ done:
;
}
-static void inter_show_scrollbar(void) {
+static void inter_show_scrollbar() {
if (scrollbar_active > 0) {
inter_show_word(STROKE_SCROLL, scrollbar_active);
}
@@ -527,7 +527,7 @@ static void inter_show_scrollbar(void) {
/**
* Writes the current inventory list to the interface work buffer.
*/
-static void inter_show_all_inven(void) {
+static void inter_show_all_inven() {
int count;
for (count = first_inven; (count < (first_inven + inter_columns)) && (count < inven_num_objects); count++) {
@@ -540,7 +540,7 @@ static void inter_show_all_inven(void) {
* Writes the current list of object-specific verbs to the interface
* work buffer.
*/
-static void inter_show_all_actions(void) {
+static void inter_show_all_actions() {
int count;
if (active_inven >= 0) {
@@ -565,7 +565,7 @@ static void inter_show_all_actions(void) {
}
}
-static void inter_show_all_dialog(void) {
+static void inter_show_all_dialog() {
int count;
for (count = 0; count < inter_columns; count++) {
@@ -575,7 +575,7 @@ static void inter_show_all_dialog(void) {
}
}
-void inter_prepare_background(void) {
+void inter_prepare_background() {
int count;
inter_auxiliary_click = false;
@@ -597,7 +597,7 @@ void inter_prepare_background(void) {
}
}
-static void inter_refresh(void) {
+static void inter_refresh() {
// int count;
// for (count = 0; count < (int)image_inter_marker; count++) {
// if (image_inter_list[count].segment_id == INTER_SPINNING_OBJECT) {
@@ -612,7 +612,7 @@ static void inter_refresh(void) {
inter_prepare_background();
}
-void inter_reset_dialog(void) {
+void inter_reset_dialog() {
int count;
for (count = 0; count < inter_columns; count++) {
@@ -704,7 +704,7 @@ static void inter_image(int x1, int y1, int xs, int ys) {
#endif
}
-static void inter_scrollbar_refresh(void) {
+static void inter_scrollbar_refresh() {
int x1, y1, xs, ys;
x1 = inter_scroll_x1;
@@ -838,7 +838,7 @@ void inter_set_active_inven(int new_active) {
}
}
-static void inter_purge_inven_stroke(void) {
+static void inter_purge_inven_stroke() {
left_inven = -1;
mouse_init_cycle();
stroke_type = STROKE_NONE;
@@ -961,7 +961,7 @@ static void inter_spot_correct(int *x1, int *y1, int *x2, int *y2, int xs, int y
*y2 = *y1 + ys - 1;
}
-void inter_setup_hotspots(void) {
+void inter_setup_hotspots() {
int count;
int x1, y1, xs, ys;
int x2, y2;
@@ -1033,7 +1033,7 @@ void inter_setup_hotspots(void) {
/**
* Handles up/down "dragging" for inventory list.
*/
-static void inter_drag_check(void) {
+static void inter_drag_check() {
long timing_level;
long current_time;
@@ -1066,7 +1066,7 @@ static void inter_drag_check(void) {
* Determines which word is being picked off the screen, and makes
* it active.
*/
-static void inter_select_word(void) {
+static void inter_select_word() {
int x1, y1, x2, y2;
int junk;
int max_x, max_y;
@@ -1251,7 +1251,7 @@ static void inter_select_word(void) {
}
}
-static void inter_scroll_bar(void) {
+static void inter_scroll_bar() {
int junk;
int y, new_first_inven;
long now_time;
@@ -1333,7 +1333,7 @@ done:
;
}
-void inter_init_sentence(void) {
+void inter_init_sentence() {
inter_awaiting = AWAITING_COMMAND;
inter_command_source = STROKE_NONE;
@@ -1382,7 +1382,7 @@ static void inter_add_word_to_sentence(int vocab_id, int capitalize) {
* Puts together a string for the current sentence, based on the
* information currently available.
*/
-static void inter_compile_sentence(void) {
+static void inter_compile_sentence() {
int prep_special;
int verb;
int len;
@@ -1535,7 +1535,7 @@ done:
* Analyzes the potential effect of the current stroke on the sentence --
* w/ the proviso that the stroke is not yet finished.
*/
-static void inter_analyze_stroke(void) {
+static void inter_analyze_stroke() {
if ((stroke_type == STROKE_COMMAND) || (stroke_type == STROKE_ACTION)) {
if ((inter_awaiting != AWAITING_COMMAND) && (picked_word >= 0)) {
if (!((stroke_type == inter_recent_command_source) && (picked_word == inter_recent_command) && ((inter_awaiting == AWAITING_THIS) || (stroke_type == STROKE_ACTION)))) {
@@ -1671,7 +1671,7 @@ done:
* Determines the final effect of a stroke on the sentence, after
* that stroke has been completed.
*/
-static void inter_complete_stroke(void) {
+static void inter_complete_stroke() {
int demand_abort;
demand_abort = false;
@@ -1817,7 +1817,7 @@ done:
* advancing segment counters and changing matteing lists when
* appropriate.
*/
-static void inter_background_animation(void) {
+static void inter_background_animation() {
int count, count2;
int temp;
int prob_check;
@@ -1890,7 +1890,7 @@ done:
;
}
-void inter_spinning_object(void) {
+void inter_spinning_object() {
int count;
if ((inter_input_mode == INTER_CONVERSATION) ||
@@ -1926,7 +1926,7 @@ done:
;
}
-void inter_turn_off_object(void) {
+void inter_turn_off_object() {
if (inter_object_series >= 0) {
if (g_engine->getGameID() == GType_Forest)
Forest::delete_sprite_in_interface(inter_object_series);
@@ -1954,7 +1954,7 @@ void inter_turn_off_object(void) {
if (inter_input_mode == INTER_BUILDING_SENTENCES) inter_refresh();
}
-int inter_allocate_objects(void) {
+int inter_allocate_objects() {
int error_flag = true;
if (!inter_spinning_objects) goto done;
@@ -1974,14 +1974,14 @@ done:
return error_flag;
}
-void inter_deallocate_objects(void) {
+void inter_deallocate_objects() {
if (inter_objects_block != NULL) {
mem_free(inter_objects_block);
inter_objects_block = NULL;
}
}
-void inter_screen_update(void) {
+void inter_screen_update() {
if (kernel_mode == KERNEL_ACTIVE_CODE) {
if (inter_input_mode == INTER_BUILDING_SENTENCES) {
matte_inter_frame(!kernel.fx, kernel.fx);
diff --git a/engines/mads/madsv2/core/inter.h b/engines/mads/madsv2/core/inter.h
index 4425a4b93dc..2db03c3d1bd 100644
--- a/engines/mads/madsv2/core/inter.h
+++ b/engines/mads/madsv2/core/inter.h
@@ -164,7 +164,7 @@ struct VerbBuf {
void synchronize(Common::Serializer &s);
};
-typedef struct VerbBuf Verb;
+typedef VerbBuf Verb;
extern AnimInterPtr inter_anim; /* Background animation script */
@@ -276,13 +276,13 @@ extern void (*inter_object_routine)();
* inter_prepare_background()
* Writes all relevant words to the interface work buffer.
*/
-extern void inter_prepare_background(void);
+extern void inter_prepare_background();
/*
* inter_setup_hotspots()
* Sets up the hotspot list for the interface module. Hotspots only
* need to be set up once for each room.
*/
-extern void inter_setup_hotspots(void);
+extern void inter_setup_hotspots();
/*
* inter_set_active_inven()
* Picks a new active object from the inventory list. This involves
@@ -311,7 +311,7 @@ extern void inter_move_object(int object_id, int location);
* inter_init_sentence()
* Begins accepting a new sentence.
*/
-extern void inter_init_sentence(void);
+extern void inter_init_sentence();
/*
* inter_main_loop()
* The main interface loop. Called by run-time kernel to perform one
@@ -322,14 +322,14 @@ extern void inter_init_sentence(void);
*/
extern void inter_main_loop(int allow_input);
-extern void inter_screen_update(void);
+extern void inter_screen_update();
-extern void inter_turn_off_object(void);
+extern void inter_turn_off_object();
extern void inter_spin_object(int object_id);
-extern int inter_allocate_objects(void);
-extern void inter_deallocate_objects(void);
+extern int inter_allocate_objects();
+extern void inter_deallocate_objects();
-extern void inter_reset_dialog(void);
+extern void inter_reset_dialog();
extern int inter_add_dialog(char *string, int result);
extern int inter_load_background(const char *name, Buffer *target);
diff --git a/engines/mads/madsv2/core/kernel.cpp b/engines/mads/madsv2/core/kernel.cpp
index d23424393bf..3180cc491a6 100644
--- a/engines/mads/madsv2/core/kernel.cpp
+++ b/engines/mads/madsv2/core/kernel.cpp
@@ -43,7 +43,6 @@
#include "mads/madsv2/core/keys.h"
#include "mads/madsv2/core/pack.h"
#include "mads/madsv2/core/room.h"
-#include "mads/madsv2/core/demo.h"
#include "mads/madsv2/core/xms.h"
#include "mads/madsv2/core/lock.h"
#include "mads/madsv2/core/tile.h"
diff --git a/engines/mads/madsv2/core/kernel.h b/engines/mads/madsv2/core/kernel.h
index 7b2b369bda3..8bc8ddf6a7f 100644
--- a/engines/mads/madsv2/core/kernel.h
+++ b/engines/mads/madsv2/core/kernel.h
@@ -142,10 +142,10 @@ namespace MADSV2 {
#define KERNEL_STARTUP_CURSOR 0x0200
#define KERNEL_STARTUP_CURSOR_SHOW 0x0100
#define KERNEL_STARTUP_VOCAB 0x0080
-//#define KERNEL_STARTUP_INTERFACE 0x0040
+#define KERNEL_STARTUP_INTERFACE 0x0040
#define KERNEL_STARTUP_ALL_FLAGS 0xffc0
-typedef struct {
+struct Sequence {
byte active_flag; /* Sequence is active */
byte series_id; /* Series list handle */
@@ -188,12 +188,12 @@ typedef struct {
long base_time; /* Clock time of next scheduled update */
Image last_image; /* Copy of last image entered */
-} Sequence;
+};
typedef Sequence *SequencePtr;
-typedef struct {
+struct KernelMessage {
word flags; /* Message flags */
byte sequence_id; /* Attached sequence number */
byte segment_id; /* Animation segment id */
@@ -211,12 +211,12 @@ typedef struct {
byte trigger_dest; /* Type of code to activate for trigger */
int trigger_words[3]; /* Vocabulary words for reactivating parser code */
char *message; /* Pointer to message text */
-} KernelMessage;
+};
typedef KernelMessage *KernelMessagePtr;
-typedef struct {
+struct KernelDynamicHotSpot {
byte flags;
int auto_sequence;
int x, y, xs, ys;
@@ -230,13 +230,13 @@ typedef struct {
byte syntax;
int8 auto_anim;
byte auto_segment[KERNEL_DYNAMIC_MAX_SEGMENTS];
-} KernelDynamicHotSpot;
+};
typedef KernelDynamicHotSpot *KernelDynamicHotSpotPtr;
-typedef struct {
+struct Animation {
AnimPtr anim; /* Animation pointer */
int repeat; /* Animation should repeat continuously */
int cycled; /* Animation has cycled back to start */
@@ -259,10 +259,10 @@ typedef struct {
int dynamic_hotspot; /* Attached dynamic hotspot */
int last_frame; /* Most recent frame viewed */
-} Animation;
+};
-typedef struct {
+struct Kernel {
long clock; /* Current game timing clock */
byte fx; /* Special FX for this frame */
@@ -302,8 +302,7 @@ typedef struct {
byte player_tracking; /* Flag if tracking player location */
byte disable_fastwalk; /* Flag if fastwalk disabled */
-
-} Kernel;
+};
struct KernelGame {
diff --git a/engines/mads/madsv2/core/keys.cpp b/engines/mads/madsv2/core/keys.cpp
index d57e319d163..651994536cf 100644
--- a/engines/mads/madsv2/core/keys.cpp
+++ b/engines/mads/madsv2/core/keys.cpp
@@ -57,7 +57,7 @@ int keys_get() {
return g_engine->getKey();
}
-void keys_flush(void) {
+void keys_flush() {
g_engine->flushKeys();
}
diff --git a/engines/mads/madsv2/core/keys.h b/engines/mads/madsv2/core/keys.h
index 0bc5d98f35d..2ed8faeab38 100644
--- a/engines/mads/madsv2/core/keys.h
+++ b/engines/mads/madsv2/core/keys.h
@@ -29,19 +29,6 @@ namespace MADS {
namespace MADSV2 {
/* keystroke defines */
-#if 0
-#define key_status_1 (byte *) 0x00400017 /* key status 1 */
-#define key_status_2 (byte *) 0x00400018 /* key status 2 */
-
-#define KS1_INSERT 0x80 /* Insert state */
-#define KS1_CAPSLOCK 0x40 /* Caps Lock state */
-#define KS1_NUMLOCK 0x20 /* Num Lock state */
-#define KS1_SCROLLLOCK 0x10 /* Scroll Lock state */
-#define KS1_ALT 0x08 /* Alt key state */
-#define KS1_CTRL 0x04 /* Ctrl key state */
-#define KS1_LEFTSHIFT 0x02 /* Left shift state */
-#define KS1_RIGHTSHIFT 0x01 /* Right shift state */
-#endif
#define left_key Common::KEYCODE_LEFT
#define right_key Common::KEYCODE_RIGHT
@@ -207,7 +194,7 @@ struct KeyBuffer {
int len;
};
-typedef struct KeyBuffer *KeyPtr;
+typedef KeyBuffer *KeyPtr;
extern word keys_special_button;
diff --git a/engines/mads/madsv2/core/lbm.h b/engines/mads/madsv2/core/lbm.h
index 62a462aeddb..44dd6ea63fd 100644
--- a/engines/mads/madsv2/core/lbm.h
+++ b/engines/mads/madsv2/core/lbm.h
@@ -28,11 +28,11 @@
namespace MADS {
namespace MADSV2 {
-void lbm_read_page(const char *filename, byte *image, Palette *pal);
+extern void lbm_read_page(const char *filename, byte *image, Palette *pal);
-Buffer lbm_read_buffer(const char *filename, Palette *pal, CycleListPtr cycle);
+extern Buffer lbm_read_buffer(const char *filename, Palette *pal, CycleListPtr cycle);
-int lbm_read_buffer_main(const char *name, Buffer *target, int reserved_flag,
+extern int lbm_read_buffer_main(const char *name, Buffer *target, int reserved_flag,
CycleListPtr cycle_list);
} // namespace MADSV2
diff --git a/engines/mads/madsv2/core/lib.h b/engines/mads/madsv2/core/lib.h
index 2cb025ec536..fdbc2173e4c 100644
--- a/engines/mads/madsv2/core/lib.h
+++ b/engines/mads/madsv2/core/lib.h
@@ -30,12 +30,10 @@ namespace MADSV2 {
#define lib_version "4.35"
#define lib_date "10-Aug-93"
-#ifndef lib_data_segment
extern char mads_dev_lib_version[5];
extern char mads_dev_lib_date[11];
-#endif
-void lib_show_version(void);
+void lib_show_version();
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/loader.h b/engines/mads/madsv2/core/loader.h
index af1400bf52e..4fbbb8777fd 100644
--- a/engines/mads/madsv2/core/loader.h
+++ b/engines/mads/madsv2/core/loader.h
@@ -34,7 +34,7 @@ namespace MADSV2 {
#define LOADER_XMS 2 /* File being read from xms */
-typedef struct {
+struct Load {
int open; /* Open status (true = open) */
int reading; /* Read/Write status (true = reading) */
byte mode; /* Access mode (LOADER_EMS/LOADER_DISK) */
@@ -47,7 +47,7 @@ typedef struct {
long decompress_size; /* Decompressed size of file */
int pack_list_marker; /* Packing list marker */
PackList pack; /* Packing list */
-} Load;
+};
typedef Load *LoadHandle;
diff --git a/engines/mads/madsv2/core/lock.h b/engines/mads/madsv2/core/lock.h
index 33389c65a70..389babf9e1b 100644
--- a/engines/mads/madsv2/core/lock.h
+++ b/engines/mads/madsv2/core/lock.h
@@ -32,24 +32,24 @@ extern char *lock_search_mark;
extern int lock_search_length;
extern word *lock_hash_value;
-word lock_get_disk_hash(void);
+extern word lock_get_disk_hash();
-long lock_search_hash_offset(void);
+extern long lock_search_hash_offset();
-void lock_write_new_hash(void);
+extern void lock_write_new_hash();
-int lock_get_copy_code(void);
+extern int lock_get_copy_code();
-void lock_short_protection_check(void);
+extern void lock_short_protection_check();
-int lock_verification(void);
-void lock_sabotage(void);
+extern int lock_verification();
+extern void lock_sabotage();
-void lock_long_protection_check(void);
+extern void lock_long_protection_check();
-void lock_secret_protection_check(void);
+extern void lock_secret_protection_check();
-void lock_preliminary_check(void);
+extern void lock_preliminary_check();
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/magic.h b/engines/mads/madsv2/core/magic.h
index 26ad9ac4140..23ded442b21 100644
--- a/engines/mads/madsv2/core/magic.h
+++ b/engines/mads/madsv2/core/magic.h
@@ -42,11 +42,11 @@ namespace MADSV2 {
#define MAGIC_SWAP_BACKGROUND 0
#define MAGIC_SWAP_FOREGROUND 1
-typedef struct {
+struct MagicGrey {
byte intensity;
byte map_color;
word accum[3];
-} MagicGrey;
+};
typedef MagicGrey *MagicGreyPtr;
@@ -61,8 +61,8 @@ extern int magic_special_center_y;
extern void magic_get_grey_values(Palette *pal, byte *grey_value,
int base_color, int num_colors);
extern void magic_grey_palette(Palette *pal);
-/*
- * magic_grey_popularity()
+
+/**
* Given a "grey_list" containing "num_colors" grey values (0-63),
* produces a 64-byte "grey_table" containing the number of grey
* values of each intensity level.
@@ -82,8 +82,8 @@ extern void magic_fade_to_grey(Palette pal, byte *map_pointer,
int tick_delay, int steps);
extern void magic_fade_from_grey(RGBcolor *pal, Palette target, int base_color,
int num_colors, int base_grey, int num_greys, int tick_delay, int steps);
-/*
- * magic_screen_change_corner()
+
+/**
* Picture-to-picture transition in which one of the screen
* corners is pulled diagonally across the screen to bring in
* the new view.
@@ -102,8 +102,8 @@ extern void magic_fade_from_grey(RGBcolor *pal, Palette target, int base_color,
extern void magic_screen_change_corner(Buffer *new_screen, Palette pal, int corner_id,
int buffer_base_x, int buffer_base_y, int screen_base_x, int screen_base_y,
int thru_black, int set_palette, int tick_delay);
+
/*
- * magic_screen_change_edge()
* Picture-to-picture transition in which the new picture sweeps
* in from either the right or left edge.
*
@@ -121,8 +121,8 @@ extern void magic_screen_change_corner(Buffer *new_screen, Palette pal, int corn
extern void magic_screen_change_edge(Buffer *new_screen, Palette pal, int edge_id,
int buffer_base_x, int buffer_base_y, int screen_base_x, int screen_base_y,
int thru_black, int set_palette, int tick_delay);
-/*
- * magic_screen_change_circle()
+
+/**
* Picture-to-picture transition in which the new picture is
* brought in with either expanding or contracting concentric
* circles.
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index fc302390d8c..5c943cd9f95 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -1064,7 +1064,7 @@ void matte_frame(int special_effect, int full_screen) {
}
-int matte_allocate_inter_image(void) {
+int matte_allocate_inter_image() {
int result;
if (image_inter_marker >= IMAGE_INTER_LIST_SIZE) {
@@ -1080,7 +1080,7 @@ int matte_allocate_inter_image(void) {
}
-void matte_refresh_inter(void) {
+void matte_refresh_inter() {
int id;
id = matte_allocate_inter_image();
diff --git a/engines/mads/madsv2/core/matte.h b/engines/mads/madsv2/core/matte.h
index 4d66ae17fd2..7db3f9bafd8 100644
--- a/engines/mads/madsv2/core/matte.h
+++ b/engines/mads/madsv2/core/matte.h
@@ -122,34 +122,27 @@ extern int work_screen_ems_handle; /* Work screen in EMS */
extern TileMapHeader picture_map, depth_map; /* Tile maps */
extern TileResource picture_resource, depth_resource; /* Tile resources */
+extern void matte_init(int init_series);
+extern int matte_map_work_screen();
+extern void matte_frame(int special_effect, int full_screen);
-void matte_init(int init_series);
-int matte_map_work_screen(void);
+extern int matte_load_series(const char *name, int load_flags, int bonus_series_number);
+extern void matte_deallocate_series(int id, int free_memory);
+extern int matte_allocate_series(SeriesPtr series, int bonus_series_number);
+extern int matte_add_message(FontPtr font, char *text, int x, int y,
+ int message_color, int auto_spacing);
+extern void matte_clear_message(int handle);
-void matte_frame(int special_effect, int full_screen);
+extern int matte_allocate_image();
-//void matte_init_series(void);
-int matte_load_series(const char *name, int load_flags, int bonus_series_number);
-void matte_deallocate_series(int id, int free_memory);
-int matte_allocate_series(SeriesPtr series,
- int bonus_series_number);
+extern void matte_refresh_work();
-//void matte_init_messages(void);
-int matte_add_message(FontPtr font, char *text,
- int x, int y, int message_color,
- int auto_spacing);
-void matte_clear_message(int handle);
-
-int matte_allocate_image(void);
-
-void matte_refresh_work(void);
-
-void matte_inter_frame(int update_live, int clear_chaff);
-int matte_allocate_inter_image(void);
-void matte_refresh_inter(void);
+extern void matte_inter_frame(int update_live, int clear_chaff);
+extern int matte_allocate_inter_image();
+extern void matte_refresh_inter();
extern void init_matte();
diff --git a/engines/mads/madsv2/core/mcga.cpp b/engines/mads/madsv2/core/mcga.cpp
index 4c7f759af32..ff8dda2ea97 100644
--- a/engines/mads/madsv2/core/mcga.cpp
+++ b/engines/mads/madsv2/core/mcga.cpp
@@ -137,7 +137,7 @@ void mcga_retrace() {
g_engine->getScreen()->update();
}
-void mcga_compute_retrace_parameters(void) {
+void mcga_compute_retrace_parameters() {
mcga_setpal(&master_palette);
// On original hardware this function also measured how many palette
diff --git a/engines/mads/madsv2/core/mem.cpp b/engines/mads/madsv2/core/mem.cpp
index 73374e60477..bedc8c03cac 100644
--- a/engines/mads/madsv2/core/mem.cpp
+++ b/engines/mads/madsv2/core/mem.cpp
@@ -83,11 +83,11 @@ int mem_adjust_impl(void *&target, long size) {
return 0;
}
-void mem_save_free(void) {
+void mem_save_free() {
// No implementation
}
-void mem_restore_free(void) {
+void mem_restore_free() {
// No implementation
}
@@ -95,7 +95,7 @@ long mem_conv_get_avail() {
return 999999;
}
-long mem_get_avail(void) {
+long mem_get_avail() {
return 999999;
}
diff --git a/engines/mads/madsv2/core/object.cpp b/engines/mads/madsv2/core/object.cpp
index ce80251154e..8fa83d16d1e 100644
--- a/engines/mads/madsv2/core/object.cpp
+++ b/engines/mads/madsv2/core/object.cpp
@@ -77,14 +77,14 @@ void ObjectBuf::synchronize(Common::Serializer &s) {
}
-void object_unload(void) {
+void object_unload() {
if (object != NULL) {
mem_free(object);
object = NULL;
}
}
-int object_load(void) {
+int object_load() {
int count;
int error_flag = true;
long mem_to_get;
diff --git a/engines/mads/madsv2/core/object.h b/engines/mads/madsv2/core/object.h
index e118c88954f..b2ff2393e15 100644
--- a/engines/mads/madsv2/core/object.h
+++ b/engines/mads/madsv2/core/object.h
@@ -32,9 +32,6 @@
namespace MADS {
namespace MADSV2 {
-
-#define OBJECT_FILE_VERSION "4.0" /* Object DEF file format version */
-
#define OBJECT_MAX_VERBS 5
#define OBJECT_MAX_QUALITIES 4
@@ -47,11 +44,11 @@ namespace MADSV2 {
#define OBJECT_GREY_STEPS 16
-typedef struct {
+struct HagVerb {
char name[VC_MAXWORDLEN + 1];
byte verb_type;
byte prep_type;
-} HagVerb;
+};
/* Format for storing objects on disk */
@@ -72,7 +69,7 @@ struct FileObjectBuf {
/* char short_name[OBJECT_SHORT_NAME_LEN + 1]; */
};
-typedef struct FileObjectBuf FileObject;
+typedef FileObjectBuf FileObject;
typedef FileObject *FileObjectPtr;
struct ObjectBuf {
@@ -90,7 +87,7 @@ struct ObjectBuf {
void synchronize(Common::Serializer &s);
};
-typedef struct ObjectBuf Object;
+typedef ObjectBuf Object;
typedef Object *ObjectPtr;
@@ -100,8 +97,8 @@ extern int num_objects;
extern int object_ems_handle;
-extern int object_load(void);
-extern void object_unload(void);
+extern int object_load();
+extern void object_unload();
extern int object_named(int vocab_id);
extern int object_is_here(int object_id);
diff --git a/engines/mads/madsv2/core/pack.cpp b/engines/mads/madsv2/core/pack.cpp
index c855aaf5860..4a7614e8f72 100644
--- a/engines/mads/madsv2/core/pack.cpp
+++ b/engines/mads/madsv2/core/pack.cpp
@@ -232,7 +232,7 @@ done:
}
-word pack_raw_copy(void) {
+word pack_raw_copy() {
word result = CMP_NO_ERROR;
word read_this_time;
word read_back;
@@ -300,7 +300,7 @@ word pack_a_packet(int packing_flag, int explode_mode) {
return (result);
}
-static void pack_activate(void) {
+static void pack_activate() {
if (pack_special_function)
pack_special_function();
}
@@ -453,7 +453,7 @@ done:
}
-int pack_check(void) {
+int pack_check() {
dialog_declare_ok(dialog);
ItemPtr none_item, zip_item = nullptr, pfab_item = nullptr, default_item;
int result;
@@ -509,14 +509,14 @@ done:
return (result);
}
-void pack_enable_zip(void) {
+void pack_enable_zip() {
pack_strategy = PACK_ZIP;
pack_zip_enabled = true;
pack_implode_routine = implode;
pack_explode_routine = explode;
}
-void pack_enable_pfab(void) {
+void pack_enable_pfab() {
pack_strategy = PACK_PFAB;
pack_pfab_enabled = true;
pack_pFABcomp_routine = pFABcomp;
@@ -525,7 +525,7 @@ void pack_enable_pfab(void) {
pack_pFABexp2_routine = pFABexp2;
}
-void pack_enable_pfab_explode(void) {
+void pack_enable_pfab_explode() {
pack_strategy = PACK_PFAB;
pack_pfab_enabled = true;
pack_pFABcomp_routine = NULL;
@@ -534,7 +534,7 @@ void pack_enable_pfab_explode(void) {
pack_pFABexp2_routine = pFABexp2;
}
-void pack_enable_zip_explode(void) {
+void pack_enable_zip_explode() {
pack_strategy = PACK_ZIP;
pack_zip_enabled = true;
pack_implode_routine = NULL;
diff --git a/engines/mads/madsv2/core/pack.h b/engines/mads/madsv2/core/pack.h
index 995261970d0..7b746e2685c 100644
--- a/engines/mads/madsv2/core/pack.h
+++ b/engines/mads/madsv2/core/pack.h
@@ -243,11 +243,11 @@ extern void pack_set_special_buffer(byte *buffer_address,
*
* @return
*/
-extern int pack_check(void);
-extern void pack_enable_zip(void);
-extern void pack_enable_pfab(void);
-extern void pack_enable_pfab_explode(void);
-extern void pack_enable_zip_explode(void);
+extern int pack_check();
+extern void pack_enable_zip();
+extern void pack_enable_pfab();
+extern void pack_enable_pfab_explode();
+extern void pack_enable_zip_explode();
extern long pack_rle(byte *target, byte *source, word source_size);
extern word pack_write_ems(char *buffer, word *mysize);
diff --git a/engines/mads/madsv2/core/pal.h b/engines/mads/madsv2/core/pal.h
index 4d15543ae87..22d3538e0bb 100644
--- a/engines/mads/madsv2/core/pal.h
+++ b/engines/mads/madsv2/core/pal.h
@@ -92,8 +92,8 @@ extern int pal_manager_colors;
*/
extern void pal_init(int reserve_bottom, int reserve_top);
-extern void pal_lock(void);
-extern void pal_unlock(void);
+extern void pal_lock();
+extern void pal_unlock();
/**
* Given a color list, allocates all its colors in the global palette.
@@ -154,8 +154,8 @@ extern void pal_shadow_sort(ShadowListPtr shadow, ColorListPtr list);
*/
extern void pal_init_shadow(ShadowListPtr shadow, ColorListPtr new_list);
extern void pal_activate_shadow(ShadowListPtr shadow);
-extern int pal_get_flags(void);
-extern int pal_get_colors(void);
+extern int pal_get_flags();
+extern int pal_get_colors();
extern void pal_interface(Palette &fixpal);
extern void pal_white(Palette &fixpal);
extern void pal_grey(Palette &fixpal, int base_color, int num_colors,
diff --git a/engines/mads/madsv2/core/pfab.cpp b/engines/mads/madsv2/core/pfab.cpp
index 37702320210..fb6d8d11d02 100644
--- a/engines/mads/madsv2/core/pfab.cpp
+++ b/engines/mads/madsv2/core/pfab.cpp
@@ -138,7 +138,7 @@ struct CompWork {
/**
* Required size of work_buff. Paragraph-align to match original.
*/
-static unsigned comp_work_size(void) {
+static unsigned comp_work_size() {
return (unsigned)(sizeof(CompWork) + 15u);
}
diff --git a/engines/mads/madsv2/core/popup.cpp b/engines/mads/madsv2/core/popup.cpp
index 4102ab77831..fa7bea68d3f 100644
--- a/engines/mads/madsv2/core/popup.cpp
+++ b/engines/mads/madsv2/core/popup.cpp
@@ -189,7 +189,7 @@ void popup_add_icon(SeriesPtr series, int id, int center) {
-void popup_next_line(void) {
+void popup_next_line() {
int y_sum;
box->text_y++;
@@ -209,7 +209,7 @@ void popup_next_line(void) {
}
-void popup_set_ask(void) {
+void popup_set_ask() {
box->ask_x = box->text_x + 1;
box->ask_y = box->text_y;
popup_next_line();
@@ -332,7 +332,7 @@ void popup_write_string(const char *string) {
}
-void popup_bar(void) {
+void popup_bar() {
if ((box->cursor_x > 0) || (box->text_x > 0)) {
popup_next_line();
}
@@ -341,12 +341,12 @@ void popup_bar(void) {
}
-void popup_underline(void) {
+void popup_underline() {
box->tab[box->text_y] |= POPUP_UNDERLINE;
}
-void popup_downpixel(void) {
+void popup_downpixel() {
box->tab[box->text_y] |= POPUP_DOWNPIXEL;
}
@@ -764,7 +764,7 @@ done:
}
-void popup_destroy(void) {
+void popup_destroy() {
int x, y;
int xs, ys;
@@ -1187,7 +1187,7 @@ done:
return mykey;
}
-int popup_box_load(void) {
+int popup_box_load() {
int error_flag = true;
int count;
int top_base, bottom_base, left_base, right_base;
@@ -1443,7 +1443,7 @@ done:
}
-Popup *popup_dialog_destroy(void) {
+Popup *popup_dialog_destroy() {
popup->status &= ~(POPUP_STATUS_VALID);
if (popup->status & POPUP_STATUS_DYNAMIC) {
@@ -1512,7 +1512,7 @@ static PopupItem *item_allocate(int can_be_default) {
-static PopupList *list_allocate(void) {
+static PopupList *list_allocate() {
PopupList *list;
list = (PopupList *)popup_heap(sizeof(PopupList));
@@ -1597,7 +1597,7 @@ static void popup_coord_adjust(PopupItem *item) {
}
-static int popup_mouse_refresh(void) {
+static int popup_mouse_refresh() {
mouse_freeze();
mouse_set_work_buffer(scr_main.data, video_x);
mouse_set_view_port_loc(0, 0, video_x - 1, video_y - 1);
@@ -1612,7 +1612,7 @@ static void popup_mouse_refresh_2(int refresh) {
}
-static void popup_to_screen(void) {
+static void popup_to_screen() {
int refresh;
refresh = popup_mouse_refresh();
@@ -1634,7 +1634,7 @@ static void popup_item_to_screen(PopupItem *item) {
}
-static void popup_screen_clear(void) {
+static void popup_screen_clear() {
buffer_rect_fill_pattern(scr_main,
box->window_x, box->window_y, box->window_xs, box->window_ys,
box->window_x, box->window_y, box->window_xs,
@@ -1677,7 +1677,7 @@ static void popup_update_item(PopupItem *item) {
}
-static void popup_full_draw(void) {
+static void popup_full_draw() {
int count;
int bar_y;
int bar_x;
@@ -1826,7 +1826,7 @@ static int popup_in_item(PopupItem *item) {
}
-static void popup_find_item(void) {
+static void popup_find_item() {
int count;
popup->mouse_item = NULL;
@@ -3200,7 +3200,7 @@ void popup_blank(int num_lines) {
}
-void popup_blank_line(void) {
+void popup_blank_line() {
popup_blank(box_param.font->max_y_size + popup->y_spacing);
}
@@ -3311,7 +3311,7 @@ PopupItem *popup_savelist(char *data, char *empty_string,
-PopupItem *popup_execute(void) {
+PopupItem *popup_execute() {
int base_x_size;
int horiz_pieces;
int request_pieces;
diff --git a/engines/mads/madsv2/core/popup.h b/engines/mads/madsv2/core/popup.h
index 2645265293c..13fd40fdec2 100644
--- a/engines/mads/madsv2/core/popup.h
+++ b/engines/mads/madsv2/core/popup.h
@@ -102,7 +102,7 @@ namespace MADSV2 {
-typedef struct {
+struct BoxParam {
SeriesPtr series; /* Sprite series for popup box */
char name[16]; /* Sprite series name */
@@ -142,11 +142,9 @@ typedef struct {
int menu_text_y_offset;
int menu_text_x_bonus; /* Bonus offsets when selected */
int menu_text_y_bonus;
+};
-} BoxParam;
-
-
-typedef struct {
+struct Box {
int active;
int base_x, base_y; /* Box base screen location */
@@ -196,8 +194,7 @@ typedef struct {
long request_y_size;
int icon_center;
-
-} Box;
+};
/* Item types defined so */
@@ -208,15 +205,9 @@ typedef struct {
#define ITEM_SPRITE 4 /* Static sprite */
#define ITEM_MENU 5 /* Menu item */
-/*
-#define ITEM_CHECKBOX 5
-#define ITEM_RADIO 6
-#define ITEM_STRING 7
-*/
-
-typedef struct {
- char *data; /* Heap pointer for buffer space */
+struct PopupBuffer {
+ char *data; /* Heap pointer for buffer space */
int max_length; /* Buffer max string width */
int width; /* Buffer width in pixels */
int base_x; /* Buffer base position */
@@ -224,7 +215,7 @@ typedef struct {
int cursor; /* Buffer cursor location */
int select_base;
int select_target;
-} PopupBuffer;
+};
#define SCROLL_AXIS_HORIZONTAL 0
@@ -233,7 +224,7 @@ typedef struct {
#define SCROLL_STATUS_UP 0x80
#define SCROLL_STATUS_DOWN 0x40
-typedef struct {
+struct PopupScrollBar {
int axis;
int status;
@@ -248,11 +239,9 @@ typedef struct {
int thumb_base;
int thumb_item;
int thumb_size;
+};
-} PopupScrollBar;
-
-
-typedef struct {
+struct PopupList {
int box_x, box_y; /* Size of box around list */
int box_xs, box_ys;
@@ -276,14 +265,12 @@ typedef struct {
PopupScrollBar scroll; /* ScrollBar info */
- /* ItemPtr attached_string; */
-
- char *data; /* List string data */
+ char *data; /* List string data */
long double_clock; /* Double click clock */
int double_element; /* Double click element */
-} PopupList;
+};
#define POPUP_DOUBLE_CLICK_THRESHOLD 20
@@ -354,7 +341,7 @@ struct PopupItem {
#define POPUP_STATUS_BUTTON 0x0001 /* Popup button row in use */
-typedef struct {
+struct Popup {
Heap heap; /* Popup heap space */
word status; /* Popup status flags */
@@ -392,7 +379,7 @@ typedef struct {
int16 num_items; /* Number of items in popup */
PopupItem *item; /* Item list */
-} Popup;
+};
extern Box text_box;
@@ -413,37 +400,36 @@ extern BoxParam box_param;
extern void init_popup();
-int popup_create(int horiz_pieces, int x, int y);
-void popup_add_icon(SeriesPtr series, int id, int center);
-int popup_draw(int save_screen, int depth_code);
-void popup_destroy(void);
-
-void popup_next_line(void);
-void popup_set_ask(void);
-void popup_add_string(const char *string);
-void popup_write_string(const char *string);
-void popup_bar(void);
-void popup_underline(void);
-void popup_downpixel(void);
-void popup_tab(int tab_level);
-void popup_center_string(const char *string, int underline);
+extern int popup_create(int horiz_pieces, int x, int y);
+extern void popup_add_icon(SeriesPtr series, int id, int center);
+extern int popup_draw(int save_screen, int depth_code);
+extern void popup_destroy();
-int popup_and_wait(int save_screen);
-int popup_and_dont_wait(int save_screen);
+extern void popup_next_line();
+extern void popup_set_ask();
+extern void popup_add_string(const char *string);
+extern void popup_write_string(const char *string);
+extern void popup_bar();
+extern void popup_underline();
+extern void popup_downpixel();
+extern void popup_tab(int tab_level);
+extern void popup_center_string(const char *string, int underline);
-void popup_update_ask(char *string, int maxlen);
-int popup_ask_string(char *target, int maxlen, int save_screen);
-int popup_ask_number(long *value, int maxlen, int save_screen);
+extern int popup_and_wait(int save_screen);
+extern int popup_and_dont_wait(int save_screen);
+extern void popup_update_ask(char *string, int maxlen);
+extern int popup_ask_string(char *target, int maxlen, int save_screen);
+extern int popup_ask_number(long *value, int maxlen, int save_screen);
-int popup_estimate_pieces(int maxlen);
-int popup_get_string(char *target, const char *top, const char *left, int maxlen);
-int popup_get_long(long *value, const char *top, const char *left, int maxlen);
-int popup_get_number(int16 *value, const char *top, const char *left, int maxlen);
+extern int popup_estimate_pieces(int maxlen);
+extern int popup_get_string(char *target, const char *top, const char *left, int maxlen);
+extern int popup_get_long(long *value, const char *top, const char *left, int maxlen);
+extern int popup_get_number(int16 *value, const char *top, const char *left, int maxlen);
-int popup_alert(int width, const char *message_line, ...);
+extern int popup_alert(int width, const char *message_line, ...);
-int popup_box_load(void);
+extern int popup_box_load();
/*
* popup_dialog_create()
@@ -462,30 +448,30 @@ Popup *popup_dialog_create(void *memory, long heap_size, int max_items);
*
* @return
*/
-Popup *popup_dialog_destroy(void);
+extern Popup *popup_dialog_destroy();
-PopupItem *popup_button(const char *prompt, int x);
-PopupItem *popup_cancel_button(const char *prompt);
-PopupItem *popup_message(const char *prompt, int x, int y);
-PopupItem *popup_execute(void);
+extern PopupItem *popup_button(const char *prompt, int x);
+extern PopupItem *popup_cancel_button(const char *prompt);
+extern PopupItem *popup_message(const char *prompt, int x, int y);
+extern PopupItem *popup_execute();
-PopupItem *popup_savelist(char *data, char *empty_string,
+extern PopupItem *popup_savelist(char *data, char *empty_string,
int elements, int element_offset, int element_max_length,
int pixel_width, int rows, int accept_input, int default_element);
-void popup_blank(int num_lines);
-void popup_blank_line(void);
-void popup_width_force(int width);
+extern void popup_blank(int num_lines);
+extern void popup_blank_line();
+extern void popup_width_force(int width);
-void popup_menu_option(PopupItem *item, char *option);
-PopupItem *popup_menu(const char *prompt,
+extern void popup_menu_option(PopupItem *item, char *option);
+extern PopupItem *popup_menu(const char *prompt,
int x, int y, int pixel_width,
int off_center_x,
int elements, int element_max_length,
int default_element);
-PopupItem *popup_sprite(SeriesPtr series, int sprite, int x, int y);
+extern PopupItem *popup_sprite(SeriesPtr series, int sprite, int x, int y);
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/qual.h b/engines/mads/madsv2/core/qual.h
index bf9b6ec85f5..f8c89412a40 100644
--- a/engines/mads/madsv2/core/qual.h
+++ b/engines/mads/madsv2/core/qual.h
@@ -27,15 +27,11 @@
namespace MADS {
namespace MADSV2 {
-#define qual_version "3.01"
-#define qual_date "28-Oct-91"
-
-
struct QualBuf {
word id;
word pointer;
};
-typedef struct QualBuf Qual;
+typedef QualBuf Qual;
#define QU_MAXWORDS 800 /* Maximum words in vocabulary */
@@ -64,7 +60,7 @@ extern int qual_allocation;
extern int qual_words;
extern char *qual;
-int qual_destroy(void);
+int qual_destroy();
int qual_load(int allocation_flag);
int qual_get_code(char *inp);
@@ -79,15 +75,15 @@ char *qual_select_word(char *out,
char *prompt,
char *default_word);
-void qual_maint(void);
+void qual_maint();
-int qual_build(void);
+int qual_build();
-void qual_unload_active(void);
-void qual_init_active(void);
+void qual_unload_active();
+void qual_init_active();
int qual_active_id(word id);
int qual_make_active(word id);
-int qual_load_active(void);
+int qual_load_active();
extern char *qual_text;
extern word qual_active;
diff --git a/engines/mads/madsv2/core/quote.h b/engines/mads/madsv2/core/quote.h
index a3a824a4216..fda524410e8 100644
--- a/engines/mads/madsv2/core/quote.h
+++ b/engines/mads/madsv2/core/quote.h
@@ -31,9 +31,9 @@ namespace MADSV2 {
extern int quote_emergency;
-char *quote_load(int quote_id, ...);
-char *quote_string(char *quote_list, int quote_id);
-void quote_split_string(const char *source, char *target1, char *target2);
+extern char *quote_load(int quote_id, ...);
+extern char *quote_string(char *quote_list, int quote_id);
+extern void quote_split_string(const char *source, char *target1, char *target2);
extern void init_quote();
diff --git a/engines/mads/madsv2/core/rail.cpp b/engines/mads/madsv2/core/rail.cpp
index a0f6f4d1517..40268d68709 100644
--- a/engines/mads/madsv2/core/rail.cpp
+++ b/engines/mads/madsv2/core/rail.cpp
@@ -142,7 +142,7 @@ void rail_add_node(int id, int x, int y) {
rail_connect_node(id);
}
-void rail_connect_all_nodes(void) {
+void rail_connect_all_nodes() {
int count;
for (count = 0; count < ROOM_MAX_RAILS + 2; count++) {
diff --git a/engines/mads/madsv2/core/rail.h b/engines/mads/madsv2/core/rail.h
index 81f47bb2b1d..d5281c19fb3 100644
--- a/engines/mads/madsv2/core/rail.h
+++ b/engines/mads/madsv2/core/rail.h
@@ -39,7 +39,7 @@ extern struct Rail *rail_base;
extern void rail_add_node(int id, int x, int y);
extern void rail_connect_node(int id);
-extern void rail_connect_all_nodes(void);
+extern void rail_connect_all_nodes();
extern void rail_disconnect_line(int from, int unto);
extern void rail_disconnect_node(int id);
diff --git a/engines/mads/madsv2/core/room.cpp b/engines/mads/madsv2/core/room.cpp
index 414af4d1845..d365a3dfe52 100644
--- a/engines/mads/madsv2/core/room.cpp
+++ b/engines/mads/madsv2/core/room.cpp
@@ -647,7 +647,7 @@ static void room_buffer_invert(Buffer *buffer, byte *work, int granularity) {
}
}
-int room_invert(void) {
+int room_invert() {
int error_flag = true;
int count;
int x1, x2;
diff --git a/engines/mads/madsv2/core/room.h b/engines/mads/madsv2/core/room.h
index a9eb033cc09..7d64450e5fc 100644
--- a/engines/mads/madsv2/core/room.h
+++ b/engines/mads/madsv2/core/room.h
@@ -76,7 +76,7 @@ namespace MADSV2 {
/* Develop-time structure for hotspots (.HOT files) */
-typedef struct HotEdit {
+struct HotSpotEdit {
int ul_x, ul_y, lr_x, lr_y; /* Hotspot screen coordinates */
int feet_x, feet_y; /* Walk-to target for player */
byte facing; /* Direction player should face */
@@ -85,7 +85,7 @@ typedef struct HotEdit {
byte syntax; /* Word syntax */
char vocab[VC_MAXWORDLEN + 1]; /* Vocabulary name of hotspot */
char verb[VC_MAXWORDLEN + 1]; /* Vocabulary default verb name */
-} HotSpotEdit;
+};
typedef HotSpotEdit *HotEditPtr;
@@ -126,18 +126,18 @@ typedef Rail *RailPtr;
/* Room artwork definition structure (.ART files) */
-typedef struct {
+struct RoomArt {
int xs; /* Size of picture (follows this... */
int ys; /* ...structure in the .ART file) */
ColorList color_list; /* List of colors used in picture */
CycleList cycle_list; /* List of color cycling ranges */
-} RoomArt;
+};
typedef RoomArt *RoomArtPtr;
/* Room picture definition structure (.PCT files) */
-typedef struct {
+struct RoomPict {
int id; /* Room id */
int picture_id; /* Room picture id */
int format; /* Attribute format*/
@@ -157,7 +157,7 @@ typedef struct {
ColorList color_list; /* Room's color list */
CycleList cycle_list; /* Room's color cycling information */
-} RoomPict;
+};
typedef RoomPict RoomPictPtr;
@@ -277,7 +277,7 @@ extern void room_himem_preload(int room, int level);
extern RoomPtr room_dummy_init(int xs, int ys);
extern int room_picture_load(int room_id, Buffer *picture, int load_flags);
extern void room_resolve_base(char *base, char *file, int id, const char *base_path);
-extern int room_invert(void);
+extern int room_invert();
extern void init_room();
diff --git a/engines/mads/madsv2/core/screen.cpp b/engines/mads/madsv2/core/screen.cpp
index 6967cf79a48..1ec791206f2 100644
--- a/engines/mads/madsv2/core/screen.cpp
+++ b/engines/mads/madsv2/core/screen.cpp
@@ -135,11 +135,11 @@ void screen_shutdown_text(int clear_flag) {
warning("TODO: screen_shutdown_text");
}
-void screen_save(void) {
+void screen_save() {
warning("TODO: screen_save");
}
-void screen_restore(void) {
+void screen_restore() {
warning("TODO: screen_restore");
}
diff --git a/engines/mads/madsv2/core/screen.h b/engines/mads/madsv2/core/screen.h
index ad8d78e8d5a..3dfc2a8e7f9 100644
--- a/engines/mads/madsv2/core/screen.h
+++ b/engines/mads/madsv2/core/screen.h
@@ -79,41 +79,38 @@ extern Window screen_active;
/**
* Sets # of lines in VGA text mode
*/
-void screen_set_size(short numlines);
+extern void screen_set_size(short numlines);
/**
* Sets uniform color & character for specified line
*/
-void screen_wipe_line(short ul_x, short ul_y, short len, short wipe_color, byte wipe_char);
-
-short screen_out(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
-short screen_put(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
-void screen_set_colors(int normal_color, int hilite_color);
-void screen_set_line_width(int line_width);
-
-/* DO NOT USE */
-//short screen_show(const char *outstring, short locx, short locy);
-
-short screen_show_line(const char *outstring, short locx, short locy);
-short screen_write(const char *outstring);
-short screen_write_line(const char *outstring);
-void screen_clear(int clear_color);
-void screen_dominant_mode(int dominant_mode);
-void screen_init(int video_mode);
-void screen_init_dual(int mono_left);
-void screen_shutdown_dual(int clear_flag);
-void screen_init_graphics(int which_mode);
-void screen_shutdown_graphics(int clear_flag);
-void screen_show_spot(const char *message, int wx, int wy, int class_, int num);
-
-int screen_printf(int x, int y, const char *string, ...);
-int screen_print(const char *string, ...);
-
-void screen_init_text(int which_mode);
-void screen_shutdown_text(int clear_flag);
-void screen_save(void);
-void screen_restore(void);
-short screen_show_wide(const char *outstring, short locx, short locy, short width);
+extern void screen_wipe_line(short ul_x, short ul_y, short len, short wipe_color, byte wipe_char);
+
+extern short screen_out(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
+extern short screen_put(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
+extern void screen_set_colors(int normal_color, int hilite_color);
+extern void screen_set_line_width(int line_width);
+
+extern short screen_show_line(const char *outstring, short locx, short locy);
+extern short screen_write(const char *outstring);
+extern short screen_write_line(const char *outstring);
+extern void screen_clear(int clear_color);
+extern void screen_dominant_mode(int dominant_mode);
+extern void screen_init(int video_mode);
+extern void screen_init_dual(int mono_left);
+extern void screen_shutdown_dual(int clear_flag);
+extern void screen_init_graphics(int which_mode);
+extern void screen_shutdown_graphics(int clear_flag);
+extern void screen_show_spot(const char *message, int wx, int wy, int class_, int num);
+
+extern int screen_printf(int x, int y, const char *string, ...);
+extern int screen_print(const char *string, ...);
+
+extern void screen_init_text(int which_mode);
+extern void screen_shutdown_text(int clear_flag);
+extern void screen_save();
+extern void screen_restore();
+extern short screen_show_wide(const char *outstring, short locx, short locy, short width);
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/sprite.cpp b/engines/mads/madsv2/core/sprite.cpp
index 2346a8e6160..67b89251564 100644
--- a/engines/mads/madsv2/core/sprite.cpp
+++ b/engines/mads/madsv2/core/sprite.cpp
@@ -1165,7 +1165,7 @@ done:
}
-void dont_frag_the_palette(void) {
+void dont_frag_the_palette() {
/* this will tell sprite_free to not execute pal_deallocate. This will */
/* make it so the colors are not freed and you won't get the */
/* palette fragging. */
@@ -1173,7 +1173,7 @@ void dont_frag_the_palette(void) {
kidney = true;
}
-void go_ahead_and_frag_the_palette(void) {
+void go_ahead_and_frag_the_palette() {
kidney = false;
}
diff --git a/engines/mads/madsv2/core/sprite.h b/engines/mads/madsv2/core/sprite.h
index 5daebd7c955..3daef611050 100644
--- a/engines/mads/madsv2/core/sprite.h
+++ b/engines/mads/madsv2/core/sprite.h
@@ -29,8 +29,6 @@
namespace MADS {
namespace MADSV2 {
-#define sprite_file_version "3.02"
-
#define misc_largest_block misc[0]
/* LONG ... uses misc[1] also */
#define misc_is_a_walker misc[2]
@@ -68,21 +66,17 @@ namespace MADSV2 {
/* -- Would explode color list crap -- */
/* -- SS_SKIP must not = COLOR_TRANSPARENT */
-
#define SPRITE_COLOR_TABLE_SIZE 252
#define MAX_SECONDARY 16 /* Maximum secondary walker sequences */
-
-
-
- /* Legal values for x->source_type */
+/* Legal values for x->source_type */
#define SS_LBM 1 /* Source file is one frame LBM */
#define SS_LBM_MULT 2 /* Source file is several LBMs */
#define SS_ANM 3 /* Source file is an .ANM file */
#define SS_FLI 4 /* Source file is a .FLI file */
- /* Legal values for x->base_mode */
+/* Legal values for x->base_mode */
#define SS_FIRSTFRAME 1 /* If relative to first frame of ANM */
#define SS_STATICLBM 2 /* If relative to an LBM */
#define SS_BACKCOL 3 /* If relative to background color */
@@ -90,9 +84,7 @@ namespace MADSV2 {
#define SS_PANNING_ANM 5 /* Relative to panning ANM */
#define SS_PANNING_FLI 6 /* Relative to panning FLI */
-
/* STRUCTURES FOR ALL SPRITE LEVELS */
-
struct WalkerInfo {
uint16 num_primary; /* Number of primary sequence frames */
uint16 num_secondary; /* Number of secondary sequences */
@@ -112,23 +104,22 @@ struct WalkerInfo {
typedef WalkerInfo *WalkerInfoPtr;
-
/* DEVELOP TIME STRUCTURES (.DSS Files) */
/* Develop-time definition of a single sprite */
-typedef struct {
+struct HagSprite {
char name[9]; /* Sprite name */
int x, y; /* Sprite location */
int xs, ys; /* Size of sprite */
-} HagSprite;
+};
typedef HagSprite *HagSpritePtr;
/* Develop-time definition of a sprite series */
-typedef struct {
+struct HagSeries {
char name[80]; /* Name */
char desc[80]; /* Description */
@@ -162,7 +153,7 @@ typedef struct {
ColorList color_list; /* Series master color list */
HagSprite index[1]; /* Sprites */
-} HagSeries;
+};
typedef HagSeries *HagSeriesPtr;
@@ -218,7 +209,7 @@ typedef FileSeries *FileSeriesPtr;
/* Global paging information for a stream-loaded sprite series */
-typedef struct {
+struct SpritePageInfo {
byte paging_source; /* Is source EMS, XMS, or hard disk? */
byte packing_mode; /* Type of compression involved */
Common::SeekableReadStream *handle; /* File handle for hard disk load */
@@ -228,35 +219,35 @@ typedef struct {
int ems_page_offset; /* EMS page offset of current read */
int xms_handle; /* XMS handle for preloaded sprites */
long xms_offset; /* XMS offset for current read */
-} SpritePageInfo;
+};
typedef SpritePageInfo *SpritePageInfoPtr;
/* Sprite-specific paging informatio for stream-loaded series */
-typedef struct {
+struct SpritePageTable {
long file_offset; /* Offset in file for sprite's data */
long memory_needed; /* Amount of memory needed for sprite */
-} SpritePageTable;
+};
typedef SpritePageTable *SpritePageTablePtr;
/* Runtime memory structure for an individual sprite */
-typedef struct {
+struct Sprite {
byte *data; /* Pointer to sprite's actual data */
int x, y; /* Home position on screen */
int xs, ys; /* Sprite box size */
-} Sprite;
+};
typedef Sprite *SpritePtr;
/* Runtime memory structure for a sprite series */
-typedef struct {
+struct Series {
int delta_series; /* Flag if series is a delta series */
int base_mode; /* Series base mode optimization scheme */
@@ -277,7 +268,7 @@ typedef struct {
WalkerInfoPtr walker; /* Pointer to walker information ,if any */
Sprite index[1]; /* Individual sprite records begin here */
-} Series;
+};
typedef Series *SeriesPtr;
@@ -295,38 +286,38 @@ typedef Series *SeriesPtr;
extern byte *sprite_force_memory;
-extern long sprite_force_size;
+extern long sprite_force_size;
extern int sprite_error;
-void sprite_draw(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
-void sprite_draw_scaled(SeriesPtr series, int id, Buffer *buf,
+extern void sprite_draw(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
+extern void sprite_draw_scaled(SeriesPtr series, int id, Buffer *buf,
int target_x, int target_y, int scale_factor);
-void sprite_draw_3d_scaled(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_scaled(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor);
-void sprite_draw_3d_big(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_big(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int view_port_x, int view_port_y);
-void sprite_draw_3d_scaled_big(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_scaled_big(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor,
int view_port_x, int view_port_y);
-void sprite_draw_3d_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth);
-void sprite_draw_3d_scaled_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_scaled_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor);
-void sprite_draw_3d_big_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_big_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int view_port_x, int view_port_y);
-void sprite_draw_3d_scaled_big_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_scaled_big_x16(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor,
int view_port_x, int view_port_y);
-void sprite_draw_x16(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
-void sprite_draw_interface(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
-void sprite_draw_3d_scaled_to_attr(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_x16(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
+extern void sprite_draw_interface(SeriesPtr series, int id, Buffer *buf, int target_x, int target_y);
+extern void sprite_draw_3d_scaled_to_attr(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor,
int view_port_x, int view_port_y);
-void sprite_draw_3d_scaled_mono(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
+extern void sprite_draw_3d_scaled_mono(SeriesPtr series, int id, Buffer *buf, Buffer *attr,
int target_x, int target_y, int target_depth, int scale_factor, byte color);
-SeriesPtr sprite_series_load(const char *filename, int load_flags);
-void sprite_get_scaled_matte(SeriesPtr series, int id, int target_x, int target_y,
+extern SeriesPtr sprite_series_load(const char *filename, int load_flags);
+extern void sprite_get_scaled_matte(SeriesPtr series, int id, int target_x, int target_y,
int scale_factor, SpritePtr matte);
/**
@@ -348,13 +339,13 @@ word sprite_pack_line_rle(byte *target, Buffer *source, byte *palette_map, byte
word sprite_pack_line_irle(byte *target, Buffer *source,
byte *palette_map, byte transparent, int x1, int x2, int y);
-void sprite_set_bounds(HagSpritePtr sprite, int x, int y, int xs, int ys);
+extern void sprite_set_bounds(HagSpritePtr sprite, int x, int y, int xs, int ys);
/**
* Given a foreground buffer and a background buffer, merges
* background image into transparent areas of foreground image.
*/
-void sprite_merge_background(Buffer *source, Buffer *background, byte transparent);
+extern void sprite_merge_background(Buffer *source, Buffer *background, byte transparent);
/**
* Finds differences between "source" and "delta" buffers. When pixels
@@ -363,7 +354,7 @@ void sprite_merge_background(Buffer *source, Buffer *background, byte transparen
* to show changes. "sprite"'s boundaries are set to conform to minimum
* rectangle needed to contain all changes.
*/
-void sprite_delta_compute(HagSpritePtr sprite, Buffer *source, Buffer *delta);
+extern void sprite_delta_compute(HagSpritePtr sprite, Buffer *source, Buffer *delta);
/**
* Compares "source" and "delta" buffers. If a pixel is the same,
@@ -371,7 +362,7 @@ void sprite_delta_compute(HagSpritePtr sprite, Buffer *source, Buffer *delta);
* "source" pixel is copied to "delta" pixel, which prepares the delta
* buffer for use on next round.
*/
-void sprite_remove_non_delta(Buffer *source, Buffer *delta, byte transparent);
+extern void sprite_remove_non_delta(Buffer *source, Buffer *delta, byte transparent);
/**
* Given sprite, packs it and writes it to buffer target.
@@ -380,13 +371,13 @@ void sprite_remove_non_delta(Buffer *source, Buffer *delta, byte transparent);
long sprite_pack_image(byte *target, FileSpritePtr sprite, Buffer *source,
byte *palette_map, byte transparent);
-void sprite_color_translate(SeriesPtr series, ColorListPtr list);
-void sprite_single_color_translate(SeriesPtr series, int id);
-int sprite_data_load(SeriesPtr series, int id, byte *target);
+extern void sprite_color_translate(SeriesPtr series, ColorListPtr list);
+extern void sprite_single_color_translate(SeriesPtr series, int id);
+extern int sprite_data_load(SeriesPtr series, int id, byte *target);
-void dont_frag_the_palette();
-void go_ahead_and_frag_the_palette();
-void sprite_free(SeriesPtr *series, int free_memory);
+extern void dont_frag_the_palette();
+extern void go_ahead_and_frag_the_palette();
+extern void sprite_free(SeriesPtr *series, int free_memory);
extern void init_sprite();
diff --git a/engines/mads/madsv2/core/text.h b/engines/mads/madsv2/core/text.h
index 2fd12a31f28..b7be1c202db 100644
--- a/engines/mads/madsv2/core/text.h
+++ b/engines/mads/madsv2/core/text.h
@@ -76,10 +76,10 @@ namespace MADSV2 {
#define TEXT_UPPER_AND_LOWER 2
#define TEXT_AS_IS 3
-typedef struct {
+struct Text {
word length;
char text[1];
-} Text;
+};
struct TextDirectory {
diff --git a/engines/mads/madsv2/core/tile.h b/engines/mads/madsv2/core/tile.h
index 01ae99e4bf0..836545ca289 100644
--- a/engines/mads/madsv2/core/tile.h
+++ b/engines/mads/madsv2/core/tile.h
@@ -28,7 +28,6 @@
namespace MADS {
namespace MADSV2 {
-
#define DEFAULT_TILE_X 20
#define DEFAULT_TILE_Y 12
@@ -57,9 +56,9 @@ struct TileResource {
void load(Common::SeekableReadStream *src);
};
-typedef struct {
+struct Tile {
int32 file_offset;
-} Tile;
+};
struct TileMapHeader {
int16 tile_type; /* Type of tile */
diff --git a/engines/mads/madsv2/core/timer.h b/engines/mads/madsv2/core/timer.h
index 7500955e46e..10cdc02ca2c 100644
--- a/engines/mads/madsv2/core/timer.h
+++ b/engines/mads/madsv2/core/timer.h
@@ -45,45 +45,41 @@ extern long timer_60_low; /* 60/s timer_count */
extern long timer_dos_low;
-/* extern byte *interrupt_stack_pointer; */
-/* extern word interrupt_stack_size; */
-
/**
* Reads system clock, returns number of ticks since startup (1 tick = 54.9ms)
*/
-long timer_read();
+extern long timer_read();
inline long timer_read_dos() {
return timer_read();
}
-long timer_read_600();
-long timer_read_60();
-void timer_set_rate(word count_down);
+extern long timer_read_600();
+extern long timer_read_60();
/**
* Installs the timer interrupt handler
*/
-void timer_install();
+extern void timer_install();
/**
* Removes timer interrupt handler
*/
-void timer_remove();
+extern void timer_remove();
/**
* Activates or deactivates timer sound support.
*/
-void timer_set_sound_flag(int sound_flag);
+extern void timer_set_sound_flag(int sound_flag);
/**
* Designates a low priority routine. Pass NULL (0) to deactivate.
*/
-void timer_activate_low_priority(void (*(routine))());
+extern void timer_activate_low_priority(void (*(routine))());
-byte *timer_get_interrupt_stack();
+extern byte *timer_get_interrupt_stack();
-int timer_set_copy_protect(int protect);
-int timer_get_copy_protect();
+extern int timer_set_copy_protect(int protect);
+extern int timer_get_copy_protect();
extern void init_timer();
diff --git a/engines/mads/madsv2/core/video.h b/engines/mads/madsv2/core/video.h
index 26a21ae2002..a9347ff51ef 100644
--- a/engines/mads/madsv2/core/video.h
+++ b/engines/mads/madsv2/core/video.h
@@ -29,27 +29,27 @@ namespace MADSV2 {
extern byte video_mode;
-void video_init(int mode, int set_mode);
+extern void video_init(int mode, int set_mode);
-void video_update(Buffer *from, int from_x, int from_y,
+extern void video_update(Buffer *from, int from_x, int from_y,
int unto_x, int unto_y,
int size_x, int size_y);
-void video_flush_ega(int start_y, int size_y);
+extern void video_flush_ega(int start_y, int size_y);
/* Mode-specific versions */
-void video_update_vga(Buffer *from, int from_x, int from_y,
+extern void video_update_vga(Buffer *from, int from_x, int from_y,
int unto_x, int unto_y,
int size_x, int size_y);
-void video_update_ega(Buffer *from, int from_x, int from_y,
+extern void video_update_ega(Buffer *from, int from_x, int from_y,
int unto_x, int unto_y,
int size_x, int size_y);
-void video_update_tandy(Buffer *from, int from_x, int from_y,
+extern void video_update_tandy(Buffer *from, int from_x, int from_y,
int unto_x, int unto_y,
int size_x, int size_y);
diff --git a/engines/mads/madsv2/core/vocab.h b/engines/mads/madsv2/core/vocab.h
index 30d99361952..350e5358c19 100644
--- a/engines/mads/madsv2/core/vocab.h
+++ b/engines/mads/madsv2/core/vocab.h
@@ -66,7 +66,7 @@ extern word vocab_active;
extern word vocab_list_id[VOCAB_MAX_ACTIVE];
extern word vocab_list_pointer[VOCAB_MAX_ACTIVE];
-extern int vocab_destroy(void);
+extern int vocab_destroy();
extern int vocab_load(int allocation_flag);
extern int vocab_get_code(char *inp);
extern char *vocab_get_word(char *out, int inp);
@@ -83,13 +83,13 @@ extern int vocab_write_file(const char *last_word);
extern int vocab_add_word(const char *inp);
extern void vocab_report_error(int number);
extern char *vocab_select_word(char *out, const char *prompt, const char *default_word);
-extern void vocab_maint(void);
-extern int vocab_build(void);
-extern void vocab_unload_active(void);
-extern void vocab_init_active(void);
+extern void vocab_maint();
+extern int vocab_build();
+extern void vocab_unload_active();
+extern void vocab_init_active();
extern int vocab_active_id(word id);
extern int vocab_make_active(int id);
-extern int vocab_load_active(void);
+extern int vocab_load_active();
extern char *vocab_string(int vocab_id);
extern void init_vocab();
diff --git a/engines/mads/madsv2/core/window.cpp b/engines/mads/madsv2/core/window.cpp
index cc81dd0ca62..279fb920bbf 100644
--- a/engines/mads/madsv2/core/window.cpp
+++ b/engines/mads/madsv2/core/window.cpp
@@ -711,7 +711,7 @@ void window_trap_output(WindowPtr window,
window_server_installed = true;
}
-void window_restore_output(void) {
+void window_restore_output() {
window_server_installed = false;
}
diff --git a/engines/mads/madsv2/core/window.h b/engines/mads/madsv2/core/window.h
index d191a905b4f..986cdf354a8 100644
--- a/engines/mads/madsv2/core/window.h
+++ b/engines/mads/madsv2/core/window.h
@@ -78,10 +78,10 @@ struct WindowBox {
byte *storage;
};
-typedef struct WindowBox Window;
+typedef WindowBox Window;
typedef Window *WindowPtr;
-typedef struct {
+struct ScrollBar {
WindowPtr window;
int vertical;
int side;
@@ -91,7 +91,7 @@ typedef struct {
long max_value;
long scroll_value;
long page_value;
-} ScrollBar;
+};
typedef ScrollBar *ScrollBarPtr;
@@ -191,7 +191,7 @@ extern void window_trap_output(WindowPtr window, void (*(any_char_routine))(),
/**
* Restores the traditional DOS int 29 functionality.
*/
-extern void window_restore_output(void);
+extern void window_restore_output();
extern void window_define(WindowPtr window, int x1, int y1, int x2, int y2,
int color, int shadow, int save);
@@ -202,8 +202,8 @@ extern void window_wipe_line(WindowPtr window, int yy);
extern int window_printf(WindowPtr window, int x, int y, const char *string, ...);
extern void window_clear(WindowPtr window);
extern int window_show_color(WindowPtr window, const char *text, int xx, int yy, int color);
-extern void window_10_install(void);
-extern void window_10_remove(void);
+extern void window_10_install();
+extern void window_10_remove();
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/dragonsphere/asound.cpp b/engines/mads/madsv2/dragonsphere/asound.cpp
index ae1082f1973..3c4e099e593 100644
--- a/engines/mads/madsv2/dragonsphere/asound.cpp
+++ b/engines/mads/madsv2/dragonsphere/asound.cpp
@@ -1342,7 +1342,7 @@ op2_set_vol:
{
/* "call near ptr aAsoundDriverAn+33h" - the target is a no-op. */
pSrc++;
- /* (void)*pSrc; */
+ /* ()*pSrc; */
ch = _activeChannelPtr;
ch->_pSrc += 2;
goto dispatch;
diff --git a/engines/mads/madsv2/dragonsphere/main_menu.h b/engines/mads/madsv2/dragonsphere/main_menu.h
index cc895fb0896..5f75208484d 100644
--- a/engines/mads/madsv2/dragonsphere/main_menu.h
+++ b/engines/mads/madsv2/dragonsphere/main_menu.h
@@ -41,11 +41,11 @@ namespace Dragonsphere {
#define MENU_HIGH_SPRITE 15
-typedef struct {
+struct MenuItem {
int handle; /* Sprite series handle */
int active; /* Menu item is active */
int status; /* Current status */
-} MenuItem;
+};
extern bool new_background;
extern int selected_item;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room108.cpp b/engines/mads/madsv2/dragonsphere/rooms/room108.cpp
index c56d37b8963..21d3c748758 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room108.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room108.cpp
@@ -276,7 +276,7 @@ static void room_108_daemon() {
}
}
-static void room_108_pre_parser(void) {
+static void room_108_pre_parser() {
if (player_said_1(doorway_to_cell) && player.need_to_walk) {
if (!player_said_1(walk_through)) {
player.need_to_walk = false;
@@ -288,7 +288,7 @@ static void room_108_pre_parser(void) {
}
}
-static void room_108_parser(void) {
+static void room_108_parser() {
int temp;
if (player.look_around) {
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room112.cpp b/engines/mads/madsv2/dragonsphere/rooms/room112.cpp
index e103a255f70..a855efb0ac2 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room112.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room112.cpp
@@ -59,7 +59,7 @@ static Scratch scratch;
#define ROOM_112_DONE_UNHEALING 62
-static void room_112_init(void) {
+static void room_112_init() {
viewing_at_y = ((video_y - display_y) >> 1);
kernel_init_dialog(); /* clear interface */
kernel_set_interface_mode(INTER_LIMITED_SENTENCES);
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room113.cpp b/engines/mads/madsv2/dragonsphere/rooms/room113.cpp
index 49f327c3c99..5a2790ede59 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room113.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room113.cpp
@@ -412,7 +412,7 @@ static void handle_animation_seal() {
}
}
-static void room_113_daemon(void) {
+static void room_113_daemon() {
if (local->anim_0_running) {
handle_animation_seal();
}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room114.cpp b/engines/mads/madsv2/dragonsphere/rooms/room114.cpp
index 5f8979e24d1..7832f4404d6 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room114.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room114.cpp
@@ -81,7 +81,7 @@ static Scratch scratch;
#define UP_LADDER_Y 30
-static void room_114_init(void) {
+static void room_114_init() {
/* Load sprite series */
if (previous_room != KERNEL_RESTORING_GAME) {
@@ -308,7 +308,7 @@ static void room_114_daemon() {
}
}
-static void room_114_pre_parser(void) {
+static void room_114_pre_parser() {
if (player_said_2(walk_down, passageway_to_west)) {
player.walk_off_edge_to_room = 115;
}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room120.cpp b/engines/mads/madsv2/dragonsphere/rooms/room120.cpp
index 940026c1132..e03bfafd769 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room120.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room120.cpp
@@ -162,7 +162,7 @@ static void room_120_init() {
section_1_music();
}
-static void generate_path(void) {
+static void generate_path() {
if (local->highlighting == words_Gran_Callahach) {
if (global[pre_room] == 110) { /* Gran Callahach */
local->path_0[0] = ' ';
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room607.cpp b/engines/mads/madsv2/dragonsphere/rooms/room607.cpp
index 125682cb51f..ab943221d5c 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room607.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room607.cpp
@@ -678,7 +678,7 @@ void room_607_synchronize(Common::Serializer &s) {
s.syncAsSint16LE(local->prevent);
}
-void room_607_preload(void) {
+void room_607_preload() {
room_init_code_pointer = room_607_init;
room_pre_parser_code_pointer = room_607_pre_parser;
room_parser_code_pointer = room_607_parser;
diff --git a/engines/mads/madsv2/forest/extra.cpp b/engines/mads/madsv2/forest/extra.cpp
index 65fa516d553..5baccd2f024 100644
--- a/engines/mads/madsv2/forest/extra.cpp
+++ b/engines/mads/madsv2/forest/extra.cpp
@@ -55,13 +55,13 @@ void clear_selected_item() {
buffer_rect_copy_2(scr_inter_orig, scr_live, 138, 0, 138, 156, 55, 42);
}
-void solve_me_selected(void) {
+void solve_me_selected() {
global[walker_converse_state] = -1;
open_interface(CANDLE_FLY);
game_exec_function(room_parser_code_pointer);
}
-void door_selected(void) {
+void door_selected() {
open_interface(DOOR_FLY);
kernel.activate_menu = GAME_MAIN_MENU;
}
diff --git a/engines/mads/madsv2/forest/inventory.cpp b/engines/mads/madsv2/forest/inventory.cpp
index ae20209fdcf..6f1b980a394 100644
--- a/engines/mads/madsv2/forest/inventory.cpp
+++ b/engines/mads/madsv2/forest/inventory.cpp
@@ -86,7 +86,7 @@ static int inventory_get_item(int num) {
return -1;
}
-static void kernel_load_interface(void) {
+static void kernel_load_interface() {
char temp_buf[80];
char *mark;
diff --git a/engines/mads/madsv2/phantom/main_menu.cpp b/engines/mads/madsv2/phantom/main_menu.cpp
index 12636a1df5b..6042a31ee99 100644
--- a/engines/mads/madsv2/phantom/main_menu.cpp
+++ b/engines/mads/madsv2/phantom/main_menu.cpp
@@ -180,7 +180,7 @@ done:
}
}
-static void stop_series(void) {
+static void stop_series() {
int count;
for (count = NUM_MENU_ITEMS - 1; count >= 0; count--) {
@@ -188,7 +188,7 @@ static void stop_series(void) {
}
}
-static void start_hotspots(void) {
+static void start_hotspots() {
int count;
int x1, x2, y1, y2;
int xs, ys;
@@ -211,7 +211,7 @@ static void start_hotspots(void) {
hspot_add(156, 77, 170, 83, 2, EYE_HOTSPOT + 1, mcga_mode);
}
-static void process_menu(void) {
+static void process_menu() {
int myspot;
myspot = hspot_which(mouse_x, mouse_y - viewing_at_y, mcga_mode);
@@ -236,7 +236,7 @@ static void process_menu(void) {
}
}
-static void process_sprites(void) {
+static void process_sprites() {
int count;
int sprite;
int series;
@@ -384,7 +384,7 @@ done:
}
}
-void menu_control(void) {
+void menu_control() {
int fx;
int mykey;
int last_frame = -1;
diff --git a/engines/mads/madsv2/phantom/main_menu.h b/engines/mads/madsv2/phantom/main_menu.h
index 27d3bfd83b3..bc244696193 100644
--- a/engines/mads/madsv2/phantom/main_menu.h
+++ b/engines/mads/madsv2/phantom/main_menu.h
@@ -41,11 +41,11 @@ namespace Phantom {
#define MENU_HIGH_SPRITE 15
-typedef struct {
+struct MenuItem {
int handle; /* Sprite series handle */
int active; /* Menu item is active */
int status; /* Current status */
-} MenuItem;
+};
extern bool new_background;
extern int selected_item;
diff --git a/engines/mads/madsv2/phantom/rooms/room101.cpp b/engines/mads/madsv2/phantom/rooms/room101.cpp
index 45ad61fac07..4733df502e2 100644
--- a/engines/mads/madsv2/phantom/rooms/room101.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room101.cpp
@@ -39,7 +39,7 @@ namespace Rooms {
static Scratch scratch;
-void room_101_init(void) {
+void room_101_init() {
kernel.disable_fastwalk = true;
if (previous_room != KERNEL_RESTORING_GAME) {
@@ -153,7 +153,7 @@ void room_101_init(void) {
}
-static void handle_animation_000(void) {
+static void handle_animation_000() {
int random;
int reset_frame;
@@ -243,7 +243,7 @@ static void handle_animation_000(void) {
-static void handle_animation_001(void) {
+static void handle_animation_001() {
int random;
int reset_frame;
@@ -359,7 +359,7 @@ static void handle_animation_001(void) {
-void room_101_daemon(void) {
+void room_101_daemon() {
/* =============== Goto conversation functions =============== */
if (local->anim_0_running) {
@@ -416,7 +416,7 @@ void room_101_daemon(void) {
}
}
-static void process_conversation_0(void) {
+static void process_conversation_0() {
conv_me_trigger(ROOM_101_CONV0_MAKE_BRIE_WALK);
if (kernel.trigger == ROOM_101_CONV0_MAKE_BRIE_WALK) {
@@ -427,7 +427,7 @@ static void process_conversation_0(void) {
-static void process_conversation_1(void) {
+static void process_conversation_1() {
int you_trig_flag = false;
if ((player_verb >= conv001_speech_talk) &&
@@ -504,7 +504,7 @@ static void process_conversation_1(void) {
-void room_101_pre_parser(void) {
+void room_101_pre_parser() {
if (player_said_2(exit_to, orchestra_pit)) {
if ((global[brie_talk_status] == AFTER_CONVS_0_AND_1) || (local->start_walking)) {
player.walk_off_edge_to_room = 102;
@@ -536,7 +536,7 @@ void room_101_pre_parser(void) {
}
-void room_101_parser(void) {
+void room_101_parser() {
if (conv_control.running == CONV_BRIE_MOTIONS_TO_RAOUL) {
process_conversation_0();
goto handled;
@@ -629,7 +629,7 @@ done:
;
}
-void room_101_preload(void) {
+void room_101_preload() {
room_init_code_pointer = room_101_init;
room_pre_parser_code_pointer = room_101_pre_parser;
room_parser_code_pointer = room_101_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room102.cpp b/engines/mads/madsv2/phantom/rooms/room102.cpp
index e51068a7bdf..98250dda697 100644
--- a/engines/mads/madsv2/phantom/rooms/room102.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room102.cpp
@@ -37,7 +37,7 @@ namespace Rooms {
static Scratch scratch;
-void room_102_init(void) {
+void room_102_init() {
int death_x = 0;
int death_y = 0;
int death_scale = 0;
@@ -127,7 +127,7 @@ void room_102_init(void) {
}
-void room_102_daemon(void) {
+void room_102_daemon() {
if (kernel.trigger == ROOM_102_DOOR_CLOSES) {
seq[fx_door] = kernel_seq_stamp(ss[fx_door], false, 4);
kernel_seq_depth(seq[fx_door], 14);
@@ -146,7 +146,7 @@ void room_102_daemon(void) {
}
-void room_102_pre_parser(void) {
+void room_102_pre_parser() {
if ((player_said_2(open, orchestra_door)) ||
(player_said_2(push, orchestra_door))) {
player_walk(FRONT_OF_DOOR_X, FRONT_OF_DOOR_Y, FACING_EAST);
@@ -154,7 +154,7 @@ void room_102_pre_parser(void) {
}
-void room_102_parser(void) {
+void room_102_parser() {
if (player_said_2(walk_down, aisle)) {
new_room = 101;
goto handled;
@@ -295,7 +295,7 @@ done:
;
}
-void room_102_preload(void) {
+void room_102_preload() {
room_init_code_pointer = room_102_init;
room_pre_parser_code_pointer = room_102_pre_parser;
room_parser_code_pointer = room_102_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room103.cpp b/engines/mads/madsv2/phantom/rooms/room103.cpp
index 60f24d3a43a..80f952ccae7 100644
--- a/engines/mads/madsv2/phantom/rooms/room103.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room103.cpp
@@ -90,7 +90,7 @@ void room_103_adjust_rails(int variant) {
}
}
-void room_103_init(void) {
+void room_103_init() {
int prompt_x;
int prompt_y;
int prompt_facing;
@@ -442,7 +442,7 @@ void room_103_init(void) {
section_1_music();
}
-static void climb_stairs_right(void) {
+static void climb_stairs_right() {
int stairs_reset_frame;
if (kernel_anim[aa[3]].frame != local->stairs_frame) {
@@ -469,7 +469,7 @@ static void climb_stairs_right(void) {
}
}
-static void decend_stairs_right(void) {
+static void decend_stairs_right() {
int stairs_reset_frame;
if (kernel_anim[aa[4]].frame != local->stairs_frame) {
@@ -490,7 +490,7 @@ static void decend_stairs_right(void) {
}
}
-static void climb_stairs_left(void) {
+static void climb_stairs_left() {
int stairs_reset_frame;
if (kernel_anim[aa[5]].frame != local->stairs_frame) {
@@ -517,7 +517,7 @@ static void climb_stairs_left(void) {
}
}
-static void decend_stairs_left(void) {
+static void decend_stairs_left() {
int stairs_reset_frame;
if (kernel_anim[aa[6]].frame != local->stairs_frame) {
@@ -538,7 +538,7 @@ static void decend_stairs_left(void) {
}
}
-static void handle_animation_jacques(void) {
+static void handle_animation_jacques() {
int random;
int jacques_reset_frame;
@@ -704,7 +704,7 @@ static void handle_animation_jacques(void) {
}
}
-void room_103_daemon(void) {
+void room_103_daemon() {
int temp; /* for synching purposes */
if (local->anim_0_running) {
@@ -841,7 +841,7 @@ void room_103_daemon(void) {
}
}
-static void process_conv_jacques(void) {
+static void process_conv_jacques() {
int quit_converse = false;
int16 *value_1;
@@ -936,7 +936,7 @@ static void process_conv_jacques(void) {
local->jacques_talk_count = 0;
}
-void room_103_pre_parser(void) {
+void room_103_pre_parser() {
if (player_said_2(open, door)) {
player.need_to_walk = true;
}
@@ -1063,7 +1063,7 @@ void room_103_pre_parser(void) {
}
}
-void room_103_parser(void) {
+void room_103_parser() {
int temp; /* for synching purposes */
if (player_said_2(open, door_to_pit)) {
@@ -1735,7 +1735,7 @@ done:
}
-void room_103_preload(void) {
+void room_103_preload() {
room_init_code_pointer = room_103_init;
room_pre_parser_code_pointer = room_103_pre_parser;
room_parser_code_pointer = room_103_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room104.h b/engines/mads/madsv2/phantom/rooms/room104.h
index 40b2e7e8a20..997fe7cbe75 100644
--- a/engines/mads/madsv2/phantom/rooms/room104.h
+++ b/engines/mads/madsv2/phantom/rooms/room104.h
@@ -193,11 +193,11 @@ struct Scratch { /* Room local variables */
#define NEW_ROOM_FROM_103_Y 96
-extern void room_104_init(void);
-extern void room_104_daemon(void);
-extern void room_104_pre_parser(void);
-extern void room_104_parser(void);
-extern void room_104_preload(void);
+extern void room_104_init();
+extern void room_104_daemon();
+extern void room_104_pre_parser();
+extern void room_104_parser();
+extern void room_104_preload();
} // namespace Rooms
} // namespace Phantom
diff --git a/engines/mads/madsv2/phantom/rooms/room105.h b/engines/mads/madsv2/phantom/rooms/room105.h
index 991a6be4e75..53a4f132b4e 100644
--- a/engines/mads/madsv2/phantom/rooms/room105.h
+++ b/engines/mads/madsv2/phantom/rooms/room105.h
@@ -147,11 +147,11 @@ struct Scratch { /* Room local variables */
#define WALK_TO_COLUMN_2_Y 126
-extern void room_105_init(void);
-extern void room_105_daemon(void);
-extern void room_105_pre_parser(void);
-extern void room_105_parser(void);
-extern void room_105_preload(void);
+extern void room_105_init();
+extern void room_105_daemon();
+extern void room_105_pre_parser();
+extern void room_105_parser();
+extern void room_105_preload();
} // namespace Rooms
} // namespace Phantom
diff --git a/engines/mads/madsv2/phantom/rooms/room106.h b/engines/mads/madsv2/phantom/rooms/room106.h
index aecad12217e..52e5ca34104 100644
--- a/engines/mads/madsv2/phantom/rooms/room106.h
+++ b/engines/mads/madsv2/phantom/rooms/room106.h
@@ -151,11 +151,11 @@ struct Scratch { /* Room local variables */
#define DYN_FLOOR_2_WALK_TO_Y 109
-extern void room_106_init(void);
-extern void room_106_daemon(void);
-extern void room_106_pre_parser(void);
-extern void room_106_parser(void);
-extern void room_106_preload(void);
+extern void room_106_init();
+extern void room_106_daemon();
+extern void room_106_pre_parser();
+extern void room_106_parser();
+extern void room_106_preload();
} // namespace Rooms
} // namespace Phantom
diff --git a/engines/mads/madsv2/phantom/rooms/room107.h b/engines/mads/madsv2/phantom/rooms/room107.h
index 002c3a50b58..cb67f1a3f1f 100644
--- a/engines/mads/madsv2/phantom/rooms/room107.h
+++ b/engines/mads/madsv2/phantom/rooms/room107.h
@@ -65,9 +65,9 @@ struct Scratch { /* Room local variables */
#define WALK_TO_Y_FROM_106 75
-extern void room_107_init(void);
-extern void room_107_parser(void);
-extern void room_107_preload(void);
+extern void room_107_init();
+extern void room_107_parser();
+extern void room_107_preload();
} // namespace Rooms
} // namespace Phantom
diff --git a/engines/mads/madsv2/phantom/rooms/room108.h b/engines/mads/madsv2/phantom/rooms/room108.h
index 1f6c2598ae2..a4992d0c857 100644
--- a/engines/mads/madsv2/phantom/rooms/room108.h
+++ b/engines/mads/madsv2/phantom/rooms/room108.h
@@ -132,10 +132,10 @@ struct Scratch { /* Room local variables */
#define DYN_CHAR_WALK_TO_Y 102
-extern void room_108_init(void);
-extern void room_108_daemon(void);
-extern void room_108_parser(void);
-extern void room_108_preload(void);
+extern void room_108_init();
+extern void room_108_daemon();
+extern void room_108_parser();
+extern void room_108_preload();
} // namespace Rooms
} // namespace Phantom
diff --git a/engines/mads/madsv2/phantom/rooms/room250.cpp b/engines/mads/madsv2/phantom/rooms/room250.cpp
index 4671816e6ef..a4e8a96abf1 100644
--- a/engines/mads/madsv2/phantom/rooms/room250.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room250.cpp
@@ -35,7 +35,7 @@ namespace Rooms {
static Scratch scratch;
-void room_250_init(void) {
+void room_250_init() {
viewing_at_y = ((video_y - display_y) >> 1);
player.commands_allowed = false;
@@ -56,7 +56,7 @@ void room_250_init(void) {
}
-void room_250_daemon(void) {
+void room_250_daemon() {
int score;
int id;
int y;
@@ -129,7 +129,7 @@ void room_250_daemon(void) {
}
}
-void room_250_preload(void) {
+void room_250_preload() {
room_init_code_pointer = room_250_init;
room_pre_parser_code_pointer = NULL;
room_parser_code_pointer = NULL;
diff --git a/engines/mads/madsv2/phantom/rooms/room301.cpp b/engines/mads/madsv2/phantom/rooms/room301.cpp
index 939a5773568..a9521e79f08 100644
--- a/engines/mads/madsv2/phantom/rooms/room301.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room301.cpp
@@ -140,13 +140,13 @@ void room_301_init() {
section_3_music();
}
-void room_301_pre_parser(void) {
+void room_301_pre_parser() {
if (player_said_2(exit_to, catwalk_over_house)) {
player.walk_off_edge_to_room = 302;
}
}
-void room_301_parser(void) {
+void room_301_parser() {
if (player_said_2(climb_down, circular_staircase)) {
switch (kernel.trigger) {
case 0:
@@ -336,7 +336,7 @@ done:
;
}
-void room_301_daemon(void) {
+void room_301_daemon() {
if (global[done_brie_conv_203] == YES_AND_CHASE) {
if ((picture_view_x < 320) && (player.x < 350)) {
player_cancel_command();
@@ -388,7 +388,7 @@ void room_301_daemon(void) {
}
}
-void room_301_preload(void) {
+void room_301_preload() {
room_init_code_pointer = room_301_init;
room_pre_parser_code_pointer = room_301_pre_parser;
room_parser_code_pointer = room_301_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room302.cpp b/engines/mads/madsv2/phantom/rooms/room302.cpp
index 691241ebf89..c7c93aab22e 100644
--- a/engines/mads/madsv2/phantom/rooms/room302.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room302.cpp
@@ -44,7 +44,7 @@ namespace Rooms {
static Scratch scratch;
-void room_302_init(void) {
+void room_302_init() {
/* =================== Load sprite series ==================== */
ss[fx_blue_frame] = kernel_load_series(kernel_name('p', 0), false);
@@ -80,7 +80,7 @@ void room_302_init(void) {
section_3_music();
}
-void room_302_pre_parser(void) {
+void room_302_pre_parser() {
if (player_said_2(exit_to, catwalk)) {
if (inter_point_x > 160) {
player.walk_off_edge_to_room = 301;
@@ -90,7 +90,7 @@ void room_302_pre_parser(void) {
}
}
-void room_302_parser(void) {
+void room_302_parser() {
int count = 0;
if (player_said_2(take, blue_frame) &&
@@ -232,7 +232,7 @@ done:
;
}
-void room_302_preload(void) {
+void room_302_preload() {
room_init_code_pointer = room_302_init;
room_pre_parser_code_pointer = room_302_pre_parser;
room_parser_code_pointer = room_302_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room303.cpp b/engines/mads/madsv2/phantom/rooms/room303.cpp
index db131ea4679..c6487e9b8a0 100644
--- a/engines/mads/madsv2/phantom/rooms/room303.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room303.cpp
@@ -46,7 +46,7 @@ namespace Rooms {
static Scratch scratch;
-void room_303_init(void) {
+void room_303_init() {
local->anim_0_running = false;
local->frame_guard = false;
@@ -117,7 +117,7 @@ void room_303_init(void) {
section_3_music();
}
-void room_303_pre_parser(void) {
+void room_303_pre_parser() {
if (player_said_2(exit_to, catwalk)) {
if (!global[right_door_is_open_504]) {
if (inter_point_x > 160) {
@@ -133,7 +133,7 @@ void room_303_pre_parser(void) {
}
}
-void room_303_parser(void) {
+void room_303_parser() {
if (((player_said_2(take, large_note)) && (object_is_here(large_note))) || ((kernel.trigger > 0) && kernel.trigger < 3)) {
switch (kernel.trigger) {
case (0):
@@ -315,7 +315,7 @@ done:
;
}
-void room_303_daemon(void) {
+void room_303_daemon() {
if (kernel.trigger == ROOM_303_DONE_CLIMBING_UP) {
player.x = CLIMB_X;
player.y = CLIMB_Y;
@@ -336,7 +336,7 @@ void room_303_daemon(void) {
}
}
-void room_303_preload(void) {
+void room_303_preload() {
room_init_code_pointer = room_303_init;
room_pre_parser_code_pointer = room_303_pre_parser;
room_parser_code_pointer = room_303_parser;
diff --git a/engines/mads/madsv2/phantom/rooms/room408.cpp b/engines/mads/madsv2/phantom/rooms/room408.cpp
index a97c5e7dc96..487021f775b 100644
--- a/engines/mads/madsv2/phantom/rooms/room408.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room408.cpp
@@ -41,7 +41,7 @@ namespace Rooms {
static Scratch scratch;
-void room_408_init(void) {
+void room_408_init() {
int web;
global_catacombs_init();
@@ -187,7 +187,7 @@ void room_408_init(void) {
section_4_music();
}
-void room_408_pre_parser(void) {
+void room_408_pre_parser() {
local->frame_is_here = false;
local->frame_here_for_taking = false;
@@ -234,7 +234,7 @@ void room_408_pre_parser(void) {
}
}
-void room_408_parser(void) {
+void room_408_parser() {
int web;
if (player_said_1(put) && player_said_1(floor)) {
@@ -518,13 +518,13 @@ done:
;
}
-void room_408_daemon(void) {
+void room_408_daemon() {
if (kernel.trigger == ROOM_408_SHOW_TEXT) {
text_show(text_000_31);
}
}
-void room_408_preload(void) {
+void room_408_preload() {
room_init_code_pointer = room_408_init;
room_pre_parser_code_pointer = room_408_pre_parser;
room_parser_code_pointer = room_408_parser;
Commit: aaf61c1ade43c2b9de4386aae90a15b60ba504b1
https://github.com/scummvm/scummvm/commit/aaf61c1ade43c2b9de4386aae90a15b60ba504b1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-07-03T21:42:10+10:00
Commit Message:
MADS: Fix gcc compiler warnings
Changed paths:
engines/mads/madsv2/animview/animview.cpp
engines/mads/madsv2/core/config.cpp
engines/mads/madsv2/core/kernel.cpp
engines/mads/madsv2/core/matte.cpp
engines/mads/madsv2/core/tile.cpp
engines/mads/madsv2/dragonsphere/menus.cpp
engines/mads/madsv2/dragonsphere/rooms/room119.cpp
engines/mads/madsv2/dragonsphere/rooms/room201.cpp
engines/mads/madsv2/dragonsphere/rooms/room203.cpp
engines/mads/madsv2/dragonsphere/rooms/room206.cpp
engines/mads/madsv2/dragonsphere/rooms/room605.cpp
engines/mads/madsv2/dragonsphere/rooms/section1.cpp
engines/mads/madsv2/dragonsphere/rooms/section2.cpp
engines/mads/madsv2/dragonsphere/rooms/section3.cpp
engines/mads/madsv2/dragonsphere/rooms/section4.cpp
engines/mads/madsv2/dragonsphere/rooms/section5.cpp
engines/mads/madsv2/dragonsphere/rooms/section6.cpp
diff --git a/engines/mads/madsv2/animview/animview.cpp b/engines/mads/madsv2/animview/animview.cpp
index 9a3f365cc2a..26ee374fdf0 100644
--- a/engines/mads/madsv2/animview/animview.cpp
+++ b/engines/mads/madsv2/animview/animview.cpp
@@ -386,7 +386,6 @@ static void animate() {
AnimFile anim_in;
int count, series_ctr, ctr;
int soundLoadFlag = 0;
- bool foundSound;
int imageIndex;
static int packIndex = 0;
@@ -447,8 +446,6 @@ static void animate() {
for (count = 0; count < anim_count && !error_code; ++count) {
MADS_FORMAT(buf, anim_list[count].name);
- foundSound = false;
-
if (!has_sound_file) {
if (anim_get_sound_info(buf, sound_file_name, &soundLoadFlag))
goto done;
diff --git a/engines/mads/madsv2/core/config.cpp b/engines/mads/madsv2/core/config.cpp
index e6e97a3ab7f..b48d6c62084 100644
--- a/engines/mads/madsv2/core/config.cpp
+++ b/engines/mads/madsv2/core/config.cpp
@@ -28,17 +28,20 @@
namespace MADS {
namespace MADSV2 {
-ConfigFile config_file = { 0, 0x220,
- 0, 0x220, 7, 1,
- true, true, 1,
- 0, 0,
- 0, 0,
- 0, true,
- 0, 0,
- false, 'D',
- false,
- false,
- 7, 0, 0, 0, 0 };
+ConfigFile config_file = {
+ 0, 0x220,
+ 0, 0x220, 7, 1,
+ true, true, 1,
+ 0, 0,
+ 0, 0,
+ 0, true,
+ 0, 0,
+ false, 'D',
+ false,
+ false,
+ 7, 0, 0, 0, 0,
+ false
+};
void read_config_file() {
ConfMan.registerDefault("music_mute", false);
diff --git a/engines/mads/madsv2/core/kernel.cpp b/engines/mads/madsv2/core/kernel.cpp
index 3180cc491a6..6f0454b2696 100644
--- a/engines/mads/madsv2/core/kernel.cpp
+++ b/engines/mads/madsv2/core/kernel.cpp
@@ -880,9 +880,6 @@ int kernel_seq_forward(int series_id, int mirror, word ticks, word interval_tick
int kernel_seq_forward_scroll(int series_id, int mirror,
word ticks, word interval_ticks, word start_ticks, int expire) {
int depth = 0;
- SpritePtr sprite;
-
- sprite = &series_list[series_id]->index[0];
return kernel_seq_add(series_id, mirror, 1, 0, 0, AA_LINEAR, 1,
depth, 100, true, 0, 0, ticks, interval_ticks,
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index 5c943cd9f95..7b73645a837 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -498,54 +498,6 @@ void filter_matte_list(MattePtr matte, int size, int base_index) {
}
}
-static void matte_quick_to_black(byte *special_pal, int ticks) {
- int going;
- byte *source;
- byte *dest;
- long fade_clock;
- long now_clock;
- byte increments[768];
-
- source = special_pal;
- dest = increments;
-
- // Build increment table: each entry is ceil(source[i] / 4), minimum 1
- for (int i = 0; i < 768; i++)
- {
- byte inc = (source[i] >> 2) + ((source[i] & 3) ? 1 : 0);
- if (inc == 0)
- inc = 1;
- dest[i] = inc;
- }
-
- do {
- going = false;
- fade_clock = timer_read_600() + ticks;
-
- for (int i = 0; i < 768; i++) {
- byte val = source[i];
- byte decr = dest[i];
-
- if (val >= decr)
- val -= decr;
- else
- val = 0;
-
- source[i] = val;
-
- if (val != 0)
- going = true;
- }
-
- mcga_setpal((Palette *)special_pal);
-
- do {
- now_clock = timer_read_600();
- } while (now_clock < fade_clock);
-
- } while (going);
-}
-
static void matte_quick_from_black(byte *special_pal, int ticks) {
int going;
byte *source;
@@ -631,7 +583,6 @@ static void matte_special_effect(int special_effect, int full_screen) {
if (special_effect == MATTE_FX_FADE_THRU_BLACK) {
mcga_getpal(&special_pal);
- //matte_quick_to_black(&special_pal[0].r, 1);
magic_fade_to_grey(special_pal, NULL, 0, 256, 0, 1, 1, 16);
buffer_fill(scr_live, 0);
}
diff --git a/engines/mads/madsv2/core/tile.cpp b/engines/mads/madsv2/core/tile.cpp
index fee1a049521..ff7e3f4d90a 100644
--- a/engines/mads/madsv2/core/tile.cpp
+++ b/engines/mads/madsv2/core/tile.cpp
@@ -44,11 +44,6 @@ namespace MADSV2 {
int tile_load_error;
ShadowList tile_shadow;
-static bool tile_ems_available = false;
-#if 0
-static int tile_picture_handle;
-static int tile_attribute_handle;
-#endif
void TileMapHeader::load(Common::SeekableReadStream *src) {
src->readMultipleLE(tile_type, one_to_one, num_x_tiles, num_y_tiles,
@@ -73,21 +68,7 @@ int tile_setup() {
picture_map.map = NULL;
depth_map.map = NULL;
-#if 0
- tile_picture_handle = ems_get_page_handle(TILE_MAX_PAGES);
- if (tile_picture_handle < 0) goto done;
- tile_attribute_handle = ems_get_page_handle(TILE_MAX_PAGES >> 1);
- if (tile_attribute_handle < 0) goto done;
-
- tile_ems_available = true;
- error_flag = false;
-
-done:
- if (error_flag) {
- if (tile_picture_handle >= 0) ems_free_page_handle(tile_picture_handle);
- }
-#endif
return error_flag;
}
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index 51522d090e4..240673d56ab 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -491,7 +491,6 @@ static void global_menu_difficulty() {
static void global_menu_cdrom() {
int initial_1, initial_2;
int former_speech;
- int former_text;
PopupItem *speech_item;
PopupItem *text_item;
PopupItem *done_button, *cancel_button;
@@ -508,7 +507,6 @@ static void global_menu_cdrom() {
popup_blank(2);
former_speech = config_file.speech_flag;
- former_text = config_file.show_speech_boxes;
initial_1 = config_file.speech_flag ? 0 : 1;
initial_2 = config_file.show_speech_boxes ? 0 : 1;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room119.cpp b/engines/mads/madsv2/dragonsphere/rooms/room119.cpp
index 37843b0cdd7..8486431bcb7 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room119.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room119.cpp
@@ -465,12 +465,7 @@ static void room_119_daemon() {
}
static void process_conversation_king() {
- int you_trig_flag = false;
- int me_trig_flag = false;
-
if (player_verb == conv035_exit_b_b) {
- me_trig_flag = true;
- you_trig_flag = true;
if (!kernel.trigger) {
conv_me_trigger(ROOM_119_LEAVE_ROOM);
}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room201.cpp b/engines/mads/madsv2/dragonsphere/rooms/room201.cpp
index 19cb6c77ad3..a410c301f36 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room201.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room201.cpp
@@ -1807,7 +1807,6 @@ static void room_201_daemon() {
static void process_conv_king_guards() {
int you_trig_flag = false;
- int me_trig_flag = false;
if (player_verb == conv047_prebribe_giver) {
if (!kernel.trigger) {
@@ -1833,7 +1832,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_give_b_b) { /* first time around */
*conv_my_next_start = conv047_postbribe;
you_trig_flag = true;
- me_trig_flag = true;
local->activate_timer = true;
conv_abort();
}
@@ -1841,7 +1839,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_exit_i_i) {
*conv_my_next_start = conv047_protect;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
local->guard_right_action = UNHALT;
@@ -1861,7 +1858,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_give_d_d) {
*conv_my_next_start = conv047_usesame;
you_trig_flag = true;
- me_trig_flag = true;
local->activate_timer = true;
conv_abort();
}
@@ -1870,7 +1866,6 @@ static void process_conv_king_guards() {
*conv_my_next_start = conv047_heythere;
conv_abort();
you_trig_flag = true;
- me_trig_flag = true;
local->guard_right_action = KILL;
player.commands_allowed = false;
}
@@ -1879,7 +1874,6 @@ static void process_conv_king_guards() {
*conv_my_next_start = conv047_protect;
local->guard_left_action = GIVE_NOTHING;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
local->guard_right_action = UNHALT;
@@ -1888,7 +1882,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_exit_k_k) {
*conv_my_next_start = conv047_protect;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player_walk(PLAYER_X_FROM_120, PLAYER_Y_FROM_120, FACING_WEST);
/* player.walking = true; */
@@ -1910,7 +1903,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_exit_d_d) {
*conv_my_next_start = conv047_heythere;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
local->guard_left_action = DUMP_ANIMS;
@@ -1920,7 +1912,6 @@ static void process_conv_king_guards() {
if (player_verb == conv047_exit_f_f) {
*conv_my_next_start = conv047_askback;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
local->guard_left_action = DUMP_ANIMS;
@@ -1932,7 +1923,6 @@ static void process_conv_king_guards() {
*conv_my_next_start = conv047_protect;
local->guard_left_action = GIVE_NOTHING;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
}
@@ -1942,7 +1932,6 @@ static void process_conv_king_guards() {
conv_abort();
local->guard_left_action = GIVE_NOTHING;
you_trig_flag = true;
- me_trig_flag = true;
player.commands_allowed = false;
}
@@ -1968,12 +1957,10 @@ static void process_conv_king_guards() {
static void process_conv_pid_guards() {
int you_trig_flag = false;
- int me_trig_flag = false;
if (player_verb == conv054_death_b_b) {
conv_abort();
you_trig_flag = true;
- me_trig_flag = true;
local->guard_right_action = KILL;
player.commands_allowed = false;
}
@@ -1982,7 +1969,6 @@ static void process_conv_pid_guards() {
local->death_timer = 0;
local->clock = 0;
you_trig_flag = true;
- me_trig_flag = true;
local->activate_timer = true;
}
@@ -1990,13 +1976,11 @@ static void process_conv_pid_guards() {
conv_hold();
local->pid_action = DRINK;
you_trig_flag = true;
- me_trig_flag = true;
}
if (player_verb == conv054_offer_b_b) {
local->pid_action = HAND_TO_LEFT;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
player.commands_allowed = false;
}
@@ -2004,7 +1988,6 @@ static void process_conv_pid_guards() {
if (player_verb == conv054_exit_b_b) {
*conv_my_next_start = conv054_restart;
you_trig_flag = true;
- me_trig_flag = true;
conv_abort();
kernel_abort_animation(aa[2]);
@@ -2013,13 +1996,11 @@ static void process_conv_pid_guards() {
local->guard_right_action = UNHALT;
kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
player_walk(PLAYER_X_FROM_120, PLAYER_Y_FROM_120, FACING_WEST);
- /* player.walking = true; */
global[pre_room] = 201;
if (global[dragon_my_scene] < global[dragon_high_scene]) {
global[dragon_my_scene]++;
player.walk_off_edge_to_room = 111;
- /* local->cut_scene = true; */
} else {
player.walk_off_edge_to_room = 120;
}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room203.cpp b/engines/mads/madsv2/dragonsphere/rooms/room203.cpp
index b0a24bab938..ec7c618db6f 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room203.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room203.cpp
@@ -376,12 +376,10 @@ static void handle_anim_beard() {
static void process_conv_wise() {
int you_trig_flag = false;
- int me_trig_flag = false;
if (player_verb == conv049_polyquiz_b_b) {
conv_hold();
you_trig_flag = true;
- me_trig_flag = true;
local->wise_action = GIVE;
}
@@ -389,7 +387,6 @@ static void process_conv_wise() {
*conv_my_next_start = conv049_recheck;
conv_abort();
you_trig_flag = true;
- me_trig_flag = true;
player.commands_allowed = false;
player_walk(PLAYER_X_FROM_204, PLAYER_Y_FROM_204, FACING_EAST);
player_walk_trigger(ROOM_203_NEW_ROOM);
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room206.cpp b/engines/mads/madsv2/dragonsphere/rooms/room206.cpp
index ca1a1fdc5ab..9773f4c6000 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room206.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room206.cpp
@@ -568,7 +568,6 @@ static void room_206_pre_parser() {
static void process_conv_lady() {
int you_trig_flag = false;
- int me_trig_flag = false;
if (player_verb == conv053_thanks_only || player_verb == conv053_restart_only) {
global[perform_displacements] = true;
@@ -577,21 +576,18 @@ static void process_conv_lady() {
if (player_verb == conv053_story_b_b) {
conv_hold();
you_trig_flag = true;
- me_trig_flag = true;
local->lady_action = GET_UP;
}
if (player_verb == conv053_thanks_b_b) {
conv_hold();
you_trig_flag = true;
- me_trig_flag = true;
local->lady_action = SIT_DOWN;
}
if (player_verb == conv053_focus_b_b) {
conv_hold();
you_trig_flag = true;
- me_trig_flag = true;
local->lady_action = GIVE;
}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room605.cpp b/engines/mads/madsv2/dragonsphere/rooms/room605.cpp
index 93126f0a40d..396b461415f 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room605.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room605.cpp
@@ -638,7 +638,6 @@ static void room_605_parser() {
int was_rat_removed;
int are_any_inorganic;
int are_any_organic;
- int temp;
int stuff_still_here = false;
if (player_said_1(wave) ||
@@ -743,7 +742,6 @@ static void room_605_parser() {
}
if (kernel.trigger == ROOM_605_FLUID_LEFT) {
- temp = seq[fx_fluid_left];
seq[fx_fluid_left] = kernel_seq_pingpong(ss[fx_fluid_left], false, 7, 0, 0, 0);
kernel_seq_depth(seq[fx_fluid_left], 5);
kernel_seq_range(seq[fx_fluid_left], 16, KERNEL_LAST);
@@ -752,7 +750,6 @@ static void room_605_parser() {
}
if (kernel.trigger == ROOM_605_FLUID_RIGHT) {
- temp = seq[fx_fluid_right];
seq[fx_fluid_right] = kernel_seq_pingpong(ss[fx_fluid_right], false, 7, 0, 0, 0);
kernel_seq_depth(seq[fx_fluid_right], 5);
kernel_seq_range(seq[fx_fluid_right], 16, KERNEL_LAST);
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section1.cpp b/engines/mads/madsv2/dragonsphere/rooms/section1.cpp
index 1f82c0cff90..442250081ec 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section1.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section1.cpp
@@ -125,7 +125,6 @@ void section_1_walker() {
void section_1_interface() {
int interface;
- RGBcolor text_color = { 43, 29, 15 };
if (new_room == 116) {
interface = 2;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section2.cpp b/engines/mads/madsv2/dragonsphere/rooms/section2.cpp
index 6c8c9253e11..4e95df83aff 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section2.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section2.cpp
@@ -78,7 +78,6 @@ void section_2_walker() {
void section_2_interface() {
int interface = 9;
- RGBcolor text_color = { 43, 29, 15 };
Common::strcpy_s(kernel.interface, kernel_interface_name(interface));
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section3.cpp b/engines/mads/madsv2/dragonsphere/rooms/section3.cpp
index 90d60475292..76f04af47e2 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section3.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section3.cpp
@@ -77,8 +77,6 @@ void section_3_walker() {
}
void section_3_interface() {
- RGBcolor text_color = { 43, 29, 15 };
-
Common::strcpy_s(kernel.interface, kernel_interface_name(7));
pal_change_color(INTER_MESSAGE_COLOR, 56, 47, 32);
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section4.cpp b/engines/mads/madsv2/dragonsphere/rooms/section4.cpp
index 0801715b4c7..78748d9298d 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section4.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section4.cpp
@@ -91,8 +91,6 @@ void section_4_walker() {
}
void section_4_interface() {
- RGBcolor text_color = { 43, 29, 15 };
-
Common::strcpy_s(kernel.interface, kernel_interface_name(7));
pal_change_color(INTER_MESSAGE_COLOR, 56, 47, 32);
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section5.cpp b/engines/mads/madsv2/dragonsphere/rooms/section5.cpp
index 2727c6a2436..bc0ec30d352 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section5.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section5.cpp
@@ -87,8 +87,6 @@ void section_5_walker() {
}
void section_5_interface() {
- RGBcolor text_color = { 43, 29, 15 };
-
if (new_room >= 501 && new_room < 601) {
Common::strcpy_s(kernel.interface, kernel_interface_name(4));
} else {
diff --git a/engines/mads/madsv2/dragonsphere/rooms/section6.cpp b/engines/mads/madsv2/dragonsphere/rooms/section6.cpp
index 1b594965c62..4bd9058cde2 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/section6.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/section6.cpp
@@ -83,8 +83,6 @@ void section_6_walker() {
}
void section_6_interface() {
- RGBcolor text_color = { 43, 29, 15 };
-
Common::strcpy_s(kernel.interface, kernel_interface_name(6));
pal_change_color(INTER_MESSAGE_COLOR, 56, 47, 32);
}
More information about the Scummvm-git-logs
mailing list