From db1bbec06e6ad32afdcd73d7174ccf8151834e96 Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 5 Oct 2023 21:40:04 +0200 Subject: [PATCH] Replace include guards with pragma once --- .../PoolBox/application/src/FontWriter/font_writer.hpp | 7 ++----- examples/PoolBox/application/src/Objects/paco.hpp | 7 ++----- examples/PoolBox/application/src/assets.hpp | 7 ++----- include/PSX/AutoLBA/auto_lba.hpp | 7 ++----- include/PSX/AutoLBA/auto_lba_declaration.hpp | 5 +---- include/PSX/Auxiliary/array_range.hpp | 7 ++----- include/PSX/Auxiliary/bits.hpp | 6 ++---- include/PSX/Auxiliary/circular_buffer.hpp | 7 ++----- include/PSX/Auxiliary/lz4_decompressor.hpp | 7 ++----- include/PSX/Auxiliary/math_helper.hpp | 7 ++----- include/PSX/Auxiliary/type_traits.hpp | 7 ++----- include/PSX/Auxiliary/types.hpp | 7 ++----- include/PSX/Auxiliary/unaligned_read.hpp | 7 ++----- include/PSX/File/Processor/cd_file_processor.hpp | 7 ++----- include/PSX/File/Processor/file_processor.hpp | 6 ++---- include/PSX/File/cd_file_types.hpp | 6 ++---- include/PSX/File/file_types.hpp | 6 ++---- include/PSX/GPU/Primitives/linked_elements.hpp | 7 ++----- include/PSX/GPU/Primitives/primitive_gpu_commands.hpp | 7 ++----- include/PSX/GPU/Primitives/primitive_line_types.hpp | 7 ++----- include/PSX/GPU/Primitives/primitive_poly_types.hpp | 6 ++---- include/PSX/GPU/Primitives/primitive_rectangle_types.hpp | 7 ++----- include/PSX/GPU/Primitives/primitive_support_types.hpp | 8 ++------ include/PSX/GPU/gpu.hpp | 6 ++---- include/PSX/GPU/gpu_primitives.hpp | 7 ++----- include/PSX/GPU/gpu_types.hpp | 6 ++---- include/PSX/Overlay/overlay.hpp | 6 ++---- include/PSX/Overlay/overlay_declaration.hpp | 6 ++---- include/PSX/System/IOPorts/cd_io.hpp | 7 ++----- include/PSX/System/IOPorts/dma_io.hpp | 6 ++---- include/PSX/System/IOPorts/gpu_io.hpp | 6 ++---- include/PSX/System/IOPorts/interrupt_io.hpp | 7 ++----- include/PSX/System/IOPorts/ioport.hpp | 6 ++---- include/PSX/System/IOPorts/memory_io.hpp | 7 ++----- include/PSX/System/IOPorts/spu_io.hpp | 6 ++---- include/PSX/System/IOPorts/timer_io.hpp | 7 ++----- include/PSX/System/scratchpad.hpp | 6 ++---- include/PSX/jabyengine.hpp | 7 ++----- src/Library/internal-include/BootLoader/boot_loader.hpp | 6 ++---- src/Library/internal-include/CD/cd_internal.hpp | 6 ++---- src/Library/internal-include/CD/cd_types.hpp | 6 ++---- src/Library/internal-include/GPU/gpu_internal.hpp | 7 ++----- 42 files changed, 83 insertions(+), 193 deletions(-) diff --git a/examples/PoolBox/application/src/FontWriter/font_writer.hpp b/examples/PoolBox/application/src/FontWriter/font_writer.hpp index 2be42eab..ef2d1e15 100644 --- a/examples/PoolBox/application/src/FontWriter/font_writer.hpp +++ b/examples/PoolBox/application/src/FontWriter/font_writer.hpp @@ -1,5 +1,4 @@ -#ifndef __FONT_WRITER_HPP__ -#define __FONT_WRITER_HPP__ +#pragma once #include "../assets.hpp" #include #include @@ -46,6 +45,4 @@ namespace FontWriter { Position write(Position pos, const char* text); }; -} - -#endif //!__FONT_WRITER_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/examples/PoolBox/application/src/Objects/paco.hpp b/examples/PoolBox/application/src/Objects/paco.hpp index c508c425..ffb39ea4 100644 --- a/examples/PoolBox/application/src/Objects/paco.hpp +++ b/examples/PoolBox/application/src/Objects/paco.hpp @@ -1,5 +1,4 @@ -#ifndef __PACO_HPP__ -#define __PACO_HPP__ +#pragma once #include #include #include @@ -35,6 +34,4 @@ namespace object { void update(); void render(); }; -} - -#endif //!__PACO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/examples/PoolBox/application/src/assets.hpp b/examples/PoolBox/application/src/assets.hpp index a92673eb..b950d069 100644 --- a/examples/PoolBox/application/src/assets.hpp +++ b/examples/PoolBox/application/src/assets.hpp @@ -1,5 +1,4 @@ -#ifndef __ASSETS_HPP__ -#define __ASSETS_HPP__ +#pragma once #include namespace Assets { @@ -7,6 +6,4 @@ namespace Assets { static constexpr auto FontTIM = SimpleTIM(960, 0, 960, 511); void load_for_main(); -} - -#endif //!__ASSETS_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/AutoLBA/auto_lba.hpp b/include/PSX/AutoLBA/auto_lba.hpp index 51291181..8b53a18e 100644 --- a/include/PSX/AutoLBA/auto_lba.hpp +++ b/include/PSX/AutoLBA/auto_lba.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_AUTO_LBA_HPP__ -#define __JABYENGINE_AUTO_LBA_HPP__ +#pragma once #include "../Auxiliary/bits.hpp" namespace JabyEngine { @@ -39,6 +38,4 @@ namespace JabyEngine { return const_cast(this)->is_lz4(); } }; -} - -#endif //!__JABYENGINE_AUTO_LBA_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/AutoLBA/auto_lba_declaration.hpp b/include/PSX/AutoLBA/auto_lba_declaration.hpp index ae8fea74..82a54238 100644 --- a/include/PSX/AutoLBA/auto_lba_declaration.hpp +++ b/include/PSX/AutoLBA/auto_lba_declaration.hpp @@ -1,9 +1,6 @@ -#ifndef __JABYENGINE_AUTO_LBA_DECLARATION_HPP__ -#define __JABYENGINE_AUTO_LBA_DECLARATION_HPP__ - +#pragma once extern const volatile JabyEngine::AutoLBAEntry lba[]; #define __declare_lba_header(enum_struct) \ [[gnu::used]] \ const volatile JabyEngine::AutoLBAEntry __section(".header.lbas") lba[static_cast(enum_struct::EndOfRequest)] = {0} -#endif //!__JABYENGINE_AUTO_LBA_DECLARATION_HPP__ \ No newline at end of file diff --git a/include/PSX/Auxiliary/array_range.hpp b/include/PSX/Auxiliary/array_range.hpp index c1378cc4..a03d78ac 100644 --- a/include/PSX/Auxiliary/array_range.hpp +++ b/include/PSX/Auxiliary/array_range.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_ARRAY_RANGE_HPP__ -#define __JABYENGINE_ARRAY_RANGE_HPP__ +#pragma once #include "../../stddef.h" namespace JabyEngine { @@ -39,6 +38,4 @@ namespace JabyEngine { return this->start[idx]; } }; -} - -#endif //!__JABYENGINE_ARRAY_RANGE_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/bits.hpp b/include/PSX/Auxiliary/bits.hpp index 2e2cce79..d5ce81ca 100644 --- a/include/PSX/Auxiliary/bits.hpp +++ b/include/PSX/Auxiliary/bits.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_BITS_HPP__ -#define __JABYENGINE_BITS_HPP__ +#pragma once #include "../jabyengine_defines.h" #include "types.hpp" @@ -153,5 +152,4 @@ namespace JabyEngine { } } -#define __start_end_bit2_start_length(start_bit, end_bit) start_bit, (end_bit - start_bit + 1) -#endif //!__JABYENGINE_BITS_HPP__ \ No newline at end of file +#define __start_end_bit2_start_length(start_bit, end_bit) start_bit, (end_bit - start_bit + 1) \ No newline at end of file diff --git a/include/PSX/Auxiliary/circular_buffer.hpp b/include/PSX/Auxiliary/circular_buffer.hpp index c68f3631..88ada439 100644 --- a/include/PSX/Auxiliary/circular_buffer.hpp +++ b/include/PSX/Auxiliary/circular_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_CIRCULAR_BUFFER_HPP__ -#define __JABYENGINE_CIRCULAR_BUFFER_HPP__ +#pragma once #include "array_range.hpp" namespace JabyEngine { @@ -59,6 +58,4 @@ namespace JabyEngine { return (this->read_adr != this->write_adr); } }; -} - -#endif //!__JABYENGINE_CIRCULAR_BUFFER_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/lz4_decompressor.hpp b/include/PSX/Auxiliary/lz4_decompressor.hpp index 0ebd7b90..39fc105d 100644 --- a/include/PSX/Auxiliary/lz4_decompressor.hpp +++ b/include/PSX/Auxiliary/lz4_decompressor.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_LZ4_DECOMPRESSOR_HPP__ -#define __JABYENGINE_LZ4_DECOMPRESSOR_HPP__ +#pragma once #include "../../stddef.h" #include "array_range.hpp" #include "types.hpp" @@ -76,6 +75,4 @@ namespace JabyEngine { Result process(ArrayRange data, bool is_last); }; -} - -#endif //!__JABYENGINE_LZ4_DECOMPRESSOR_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/math_helper.hpp b/include/PSX/Auxiliary/math_helper.hpp index 9a8d4c9e..1393fda4 100644 --- a/include/PSX/Auxiliary/math_helper.hpp +++ b/include/PSX/Auxiliary/math_helper.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_MATH_HELPER_HPP__ -#define __JABYENGINE_MATH_HELPER_HPP__ +#pragma once #include "types.hpp" namespace JabyEngine { @@ -13,6 +12,4 @@ namespace JabyEngine { const auto [tenth, rest] = div_and_mod(value, static_cast(10)); return (tenth << 4 | rest); } -} - -#endif //!__JABYENGINE_MATH_HELPER_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/type_traits.hpp b/include/PSX/Auxiliary/type_traits.hpp index 255696df..fb6f89bd 100644 --- a/include/PSX/Auxiliary/type_traits.hpp +++ b/include/PSX/Auxiliary/type_traits.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_TYPE_TRAITS_HPP__ -#define __JABYENGINE_TYPE_TRAITS_HPP__ +#pragma once namespace JabyEngine { template @@ -76,6 +75,4 @@ namespace JabyEngine { using variadic_force_same = enable_if...>::value>::type; // ############################################# -} - -#endif //! __JABYENGINE_TYPE_TRAITS_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/types.hpp b/include/PSX/Auxiliary/types.hpp index 38de46fb..ec6ef8d7 100644 --- a/include/PSX/Auxiliary/types.hpp +++ b/include/PSX/Auxiliary/types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_TYPES_HPP__ -#define __JABYENGINE_TYPES_HPP__ +#pragma once namespace JabyEngine { template @@ -31,6 +30,4 @@ namespace JabyEngine { Done, Error }; -} - -#endif //!__JABYENGINE_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Auxiliary/unaligned_read.hpp b/include/PSX/Auxiliary/unaligned_read.hpp index 274b4c64..3ba88198 100644 --- a/include/PSX/Auxiliary/unaligned_read.hpp +++ b/include/PSX/Auxiliary/unaligned_read.hpp @@ -1,11 +1,8 @@ -#ifndef __JABYENGINE_UNALIGNED_READ_HPP__ -#define __JABYENGINE_UNALIGNED_READ_HPP__ +#pragma once #include "../../stdint.h" namespace JabyEngine { uint16_t unaligned_lhu(const uint8_t* adr) { return (static_cast(adr[0]) | static_cast(adr[1]) << 8); } -} - -#endif //!__JABYENGINE_UNALIGNED_READ_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/File/Processor/cd_file_processor.hpp b/include/PSX/File/Processor/cd_file_processor.hpp index 19e42136..16c9823f 100644 --- a/include/PSX/File/Processor/cd_file_processor.hpp +++ b/include/PSX/File/Processor/cd_file_processor.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_CD_FILE_PROCESSOR_HPP__ -#define __JABYENGINE_CD_FILE_PROCESSOR_HPP__ +#pragma once #include "../../AutoLBA/auto_lba.hpp" #include "../../Auxiliary/circular_buffer.hpp" #include "../../Auxiliary/lz4_decompressor.hpp" @@ -66,6 +65,4 @@ namespace JabyEngine { return false; } }; -} - -#endif //!__JABYENGINE_CD_FILE_PROCESSOR_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/File/Processor/file_processor.hpp b/include/PSX/File/Processor/file_processor.hpp index 5930071a..e60b8482 100644 --- a/include/PSX/File/Processor/file_processor.hpp +++ b/include/PSX/File/Processor/file_processor.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_FILE_PROCESSOR_HPP__ -#define __JABYENGINE_FILE_PROCESSOR_HPP__ +#pragma once #include "../../Auxiliary/types.hpp" #include "../file_types.hpp" @@ -55,5 +54,4 @@ namespace JabyEngine { State create(const uint32_t* data_adr, const Nothing& nothing); State create(const uint32_t* data_adr, const SimpleTIM& file); } -} -#endif // !__JABYENGINE_FILE_PROCESSOR_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/File/cd_file_types.hpp b/include/PSX/File/cd_file_types.hpp index 582d4145..3934cdf2 100644 --- a/include/PSX/File/cd_file_types.hpp +++ b/include/PSX/File/cd_file_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_CD_FILE_TYPES_HPP__ -#define __JABYENGINE_CD_FILE_TYPES_HPP__ +#pragma once #include "../Overlay/overlay.hpp" #include "file_types.hpp" @@ -39,5 +38,4 @@ namespace JabyEngine { return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::CopyTo, .payload = {.overlay = Overlay{overlay_dst}}}; } }; -} -#endif //!__JABYENGINE_CD_FILE_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/File/file_types.hpp b/include/PSX/File/file_types.hpp index 4da218ba..508b44d3 100644 --- a/include/PSX/File/file_types.hpp +++ b/include/PSX/File/file_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_FILE_TYPES_HPP__ -#define __JABYENGINE_FILE_TYPES_HPP__ +#pragma once #include "../Auxiliary/bits.hpp" #include "../GPU/gpu_types.hpp" #include "../jabyengine_defines.h" @@ -53,5 +52,4 @@ namespace JabyEngine { #pragma pack(pop) typedef CopyTo Overlay; -} -#endif // !__JABYENGINE_FILE_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/linked_elements.hpp b/include/PSX/GPU/Primitives/linked_elements.hpp index e9cd18f4..b8dbdce3 100644 --- a/include/PSX/GPU/Primitives/linked_elements.hpp +++ b/include/PSX/GPU/Primitives/linked_elements.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_LINKED_ELEMENTS_HPP__ -#define __JABYENGINE_LINKED_ELEMENTS_HPP__ +#pragma once #include "../../Auxiliary/bits.hpp" namespace JabyEngine { @@ -89,6 +88,4 @@ namespace JabyEngine { }; } } -} - -#endif // !__JABYENGINE_LINKED_ELEMENTS_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp b/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp index aa2b5077..61d9ba17 100644 --- a/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp +++ b/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_PRIMITIVE_GPU_COMMANDS_HPP__ -#define __JABYENGINE_PRIMITIVE_GPU_COMMANDS_HPP__ +#pragma once #include "../../System/IOPorts/gpu_io.hpp" #include "linked_elements.hpp" #include "primitive_support_types.hpp" @@ -16,6 +15,4 @@ namespace JabyEngine { } }; } -} - -#endif // !__JABYENGINE_PRIMITIVE_GPU_COMMANDS_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/primitive_line_types.hpp b/include/PSX/GPU/Primitives/primitive_line_types.hpp index 502f1dd8..ac1c6361 100644 --- a/include/PSX/GPU/Primitives/primitive_line_types.hpp +++ b/include/PSX/GPU/Primitives/primitive_line_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_PRIMITIVE_LINE_TYPES_HPP__ -#define __JABYENGINE_PRIMITIVE_LINE_TYPES_HPP__ +#pragma once #include "linked_elements.hpp" #include "primitive_support_types.hpp" @@ -107,6 +106,4 @@ namespace JabyEngine { } }; } -} - -#endif //!__JABYENGINE_PRIMITIVE_LINE_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/primitive_poly_types.hpp b/include/PSX/GPU/Primitives/primitive_poly_types.hpp index 3ffdfba6..e754da78 100644 --- a/include/PSX/GPU/Primitives/primitive_poly_types.hpp +++ b/include/PSX/GPU/Primitives/primitive_poly_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_PRIMITIVE_POLY_TYPES_HPP__ -#define __JABYENGINE_PRIMITIVE_POLY_TYPES_HPP__ +#pragma once #include "linked_elements.hpp" #include "primitive_support_types.hpp" @@ -366,5 +365,4 @@ namespace JabyEngine { static_assert(sizeof(POLY_G4) == 32); static_assert(sizeof(POLY_GT4) == 48); } -} -#endif // !__JABYENGINE_PRIMITIVE_POLY_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/primitive_rectangle_types.hpp b/include/PSX/GPU/Primitives/primitive_rectangle_types.hpp index 0adf0d31..1cfa22b8 100644 --- a/include/PSX/GPU/Primitives/primitive_rectangle_types.hpp +++ b/include/PSX/GPU/Primitives/primitive_rectangle_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_PRIMITIVE_RECTANGLE_TYPES_HPP__ -#define __JABYENGINE_PRIMITIVE_RECTANGLE_TYPES_HPP__ +#pragma once #include "linked_elements.hpp" #include "primitive_support_types.hpp" @@ -126,6 +125,4 @@ namespace JabyEngine { } }; } -} - -#endif //!__JABYENGINE_PRIMITIVE_RECTANGLE_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/Primitives/primitive_support_types.hpp b/include/PSX/GPU/Primitives/primitive_support_types.hpp index 96e139e9..d8f52b66 100644 --- a/include/PSX/GPU/Primitives/primitive_support_types.hpp +++ b/include/PSX/GPU/Primitives/primitive_support_types.hpp @@ -1,10 +1,8 @@ -#ifndef __JABYENGINE_PRIMITIVE_SUPPORT_TYPES_HPP__ -#define __JABYENGINE_PRIMITIVE_SUPPORT_TYPES_HPP__ +#pragma once #include "../../Auxiliary/type_traits.hpp" #include "../../System/IOPorts/gpu_io.hpp" #include "../gpu_types.hpp" - namespace JabyEngine { namespace GPU { namespace internal { @@ -89,6 +87,4 @@ namespace JabyEngine { } }; } -} - -#endif //!__JABYENGINE_PRIMITIVE_SUPPORT_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/gpu.hpp b/include/PSX/GPU/gpu.hpp index 3299b53f..63b2b01e 100644 --- a/include/PSX/GPU/gpu.hpp +++ b/include/PSX/GPU/gpu.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_GPU_HPP__ -#define __JABYENGINE_GPU_HPP__ +#pragma once #include "../Auxiliary/type_traits.hpp" #include "../System/IOPorts/gpu_io.hpp" #include "gpu_primitives.hpp" @@ -60,5 +59,4 @@ namespace JabyEngine { uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen = true); } -} -#endif //!__JABYENGINE_GPU_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/gpu_primitives.hpp b/include/PSX/GPU/gpu_primitives.hpp index 685d821a..ab15cb3f 100644 --- a/include/PSX/GPU/gpu_primitives.hpp +++ b/include/PSX/GPU/gpu_primitives.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_GPU_PRIMITIVES_HPP__ -#define __JABYENGINE_GPU_PRIMITIVES_HPP__ +#pragma once #include "../Auxiliary/literals.hpp" #include "Primitives/primitive_gpu_commands.hpp" #include "Primitives/primitive_line_types.hpp" @@ -312,6 +311,4 @@ namespace JabyEngine { return creator_template(area, page, color); } } -} - -#endif // !__JABYENGINE_GPU_PRIMITIVES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/GPU/gpu_types.hpp b/include/PSX/GPU/gpu_types.hpp index a898832d..09f076a1 100644 --- a/include/PSX/GPU/gpu_types.hpp +++ b/include/PSX/GPU/gpu_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_GPU_TYPES_HPP__ -#define __JABYENGINE_GPU_TYPES_HPP__ +#pragma once #include "../Auxiliary/bits.hpp" #include "../jabyengine_defines.h" @@ -222,5 +221,4 @@ namespace JabyEngine { } }; } -} -#endif //!__JABYENGINE_GPU_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Overlay/overlay.hpp b/include/PSX/Overlay/overlay.hpp index 1040eed4..bc2121d0 100644 --- a/include/PSX/Overlay/overlay.hpp +++ b/include/PSX/Overlay/overlay.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_OVERLAY__HPP__ -#define __JABYENGINE_OVERLAY__HPP__ +#pragma once #include "../AutoLBA/auto_lba.hpp" namespace JabyEngine { @@ -7,5 +6,4 @@ namespace JabyEngine { // Can be used to create dummy values to trick LZ4 into compressing an uncompressed overlay #define __create_dummy_fill(length) static const uint8_t __section(".keep.dummy") __used DummyFilling[length] = {0x0} -} -#endif //!__JABYENGINE_OVERLAY__HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/Overlay/overlay_declaration.hpp b/include/PSX/Overlay/overlay_declaration.hpp index 85cf0449..2fc6a647 100644 --- a/include/PSX/Overlay/overlay_declaration.hpp +++ b/include/PSX/Overlay/overlay_declaration.hpp @@ -1,10 +1,8 @@ -#ifndef __JABYENGINE_OVERLAY_DECLARATION__HPP__ -#define __JABYENGINE_OVERLAY_DECLARATION__HPP__ +#pragma once // No include here because this header should be included in a namespace and we don't want multiple namespace definitions of OverlayHeader and OverlayLBA #include "../AutoLBA/auto_lba_declaration.hpp" #define __declare_overlay_header(function, enum_struct) \ -__declare_lba_header(enum_struct) -#endif //!__JABYENGINE_OVERLAY_DECLARATION__HPP__ \ No newline at end of file +__declare_lba_header(enum_struct) \ No newline at end of file diff --git a/include/PSX/System/IOPorts/cd_io.hpp b/include/PSX/System/IOPorts/cd_io.hpp index 992e250f..f9dd6d5f 100644 --- a/include/PSX/System/IOPorts/cd_io.hpp +++ b/include/PSX/System/IOPorts/cd_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_CD_IO_HPP__ -#define __JABYENGINE_CD_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -232,6 +231,4 @@ namespace JabyEngine { #undef __declare_index_io_port #undef __declare_index_io_port_const } -} - -#endif //!__JABYENGINE_CD_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/dma_io.hpp b/include/PSX/System/IOPorts/dma_io.hpp index b331da6d..81e7f241 100644 --- a/include/PSX/System/IOPorts/dma_io.hpp +++ b/include/PSX/System/IOPorts/dma_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_DMA_IO_HPP__ -#define __JABYENGINE_DMA_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -151,5 +150,4 @@ namespace JabyEngine { __declare_io_port(, DPCR, 0x1F8010F0); __declare_io_port(, DICR, 0x1F8010F4); } -} -#endif //!__JABYENGINE_DMA_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/gpu_io.hpp b/include/PSX/System/IOPorts/gpu_io.hpp index a20d07b8..78ff7fc6 100644 --- a/include/PSX/System/IOPorts/gpu_io.hpp +++ b/include/PSX/System/IOPorts/gpu_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_GPU_IO_HPP__ -#define __JABYENGINE_GPU_IO_HPP__ +#pragma once #include "ioport.hpp" #include "../../GPU/gpu_types.hpp" #include @@ -223,5 +222,4 @@ namespace JabyEngine { __declare_io_port(const, GPUREAD, 0x1F801810); __declare_io_port(const, GPUSTAT, 0x1F801814); } -} -#endif //!__JABYENGINE_GPU_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/interrupt_io.hpp b/include/PSX/System/IOPorts/interrupt_io.hpp index f551ba06..d5a9d540 100644 --- a/include/PSX/System/IOPorts/interrupt_io.hpp +++ b/include/PSX/System/IOPorts/interrupt_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_INTERRUPT_IO_HPP__ -#define __JABYENGINE_INTERRUPT_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -42,6 +41,4 @@ namespace JabyEngine { Mask.write(Mask.read().set(irq)); } }; -} - -#endif //!__JABYENGINE_INTERRUPT_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/ioport.hpp b/include/PSX/System/IOPorts/ioport.hpp index 7ea3018c..5ae35ff9 100644 --- a/include/PSX/System/IOPorts/ioport.hpp +++ b/include/PSX/System/IOPorts/ioport.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_IOPORT_HPP__ -#define __JABYENGINE_IOPORT_HPP__ +#pragma once #include "../../Auxiliary/types.hpp" #include "../../Auxiliary/bits.hpp" @@ -116,5 +115,4 @@ namespace JabyEngine { #define __declare_io_port_w_type(cv, type, name, adr) __declare_value_at(cv, ::JabyEngine::IOPort, name, adr) #define __declare_io_port(cv, name, adr) __declare_io_port_w_type(cv, struct name, name, adr) #define __declare_io_port_array(cv, name, size, adr) __declare_array_at(cv, struct name, name, size, adr) -} -#endif //!__JABYENGINE_IOPORT_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/memory_io.hpp b/include/PSX/System/IOPorts/memory_io.hpp index 4a56658c..dafb47ef 100644 --- a/include/PSX/System/IOPorts/memory_io.hpp +++ b/include/PSX/System/IOPorts/memory_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_MEMORY_IO_HPP__ -#define __JABYENGINE_MEMORY_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -19,6 +18,4 @@ namespace JabyEngine { __declare_io_port(, COM_DELAY, 0x1F801020); __declare_io_port(, CD_DELAY, 0x1F801018); } -} - -#endif //!__JABYENGINE_MEMORY_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/spu_io.hpp b/include/PSX/System/IOPorts/spu_io.hpp index 92bf12e7..525fe5a4 100644 --- a/include/PSX/System/IOPorts/spu_io.hpp +++ b/include/PSX/System/IOPorts/spu_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_SPU_IO_HPP__ -#define __JABYENGINE_SPU_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -165,5 +164,4 @@ namespace JabyEngine { __declare_io_port_array(, Voice, VoiceCount, 0x1F801C00); } -} -#endif //!__JABYENGINE_SPU_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/timer_io.hpp b/include/PSX/System/IOPorts/timer_io.hpp index 0e96ef60..d1a395b3 100644 --- a/include/PSX/System/IOPorts/timer_io.hpp +++ b/include/PSX/System/IOPorts/timer_io.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_TIMER_IO_HPP__ -#define __JABYENGINE_TIMER_IO_HPP__ +#pragma once #include "ioport.hpp" namespace JabyEngine { @@ -111,6 +110,4 @@ namespace JabyEngine { __declare_value_at(, struct Counter1, Counter1, counter_base_adr(1)); __declare_value_at(, struct Counter2, Counter2, counter_base_adr(2)); } -} - -#endif //!__JABYENGINE_TIMER_IO_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/System/scratchpad.hpp b/include/PSX/System/scratchpad.hpp index 4d1886aa..bdb1b117 100644 --- a/include/PSX/System/scratchpad.hpp +++ b/include/PSX/System/scratchpad.hpp @@ -1,8 +1,6 @@ -#ifndef __JABYENGINE_SCRATCHPAD_HPP__ -#define __JABYENGINE_SCRATCHPAD_HPP__ +#pragma once #include "../jabyengine_defines.h" namespace JabyEngine { static __always_inline auto& ScratchPad = reinterpret_cast(*reinterpret_cast(0x1F800000)); -} -#endif //!__JABYENGINE_SCRATCHPAD_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/include/PSX/jabyengine.hpp b/include/PSX/jabyengine.hpp index 65a33360..e2b853c1 100644 --- a/include/PSX/jabyengine.hpp +++ b/include/PSX/jabyengine.hpp @@ -1,9 +1,6 @@ -#ifndef __JABYENGINE__HPP__ -#define __JABYENGINE__HPP__ +#pragma once #include "jabyengine_defines.h" namespace JabyEngine { typedef void (*MainRoutine)(); -} - -#endif //!__JABYENGINE__HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/src/Library/internal-include/BootLoader/boot_loader.hpp b/src/Library/internal-include/BootLoader/boot_loader.hpp index 6290445c..4898671b 100644 --- a/src/Library/internal-include/BootLoader/boot_loader.hpp +++ b/src/Library/internal-include/BootLoader/boot_loader.hpp @@ -1,5 +1,4 @@ -#ifndef BOOT_LOADER_HPP -#define BOOT_LOADER_HPP +#pragma once #include "color_debug.hpp" #include @@ -25,5 +24,4 @@ namespace JabyEngine { } void __no_return run(); -} -#endif //!BOOT_LOADER_HPP \ No newline at end of file +} \ No newline at end of file diff --git a/src/Library/internal-include/CD/cd_internal.hpp b/src/Library/internal-include/CD/cd_internal.hpp index 05d8cb8d..45602186 100644 --- a/src/Library/internal-include/CD/cd_internal.hpp +++ b/src/Library/internal-include/CD/cd_internal.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_CD_INTERNAL_HPP__ -#define __JABYENGINE_CD_INTERNAL_HPP__ +#pragma once #include "cd_types.hpp" namespace JabyEngine { @@ -48,5 +47,4 @@ namespace JabyEngine { void continue_reading(); } } -} -#endif //!__JABYENGINE_CD_INTERNAL_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/src/Library/internal-include/CD/cd_types.hpp b/src/Library/internal-include/CD/cd_types.hpp index 5e1f07d6..ac5b9e23 100644 --- a/src/Library/internal-include/CD/cd_types.hpp +++ b/src/Library/internal-include/CD/cd_types.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_INTERNAL_CD_TYPES_HPP__ -#define __JABYENGINE_INTERNAL_CD_TYPES_HPP__ +#pragma once #include #include #include @@ -73,5 +72,4 @@ namespace JabyEngine { }; } } -} -#endif //!__JABYENGINE_INTERNAL_CD_TYPES_HPP__ \ No newline at end of file +} \ No newline at end of file diff --git a/src/Library/internal-include/GPU/gpu_internal.hpp b/src/Library/internal-include/GPU/gpu_internal.hpp index 956a7f2a..7ab48da9 100644 --- a/src/Library/internal-include/GPU/gpu_internal.hpp +++ b/src/Library/internal-include/GPU/gpu_internal.hpp @@ -1,5 +1,4 @@ -#ifndef __JABYENGINE_GPU_INTERNAL_HPP__ -#define __JABYENGINE_GPU_INTERNAL_HPP__ +#pragma once #include #include #include @@ -100,6 +99,4 @@ namespace JabyEngine { } } } -} - -#endif //!__JABYENGINE_GPU_INTERNAL_HPP__ \ No newline at end of file +} \ No newline at end of file