project: added Precompiled headers

This commit is contained in:
Jakub Czekański 2019-01-06 20:40:20 +01:00
parent 42d7d46f61
commit 1ec4f7765d
6 changed files with 43 additions and 6 deletions

View file

@ -64,6 +64,12 @@ filter {"configurations:Release", "system:windows or system:macosx"}
filter "action:vs*"
defines "_CRT_SECURE_NO_WARNINGS"
filter {"action:vs*", "configurations:Release"}
staticruntime "On"
flags {
"LinkTimeOptimization",
}
filter "action:gmake"
buildoptions {
"-Wall",
@ -81,7 +87,9 @@ include "premake/miniz.lua"
project "core"
uuid "176665c5-37ff-4a42-bef8-02edaeb1b426"
kind "StaticLib"
location "build/libs/core"
location "build/libs/common"
pchheader "src/stdafx.h"
pchsource "src/stdafx.cpp"
includedirs {
"src",
@ -118,6 +126,8 @@ project "avocado"
kind "ConsoleApp"
location "build/libs/avocado"
debugdir "."
pchheader "src/stdafx.h"
pchsource "src/stdafx.cpp"
includedirs {
"src",

View file

@ -1,11 +1,11 @@
#pragma once
#include <utils/logic.h>
#include <cstddef>
#include <cstdint>
#include <vector>
#include "command.h"
#include "device/device.h"
#include "math.h"
#include "utils/logic.h"
struct GTE {
union Flag {

View file

@ -40,7 +40,7 @@
// frame.
#pragma once
#include <stdio.h> // sprintf, scanf
#include <cstdio>
struct MemoryEditor {
typedef unsigned char u8;
@ -231,8 +231,9 @@ struct MemoryEditor {
if ((addr >= HighlightMin && addr < HighlightMax) || (HighlightFn && HighlightFn(mem_data, addr))) {
ImVec2 pos = ImGui::GetCursorScreenPos();
float highlight_width = s.GlyphWidth * 2;
bool is_next_byte_highlighted = (addr + 1 < mem_size) && ((HighlightMax != (size_t)-1 && addr + 1 < HighlightMax)
|| (HighlightFn && HighlightFn(mem_data, addr + 1)));
bool is_next_byte_highlighted
= (addr + 1 < mem_size)
&& ((HighlightMax != (size_t)-1 && addr + 1 < HighlightMax) || (HighlightFn && HighlightFn(mem_data, addr + 1)));
if (is_next_byte_highlighted || (n + 1 == Rows)) {
highlight_width = s.HexCellWidth;
if (OptMidRowsCount > 0 && n > 0 && (n + 1) < Rows && ((n + 1) % OptMidRowsCount) == 0)

3
src/stdafx.cpp Normal file
View file

@ -0,0 +1,3 @@
#ifdef _WIN32
#include "stdafx.h"
#endif

23
src/stdafx.h Normal file
View file

@ -0,0 +1,23 @@
#pragma once
#include <algorithm>
#include <array>
#include <cassert>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iterator>
#include <memory>
#include <mutex>
#include <optional>
#include <regex>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>

View file

@ -1,10 +1,10 @@
#include "system.h"
#include <sound/sound.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "bios/functions.h"
#include "config.h"
#include "sound/sound.h"
#include "utils/file.h"
#include "utils/psx_exe.h"