[Build] Move more of src/common to src/core/base
* Clean out all of the dependent headers. * Modify generated version.h to improve the dependency chain and isolate the generated file to its own sub-directory within the build directory.
This commit is contained in:
parent
2f10e71f1d
commit
f8374b52a8
|
@ -125,7 +125,7 @@ endif()
|
|||
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
include(GitTagVersion)
|
||||
git_version(VERSION REVISION VERSION_RELEASE)
|
||||
git_version(VBAM_VERSION VBAM_REVISION VBAM_VERSION_RELEASE)
|
||||
|
||||
# only use the plugin to tie the configure state to the sha to force rebuilds
|
||||
# of files that depend on version.h
|
||||
|
@ -174,16 +174,11 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||
endif()
|
||||
|
||||
# no git or no tags, use ChangeLog
|
||||
if(NOT VERSION)
|
||||
if(NOT VBAM_VERSION)
|
||||
include(ChangeLogVersion)
|
||||
changelog_version(VERSION REVISION VERSION_RELEASE)
|
||||
changelog_version(VBAM_VERSION VBAM_REVISION VBAM_VERSION_RELEASE)
|
||||
endif()
|
||||
|
||||
# generate version.h
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1,\\2,\\3,0" WIN_VERSION "${VERSION}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_BINARY_DIR}/version.h" @ONLY)
|
||||
|
||||
# We do not support amd64 asm yet
|
||||
if(X86_64 AND (ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS OR ENABLE_MMX))
|
||||
message(FATAL_ERROR "The options ASM_CORE, ASM_SCALERS and MMX are not supported on X86_64 yet.")
|
||||
|
@ -257,8 +252,13 @@ set(
|
|||
${ZLIB_LIBRARY}
|
||||
)
|
||||
|
||||
set(VBAM_GENERATED_DIR ${CMAKE_BINARY_DIR}/generated)
|
||||
|
||||
# Set up "src" as a global include directory.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${VBAM_GENERATED_DIR}
|
||||
)
|
||||
|
||||
|
||||
if(ENABLE_FFMPEG)
|
||||
|
@ -393,9 +393,7 @@ set(
|
|||
SRC_MAIN
|
||||
src/Util.cpp
|
||||
src/Util_common.cpp
|
||||
src/common/Patch.cpp
|
||||
src/common/SoundSDL.cpp
|
||||
src/common/version.cpp
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
|
@ -406,12 +404,8 @@ set(
|
|||
HDR_MAIN
|
||||
src/System.h
|
||||
src/Util.h
|
||||
src/common/array.h
|
||||
src/common/Port.h
|
||||
src/common/sizes.h
|
||||
src/common/SoundDriver.h
|
||||
src/common/SoundSDL.h
|
||||
src/common/version_cpp.h
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// -*- C++ -*-
|
||||
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
|
||||
// Copyright (C) 1999-2003 Forgotten
|
||||
// Copyright (C) 2004 Forgotten and the VBA development team
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or(at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#ifndef __AUTOBUILD_H__
|
||||
#define __AUTOBUILD_H__
|
||||
#include "version.h"
|
||||
// change the FALSE to TRUE for autoincrement of build number
|
||||
#define INCREMENT_VERSION FALSE
|
||||
#define FILEVER 2, 0, 0, 600
|
||||
#define PRODUCTVER 2, 0, 0, 600
|
||||
#define STRFILEVER "2, 0, 0, 600\0"
|
||||
#define STRPRODUCTVER "2, 0, 0, 600\0"
|
||||
#endif //__AUTOBUILD_H__
|
|
@ -1,16 +1,10 @@
|
|||
#ifndef SYSTEM_H
|
||||
#define SYSTEM_H
|
||||
|
||||
#include "common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#include "core/base/message.h"
|
||||
|
||||
#define winlog log
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#define utilOpenFile fopen
|
||||
#endif
|
||||
|
||||
class SoundDriver;
|
||||
|
||||
struct EmulatedSystem {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "System.h"
|
||||
#include "common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "gba/Globals.h"
|
||||
#include "gba/RTC.h"
|
||||
#include "gba/gbafilter.h"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef PATCH_H
|
||||
#define PATCH_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
bool applyPatch(const char *patchname, uint8_t **rom, int *size);
|
||||
|
||||
#endif // PATCH_H
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "ringbuffer.h"
|
||||
#include "core/base/ringbuffer.h"
|
||||
#include "SoundDriver.h"
|
||||
|
||||
class SoundSDL : public SoundDriver {
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
|
||||
// Copyright (C) 2008 VBA-M development team
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or(at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#ifndef __VBA_TYPES_H__
|
||||
#define __VBA_TYPES_H__
|
||||
|
||||
#if defined(__LIBRETRO__)
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#else // !defined(__LIBRETRO__)
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#endif // __VBA_TYPES_H__
|
|
@ -1,6 +0,0 @@
|
|||
#include "version_cpp.h"
|
||||
#include "version.h"
|
||||
|
||||
const char* const vba_name_and_subversion = VBA_NAME_AND_SUBVERSION;
|
||||
|
||||
const char* const vbam_version = VBAM_VERSION;
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef VBAM_VERSION_CPP_H
|
||||
#define VBAM_VERSION_CPP_H
|
||||
|
||||
extern const char* const vba_name_and_subversion;
|
||||
|
||||
extern const char* const vbam_version;
|
||||
|
||||
#endif /* VBAM_VERSION_CPP_H */
|
|
@ -2,8 +2,28 @@
|
|||
# `vbam-core-base` is a collection of utilies and definitions use by the core
|
||||
# and frontends.
|
||||
|
||||
# Generate version_gen.h
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1,\\2,\\3,0" VBAM_WIN_VERSION "${VBAM_VERSION}")
|
||||
set(VBAM_GENERATED_VERSION_H ${VBAM_GENERATED_DIR}/core/base/version_gen.h)
|
||||
add_custom_target(vbam-core-base-generated
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DVBAM_GENERATED_VERSION_H=${VBAM_GENERATED_VERSION_H}
|
||||
-DVBAM_VERSION=${VBAM_VERSION}
|
||||
-DVBAM_REVISION=${VBAM_REVISION}
|
||||
-DVBAM_VERSION_RELEASE=${VBAM_VERSION_RELEASE}
|
||||
-DVBAM_WIN_VERSION=${VBAM_WIN_VERSION}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/build-version.cmake
|
||||
BYPRODUCTS
|
||||
${VBAM_GENERATED_VERSION_H}
|
||||
DEPENDS
|
||||
version_gen.h.in
|
||||
build-version.cmake
|
||||
)
|
||||
|
||||
add_library(vbam-core-base OBJECT)
|
||||
|
||||
add_dependencies(vbam-core-base vbam-core-base-generated)
|
||||
|
||||
target_sources(vbam-core-base
|
||||
PRIVATE
|
||||
file_util.cpp
|
||||
|
@ -12,10 +32,17 @@ target_sources(vbam-core-base
|
|||
internal/file_util_internal.h
|
||||
internal/memgzio.c
|
||||
internal/memgzio.h
|
||||
patch.cpp
|
||||
version.cpp
|
||||
|
||||
PUBLIC
|
||||
array.h
|
||||
file_util.h
|
||||
message.h
|
||||
patch.h
|
||||
port.h
|
||||
ringbuffer.h
|
||||
sizes.h
|
||||
)
|
||||
|
||||
target_include_directories(vbam-core-base
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# Create "core/base/version.h"
|
||||
|
||||
if(NOT DEFINED VBAM_GENERATED_VERSION_H)
|
||||
message(FATAL_ERROR "VBAM_GENERATED_VERSION_H not defined")
|
||||
endif()
|
||||
if(NOT DEFINED VBAM_VERSION)
|
||||
message(FATAL_ERROR "VBAM_VERSION not defined")
|
||||
endif()
|
||||
if(NOT DEFINED VBAM_REVISION)
|
||||
message(FATAL_ERROR "VBAM_REVISION not defined")
|
||||
endif()
|
||||
if(NOT DEFINED VBAM_WIN_VERSION)
|
||||
message(FATAL_ERROR "VBAM_WIN_VERSION not defined")
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/version_gen.h.in" "${VBAM_GENERATED_VERSION_H}" @ONLY)
|
|
@ -1,11 +1,12 @@
|
|||
#include "Patch.h"
|
||||
#include "core/base/patch.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "zconf.h"
|
||||
#ifndef __LIBRETRO__
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#include <zconf.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef VBAM_CORE_BASE_PATCH_H_
|
||||
#define VBAM_CORE_BASE_PATCH_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
bool applyPatch(const char *patchname, uint8_t **rom, int *size);
|
||||
|
||||
#endif // VBAM_CORE_BASE_PATCH_H_
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PORT_H
|
||||
#define PORT_H
|
||||
#ifndef VBAM_CORE_BASE_PORT_H_
|
||||
#define VBAM_CORE_BASE_PORT_H_
|
||||
|
||||
#include "Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __PS3__
|
||||
/* PlayStation3 */
|
||||
|
@ -60,4 +60,4 @@ static inline uint32_t swap32(uint32_t v)
|
|||
#define WRITE32LE(x, v) *((uint32_t *)x) = (v)
|
||||
#endif
|
||||
|
||||
#endif // PORT_H
|
||||
#endif // VBAM_CORE_BASE_PORT_H_
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef RINGBUFFER_H
|
||||
#define RINGBUFFER_H
|
||||
#ifndef VBAM_CORE_BASE_RINGBUFFER_H_
|
||||
#define VBAM_CORE_BASE_RINGBUFFER_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <cstddef>
|
||||
#include "array.h"
|
||||
|
||||
#include "core/base/array.h"
|
||||
|
||||
template <typename T> class RingBuffer
|
||||
{
|
||||
|
@ -92,4 +92,4 @@ template <typename T> class RingBuffer
|
|||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // VBAM_CORE_BASE_RINGBUFFER_H_
|
|
@ -0,0 +1,4 @@
|
|||
#include "core/base/version.h"
|
||||
|
||||
const std::string kVbamNameAndSubversion = VBAM_NAME_AND_SUBVERSION;
|
||||
const std::string kVbamVersion = VBAM_VERSION;
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef VBAM_CORE_BASE_VERSION_H_
|
||||
#define VBAM_CORE_BASE_VERSION_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "core/base/version_gen.h"
|
||||
|
||||
// Full version information, generated by the build system.
|
||||
// e.g. "VisualBoyAdvance-M 2.1.9-316e4a43 msvc-316e4a43"
|
||||
extern const std::string kVbamNameAndSubversion;
|
||||
|
||||
// Version information, generated by the build system.
|
||||
// e.g. "2.1.9-316e4a43"
|
||||
extern const std::string kVbamVersion;
|
||||
|
||||
#endif /* VBAM_CORE_BASE_VERSION_H_ */
|
|
@ -0,0 +1,53 @@
|
|||
// -*- C++ -*-
|
||||
// VisualBoyAdvance-m - Nintendo Gameboy/GameboyAdvance (TM) emulator.
|
||||
// Copyright (C) 1999-2003 Forgotten
|
||||
// Copyright (C) 2004 Forgotten and the VBA development team
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or(at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#ifndef VBAM_CORE_BASE_VERSION_GEN_H_
|
||||
#define VBAM_CORE_BASE_VERSION_GEN_H_
|
||||
|
||||
#define VBAM_NAME "VisualBoyAdvance-M"
|
||||
#define VBAM_CURRENT_VERSION "@VBAM_VERSION@"
|
||||
|
||||
#define VBAM_FEATURE_STRING ""
|
||||
|
||||
#define _STRINGIFY(N) #N
|
||||
|
||||
#if @VBAM_VERSION_RELEASE@
|
||||
#define VBAM_SUBVERSION_STRING ""
|
||||
#else
|
||||
#define VBAM_SUBVERSION_STRING "-" "@VBAM_REVISION@"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define VBAM_COMPILER "msvc"
|
||||
#define VBAM_COMPILER_DETAIL _STRINGIFY(_MSC_VER)
|
||||
#else
|
||||
#define VBAM_COMPILER ""
|
||||
#define VBAM_COMPILER_DETAIL ""
|
||||
#endif
|
||||
|
||||
#define VBAM_VERSION_STRING VBAM_CURRENT_VERSION VBAM_SUBVERSION_STRING VBAM_FEATURE_STRING VBAM_COMPILER
|
||||
#define VBAM_NAME_AND_VERSION VBAM_NAME " " VBAM_VERSION_STRING
|
||||
#define VBAM_NAME_AND_SUBVERSION VBAM_NAME_AND_VERSION VBAM_SUBVERSION_STRING
|
||||
|
||||
#define VBAM_VERSION VBAM_CURRENT_VERSION VBAM_SUBVERSION_STRING
|
||||
|
||||
#define VER_FILEVERSION_STR VBAM_VERSION
|
||||
#define VER_FILEVERSION @VBAM_WIN_VERSION@
|
||||
|
||||
#endif /* VBAM_CORE_BASE_VERSION_GEN_H_ */
|
|
@ -9,9 +9,9 @@
|
|||
#include <vector>
|
||||
|
||||
#include "core/base/file_util.h"
|
||||
#include "core/base/sizes.h"
|
||||
#include "../System.h"
|
||||
#include "../Util.h"
|
||||
#include "../common/sizes.h"
|
||||
#include "../gba/GBALink.h"
|
||||
#include "../gba/Sound.h"
|
||||
#include "gbCheats.h"
|
||||
|
@ -20,9 +20,9 @@
|
|||
#include "gbSGB.h"
|
||||
#include "gbSound.h"
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
#include "../common/Patch.h"
|
||||
#endif // __LIBRETRO__
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include "core/base/patch.h"
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _stricmp strcasecmp
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
|
||||
#include "../common/Port.h"
|
||||
#include "../common/sizes.h"
|
||||
#include "core/base/sizes.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef GBCHEATS_H
|
||||
#define GBCHEATS_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#include "../System.h"
|
||||
|
||||
struct gbXxCheat {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <cstddef>
|
||||
#include "../common/Types.h"
|
||||
#include "gbGlobals.h"
|
||||
|
||||
uint8_t* gbMemoryMap[16];
|
||||
|
||||
|
@ -30,4 +29,4 @@ bool gbCgbMode = false;
|
|||
bool gbSgbMode = false;
|
||||
bool gbColorOption = false;
|
||||
|
||||
uint8_t (*gbSerialFunction)(uint8_t) = NULL;
|
||||
uint8_t (*gbSerialFunction)(uint8_t) = nullptr;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef GBGLOBALS_H
|
||||
#define GBGLOBALS_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
extern uint8_t* g_bios;
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <cstdint>
|
||||
|
||||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "../common/sizes.h"
|
||||
#include "core/base/port.h"
|
||||
#include "core/base/sizes.h"
|
||||
#include "gb.h"
|
||||
#include "gbGlobals.h"
|
||||
uint8_t gbDaysinMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef GBMEMORY_H
|
||||
#define GBMEMORY_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <time.h>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
|
||||
struct mapperMBC1 {
|
||||
int mapperRAMEnable;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "core/base/file_util.h"
|
||||
#include "core/base/port.h"
|
||||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "gb.h"
|
||||
#include "gbGlobals.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef GBSGB_H
|
||||
#define GBSGB_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // !defined(__LIBRETRO__)
|
||||
|
||||
void gbSgbInit();
|
||||
void gbSgbShutdown();
|
||||
void gbSgbCommand();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
#include "../System.h"
|
||||
#include "core/base/file_util.h"
|
||||
#include "../gba/Sound.h"
|
||||
#include "gb.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef VBA_BKS_H
|
||||
#define VBA_BKS_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#define readWord(addr) \
|
||||
((map[(addr) >> 24].address[(addr)&map[(addr) >> 24].mask]) + ((map[(addr + 1) >> 24].address[(addr + 1) & map[(addr + 1) >> 24].mask]) << 8) + ((map[(addr + 2) >> 24].address[(addr + 2) & map[(addr + 2) >> 24].mask]) << 16) + ((map[(addr + 3) >> 24].address[(addr + 3) & map[(addr + 3) >> 24].mask]) << 24))
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
#include "../System.h"
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
struct CheatsData {
|
||||
int code;
|
||||
int size;
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
#ifndef EEPROM_H
|
||||
#define EEPROM_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#if defined(__LIBRETRO__)
|
||||
extern void eepromSaveGame(uint8_t*& data);
|
||||
extern void eepromReadGame(const uint8_t*& data);
|
||||
#else // !__LIBRETRO__
|
||||
#else // !defined(__LIBRETRO__)
|
||||
extern void eepromSaveGame(gzFile _gzFile);
|
||||
extern void eepromReadGame(gzFile _gzFile, int version);
|
||||
extern void eepromReadGameSkip(gzFile _gzFile, int version);
|
||||
#endif
|
||||
#endif // defined(__LIBRETRO__)
|
||||
extern uint8_t eepromData[0x2000];
|
||||
extern int eepromRead(uint32_t address);
|
||||
extern void eepromWrite(uint32_t address, uint8_t value);
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
#ifndef FLASH_H
|
||||
#define FLASH_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#define FLASH_128K_SZ 0x20000
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#if defined(__LIBRETRO__)
|
||||
extern void flashSaveGame(uint8_t*& data);
|
||||
extern void flashReadGame(const uint8_t*& data);
|
||||
#else
|
||||
#else // !defined(__LIBRETRO__)
|
||||
extern void flashSaveGame(gzFile _gzFile);
|
||||
extern void flashReadGame(gzFile _gzFile, int version);
|
||||
extern void flashReadGameSkip(gzFile _gzFile, int version);
|
||||
#endif
|
||||
#endif // defined(__LIBRETRO__)
|
||||
extern uint8_t flashSaveMemory[FLASH_128K_SZ];
|
||||
extern uint8_t flashRead(uint32_t address);
|
||||
extern void flashWrite(uint32_t address, uint8_t byte);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <cmath>
|
||||
#include <memory.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -13,8 +12,8 @@
|
|||
#include "core/base/file_util.h"
|
||||
#include "../System.h"
|
||||
#include "../Util.h"
|
||||
#include "../common/Port.h"
|
||||
#include "../common/sizes.h"
|
||||
#include "core/base/port.h"
|
||||
#include "core/base/sizes.h"
|
||||
#include "Cheats.h"
|
||||
#include "EEprom.h"
|
||||
#include "Flash.h"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#ifndef GBA_H
|
||||
#define GBA_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#include "../System.h"
|
||||
#include "../Util.h"
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#ifndef GFX_H
|
||||
#define GFX_H
|
||||
|
||||
#include "core/base/port.h"
|
||||
#include "GBA.h"
|
||||
#include "Globals.h"
|
||||
|
||||
#include "../common/Port.h"
|
||||
|
||||
//#define SPRITE_DEBUG
|
||||
|
||||
#ifdef TILED_RENDERING
|
||||
|
|
|
@ -68,7 +68,7 @@ uint16_t IP_LINK_PORT = 5738;
|
|||
std::string IP_LINK_BIND_ADDRESS = "*";
|
||||
|
||||
#include "core/base/message.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "GBA.h"
|
||||
#include "GBALink.h"
|
||||
#include "GBASockClient.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
#include <SFML/Network.hpp>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <type_traits>
|
||||
|
||||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "GBALink.h"
|
||||
#include "GBAcpu.h"
|
||||
#include "RTC.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "GBA.h"
|
||||
#include "GBAinline.h"
|
||||
#include "Globals.h"
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef RTC_H
|
||||
#define RTC_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
uint16_t rtcRead(uint32_t address);
|
||||
void rtcUpdateTime(int ticks);
|
||||
bool rtcWrite(uint32_t address, uint16_t value);
|
||||
|
@ -9,12 +15,12 @@ void rtcEnableRumble(bool e);
|
|||
bool rtcIsEnabled();
|
||||
void rtcReset();
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#if defined(__LIBRETRO__)
|
||||
void rtcReadGame(const uint8_t*& data);
|
||||
void rtcSaveGame(uint8_t*& data);
|
||||
#else
|
||||
#else // !defined(__LIBRETRO__)
|
||||
void rtcReadGame(gzFile gzFile);
|
||||
void rtcSaveGame(gzFile gzFile);
|
||||
#endif
|
||||
#endif // defined(__LIBRETRO__)
|
||||
|
||||
#endif // RTC_H
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "core/base/file_util.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "GBA.h"
|
||||
#include "Globals.h"
|
||||
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#ifndef SOUND_H
|
||||
#define SOUND_H
|
||||
|
||||
// Sound emulation setup/options and GBA sound emulation
|
||||
#include <cstdint>
|
||||
|
||||
#include "../System.h"
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include <zlib.h>
|
||||
#endif // !defined(__LIBRETRO__)
|
||||
|
||||
// Sound emulation setup/options and GBA sound emulation
|
||||
|
||||
//// Setup/options (these affect GBA and GB sound)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SRAM_H
|
||||
#define SRAM_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include <cstdint>
|
||||
|
||||
uint8_t sramRead(uint32_t address);
|
||||
void sramWrite(uint32_t address, uint8_t byte);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "core/base/port.h"
|
||||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "GBA.h"
|
||||
#include "Globals.h"
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <stdio.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "core/base/port.h"
|
||||
#include "../System.h"
|
||||
#include "../common/Port.h"
|
||||
#include "GBA.h"
|
||||
#include "armdis.h"
|
||||
#include "elf.h"
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
#include "../System.h"
|
||||
#include "GBA.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../System.h"
|
||||
#include "GBA.h"
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "GBA.h"
|
||||
#include "elf.h"
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
#include "../System.h"
|
||||
#include "../Util.h"
|
||||
#include "core/base/port.h"
|
||||
#include "core/base/sizes.h"
|
||||
#include "../apu/Blip_Buffer.h"
|
||||
#include "../apu/Gb_Apu.h"
|
||||
#include "../apu/Gb_Oscs.h"
|
||||
#include "../common/Port.h"
|
||||
#include "../common/sizes.h"
|
||||
#include "../gba/Cheats.h"
|
||||
#include "../gba/EEprom.h"
|
||||
#include "../gba/Flash.h"
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _CONFIGMANAGER_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../System.h"
|
||||
#include "../sdl/filters.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -23,10 +23,12 @@
|
|||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __APPLE__
|
||||
|
@ -39,15 +41,12 @@
|
|||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "../common/version_cpp.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#include "core/base/file_util.h"
|
||||
#include "core/base/patch.h"
|
||||
#include "core/base/version.h"
|
||||
#include "../Util.h"
|
||||
#include "../common/Patch.h"
|
||||
#include "../gb/gb.h"
|
||||
#include "../gb/gbCheats.h"
|
||||
#include "../gb/gbGlobals.h"
|
||||
|
@ -1555,7 +1554,7 @@ void SetHomeDataDir()
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
fprintf(stdout, "%s\n", vba_name_and_subversion);
|
||||
fprintf(stdout, "%s\n", kVbamNameAndSubversion.c_str());
|
||||
|
||||
home = argv[0];
|
||||
SetHome(home);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "../gba/GBA.h"
|
||||
#include "../gba/Sound.h"
|
||||
#include "../gba/armdis.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/Port.h"
|
||||
#include "core/base/port.h"
|
||||
#include "../gba/GBA.h"
|
||||
#include "../gba/elf.h"
|
||||
#include "exprNode.h"
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
#ifndef VBA_SDL_FILTERS_H
|
||||
#define VBA_SDL_FILTERS_H
|
||||
|
||||
#include "../common/Types.h"
|
||||
#include "../System.h"
|
||||
#include <cstdint>
|
||||
|
||||
//
|
||||
// Screen filters
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
// -*- C++ -*-
|
||||
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
|
||||
// Copyright (C) 1999-2003 Forgotten
|
||||
// Copyright (C) 2004 Forgotten and the VBA development team
|
||||
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or(at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#ifndef VBAM_VERSION_H
|
||||
#define VBAM_VERSION_H
|
||||
|
||||
#define VBA_NAME "VisualBoyAdvance-M"
|
||||
#define VBA_CURRENT_VERSION "@VERSION@"
|
||||
|
||||
#define VBA_FEATURE_STRING ""
|
||||
|
||||
#define _STRINGIFY(N) #N
|
||||
|
||||
#if @VERSION_RELEASE@
|
||||
#define VBA_SUBVERSION_STRING ""
|
||||
#else
|
||||
#define VBA_SUBVERSION_STRING "-" "@REVISION@"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define VBA_COMPILER "msvc"
|
||||
#define VBA_COMPILER_DETAIL _STRINGIFY(_MSC_VER)
|
||||
#else
|
||||
#define VBA_COMPILER ""
|
||||
#define VBA_COMPILER_DETAIL ""
|
||||
#endif
|
||||
|
||||
#define VBA_VERSION_STRING VBA_CURRENT_VERSION VBA_SUBVERSION_STRING VBA_FEATURE_STRING VBA_COMPILER
|
||||
#define VBA_NAME_AND_VERSION VBA_NAME " " VBA_VERSION_STRING
|
||||
#define VBA_NAME_AND_SUBVERSION VBA_NAME_AND_VERSION VBA_SUBVERSION_STRING
|
||||
|
||||
#define VBAM_VERSION VBA_CURRENT_VERSION VBA_SUBVERSION_STRING
|
||||
|
||||
#define VER_FILEVERSION_STR VBAM_VERSION
|
||||
#define VER_FILEVERSION @WIN_VERSION@
|
||||
|
||||
#endif /* VBAM_VERSION_H */
|
|
@ -1223,10 +1223,10 @@ if(NOT TRANSLATIONS_ONLY)
|
|||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(ver ${VERSION})
|
||||
set(ver ${VBAM_VERSION})
|
||||
|
||||
if(NOT VERSION_RELEASE)
|
||||
set(ver "${ver}-${REVISION}")
|
||||
if(NOT VBAM_VERSION_RELEASE)
|
||||
set(ver "${ver}-${VBAM_REVISION}")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include "../autoupdater.h"
|
||||
#include "../../../common/version_cpp.h"
|
||||
#include "../../strutils.h"
|
||||
#include "sparkle-wrapper.h"
|
||||
|
||||
SparkleWrapper autoupdater;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "../autoupdater.h"
|
||||
#include "../../../common/version_cpp.h"
|
||||
|
||||
#include "core/base/version.h"
|
||||
#include "../../strutils.h"
|
||||
#include "winsparkle-wrapper.h"
|
||||
|
||||
|
@ -7,7 +8,7 @@
|
|||
void initAutoupdater()
|
||||
{
|
||||
// even if we are a nightly, only check latest stable version
|
||||
wxString version = strutils::split(vbam_version, '-')[0];
|
||||
wxString version = strutils::split(kVbamVersion, '-')[0];
|
||||
#ifndef NO_HTTPS
|
||||
win_sparkle_set_appcast_url("https://data.visualboyadvance-m.org/appcast.xml");
|
||||
#else
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <wx/wfstream.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../common/version_cpp.h"
|
||||
#include "core/base/version.h"
|
||||
#include "../gb/gbPrinter.h"
|
||||
#include "../gba/agbprint.h"
|
||||
#include "config/option-proxy.h"
|
||||
|
@ -2297,7 +2297,7 @@ EVT_HANDLER(wxID_ABOUT, "About...")
|
|||
{
|
||||
wxAboutDialogInfo ai;
|
||||
ai.SetName(wxT("VisualBoyAdvance-M"));
|
||||
wxString version(vbam_version);
|
||||
wxString version(kVbamVersion);
|
||||
ai.SetVersion(version);
|
||||
// setting website, icon, license uses custom aboutbox on win32 & macosx
|
||||
// but at least win32 standard about is nothing special
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <wx/control.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
||||
#include "../common/sizes.h"
|
||||
#include "core/base/sizes.h"
|
||||
#include "../gb/gb.h"
|
||||
#include "dialogs/game-maker.h"
|
||||
#include "dialogs/validated-child.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include <wx/menu.h>
|
||||
#include <SDL_joystick.h>
|
||||
|
||||
#include "../common/Patch.h"
|
||||
#include "../common/version_cpp.h"
|
||||
#include "core/base/patch.h"
|
||||
#include "core/base/version.h"
|
||||
#include "../gb/gbPrinter.h"
|
||||
#include "../gba/RTC.h"
|
||||
#include "../gba/agbprint.h"
|
||||
|
@ -545,7 +545,7 @@ void GameArea::SetFrameTitle()
|
|||
}
|
||||
|
||||
tit.append(wxT("VisualBoyAdvance-M "));
|
||||
tit.append(vbam_version);
|
||||
tit.append(kVbamVersion);
|
||||
|
||||
#ifndef NO_LINK
|
||||
int playerId = GetLinkPlayerId();
|
||||
|
|
|
@ -5,7 +5,7 @@ AAAAA_MAINICON ICON "icons/visualboyadvance-m.ico"
|
|||
#define wxUSE_NO_MANIFEST 1
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
#include "version.h"
|
||||
#include "core/base/version_gen.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue