From f8372c51a76801d5c5d947406f040578a6347903 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 24 Jan 2023 14:26:14 +0100 Subject: [PATCH] Revert "wip headers" This reverts commit e3e2c3a0d2daaf1455196f27f2c754bd2a16a230. --- core/emulator.h | 9 +- core/hw/aica/sgc_if.cpp | 1 + core/hw/bba/rtl8139c.h | 436 ++++++++++++------------ core/hw/holly/sb_mem.cpp | 2 +- core/hw/maple/maple_devs.cpp | 1 + core/hw/maple/maple_if.cpp | 1 + core/hw/mem/mem_watch.h | 1 + core/hw/naomi/naomi.cpp | 5 +- core/hw/naomi/naomi_cart.h | 5 +- core/hw/naomi/naomi_flashrom.cpp | 1 + core/hw/naomi/naomi_m3comm.cpp | 2 - core/hw/pvr/Renderer_if.cpp | 2 +- core/hw/pvr/elan.cpp | 1 + core/hw/pvr/spg.cpp | 5 +- core/hw/pvr/ta_ctx.cpp | 4 - core/hw/pvr/ta_ctx.h | 4 +- core/hw/pvr/ta_vtx.cpp | 2 +- core/hw/sh4/dyna/driver.cpp | 2 + core/hw/sh4/dyna/ssa.h | 1 + core/hw/sh4/interpr/sh4_interpreter.cpp | 1 + core/hw/sh4/interpr/sh4_opcodes.cpp | 5 +- core/hw/sh4/modules/cpg.cpp | 2 +- core/hw/sh4/modules/mmu.cpp | 6 +- core/hw/sh4/modules/mmu.h | 1 + core/hw/sh4/modules/rtc.cpp | 2 +- core/hw/sh4/modules/ubc.cpp | 2 +- core/hw/sh4/modules/wince.h | 2 +- core/input/keyboard_device.h | 1 - core/input/mouse.cpp | 1 - core/linux-dist/main.cpp | 5 +- core/linux/common.cpp | 2 - core/network/naomi_network.cpp | 2 - core/network/naomi_network.h | 4 +- core/oslib/audiostream.cpp | 1 + core/rec-x64/rec_x64.cpp | 1 + core/reios/descrambl.cpp | 7 +- core/rend/CustomTexture.cpp | 1 + core/rend/TexCache.cpp | 1 + core/rend/TexCache.h | 3 - core/rend/boxart/boxart.h | 9 +- core/rend/boxart/gamesdb.h | 5 +- core/rend/boxart/scraper.h | 6 +- core/rend/dx11/dx11_renderer.cpp | 1 - core/rend/dx11/dx11_renderer.h | 1 + core/rend/dx11/oit/dx11_oitrenderer.cpp | 2 + core/rend/gl4/gl4naomi2.cpp | 1 - core/rend/gl4/gl4naomi2.h | 1 + core/rend/gl4/gldraw.cpp | 2 +- core/rend/gl4/gles.cpp | 1 - core/rend/gles/gldraw.cpp | 1 + core/rend/gles/gltex.cpp | 5 +- core/rend/gles/postprocess.cpp | 4 +- core/rend/gui.cpp | 10 +- core/rend/gui.h | 3 +- core/rend/gui_util.h | 9 +- core/rend/mainui.cpp | 5 +- core/rend/osd.cpp | 1 - core/rend/sorter.h | 1 + core/rend/vulkan/drawer.cpp | 1 - core/rend/vulkan/drawer.h | 1 + core/rend/vulkan/oit/oit_drawer.cpp | 1 - core/rend/vulkan/oit/oit_drawer.h | 1 + core/rend/vulkan/pipeline.cpp | 1 + core/rend/vulkan/texture.cpp | 1 + core/rend/vulkan/texture.h | 4 +- core/rend/vulkan/vulkan_renderer.cpp | 1 + core/rend/vulkan/vulkan_renderer.h | 5 +- core/sdl/sdl.cpp | 4 +- core/serialize.cpp | 4 +- 69 files changed, 302 insertions(+), 325 deletions(-) diff --git a/core/emulator.h b/core/emulator.h index 571ec6c12..e469fcb12 100644 --- a/core/emulator.h +++ b/core/emulator.h @@ -20,13 +20,14 @@ */ #pragma once #include "types.h" - #include -#include #include -#include -#include #include +#include +#include +#include +#include +#include void loadGameSpecificSettings(); void SaveSettings(); diff --git a/core/hw/aica/sgc_if.cpp b/core/hw/aica/sgc_if.cpp index 6474fba49..d32509988 100755 --- a/core/hw/aica/sgc_if.cpp +++ b/core/hw/aica/sgc_if.cpp @@ -27,6 +27,7 @@ #include "hw/gdrom/gdrom_if.h" #include "cfg/option.h" #include "serialize.h" +#include "hw/hwreg.h" #include #include diff --git a/core/hw/bba/rtl8139c.h b/core/hw/bba/rtl8139c.h index 0e8fdd864..973d90047 100644 --- a/core/hw/bba/rtl8139c.h +++ b/core/hw/bba/rtl8139c.h @@ -1,218 +1,218 @@ -/* - Copyright (c) 2004 Fabrice Bellard and QEMU contributors - - This file is part of Flycast. - - Flycast 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 of the License, or - (at your option) any later version. - - Flycast 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 Flycast. If not, see . -*/ -#pragma once -#include "types.h" - -#include -#include - -typedef u8 uint8_t; -typedef u16 uint16_t; -typedef u64 uint64_t; - -typedef uint64_t dma_addr_t; -typedef uint64_t hwaddr; - -#ifdef _MSC_VER -#if defined(_WIN64) -typedef __int64 ssize_t; -#else -typedef long ssize_t; -#endif -#endif - -#define ETH_ALEN 6 - -#define DMA_ADDR_FMT "%" PRIx64 - -struct MACAddr { - uint8_t a[6]; -}; - -uint32_t net_crc32(const uint8_t *p, int len); - -struct NetClientState { - int link_down; -}; - -typedef struct NICConf { - MACAddr macaddr; -} NICConf; - -/** MemoryRegion: - * - * A struct representing a memory region. - */ -struct MemoryRegion { - uint32_t size; -}; - -#define glue(a, b) _glue(a, b) -#define _glue(a, b) a ## b - -#if defined(HOST_WORDS_BIGENDIAN) -#define be_bswap(v, size) (v) -#define le_bswap(v, size) glue(bswap, size)(v) -#define be_bswaps(v, size) -#define le_bswaps(p, size) do { *p = glue(bswap, size)(*p); } while(0) -#else -#define le_bswap(v, size) (v) -#define be_bswap(v, size) glue(bswap, size)(v) -#define le_bswaps(v, size) -#define be_bswaps(p, size) do { *p = glue(bswap, size)(*p); } while(0) -#endif - -#define CPU_CONVERT(endian, size, type)\ -static inline type endian ## size ## _to_cpu(type v)\ -{\ - return glue(endian, _bswap)(v, size);\ -}\ -\ -static inline type cpu_to_ ## endian ## size(type v)\ -{\ - return glue(endian, _bswap)(v, size);\ -}\ -\ -static inline void endian ## size ## _to_cpus(type *p)\ -{\ - glue(endian, _bswaps)(p, size);\ -}\ -\ -static inline void cpu_to_ ## endian ## size ## s(type *p)\ -{\ - glue(endian, _bswaps)(p, size);\ -} - -CPU_CONVERT(le, 16, uint16_t) - -CPU_CONVERT(le, 32, uint32_t) - -static inline int lduw_he_p(const void *ptr) -{ - uint16_t r; - memcpy(&r, ptr, sizeof(r)); - return r; -} -static inline void stl_he_p(void *ptr, uint32_t v) -{ - memcpy(ptr, &v, sizeof(v)); -} - -static inline int lduw_le_p(const void *ptr) -{ - return (uint16_t)le_bswap(lduw_he_p(ptr), 16); -} -static inline void stl_le_p(void *ptr, uint32_t v) -{ - stl_he_p(ptr, le_bswap(v, 32)); -} - -/* - * PCI support - */ -static inline uint16_t pci_get_word(const uint8_t *config) -{ - return lduw_le_p(config); -} -static inline void pci_set_long(uint8_t *config, uint32_t val) -{ - stl_le_p(config, val); -} - -typedef uint64_t pcibus_t; - -#define PCI_DEVICE(d) ((PCIDevice *)(d)) -#define RTL8139(d) ((RTL8139State *)(d)); - -typedef struct PCIIORegion { - pcibus_t addr; /* current PCI mapping address. -1 means not mapped */ -#define PCI_BAR_UNMAPPED (~(pcibus_t)0) - pcibus_t size; - uint8_t type; -} PCIIORegion; - -#define PCI_ROM_SLOT 6 -#define PCI_NUM_REGIONS 7 - -struct PCIDevice { - /* PCI config space */ - uint8_t *config; - - /* Used to enable config checks on load. Note that writable bits are - * never checked even if set in cmask. */ - uint8_t *cmask; - - /* Used to implement R/W bytes */ - uint8_t *wmask; - - PCIIORegion io_regions[PCI_NUM_REGIONS]; -}; - -void pci_set_irq(PCIDevice *pci_dev, int level); -void pci_register_bar(PCIDevice *pci_dev, int region_num, uint8_t type, MemoryRegion *memory); - -void pci_dma_read(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len); -void pci_dma_write(PCIDevice *dev, dma_addr_t addr, const void *buf, dma_addr_t len); - -#define g_malloc malloc -#define g_free free - -#define PCI_VENDOR_ID_REALTEK 0x10ec -#define PCI_DEVICE_ID_REALTEK_8139 0x8139 - -#define FMT_PCIBUS PRIx64 - -#define PCI_HEADER_TYPE 0x0e /* 8 bits */ -#define PCI_HEADER_TYPE_BRIDGE 1 -#define PCI_HEADER_TYPE_MULTI_FUNCTION 0x80 - -/* -* Base addresses specify locations in memory or I/O space. -* Decoded size can be determined by writing a value of -* 0xffffffff to the register, and reading it back. Only -* 1 bits are decoded. -*/ -#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ -#define PCI_BASE_ADDRESS_SPACE_IO 0x01 -#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00 -#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ -#define PCI_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */ -#define PCI_ROM_ADDRESS_ENABLE 0x01 - -#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ -#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */ - -#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ - -struct RTL8139State; - -ssize_t qemu_send_packet(RTL8139State *s, const uint8_t *buf, int size); - -void pci_rtl8139_realize(PCIDevice *dev); - -uint64_t rtl8139_ioport_read(void *opaque, hwaddr addr, unsigned size); -void rtl8139_ioport_write(void *opaque, hwaddr addr, uint64_t val, unsigned size); -void rtl8139_reset(RTL8139State *s); -bool rtl8139_can_receive(RTL8139State *s); -ssize_t rtl8139_receive(RTL8139State *s, const uint8_t *buf, size_t size); - -RTL8139State *rtl8139_init(NICConf *conf); -void rtl8139_destroy(RTL8139State *state); -void rtl8139_serialize(RTL8139State *state, Serializer& ser); -bool rtl8139_deserialize(RTL8139State *state, Deserializer& deser); +/* + Copyright (c) 2004 Fabrice Bellard and QEMU contributors + + This file is part of Flycast. + + Flycast 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 of the License, or + (at your option) any later version. + + Flycast 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 Flycast. If not, see . +*/ +#pragma once +#include +#include +#include "types.h" +#include "hw/sh4/sh4_sched.h" + +typedef u8 uint8_t; +typedef u16 uint16_t; +typedef u64 uint64_t; + +typedef uint64_t dma_addr_t; +typedef uint64_t hwaddr; + +#ifdef _MSC_VER +#if defined(_WIN64) +typedef __int64 ssize_t; +#else +typedef long ssize_t; +#endif +#endif + +#define ETH_ALEN 6 + +#define DMA_ADDR_FMT "%" PRIx64 + +struct MACAddr { + uint8_t a[6]; +}; + +uint32_t net_crc32(const uint8_t *p, int len); + +struct NetClientState { + int link_down; +}; + +typedef struct NICConf { + MACAddr macaddr; +} NICConf; + +/** MemoryRegion: + * + * A struct representing a memory region. + */ +struct MemoryRegion { + uint32_t size; +}; + +#define glue(a, b) _glue(a, b) +#define _glue(a, b) a ## b + +#if defined(HOST_WORDS_BIGENDIAN) +#define be_bswap(v, size) (v) +#define le_bswap(v, size) glue(bswap, size)(v) +#define be_bswaps(v, size) +#define le_bswaps(p, size) do { *p = glue(bswap, size)(*p); } while(0) +#else +#define le_bswap(v, size) (v) +#define be_bswap(v, size) glue(bswap, size)(v) +#define le_bswaps(v, size) +#define be_bswaps(p, size) do { *p = glue(bswap, size)(*p); } while(0) +#endif + +#define CPU_CONVERT(endian, size, type)\ +static inline type endian ## size ## _to_cpu(type v)\ +{\ + return glue(endian, _bswap)(v, size);\ +}\ +\ +static inline type cpu_to_ ## endian ## size(type v)\ +{\ + return glue(endian, _bswap)(v, size);\ +}\ +\ +static inline void endian ## size ## _to_cpus(type *p)\ +{\ + glue(endian, _bswaps)(p, size);\ +}\ +\ +static inline void cpu_to_ ## endian ## size ## s(type *p)\ +{\ + glue(endian, _bswaps)(p, size);\ +} + +CPU_CONVERT(le, 16, uint16_t) + +CPU_CONVERT(le, 32, uint32_t) + +static inline int lduw_he_p(const void *ptr) +{ + uint16_t r; + memcpy(&r, ptr, sizeof(r)); + return r; +} +static inline void stl_he_p(void *ptr, uint32_t v) +{ + memcpy(ptr, &v, sizeof(v)); +} + +static inline int lduw_le_p(const void *ptr) +{ + return (uint16_t)le_bswap(lduw_he_p(ptr), 16); +} +static inline void stl_le_p(void *ptr, uint32_t v) +{ + stl_he_p(ptr, le_bswap(v, 32)); +} + +/* + * PCI support + */ +static inline uint16_t pci_get_word(const uint8_t *config) +{ + return lduw_le_p(config); +} +static inline void pci_set_long(uint8_t *config, uint32_t val) +{ + stl_le_p(config, val); +} + +typedef uint64_t pcibus_t; + +#define PCI_DEVICE(d) ((PCIDevice *)(d)) +#define RTL8139(d) ((RTL8139State *)(d)); + +typedef struct PCIIORegion { + pcibus_t addr; /* current PCI mapping address. -1 means not mapped */ +#define PCI_BAR_UNMAPPED (~(pcibus_t)0) + pcibus_t size; + uint8_t type; +} PCIIORegion; + +#define PCI_ROM_SLOT 6 +#define PCI_NUM_REGIONS 7 + +struct PCIDevice { + /* PCI config space */ + uint8_t *config; + + /* Used to enable config checks on load. Note that writable bits are + * never checked even if set in cmask. */ + uint8_t *cmask; + + /* Used to implement R/W bytes */ + uint8_t *wmask; + + PCIIORegion io_regions[PCI_NUM_REGIONS]; +}; + +void pci_set_irq(PCIDevice *pci_dev, int level); +void pci_register_bar(PCIDevice *pci_dev, int region_num, uint8_t type, MemoryRegion *memory); + +void pci_dma_read(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len); +void pci_dma_write(PCIDevice *dev, dma_addr_t addr, const void *buf, dma_addr_t len); + +#define g_malloc malloc +#define g_free free + +#define PCI_VENDOR_ID_REALTEK 0x10ec +#define PCI_DEVICE_ID_REALTEK_8139 0x8139 + +#define FMT_PCIBUS PRIx64 + +#define PCI_HEADER_TYPE 0x0e /* 8 bits */ +#define PCI_HEADER_TYPE_BRIDGE 1 +#define PCI_HEADER_TYPE_MULTI_FUNCTION 0x80 + +/* +* Base addresses specify locations in memory or I/O space. +* Decoded size can be determined by writing a value of +* 0xffffffff to the register, and reading it back. Only +* 1 bits are decoded. +*/ +#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ +#define PCI_BASE_ADDRESS_SPACE_IO 0x01 +#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00 +#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ +#define PCI_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */ +#define PCI_ROM_ADDRESS_ENABLE 0x01 + +#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ +#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */ + +#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ + +struct RTL8139State; + +ssize_t qemu_send_packet(RTL8139State *s, const uint8_t *buf, int size); + +void pci_rtl8139_realize(PCIDevice *dev); + +uint64_t rtl8139_ioport_read(void *opaque, hwaddr addr, unsigned size); +void rtl8139_ioport_write(void *opaque, hwaddr addr, uint64_t val, unsigned size); +void rtl8139_reset(RTL8139State *s); +bool rtl8139_can_receive(RTL8139State *s); +ssize_t rtl8139_receive(RTL8139State *s, const uint8_t *buf, size_t size); + +RTL8139State *rtl8139_init(NICConf *conf); +void rtl8139_destroy(RTL8139State *state); +void rtl8139_serialize(RTL8139State *state, Serializer& ser); +bool rtl8139_deserialize(RTL8139State *state, Deserializer& deser); diff --git a/core/hw/holly/sb_mem.cpp b/core/hw/holly/sb_mem.cpp index da64f1b9c..f0f22475f 100644 --- a/core/hw/holly/sb_mem.cpp +++ b/core/hw/holly/sb_mem.cpp @@ -12,7 +12,7 @@ #include "hw/modem/modem.h" #include "hw/naomi/naomi.h" #include "hw/pvr/pvr_mem.h" -#include "hw/mem/_vmem.h" +#include "hw/sh4/sh4_mem.h" #include "reios/reios.h" #include "hw/bba/bba.h" #include "cfg/option.h" diff --git a/core/hw/maple/maple_devs.cpp b/core/hw/maple/maple_devs.cpp index 5459e642b..6fecb2adf 100755 --- a/core/hw/maple/maple_devs.cpp +++ b/core/hw/maple/maple_devs.cpp @@ -4,6 +4,7 @@ #include "hw/pvr/spg.h" #include "oslib/audiostream.h" #include "oslib/oslib.h" +#include "cfg/option.h" #include "hw/aica/sgc_if.h" #include diff --git a/core/hw/maple/maple_if.cpp b/core/hw/maple/maple_if.cpp index 6995797e4..7de602f48 100644 --- a/core/hw/maple/maple_if.cpp +++ b/core/hw/maple/maple_if.cpp @@ -6,6 +6,7 @@ #include "hw/sh4/sh4_mem.h" #include "hw/sh4/sh4_sched.h" #include "network/ggpo.h" +#include "input/gamepad_device.h" enum MaplePattern { diff --git a/core/hw/mem/mem_watch.h b/core/hw/mem/mem_watch.h index c102617e3..ee755228c 100644 --- a/core/hw/mem/mem_watch.h +++ b/core/hw/mem/mem_watch.h @@ -24,6 +24,7 @@ #include "hw/pvr/pvr_mem.h" #include "hw/pvr/elan.h" #include "rend/TexCache.h" +#include #include namespace memwatch diff --git a/core/hw/naomi/naomi.cpp b/core/hw/naomi/naomi.cpp index 8ea50aa06..a203de6e7 100644 --- a/core/hw/naomi/naomi.cpp +++ b/core/hw/naomi/naomi.cpp @@ -2,13 +2,14 @@ This file is a mix of my code, Zezu's, and duno wtf-else (most likely ElSemi's ?) */ #include "types.h" +#include "cfg/cfg.h" #include "hw/holly/sb.h" #include "hw/sh4/sh4_mem.h" #include "hw/holly/holly_intc.h" #include "hw/maple/maple_cfg.h" #include "hw/sh4/sh4_sched.h" +#include "hw/sh4/modules/dmac.h" #include "hw/aica/aica_if.h" -#include "hw/hwreg.h" #include "naomi.h" #include "naomi_cart.h" @@ -17,8 +18,6 @@ #include "serialize.h" #include "network/output.h" -#include - //#define NAOMI_COMM static NaomiM3Comm m3comm; diff --git a/core/hw/naomi/naomi_cart.h b/core/hw/naomi/naomi_cart.h index 54acac84f..9f0f6fa8b 100644 --- a/core/hw/naomi/naomi_cart.h +++ b/core/hw/naomi/naomi_cart.h @@ -1,11 +1,10 @@ #pragma once +#include +#include #include "types.h" #include "emulator.h" -#include -#include - struct RomBootID { char boardName[16]; diff --git a/core/hw/naomi/naomi_flashrom.cpp b/core/hw/naomi/naomi_flashrom.cpp index 08b3ff0e3..0a8ee292e 100644 --- a/core/hw/naomi/naomi_flashrom.cpp +++ b/core/hw/naomi/naomi_flashrom.cpp @@ -20,6 +20,7 @@ */ #include "naomi_flashrom.h" #include "hw/flashrom/flashrom.h" +#include "hw/holly/sb_mem.h" #include "hw/maple/maple_devs.h" #include "cfg/option.h" diff --git a/core/hw/naomi/naomi_m3comm.cpp b/core/hw/naomi/naomi_m3comm.cpp index e9ef8acbf..aa6cc897d 100644 --- a/core/hw/naomi/naomi_m3comm.cpp +++ b/core/hw/naomi/naomi_m3comm.cpp @@ -30,8 +30,6 @@ #include "hw/sh4/sh4_mem.h" #include "network/naomi_network.h" #include "emulator.h" -#include "rend/gui.h" - #include #include diff --git a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp index 3ad998fa9..4b75f39ee 100644 --- a/core/hw/pvr/Renderer_if.cpp +++ b/core/hw/pvr/Renderer_if.cpp @@ -1,12 +1,12 @@ #include "Renderer_if.h" #include "spg.h" +#include "hw/pvr/pvr_mem.h" #include "rend/TexCache.h" #include "rend/transform_matrix.h" #include "cfg/option.h" #include "emulator.h" #include "serialize.h" #include "hw/holly/holly_intc.h" -#include "hw/sh4/sh4_if.h" #include "profiler/fc_profiler.h" #include diff --git a/core/hw/pvr/elan.cpp b/core/hw/pvr/elan.cpp index b554687eb..c82e1920d 100644 --- a/core/hw/pvr/elan.cpp +++ b/core/hw/pvr/elan.cpp @@ -56,6 +56,7 @@ #include "hw/holly/holly_intc.h" #include "hw/holly/sb.h" #include "hw/pvr/Renderer_if.h" +#include "hw/sh4/sh4_sched.h" #include "hw/sh4/sh4_mem.h" #include "emulator.h" #include "serialize.h" diff --git a/core/hw/pvr/spg.cpp b/core/hw/pvr/spg.cpp index 529d370bc..cb567113f 100755 --- a/core/hw/pvr/spg.cpp +++ b/core/hw/pvr/spg.cpp @@ -3,16 +3,13 @@ #include "hw/holly/holly_intc.h" #include "hw/holly/sb.h" #include "hw/sh4/sh4_sched.h" +#include "input/gamepad_device.h" #include "oslib/oslib.h" #include "rend/TexCache.h" #include "hw/maple/maple_if.h" #include "serialize.h" #include "network/ggpo.h" -#ifdef TEST_AUTOMATION -#include "input/gamepad_device.h" -#endif - //SPG emulation; Scanline/Raster beam registers & interrupts static u32 clc_pvr_scanline; diff --git a/core/hw/pvr/ta_ctx.cpp b/core/hw/pvr/ta_ctx.cpp index bf98848e8..6ec8880e6 100644 --- a/core/hw/pvr/ta_ctx.cpp +++ b/core/hw/pvr/ta_ctx.cpp @@ -3,10 +3,6 @@ #include "cfg/option.h" #include "Renderer_if.h" #include "serialize.h" -#include "stdclass.h" - -#include -#include extern u32 fskip; static int RenderCount; diff --git a/core/hw/pvr/ta_ctx.h b/core/hw/pvr/ta_ctx.h index ebb214bad..d66671749 100644 --- a/core/hw/pvr/ta_ctx.h +++ b/core/hw/pvr/ta_ctx.h @@ -3,11 +3,9 @@ #include "ta_structs.h" #include "pvr_regs.h" #include "helper_classes.h" +#include "stdclass.h" #include "oslib/oslib.h" -#include -#include - class BaseTextureCacheData; struct N2LightModel; diff --git a/core/hw/pvr/ta_vtx.cpp b/core/hw/pvr/ta_vtx.cpp index 93b886d5c..8fe3730d7 100644 --- a/core/hw/pvr/ta_vtx.cpp +++ b/core/hw/pvr/ta_vtx.cpp @@ -11,7 +11,7 @@ #include "cfg/option.h" #include -#include +#include #define TACALL DYNACALL #ifdef NDEBUG diff --git a/core/hw/sh4/dyna/driver.cpp b/core/hw/sh4/dyna/driver.cpp index aab700ce0..a4da6cddc 100644 --- a/core/hw/sh4/dyna/driver.cpp +++ b/core/hw/sh4/dyna/driver.cpp @@ -7,8 +7,10 @@ #include "hw/sh4/sh4_mem.h" #include "hw/sh4/modules/mmu.h" +#include "cfg/option.h" #include +#include #include "blockmanager.h" #include "ngen.h" diff --git a/core/hw/sh4/dyna/ssa.h b/core/hw/sh4/dyna/ssa.h index 2de3d6804..e713f4c35 100644 --- a/core/hw/sh4/dyna/ssa.h +++ b/core/hw/sh4/dyna/ssa.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "types.h" #include "decoder.h" #include "hw/sh4/modules/mmu.h" diff --git a/core/hw/sh4/interpr/sh4_interpreter.cpp b/core/hw/sh4/interpr/sh4_interpreter.cpp index 8c75d18f9..2185c55a4 100644 --- a/core/hw/sh4/interpr/sh4_interpreter.cpp +++ b/core/hw/sh4/interpr/sh4_interpreter.cpp @@ -10,6 +10,7 @@ #include "../sh4_interrupts.h" #include "hw/sh4/sh4_mem.h" #include "../sh4_sched.h" +#include "hw/holly/sb.h" #include "../sh4_cache.h" #include "debug/gdb_server.h" diff --git a/core/hw/sh4/interpr/sh4_opcodes.cpp b/core/hw/sh4/interpr/sh4_opcodes.cpp index ef31d3279..9dbafabf5 100644 --- a/core/hw/sh4/interpr/sh4_opcodes.cpp +++ b/core/hw/sh4/interpr/sh4_opcodes.cpp @@ -10,11 +10,8 @@ #include "hw/sh4/sh4_core.h" #include "hw/sh4/modules/ccn.h" #include "hw/sh4/sh4_interrupts.h" -#include "debug/gdb_server.h" - -#ifdef STRICT_MODE #include "hw/sh4/sh4_cache.h" -#endif +#include "debug/gdb_server.h" #define iNimp cpu_iNimp diff --git a/core/hw/sh4/modules/cpg.cpp b/core/hw/sh4/modules/cpg.cpp index e7f8862f5..94984ff5a 100644 --- a/core/hw/sh4/modules/cpg.cpp +++ b/core/hw/sh4/modules/cpg.cpp @@ -1,4 +1,4 @@ -#include "hw/hwreg.h" +#include "types.h" #include "hw/sh4/sh4_mmr.h" //Init term res diff --git a/core/hw/sh4/modules/mmu.cpp b/core/hw/sh4/modules/mmu.cpp index 28782fffc..25d1e8ceb 100644 --- a/core/hw/sh4/modules/mmu.cpp +++ b/core/hw/sh4/modules/mmu.cpp @@ -1,5 +1,4 @@ #include "mmu.h" -#include "hw/mem/_vmem.h" #include "hw/sh4/sh4_if.h" #include "hw/sh4/sh4_interrupts.h" #include "hw/sh4/sh4_core.h" @@ -21,8 +20,13 @@ This is mostly hacked-on as the core was never meant to have mmu support There are two modes, one with 'full' mmu emulation (for wince/bleem/wtfever) and a fast-hack mode for 1mb sqremaps (for katana) */ +#include "mmu.h" +#include "hw/sh4/sh4_if.h" #include "ccn.h" +#include "hw/sh4/sh4_interrupts.h" +#include "hw/sh4/sh4_if.h" #include "hw/sh4/sh4_mem.h" + #include "hw/mem/_vmem.h" //#define TRACE_WINCE_SYSCALLS diff --git a/core/hw/sh4/modules/mmu.h b/core/hw/sh4/modules/mmu.h index a876bec90..1f8242f66 100644 --- a/core/hw/sh4/modules/mmu.h +++ b/core/hw/sh4/modules/mmu.h @@ -1,6 +1,7 @@ #pragma once #include "types.h" #include "hw/sh4/sh4_mmr.h" +#include "hw/mem/_vmem.h" #include "cfg/option.h" #include "hw/sh4/dyna/ngen.h" diff --git a/core/hw/sh4/modules/rtc.cpp b/core/hw/sh4/modules/rtc.cpp index 1e8a7f4ee..9cd9a350f 100644 --- a/core/hw/sh4/modules/rtc.cpp +++ b/core/hw/sh4/modules/rtc.cpp @@ -1,7 +1,7 @@ /* The rtc isn't working on dreamcast I'm told */ -#include "hw/hwreg.h" +#include "types.h" #include "hw/sh4/sh4_mmr.h" //Init term res diff --git a/core/hw/sh4/modules/ubc.cpp b/core/hw/sh4/modules/ubc.cpp index f4df1a1eb..8ee1ebf7d 100644 --- a/core/hw/sh4/modules/ubc.cpp +++ b/core/hw/sh4/modules/ubc.cpp @@ -1,6 +1,6 @@ //ubc is disabled on dreamcast and can't be used ... but kos-debug uses it !... -#include "hw/hwreg.h" +#include "types.h" #include "hw/sh4/sh4_mmr.h" //Init term res diff --git a/core/hw/sh4/modules/wince.h b/core/hw/sh4/modules/wince.h index 21b360d81..8abf1bd34 100644 --- a/core/hw/sh4/modules/wince.h +++ b/core/hw/sh4/modules/wince.h @@ -16,9 +16,9 @@ You should have received a copy of the GNU General Public License along with reicast. If not, see . */ -#ifdef TRACE_WINCE_SYSCALLS #include "hw/sh4/sh4_sched.h" +#ifdef TRACE_WINCE_SYSCALLS #define PUserKData 0x00005800 #define SYSHANDLE_OFFSET 0x004 #define SYS_HANDLE_BASE 64 diff --git a/core/input/keyboard_device.h b/core/input/keyboard_device.h index 55d700ca2..ac1029f14 100644 --- a/core/input/keyboard_device.h +++ b/core/input/keyboard_device.h @@ -18,7 +18,6 @@ */ #pragma once #include "types.h" -#include "cfg/option.h" #include "gamepad_device.h" #include "rend/gui.h" #include diff --git a/core/input/mouse.cpp b/core/input/mouse.cpp index 97d528286..a63b7f0f6 100644 --- a/core/input/mouse.cpp +++ b/core/input/mouse.cpp @@ -17,7 +17,6 @@ along with Flycast. If not, see . */ #include "mouse.h" -#include "cfg/option.h" #include "rend/gui.h" // Mouse buttons diff --git a/core/linux-dist/main.cpp b/core/linux-dist/main.cpp index 04081ffa5..79ec2d938 100644 --- a/core/linux-dist/main.cpp +++ b/core/linux-dist/main.cpp @@ -4,17 +4,16 @@ #include "types.h" #if defined(__unix__) || defined(__SWITCH__) +#include "hw/sh4/dyna/blockmanager.h" #include "log/LogManager.h" #include "emulator.h" #include "rend/mainui.h" #include "oslib/directory.h" #include "oslib/oslib.h" -#include "stdclass.h" +#include #include -#include #include -#include #if defined(__SWITCH__) #include "nswitch.h" diff --git a/core/linux/common.cpp b/core/linux/common.cpp index 0e1a6314b..5927b4719 100644 --- a/core/linux/common.cpp +++ b/core/linux/common.cpp @@ -10,8 +10,6 @@ #include #if defined(__linux__) && !defined(__ANDROID__) #include -#endif -#if !defined(TARGET_BSD) && !defined(__ANDROID__) && defined(TARGET_VIDEOCORE) #include #endif #include diff --git a/core/network/naomi_network.cpp b/core/network/naomi_network.cpp index 85d6138cf..500202ca0 100644 --- a/core/network/naomi_network.cpp +++ b/core/network/naomi_network.cpp @@ -20,8 +20,6 @@ #include "hw/naomi/naomi_cart.h" #include "hw/naomi/naomi_flashrom.h" #include "cfg/option.h" -#include "rend/gui.h" - #include #include diff --git a/core/network/naomi_network.h b/core/network/naomi_network.h index 5ef0e91ea..29c3188b6 100644 --- a/core/network/naomi_network.h +++ b/core/network/naomi_network.h @@ -20,13 +20,11 @@ #include "types.h" #include "net_platform.h" #include "miniupnp.h" +#include "rend/gui.h" #include "cfg/option.h" #include "emulator.h" - -#include #include #include -#include class NaomiNetwork { diff --git a/core/oslib/audiostream.cpp b/core/oslib/audiostream.cpp index a985a22ab..0cfc1a94f 100644 --- a/core/oslib/audiostream.cpp +++ b/core/oslib/audiostream.cpp @@ -1,4 +1,5 @@ #include "audiostream.h" +#include struct SoundFrame { s16 l; s16 r; }; diff --git a/core/rec-x64/rec_x64.cpp b/core/rec-x64/rec_x64.cpp index d0ad9ac27..888b60092 100644 --- a/core/rec-x64/rec_x64.cpp +++ b/core/rec-x64/rec_x64.cpp @@ -11,6 +11,7 @@ using namespace Xbyak::util; #include "types.h" #include "hw/sh4/sh4_opcode_list.h" #include "hw/sh4/dyna/ngen.h" +#include "hw/sh4/modules/ccn.h" #include "hw/sh4/modules/mmu.h" #include "hw/sh4/sh4_interrupts.h" diff --git a/core/reios/descrambl.cpp b/core/reios/descrambl.cpp index 9912b18e4..445cd35b2 100644 --- a/core/reios/descrambl.cpp +++ b/core/reios/descrambl.cpp @@ -7,8 +7,7 @@ */ #include "descrambl.h" - -#include +#include #define MAXCHUNK (2048*1024) @@ -48,7 +47,7 @@ static void load_chunk(const u8* &src, u8 *ptr, u32 sz) std::swap(idx[i], idx[x]); /* Load resulting slice */ - std::memcpy(ptr + 32 * idx[i], src, 32); + memcpy(ptr + 32 * idx[i], src, 32); src += 32; } } @@ -71,5 +70,5 @@ void descrambl_buffer(const u8 *src, u8 *dst, u32 size) /* Load final incomplete slice */ if (size) - std::memcpy(dst, src, size); + memcpy(dst, src, size); } diff --git a/core/rend/CustomTexture.cpp b/core/rend/CustomTexture.cpp index 030ce3595..ec4cb7156 100644 --- a/core/rend/CustomTexture.cpp +++ b/core/rend/CustomTexture.cpp @@ -18,6 +18,7 @@ */ #include "TexCache.h" #include "CustomTexture.h" +#include "cfg/cfg.h" #include "oslib/directory.h" #include "cfg/option.h" #include "oslib/oslib.h" diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index e67d6a064..8ecc916ea 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -3,6 +3,7 @@ #include "deps/xbrz/xbrz.h" #include "hw/pvr/pvr_mem.h" #include "hw/mem/_vmem.h" +#include "hw/sh4/modules/mmu.h" #include #include diff --git a/core/rend/TexCache.h b/core/rend/TexCache.h index 081700c3f..86bdb6499 100644 --- a/core/rend/TexCache.h +++ b/core/rend/TexCache.h @@ -7,10 +7,7 @@ #include #include #include -#include #include -#include -#include extern const u8 *vq_codebook; extern u32 palette_index; diff --git a/core/rend/boxart/boxart.h b/core/rend/boxart/boxart.h index 77f964cc4..8b9b99101 100644 --- a/core/rend/boxart/boxart.h +++ b/core/rend/boxart/boxart.h @@ -19,13 +19,10 @@ #pragma once #include "scraper.h" #include "stdclass.h" - -#include -#include -#include -#include #include -#include +#include +#include +#include struct GameMedia; diff --git a/core/rend/boxart/gamesdb.h b/core/rend/boxart/gamesdb.h index bf9998bfc..162e704cf 100644 --- a/core/rend/boxart/gamesdb.h +++ b/core/rend/boxart/gamesdb.h @@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ +#include #include "scraper.h" #include "json.hpp" -#include -#include -#include - using namespace nlohmann; class TheGamesDb : public Scraper diff --git a/core/rend/boxart/scraper.h b/core/rend/boxart/scraper.h index d6a8f81ce..8ba3667df 100644 --- a/core/rend/boxart/scraper.h +++ b/core/rend/boxart/scraper.h @@ -17,13 +17,13 @@ along with Flycast. If not, see . */ #pragma once +#include +#include +#include #include "types.h" #include "json.hpp" -#include -#include - using namespace nlohmann; struct GameBoxart diff --git a/core/rend/dx11/dx11_renderer.cpp b/core/rend/dx11/dx11_renderer.cpp index bef6ad14f..e1e7cde7a 100644 --- a/core/rend/dx11/dx11_renderer.cpp +++ b/core/rend/dx11/dx11_renderer.cpp @@ -22,7 +22,6 @@ #include "hw/pvr/pvr_mem.h" #include "rend/gui.h" #include "rend/tileclip.h" -#include "rend/sorter.h" const D3D11_INPUT_ELEMENT_DESC MainLayout[] { diff --git a/core/rend/dx11/dx11_renderer.h b/core/rend/dx11/dx11_renderer.h index 28d9f1c2b..372471ccf 100644 --- a/core/rend/dx11/dx11_renderer.h +++ b/core/rend/dx11/dx11_renderer.h @@ -25,6 +25,7 @@ #include "dx11_quad.h" #include "dx11_texture.h" #include "dx11_shaders.h" +#include "rend/sorter.h" #include "dx11_renderstate.h" #include "dx11_naomi2.h" #ifndef LIBRETRO diff --git a/core/rend/dx11/oit/dx11_oitrenderer.cpp b/core/rend/dx11/oit/dx11_oitrenderer.cpp index e7e855835..44d5ee2c6 100644 --- a/core/rend/dx11/oit/dx11_oitrenderer.cpp +++ b/core/rend/dx11/oit/dx11_oitrenderer.cpp @@ -22,8 +22,10 @@ #include "../dx11context.h" #include "../dx11_renderer.h" #include "rend/transform_matrix.h" +#include "../dx11_quad.h" #include "../dx11_texture.h" #include "dx11_oitshaders.h" +#include "rend/sorter.h" #include "../dx11_renderstate.h" #include "dx11_oitbuffers.h" #include "dx11_oitshaders.h" diff --git a/core/rend/gl4/gl4naomi2.cpp b/core/rend/gl4/gl4naomi2.cpp index 2ec1a12a1..c40a29f2d 100644 --- a/core/rend/gl4/gl4naomi2.cpp +++ b/core/rend/gl4/gl4naomi2.cpp @@ -17,7 +17,6 @@ along with Flycast. If not, see . */ #include "gl4naomi2.h" -#include "rend/gl4/gl4.h" extern const char *N2VertexShader; extern const char *N2ColorShader; diff --git a/core/rend/gl4/gl4naomi2.h b/core/rend/gl4/gl4naomi2.h index 910c33e17..cb16cf0c6 100644 --- a/core/rend/gl4/gl4naomi2.h +++ b/core/rend/gl4/gl4naomi2.h @@ -18,6 +18,7 @@ */ #pragma once #include "gl4.h" +#include "rend/gles/naomi2.h" class N2Vertex4Source : public OpenGl4Source { diff --git a/core/rend/gl4/gldraw.cpp b/core/rend/gl4/gldraw.cpp index 058c0f9b6..914af26a0 100644 --- a/core/rend/gl4/gldraw.cpp +++ b/core/rend/gl4/gldraw.cpp @@ -18,9 +18,9 @@ */ #include "gl4.h" #include "rend/gles/glcache.h" -#include "rend/gles/naomi2.h" #include "rend/tileclip.h" #include "rend/osd.h" +#include "gl4naomi2.h" static gl4PipelineShader* CurrentShader; extern u32 gcflip; diff --git a/core/rend/gl4/gles.cpp b/core/rend/gl4/gles.cpp index 30f6f3d2c..a89edf814 100644 --- a/core/rend/gl4/gles.cpp +++ b/core/rend/gl4/gles.cpp @@ -23,7 +23,6 @@ #include "glsl.h" #include "gl4naomi2.h" #include "rend/gles/postprocess.h" -#include "rend/gles/naomi2.h" //Fragment and vertex shaders code diff --git a/core/rend/gles/gldraw.cpp b/core/rend/gles/gldraw.cpp index 439b4f24d..b1c3a1aff 100644 --- a/core/rend/gles/gldraw.cpp +++ b/core/rend/gles/gldraw.cpp @@ -1,5 +1,6 @@ #include "glcache.h" #include "gles.h" +#include "rend/sorter.h" #include "rend/tileclip.h" #include "rend/osd.h" #include "naomi2.h" diff --git a/core/rend/gles/gltex.cpp b/core/rend/gles/gltex.cpp index c59d69844..748ecba26 100644 --- a/core/rend/gles/gltex.cpp +++ b/core/rend/gles/gltex.cpp @@ -3,7 +3,8 @@ #include "hw/pvr/pvr_mem.h" #include "rend/TexCache.h" -#include +#include +#include GlTextureCache TexCache; @@ -313,7 +314,7 @@ static void readAsyncPixelBuffer(u32 addr) { if (gl.rtt.directXfer) // Can be read directly into vram - std::memcpy(dst, ptr, gl.rtt.width * gl.rtt.height * 2); + memcpy(dst, ptr, gl.rtt.width * gl.rtt.height * 2); else WriteTextureToVRam(gl.rtt.width, gl.rtt.height, ptr, dst, gl.rtt.fb_w_ctrl, gl.rtt.linestride); } diff --git a/core/rend/gles/postprocess.cpp b/core/rend/gles/postprocess.cpp index ee41b1b86..f29cf789f 100644 --- a/core/rend/gles/postprocess.cpp +++ b/core/rend/gles/postprocess.cpp @@ -17,9 +17,9 @@ You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ -#include "postprocess.h" - #include +#include "postprocess.h" +#include "cfg/option.h" PostProcessor postProcessor; diff --git a/core/rend/gui.cpp b/core/rend/gui.cpp index 27bcbc553..c7dd7f704 100644 --- a/core/rend/gui.cpp +++ b/core/rend/gui.cpp @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ + +#include #include "gui.h" #include "osd.h" #include "cfg/cfg.h" @@ -30,6 +32,7 @@ #include "input/gamepad_device.h" #include "input/mouse.h" #include "gui_util.h" +#include "gui_android.h" #include "game_scanner.h" #include "version.h" #include "oslib/oslib.h" @@ -48,12 +51,6 @@ #include "sdl/sdl.h" #endif -#ifdef __ANDROID__ -#include "gui_android.h" -#endif - -#include - static bool game_started; int insetLeft, insetRight, insetTop, insetBottom; @@ -435,7 +432,6 @@ void gui_set_insets(int left, int right, int top, int bottom) #if 0 #include "oslib/timeseries.h" -#include TimeSeries renderTimes; TimeSeries vblankTimes; diff --git a/core/rend/gui.h b/core/rend/gui.h index ca80d3ba2..a7d7ce7ac 100644 --- a/core/rend/gui.h +++ b/core/rend/gui.h @@ -18,8 +18,7 @@ */ #pragma once #include "types.h" - -#include +#include "cfg/option.h" void gui_init(); void gui_initFonts(); diff --git a/core/rend/gui_util.h b/core/rend/gui_util.h index c86327383..79ff5b0c0 100644 --- a/core/rend/gui_util.h +++ b/core/rend/gui_util.h @@ -18,17 +18,14 @@ */ #pragma once +#include + #include "types.h" -#include "cfg/option.h" #include "imgui/imgui.h" #include "imgui/imgui_internal.h" #include "gui.h" #include "emulator.h" - -#include -#include -#include -#include +#include "stdclass.h" typedef bool (*StringCallback)(bool cancelled, std::string selection); diff --git a/core/rend/mainui.cpp b/core/rend/mainui.cpp index dcfa73a3c..7d4e87d4a 100644 --- a/core/rend/mainui.cpp +++ b/core/rend/mainui.cpp @@ -16,7 +16,8 @@ You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ - +#include +#include #include "mainui.h" #include "hw/pvr/Renderer_if.h" #include "gui.h" @@ -26,9 +27,7 @@ #include "emulator.h" #include "imgui_driver.h" #include "profiler/fc_profiler.h" - #include -#include static bool mainui_enabled; u32 MainFrameCount; diff --git a/core/rend/osd.cpp b/core/rend/osd.cpp index e6a00eb12..99ef4141c 100644 --- a/core/rend/osd.cpp +++ b/core/rend/osd.cpp @@ -20,7 +20,6 @@ #include "input/gamepad_device.h" #include "TexCache.h" #include "hw/maple/maple_devs.h" -#include "stdclass.h" #ifdef LIBRETRO #include "vmu_xhair.h" #endif diff --git a/core/rend/sorter.h b/core/rend/sorter.h index 285cee6ff..6e4e0aa7e 100644 --- a/core/rend/sorter.h +++ b/core/rend/sorter.h @@ -15,6 +15,7 @@ along with reicast. If not, see . */ #pragma once +#include "types.h" #include "hw/pvr/ta_ctx.h" // Use the first vertex as provoking vertex for flat-shaded triangles diff --git a/core/rend/vulkan/drawer.cpp b/core/rend/vulkan/drawer.cpp index 86b52ea43..97592fc6e 100644 --- a/core/rend/vulkan/drawer.cpp +++ b/core/rend/vulkan/drawer.cpp @@ -20,7 +20,6 @@ */ #include "drawer.h" #include "hw/pvr/pvr_mem.h" -#include "rend/sorter.h" TileClipping BaseDrawer::SetTileClip(u32 val, vk::Rect2D& clipRect) { diff --git a/core/rend/vulkan/drawer.h b/core/rend/vulkan/drawer.h index fdf37532b..67c41c621 100644 --- a/core/rend/vulkan/drawer.h +++ b/core/rend/vulkan/drawer.h @@ -19,6 +19,7 @@ along with Flycast. If not, see . */ #pragma once +#include "rend/sorter.h" #include "rend/tileclip.h" #include "rend/transform_matrix.h" #include "vulkan.h" diff --git a/core/rend/vulkan/oit/oit_drawer.cpp b/core/rend/vulkan/oit/oit_drawer.cpp index 008d9983b..a39241692 100644 --- a/core/rend/vulkan/oit/oit_drawer.cpp +++ b/core/rend/vulkan/oit/oit_drawer.cpp @@ -20,7 +20,6 @@ */ #include "oit_drawer.h" #include "hw/pvr/pvr_mem.h" -#include "rend/sorter.h" #include diff --git a/core/rend/vulkan/oit/oit_drawer.h b/core/rend/vulkan/oit/oit_drawer.h index cb89a781f..0fa16f49b 100644 --- a/core/rend/vulkan/oit/oit_drawer.h +++ b/core/rend/vulkan/oit/oit_drawer.h @@ -19,6 +19,7 @@ along with Flycast. If not, see . */ #pragma once +#include "rend/sorter.h" #include "rend/transform_matrix.h" #include "../vulkan.h" #include "../buffer.h" diff --git a/core/rend/vulkan/pipeline.cpp b/core/rend/vulkan/pipeline.cpp index 158986374..492ab1f2b 100644 --- a/core/rend/vulkan/pipeline.cpp +++ b/core/rend/vulkan/pipeline.cpp @@ -21,6 +21,7 @@ #include "pipeline.h" #include "hw/pvr/Renderer_if.h" #include "rend/osd.h" +#include "quad.h" void PipelineManager::CreateModVolPipeline(ModVolMode mode, int cullMode, bool naomi2) { diff --git a/core/rend/vulkan/texture.cpp b/core/rend/vulkan/texture.cpp index 55e4df40e..aaf346793 100644 --- a/core/rend/vulkan/texture.cpp +++ b/core/rend/vulkan/texture.cpp @@ -19,6 +19,7 @@ along with Flycast. If not, see . */ #include "texture.h" +#include "utils.h" #include #include diff --git a/core/rend/vulkan/texture.h b/core/rend/vulkan/texture.h index 2c667dcbc..53e24ad33 100644 --- a/core/rend/vulkan/texture.h +++ b/core/rend/vulkan/texture.h @@ -22,13 +22,13 @@ #include "vulkan_context.h" #include "buffer.h" #include "rend/TexCache.h" +#include "hw/pvr/Renderer_if.h" #include -#include #include +#include #include #include -#include #include void setImageLayout(vk::CommandBuffer const& commandBuffer, vk::Image image, vk::Format format, u32 mipmapLevels, vk::ImageLayout oldImageLayout, vk::ImageLayout newImageLayout); diff --git a/core/rend/vulkan/vulkan_renderer.cpp b/core/rend/vulkan/vulkan_renderer.cpp index 2511e3115..34a2cbd6f 100644 --- a/core/rend/vulkan/vulkan_renderer.cpp +++ b/core/rend/vulkan/vulkan_renderer.cpp @@ -21,6 +21,7 @@ #include "vulkan.h" #include "vulkan_renderer.h" #include "drawer.h" +#include "shaders.h" class VulkanRenderer final : public BaseVulkanRenderer { diff --git a/core/rend/vulkan/vulkan_renderer.h b/core/rend/vulkan/vulkan_renderer.h index 8adb1729a..a8b90f21e 100644 --- a/core/rend/vulkan/vulkan_renderer.h +++ b/core/rend/vulkan/vulkan_renderer.h @@ -22,10 +22,9 @@ #include "commandpool.h" #include "pipeline.h" #include "rend/osd.h" -#include "rend/transform_matrix.h" -#ifdef LIBRETRO #include "overlay.h" -#else +#include "rend/transform_matrix.h" +#ifndef LIBRETRO #include "rend/gui.h" #endif diff --git a/core/sdl/sdl.cpp b/core/sdl/sdl.cpp index 0a9074acd..5ee474aa4 100644 --- a/core/sdl/sdl.cpp +++ b/core/sdl/sdl.cpp @@ -3,11 +3,9 @@ #include "types.h" #include "cfg/cfg.h" #include "sdl/sdl.h" -#ifdef WIN32 #include -#endif #include -#if defined(__APPLE__) && defined(USE_VULKAN) +#ifdef USE_VULKAN #include #endif #endif diff --git a/core/serialize.cpp b/core/serialize.cpp index 02a0d5476..650e551fc 100644 --- a/core/serialize.cpp +++ b/core/serialize.cpp @@ -16,6 +16,7 @@ #include "hw/sh4/sh4_mmr.h" #include "hw/sh4/modules/mmu.h" #include "reios/gdrom_hle.h" +#include "hw/sh4/dyna/blockmanager.h" #include "hw/naomi/naomi.h" #include "hw/naomi/naomi_cart.h" #include "hw/sh4/sh4_cache.h" @@ -23,9 +24,6 @@ #include "hw/bba/bba.h" #include "cfg/option.h" -#include -#include - //./core/hw/arm7/arm_mem.cpp extern bool aica_interr; extern u32 aica_reg_L;