Started on common and core packages.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
|
||||
if(WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
||||
set(
|
||||
CPP
|
||||
gba/core.cpp
|
||||
gba/gfx.cpp
|
||||
)
|
||||
include_directories("gba")
|
||||
elseif(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
||||
endif()
|
||||
|
||||
add_library(NostalgiaCore OBJECT ${CPP})
|
||||
|
||||
install(
|
||||
FILES
|
||||
DESTINATION
|
||||
include/nostalgia/core
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#include "../types.hpp"
|
||||
#include "registers.hpp"
|
||||
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
int init() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2016 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#include "registers.hpp"
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2016 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#ifndef NOSTALGIA_CORE_GBA_REGISTERS_HPP
|
||||
#define NOSTALGIA_CORE_GBA_REGISTERS_HPP
|
||||
|
||||
#define REG_DISPCNT *((volatile unsigned int*) 0x04000000)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2016 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#ifndef NOSTALGIA_CORE_TYPES_HPP
|
||||
#define NOSTALGIA_CORE_TYPES_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
typedef char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned uint_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
#ifdef _LP64
|
||||
typedef uint64_t size_t;
|
||||
#elif _LP32
|
||||
typedef uint32_t size_t;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user