Humungous refactor

This commit is contained in:
Jack Andersen 2016-03-04 13:00:12 -10:00
parent a0515fe4aa
commit b791b7e426
103 changed files with 499 additions and 500 deletions

View File

@ -1,6 +1,6 @@
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.0)
project(Athena)
project(athena)
endif()
##################
@ -33,84 +33,84 @@ list(APPEND CORE_EXTRA src/gekko_support.c include/gekko_support.h)
endif()
endif()
add_library(AthenaCore
src/Athena/Utility.cpp
src/Athena/FileReader.cpp
src/Athena/FileWriter.cpp
src/Athena/MemoryReader.cpp
src/Athena/MemoryWriter.cpp
src/Athena/Global.cpp
src/Athena/Checksums.cpp
src/Athena/Compression.cpp
add_library(athena-core
src/athena/Utility.cpp
src/athena/FileReader.cpp
src/athena/FileWriter.cpp
src/athena/MemoryReader.cpp
src/athena/MemoryWriter.cpp
src/athena/Global.cpp
src/athena/Checksums.cpp
src/athena/Compression.cpp
src/LZ77/LZLookupTable.cpp
src/LZ77/LZType10.cpp
src/LZ77/LZType11.cpp
src/LZ77/LZBase.cpp
src/Athena/FileInfo.cpp
src/Athena/Dir.cpp
src/Athena/DNAYaml.cpp
src/athena/FileInfo.cpp
src/athena/Dir.cpp
src/athena/DNAYaml.cpp
${CORE_EXTRA}
include/Athena/IStream.hpp
include/Athena/IStreamReader.hpp
include/Athena/IStreamWriter.hpp
include/Athena/Types.hpp
include/Athena/Utility.hpp
include/Athena/Global.hpp
include/Athena/FileReader.hpp
include/Athena/FileWriter.hpp
include/Athena/MemoryReader.hpp
include/Athena/MemoryWriter.hpp
include/Athena/Checksums.hpp
include/Athena/Compression.hpp
include/athena/IStream.hpp
include/athena/IStreamReader.hpp
include/athena/IStreamWriter.hpp
include/athena/Types.hpp
include/athena/Utility.hpp
include/athena/Global.hpp
include/athena/FileReader.hpp
include/athena/FileWriter.hpp
include/athena/MemoryReader.hpp
include/athena/MemoryWriter.hpp
include/athena/Checksums.hpp
include/athena/Compression.hpp
include/LZ77/LZBase.hpp
include/LZ77/LZLookupTable.hpp
include/LZ77/LZType10.hpp
include/LZ77/LZType11.hpp
include/Athena/FileInfo.hpp
include/Athena/Dir.hpp
include/Athena/DNA.hpp
include/Athena/DNAYaml.hpp
include/athena/FileInfo.hpp
include/athena/Dir.hpp
include/athena/DNA.hpp
include/athena/DNAYaml.hpp
include/yaml.h
include/utf8proc.h
)
add_library(AthenaSakura EXCLUDE_FROM_ALL
src/Athena/Sprite.cpp
src/Athena/SpriteFile.cpp
src/Athena/SpriteFileReader.cpp
src/Athena/SpriteFileWriter.cpp
src/Athena/SpriteFrame.cpp
src/Athena/SpritePart.cpp
add_library(athena-sakura EXCLUDE_FROM_ALL
src/athena/Sprite.cpp
src/athena/SpriteFile.cpp
src/athena/SpriteFileReader.cpp
src/athena/SpriteFileWriter.cpp
src/athena/SpriteFrame.cpp
src/athena/SpritePart.cpp
include/Athena/SakuraGlobal.hpp
include/Athena/Sprite.hpp
include/Athena/SpriteFile.hpp
include/Athena/SpriteFileReader.hpp
include/Athena/SpriteFileWriter.hpp
include/Athena/SpriteFrame.hpp
include/Athena/SpritePart.hpp
include/athena/SakuraGlobal.hpp
include/athena/Sprite.hpp
include/athena/SpriteFile.hpp
include/athena/SpriteFileReader.hpp
include/athena/SpriteFileWriter.hpp
include/athena/SpriteFrame.hpp
include/athena/SpritePart.hpp
)
add_library(AthenaWiiSave EXCLUDE_FROM_ALL
src/Athena/WiiBanner.cpp
src/Athena/WiiFile.cpp
src/Athena/WiiImage.cpp
src/Athena/WiiSave.cpp
src/Athena/WiiSaveReader.cpp
src/Athena/WiiSaveWriter.cpp
add_library(athena-wiisave EXCLUDE_FROM_ALL
src/athena/WiiBanner.cpp
src/athena/WiiFile.cpp
src/athena/WiiImage.cpp
src/athena/WiiSave.cpp
src/athena/WiiSaveReader.cpp
src/athena/WiiSaveWriter.cpp
src/bn.cpp
src/ec.cpp
src/md5.cpp
src/sha1.cpp
src/aes.cpp
include/Athena/WiiBanner.hpp
include/Athena/WiiFile.hpp
include/Athena/WiiImage.hpp
include/Athena/WiiSave.hpp
include/Athena/WiiSaveReader.hpp
include/Athena/WiiSaveWriter.hpp
include/athena/WiiBanner.hpp
include/athena/WiiFile.hpp
include/athena/WiiImage.hpp
include/athena/WiiSave.hpp
include/athena/WiiSaveReader.hpp
include/athena/WiiSaveWriter.hpp
include/aes.hpp
include/bn.h
include/ec.h
@ -121,36 +121,36 @@ if(NOT MSVC AND NOT GEKKO)
set_source_files_properties(src/aes.cpp PROPERTIES COMPILE_FLAGS -maes)
endif()
add_library(AthenaZelda EXCLUDE_FROM_ALL
src/Athena/ALTTPFile.cpp
src/Athena/ALTTPFileReader.cpp
src/Athena/ALTTPFileWriter.cpp
src/Athena/ALTTPQuest.cpp
src/Athena/MCFile.cpp
src/Athena/MCFileReader.cpp
src/Athena/MCFileWriter.cpp
src/Athena/MCSlot.cpp
src/Athena/SkywardSwordFile.cpp
src/Athena/SkywardSwordFileReader.cpp
src/Athena/SkywardSwordFileWriter.cpp
src/Athena/SkywardSwordQuest.cpp
src/Athena/ZQuestFile.cpp
src/Athena/ZQuestFileReader.cpp
src/Athena/ZQuestFileWriter.cpp
add_library(athena-zelda EXCLUDE_FROM_ALL
src/athena/ALTTPFile.cpp
src/athena/ALTTPFileReader.cpp
src/athena/ALTTPFileWriter.cpp
src/athena/ALTTPQuest.cpp
src/athena/MCFile.cpp
src/athena/MCFileReader.cpp
src/athena/MCFileWriter.cpp
src/athena/MCSlot.cpp
src/athena/SkywardSwordFile.cpp
src/athena/SkywardSwordFileReader.cpp
src/athena/SkywardSwordFileWriter.cpp
src/athena/SkywardSwordQuest.cpp
src/athena/ZQuestFile.cpp
src/athena/ZQuestFileReader.cpp
src/athena/ZQuestFileWriter.cpp
include/Athena/ALTTPEnums.hpp
include/Athena/ALTTPFile.hpp
include/Athena/ALTTPFileReader.hpp
include/Athena/ALTTPFileWriter.hpp
include/Athena/ALTTPQuest.hpp
include/Athena/ALTTPStructs.hpp
include/Athena/MCFile.hpp
include/Athena/MCFileReader.hpp
include/Athena/MCFileWriter.hpp
include/Athena/SkywardSwordFile.hpp
include/Athena/SkywardSwordFileReader.hpp
include/Athena/SkywardSwordFileWriter.hpp
include/Athena/SkywardSwordQuest.hpp
include/athena/ALTTPEnums.hpp
include/athena/ALTTPFile.hpp
include/athena/ALTTPFileReader.hpp
include/athena/ALTTPFileWriter.hpp
include/athena/ALTTPQuest.hpp
include/athena/ALTTPStructs.hpp
include/athena/MCFile.hpp
include/athena/MCFileReader.hpp
include/athena/MCFileWriter.hpp
include/athena/SkywardSwordFile.hpp
include/athena/SkywardSwordFileReader.hpp
include/athena/SkywardSwordFileWriter.hpp
include/athena/SkywardSwordQuest.hpp
)
# Icon
@ -162,7 +162,7 @@ set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header fi
if(WIN32 AND NOT CYGWIN)
set(INSTALL_CMAKE_DIR cmake)
else()
set(INSTALL_CMAKE_DIR lib/cmake/Athena)
set(INSTALL_CMAKE_DIR lib/cmake/athena)
endif()
# Make relative paths absolute (needed later on)
@ -176,16 +176,16 @@ foreach(p LIB INCLUDE CMAKE)
endforeach()
# Define installs
install(DIRECTORY include/ DESTINATION ${INSTALL_INCLUDE_DIR}/Athena COMPONENT Athena)
install(TARGETS AthenaCore
DESTINATION ${INSTALL_LIB_DIR} EXPORT AthenaTargets COMPONENT Athena)
install(DIRECTORY include/ DESTINATION ${INSTALL_INCLUDE_DIR}/athena COMPONENT athena)
install(TARGETS athena-core
DESTINATION ${INSTALL_LIB_DIR} EXPORT AthenaTargets COMPONENT athena)
if(WIN32 AND NOT CYGWIN)
install(FILES Athena.ico DESTINATION ${INSTALL_LIB_DIR} COMPONENT Athena)
install(FILES Athena.ico DESTINATION ${INSTALL_LIB_DIR} COMPONENT athena)
elseif(UNIX)
configure_file(libAthena.pc.in libAthena.pc @ONLY)
configure_file(PKGBUILD.in ${CMAKE_CURRENT_SOURCE_DIR}/PKGBUILD @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/libAthena.pc
DESTINATION ${INSTALL_LIB_DIR}/pkgconfig COMPONENT Athena)
DESTINATION ${INSTALL_LIB_DIR}/pkgconfig COMPONENT athena)
endif()
##################
@ -193,22 +193,21 @@ endif()
##################
# Add all targets to the build-tree export set
export(TARGETS AthenaCore
FILE "${PROJECT_BINARY_DIR}/AthenaTargets.cmake")
export(TARGETS athena-core FILE "${PROJECT_BINARY_DIR}/AthenaTargets.cmake")
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE Athena)
export(PACKAGE athena)
# Create the AthenaConfig.cmake
# ... for the build tree
set(CONF_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include/Athena")
set(CONF_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include/athena")
set(CONF_ICON_DIR "${PROJECT_SOURCE_DIR}/Athena.ico")
configure_file(AthenaConfig.cmake.in "${PROJECT_BINARY_DIR}/AthenaConfig.cmake" @ONLY)
# ... for the install tree
file(RELATIVE_PATH REL_INCLUDE_DIR "${ABS_INSTALL_CMAKE_DIR}" "${ABS_INSTALL_INCLUDE_DIR}")
file(RELATIVE_PATH REL_ICON_DIR "${ABS_INSTALL_CMAKE_DIR}" "${ABS_INSTALL_LIB_DIR}/Athena.ico")
set(CONF_INCLUDE_DIR "\${ATHENA_CMAKE_DIR}/${REL_INCLUDE_DIR}/Athena")
set(CONF_INCLUDE_DIR "\${ATHENA_CMAKE_DIR}/${REL_INCLUDE_DIR}/athena")
set(CONF_ICON_DIR "\${ATHENA_CMAKE_DIR}/${REL_ICON_DIR}")
configure_file(AthenaConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/AthenaConfig.cmake" @ONLY)
# ... for both
@ -218,10 +217,10 @@ configure_file(AthenaConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/AthenaConfigV
install(FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/AthenaConfig.cmake"
"${PROJECT_BINARY_DIR}/AthenaConfigVersion.cmake"
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Athena)
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT athena)
# Install the export set for use with the install-tree
install(EXPORT AthenaTargets DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Athena)
install(EXPORT AthenaTargets DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT athena)
################
# atdna import #
@ -243,11 +242,11 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR ${ATHENA_MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${ATHENA_MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${ATHENA_PATCH_VERSION})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Athena")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "athena")
if(WIN32 AND NOT UNIX)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Athena")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "athena")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\AthenaNSIS.bmp")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\Athena.ico")

View File

@ -10,7 +10,7 @@ add_executable(Example
if(GEKKO)
include_directories(${LIBOGCDIR}/include)
link_directories(${LIGOGCDIR}/lib/wii)
target_link_libraries(Example AthenaCore z wiiuse bte ogc m)
target_link_libraries(Example athena-core z wiiuse bte ogc m)
else()
#TODO: add normal link libraries
endif()

View File

@ -10,7 +10,7 @@ static GXRModeObj* rmode = nullptr;
#endif
#include <Athena/MemoryReader.hpp>
#include <athena/MemoryReader.hpp>
int main()
{
@ -36,7 +36,7 @@ int main()
if (rmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
Athena::io::MemoryCopyReader test("sd:/test.dat");
athena::io::MemoryCopyReader test("sd:/test.dat");
while(true)
{
#if HW_RVL

View File

@ -86,7 +86,7 @@ endif()
# Define installs
install(TARGETS atdna DESTINATION ${INSTALL_BIN_DIR} EXPORT atdnaTargets COMPONENT atdna)
install(DIRECTORY ${CLANG_INCLUDE_DIR}/ DESTINATION ${INSTALL_INCLUDE_DIR}/Athena/clang COMPONENT atdna)
install(DIRECTORY ${CLANG_INCLUDE_DIR}/ DESTINATION ${INSTALL_INCLUDE_DIR}/athena/clang COMPONENT atdna)
##################
# Package Export #

View File

@ -15,8 +15,8 @@
#include "llvm/Support/CommandLine.h"
static unsigned AthenaError = 0;
#define ATHENA_DNA_BASETYPE "struct Athena::io::DNA"
#define ATHENA_DNA_YAMLTYPE "struct Athena::io::DNAYaml"
#define ATHENA_DNA_BASETYPE "struct athena::io::DNA"
#define ATHENA_DNA_YAMLTYPE "struct athena::io::DNAYaml"
#define ATHENA_DNA_READER "__dna_reader"
#define ATHENA_DNA_WRITER "__dna_writer"
#define ATHENA_YAML_READER "__dna_docin"
@ -1148,9 +1148,9 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
for (int p=0 ; p<2 ; ++p)
{
if (p)
fileOut << "void " << decl->getQualifiedNameAsString() << "::write(Athena::io::IStreamWriter& " ATHENA_DNA_WRITER ") const\n{\n";
fileOut << "void " << decl->getQualifiedNameAsString() << "::write(athena::io::IStreamWriter& " ATHENA_DNA_WRITER ") const\n{\n";
else
fileOut << "void " << decl->getQualifiedNameAsString() << "::read(Athena::io::IStreamReader& " ATHENA_DNA_READER ")\n{\n";
fileOut << "void " << decl->getQualifiedNameAsString() << "::read(athena::io::IStreamReader& " ATHENA_DNA_READER ")\n{\n";
if (baseDNA.size())
{
@ -1823,23 +1823,23 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
if (directionVal == 0)
{
if (!p)
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", athena::Begin);\n";
else
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", athena::Begin);\n";
}
else if (directionVal == 1)
{
if (!p)
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", Athena::Current);\n";
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", athena::Current);\n";
else
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", Athena::Current);\n";
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", athena::Current);\n";
}
else if (directionVal == 2)
{
if (!p)
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", Athena::End);\n";
fileOut << " " ATHENA_DNA_READER ".seek(" << offsetExprStr << ", athena::End);\n";
else
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", Athena::End);\n";
fileOut << " " ATHENA_DNA_WRITER ".seek(" << offsetExprStr << ", athena::End);\n";
}
}
@ -1882,16 +1882,16 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
else if (align.isPowerOf2())
{
if (!p)
fileOut << " " ATHENA_DNA_READER ".seek((" ATHENA_DNA_READER ".position() + " << alignVal-1 << ") & ~" << alignVal-1 << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_READER ".seek((" ATHENA_DNA_READER ".position() + " << alignVal-1 << ") & ~" << alignVal-1 << ", athena::Begin);\n";
else
fileOut << " " ATHENA_DNA_WRITER ".seek((" ATHENA_DNA_WRITER ".position() + " << alignVal-1 << ") & ~" << alignVal-1 << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_WRITER ".seek((" ATHENA_DNA_WRITER ".position() + " << alignVal-1 << ") & ~" << alignVal-1 << ", athena::Begin);\n";
}
else
{
if (!p)
fileOut << " " ATHENA_DNA_READER ".seek((" ATHENA_DNA_READER ".position() + " << alignVal-1 << ") / " << alignVal << " * " << alignVal << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_READER ".seek((" ATHENA_DNA_READER ".position() + " << alignVal-1 << ") / " << alignVal << " * " << alignVal << ", athena::Begin);\n";
else
fileOut << " " ATHENA_DNA_WRITER ".seek((" ATHENA_DNA_WRITER ".position() + " << alignVal-1 << ") / " << alignVal << " * " << alignVal << ", Athena::Begin);\n";
fileOut << " " ATHENA_DNA_WRITER ".seek((" ATHENA_DNA_WRITER ".position() + " << alignVal-1 << ") / " << alignVal << " * " << alignVal << ", athena::Begin);\n";
}
}
}
@ -1926,9 +1926,9 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
for (int p=0 ; p<2 ; ++p)
{
if (p)
fileOut << "void " << decl->getQualifiedNameAsString() << "::write(Athena::io::YAMLDocWriter& " ATHENA_YAML_WRITER ") const\n{\n";
fileOut << "void " << decl->getQualifiedNameAsString() << "::write(athena::io::YAMLDocWriter& " ATHENA_YAML_WRITER ") const\n{\n";
else
fileOut << "void " << decl->getQualifiedNameAsString() << "::read(Athena::io::YAMLDocReader& " ATHENA_YAML_READER ")\n{\n";
fileOut << "void " << decl->getQualifiedNameAsString() << "::read(athena::io::YAMLDocReader& " ATHENA_YAML_READER ")\n{\n";
if (baseDNA.size())
{
@ -2274,7 +2274,7 @@ public:
if (!decl->getNumBases())
return true;
/* First ensure this inherits from struct Athena::io::DNA */
/* First ensure this inherits from struct athena::io::DNA */
std::string baseDNA;
bool isYAML = false;
if (!isDNARecord(decl, baseDNA, isYAML))
@ -2333,9 +2333,9 @@ public:
{
/* Write file head */
fileOut << "/* Auto generated atdna implementation */\n"
"#include <Athena/Global.hpp>\n"
"#include <Athena/IStreamReader.hpp>\n"
"#include <Athena/IStreamWriter.hpp>\n\n";
"#include <athena/Global.hpp>\n"
"#include <athena/IStreamReader.hpp>\n"
"#include <athena/IStreamWriter.hpp>\n\n";
for (const std::string& inputf : InputFilenames)
fileOut << "#include \"" << inputf << "\"\n";
fileOut << "\n";

View File

@ -1,6 +1,6 @@
#include <Athena/DNAYaml.hpp>
#include <athena/DNAYaml.hpp>
using namespace Athena;
using namespace athena;
typedef io::DNAYaml<BigEndian> BigDNA;
struct TESTSubFile : public BigDNA

View File

@ -6,6 +6,6 @@ set(YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERS
file(GLOB SRC src/*.c)
include_directories(../../include)
add_library(AthenaLibYaml STATIC ${SRC})
add_library(athena-libyaml STATIC ${SRC})
install(TARGETS AthenaLibYaml DESTINATION lib COMPONENT yaml)
install(TARGETS athena-libyaml DESTINATION lib COMPONENT yaml)

View File

@ -5,7 +5,7 @@
#include <deque>
#include <vector>
#include <cstdint>
#include <Athena/Types.hpp>
#include <athena/Types.hpp>
struct LZLengthOffset
{

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include <memory>
namespace Athena
namespace athena
{
class IAES

View File

@ -3,7 +3,7 @@
#include "Types.hpp"
namespace Athena
namespace athena
{
enum BowType : char

View File

@ -1,10 +1,10 @@
#ifndef ALTTP_FILE_HPP
#define ALTTP_FILE_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
#include <vector>
namespace Athena
namespace athena
{
class ALTTPQuest;

View File

@ -2,11 +2,11 @@
#define ALTTP_FILE_READER_HPP
#include <string>
#include "Athena/Types.hpp"
#include "Athena/MemoryReader.hpp"
#include "Athena/ALTTPQuest.hpp"
#include "athena/Types.hpp"
#include "athena/MemoryReader.hpp"
#include "athena/ALTTPQuest.hpp"
namespace Athena
namespace athena
{
class ALTTPFile;

View File

@ -2,10 +2,10 @@
#define ALTTP_FILE_WRITER_HPP
#include <string>
#include "Athena/MemoryWriter.hpp"
#include "Athena/ALTTPQuest.hpp"
#include "athena/MemoryWriter.hpp"
#include "athena/ALTTPQuest.hpp"
namespace Athena
namespace athena
{
class ALTTPFile;

View File

@ -1,13 +1,13 @@
#ifndef ALTTP_QUEST_HPP
#define ALTTP_QUEST_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
#include <string>
#include <vector>
#include "Athena/ALTTPStructs.hpp"
#include "Athena/ALTTPEnums.hpp"
#include "athena/ALTTPStructs.hpp"
#include "athena/ALTTPEnums.hpp"
namespace Athena
namespace athena
{
/*! \class ALTTPQuest

View File

@ -2,9 +2,9 @@
#define ALTTP_STRUCTS_HPP
#include <string>
#include "Athena/Types.hpp"
#include "athena/Types.hpp"
namespace Athena
namespace athena
{
struct ALTTPRoomFlags

View File

@ -1,9 +1,9 @@
#ifndef CHECKSUMS_HPP
#define CHECKSUMS_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
namespace Checksums
{

View File

@ -1,9 +1,9 @@
#ifndef COMPRESSION_HPP
#define COMPRESSION_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -13,7 +13,7 @@
#include <vector>
#include <memory>
namespace Athena
namespace athena
{
namespace io
{
@ -84,7 +84,7 @@ struct DNA
* @tparam sizeVar C++ expression wrapped in DNA_COUNT macro to determine number of bytes for buffer
*/
template <size_t sizeVar>
using Buffer = struct Athena::io::Buffer<sizeVar, DNAE>;
using Buffer = struct athena::io::Buffer<sizeVar, DNAE>;
/**
* @brief Template type wrapping std::string and signaling atdna to read string data where it's used
@ -92,7 +92,7 @@ struct DNA
* -1 literal indicates null-terminated string
*/
template <atInt32 sizeVar = -1>
using String = struct Athena::io::String<sizeVar, DNAE>;
using String = struct athena::io::String<sizeVar, DNAE>;
/**
* @brief Template type wrapping std::wstring and signaling atdna to read wstring data where it's used
@ -100,7 +100,7 @@ struct DNA
* -1 literal indicates null-terminated wstring
*/
template <atInt32 sizeVar = -1, Endian VE = DNAE>
using WString = struct Athena::io::WString<sizeVar, VE>;
using WString = struct athena::io::WString<sizeVar, VE>;
/**
* @brief Template type wrapping std::string and signaling atdna to read wstring data where it's used
@ -108,7 +108,7 @@ struct DNA
* -1 literal indicates null-terminated string
*/
template <atInt32 sizeVar = -1>
using WStringAsString = struct Athena::io::WStringAsString<sizeVar, DNAE>;
using WStringAsString = struct athena::io::WStringAsString<sizeVar, DNAE>;
/**
* @brief Meta Template signaling atdna to insert a stream seek where it's used
@ -232,14 +232,14 @@ struct WStringAsString : public DNA<VE>, public std::string
/** Macro to automatically declare read/write methods in subclasses */
#define DECL_DNA \
void read(Athena::io::IStreamReader&); \
void write(Athena::io::IStreamWriter&) const; \
void read(athena::io::IStreamReader&); \
void write(athena::io::IStreamWriter&) const; \
size_t binarySize(size_t __isz) const;
/** Macro to automatically declare read/write methods and prevent outputting implementation */
#define DECL_EXPLICIT_DNA \
void read(Athena::io::IStreamReader&); \
void write(Athena::io::IStreamWriter&) const; \
void read(athena::io::IStreamReader&); \
void write(athena::io::IStreamWriter&) const; \
size_t binarySize(size_t __isz) const; \
Delete __dna_delete;

View File

@ -13,7 +13,7 @@
#include "DNA.hpp"
#include "FileReader.hpp"
namespace Athena
namespace athena
{
namespace io
{
@ -1143,16 +1143,16 @@ struct DNAYaml : DNA<DNAE>
virtual const char* DNATypeV() const {return nullptr;}
template <size_t sizeVar>
using Buffer = struct Athena::io::BufferYaml<sizeVar, DNAE>;
using Buffer = struct athena::io::BufferYaml<sizeVar, DNAE>;
template <atInt32 sizeVar = -1>
using String = struct Athena::io::StringYaml<sizeVar, DNAE>;
using String = struct athena::io::StringYaml<sizeVar, DNAE>;
template <atInt32 sizeVar = -1, Endian VE = DNAE>
using WString = struct Athena::io::WStringYaml<sizeVar, VE>;
using WString = struct athena::io::WStringYaml<sizeVar, VE>;
template <atInt32 sizeVar = -1>
using WStringAsString = struct Athena::io::WStringAsStringYaml<sizeVar, DNAE>;
using WStringAsString = struct athena::io::WStringAsStringYaml<sizeVar, DNAE>;
std::string toYAMLString() const
{
@ -1228,7 +1228,7 @@ struct DNAYaml : DNA<DNAE>
}
template<class DNASubtype>
static bool ValidateFromYAMLFile(Athena::io::FileReader& fin)
static bool ValidateFromYAMLFile(athena::io::FileReader& fin)
{
return ValidateFromYAMLFile<DNASubtype>(fin._fileHandle());
}
@ -1251,9 +1251,9 @@ struct BufferYaml : public DNAYaml<VE>, public std::unique_ptr<atUint8[]>
{
return __isz + sizeVar;
}
void read(Athena::io::YAMLDocReader& reader)
void read(athena::io::YAMLDocReader& reader)
{*this = reader.readUBytes(nullptr);}
void write(Athena::io::YAMLDocWriter& writer) const
void write(athena::io::YAMLDocWriter& writer) const
{writer.writeUBytes(nullptr, *this, sizeVar);}
};
@ -1267,9 +1267,9 @@ struct StringYaml : public DNAYaml<VE>, public std::string
{writer.writeString(*this, sizeVar);}
size_t binarySize(size_t __isz) const
{return __isz + ((sizeVar<0)?(this->size()+1):sizeVar);}
void read(Athena::io::YAMLDocReader& reader)
void read(athena::io::YAMLDocReader& reader)
{this->assign(std::move(reader.readString(nullptr)));}
void write(Athena::io::YAMLDocWriter& writer) const
void write(athena::io::YAMLDocWriter& writer) const
{writer.writeString(nullptr, *this);}
std::string& operator=(const std::string& __str)
{return this->assign(__str);}
@ -1293,9 +1293,9 @@ struct WStringYaml : public DNAYaml<VE>, public std::wstring
}
size_t binarySize(size_t __isz) const
{return __isz + (((sizeVar<0)?(this->size()+1):sizeVar)*2);}
void read(Athena::io::YAMLDocReader& reader)
void read(athena::io::YAMLDocReader& reader)
{this->assign(std::move(reader.readWString(nullptr)));}
void write(Athena::io::YAMLDocWriter& writer) const
void write(athena::io::YAMLDocWriter& writer) const
{writer.writeWString(nullptr, *this);}
std::wstring& operator=(const std::wstring& __str)
{return this->assign(__str);}
@ -1313,9 +1313,9 @@ struct WStringAsStringYaml : public DNAYaml<VE>, public std::string
{writer.writeStringAsWString(*this, sizeVar);}
size_t binarySize(size_t __isz) const
{return __isz + (((sizeVar<0)?(this->size()+1):sizeVar)*2);}
void read(Athena::io::YAMLDocReader& reader)
void read(athena::io::YAMLDocReader& reader)
{this->assign(std::move(reader.readString(nullptr)));}
void write(Athena::io::YAMLDocWriter& writer) const
void write(athena::io::YAMLDocWriter& writer) const
{writer.writeString(nullptr, *this);}
std::string& operator=(const std::string& __str)
{return this->assign(__str);}
@ -1326,15 +1326,15 @@ struct WStringAsStringYaml : public DNAYaml<VE>, public std::string
/** Macro to automatically declare YAML read/write methods in subclasses */
#define DECL_YAML \
DECL_DNA \
void read(Athena::io::YAMLDocReader&); \
void write(Athena::io::YAMLDocWriter&) const; \
void read(athena::io::YAMLDocReader&); \
void write(athena::io::YAMLDocWriter&) const; \
static const char* DNAType(); \
const char* DNATypeV() const {return DNAType();} \
/** Macro to automatically declare YAML read/write methods with client-code's definition */
#define DECL_EXPLICIT_YAML \
void read(Athena::io::YAMLDocReader&); \
void write(Athena::io::YAMLDocWriter&) const; \
void read(athena::io::YAMLDocReader&); \
void write(athena::io::YAMLDocWriter&) const; \
static const char* DNAType(); \
const char* DNATypeV() const {return DNAType();} \

View File

@ -1,14 +1,14 @@
#ifndef DIR_HPP
#define DIR_HPP
#include "Athena/FileInfo.hpp"
#include "athena/FileInfo.hpp"
#include <stdio.h>
#if _WIN32
typedef int mode_t;
#endif
namespace Athena
namespace athena
{
class Dir
{

View File

@ -3,9 +3,9 @@
#include <string>
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
class FileInfo
{

View File

@ -4,9 +4,9 @@
#include <string>
#include <memory>
#include <stdio.h>
#include "Athena/IStreamReader.hpp"
#include "athena/IStreamReader.hpp"
namespace Athena
namespace athena
{
namespace io
{
@ -66,7 +66,7 @@ protected:
#ifndef FILEREADER_BASE
#define FILEREADER_BASE() \
private: \
typedef Athena::io::FileReader base
typedef athena::io::FileReader base
#endif // FILEREADER_BASE

View File

@ -1,10 +1,10 @@
#ifndef FILEWRITER_HPP
#define FILEWRITER_HPP
#include "Athena/IStreamWriter.hpp"
#include "athena/IStreamWriter.hpp"
#include <stdio.h>
namespace Athena
namespace athena
{
namespace io
{
@ -59,7 +59,7 @@ private:
#ifndef FILEWRITER_BASE
#define FILEWRITER_BASE() \
private: \
typedef Athena::io::FileWriter base;
typedef athena::io::FileWriter base;
#endif // FILEWRITER_BASE
#endif // FILEWRITER_HPP

View File

@ -2,8 +2,8 @@
#define GLOBAL_HPP
#include <iostream>
#include "Athena/Types.hpp"
#include "Athena/Utility.hpp"
#include "athena/Types.hpp"
#include "athena/Utility.hpp"
#ifdef _MSC_VER
#pragma warning(disable : 4996)
@ -100,7 +100,7 @@ inline type operator~(const type& key)\
}
#endif
namespace Athena
namespace athena
{
namespace error
{
@ -126,7 +126,7 @@ enum Endian
};
} // Athena
typedef void (*atEXCEPTION_HANDLER)(Athena::error::Level level, const char* file, const char* function, int line, const char* fmt, ...);
typedef void (*atEXCEPTION_HANDLER)(athena::error::Level level, const char* file, const char* function, int line, const char* fmt, ...);
atEXCEPTION_HANDLER atGetExceptionHandler();
/**
@ -135,15 +135,15 @@ atEXCEPTION_HANDLER atGetExceptionHandler();
*/
void atSetExceptionHandler(atEXCEPTION_HANDLER func);
std::ostream& operator<<(std::ostream& os, const Athena::SeekOrigin& origin);
std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian);
std::ostream& operator<<(std::ostream& os, const athena::SeekOrigin& origin);
std::ostream& operator<<(std::ostream& os, const athena::Endian& endian);
#ifdef _MSC_VER
#ifndef NDEBUG
#define atDebug(fmt, ...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
__handler(athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
} while(0)
#else
#define atDebug(fmt, ...)
@ -152,25 +152,25 @@ std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian);
#define atMessage(fmt, ...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
__handler(athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
} while(0)
#define atWarning(fmt, ...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Warning, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
__handler(athena::error::Level::Warning, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
} while(0)
#define atError(fmt, ...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Error, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
__handler(athena::error::Level::Error, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
} while(0)
#define atFatal(fmt, ...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Fatal, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
__handler(athena::error::Level::Fatal, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt, ##__VA_ARGS__); \
} while(0)
#elif defined(__GNUC__)
@ -178,7 +178,7 @@ std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian);
#define atDebug(fmt...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
__handler(athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
} while(0)
#else // _MSC_VER
#define atDebug(fmt, ...)
@ -187,25 +187,25 @@ std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian);
#define atMessage(fmt...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
__handler(athena::error::Level::Message, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
} while(0)
#define atWarning(fmt...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Warning, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
__handler(athena::error::Level::Warning, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
} while(0)
#define atError(fmt...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Error, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
__handler(athena::error::Level::Error, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
} while(0)
#define atFatal(fmt...) \
do { atEXCEPTION_HANDLER __handler = atGetExceptionHandler(); \
if (__handler) \
__handler(Athena::error::Level::Fatal, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
__handler(athena::error::Level::Fatal, __FILE__, AT_PRETTY_FUNCTION, __LINE__, fmt); \
} while(0)
#endif // defined(__GNUC__)

View File

@ -3,7 +3,7 @@
#include "Global.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -6,7 +6,7 @@
#include "utf8proc.h"
#include "IStream.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -4,7 +4,7 @@
#include "utf8proc.h"
#include "IStream.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,9 +1,9 @@
#ifndef MCFILE_HPP
#define MCFILE_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
class MCSlot;

View File

@ -1,9 +1,9 @@
#ifndef MCFILEREADER_HPP
#define MCFILEREADER_HPP
#include "Athena/MemoryReader.hpp"
#include "athena/MemoryReader.hpp"
namespace Athena
namespace athena
{
class MCFile;

View File

@ -1,10 +1,10 @@
#ifndef MCFILEWRITER_HPP
#define MCFILEWRITER_HPP
#include "Athena/Types.hpp"
#include "Athena/MemoryWriter.hpp"
#include "athena/Types.hpp"
#include "athena/MemoryWriter.hpp"
namespace Athena
namespace athena
{
class MCFile;

View File

@ -1,10 +1,10 @@
#ifndef MCSLOT_HPP
#define MCSLOT_HPP
#include "Athena/Global.hpp"
#include "Athena/ZQuestFile.hpp"
#include "athena/Global.hpp"
#include "athena/ZQuestFile.hpp"
namespace Athena
namespace athena
{
class MCSlot : public ZQuestFile
{

View File

@ -4,9 +4,9 @@
#include <string>
#include <memory>
#include <functional>
#include "Athena/IStreamReader.hpp"
#include "athena/IStreamReader.hpp"
namespace Athena
namespace athena
{
namespace io
{
@ -123,14 +123,14 @@ protected:
#ifndef MEMORYREADER_BASE
#define MEMORYREADER_BASE() \
private: \
typedef Athena::io::MemoryReader base
typedef athena::io::MemoryReader base
#endif // MEMORYREADER_BASE
#ifndef MEMORYCOPYREADER_BASE
#define MEMORYCOPYREADER_BASE() \
private: \
typedef Athena::io::MemoryCopyReader base
typedef athena::io::MemoryCopyReader base
#endif // MEMORYCOPYREADER_BASE

View File

@ -4,9 +4,9 @@
#include <string>
#include <memory>
#include <functional>
#include "Athena/IStreamWriter.hpp"
#include "athena/IStreamWriter.hpp"
namespace Athena
namespace athena
{
namespace io
{
@ -166,13 +166,13 @@ private:
#ifndef MEMORYWRITER_BASE
#define MEMORYWRITER_BASE() \
private: \
typedef Athena::io::MemoryWriter base
typedef athena::io::MemoryWriter base
#endif // BINARYWRITER_BASE
#ifndef MEMORYCOPYWRITER_BASE
#define MEMORYCOPYWRITER_BASE() \
private: \
typedef Athena::io::MemoryCopyWriter base
typedef athena::io::MemoryCopyWriter base
#endif // BINARYWRITER_BASE
#endif // MEMORYWRITER_HPP

View File

@ -2,10 +2,10 @@
#ifndef PHYSFSSTREAM_HPP
#define PHYSFSSTREAM_HPP
#include "Athena/Stream.hpp"
#include "athena/Stream.hpp"
#include <physfs.h>
namespace Athena
namespace athena
{
namespace io
{
@ -55,7 +55,7 @@ private:
#ifndef PHYSFSFILEREADER_BASE
#define PHYSFSFILEREADER_BASE() \
typedef Athena::io::PHYSFSFileReader base
typedef athena::io::PHYSFSFileReader base
#endif
#endif // PHYSFSSTREAM_HPP
#endif // ATHENA_ENABLE_PHYSFS

View File

@ -1,9 +1,9 @@
#ifndef SAKURAGLOBAL_HPP
#define SAKURAGLOBAL_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -1,12 +1,12 @@
#ifndef SSFILE_HPP
#define SSFILE_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
// standard lib
#include <vector>
namespace Athena
namespace athena
{
class SkywardSwordQuest;

View File

@ -1,9 +1,9 @@
#ifndef SSFILEREADER_HPP
#define SSFILEREADER_HPP
#include "Athena/MemoryReader.hpp"
#include "athena/MemoryReader.hpp"
namespace Athena
namespace athena
{
class SkywardSwordFile;
namespace io

View File

@ -1,9 +1,9 @@
#ifndef SSFILEWRITER_HPP
#define SSFILEWRITER_HPP
#include "Athena/MemoryWriter.hpp"
#include "athena/MemoryWriter.hpp"
namespace Athena
namespace athena
{
class SkywardSwordFile;

View File

@ -1,10 +1,10 @@
#ifndef SKYWARDSWORDQUEST_HPP
#define SKYWARDSWORDQUEST_HPP
#include "Athena/Global.hpp"
#include "Athena/ZQuestFile.hpp"
#include "athena/Global.hpp"
#include "athena/ZQuestFile.hpp"
namespace Athena
namespace athena
{
// TODO: Handle game specific data

View File

@ -10,9 +10,9 @@
#include <QString>
#include <QList>
#endif
#include "Athena/SakuraGlobal.hpp"
#include "athena/SakuraGlobal.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{
@ -124,7 +124,7 @@ private:
#ifdef ATHENA_USE_QT
Q_DECLARE_METATYPE(Uint32)
Q_DECLARE_METATYPE(Athena::Sakura::Sprite*)
Q_DECLARE_METATYPE(athena::Sakura::Sprite*)
#endif
#endif // SSPRITE_HPP

View File

@ -13,9 +13,9 @@
#endif
#include <string>
#include "Athena/SakuraGlobal.hpp"
#include "athena/SakuraGlobal.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{
@ -259,7 +259,7 @@ private:
} // Zelda
#ifdef ATHENA_USE_QT
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFile*)
Q_DECLARE_METATYPE(Athena::Sakura::STexture*)
Q_DECLARE_METATYPE(athena::Sakura::SpriteFile*)
Q_DECLARE_METATYPE(athena::Sakura::STexture*)
#endif
#endif // SSPRITE_HPP

View File

@ -1,9 +1,9 @@
#ifndef SSPRITEFILEREADER_HPP
#define SSPRITEFILEREADER_HPP
#include "Athena/MemoryReader.hpp"
#include "athena/MemoryReader.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -1,9 +1,9 @@
#ifndef SSPRITEFILEWRITER_HPP
#define SSPRITEFILEWRITER_HPP
#include "Athena/MemoryWriter.hpp"
#include "athena/MemoryWriter.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -2,7 +2,7 @@
#define SSPRITEFRAME_HPP
#include "Athena/SakuraGlobal.hpp"
#include "athena/SakuraGlobal.hpp"
#ifndef ATHENA_USE_QT
#include <vector>
@ -11,7 +11,7 @@
#include <QList>
#endif
namespace Athena
namespace athena
{
namespace Sakura
{
@ -78,7 +78,7 @@ private:
} // zelda
#ifdef ATHENA_USE_QT
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFrame*);
Q_DECLARE_METATYPE(athena::Sakura::SpriteFrame*);
#endif
#endif // SSPRITEFRAME_HPP

View File

@ -1,7 +1,7 @@
#ifndef SSPRITEPART_HPP
#define SSPRITEPART_HPP
#include "Athena/SakuraGlobal.hpp"
#include "athena/SakuraGlobal.hpp"
#ifndef ATHENA_USE_QT
# include <vector>
#else
@ -13,7 +13,7 @@
#include <string>
namespace Athena
namespace athena
{
namespace Sakura
{
@ -194,7 +194,7 @@ private:
}
}
#ifdef ATHENA_USE_QT
Q_DECLARE_METATYPE(Athena::Sakura::SpritePart*)
Q_DECLARE_METATYPE(athena::Sakura::SpritePart*)
#endif
#endif // SSPRITEPART_HPP

View File

@ -5,10 +5,10 @@
#include <vector>
#include <stdarg.h>
#include <string.h>
#include "Athena/Global.hpp"
#include "Athena/Types.hpp"
#include "athena/Global.hpp"
#include "athena/Types.hpp"
namespace Athena
namespace athena
{
namespace utility
{
@ -69,8 +69,8 @@ inline double swapDouble(double val)
}
inline atInt16 LittleInt16(atInt16& val)
{
if (Athena::utility::isSystemBigEndian())
val = Athena::utility::swap16(val);
if (athena::utility::isSystemBigEndian())
val = athena::utility::swap16(val);
return val;
}
@ -84,8 +84,8 @@ inline atUint16 LittleUint16(atUint16& val)
}
inline atInt16 BigInt16(atInt16& val)
{
if (!Athena::utility::isSystemBigEndian())
val = Athena::utility::swap16(val);
if (!athena::utility::isSystemBigEndian())
val = athena::utility::swap16(val);
return val;
}
@ -99,8 +99,8 @@ inline atUint16 BigUint16(atUint16& val)
}
inline atInt32 LittleInt32(atInt32& val)
{
if (Athena::utility::isSystemBigEndian())
val = Athena::utility::swap32(val);
if (athena::utility::isSystemBigEndian())
val = athena::utility::swap32(val);
return val;
}
@ -114,8 +114,8 @@ inline atUint32 LittleUint32(atUint32& val)
}
inline atInt32 BigInt32(atInt32& val)
{
if (!Athena::utility::isSystemBigEndian())
val = Athena::utility::swap32(val);
if (!athena::utility::isSystemBigEndian())
val = athena::utility::swap32(val);
return val;
}
@ -129,8 +129,8 @@ inline atUint32 BigUint32(atUint32& val)
}
inline atInt64 LittleInt64(atInt64& val)
{
if (Athena::utility::isSystemBigEndian())
val = Athena::utility::swap64(val);
if (athena::utility::isSystemBigEndian())
val = athena::utility::swap64(val);
return val;
}
@ -144,8 +144,8 @@ inline atUint64 LittleUint64(atUint64& val)
}
inline atInt64 BigInt64(atInt64& val)
{
if (!Athena::utility::isSystemBigEndian())
val = Athena::utility::swap64(val);
if (!athena::utility::isSystemBigEndian())
val = athena::utility::swap64(val);
return val;
}
@ -160,29 +160,29 @@ inline atUint64 BigUint64(atUint64& val)
inline float LittleFloat(float& val)
{
if (Athena::utility::isSystemBigEndian())
val = Athena::utility::swapFloat(val);
if (athena::utility::isSystemBigEndian())
val = athena::utility::swapFloat(val);
return val;
}
inline float BigFloat(float& val)
{
if (!Athena::utility::isSystemBigEndian())
val = Athena::utility::swapFloat(val);
if (!athena::utility::isSystemBigEndian())
val = athena::utility::swapFloat(val);
return val;
}
inline double LittleDouble(double& val)
{
if (Athena::utility::isSystemBigEndian())
val = Athena::utility::swapDouble(val);
if (athena::utility::isSystemBigEndian())
val = athena::utility::swapDouble(val);
return val;
}
inline double BigDouble(double& val)
{
if (!Athena::utility::isSystemBigEndian())
val = Athena::utility::swapDouble(val);
if (!athena::utility::isSystemBigEndian())
val = athena::utility::swapDouble(val);
return val;
}

View File

@ -3,9 +3,9 @@
#include <vector>
#include <string>
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
class WiiImage;
/*! \class WiiBanner

View File

@ -3,9 +3,9 @@
#include <string>
#include <map>
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
const atUint8 SD_KEY [16] = {0xab, 0x01, 0xb9, 0xd8, 0xe1, 0x62, 0x2b, 0x08, 0xaf, 0xba, 0xd8, 0x4d, 0xbf, 0xc2, 0xa5, 0x5d};

View File

@ -2,9 +2,9 @@
#define WIIIMAGE_HPP
#include <memory>
#include "Athena/Types.hpp"
#include "athena/Types.hpp"
namespace Athena
namespace athena
{
/*!

View File

@ -3,9 +3,9 @@
#include <unordered_map>
#include <string>
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
class WiiFile;

View File

@ -1,10 +1,10 @@
#ifndef WIISAVEREADER_HPP
#define WIISAVEREADER_HPP
#include "Athena/Global.hpp"
#include "Athena/MemoryReader.hpp"
#include "athena/Global.hpp"
#include "athena/MemoryReader.hpp"
namespace Athena
namespace athena
{
class WiiSave;
class WiiBanner;

View File

@ -1,9 +1,9 @@
#ifndef WIISAVEWRITER_HPP
#define WIISAVEWRITER_HPP
#include "Athena/MemoryWriter.hpp"
#include "athena/MemoryWriter.hpp"
namespace Athena
namespace athena
{
class WiiSave;
class WiiBanner;

View File

@ -18,7 +18,7 @@
#define ZQUEST_HPP
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
#include <string>
#include <vector>
#include <memory>
@ -26,7 +26,7 @@
#define ZQUEST_VERSION_CHECK(major, minor, revision) \
(major | (minor << 8) | (revision << 16))
namespace Athena
namespace athena
{
/*!
* \brief ZQuestFile is an export format for save data.

View File

@ -17,9 +17,9 @@
#ifndef __ZQUESTFILEREADER_HPP__
#define __ZQUESTFILEREADER_HPP__
#include "Athena/MemoryReader.hpp"
#include "athena/MemoryReader.hpp"
namespace Athena
namespace athena
{
class ZQuestFile;

View File

@ -17,9 +17,9 @@
#ifndef __ZQUESTFILEWRITER_HPP__
#define __ZQUESTFILEWRITER_HPP__
#include "Athena/MemoryWriter.hpp"
#include "athena/MemoryWriter.hpp"
namespace Athena
namespace athena
{
class ZQuestFile;

View File

@ -3,7 +3,7 @@
#ifndef __DOXYGEN_IGNORE__
#include "Athena/Types.hpp"
#include "athena/Types.hpp"
int bn_compare(atUint8* a, atUint8* b, atUint32 n);
void bn_sub_modulus(atUint8* a, atUint8* N, atUint32 n);
void bn_add(atUint8* d, atUint8* a, atUint8* b, atUint8* N, atUint32 n);

View File

@ -1,6 +1,6 @@
#ifndef EC_H
#define EC_H
#include "Athena/Types.hpp"
#include "athena/Types.hpp"
bool check_ec(atUint8* ng, atUint8* ap, atUint8* sig, atUint8* sig_hash);
void make_ec_cert(atUint8* cert, atUint8* sig, char* signer, char* name, atUint8* priv, atUint32 key_id);

View File

@ -1,7 +1,7 @@
#ifndef _SHA1_H_
#define _SHA1_H_
#include "Athena/Types.hpp"
#include "athena/Types.hpp"
#ifndef __DOXYGEN_IGNORE__
#ifdef __cplusplus

View File

@ -1,6 +1,6 @@
#include "LZ77/LZLookupTable.hpp"
#include "LZ77/LZType10.hpp"
#include <Athena/MemoryWriter.hpp>
#include <athena/MemoryWriter.hpp>
#include <string.h>
LZType10::LZType10(atInt32 MinimumOffset, atInt32 SlidingWindow, atInt32 MinimumMatch, atInt32 BlockSize)
@ -14,9 +14,9 @@ LZType10::LZType10(atInt32 MinimumOffset, atInt32 SlidingWindow, atInt32 Minimum
atUint32 LZType10::compress(const atUint8* src, atUint8** dstBuf, atUint32 srcLength)
{
atUint32 encodeSize = (srcLength << 8) | (0x10);
encodeSize = Athena::utility::LittleUint32(encodeSize); //File size needs to be written as little endian always
encodeSize = athena::utility::LittleUint32(encodeSize); //File size needs to be written as little endian always
Athena::io::MemoryCopyWriter outbuf("tmp");
athena::io::MemoryCopyWriter outbuf("tmp");
outbuf.writeUint32(encodeSize);
atUint8* ptrStart = (atUint8*)src;
@ -42,7 +42,7 @@ atUint32 LZType10::compress(const atUint8* src, atUint8** dstBuf, atUint32 srcLe
{
//Gotta swap the bytes since system is wii is big endian and most computers are little endian
atUint16 lenOff = (((searchResult.length - m_minMatch) & 0xF) << 12) | ((searchResult.offset - 1) & 0xFFF);
Athena::utility::BigUint16(lenOff);
athena::utility::BigUint16(lenOff);
memcpy(ptrBytes, &lenOff, sizeof(atUint16));
@ -81,7 +81,7 @@ atUint32 LZType10::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
return 0;
atUint32 uncompressedSize = *(atUint32*)(src); //Size of data when it is uncompressed
Athena::utility::LittleUint32(uncompressedSize); //The compressed file has the filesize encoded in little endian
athena::utility::LittleUint32(uncompressedSize); //The compressed file has the filesize encoded in little endian
uncompressedSize = uncompressedSize >> 8;//first byte is the encode flag
atUint8* uncompressedData = new atUint8[uncompressedSize];
@ -104,7 +104,7 @@ atUint32 LZType10::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
{
atUint16 lenOff;
memcpy(&lenOff, inputPtr, sizeof(atUint16));
Athena::utility::BigUint16(lenOff);
athena::utility::BigUint16(lenOff);
inputPtr += sizeof(atUint16); //Move forward two bytes
//length offset pair has been decoded.
LZLengthOffset decoding;

View File

@ -1,6 +1,6 @@
#include "LZ77/LZLookupTable.hpp"
#include "LZ77/LZType11.hpp"
#include <Athena/MemoryWriter.hpp>
#include <athena/MemoryWriter.hpp>
#include <string.h>
@ -13,13 +13,13 @@ LZType11::LZType11(atInt32 minimumOffset, atInt32 slidingWindow, atInt32 minimum
atUint32 LZType11::compress(const atUint8* src, atUint8** dst, atUint32 srcLength)
{
Athena::io::MemoryCopyWriter outbuff("tmp");
athena::io::MemoryCopyWriter outbuff("tmp");
if (srcLength > 0xFFFFFF) // If length is greater than 24 bits or 16 Megs
{
atUint32 encodeFlag = 0x11;
Athena::utility::LittleUint32(encodeFlag);
Athena::utility::LittleUint32(srcLength);//Filesize data is little endian
athena::utility::LittleUint32(encodeFlag);
athena::utility::LittleUint32(srcLength);//Filesize data is little endian
outbuff.writeUint32(encodeFlag);
outbuff.writeUint32(srcLength);
@ -27,7 +27,7 @@ atUint32 LZType11::compress(const atUint8* src, atUint8** dst, atUint32 srcLengt
else
{
atUint32 encodeSize = (srcLength << 8) | (0x11);
Athena::utility::LittleUint32(encodeSize);
athena::utility::LittleUint32(encodeSize);
outbuff.writeUint32(encodeSize);
}
@ -79,7 +79,7 @@ atUint32 LZType11::compress(const atUint8* src, atUint8** dst, atUint32 srcLengt
atUint16 lenOff = ((((searchResult.length - 1) & 0xF) << 12) | //Bits 15-12
((searchResult.offset - 1) & 0xFFF) //Bits 11-0
);
Athena::utility::BigUint16(lenOff);
athena::utility::BigUint16(lenOff);
memcpy(ptrBytes, &lenOff, 2);
ptrBytes += 2;
}
@ -88,7 +88,7 @@ atUint32 LZType11::compress(const atUint8* src, atUint8** dst, atUint32 srcLengt
atUint32 lenOff = ((((searchResult.length - minThreeByteMatch) & 0xFF) << 12) | //Bits 20-12
((searchResult.offset - 1) & 0xFFF) //Bits 11-0
);
Athena::utility::BigUint32(lenOff);
athena::utility::BigUint32(lenOff);
memcpy(ptrBytes, (atUint8*)&lenOff + 1, 3); //Make sure to copy the lower 24 bits. 0x12345678- This statement copies 0x123456
ptrBytes += 3;
}
@ -98,7 +98,7 @@ atUint32 LZType11::compress(const atUint8* src, atUint8** dst, atUint32 srcLengt
(((searchResult.length - minFourByteMatch) & 0xFFFF) << 12) | //Bits 28-12
((searchResult.offset - 1) & 0xFFF) //Bits 11-0
);
Athena::utility::BigUint32(lenOff);
athena::utility::BigUint32(lenOff);
memcpy(ptrBytes, &lenOff, 4);
ptrBytes += 4;
}
@ -136,14 +136,14 @@ atUint32 LZType11::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
return 0;
atUint32 uncompressedLen = *(atUint32*)(src);
Athena::utility::LittleUint32(uncompressedLen);//The compressed file has the filesize encoded in little endian
athena::utility::LittleUint32(uncompressedLen);//The compressed file has the filesize encoded in little endian
uncompressedLen = uncompressedLen >> 8; //First byte is the encode flag
atUint32 currentOffset = 4;
if (uncompressedLen == 0) //If the filesize var is zero then the true filesize is over 14MB and must be read in from the next 4 bytes
{
atUint32 filesize = *(atUint32*)(src + 4);
filesize = Athena::utility::LittleUint32(filesize);
filesize = athena::utility::LittleUint32(filesize);
currentOffset += 4;
}
@ -178,7 +178,7 @@ atUint32 LZType11::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
atUint16 lenOff = 0;
memcpy(&lenOff, inputPtr, 2);
inputPtr += 2;
Athena::utility::BigUint16(lenOff);
athena::utility::BigUint16(lenOff);
decoding.length = (lenOff >> 12) + 1;
decoding.offset = (lenOff & 0xFFF) + 1;
}
@ -187,7 +187,7 @@ atUint32 LZType11::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
atUint32 lenOff = 0;
memcpy((atUint8*)&lenOff + 1, inputPtr, 3);
inputPtr += 3;
Athena::utility::BigUint32(lenOff);
athena::utility::BigUint32(lenOff);
decoding.length = (lenOff >> 12) + threeByteDenorm;
decoding.offset = (lenOff & 0xFFF) + 1;
}
@ -196,7 +196,7 @@ atUint32 LZType11::decompress(const atUint8* src, atUint8** dst, atUint32 srcLen
atUint32 lenOff = 0;
memcpy(&lenOff, inputPtr, 4);
inputPtr += 4;
Athena::utility::BigUint32(lenOff);
athena::utility::BigUint32(lenOff);
decoding.length = ((lenOff >> 12) & 0xFFFF) + fourByteDenorm; //Gets rid of the Four byte flag
decoding.offset = (lenOff & 0xFFF) + 1;

View File

@ -7,7 +7,7 @@
#include <cpuid.h>
#endif
namespace Athena
namespace athena
{
/* rotates x one bit to the left */

View File

@ -1,7 +1,7 @@
#include "Athena/ALTTPFile.hpp"
#include "Athena/ALTTPQuest.hpp"
#include "athena/ALTTPFile.hpp"
#include "athena/ALTTPQuest.hpp"
namespace Athena
namespace athena
{
ALTTPFile::ALTTPFile()
{}

View File

@ -1,10 +1,10 @@
#include "Athena/ALTTPFileReader.hpp"
#include "Athena/ALTTPFile.hpp"
#include "Athena/ALTTPQuest.hpp"
#include "athena/ALTTPFileReader.hpp"
#include "athena/ALTTPFile.hpp"
#include "athena/ALTTPQuest.hpp"
#include <iostream>
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,9 +1,9 @@
#include "Athena/ALTTPFileWriter.hpp"
#include "Athena/ALTTPFile.hpp"
#include "Athena/ALTTPQuest.hpp"
#include "athena/ALTTPFileWriter.hpp"
#include "athena/ALTTPFile.hpp"
#include "athena/ALTTPQuest.hpp"
#include <iostream>
namespace Athena
namespace athena
{
namespace io

View File

@ -1,7 +1,7 @@
#include "Athena/ALTTPQuest.hpp"
#include "athena/ALTTPQuest.hpp"
#include <iostream>
namespace Athena
namespace athena
{
ALTTPQuest::ALTTPQuest()

View File

@ -1,9 +1,9 @@
#include "Athena/Checksums.hpp"
#include "Athena/FileReader.hpp"
#include "athena/Checksums.hpp"
#include "athena/FileReader.hpp"
#include <iostream>
#include <iomanip>
namespace Athena
namespace athena
{
namespace Checksums
{

View File

@ -1,11 +1,11 @@
#include "Athena/Compression.hpp"
#include "athena/Compression.hpp"
#include <lzo/lzo1x.h>
#include <iostream>
#include <zlib.h>
#include "LZ77/LZType10.hpp"
#include "LZ77/LZType11.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,6 +1,6 @@
#include "Athena/DNAYaml.hpp"
#include "athena/DNAYaml.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,4 +1,4 @@
#include "Athena/Dir.hpp"
#include "athena/Dir.hpp"
#include <sys/stat.h>
#include <stdlib.h>
#include <limits.h>
@ -18,7 +18,7 @@
#define realpath(__name, __resolved) _fullpath((__name), (__resolved), 4096)
#endif
namespace Athena
namespace athena
{
Dir::Dir(const std::string &path)
: m_path(path)

View File

@ -1,7 +1,7 @@
#include "Athena/FileInfo.hpp"
#include "Athena/Utility.hpp"
#include "Athena/FileWriter.hpp"
#include "Athena/FileReader.hpp"
#include "athena/FileInfo.hpp"
#include "athena/Utility.hpp"
#include "athena/FileWriter.hpp"
#include "athena/FileReader.hpp"
#include <time.h>
#include <stdio.h>
#include <limits.h>
@ -30,7 +30,7 @@
#define realpath(__name, __resolved) _fullpath((__resolved), (__name), 4096)
#endif
namespace Athena
namespace athena
{
FileInfo::FileInfo(const std::string& path)
@ -117,7 +117,7 @@ bool FileInfo::touch() const
#if defined(__GNUC__) && !(defined(HW_DOL) || defined(HW_RVL) || defined(GEKKO))
stat64_t st;
if (stat64(m_path.c_str(), &st) < 0) {
(void)Athena::io::FileWriter(m_path);
(void)athena::io::FileWriter(m_path);
return true;
}
if (utimes(m_path.c_str(), NULL) < 0) {
@ -173,13 +173,13 @@ bool FileInfo::touch() const
// Generic portable version, not extremely reliable but does work
atUint64 val = 0xCDCDCDCDCD;
{
Athena::io::FileReader reader(m_path.c_str());
athena::io::FileReader reader(m_path.c_str());
if (reader.isOpen())
val = reader.readUint64();
}
{
Athena::io::FileWriter writer(m_path, false);
athena::io::FileWriter writer(m_path, false);
if (val != 0xCDCDCDCDCD && writer.isOpen())
writer.writeUint64(val);
else if (!writer.isOpen())

View File

@ -1,4 +1,4 @@
#include "Athena/FileReader.hpp"
#include "athena/FileReader.hpp"
#if _WIN32
#include "win32_largefilewrapper.h"
@ -9,7 +9,7 @@
#include "osx_largefilewrapper.h"
#endif
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,4 +1,4 @@
#include "Athena/FileWriter.hpp"
#include "athena/FileWriter.hpp"
#if _WIN32
#include "win32_largefilewrapper.h"
@ -9,7 +9,7 @@
#include "osx_largefilewrapper.h"
#endif
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,21 +1,21 @@
#include "Athena/Global.hpp"
#include "athena/Global.hpp"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
std::ostream& operator<<(std::ostream& os, const Athena::SeekOrigin& origin)
std::ostream& operator<<(std::ostream& os, const athena::SeekOrigin& origin)
{
switch (origin)
{
case Athena::SeekOrigin::Begin:
case athena::SeekOrigin::Begin:
os << "Begin";
break;
case Athena::SeekOrigin::Current:
case athena::SeekOrigin::Current:
os << "Current";
break;
case Athena::SeekOrigin::End:
case athena::SeekOrigin::End:
os << "End";
break;
}
@ -24,15 +24,15 @@ std::ostream& operator<<(std::ostream& os, const Athena::SeekOrigin& origin)
}
std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian)
std::ostream& operator<<(std::ostream& os, const athena::Endian& endian)
{
switch (endian)
{
case Athena::Endian::LittleEndian:
case athena::Endian::LittleEndian:
os << "LittleEndian";
break;
case Athena::Endian::BigEndian:
case athena::Endian::BigEndian:
os << "BigEndian";
break;
}
@ -41,18 +41,18 @@ std::ostream& operator<<(std::ostream& os, const Athena::Endian& endian)
}
static void __defaultExceptionHandler(Athena::error::Level level, const char* file, const char* function, int line, const char* fmt, ...)
static void __defaultExceptionHandler(athena::error::Level level, const char* file, const char* function, int line, const char* fmt, ...)
{
std::string levelStr;
switch (level)
{
case Athena::error::Level::Warning:
case athena::error::Level::Warning:
levelStr = "[WARNING] ";
break;
case Athena::error::Level::Error:
case athena::error::Level::Error:
levelStr = "[ERROR ] ";
break;
case Athena::error::Level::Fatal:
case athena::error::Level::Fatal:
levelStr = "[FATAL ] ";
break;
default: break;
@ -60,7 +60,7 @@ static void __defaultExceptionHandler(Athena::error::Level level, const char* fi
va_list vl;
va_start(vl, fmt);
std::string msg = Athena::utility::vsprintf(fmt, vl);
std::string msg = athena::utility::vsprintf(fmt, vl);
va_end(vl);
std::cerr << levelStr << " " << file << " " << function << "(" << line << "): " << msg << std::endl;
}

View File

@ -1,6 +1,6 @@
#include "Athena/MCFile.hpp"
#include "athena/MCFile.hpp"
namespace Athena
namespace athena
{
const char MCFile::VERSION_EU_JP[33] = "AGBZELDA:THE MINISH CAP:ZELDA 3\0";

View File

@ -1,6 +1,6 @@
#include "Athena/MCFileReader.hpp"
#include "Athena/MCFile.hpp"
namespace Athena
#include "athena/MCFileReader.hpp"
#include "athena/MCFile.hpp"
namespace athena
{
namespace io

View File

@ -1,6 +1,6 @@
#include "Athena/MCFileWriter.hpp"
#include "athena/MCFileWriter.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,6 +1,6 @@
#include "Athena/MCSlot.hpp"
#include "athena/MCSlot.hpp"
namespace Athena
namespace athena
{
MCSlot::MCSlot(std::unique_ptr<atUint8[]>&& data, atUint32 length)

View File

@ -1,4 +1,4 @@
#include "Athena/MemoryReader.hpp"
#include "athena/MemoryReader.hpp"
#include <stdio.h>
#include <stdlib.h>
@ -10,7 +10,7 @@
#include <malloc.h>
#endif // HW_RVL
namespace Athena
namespace athena
{
namespace io
{
@ -104,8 +104,8 @@ void MemoryReader::seek(atInt64 position, SeekOrigin origin)
void MemoryReader::setData(const atUint8* data, atUint64 length, bool takeOwnership)
{
if (m_owns && m_data)
delete[] m_data;
if (m_owns)
delete[] static_cast<const atUint8*>(m_data);
m_data = (atUint8*)data;
m_length = length;
m_position = 0;

View File

@ -1,4 +1,4 @@
#include "Athena/MemoryWriter.hpp"
#include "athena/MemoryWriter.hpp"
#include <stdio.h>
#include <string.h>
@ -9,7 +9,7 @@
#include <malloc.h>
#endif // HW_RVL
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,9 +1,9 @@
#ifdef ATHENA_ENABLE_PHYSFS
#include "Athena/PHYSFSFileReader.hpp"
#include "Athena/FileNotFoundException.hpp"
#include "Athena/IOException.hpp"
#include "athena/PHYSFSFileReader.hpp"
#include "athena/FileNotFoundException.hpp"
#include "athena/IOException.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,7 +1,7 @@
#include "Athena/SkywardSwordFile.hpp"
#include "Athena/SkywardSwordQuest.hpp"
#include "athena/SkywardSwordFile.hpp"
#include "athena/SkywardSwordQuest.hpp"
namespace Athena
namespace athena
{
SkywardSwordFile::SkywardSwordFile()
@ -19,7 +19,7 @@ SkywardSwordFile::~SkywardSwordFile()
{
}
void SkywardSwordFile::addQuest(Athena::SkywardSwordQuest* q)
void SkywardSwordFile::addQuest(athena::SkywardSwordQuest* q)
{
// Do not allow more than 3 quests
if (m_quests.size() >= 3)

View File

@ -1,9 +1,9 @@
#include "Athena/SkywardSwordFileReader.hpp"
#include "Athena/SkywardSwordFile.hpp"
#include "Athena/SkywardSwordQuest.hpp"
#include "athena/SkywardSwordFileReader.hpp"
#include "athena/SkywardSwordFile.hpp"
#include "athena/SkywardSwordQuest.hpp"
#include <iostream>
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,8 +1,8 @@
#include "Athena/SkywardSwordFileWriter.hpp"
#include "Athena/SkywardSwordFile.hpp"
#include "Athena/SkywardSwordQuest.hpp"
#include "athena/SkywardSwordFileWriter.hpp"
#include "athena/SkywardSwordFile.hpp"
#include "athena/SkywardSwordQuest.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,9 +1,9 @@
#include "Athena/SkywardSwordQuest.hpp"
#include "Athena/Checksums.hpp"
#include "athena/SkywardSwordQuest.hpp"
#include "athena/Checksums.hpp"
#include "utf8proc.h"
#include <sstream>
namespace Athena
namespace athena
{
namespace priv

View File

@ -1,13 +1,13 @@
#include "Athena/Sprite.hpp"
#include "Athena/SpriteFrame.hpp"
#include "Athena/SpriteFile.hpp"
#include "athena/Sprite.hpp"
#include "athena/SpriteFrame.hpp"
#include "athena/SpriteFile.hpp"
#include <algorithm>
#ifdef ATHENA_USE_QT
#include <QVector>
#endif
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -1,9 +1,9 @@
#include "Athena/SpriteFile.hpp"
#include "Athena/Sprite.hpp"
#include "Athena/Utility.hpp"
#include "athena/SpriteFile.hpp"
#include "athena/Sprite.hpp"
#include "athena/Utility.hpp"
#include <iostream>
namespace Athena
namespace athena
{
namespace Sakura
{
@ -192,7 +192,7 @@ void SpriteFile::addSprite(Sprite* sprite)
{
#ifndef ATHENA_USE_QT
std::string name(sprite->name());
Athena::utility::tolower(name);
athena::utility::tolower(name);
if (m_sprites.find(name) != m_sprites.end())
return;
@ -212,7 +212,7 @@ void SpriteFile::addSprite(Sprite* sprite)
void SpriteFile::removeSprite(const std::string& name)
{
std::string tmpName(name);
Athena::utility::tolower(tmpName);
athena::utility::tolower(tmpName);
std::unordered_map<std::string, Sprite*>::iterator iterator = m_sprites.find(tmpName);
if (iterator != m_sprites.end())
@ -264,7 +264,7 @@ void SpriteFile::setSprites(QMap<QString, Sprite*> sprites)
Sprite* SpriteFile::sprite(const std::string& name)
{
std::string nameLow(name);
Athena::utility::tolower(nameLow);
athena::utility::tolower(nameLow);
if (m_sprites.find(nameLow) == m_sprites.end())
return NULL;

View File

@ -1,11 +1,11 @@
#include "Athena/SpriteFileReader.hpp"
#include "Athena/SpriteFile.hpp"
#include "Athena/Sprite.hpp"
#include "Athena/SpritePart.hpp"
#include "Athena/SpriteFrame.hpp"
#include "Athena/Utility.hpp"
#include "athena/SpriteFileReader.hpp"
#include "athena/SpriteFile.hpp"
#include "athena/Sprite.hpp"
#include "athena/SpritePart.hpp"
#include "athena/SpriteFrame.hpp"
#include "athena/Utility.hpp"
namespace Athena
namespace athena
{
namespace io
{
@ -183,7 +183,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
if (sprite->name() != std::string())
{
std::string nameLow(sprite->name());
Athena::utility::tolower(nameLow);
athena::utility::tolower(nameLow);
sprites[nameLow] = sprite;
}

View File

@ -1,10 +1,10 @@
#include "Athena/SpriteFileWriter.hpp"
#include "Athena/SpriteFile.hpp"
#include "Athena/Sprite.hpp"
#include "Athena/SpritePart.hpp"
#include "Athena/SpriteFrame.hpp"
#include "athena/SpriteFileWriter.hpp"
#include "athena/SpriteFile.hpp"
#include "athena/Sprite.hpp"
#include "athena/SpritePart.hpp"
#include "athena/SpriteFrame.hpp"
namespace Athena
namespace athena
{
namespace io
{

View File

@ -1,8 +1,8 @@
#include "Athena/SpriteFrame.hpp"
#include "Athena/SpritePart.hpp"
#include "Athena/Sprite.hpp"
#include "athena/SpriteFrame.hpp"
#include "athena/SpritePart.hpp"
#include "athena/Sprite.hpp"
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -1,9 +1,9 @@
#include "Athena/SpritePart.hpp"
#include "Athena/SpritePart.hpp"
#include "Athena/Sprite.hpp"
#include "athena/SpritePart.hpp"
#include "athena/SpritePart.hpp"
#include "athena/Sprite.hpp"
#include <algorithm>
namespace Athena
namespace athena
{
namespace Sakura
{

View File

@ -1,4 +1,4 @@
#include "Athena/Utility.hpp"
#include "athena/Utility.hpp"
#include <iostream>
#include <string.h>
#include <stdlib.h>
@ -18,7 +18,7 @@
#define stat64 __stat64
#endif
namespace Athena
namespace athena
{
namespace utility
{

View File

@ -1,10 +1,10 @@
#include "Athena/WiiBanner.hpp"
#include "Athena/WiiImage.hpp"
#include "athena/WiiBanner.hpp"
#include "athena/WiiImage.hpp"
#include "Athena/Utility.hpp"
#include "athena/Utility.hpp"
#include <string.h>
namespace Athena
namespace athena
{
WiiBanner::WiiBanner() :

View File

@ -1,7 +1,7 @@
#include "Athena/WiiFile.hpp"
#include "athena/WiiFile.hpp"
#include <algorithm>
namespace Athena
namespace athena
{
//! TODO: Remove this?
@ -138,7 +138,7 @@ void WiiFile::addChild(WiiFile* file)
// Lets figure out it's place
std::string tmpName(file->filename());
// Since we only support *NIX paths this is simple
atUint32 depth = Athena::utility::countChar(tmpName, '/');
atUint32 depth = athena::utility::countChar(tmpName, '/');
bool owned = false;
while ((depth--) > 0)

View File

@ -1,9 +1,9 @@
#include "Athena/WiiImage.hpp"
#include "Athena/Utility.hpp"
#include "athena/WiiImage.hpp"
#include "athena/Utility.hpp"
#include <string.h>
#include <stdlib.h>
namespace Athena
namespace athena
{
WiiImage::WiiImage(atUint32 width, atUint32 height, std::unique_ptr<atUint8[]>&& data) :

View File

@ -1,9 +1,9 @@
#include "Athena/WiiSave.hpp"
#include "Athena/WiiFile.hpp"
#include "Athena/WiiBanner.hpp"
#include "Athena/MemoryReader.hpp"
#include "Athena/MemoryWriter.hpp"
#include "Athena/Utility.hpp"
#include "athena/WiiSave.hpp"
#include "athena/WiiFile.hpp"
#include "athena/WiiBanner.hpp"
#include "athena/MemoryReader.hpp"
#include "athena/MemoryWriter.hpp"
#include "athena/Utility.hpp"
#include "aes.hpp"
#include "ec.h"
#include "md5.h"
@ -17,7 +17,7 @@
#include <iomanip>
namespace Athena
namespace athena
{
WiiSave::WiiSave()

View File

@ -1,10 +1,10 @@
#include "Athena/WiiSaveReader.hpp"
#include "Athena/WiiSave.hpp"
#include "Athena/WiiFile.hpp"
#include "Athena/WiiImage.hpp"
#include "Athena/WiiBanner.hpp"
#include "Athena/Utility.hpp"
#include "Athena/FileWriter.hpp"
#include "athena/WiiSaveReader.hpp"
#include "athena/WiiSave.hpp"
#include "athena/WiiFile.hpp"
#include "athena/WiiImage.hpp"
#include "athena/WiiBanner.hpp"
#include "athena/Utility.hpp"
#include "athena/FileWriter.hpp"
#include "md5.h"
#include "aes.hpp"
#include "ec.h"
@ -13,7 +13,7 @@
#include <iomanip>
#include <string.h>
namespace Athena
namespace athena
{
namespace io

View File

@ -1,13 +1,13 @@
#include "Athena/WiiSaveWriter.hpp"
#include "Athena/WiiSave.hpp"
#include "Athena/WiiFile.hpp"
#include "Athena/WiiBanner.hpp"
#include "Athena/WiiImage.hpp"
#include "Athena/WiiSave.hpp"
#include "Athena/WiiFile.hpp"
#include "Athena/WiiBanner.hpp"
#include "Athena/MemoryWriter.hpp"
#include "Athena/Utility.hpp"
#include "athena/WiiSaveWriter.hpp"
#include "athena/WiiSave.hpp"
#include "athena/WiiFile.hpp"
#include "athena/WiiBanner.hpp"
#include "athena/WiiImage.hpp"
#include "athena/WiiSave.hpp"
#include "athena/WiiFile.hpp"
#include "athena/WiiBanner.hpp"
#include "athena/MemoryWriter.hpp"
#include "athena/Utility.hpp"
#include "aes.hpp"
#include "ec.h"
@ -21,7 +21,7 @@
#include <iostream>
#include <iomanip>
namespace Athena
namespace athena
{
namespace io

View File

@ -1,8 +1,8 @@
#include "Athena/ZQuestFile.hpp"
#include "athena/ZQuestFile.hpp"
#include <string.h>
namespace Athena
namespace athena
{
std::vector<std::string> GameStrings;
void initGameStrings()

View File

@ -1,13 +1,13 @@
#include "Athena/ZQuestFileReader.hpp"
#include "Athena/ZQuestFile.hpp"
#include "Athena/Compression.hpp"
#include "Athena/Checksums.hpp"
#include "Athena/Utility.hpp"
#include "athena/ZQuestFileReader.hpp"
#include "athena/ZQuestFile.hpp"
#include "athena/Compression.hpp"
#include "athena/Checksums.hpp"
#include "athena/Utility.hpp"
#include <iostream>
#include <iomanip>
namespace Athena
namespace athena
{
namespace io
{
@ -77,7 +77,7 @@ ZQuestFile* ZQuestFileReader::read()
if (version >= ZQUEST_VERSION_CHECK(2, 0, 0))
{
if (checksum != Athena::Checksums::crc32(data.get(), compressedLen))
if (checksum != athena::Checksums::crc32(data.get(), compressedLen))
{
atError("Checksum mismatch, data corrupt");
return nullptr;
@ -85,7 +85,7 @@ ZQuestFile* ZQuestFileReader::read()
}
else
{
std::clog << "ZQuest version 0x" << std::uppercase << std::setw(8) << std::setfill('0') << std::hex << Athena::utility::swapU32(version);
std::clog << "ZQuest version 0x" << std::uppercase << std::setw(8) << std::setfill('0') << std::hex << athena::utility::swapU32(version);
std::clog << " has no checksum field" << std::endl;
}

Some files were not shown because too many files have changed in this diff Show More