Skip to content

Commit 6543dbb

Browse files
authored
Add extended A2M/A2T file support (v1 to v14) (#6)
- 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
1 parent d5ff19d commit 6543dbb

15 files changed

+6230
-3
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.14)
2-
project(adlib2vgm LANGUAGES CXX)
2+
project(adlib2vgm LANGUAGES CXX C)
33

44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -12,6 +12,7 @@ include_directories("binio" "utfcpp" "zstr")
1212

1313
file(GLOB_RECURSE SOURCES_BINIO "binio/*.cpp")
1414
file(GLOB_RECURSE SOURCES_FMTS "Formats/*.cpp")
15+
file(GLOB_RECURSE SOURCES_FMTS_DEPS "deps/*.c")
1516
file(GLOB_RECURSE SOURCES_FAKE_ADPLUG "FakeAdplug/*.cpp")
1617

1718
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
@@ -24,9 +25,12 @@ add_executable(adlib2vgm
2425
${SOURCES_BINIO}
2526
${SOURCES_GZSTREAM}
2627
${SOURCES_FAKE_ADPLUG}
28+
${SOURCES_FMTS_DEPS}
2729
${SOURCES_FMTS}
2830
main.cpp
2931
VgmOpl.cpp
3032
)
3133

34+
target_include_directories(adlib2vgm PRIVATE "deps")
35+
3236
target_link_libraries(adlib2vgm ${ZLIB})

Formats/Formats.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#pragma once
2121

2222
#include "a2m.h"
23+
#include "a2m-v2.h"
2324
#include "adtrack.h"
2425
#include "amd.h"
2526
#include "bam.h"

0 commit comments

Comments
 (0)