Skip to content

Commit

Permalink
Add extended A2M/A2T file support (v1 to v14) (#6)
Browse files Browse the repository at this point in the history
- add the required C bitpacking libraries into `deps/`
- add a2m-v2 impl
- replace A2M loader in main application
- add the necessary C dependencies
- tweak CMakeLists to include dependencies and compile C code

Code adapted from adplug/adplug#207
  • Loading branch information
Enet4 authored Jun 1, 2024
1 parent d5ff19d commit 6543dbb
Show file tree
Hide file tree
Showing 15 changed files with 6,230 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(adlib2vgm LANGUAGES CXX)
project(adlib2vgm LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -12,6 +12,7 @@ include_directories("binio" "utfcpp" "zstr")

file(GLOB_RECURSE SOURCES_BINIO "binio/*.cpp")
file(GLOB_RECURSE SOURCES_FMTS "Formats/*.cpp")
file(GLOB_RECURSE SOURCES_FMTS_DEPS "deps/*.c")
file(GLOB_RECURSE SOURCES_FAKE_ADPLUG "FakeAdplug/*.cpp")

set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
Expand All @@ -24,9 +25,12 @@ add_executable(adlib2vgm
${SOURCES_BINIO}
${SOURCES_GZSTREAM}
${SOURCES_FAKE_ADPLUG}
${SOURCES_FMTS_DEPS}
${SOURCES_FMTS}
main.cpp
VgmOpl.cpp
)

target_include_directories(adlib2vgm PRIVATE "deps")

target_link_libraries(adlib2vgm ${ZLIB})
1 change: 1 addition & 0 deletions Formats/Formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#pragma once

#include "a2m.h"
#include "a2m-v2.h"
#include "adtrack.h"
#include "amd.h"
#include "bam.h"
Expand Down
Loading

0 comments on commit 6543dbb

Please sign in to comment.