Reorder includes

This commit is contained in:
Alexander Batalov 2022-09-15 12:38:23 +03:00
parent e5992779f3
commit 1b6e29acc0
101 changed files with 365 additions and 356 deletions

View File

@ -1,5 +1,8 @@
#include "actions.h" #include "actions.h"
#include <limits.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
@ -32,9 +35,6 @@
#include "tile.h" #include "tile.h"
#include "trait.h" #include "trait.h"
#include <limits.h>
#include <string.h>
#define MAX_KNOCKDOWN_DISTANCE 20 #define MAX_KNOCKDOWN_DISTANCE 20
typedef enum ScienceRepairTargetType { typedef enum ScienceRepairTargetType {

View File

@ -1,5 +1,8 @@
#include "animation.h" #include "animation.h"
#include <stdio.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "combat.h" #include "combat.h"
@ -28,9 +31,6 @@
#include "tile.h" #include "tile.h"
#include "trait.h" #include "trait.h"
#include <stdio.h>
#include <string.h>
#define ANIMATION_SEQUENCE_LIST_CAPACITY 32 #define ANIMATION_SEQUENCE_LIST_CAPACITY 32
#define ANIMATION_DESCRIPTION_LIST_CAPACITY 55 #define ANIMATION_DESCRIPTION_LIST_CAPACITY 55
#define ANIMATION_SAD_LIST_CAPACITY 24 #define ANIMATION_SAD_LIST_CAPACITY 24

View File

@ -1,5 +1,9 @@
#include "art.h" #include "art.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "debug.h" #include "debug.h"
#include "draw.h" #include "draw.h"
@ -10,10 +14,6 @@
#include "proto.h" #include "proto.h"
#include "sfall_config.h" #include "sfall_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct ArtListDescription { typedef struct ArtListDescription {
int flags; int flags;
char name[16]; char name[16];

View File

@ -1,15 +1,15 @@
#include "audio.h" #include "audio.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "db.h" #include "db.h"
#include "debug.h" #include "debug.h"
#include "memory_manager.h" #include "memory_manager.h"
#include "pointer_registry.h" #include "pointer_registry.h"
#include "sound.h" #include "sound.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
static bool _defaultCompressionFunc(char* filePath); static bool _defaultCompressionFunc(char* filePath);
static int audioSoundDecoderReadHandler(int fileHandle, void* buf, unsigned int size); static int audioSoundDecoderReadHandler(int fileHandle, void* buf, unsigned int size);

View File

@ -1,15 +1,15 @@
#include "audio_file.h" #include "audio_file.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "debug.h" #include "debug.h"
#include "memory_manager.h" #include "memory_manager.h"
#include "platform_compat.h" #include "platform_compat.h"
#include "pointer_registry.h" #include "pointer_registry.h"
#include "sound.h" #include "sound.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
static bool _defaultCompressionFunc__(char* filePath); static bool _defaultCompressionFunc__(char* filePath);
static int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size); static int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size);

View File

@ -1,5 +1,10 @@
#include "automap.h" #include "automap.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "config.h" #include "config.h"
@ -20,11 +25,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#define AUTOMAP_OFFSET_COUNT (AUTOMAP_MAP_COUNT * ELEVATION_COUNT) #define AUTOMAP_OFFSET_COUNT (AUTOMAP_MAP_COUNT * ELEVATION_COUNT)
#define AUTOMAP_WINDOW_WIDTH (519) #define AUTOMAP_WINDOW_WIDTH (519)

View File

@ -1,14 +1,14 @@
#include "cache.h" #include "cache.h"
#include "debug.h"
#include "memory.h"
#include "sound.h"
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "debug.h"
#include "memory.h"
#include "sound.h"
// The initial number of cache entries in new cache. // The initial number of cache entries in new cache.
#define CACHE_ENTRIES_INITIAL_CAPACITY (100) #define CACHE_ENTRIES_INITIAL_CAPACITY (100)

View File

@ -1,5 +1,12 @@
#include "character_editor.h" #include "character_editor.h"
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "combat.h" #include "combat.h"
@ -35,13 +42,6 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "worldmap.h" #include "worldmap.h"
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#define RENDER_ALL_STATS 7 #define RENDER_ALL_STATS 7
#define EDITOR_WINDOW_WIDTH 640 #define EDITOR_WINDOW_WIDTH 640

View File

@ -1,5 +1,11 @@
#include "character_selector.h" #include "character_selector.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include "art.h" #include "art.h"
#include "character_editor.h" #include "character_editor.h"
#include "color.h" #include "color.h"
@ -25,12 +31,6 @@
#include "trait.h" #include "trait.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
#define CS_WINDOW_WIDTH (640) #define CS_WINDOW_WIDTH (640)
#define CS_WINDOW_HEIGHT (480) #define CS_WINDOW_HEIGHT (480)

View File

@ -1,12 +1,12 @@
#include "color.h" #include "color.h"
#include "core.h"
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <algorithm> #include <algorithm>
#include "core.h"
#define COLOR_PALETTE_STACK_CAPACITY 16 #define COLOR_PALETTE_STACK_CAPACITY 16
typedef struct ColorPaletteStackEntry { typedef struct ColorPaletteStackEntry {

View File

@ -1,5 +1,9 @@
#include "combat.h" #include "combat.h"
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -39,10 +43,6 @@
#include "trait.h" #include "trait.h"
#include "window_manager.h" #include "window_manager.h"
#include <limits.h>
#include <stdio.h>
#include <string.h>
#define CALLED_SHOT_WINDOW_Y (20) #define CALLED_SHOT_WINDOW_Y (20)
#define CALLED_SHOT_WINDOW_WIDTH (504) #define CALLED_SHOT_WINDOW_WIDTH (504)
#define CALLED_SHOT_WINDOW_HEIGHT (309) #define CALLED_SHOT_WINDOW_HEIGHT (309)

View File

@ -1,5 +1,9 @@
#include "combat_ai.h" #include "combat_ai.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -30,10 +34,6 @@
#include "text_object.h" #include "text_object.h"
#include "tile.h" #include "tile.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define AI_PACKET_CHEM_PRIMARY_DESIRE_COUNT (3) #define AI_PACKET_CHEM_PRIMARY_DESIRE_COUNT (3)
typedef struct AiMessageRange { typedef struct AiMessageRange {

View File

@ -1,9 +1,5 @@
#include "config.h" #include "config.h"
#include "db.h"
#include "memory.h"
#include "platform_compat.h"
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
@ -11,6 +7,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "db.h"
#include "memory.h"
#include "platform_compat.h"
#define CONFIG_FILE_MAX_LINE_LENGTH (256) #define CONFIG_FILE_MAX_LINE_LENGTH (256)
// The initial number of sections (or key-value) pairs in the config. // The initial number of sections (or key-value) pairs in the config.

View File

@ -1,5 +1,10 @@
#include "core.h" #include "core.h"
#include <limits.h>
#include <string.h>
#include <SDL.h>
#include "audio_engine.h" #include "audio_engine.h"
#include "color.h" #include "color.h"
#include "config.h" #include "config.h"
@ -13,10 +18,6 @@
#include "window_manager.h" #include "window_manager.h"
#include "window_manager_private.h" #include "window_manager_private.h"
#include <SDL.h>
#include <limits.h>
#include <string.h>
static void idleImpl(); static void idleImpl();
// 0x51E234 // 0x51E234

View File

@ -1,13 +1,13 @@
#ifndef CORE_H #ifndef CORE_H
#define CORE_H #define CORE_H
#include <SDL.h>
#include "db.h" #include "db.h"
#include "dinput.h" #include "dinput.h"
#include "geometry.h" #include "geometry.h"
#include "window.h" #include "window.h"
#include <SDL.h>
#define MOUSE_DEFAULT_CURSOR_WIDTH 8 #define MOUSE_DEFAULT_CURSOR_WIDTH 8
#define MOUSE_DEFAULT_CURSOR_HEIGHT 8 #define MOUSE_DEFAULT_CURSOR_HEIGHT 8
#define MOUSE_DEFAULT_CURSOR_SIZE (MOUSE_DEFAULT_CURSOR_WIDTH * MOUSE_DEFAULT_CURSOR_HEIGHT) #define MOUSE_DEFAULT_CURSOR_SIZE (MOUSE_DEFAULT_CURSOR_WIDTH * MOUSE_DEFAULT_CURSOR_HEIGHT)

View File

@ -1,5 +1,7 @@
#include "credits.h" #include "credits.h"
#include <string.h>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
@ -16,8 +18,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <string.h>
#define CREDITS_WINDOW_WIDTH (640) #define CREDITS_WINDOW_WIDTH (640)
#define CREDITS_WINDOW_HEIGHT (480) #define CREDITS_WINDOW_HEIGHT (480)
#define CREDITS_WINDOW_SCROLLING_DELAY (38) #define CREDITS_WINDOW_SCROLLING_DELAY (38)

View File

@ -1,5 +1,8 @@
#include "critter.h" #include "critter.h"
#include <stdio.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "character_editor.h" #include "character_editor.h"
@ -28,9 +31,6 @@
#include "trait.h" #include "trait.h"
#include "worldmap.h" #include "worldmap.h"
#include <stdio.h>
#include <string.h>
// Maximum length of dude's name length. // Maximum length of dude's name length.
#define DUDE_NAME_MAX_LENGTH (32) #define DUDE_NAME_MAX_LENGTH (32)

View File

@ -1,12 +1,12 @@
#include "db.h" #include "db.h"
#include "platform_compat.h"
#include "xfile.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "platform_compat.h"
#include "xfile.h"
typedef struct FileList { typedef struct FileList {
XList xlist; XList xlist;
struct FileList* next; struct FileList* next;

View File

@ -1,11 +1,11 @@
#ifndef DB_H #ifndef DB_H
#define DB_H #define DB_H
#include <stddef.h>
#include "memory_defs.h" #include "memory_defs.h"
#include "xfile.h" #include "xfile.h"
#include <stddef.h>
typedef XFile File; typedef XFile File;
typedef void FileReadProgressHandler(); typedef void FileReadProgressHandler();
typedef char* StrdupProc(const char* string); typedef char* StrdupProc(const char* string);

View File

@ -1,5 +1,10 @@
#include "dbox.h" #include "dbox.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "character_editor.h" #include "character_editor.h"
#include "color.h" #include "color.h"
@ -14,11 +19,6 @@
#include "window_manager.h" #include "window_manager.h"
#include "word_wrap.h" #include "word_wrap.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#define FILE_DIALOG_LINE_COUNT 12 #define FILE_DIALOG_LINE_COUNT 12
#define FILE_DIALOG_DOUBLE_CLICK_DELAY 32 #define FILE_DIALOG_DOUBLE_CLICK_DELAY 32

View File

@ -1,9 +1,5 @@
#include "debug.h" #include "debug.h"
#include "memory.h"
#include "platform_compat.h"
#include "window_manager_private.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -14,6 +10,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
#include "memory.h"
#include "platform_compat.h"
#include "window_manager_private.h"
static int _debug_puts(char* string); static int _debug_puts(char* string);
static void _debug_clear(); static void _debug_clear();
static int _debug_mono(char* string); static int _debug_mono(char* string);

View File

@ -1,14 +1,14 @@
#include "dfile.h" #include "dfile.h"
#include "platform_compat.h"
#include <fpattern.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <fpattern.h>
#include "platform_compat.h"
// The size of decompression buffer for reading compressed [DFile]s. // The size of decompression buffer for reading compressed [DFile]s.
#define DFILE_DECOMPRESSION_BUFFER_SIZE (0x400) #define DFILE_DECOMPRESSION_BUFFER_SIZE (0x400)

View File

@ -1,11 +1,12 @@
#ifndef DFILE_H #ifndef DFILE_H
#define DFILE_H #define DFILE_H
#include "platform_compat.h"
#include <stdio.h> #include <stdio.h>
#include <zlib.h> #include <zlib.h>
#include "platform_compat.h"
typedef struct DBase DBase; typedef struct DBase DBase;
typedef struct DBaseEntry DBaseEntry; typedef struct DBaseEntry DBaseEntry;
typedef struct DFile DFile; typedef struct DFile DFile;

View File

@ -1,5 +1,7 @@
#include "dialog.h" #include "dialog.h"
#include <string.h>
#include "core.h" #include "core.h"
#include "memory_manager.h" #include "memory_manager.h"
#include "movie.h" #include "movie.h"
@ -7,8 +9,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <string.h>
// 0x501623 // 0x501623
const float flt_501623 = 31.0; const float flt_501623 = 31.0;

View File

@ -1,11 +1,11 @@
#include "dictionary.h" #include "dictionary.h"
#include "platform_compat.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "platform_compat.h"
// NOTE: I guess this marker is used as a type discriminator for implementing // NOTE: I guess this marker is used as a type discriminator for implementing
// nested dictionaries. That's why every dictionary-related function starts // nested dictionaries. That's why every dictionary-related function starts
// with a check for this value. // with a check for this value.

View File

@ -1,10 +1,10 @@
#ifndef DICTIONARY_H #ifndef DICTIONARY_H
#define DICTIONARY_H #define DICTIONARY_H
#include "memory_defs.h"
#include <stdio.h> #include <stdio.h>
#include "memory_defs.h"
typedef int(DictionaryReadProc)(FILE* stream, void* buffer, unsigned int size, int a4); typedef int(DictionaryReadProc)(FILE* stream, void* buffer, unsigned int size, int a4);
typedef int(DictionaryWriteProc)(FILE* stream, void* buffer, unsigned int size, int a4); typedef int(DictionaryWriteProc)(FILE* stream, void* buffer, unsigned int size, int a4);

View File

@ -1,5 +1,9 @@
#include "display_monitor.h" #include "display_monitor.h"
#include <string.h>
#include <fstream>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "combat.h" #include "combat.h"
@ -14,10 +18,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <string.h>
#include <fstream>
// The maximum number of lines display monitor can hold. Once this value // The maximum number of lines display monitor can hold. Once this value
// is reached earlier messages are thrown away. // is reached earlier messages are thrown away.
#define DISPLAY_MONITOR_LINES_CAPACITY (100) #define DISPLAY_MONITOR_LINES_CAPACITY (100)

View File

@ -1,11 +1,11 @@
#include "draw.h" #include "draw.h"
#include <string.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "mmx.h" #include "mmx.h"
#include <string.h>
// 0x4D2FC0 // 0x4D2FC0
void bufferDrawLine(unsigned char* buf, int pitch, int x1, int y1, int x2, int y2, int color) void bufferDrawLine(unsigned char* buf, int pitch, int x1, int y1, int x2, int y2, int color)
{ {

View File

@ -1,13 +1,13 @@
#include "electronic_registration.h" #include "electronic_registration.h"
#include "game_config.h"
#include "platform_compat.h"
#ifdef _WIN32 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif #endif
#include "game_config.h"
#include "platform_compat.h"
// 0x440DD0 // 0x440DD0
void runElectronicRegistration() void runElectronicRegistration()
{ {

View File

@ -1,5 +1,10 @@
#include "elevator.h" #include "elevator.h"
#include <ctype.h>
#include <string.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "core.h" #include "core.h"
#include "cycle.h" #include "cycle.h"
@ -15,11 +20,6 @@
#include "sfall_config.h" #include "sfall_config.h"
#include "window_manager.h" #include "window_manager.h"
#include <ctype.h>
#include <string.h>
#include <algorithm>
// The maximum number of elevator levels. // The maximum number of elevator levels.
#define ELEVATOR_LEVEL_MAX (4) #define ELEVATOR_LEVEL_MAX (4)

View File

@ -1,5 +1,11 @@
#include "endgame.h" #include "endgame.h"
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
@ -27,12 +33,6 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "worldmap.h" #include "worldmap.h"
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
// The maximum number of subtitle lines per slide. // The maximum number of subtitle lines per slide.
#define ENDGAME_ENDING_MAX_SUBTITLES (50) #define ENDGAME_ENDING_MAX_SUBTITLES (50)

View File

@ -1,12 +1,12 @@
#include "export.h" #include "export.h"
#include <ctype.h>
#include <string.h>
#include "interpreter_lib.h" #include "interpreter_lib.h"
#include "memory_manager.h" #include "memory_manager.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <ctype.h>
#include <string.h>
typedef struct ExternalVariable { typedef struct ExternalVariable {
char name[32]; char name[32];
char* programName; char* programName;

View File

@ -1,10 +1,10 @@
#include "file_find.h" #include "file_find.h"
#include <fpattern.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <fpattern.h>
// 0x4E6380 // 0x4E6380
bool fileFindFirst(const char* path, DirectoryFileFindData* findData) bool fileFindFirst(const char* path, DirectoryFileFindData* findData)
{ {

View File

@ -1,8 +1,6 @@
#ifndef FILE_FIND_H #ifndef FILE_FIND_H
#define FILE_FIND_H #define FILE_FIND_H
#include "platform_compat.h"
#if defined(_WIN32) #if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#define NOMINMAX #define NOMINMAX
@ -11,6 +9,8 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
#include "platform_compat.h"
// NOTE: This structure is significantly different from what was in the // NOTE: This structure is significantly different from what was in the
// original code. Watcom provides opendir/readdir/closedir implementations, // original code. Watcom provides opendir/readdir/closedir implementations,
// that use Win32 FindFirstFile/FindNextFile under the hood, which in turn // that use Win32 FindFirstFile/FindNextFile under the hood, which in turn

View File

@ -2,7 +2,6 @@
// of regular __usercall. // of regular __usercall.
#include "file_utils.h" #include "file_utils.h"
#include "platform_compat.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -10,6 +9,8 @@
#include <vector> #include <vector>
#include "platform_compat.h"
static void fileCopy(const char* existingFilePath, const char* newFilePath); static void fileCopy(const char* existingFilePath, const char* newFilePath);
// 0x452740 // 0x452740

View File

@ -1,12 +1,12 @@
#include "font_manager.h" #include "font_manager.h"
#include <stdio.h>
#include <string.h>
#include "color.h" #include "color.h"
#include "db.h" #include "db.h"
#include "memory_manager.h" #include "memory_manager.h"
#include <stdio.h>
#include <string.h>
// The maximum number of interface fonts. // The maximum number of interface fonts.
#define INTERFACE_FONT_MAX (16) #define INTERFACE_FONT_MAX (16)

View File

@ -1,5 +1,14 @@
#include "game.h" #include "game.h"
#include <stdio.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h> // access
#endif
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -57,15 +66,6 @@
#include "window_manager.h" #include "window_manager.h"
#include "worldmap.h" #include "worldmap.h"
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h> // access
#endif
#include <stdio.h>
#include <string.h>
#define HELP_SCREEN_WIDTH (640) #define HELP_SCREEN_WIDTH (640)
#define HELP_SCREEN_HEIGHT (480) #define HELP_SCREEN_HEIGHT (480)

View File

@ -1,11 +1,11 @@
#include "game_config.h" #include "game_config.h"
#include "main.h"
#include "platform_compat.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "main.h"
#include "platform_compat.h"
// A flag indicating if [gGameConfig] was initialized. // A flag indicating if [gGameConfig] was initialized.
// //
// 0x5186D0 // 0x5186D0

View File

@ -1,5 +1,9 @@
#include "game_dialog.h" #include "game_dialog.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -34,10 +38,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#define DIALOG_REVIEW_ENTRIES_CAPACITY 80 #define DIALOG_REVIEW_ENTRIES_CAPACITY 80
#define DIALOG_OPTION_ENTRIES_CAPACITY 30 #define DIALOG_OPTION_ENTRIES_CAPACITY 30

View File

@ -1,5 +1,9 @@
#include "game_mouse.h" #include "game_mouse.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -23,10 +27,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
typedef enum ScrollableDirections { typedef enum ScrollableDirections {
SCROLLABLE_W = 0x01, SCROLLABLE_W = 0x01,
SCROLLABLE_E = 0x02, SCROLLABLE_E = 0x02,

View File

@ -1,5 +1,8 @@
#include "game_movie.h" #include "game_movie.h"
#include <stdio.h>
#include <string.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "cycle.h" #include "cycle.h"
@ -15,9 +18,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
#define GAME_MOVIE_WINDOW_WIDTH 640 #define GAME_MOVIE_WINDOW_WIDTH 640
#define GAME_MOVIE_WINDOW_HEIGHT 480 #define GAME_MOVIE_WINDOW_HEIGHT 480

View File

@ -1,5 +1,8 @@
#include "game_sound.h" #include "game_sound.h"
#include <stdio.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "audio.h" #include "audio.h"
@ -21,9 +24,6 @@
#include "window_manager.h" #include "window_manager.h"
#include "worldmap.h" #include "worldmap.h"
#include <stdio.h>
#include <string.h>
typedef enum SoundEffectActionType { typedef enum SoundEffectActionType {
SOUND_EFFECT_ACTION_TYPE_ACTIVE, SOUND_EFFECT_ACTION_TYPE_ACTIVE,
SOUND_EFFECT_ACTION_TYPE_PASSIVE, SOUND_EFFECT_ACTION_TYPE_PASSIVE,

View File

@ -1,9 +1,10 @@
#include "geometry.h" #include "geometry.h"
#include "memory.h" #include <stdlib.h>
#include <algorithm> #include <algorithm>
#include <stdlib.h>
#include "memory.h"
// 0x51DEF4 // 0x51DEF4
static RectListNode* _rectList = NULL; static RectListNode* _rectList = NULL;

View File

@ -1,10 +1,10 @@
#include "graph_lib.h" #include "graph_lib.h"
#include <string.h>
#include "debug.h" #include "debug.h"
#include "memory.h" #include "memory.h"
#include <string.h>
static void _InitTree(); static void _InitTree();
static void _InsertNode(int a1); static void _InsertNode(int a1);
static void _DeleteNode(int a1); static void _DeleteNode(int a1);

View File

@ -1,9 +1,9 @@
#include "grayscale.h" #include "grayscale.h"
#include "color.h"
#include <algorithm> #include <algorithm>
#include "color.h"
// 0x596D90 // 0x596D90
static unsigned char _GreyTable[256]; static unsigned char _GreyTable[256];

View File

@ -1,12 +1,12 @@
#include "heap.h" #include "heap.h"
#include "debug.h"
#include "memory.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "debug.h"
#include "memory.h"
#define HEAP_BLOCK_HEADER_GUARD (0xDEADC0DE) #define HEAP_BLOCK_HEADER_GUARD (0xDEADC0DE)
#define HEAP_BLOCK_FOOTER_GUARD (0xACDCACDC) #define HEAP_BLOCK_FOOTER_GUARD (0xACDCACDC)

View File

@ -1,5 +1,8 @@
#include "interface.h" #include "interface.h"
#include <stdio.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
@ -30,9 +33,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
// The width of connectors in the indicator box. // The width of connectors in the indicator box.
// //
// There are male connectors on the left, and female connectors on the right. // There are male connectors on the left, and female connectors on the right.

View File

@ -1,5 +1,12 @@
#include "interpreter.h" #include "interpreter.h"
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "core.h" #include "core.h"
#include "db.h" #include "db.h"
#include "debug.h" #include "debug.h"
@ -8,13 +15,6 @@
#include "memory_manager.h" #include "memory_manager.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct ProgramListNode { typedef struct ProgramListNode {
Program* program; Program* program;
struct ProgramListNode* next; // next struct ProgramListNode* next; // next

View File

@ -1,5 +1,9 @@
#include "interpreter_extra.h" #include "interpreter_extra.h"
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -40,10 +44,6 @@
#include "trait.h" #include "trait.h"
#include "worldmap.h" #include "worldmap.h"
#include <limits.h>
#include <stdio.h>
#include <string.h>
typedef enum ScriptError { typedef enum ScriptError {
SCRIPT_ERROR_NOT_IMPLEMENTED, SCRIPT_ERROR_NOT_IMPLEMENTED,
SCRIPT_ERROR_OBJECT_IS_NULL, SCRIPT_ERROR_OBJECT_IS_NULL,

View File

@ -1,5 +1,11 @@
#include "inventory.h" #include "inventory.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -37,12 +43,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#define INVENTORY_WINDOW_X 80 #define INVENTORY_WINDOW_X 80
#define INVENTORY_WINDOW_Y 0 #define INVENTORY_WINDOW_Y 0

View File

@ -1,5 +1,10 @@
#include "item.h" #include "item.h"
#include <string.h>
#include <algorithm>
#include <vector>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "automap.h" #include "automap.h"
@ -28,11 +33,6 @@
#include "tile.h" #include "tile.h"
#include "trait.h" #include "trait.h"
#include <string.h>
#include <algorithm>
#include <vector>
#define ADDICTION_COUNT (9) #define ADDICTION_COUNT (9)
// Max number of books that can be loaded from books.ini. This limit is imposed // Max number of books that can be loaded from books.ini. This limit is imposed

View File

@ -1,12 +1,12 @@
#include "light.h" #include "light.h"
#include <math.h>
#include "map_defs.h" #include "map_defs.h"
#include "object.h" #include "object.h"
#include "perk.h" #include "perk.h"
#include "tile.h" #include "tile.h"
#include <math.h>
// 20% of max light per "Night Vision" rank // 20% of max light per "Night Vision" rank
#define LIGHT_LEVEL_NIGHT_VISION_BONUS (65536 / 5) #define LIGHT_LEVEL_NIGHT_VISION_BONUS (65536 / 5)

View File

@ -1,5 +1,8 @@
#include "lips.h" #include "lips.h"
#include <stdio.h>
#include <string.h>
#include "audio.h" #include "audio.h"
#include "core.h" #include "core.h"
#include "db.h" #include "db.h"
@ -9,9 +12,6 @@
#include "platform_compat.h" #include "platform_compat.h"
#include "sound.h" #include "sound.h"
#include <stdio.h>
#include <string.h>
static char* _lips_fix_string(const char* fileName, size_t length); static char* _lips_fix_string(const char* fileName, size_t length);
static int lipsReadV1(LipsData* a1, File* stream); static int lipsReadV1(LipsData* a1, File* stream);
static int _lips_make_speech(); static int _lips_make_speech();

View File

@ -1,10 +1,10 @@
#ifndef LIPS_H #ifndef LIPS_H
#define LIPS_H #define LIPS_H
#include "sound.h"
#include <stddef.h> #include <stddef.h>
#include "sound.h"
#define PHONEME_COUNT (42) #define PHONEME_COUNT (42)
typedef enum LipsFlags { typedef enum LipsFlags {

View File

@ -1,5 +1,12 @@
#include "loadsave.h" #include "loadsave.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "automap.h" #include "automap.h"
#include "character_editor.h" #include "character_editor.h"
@ -46,13 +53,6 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "worldmap.h" #include "worldmap.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#define LS_WINDOW_WIDTH 640 #define LS_WINDOW_WIDTH 640
#define LS_WINDOW_HEIGHT 480 #define LS_WINDOW_HEIGHT 480

View File

@ -1,5 +1,9 @@
#include "main.h" #include "main.h"
#include <ctype.h>
#include <limits.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "autorun.h" #include "autorun.h"
#include "character_selector.h" #include "character_selector.h"
@ -36,10 +40,6 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "worldmap.h" #include "worldmap.h"
#include <ctype.h>
#include <limits.h>
#include <string.h>
#define MAIN_MENU_WINDOW_WIDTH 640 #define MAIN_MENU_WINDOW_WIDTH 640
#define MAIN_MENU_WINDOW_HEIGHT 480 #define MAIN_MENU_WINDOW_HEIGHT 480

View File

@ -1,5 +1,8 @@
#include "map.h" #include "map.h"
#include <stdio.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "automap.h" #include "automap.h"
@ -37,9 +40,6 @@
#include "window_manager_private.h" #include "window_manager_private.h"
#include "worldmap.h" #include "worldmap.h"
#include <stdio.h>
#include <string.h>
static char* mapBuildPath(char* name); static char* mapBuildPath(char* name);
static int mapLoad(File* stream); static int mapLoad(File* stream);
static int _map_age_dead_critters(); static int _map_age_dead_critters();

View File

@ -1,11 +1,11 @@
#include "memory.h" #include "memory.h"
#include "debug.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "debug.h"
// A special value that denotes a beginning of a memory block data. // A special value that denotes a beginning of a memory block data.
#define MEMORY_BLOCK_HEADER_GUARD (0xFEEDFACE) #define MEMORY_BLOCK_HEADER_GUARD (0xFEEDFACE)

View File

@ -1,5 +1,10 @@
#include "message.h" #include "message.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "debug.h" #include "debug.h"
#include "game_config.h" #include "game_config.h"
#include "memory.h" #include "memory.h"
@ -8,11 +13,6 @@
#include "random.h" #include "random.h"
#include "sfall_config.h" #include "sfall_config.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BADWORD_LENGTH_MAX 80 #define BADWORD_LENGTH_MAX 80
static bool _message_find(MessageList* msg, int num, int* out_index); static bool _message_find(MessageList* msg, int num, int* out_index);

View File

@ -1,9 +1,9 @@
#include "mmx.h" #include "mmx.h"
#include "core.h"
#include <string.h> #include <string.h>
#include "core.h"
// Return `true` if CPU supports MMX. // Return `true` if CPU supports MMX.
// //
// 0x4E08A0 // 0x4E08A0

View File

@ -1,5 +1,7 @@
#include "mouse_manager.h" #include "mouse_manager.h"
#include <string.h>
#include "core.h" #include "core.h"
#include "datafile.h" #include "datafile.h"
#include "db.h" #include "db.h"
@ -7,8 +9,6 @@
#include "memory_manager.h" #include "memory_manager.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <string.h>
// 0x5195A8 // 0x5195A8
MouseManagerNameMangler* gMouseManagerNameMangler = mouseManagerNameManglerDefaultImpl; MouseManagerNameMangler* gMouseManagerNameMangler = mouseManagerNameManglerDefaultImpl;

View File

@ -1,5 +1,9 @@
#include "movie.h" #include "movie.h"
#include <string.h>
#include <SDL.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "db.h" #include "db.h"
@ -17,10 +21,6 @@
#include "window.h" #include "window.h"
#include "window_manager.h" #include "window_manager.h"
#include <string.h>
#include <SDL.h>
typedef struct MovieSubtitleListNode { typedef struct MovieSubtitleListNode {
int num; int num;
char* text; char* text;

View File

@ -1,5 +1,9 @@
#include "movie_effect.h" #include "movie_effect.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h" #include "config.h"
#include "debug.h" #include "debug.h"
#include "memory.h" #include "memory.h"
@ -7,10 +11,6 @@
#include "palette.h" #include "palette.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef enum MovieEffectType { typedef enum MovieEffectType {
MOVIE_EFFECT_TYPE_NONE = 0, MOVIE_EFFECT_TYPE_NONE = 0,
MOVIE_EFFECT_TYPE_FADE_IN = 1, MOVIE_EFFECT_TYPE_FADE_IN = 1,

View File

@ -4,13 +4,13 @@
#include "movie_lib.h" #include "movie_lib.h"
#include "audio_engine.h"
#include "platform_compat.h"
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "audio_engine.h"
#include "platform_compat.h"
typedef struct STRUCT_6B3690 { typedef struct STRUCT_6B3690 {
void* field_0; void* field_0;
unsigned int field_4; unsigned int field_4;

View File

@ -1,10 +1,10 @@
#ifndef MOVIE_LIB_H #ifndef MOVIE_LIB_H
#define MOVIE_LIB_H #define MOVIE_LIB_H
#include "memory_defs.h"
#include <SDL.h> #include <SDL.h>
#include "memory_defs.h"
typedef bool MovieReadProc(int fileHandle, void* buffer, int count); typedef bool MovieReadProc(int fileHandle, void* buffer, int count);
typedef void(MovieShowFrameProc)(SDL_Surface*, int, int, int, int, int, int, int, int); typedef void(MovieShowFrameProc)(SDL_Surface*, int, int, int, int, int, int, int, int);

View File

@ -1,13 +1,13 @@
#include "nevs.h" #include "nevs.h"
#include <stdlib.h>
#include <string.h>
#include "debug.h" #include "debug.h"
#include "interpreter_lib.h" #include "interpreter_lib.h"
#include "memory_manager.h" #include "memory_manager.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <stdlib.h>
#include <string.h>
#define NEVS_COUNT 40 #define NEVS_COUNT 40
typedef struct Nevs { typedef struct Nevs {

View File

@ -1,5 +1,8 @@
#include "object.h" #include "object.h"
#include <assert.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
@ -23,9 +26,6 @@
#include "tile.h" #include "tile.h"
#include "worldmap.h" #include "worldmap.h"
#include <assert.h>
#include <string.h>
static int objectLoadAllInternal(File* stream); static int objectLoadAllInternal(File* stream);
static void _obj_fix_combat_cid_for_dude(); static void _obj_fix_combat_cid_for_dude();
static void _object_fix_weapon_ammo(Object* obj); static void _object_fix_weapon_ammo(Object* obj);

View File

@ -1,5 +1,11 @@
#include "options.h" #include "options.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "combat.h" #include "combat.h"
@ -24,12 +30,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#define PREFERENCES_WINDOW_WIDTH 640 #define PREFERENCES_WINDOW_WIDTH 640
#define PREFERENCES_WINDOW_HEIGHT 480 #define PREFERENCES_WINDOW_HEIGHT 480

View File

@ -1,13 +1,13 @@
#include "palette.h" #include "palette.h"
#include <string.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "cycle.h" #include "cycle.h"
#include "debug.h" #include "debug.h"
#include "game_sound.h" #include "game_sound.h"
#include <string.h>
static void _palette_reset_(); static void _palette_reset_();
// 0x6639D0 // 0x6639D0

View File

@ -1,5 +1,9 @@
#include "party_member.h" #include "party_member.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "color.h" #include "color.h"
#include "combat_ai.h" #include "combat_ai.h"
@ -28,10 +32,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct PartyMemberDescription { typedef struct PartyMemberDescription {
bool areaAttackMode[AREA_ATTACK_MODE_COUNT]; bool areaAttackMode[AREA_ATTACK_MODE_COUNT];
bool runAwayMode[RUN_AWAY_MODE_COUNT]; bool runAwayMode[RUN_AWAY_MODE_COUNT];

View File

@ -1,5 +1,7 @@
#include "perk.h" #include "perk.h"
#include <stdio.h>
#include "debug.h" #include "debug.h"
#include "game.h" #include "game.h"
#include "game_config.h" #include "game_config.h"
@ -11,8 +13,6 @@
#include "skill.h" #include "skill.h"
#include "stat.h" #include "stat.h"
#include <stdio.h>
typedef struct PerkDescription { typedef struct PerkDescription {
char* name; char* name;
char* description; char* description;

View File

@ -1,5 +1,9 @@
#include "pipboy.h" #include "pipboy.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "automap.h" #include "automap.h"
#include "color.h" #include "color.h"
@ -33,10 +37,6 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "worldmap.h" #include "worldmap.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#define PIPBOY_WINDOW_WIDTH (640) #define PIPBOY_WINDOW_WIDTH (640)
#define PIPBOY_WINDOW_HEIGHT (480) #define PIPBOY_WINDOW_HEIGHT (480)

View File

@ -1,6 +1,5 @@
#include "platform_compat.h" #include "platform_compat.h"
#include <SDL.h>
#include <string.h> #include <string.h>
#ifdef _WIN32 #ifdef _WIN32
@ -25,6 +24,8 @@
#include <chrono> #include <chrono>
#endif #endif
#include <SDL.h>
int compat_stricmp(const char* string1, const char* string2) int compat_stricmp(const char* string1, const char* string2)
{ {
return SDL_strcasecmp(string1, string2); return SDL_strcasecmp(string1, string2);

View File

@ -1,5 +1,8 @@
#include "proto.h" #include "proto.h"
#include <stdio.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "character_editor.h" #include "character_editor.h"
#include "combat.h" #include "combat.h"
@ -19,9 +22,6 @@
#include "stat.h" #include "stat.h"
#include "trait.h" #include "trait.h"
#include <stdio.h>
#include <string.h>
static int _proto_critter_init(Proto* a1, int a2); static int _proto_critter_init(Proto* a1, int a2);
static int objectCritterCombatDataRead(CritterCombatData* data, File* stream); static int objectCritterCombatDataRead(CritterCombatData* data, File* stream);
static int objectCritterCombatDataWrite(CritterCombatData* data, File* stream); static int objectCritterCombatDataWrite(CritterCombatData* data, File* stream);

View File

@ -1,5 +1,10 @@
#include "proto_instance.h" #include "proto_instance.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
@ -27,11 +32,6 @@
#include "tile.h" #include "tile.h"
#include "worldmap.h" #include "worldmap.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int _obj_remove_from_inven(Object* critter, Object* item); static int _obj_remove_from_inven(Object* critter, Object* item);
static int _obj_use_book(Object* item_obj); static int _obj_use_book(Object* item_obj);
static int _obj_use_flare(Object* critter_obj, Object* item_obj); static int _obj_use_flare(Object* critter_obj, Object* item_obj);

View File

@ -1,13 +1,13 @@
#include "random.h" #include "random.h"
#include <limits.h>
#include <stdlib.h>
#include "debug.h" #include "debug.h"
#include "platform_compat.h" #include "platform_compat.h"
#include "scripts.h" #include "scripts.h"
#include "sfall_config.h" #include "sfall_config.h"
#include <limits.h>
#include <stdlib.h>
static int _roll_reset_(); static int _roll_reset_();
static int randomTranslateRoll(int delta, int criticalSuccessModifier); static int randomTranslateRoll(int delta, int criticalSuccessModifier);
static int getRandom(int max); static int getRandom(int max);

View File

@ -1,11 +1,11 @@
#include "region.h" #include "region.h"
#include "debug.h"
#include "memory_manager.h"
#include <limits.h> #include <limits.h>
#include <string.h> #include <string.h>
#include "debug.h"
#include "memory_manager.h"
// 0x50D394 // 0x50D394
static char _aNull[] = "<null>"; static char _aNull[] = "<null>";

View File

@ -1,5 +1,10 @@
#include "scripts.h" #include "scripts.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "actions.h" #include "actions.h"
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
@ -30,11 +35,6 @@
#include "window_manager_private.h" #include "window_manager_private.h"
#include "worldmap.h" #include "worldmap.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define SCRIPT_LIST_EXTENT_SIZE 16 #define SCRIPT_LIST_EXTENT_SIZE 16
// SFALL: Increase number of message lists for scripted dialogs. // SFALL: Increase number of message lists for scripted dialogs.

View File

@ -1,10 +1,10 @@
#include "select_file_list.h" #include "select_file_list.h"
#include "db.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "db.h"
// 0x4AA250 // 0x4AA250
int _compare(const void* a1, const void* a2) int _compare(const void* a1, const void* a2)
{ {

View File

@ -1,13 +1,13 @@
#include "selfrun.h" #include "selfrun.h"
#include <stdlib.h>
#include "core.h" #include "core.h"
#include "db.h" #include "db.h"
#include "game.h" #include "game.h"
#include "game_config.h" #include "game_config.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <stdlib.h>
// 0x51C8D8 // 0x51C8D8
int gSelfrunState = SELFRUN_STATE_TURNED_OFF; int gSelfrunState = SELFRUN_STATE_TURNED_OFF;

View File

@ -1,10 +1,10 @@
#include "sfall_config.h" #include "sfall_config.h"
#include "platform_compat.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "platform_compat.h"
#define SFALL_CONFIG_FILE_NAME "ddraw.ini" #define SFALL_CONFIG_FILE_NAME "ddraw.ini"
bool gSfallConfigInitialized = false; bool gSfallConfigInitialized = false;

View File

@ -1,5 +1,9 @@
#include "skill.h" #include "skill.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "actions.h" #include "actions.h"
#include "color.h" #include "color.h"
#include "combat.h" #include "combat.h"
@ -23,10 +27,6 @@
#include "stat.h" #include "stat.h"
#include "trait.h" #include "trait.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SKILLS_MAX_USES_PER_DAY (3) #define SKILLS_MAX_USES_PER_DAY (3)
#define REPAIRABLE_DAMAGE_FLAGS_LENGTH (5) #define REPAIRABLE_DAMAGE_FLAGS_LENGTH (5)

View File

@ -1,5 +1,8 @@
#include "skilldex.h" #include "skilldex.h"
#include <stdio.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
@ -20,9 +23,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
#define SKILLDEX_WINDOW_RIGHT_MARGIN 4 #define SKILLDEX_WINDOW_RIGHT_MARGIN 4
#define SKILLDEX_WINDOW_BOTTOM_MARGIN 6 #define SKILLDEX_WINDOW_BOTTOM_MARGIN 6

View File

@ -1,8 +1,9 @@
#include "sound.h" #include "sound.h"
#include "audio_engine.h" #include <limits.h>
#include "debug.h" #include <math.h>
#include "platform_compat.h" #include <stdlib.h>
#include <string.h>
#ifdef _WIN32 #ifdef _WIN32
#include <io.h> #include <io.h>
@ -10,15 +11,15 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm> #include <algorithm>
#include <SDL.h> #include <SDL.h>
#include "audio_engine.h"
#include "debug.h"
#include "platform_compat.h"
#define SOUND_FLAG_SOUND_IS_DONE (0x01) #define SOUND_FLAG_SOUND_IS_DONE (0x01)
#define SOUND_FLAG_SOUND_IS_PLAYING (0x02) #define SOUND_FLAG_SOUND_IS_PLAYING (0x02)
#define SOUND_FLAG_SOUND_IS_FADING (0x04) #define SOUND_FLAG_SOUND_IS_FADING (0x04)

View File

@ -1,5 +1,11 @@
#include "sound_effects_cache.h" #include "sound_effects_cache.h"
#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cache.h" #include "cache.h"
#include "db.h" #include "db.h"
#include "game_config.h" #include "game_config.h"
@ -7,12 +13,6 @@
#include "sound_decoder.h" #include "sound_decoder.h"
#include "sound_effects_list.h" #include "sound_effects_list.h"
#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SOUND_EFFECTS_CACHE_MIN_SIZE (0x40000) #define SOUND_EFFECTS_CACHE_MIN_SIZE (0x40000)
typedef struct SoundEffect { typedef struct SoundEffect {

View File

@ -1,5 +1,10 @@
#include "sound_effects_list.h" #include "sound_effects_list.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "db.h" #include "db.h"
#include "debug.h" #include "debug.h"
#include "memory.h" #include "memory.h"
@ -7,11 +12,6 @@
#include "pointer_registry.h" #include "pointer_registry.h"
#include "sound_decoder.h" #include "sound_decoder.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct SoundEffectsListEntry { typedef struct SoundEffectsListEntry {
char* name; char* name;
int dataSize; int dataSize;

View File

@ -1,5 +1,9 @@
#include "stat.h" #include "stat.h"
#include <stdio.h>
#include <algorithm>
#include "art.h" #include "art.h"
#include "combat.h" #include "combat.h"
#include "core.h" #include "core.h"
@ -22,10 +26,6 @@
#include "tile.h" #include "tile.h"
#include "trait.h" #include "trait.h"
#include <stdio.h>
#include <algorithm>
// Provides metadata about stats. // Provides metadata about stats.
typedef struct StatDescription { typedef struct StatDescription {
char* name; char* name;

View File

@ -1,11 +1,11 @@
#include "string_parsers.h" #include "string_parsers.h"
#include "debug.h"
#include "platform_compat.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "debug.h"
#include "platform_compat.h"
// strParseInt // strParseInt
// 0x4AFD10 // 0x4AFD10
int strParseInt(char** stringPtr, int* valuePtr) int strParseInt(char** stringPtr, int* valuePtr)

View File

@ -1,13 +1,13 @@
#include "text_font.h" #include "text_font.h"
#include <stdio.h>
#include <string.h>
#include "color.h" #include "color.h"
#include "db.h" #include "db.h"
#include "memory.h" #include "memory.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <stdio.h>
#include <string.h>
// The maximum number of text fonts. // The maximum number of text fonts.
#define TEXT_FONT_MAX (10) #define TEXT_FONT_MAX (10)

View File

@ -1,5 +1,7 @@
#include "text_object.h" #include "text_object.h"
#include <string.h>
#include "core.h" #include "core.h"
#include "debug.h" #include "debug.h"
#include "draw.h" #include "draw.h"
@ -10,8 +12,6 @@
#include "tile.h" #include "tile.h"
#include "word_wrap.h" #include "word_wrap.h"
#include <string.h>
// The maximum number of text objects that can exist at the same time. // The maximum number of text objects that can exist at the same time.
#define TEXT_OBJECTS_MAX_COUNT (20) #define TEXT_OBJECTS_MAX_COUNT (20)

View File

@ -1,5 +1,9 @@
#include "tile.h" #include "tile.h"
#include <assert.h>
#include <math.h>
#include <string.h>
#include "art.h" #include "art.h"
#include "color.h" #include "color.h"
#include "config.h" #include "config.h"
@ -13,10 +17,6 @@
#include "object.h" #include "object.h"
#include "platform_compat.h" #include "platform_compat.h"
#include <assert.h>
#include <math.h>
#include <string.h>
typedef struct STRUCT_51D99C { typedef struct STRUCT_51D99C {
int field_0; int field_0;
int field_4; int field_4;

View File

@ -1,5 +1,7 @@
#include "trait.h" #include "trait.h"
#include <stdio.h>
#include "game.h" #include "game.h"
#include "message.h" #include "message.h"
#include "object.h" #include "object.h"
@ -7,8 +9,6 @@
#include "skill.h" #include "skill.h"
#include "stat.h" #include "stat.h"
#include <stdio.h>
// Provides metadata about traits. // Provides metadata about traits.
typedef struct TraitDescription { typedef struct TraitDescription {
// The name of trait. // The name of trait.

View File

@ -1,12 +1,13 @@
#include "win32.h" #include "win32.h"
#include <stdlib.h>
#include <SDL.h>
#include "core.h" #include "core.h"
#include "main.h" #include "main.h"
#include "window_manager.h" #include "window_manager.h"
#include <SDL.h>
#include <stdlib.h>
#ifdef _WIN32 #ifdef _WIN32
// 0x51E444 // 0x51E444
bool gProgramIsActive = false; bool gProgramIsActive = false;

View File

@ -1,5 +1,9 @@
#include "window.h" #include "window.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "datafile.h" #include "datafile.h"
@ -14,10 +18,6 @@
#include "widget.h" #include "widget.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MANAGED_WINDOW_COUNT (16) #define MANAGED_WINDOW_COUNT (16)
typedef struct ManagedButton { typedef struct ManagedButton {

View File

@ -1,5 +1,11 @@
#include "window_manager.h" #include "window_manager.h"
#include <string.h>
#include <algorithm>
#include <SDL.h>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "debug.h" #include "debug.h"
@ -11,11 +17,6 @@
#include "win32.h" #include "win32.h"
#include "window_manager_private.h" #include "window_manager_private.h"
#include <SDL.h>
#include <string.h>
#include <algorithm>
#define MAX_WINDOW_COUNT (50) #define MAX_WINDOW_COUNT (50)
// The maximum number of radio groups. // The maximum number of radio groups.

View File

@ -1,8 +1,6 @@
#ifndef WINDOW_MANAGER_H #ifndef WINDOW_MANAGER_H
#define WINDOW_MANAGER_H #define WINDOW_MANAGER_H
#include "geometry.h"
#include <stddef.h> #include <stddef.h>
#ifdef _WIN32 #ifdef _WIN32
@ -11,6 +9,8 @@
#include <windows.h> #include <windows.h>
#endif #endif
#include "geometry.h"
// The maximum number of buttons in one radio group. // The maximum number of buttons in one radio group.
#define RADIO_GROUP_BUTTON_LIST_CAPACITY (64) #define RADIO_GROUP_BUTTON_LIST_CAPACITY (64)

View File

@ -1,5 +1,10 @@
#include "window_manager_private.h" #include "window_manager_private.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "color.h" #include "color.h"
#include "core.h" #include "core.h"
#include "draw.h" #include "draw.h"
@ -7,11 +12,6 @@
#include "text_font.h" #include "text_font.h"
#include "window_manager.h" #include "window_manager.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
typedef struct STRUCT_6B2340 { typedef struct STRUCT_6B2340 {
int field_0; int field_0;
int field_4; int field_4;

View File

@ -1,11 +1,11 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "text_font.h"
#include <ctype.h> #include <ctype.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "text_font.h"
// 0x4BC6F0 // 0x4BC6F0
int wordWrap(const char* string, int width, short* breakpoints, short* breakpointsLengthPtr) int wordWrap(const char* string, int width, short* breakpoints, short* breakpointsLengthPtr)
{ {

View File

@ -1,5 +1,11 @@
#include "worldmap.h" #include "worldmap.h"
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "animation.h" #include "animation.h"
#include "art.h" #include "art.h"
#include "automap.h" #include "automap.h"
@ -37,12 +43,6 @@
#include "tile.h" #include "tile.h"
#include "window_manager.h" #include "window_manager.h"
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define CITY_NAME_SIZE (40) #define CITY_NAME_SIZE (40)
#define TILE_WALK_MASK_NAME_SIZE (40) #define TILE_WALK_MASK_NAME_SIZE (40)
#define ENTRANCE_LIST_CAPACITY (10) #define ENTRANCE_LIST_CAPACITY (10)

View File

@ -1,16 +1,17 @@
#include "xfile.h" #include "xfile.h"
#include "file_find.h"
#include <assert.h> #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32 #ifdef _WIN32
#include <direct.h> #include <direct.h>
#else #else
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <stdio.h>
#include <stdlib.h> #include "file_find.h"
#include <string.h>
typedef enum XFileEnumerationEntryType { typedef enum XFileEnumerationEntryType {
XFILE_ENUMERATION_ENTRY_TYPE_FILE, XFILE_ENUMERATION_ENTRY_TYPE_FILE,

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