Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
memory: move to libtrx
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Apr 29, 2024
1 parent 83e453a commit 3ec3ba7
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 86 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Build Docker image (${{ matrix.platform }})
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: 'Checkout code'
uses: actions/checkout@v2
with:
path: .
submodules: 'true'
fetch-depth: 0

- name: Check JSON files validity
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0

- name: Package asset (${{ matrix.platform }})
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
- name: "Checkout code"
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0

- name: "Download built game assets"
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libtrx"]
path = subprojects/libtrx
url = https://github.com/LostArtefacts/libtrx.git
7 changes: 6 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project('TR2X', ['c'],
],
)

dep_trx = subproject('libtrx')
c_compiler = meson.get_compiler('c')

build_opts = [
Expand Down Expand Up @@ -59,6 +60,10 @@ if host_machine.system() == 'windows'
link_args += ['-static']
endif

libtrx_sources = [
'src/shared/memory.c',
]

exe_sources = [
'src/main_exe.c',
exe_resources,
Expand Down Expand Up @@ -102,7 +107,6 @@ dll_sources = [
'src/lib/winmm.c',
'src/log.c',
'src/main_dll.c',
'src/memory.c',
'src/specific/s_audio_sample.c',
'src/specific/s_filesystem.c',
'src/specific/s_flagged_string.c',
Expand Down Expand Up @@ -131,5 +135,6 @@ library(
name_prefix: '',
include_directories: ['src/'],
dependencies: dependencies,
link_with: dep_trx.get_variable('libtrx'),
link_args: link_args,
)
2 changes: 1 addition & 1 deletion src/filesystem.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "filesystem.h"

#include "log.h"
#include "memory.h"
#include "shared/memory.h"
#include "specific/s_filesystem.h"

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion src/log.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "log.h"

#include "filesystem.h"
#include "memory.h"
#include "shared/memory.h"

#include <stdarg.h>
#include <stdio.h>
Expand Down
44 changes: 0 additions & 44 deletions src/memory.c

This file was deleted.

37 changes: 0 additions & 37 deletions src/memory.h

This file was deleted.

1 change: 1 addition & 0 deletions src/shared
2 changes: 1 addition & 1 deletion src/specific/s_filesystem.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "specific/s_filesystem.h"

#include "log.h"
#include "memory.h"
#include "shared/memory.h"

#include <assert.h>
#include <dirent.h>
Expand Down
1 change: 1 addition & 0 deletions subprojects/libtrx
Submodule libtrx added at 801bbb

0 comments on commit 3ec3ba7

Please sign in to comment.