Merge branch 'main' of https://github.com/alexbatalov/fallout2-ce
This commit is contained in:
commit
4a53e5c5ae
|
@ -2,9 +2,15 @@ cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||||
|
|
||||||
project(fallout2-ce LANGUAGES CXX)
|
set(EXECUTABLE_NAME fallout2-ce)
|
||||||
|
|
||||||
add_executable(fallout2-ce WIN32
|
project(${EXECUTABLE_NAME})
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS NO)
|
||||||
|
|
||||||
|
add_executable(${EXECUTABLE_NAME} WIN32
|
||||||
"src/actions.cc"
|
"src/actions.cc"
|
||||||
"src/actions.h"
|
"src/actions.h"
|
||||||
"src/animation.cc"
|
"src/animation.cc"
|
||||||
|
@ -226,22 +232,30 @@ add_executable(fallout2-ce WIN32
|
||||||
"src/xfile.h"
|
"src/xfile.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(fallout2-ce PUBLIC
|
target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||||
"src/fps_limiter.cc"
|
"src/fps_limiter.cc"
|
||||||
"src/fps_limiter.h"
|
"src/fps_limiter.h"
|
||||||
"src/sfall_config.cc"
|
"src/sfall_config.cc"
|
||||||
"src/sfall_config.h"
|
"src/sfall_config.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(fallout2-ce PUBLIC
|
target_compile_definitions(${EXECUTABLE_NAME} PUBLIC
|
||||||
_CRT_SECURE_NO_WARNINGS
|
_CRT_SECURE_NO_WARNINGS
|
||||||
_CRT_NONSTDC_NO_WARNINGS
|
_CRT_NONSTDC_NO_WARNINGS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(fallout2-ce
|
target_link_libraries(${EXECUTABLE_NAME}
|
||||||
winmm
|
winmm
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory("third_party/fpattern")
|
add_subdirectory("third_party/fpattern")
|
||||||
|
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
|
||||||
|
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})
|
||||||
|
|
||||||
add_subdirectory("third_party/zlib")
|
add_subdirectory("third_party/zlib")
|
||||||
|
target_link_libraries(${EXECUTABLE_NAME} ${ZLIB_LIBRARIES})
|
||||||
|
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||||
|
|
||||||
add_subdirectory("third_party/sdl2")
|
add_subdirectory("third_party/sdl2")
|
||||||
|
target_link_libraries(${EXECUTABLE_NAME} ${SDL2_LIBRARIES})
|
||||||
|
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "proto_types.h"
|
#include "proto_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
extern int _action_in_explode;
|
extern int _action_in_explode;
|
||||||
extern const int gNormalDeathAnimations[DAMAGE_TYPE_COUNT];
|
extern const int gNormalDeathAnimations[DAMAGE_TYPE_COUNT];
|
||||||
extern const int gMaximumBloodDeathAnimations[DAMAGE_TYPE_COUNT];
|
extern const int gMaximumBloodDeathAnimations[DAMAGE_TYPE_COUNT];
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
||||||
|
@ -196,8 +194,6 @@ typedef struct STRUCT_530014 {
|
||||||
};
|
};
|
||||||
} STRUCT_530014;
|
} STRUCT_530014;
|
||||||
|
|
||||||
static_assert(sizeof(STRUCT_530014) == 3240, "wrong size");
|
|
||||||
|
|
||||||
typedef Object* PathBuilderCallback(Object* object, int tile, int elevation);
|
typedef Object* PathBuilderCallback(Object* object, int tile, int elevation);
|
||||||
|
|
||||||
extern int _curr_sad;
|
extern int _curr_sad;
|
||||||
|
|
|
@ -80,8 +80,6 @@ typedef struct Art {
|
||||||
} Art;
|
} Art;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
static_assert(sizeof(Art) == 62, "wrong size");
|
|
||||||
|
|
||||||
typedef struct ArtFrame {
|
typedef struct ArtFrame {
|
||||||
short width;
|
short width;
|
||||||
short height;
|
short height;
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
static_assert(sizeof(AudioFile) == 28, "wrong size");
|
|
||||||
|
|
||||||
// 0x5108C0
|
// 0x5108C0
|
||||||
AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__;
|
AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "sound_decoder.h"
|
#include "sound_decoder.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum AudioFileFlags {
|
typedef enum AudioFileFlags {
|
||||||
AUDIO_FILE_IN_USE = 0x01,
|
AUDIO_FILE_IN_USE = 0x01,
|
||||||
AUDIO_FILE_COMPRESSED = 0x02,
|
AUDIO_FILE_COMPRESSED = 0x02,
|
||||||
|
|
|
@ -260,8 +260,6 @@ int _automapDisplayMap(int map)
|
||||||
void automapShow(bool isInGame, bool isUsingScanner)
|
void automapShow(bool isInGame, bool isUsingScanner)
|
||||||
{
|
{
|
||||||
int frmIds[AUTOMAP_FRM_COUNT];
|
int frmIds[AUTOMAP_FRM_COUNT];
|
||||||
|
|
||||||
static_assert(sizeof(frmIds) == sizeof(gAutomapFrmIds), "wrong size");
|
|
||||||
memcpy(frmIds, gAutomapFrmIds, sizeof(gAutomapFrmIds));
|
memcpy(frmIds, gAutomapFrmIds, sizeof(gAutomapFrmIds));
|
||||||
|
|
||||||
unsigned char* frmData[AUTOMAP_FRM_COUNT];
|
unsigned char* frmData[AUTOMAP_FRM_COUNT];
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "map_defs.h"
|
#include "map_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define AUTOMAP_DB ("AUTOMAP.DB")
|
#define AUTOMAP_DB ("AUTOMAP.DB")
|
||||||
#define AUTOMAP_TMP ("AUTOMAP.TMP")
|
#define AUTOMAP_TMP ("AUTOMAP.TMP")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef AUTORUN_H
|
#ifndef AUTORUN_H
|
||||||
#define AUTORUN_H
|
#define AUTORUN_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(CacheEntry) == 32, "wrong size");
|
|
||||||
static_assert(sizeof(Cache) == 84, "wrong size");
|
|
||||||
|
|
||||||
// 0x510938
|
// 0x510938
|
||||||
int _lock_sound_ticker = 0;
|
int _lock_sound_ticker = 0;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define INVALID_CACHE_ENTRY ((CacheEntry*)-1)
|
#define INVALID_CACHE_ENTRY ((CacheEntry*)-1)
|
||||||
|
|
||||||
// The initial number of cache entries in new cache.
|
// The initial number of cache entries in new cache.
|
||||||
|
|
|
@ -4477,7 +4477,6 @@ void _RestorePlayer()
|
||||||
char* _itostndn(int value, char* dest)
|
char* _itostndn(int value, char* dest)
|
||||||
{
|
{
|
||||||
int v16[7];
|
int v16[7];
|
||||||
static_assert(sizeof(v16) == sizeof(dword_431DD4), "wrong size");
|
|
||||||
memcpy(v16, dword_431DD4, sizeof(v16));
|
memcpy(v16, dword_431DD4, sizeof(v16));
|
||||||
|
|
||||||
char* savedDest = dest;
|
char* savedDest = dest;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "art.h"
|
#include "art.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define CS_WINDOW_WIDTH (640)
|
#define CS_WINDOW_WIDTH (640)
|
||||||
#define CS_WINDOW_HEIGHT (480)
|
#define CS_WINDOW_HEIGHT (480)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include "memory_defs.h"
|
#include "memory_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
typedef const char*(ColorFileNameManger)(const char*);
|
typedef const char*(ColorFileNameManger)(const char*);
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "party_member.h"
|
#include "party_member.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define AI_PACKET_CHEM_PRIMARY_DESIRE_COUNT (3)
|
#define AI_PACKET_CHEM_PRIMARY_DESIRE_COUNT (3)
|
||||||
|
|
||||||
typedef enum AiMessageType {
|
typedef enum AiMessageType {
|
||||||
|
|
|
@ -104,8 +104,6 @@ typedef struct STRUCT_664980 {
|
||||||
int field_24; // flags on defender
|
int field_24; // flags on defender
|
||||||
} STRUCT_664980;
|
} STRUCT_664980;
|
||||||
|
|
||||||
static_assert(sizeof(STRUCT_664980) == 40, "wrong size");
|
|
||||||
|
|
||||||
typedef struct Attack {
|
typedef struct Attack {
|
||||||
Object* attacker;
|
Object* attacker;
|
||||||
int hitMode;
|
int hitMode;
|
||||||
|
@ -130,8 +128,6 @@ typedef struct Attack {
|
||||||
int extrasKnockback[EXPLOSION_TARGET_COUNT];
|
int extrasKnockback[EXPLOSION_TARGET_COUNT];
|
||||||
} Attack;
|
} Attack;
|
||||||
|
|
||||||
static_assert(sizeof(Attack) == 184, "wrong size");
|
|
||||||
|
|
||||||
// Provides metadata about critical hit effect.
|
// Provides metadata about critical hit effect.
|
||||||
typedef struct CriticalHitDescription {
|
typedef struct CriticalHitDescription {
|
||||||
int damageMultiplier;
|
int damageMultiplier;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "dictionary.h"
|
#include "dictionary.h"
|
||||||
|
|
||||||
#include <stdbool.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.
|
||||||
|
|
12
src/core.cc
12
src/core.cc
|
@ -540,8 +540,7 @@ void tickersExecute()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning(suppress : 28159)
|
gTickerLastTimestamp = SDL_GetTicks();
|
||||||
gTickerLastTimestamp = GetTickCount();
|
|
||||||
|
|
||||||
TickerListNode* curr = gTickerListHead;
|
TickerListNode* curr = gTickerListHead;
|
||||||
TickerListNode** currPtr = &(gTickerListHead);
|
TickerListNode** currPtr = &(gTickerListHead);
|
||||||
|
@ -839,8 +838,7 @@ void screenshotHandlerConfigure(int keyCode, ScreenshotHandler* handler)
|
||||||
// 0x4C9370
|
// 0x4C9370
|
||||||
unsigned int _get_time()
|
unsigned int _get_time()
|
||||||
{
|
{
|
||||||
#pragma warning(suppress : 28159)
|
return SDL_GetTicks();
|
||||||
return GetTickCount();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x4C937C
|
// 0x4C937C
|
||||||
|
@ -865,8 +863,7 @@ void coreDelayProcessingEvents(unsigned int delay)
|
||||||
// 0x4C93B8
|
// 0x4C93B8
|
||||||
void coreDelay(unsigned int ms)
|
void coreDelay(unsigned int ms)
|
||||||
{
|
{
|
||||||
#pragma warning(suppress : 28159)
|
unsigned int start = SDL_GetTicks();
|
||||||
unsigned int start = GetTickCount();
|
|
||||||
unsigned int diff;
|
unsigned int diff;
|
||||||
do {
|
do {
|
||||||
// NOTE: Uninline
|
// NOTE: Uninline
|
||||||
|
@ -877,8 +874,7 @@ void coreDelay(unsigned int ms)
|
||||||
// 0x4C93E0
|
// 0x4C93E0
|
||||||
unsigned int getTicksSince(unsigned int start)
|
unsigned int getTicksSince(unsigned int start)
|
||||||
{
|
{
|
||||||
#pragma warning(suppress : 28159)
|
unsigned int end = SDL_GetTicks();
|
||||||
unsigned int end = GetTickCount();
|
|
||||||
|
|
||||||
// NOTE: Uninline.
|
// NOTE: Uninline.
|
||||||
return getTicksBetween(end, start);
|
return getTicksBetween(end, start);
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
@ -406,8 +404,6 @@ typedef struct STRUCT_51E2F0 {
|
||||||
};
|
};
|
||||||
} STRUCT_51E2F0;
|
} STRUCT_51E2F0;
|
||||||
|
|
||||||
static_assert(sizeof(STRUCT_51E2F0) == 24, "wrong size");
|
|
||||||
|
|
||||||
typedef struct LogicalKeyEntry {
|
typedef struct LogicalKeyEntry {
|
||||||
short field_0;
|
short field_0;
|
||||||
short unmodified;
|
short unmodified;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "proto_types.h"
|
#include "proto_types.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef CYCLE_H
|
#ifndef CYCLE_H
|
||||||
#define CYCLE_H
|
#define CYCLE_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define COLOR_CYCLE_PERIOD_1 (200U)
|
#define COLOR_CYCLE_PERIOD_1 (200U)
|
||||||
#define COLOR_CYCLE_PERIOD_2 (142U)
|
#define COLOR_CYCLE_PERIOD_2 (142U)
|
||||||
#define COLOR_CYCLE_PERIOD_3 (100U)
|
#define COLOR_CYCLE_PERIOD_3 (100U)
|
||||||
|
|
1
src/db.h
1
src/db.h
|
@ -4,7 +4,6 @@
|
||||||
#include "memory_defs.h"
|
#include "memory_defs.h"
|
||||||
#include "xfile.h"
|
#include "xfile.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
typedef XFile File;
|
typedef XFile File;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "dfile.h"
|
#include "dfile.h"
|
||||||
|
|
||||||
#include "fpattern.h"
|
#include <fpattern.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
@ -8,11 +8,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(DBase) == 20, "wrong size");
|
|
||||||
static_assert(sizeof(DBaseEntry) == 20, "wrong size");
|
|
||||||
static_assert(sizeof(DFile) == 44, "wrong size");
|
|
||||||
static_assert(sizeof(DFileFindData) == 524, "wrong size");
|
|
||||||
|
|
||||||
// Reads .DAT file contents.
|
// Reads .DAT file contents.
|
||||||
//
|
//
|
||||||
// 0x4E4F58
|
// 0x4E4F58
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "dictionary.h"
|
#include "dictionary.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// 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)
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
// 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)
|
||||||
|
|
||||||
|
#define ENDGAME_ENDING_WINDOW_WIDTH 640
|
||||||
|
#define ENDGAME_ENDING_WINDOW_HEIGHT 480
|
||||||
|
|
||||||
// 0x50B00C
|
// 0x50B00C
|
||||||
char _aEnglish_2[] = ENGLISH;
|
char _aEnglish_2[] = ENGLISH;
|
||||||
|
|
||||||
|
@ -270,7 +273,7 @@ void endgameEndingRenderPanningScene(int direction, const char* narratorFileName
|
||||||
int width = artGetWidth(background, 0, 0);
|
int width = artGetWidth(background, 0, 0);
|
||||||
int height = artGetHeight(background, 0, 0);
|
int height = artGetHeight(background, 0, 0);
|
||||||
unsigned char* backgroundData = artGetFrameData(background, 0, 0);
|
unsigned char* backgroundData = artGetFrameData(background, 0, 0);
|
||||||
bufferFill(gEndgameEndingSlideshowWindowBuffer, 640, 480, 640, _colorTable[0]);
|
bufferFill(gEndgameEndingSlideshowWindowBuffer, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, ENDGAME_ENDING_WINDOW_WIDTH, _colorTable[0]);
|
||||||
endgameEndingLoadPalette(6, 327);
|
endgameEndingLoadPalette(6, 327);
|
||||||
|
|
||||||
unsigned char palette[768];
|
unsigned char palette[768];
|
||||||
|
@ -312,7 +315,7 @@ void endgameEndingRenderPanningScene(int direction, const char* narratorFileName
|
||||||
|
|
||||||
// TODO: Complex math, setup scene in debugger.
|
// TODO: Complex math, setup scene in debugger.
|
||||||
if (getTicksSince(since) >= v9) {
|
if (getTicksSince(since) >= v9) {
|
||||||
blitBufferToBuffer(backgroundData + start, 640, 480, width, gEndgameEndingSlideshowWindowBuffer, 640);
|
blitBufferToBuffer(backgroundData + start, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, width, gEndgameEndingSlideshowWindowBuffer, ENDGAME_ENDING_WINDOW_WIDTH);
|
||||||
|
|
||||||
if (subtitlesLoaded) {
|
if (subtitlesLoaded) {
|
||||||
endgameEndingRefreshSubtitles();
|
endgameEndingRefreshSubtitles();
|
||||||
|
@ -371,7 +374,7 @@ void endgameEndingRenderPanningScene(int direction, const char* narratorFileName
|
||||||
artUnlock(backgroundHandle);
|
artUnlock(backgroundHandle);
|
||||||
|
|
||||||
paletteFadeTo(gPaletteBlack);
|
paletteFadeTo(gPaletteBlack);
|
||||||
bufferFill(gEndgameEndingSlideshowWindowBuffer, 640, 480, 640, _colorTable[0]);
|
bufferFill(gEndgameEndingSlideshowWindowBuffer, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, ENDGAME_ENDING_WINDOW_WIDTH, _colorTable[0]);
|
||||||
windowRefresh(gEndgameEndingSlideshowWindow);
|
windowRefresh(gEndgameEndingSlideshowWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +394,7 @@ void endgameEndingRenderStaticScene(int fid, const char* narratorFileName)
|
||||||
|
|
||||||
unsigned char* backgroundData = artGetFrameData(background, 0, 0);
|
unsigned char* backgroundData = artGetFrameData(background, 0, 0);
|
||||||
if (backgroundData != NULL) {
|
if (backgroundData != NULL) {
|
||||||
blitBufferToBuffer(backgroundData, 640, 480, 640, gEndgameEndingSlideshowWindowBuffer, 640);
|
blitBufferToBuffer(backgroundData, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, ENDGAME_ENDING_WINDOW_WIDTH, gEndgameEndingSlideshowWindowBuffer, ENDGAME_ENDING_WINDOW_WIDTH);
|
||||||
windowRefresh(gEndgameEndingSlideshowWindow);
|
windowRefresh(gEndgameEndingSlideshowWindow);
|
||||||
|
|
||||||
endgameEndingLoadPalette((fid & 0xF000000) >> 24, fid & 0xFFF);
|
endgameEndingLoadPalette((fid & 0xF000000) >> 24, fid & 0xFFF);
|
||||||
|
@ -434,7 +437,7 @@ void endgameEndingRenderStaticScene(int fid, const char* narratorFileName)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
blitBufferToBuffer(backgroundData, 640, 480, 640, gEndgameEndingSlideshowWindowBuffer, 640);
|
blitBufferToBuffer(backgroundData, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, ENDGAME_ENDING_WINDOW_WIDTH, gEndgameEndingSlideshowWindowBuffer, ENDGAME_ENDING_WINDOW_WIDTH);
|
||||||
endgameEndingRefreshSubtitles();
|
endgameEndingRefreshSubtitles();
|
||||||
windowRefresh(gEndgameEndingSlideshowWindow);
|
windowRefresh(gEndgameEndingSlideshowWindow);
|
||||||
soundContinueAll();
|
soundContinueAll();
|
||||||
|
@ -487,7 +490,9 @@ int endgameEndingSlideshowWindowInit()
|
||||||
|
|
||||||
paletteFadeTo(gPaletteBlack);
|
paletteFadeTo(gPaletteBlack);
|
||||||
|
|
||||||
gEndgameEndingSlideshowWindow = windowCreate(0, 0, 640, 480, _colorTable[0], 4);
|
int windowEndgameEndingX = (screenGetWidth() - ENDGAME_ENDING_WINDOW_WIDTH) / 2;
|
||||||
|
int windowEndgameEndingY = (screenGetHeight() - ENDGAME_ENDING_WINDOW_HEIGHT) / 2;
|
||||||
|
gEndgameEndingSlideshowWindow = windowCreate(windowEndgameEndingX, windowEndgameEndingY, ENDGAME_ENDING_WINDOW_WIDTH, ENDGAME_ENDING_WINDOW_HEIGHT, _colorTable[0], 4);
|
||||||
if (gEndgameEndingSlideshowWindow == -1) {
|
if (gEndgameEndingSlideshowWindow == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum EndgameDeathEndingReason {
|
typedef enum EndgameDeathEndingReason {
|
||||||
// Dude died.
|
// Dude died.
|
||||||
ENDGAME_DEATH_ENDING_REASON_DEATH = 0,
|
ENDGAME_DEATH_ENDING_REASON_DEATH = 0,
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef FILE_FIND_H
|
#ifndef FILE_FIND_H
|
||||||
#define FILE_FIND_H
|
#define FILE_FIND_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include "file_utils.h"
|
#include "file_utils.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "text_font.h"
|
#include "text_font.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// The maximum number of interface fonts.
|
// The maximum number of interface fonts.
|
||||||
#define INTERFACE_FONT_MAX (16)
|
#define INTERFACE_FONT_MAX (16)
|
||||||
|
|
||||||
|
|
|
@ -1055,7 +1055,9 @@ void showHelp()
|
||||||
bool colorCycleWasEnabled = colorCycleEnabled();
|
bool colorCycleWasEnabled = colorCycleEnabled();
|
||||||
colorCycleDisable();
|
colorCycleDisable();
|
||||||
|
|
||||||
int win = windowCreate(0, 0, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, 0, WINDOW_HIDDEN | WINDOW_FLAG_0x04);
|
int helpWindowX = (screenGetWidth() - HELP_SCREEN_WIDTH) / 2;
|
||||||
|
int helpWindowY = (screenGetHeight() - HELP_SCREEN_HEIGHT) / 2;
|
||||||
|
int win = windowCreate(helpWindowX, helpWindowY, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, 0, WINDOW_HIDDEN | WINDOW_FLAG_0x04);
|
||||||
if (win != -1) {
|
if (win != -1) {
|
||||||
unsigned char* windowBuffer = windowGetBuffer(win);
|
unsigned char* windowBuffer = windowGetBuffer(win);
|
||||||
if (windowBuffer != NULL) {
|
if (windowBuffer != NULL) {
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "game_vars.h"
|
#include "game_vars.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
extern char _aGame_0[];
|
extern char _aGame_0[];
|
||||||
|
|
||||||
extern bool gGameUiDisabled;
|
extern bool gGameUiDisabled;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// The file name of the main config file.
|
// The file name of the main config file.
|
||||||
#define GAME_CONFIG_FILE_NAME "fallout2.cfg"
|
#define GAME_CONFIG_FILE_NAME "fallout2.cfg"
|
||||||
|
|
||||||
|
|
|
@ -3410,7 +3410,6 @@ void gameDialogCombatControlButtonOnMouseUp(int btn, int keyCode)
|
||||||
int _gdPickAIUpdateMsg(Object* critter)
|
int _gdPickAIUpdateMsg(Object* critter)
|
||||||
{
|
{
|
||||||
int pids[3];
|
int pids[3];
|
||||||
static_assert(sizeof(pids) == sizeof(_Dogs), "wrong size");
|
|
||||||
memcpy(pids, _Dogs, sizeof(pids));
|
memcpy(pids, _Dogs, sizeof(pids));
|
||||||
|
|
||||||
for (int index = 0; index < 3; index++) {
|
for (int index = 0; index < 3; index++) {
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.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
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum ScrollableDirections {
|
typedef enum ScrollableDirections {
|
||||||
SCROLLABLE_W = 0x01,
|
SCROLLABLE_W = 0x01,
|
||||||
SCROLLABLE_E = 0x02,
|
SCROLLABLE_E = 0x02,
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "window_manager.h"
|
#include "window_manager.h"
|
||||||
#include "world_map.h"
|
#include "world_map.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(HeapBlockHeader) == 16, "wrong size");
|
|
||||||
static_assert(sizeof(HeapBlockFooter) == 4, "wrong size");
|
|
||||||
static_assert(sizeof(HeapMoveableExtent) == 16, "wrong size");
|
|
||||||
static_assert(sizeof(HeapHandle) == 8, "wrong size");
|
|
||||||
static_assert(sizeof(Heap) == 48, "wrong size");
|
|
||||||
|
|
||||||
// An array of pointers to free heap blocks.
|
// An array of pointers to free heap blocks.
|
||||||
//
|
//
|
||||||
// 0x518E9C
|
// 0x518E9C
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef HEAP_H
|
#ifndef HEAP_H
|
||||||
#define HEAP_H
|
#define HEAP_H
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum Hand {
|
typedef enum Hand {
|
||||||
// Item1 (Punch)
|
// Item1 (Punch)
|
||||||
HAND_LEFT,
|
HAND_LEFT,
|
||||||
|
|
|
@ -127,7 +127,7 @@ char* programGetCurrentProcedureName(Program* program)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x4671F0
|
// 0x4671F0
|
||||||
__declspec(noreturn) void programFatalError(const char* format, ...)
|
[[noreturn]] void programFatalError(const char* format, ...)
|
||||||
{
|
{
|
||||||
char string[260];
|
char string[260];
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#define INTERPRETER_H
|
#define INTERPRETER_H
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// The maximum number of opcodes.
|
// The maximum number of opcodes.
|
||||||
#define OPCODE_MAX_COUNT (342)
|
#define OPCODE_MAX_COUNT (342)
|
||||||
|
@ -190,7 +189,7 @@ int _checkWait(Program* program);
|
||||||
void _interpretOutputFunc(int (*func)(char*));
|
void _interpretOutputFunc(int (*func)(char*));
|
||||||
int _interpretOutput(const char* format, ...);
|
int _interpretOutput(const char* format, ...);
|
||||||
char* programGetCurrentProcedureName(Program* s);
|
char* programGetCurrentProcedureName(Program* s);
|
||||||
__declspec(noreturn) void programFatalError(const char* str, ...);
|
[[noreturn]] void programFatalError(const char* str, ...);
|
||||||
opcode_t stackReadInt16(unsigned char* data, int pos);
|
opcode_t stackReadInt16(unsigned char* data, int pos);
|
||||||
int stackReadInt32(unsigned char* a1, int a2);
|
int stackReadInt32(unsigned char* a1, int a2);
|
||||||
void stackWriteInt16(int value, unsigned char* a2, int a3);
|
void stackWriteInt16(int value, unsigned char* a2, int a3);
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.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,
|
||||||
|
|
|
@ -2198,11 +2198,9 @@ int objectGetCarriedQuantityByPid(Object* object, int pid)
|
||||||
void inventoryRenderSummary()
|
void inventoryRenderSummary()
|
||||||
{
|
{
|
||||||
int v56[7];
|
int v56[7];
|
||||||
static_assert(sizeof(v56) == sizeof(dword_46E6D0), "wrong size");
|
|
||||||
memcpy(v56, dword_46E6D0, sizeof(v56));
|
memcpy(v56, dword_46E6D0, sizeof(v56));
|
||||||
|
|
||||||
int v57[7];
|
int v57[7];
|
||||||
static_assert(sizeof(v57) == sizeof(dword_46E6EC), "wrong size");
|
|
||||||
memcpy(v57, dword_46E6EC, sizeof(v57));
|
memcpy(v57, dword_46E6EC, sizeof(v57));
|
||||||
|
|
||||||
char formattedText[80];
|
char formattedText[80];
|
||||||
|
@ -3278,7 +3276,6 @@ int inventoryOpenLooting(Object* a1, Object* a2)
|
||||||
CacheEntry* arrowFrmHandles[INVENTORY_ARROW_FRM_COUNT];
|
CacheEntry* arrowFrmHandles[INVENTORY_ARROW_FRM_COUNT];
|
||||||
MessageListItem messageListItem;
|
MessageListItem messageListItem;
|
||||||
|
|
||||||
static_assert(sizeof(arrowFrmIds) == sizeof(gInventoryArrowFrmIds), "wrong size");
|
|
||||||
memcpy(arrowFrmIds, gInventoryArrowFrmIds, sizeof(gInventoryArrowFrmIds));
|
memcpy(arrowFrmIds, gInventoryArrowFrmIds, sizeof(gInventoryArrowFrmIds));
|
||||||
|
|
||||||
if (a1 != _inven_dude) {
|
if (a1 != _inven_dude) {
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define INVENTORY_NORMAL_WINDOW_PC_ROTATION_DELAY (1000U / ROTATION_COUNT)
|
#define INVENTORY_NORMAL_WINDOW_PC_ROTATION_DELAY (1000U / ROTATION_COUNT)
|
||||||
#define OFF_59E7BC_COUNT 12
|
#define OFF_59E7BC_COUNT 12
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,6 @@ void _item_compact(int inventoryItemIndex, Inventory* inventory)
|
||||||
for (int index = inventoryItemIndex + 1; index < inventory->length; index++) {
|
for (int index = inventoryItemIndex + 1; index < inventory->length; index++) {
|
||||||
InventoryItem* prev = &(inventory->items[index - 1]);
|
InventoryItem* prev = &(inventory->items[index - 1]);
|
||||||
InventoryItem* curr = &(inventory->items[index]);
|
InventoryItem* curr = &(inventory->items[index]);
|
||||||
static_assert(sizeof(*prev) == sizeof(*curr), "wrong size");
|
|
||||||
memcpy(prev, curr, sizeof(*prev));
|
memcpy(prev, curr, sizeof(*prev));
|
||||||
}
|
}
|
||||||
inventory->length--;
|
inventory->length--;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define ADDICTION_COUNT (9)
|
#define ADDICTION_COUNT (9)
|
||||||
|
|
||||||
typedef enum _WeaponClass {
|
typedef enum _WeaponClass {
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "map_defs.h"
|
#include "map_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define LIGHT_LEVEL_MIN (65536 / 4)
|
#define LIGHT_LEVEL_MIN (65536 / 4)
|
||||||
#define LIGHT_LEVEL_MAX 65536
|
#define LIGHT_LEVEL_MAX 65536
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define PHONEME_COUNT (42)
|
#define PHONEME_COUNT (42)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "art.h"
|
#include "art.h"
|
||||||
#include "fps_limiter.h"
|
#include "fps_limiter.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum MainMenuButton {
|
typedef enum MainMenuButton {
|
||||||
MAIN_MENU_BUTTON_INTRO,
|
MAIN_MENU_BUTTON_INTRO,
|
||||||
MAIN_MENU_BUTTON_NEW_GAME,
|
MAIN_MENU_BUTTON_NEW_GAME,
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "map_defs.h"
|
#include "map_defs.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef MAPDEFS_H
|
#ifndef MAPDEFS_H
|
||||||
#define MAPDEFS_H
|
#define MAPDEFS_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define ELEVATION_COUNT (3)
|
#define ELEVATION_COUNT (3)
|
||||||
|
|
||||||
#define SQUARE_GRID_WIDTH (100)
|
#define SQUARE_GRID_WIDTH (100)
|
||||||
|
|
|
@ -44,7 +44,7 @@ int memoryManagerPrintError(const char* format, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x484610
|
// 0x484610
|
||||||
__declspec(noreturn) void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line)
|
[[noreturn]] void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line)
|
||||||
{
|
{
|
||||||
memoryManagerPrintError("%s: Error allocating block of size %ld (%x), %s %d\n", func, size, size, file, line);
|
memoryManagerPrintError("%s: Error allocating block of size %ld (%x), %s %d\n", func, size, size, file, line);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -15,7 +15,7 @@ extern char gMemoryManagerLastError[256];
|
||||||
|
|
||||||
void memoryManagerDefaultPrintErrorImpl(const char* string);
|
void memoryManagerDefaultPrintErrorImpl(const char* string);
|
||||||
int memoryManagerPrintError(const char* format, ...);
|
int memoryManagerPrintError(const char* format, ...);
|
||||||
__declspec(noreturn) void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line);
|
[[noreturn]] void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line);
|
||||||
void* memoryManagerDefaultMallocImpl(size_t size);
|
void* memoryManagerDefaultMallocImpl(size_t size);
|
||||||
void* memoryManagerDefaultReallocImpl(void* ptr, size_t size);
|
void* memoryManagerDefaultReallocImpl(void* ptr, size_t size);
|
||||||
void memoryManagerDefaultFreeImpl(void* ptr);
|
void memoryManagerDefaultFreeImpl(void* ptr);
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define BADWORD_LENGTH_MAX 80
|
#define BADWORD_LENGTH_MAX 80
|
||||||
|
|
||||||
#define MESSAGE_LIST_ITEM_TEXT_FILTERED 0x01
|
#define MESSAGE_LIST_ITEM_TEXT_FILTERED 0x01
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef MMX_H
|
#ifndef MMX_H
|
||||||
#define MMX_H
|
#define MMX_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
bool mmxIsSupported();
|
bool mmxIsSupported();
|
||||||
void mmxBlit(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
|
void mmxBlit(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
|
||||||
void mmxBlitTrans(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
|
void mmxBlitTrans(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef MOVIE_EFFECT_H
|
#ifndef MOVIE_EFFECT_H
|
||||||
#define MOVIE_EFFECT_H
|
#define MOVIE_EFFECT_H
|
||||||
|
|
||||||
#include <stdbool.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,
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#define DIRECTSOUND_VERSION 0x0300
|
#define DIRECTSOUND_VERSION 0x0300
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef struct STRUCT_6B3690 {
|
typedef struct STRUCT_6B3690 {
|
||||||
void* field_0;
|
void* field_0;
|
||||||
int field_4;
|
int field_4;
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(Nevs) == 60, "wrong size");
|
|
||||||
|
|
||||||
// 0x6391C8
|
// 0x6391C8
|
||||||
Nevs* _nevs;
|
Nevs* _nevs;
|
||||||
|
|
||||||
|
|
|
@ -245,10 +245,6 @@ typedef struct Object {
|
||||||
int field_80;
|
int field_80;
|
||||||
} Object;
|
} Object;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
static_assert(sizeof(Object) == 132, "wrong size");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct ObjectListNode {
|
typedef struct ObjectListNode {
|
||||||
Object* obj;
|
Object* obj;
|
||||||
struct ObjectListNode* next;
|
struct ObjectListNode* next;
|
||||||
|
|
|
@ -599,7 +599,6 @@ int showPause(bool a1)
|
||||||
CacheEntry* frmHandles[PAUSE_WINDOW_FRM_COUNT];
|
CacheEntry* frmHandles[PAUSE_WINDOW_FRM_COUNT];
|
||||||
Size frmSizes[PAUSE_WINDOW_FRM_COUNT];
|
Size frmSizes[PAUSE_WINDOW_FRM_COUNT];
|
||||||
|
|
||||||
static_assert(sizeof(graphicIds) == sizeof(gPauseWindowFrmIds), "wrong size");
|
|
||||||
memcpy(graphicIds, gPauseWindowFrmIds, sizeof(gPauseWindowFrmIds));
|
memcpy(graphicIds, gPauseWindowFrmIds, sizeof(gPauseWindowFrmIds));
|
||||||
|
|
||||||
bool gameMouseWasVisible;
|
bool gameMouseWasVisible;
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define OPTIONS_WINDOW_BUTTONS_COUNT (10)
|
#define OPTIONS_WINDOW_BUTTONS_COUNT (10)
|
||||||
#define PRIMARY_OPTION_VALUE_COUNT (4)
|
#define PRIMARY_OPTION_VALUE_COUNT (4)
|
||||||
#define SECONDARY_OPTION_VALUE_COUNT (2)
|
#define SECONDARY_OPTION_VALUE_COUNT (2)
|
||||||
|
@ -101,8 +99,6 @@ typedef struct PreferenceDescription {
|
||||||
} PreferenceDescription;
|
} PreferenceDescription;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
static_assert(sizeof(PreferenceDescription) == 76, "wrong size");
|
|
||||||
|
|
||||||
extern const int _row1Ytab[5];
|
extern const int _row1Ytab[5];
|
||||||
extern const int _row2Ytab[6];
|
extern const int _row2Ytab[6];
|
||||||
extern const int _row3Ytab[8];
|
extern const int _row3Ytab[8];
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
#include "scripts.h"
|
#include "scripts.h"
|
||||||
|
|
||||||
#include <stdbool.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];
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "perk_defs.h"
|
#include "perk_defs.h"
|
||||||
#include "stat_defs.h"
|
#include "stat_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef struct PerkDescription {
|
typedef struct PerkDescription {
|
||||||
char* name;
|
char* name;
|
||||||
char* description;
|
char* description;
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define PIPBOY_WINDOW_WIDTH (640)
|
#define PIPBOY_WINDOW_WIDTH (640)
|
||||||
#define PIPBOY_WINDOW_HEIGHT (480)
|
#define PIPBOY_WINDOW_HEIGHT (480)
|
||||||
|
|
||||||
|
|
|
@ -916,7 +916,6 @@ int _obj_use_power_on_car(Object* item)
|
||||||
MessageListItem messageListItem;
|
MessageListItem messageListItem;
|
||||||
int messageNum;
|
int messageNum;
|
||||||
|
|
||||||
static_assert(sizeof(messageListItem) == sizeof(stru_49A990), "wrong size");
|
|
||||||
memcpy(&messageListItem, &stru_49A990, sizeof(messageListItem));
|
memcpy(&messageListItem, &stru_49A990, sizeof(messageListItem));
|
||||||
|
|
||||||
bool isEnergy = false;
|
bool isEnergy = false;
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
extern MessageListItem stru_49A990;
|
extern MessageListItem stru_49A990;
|
||||||
|
|
||||||
int _obj_sid(Object* object, int* sidPtr);
|
int _obj_sid(Object* object, int* sidPtr);
|
||||||
|
|
|
@ -324,8 +324,6 @@ typedef struct ItemProto {
|
||||||
unsigned char field_80;
|
unsigned char field_80;
|
||||||
} ItemProto;
|
} ItemProto;
|
||||||
|
|
||||||
static_assert(sizeof(ItemProto) == 0x84, "wrong size");
|
|
||||||
|
|
||||||
typedef struct CritterProtoData {
|
typedef struct CritterProtoData {
|
||||||
int flags; // d.flags
|
int flags; // d.flags
|
||||||
int baseStats[35]; // d.stat_base
|
int baseStats[35]; // d.stat_base
|
||||||
|
@ -353,8 +351,6 @@ typedef struct CritterProto {
|
||||||
int team; // team_num
|
int team; // team_num
|
||||||
} CritterProto;
|
} CritterProto;
|
||||||
|
|
||||||
static_assert(sizeof(CritterProto) == 0x1A0, "wrong size");
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int openFlags; // d.open_flags
|
int openFlags; // d.open_flags
|
||||||
int keyCode; // d.key_code
|
int keyCode; // d.key_code
|
||||||
|
@ -404,8 +400,6 @@ typedef struct SceneryProto {
|
||||||
unsigned char field_34;
|
unsigned char field_34;
|
||||||
} SceneryProto;
|
} SceneryProto;
|
||||||
|
|
||||||
static_assert(sizeof(SceneryProto) == 0x38, "wrong size");
|
|
||||||
|
|
||||||
typedef struct WallProto {
|
typedef struct WallProto {
|
||||||
int pid; // id
|
int pid; // id
|
||||||
int messageId; // message_num
|
int messageId; // message_num
|
||||||
|
@ -418,8 +412,6 @@ typedef struct WallProto {
|
||||||
int material; // material
|
int material; // material
|
||||||
} WallProto;
|
} WallProto;
|
||||||
|
|
||||||
static_assert(sizeof(WallProto) == 0x24, "wrong size");
|
|
||||||
|
|
||||||
typedef struct TileProto {
|
typedef struct TileProto {
|
||||||
int pid; // id
|
int pid; // id
|
||||||
int messageId; // message_num
|
int messageId; // message_num
|
||||||
|
@ -430,8 +422,6 @@ typedef struct TileProto {
|
||||||
int material; // material
|
int material; // material
|
||||||
} TileProto;
|
} TileProto;
|
||||||
|
|
||||||
static_assert(sizeof(TileProto) == 0x1C, "wrong size");
|
|
||||||
|
|
||||||
typedef struct MiscProto {
|
typedef struct MiscProto {
|
||||||
int pid; // id
|
int pid; // id
|
||||||
int messageId; // message_num
|
int messageId; // message_num
|
||||||
|
@ -442,8 +432,6 @@ typedef struct MiscProto {
|
||||||
int extendedFlags; // flags_ext
|
int extendedFlags; // flags_ext
|
||||||
} MiscProto;
|
} MiscProto;
|
||||||
|
|
||||||
static_assert(sizeof(MiscProto) == 0x1C, "wrong size");
|
|
||||||
|
|
||||||
typedef union Proto {
|
typedef union Proto {
|
||||||
struct {
|
struct {
|
||||||
int pid; // pid
|
int pid; // pid
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef enum EventType {
|
typedef enum EventType {
|
||||||
EVENT_TYPE_DRUG = 0,
|
EVENT_TYPE_DRUG = 0,
|
||||||
EVENT_TYPE_KNOCKOUT = 1,
|
EVENT_TYPE_KNOCKOUT = 1,
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(Region) == 140, "wrong size");
|
|
||||||
|
|
||||||
char _aNull[] = "<null>";
|
char _aNull[] = "<null>";
|
||||||
|
|
||||||
// Probably recalculates bounding box of the region.
|
// Probably recalculates bounding box of the region.
|
||||||
|
|
|
@ -1040,7 +1040,6 @@ int scriptsRequestCombat(STRUCT_664980* a1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a1) {
|
if (a1) {
|
||||||
static_assert(sizeof(stru_664958) == sizeof(*a1), "wrong size");
|
|
||||||
memcpy(&stru_664958, a1, sizeof(stru_664958));
|
memcpy(&stru_664958, a1, sizeof(stru_664958));
|
||||||
} else {
|
} else {
|
||||||
gScriptsRequests |= SCRIPT_REQUEST_0x40;
|
gScriptsRequests |= SCRIPT_REQUEST_0x40;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define SCRIPT_LIST_EXTENT_SIZE 16
|
#define SCRIPT_LIST_EXTENT_SIZE 16
|
||||||
|
|
||||||
#define SCRIPT_FLAG_0x01 (0x01)
|
#define SCRIPT_FLAG_0x01 (0x01)
|
||||||
|
@ -78,8 +76,6 @@ typedef enum ScriptProc {
|
||||||
SCRIPT_PROC_COUNT,
|
SCRIPT_PROC_COUNT,
|
||||||
} ScriptProc;
|
} ScriptProc;
|
||||||
|
|
||||||
static_assert(SCRIPT_PROC_COUNT == 28, "wrong count");
|
|
||||||
|
|
||||||
typedef struct ScriptsListEntry {
|
typedef struct ScriptsListEntry {
|
||||||
char name[16];
|
char name[16];
|
||||||
int local_vars_num;
|
int local_vars_num;
|
||||||
|
@ -152,8 +148,6 @@ typedef struct Script {
|
||||||
int field_DC;
|
int field_DC;
|
||||||
} Script;
|
} Script;
|
||||||
|
|
||||||
static_assert(sizeof(Script) == 0xE0, "wrong size");
|
|
||||||
|
|
||||||
typedef struct ScriptListExtent {
|
typedef struct ScriptListExtent {
|
||||||
Script scripts[SCRIPT_LIST_EXTENT_SIZE];
|
Script scripts[SCRIPT_LIST_EXTENT_SIZE];
|
||||||
// Number of scripts in the extent
|
// Number of scripts in the extent
|
||||||
|
@ -161,8 +155,6 @@ typedef struct ScriptListExtent {
|
||||||
struct ScriptListExtent* next;
|
struct ScriptListExtent* next;
|
||||||
} ScriptListExtent;
|
} ScriptListExtent;
|
||||||
|
|
||||||
static_assert(sizeof(ScriptListExtent) == 0xE08, "wrong size");
|
|
||||||
|
|
||||||
typedef struct ScriptList {
|
typedef struct ScriptList {
|
||||||
ScriptListExtent* head;
|
ScriptListExtent* head;
|
||||||
ScriptListExtent* tail;
|
ScriptListExtent* tail;
|
||||||
|
@ -171,8 +163,6 @@ typedef struct ScriptList {
|
||||||
int nextScriptId;
|
int nextScriptId;
|
||||||
} ScriptList;
|
} ScriptList;
|
||||||
|
|
||||||
static_assert(sizeof(ScriptList) == 0x10, "wrong size");
|
|
||||||
|
|
||||||
extern char _Error_2[];
|
extern char _Error_2[];
|
||||||
extern char byte_50D6C0[];
|
extern char byte_50D6C0[];
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define SFALL_CONFIG_FILE_NAME "ddraw.ini"
|
#define SFALL_CONFIG_FILE_NAME "ddraw.ini"
|
||||||
|
|
||||||
#define SFALL_CONFIG_MISC_KEY "Misc"
|
#define SFALL_CONFIG_MISC_KEY "Misc"
|
||||||
|
|
|
@ -667,7 +667,6 @@ int skillUse(Object* obj, Object* a2, int skill, int criticalChanceModifier)
|
||||||
|
|
||||||
if (critterGetBodyType(a2) != BODY_TYPE_ROBOTIC && critterIsCrippled(a2)) {
|
if (critterGetBodyType(a2) != BODY_TYPE_ROBOTIC && critterIsCrippled(a2)) {
|
||||||
int flags[HEALABLE_DAMAGE_FLAGS_LENGTH];
|
int flags[HEALABLE_DAMAGE_FLAGS_LENGTH];
|
||||||
static_assert(sizeof(flags) == sizeof(gHealableDamageFlags), "wrong size");
|
|
||||||
memcpy(flags, gHealableDamageFlags, sizeof(gHealableDamageFlags));
|
memcpy(flags, gHealableDamageFlags, sizeof(gHealableDamageFlags));
|
||||||
|
|
||||||
for (int index = 0; index < HEALABLE_DAMAGE_FLAGS_LENGTH; index++) {
|
for (int index = 0; index < HEALABLE_DAMAGE_FLAGS_LENGTH; index++) {
|
||||||
|
@ -852,7 +851,6 @@ int skillUse(Object* obj, Object* a2, int skill, int criticalChanceModifier)
|
||||||
|
|
||||||
if (currentHp < maximumHp || critterIsCrippled(a2)) {
|
if (currentHp < maximumHp || critterIsCrippled(a2)) {
|
||||||
int flags[REPAIRABLE_DAMAGE_FLAGS_LENGTH];
|
int flags[REPAIRABLE_DAMAGE_FLAGS_LENGTH];
|
||||||
static_assert(sizeof(flags) == sizeof(gRepairableDamageFlags), "wrong size");
|
|
||||||
memcpy(flags, gRepairableDamageFlags, sizeof(gRepairableDamageFlags));
|
memcpy(flags, gRepairableDamageFlags, sizeof(gRepairableDamageFlags));
|
||||||
|
|
||||||
paletteFadeTo(gPaletteBlack);
|
paletteFadeTo(gPaletteBlack);
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "proto_types.h"
|
#include "proto_types.h"
|
||||||
#include "skill_defs.h"
|
#include "skill_defs.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define SKILLDEX_SKILL_BUTTON_BUFFER_COUNT (SKILLDEX_SKILL_COUNT * 2)
|
#define SKILLDEX_SKILL_BUTTON_BUFFER_COUNT (SKILLDEX_SKILL_COUNT * 2)
|
||||||
|
|
||||||
typedef enum SkilldexFrm {
|
typedef enum SkilldexFrm {
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static_assert(sizeof(Sound) == 156, "wrong size");
|
|
||||||
|
|
||||||
// 0x51D478
|
// 0x51D478
|
||||||
STRUCT_51D478* _fadeHead = NULL;
|
STRUCT_51D478* _fadeHead = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef SOUND_DECODER_H
|
#ifndef SOUND_DECODER_H
|
||||||
#define SOUND_DECODER_H
|
#define SOUND_DECODER_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define SOUND_DECODER_IN_BUFFER_SIZE (512)
|
#define SOUND_DECODER_IN_BUFFER_SIZE (512)
|
||||||
|
@ -40,10 +39,6 @@ typedef struct SoundDecoder {
|
||||||
int field_50;
|
int field_50;
|
||||||
} SoundDecoder;
|
} SoundDecoder;
|
||||||
|
|
||||||
#if _WIN32
|
|
||||||
static_assert(sizeof(SoundDecoder) == 84, "wrong size");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef int (*DECODINGPROC)(SoundDecoder* soundDecoder, int offset, int bits);
|
typedef int (*DECODINGPROC)(SoundDecoder* soundDecoder, int offset, int bits);
|
||||||
|
|
||||||
extern int gSoundDecodersCount;
|
extern int gSoundDecodersCount;
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(SoundEffect) == 32, "wrong size");
|
|
||||||
|
|
||||||
// 0x50DE04
|
// 0x50DE04
|
||||||
const char* off_50DE04 = "";
|
const char* off_50DE04 = "";
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// The maximum number of sound effects that can be loaded and played
|
// The maximum number of sound effects that can be loaded and played
|
||||||
// simultaneously.
|
// simultaneously.
|
||||||
#define SOUND_EFFECTS_MAX_COUNT (4)
|
#define SOUND_EFFECTS_MAX_COUNT (4)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef SOUND_EFFECTS_LIST_H
|
#ifndef SOUND_EFFECTS_LIST_H
|
||||||
#define SOUND_EFFECTS_LIST_H
|
#define SOUND_EFFECTS_LIST_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define SFXL_OK (0)
|
#define SFXL_OK (0)
|
||||||
#define SFXL_ERR (1)
|
#define SFXL_ERR (1)
|
||||||
#define SFXL_ERR_TAG_INVALID (2)
|
#define SFXL_ERR_TAG_INVALID (2)
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include "proto_types.h"
|
#include "proto_types.h"
|
||||||
#include "stat_defs.h"
|
#include "stat_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define STAT_ERR_INVALID_STAT (-5)
|
#define STAT_ERR_INVALID_STAT (-5)
|
||||||
|
|
||||||
// Provides metadata about stats.
|
// Provides metadata about stats.
|
||||||
|
|
|
@ -70,7 +70,6 @@ int textFontsInit()
|
||||||
int currentFont = -1;
|
int currentFont = -1;
|
||||||
|
|
||||||
FontManager fontManager;
|
FontManager fontManager;
|
||||||
static_assert(sizeof(fontManager) == sizeof(gTextFontManager), "wrong size");
|
|
||||||
memcpy(&fontManager, &gTextFontManager, sizeof(fontManager));
|
memcpy(&fontManager, &gTextFontManager, sizeof(fontManager));
|
||||||
|
|
||||||
for (int font = 0; font < TEXT_FONT_MAX; font++) {
|
for (int font = 0; font < TEXT_FONT_MAX; font++) {
|
||||||
|
@ -192,7 +191,6 @@ int fontManagerAdd(FontManager* fontManager)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static_assert(sizeof(*gFontManagers) == sizeof(*fontManager), "wrong size");
|
|
||||||
memcpy(&(gFontManagers[gFontManagersCount]), fontManager, sizeof(*fontManager));
|
memcpy(&(gFontManagers[gFontManagersCount]), fontManager, sizeof(*fontManager));
|
||||||
gFontManagersCount++;
|
gFontManagersCount++;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef TEXT_FONT_H
|
#ifndef TEXT_FONT_H
|
||||||
#define TEXT_FONT_H
|
#define TEXT_FONT_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// The maximum number of text fonts.
|
// The maximum number of text fonts.
|
||||||
#define TEXT_FONT_MAX (10)
|
#define TEXT_FONT_MAX (10)
|
||||||
|
|
||||||
|
@ -33,8 +31,6 @@ typedef struct FontManager {
|
||||||
FontManagerGetMonospacedCharacterWidth* getMonospacedCharacterWidthProc;
|
FontManagerGetMonospacedCharacterWidth* getMonospacedCharacterWidthProc;
|
||||||
} FontManager;
|
} FontManager;
|
||||||
|
|
||||||
static_assert(sizeof(FontManager) == 44, "wrong size");
|
|
||||||
|
|
||||||
typedef struct TextFontGlyph {
|
typedef struct TextFontGlyph {
|
||||||
// The width of the glyph in pixels.
|
// The width of the glyph in pixels.
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
#include "word_wrap.h"
|
#include "word_wrap.h"
|
||||||
|
|
||||||
static_assert(sizeof(TextObject) == 48, "wrong size");
|
|
||||||
|
|
||||||
// 0x51D944
|
// 0x51D944
|
||||||
int gTextObjectsCount = 0;
|
int gTextObjectsCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define TILE_SET_CENTER_FLAG_0x01 0x01
|
#define TILE_SET_CENTER_FLAG_0x01 0x01
|
||||||
#define TILE_SET_CENTER_FLAG_0x02 0x02
|
#define TILE_SET_CENTER_FLAG_0x02 0x02
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "trait_defs.h"
|
#include "trait_defs.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// Provides metadata about traits.
|
// Provides metadata about traits.
|
||||||
typedef struct TraitDescription {
|
typedef struct TraitDescription {
|
||||||
// The name of trait.
|
// The name of trait.
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
#define DIRECTSOUND_VERSION 0x0300
|
#define DIRECTSOUND_VERSION 0x0300
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef HRESULT(__stdcall DirectSoundCreateProc)(GUID*, LPDIRECTSOUND*, IUnknown*);
|
typedef HRESULT(__stdcall DirectSoundCreateProc)(GUID*, LPDIRECTSOUND*, IUnknown*);
|
||||||
|
|
||||||
extern DirectSoundCreateProc* gDirectSoundCreateProc;
|
extern DirectSoundCreateProc* gDirectSoundCreateProc;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define MANAGED_WINDOW_COUNT (16)
|
#define MANAGED_WINDOW_COUNT (16)
|
||||||
|
|
||||||
typedef void (*WINDOWDRAWINGPROC)(unsigned char* src, int src_pitch, int a3, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y);
|
typedef void (*WINDOWDRAWINGPROC)(unsigned char* src, int src_pitch, int a3, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y);
|
||||||
|
@ -44,7 +42,6 @@ typedef struct ManagedButton {
|
||||||
int field_74;
|
int field_74;
|
||||||
int field_78;
|
int field_78;
|
||||||
} ManagedButton;
|
} ManagedButton;
|
||||||
static_assert(sizeof(ManagedButton) == 0x7C, "wrong size");
|
|
||||||
|
|
||||||
typedef struct ManagedWindow {
|
typedef struct ManagedWindow {
|
||||||
char name[32];
|
char name[32];
|
||||||
|
|
|
@ -12,10 +12,6 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
static_assert(sizeof(struc_177) == 572, "wrong size");
|
|
||||||
static_assert(sizeof(Window) == 68, "wrong size");
|
|
||||||
static_assert(sizeof(Button) == 124, "wrong size");
|
|
||||||
|
|
||||||
// 0x50FA30
|
// 0x50FA30
|
||||||
char _path_patches[] = "";
|
char _path_patches[] = "";
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include "geometry.h"
|
#include "geometry.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef WINDOW_MANAGER_PRIVATE_H
|
#ifndef WINDOW_MANAGER_PRIVATE_H
|
||||||
#define WINDOW_MANAGER_PRIVATE_H
|
#define WINDOW_MANAGER_PRIVATE_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef struct struc_177 struc_177;
|
typedef struct struc_177 struc_177;
|
||||||
|
|
||||||
typedef struct STRUCT_6B2340 {
|
typedef struct STRUCT_6B2340 {
|
||||||
|
|
|
@ -37,10 +37,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static_assert(sizeof(Terrain) == 128, "wrong size");
|
|
||||||
static_assert(sizeof(ENC_BASE_TYPE) == 3056, "wrong size");
|
|
||||||
static_assert(sizeof(EncounterTable) == 7460, "wrong size");
|
|
||||||
|
|
||||||
#define WM_TILE_WIDTH (350)
|
#define WM_TILE_WIDTH (350)
|
||||||
#define WM_TILE_HEIGHT (300)
|
#define WM_TILE_HEIGHT (300)
|
||||||
|
|
||||||
|
@ -2693,7 +2689,6 @@ bool _wmMapCanRestHere(int elevation)
|
||||||
int flags[3];
|
int flags[3];
|
||||||
|
|
||||||
// NOTE: I'm not sure why they're copied.
|
// NOTE: I'm not sure why they're copied.
|
||||||
static_assert(sizeof(flags) == sizeof(_can_rest_here), "wrong size");
|
|
||||||
memcpy(flags, _can_rest_here, sizeof(flags));
|
memcpy(flags, _can_rest_here, sizeof(flags));
|
||||||
|
|
||||||
MapInfo* map = &(gMaps[gMapHeader.field_34]);
|
MapInfo* map = &(gMaps[gMapHeader.field_34]);
|
||||||
|
@ -3250,7 +3245,6 @@ int _wmRndEncounterOccurred()
|
||||||
int modifiers[DAY_PART_COUNT];
|
int modifiers[DAY_PART_COUNT];
|
||||||
|
|
||||||
// NOTE: I'm not sure why they're copied.
|
// NOTE: I'm not sure why they're copied.
|
||||||
static_assert(sizeof(modifiers) == sizeof(gDayPartEncounterFrequencyModifiers), "wrong size");
|
|
||||||
memcpy(modifiers, gDayPartEncounterFrequencyModifiers, sizeof(gDayPartEncounterFrequencyModifiers));
|
memcpy(modifiers, gDayPartEncounterFrequencyModifiers, sizeof(gDayPartEncounterFrequencyModifiers));
|
||||||
|
|
||||||
frequency -= modifiers[dayPart];
|
frequency -= modifiers[dayPart];
|
||||||
|
@ -5958,7 +5952,6 @@ int carGetCity()
|
||||||
int _wmCarGiveToParty()
|
int _wmCarGiveToParty()
|
||||||
{
|
{
|
||||||
MessageListItem messageListItem;
|
MessageListItem messageListItem;
|
||||||
static_assert(sizeof(messageListItem) == sizeof(stru_4BC880), "wrong size");
|
|
||||||
memcpy(&messageListItem, &stru_4BC880, sizeof(MessageListItem));
|
memcpy(&messageListItem, &stru_4BC880, sizeof(MessageListItem));
|
||||||
|
|
||||||
if (gWorldmapCarFuel <= 0) {
|
if (gWorldmapCarFuel <= 0) {
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "obj_types.h"
|
#include "obj_types.h"
|
||||||
|
|
||||||
#include <stdbool.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)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue