Compare commits

..

174 Commits

Author SHA1 Message Date
5919881568 Vita progress 2026-03-28 19:09:21 -05:00
cbb68a399d Fix compile error 2026-03-28 15:43:38 -05:00
0e794f28b1 Disable paletted textures for now 2026-03-28 15:40:30 -05:00
87d2d9123e Re-implement RGBA textures 2026-03-28 15:21:33 -05:00
6823a4ddb5 Try again again 2026-03-28 11:35:11 -05:00
20a7c70081 Fixiing weird action path missing? 2026-03-28 11:26:25 -05:00
9caa33b3bb Restore all builds 2026-03-28 11:14:15 -05:00
2d7e61460a fix 2026-03-28 11:05:36 -05:00
a4b7fb3f44 Try again 2026-03-28 11:04:42 -05:00
70056cf4ca Temp only build knulli
Some checks failed
Build Dusk / build-knulli (push) Failing after 21s
2026-03-28 11:02:43 -05:00
5f4ab71ade Add knulli build 2026-03-28 11:02:34 -05:00
f3adb3257b Cleanup knulli 2026-03-28 11:00:18 -05:00
438edda7fd Fixed knulli 2026-03-28 10:56:40 -05:00
d5b0441e6f Fixed GLES support (partially), PSP still not working 2026-03-28 10:51:50 -05:00
9ba0ceb000 Moved texture setting around 2026-03-28 09:48:24 -05:00
9474a68995 Slightly more accurate, likely going to have to change how paletted textures work 2026-03-27 21:01:29 -05:00
09c35f0aa6 Builds on knulli 2026-03-27 20:48:43 -05:00
a2113442cb Builds on knulli 2026-03-27 15:59:26 -05:00
d91808487f Allow texture to be NULL.
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 20s
Build Dusk / build-psp (push) Failing after 16s
Build Dusk / build-gamecube (push) Failing after 18s
Build Dusk / build-wii (push) Failing after 19s
2026-03-27 13:46:18 -05:00
933949cc19 Progress on PSP paletted textures
Some checks failed
Build Dusk / run-tests (push) Failing after 19s
Build Dusk / build-linux (push) Failing after 17s
Build Dusk / build-psp (push) Failing after 21s
Build Dusk / build-gamecube (push) Failing after 19s
Build Dusk / build-wii (push) Failing after 15s
2026-03-27 08:04:34 -05:00
407620387d Test paletted stuff
Some checks failed
Build Dusk / run-tests (push) Failing after 26s
Build Dusk / build-linux (push) Failing after 25s
Build Dusk / build-psp (push) Failing after 18s
Build Dusk / build-gamecube (push) Failing after 18s
Build Dusk / build-wii (push) Failing after 18s
2026-03-26 14:48:20 -05:00
98947dea26 starting textures
Some checks failed
Build Dusk / run-tests (push) Failing after 16s
Build Dusk / build-linux (push) Failing after 17s
Build Dusk / build-psp (push) Failing after 18s
Build Dusk / build-gamecube (push) Failing after 17s
Build Dusk / build-wii (push) Failing after 17s
2026-03-23 19:42:24 -05:00
ebff7af9b5 fix
Some checks failed
Build Dusk / run-tests (push) Failing after 17s
Build Dusk / build-linux (push) Failing after 20s
Build Dusk / build-psp (push) Failing after 20s
Build Dusk / build-gamecube (push) Failing after 19s
Build Dusk / build-wii (push) Failing after 17s
2026-03-23 15:37:53 -05:00
b23c4b83ae played around with color, will likely stick to textures.
Some checks failed
Build Dusk / run-tests (push) Failing after 13s
Build Dusk / build-linux (push) Failing after 15s
Build Dusk / build-psp (push) Failing after 14s
Build Dusk / build-gamecube (push) Failing after 13s
Build Dusk / build-wii (push) Failing after 14s
2026-03-22 23:53:23 -05:00
c0cff40628 Merge pull request 'shader' (#2) from shader into main
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 14s
Build Dusk / build-psp (push) Failing after 14s
Build Dusk / build-gamecube (push) Failing after 13s
Build Dusk / build-wii (push) Failing after 13s
Reviewed-on: #2
2026-03-23 04:33:20 +00:00
97513e354c Dolphin shaders
Some checks failed
Build Dusk / run-tests (pull_request) Failing after 13s
Build Dusk / build-linux (pull_request) Failing after 18s
Build Dusk / build-psp (pull_request) Failing after 18s
Build Dusk / build-gamecube (pull_request) Failing after 16s
Build Dusk / build-wii (pull_request) Failing after 13s
2026-03-22 23:32:43 -05:00
c277ae7aff DOlphin shader prog 2026-03-22 18:14:56 -05:00
e1835e6282 Merge pull request 'Pull shader code into main' (#1) from shader into main
Some checks failed
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
Build Dusk / build-gamecube (push) Has been cancelled
Build Dusk / build-wii (push) Has been cancelled
Reviewed-on: #1
2026-03-22 15:46:37 +00:00
5ac21db997 Shaders adapted for Legacy GL
Some checks failed
Build Dusk / run-tests (pull_request) Failing after 24s
Build Dusk / build-linux (pull_request) Failing after 18s
Build Dusk / build-psp (pull_request) Failing after 18s
Build Dusk / build-gamecube (pull_request) Failing after 15s
Build Dusk / build-wii (pull_request) Failing after 16s
2026-03-22 10:44:28 -05:00
ca0e9fc3b2 Implement spritebatch properly. 2026-03-22 09:13:42 -05:00
66ebcb1608 shader prog 2026-03-17 17:05:39 -05:00
ff92a78dda Shader first pass 2026-03-17 08:42:43 -05:00
7356286fe0 Adjust how deadzones work
Some checks failed
Build Dusk / run-tests (push) Failing after 15s
Build Dusk / build-linux (push) Failing after 21s
Build Dusk / build-psp (push) Failing after 17s
Build Dusk / build-gamecube (push) Failing after 17s
Build Dusk / build-wii (push) Failing after 17s
2026-03-11 13:00:11 -05:00
54e8e68f86 Update build to use checkout v6
Some checks failed
Build Dusk / run-tests (push) Failing after 18s
Build Dusk / build-linux (push) Failing after 17s
Build Dusk / build-psp (push) Failing after 18s
Build Dusk / build-gamecube (push) Failing after 13s
Build Dusk / build-wii (push) Failing after 16s
2026-03-11 10:42:54 -05:00
d21cd7f78b Update error and debug logging methods
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 15s
Build Dusk / build-psp (push) Failing after 22s
Build Dusk / build-gamecube (push) Failing after 18s
Build Dusk / build-wii (push) Failing after 15s
2026-03-11 10:33:43 -05:00
1d7516982a Fixed dolphin input
Some checks failed
Build Dusk / run-tests (push) Failing after 15s
Build Dusk / build-linux (push) Failing after 15s
Build Dusk / build-psp (push) Failing after 15s
Build Dusk / build-gamecube (push) Failing after 17s
Build Dusk / build-wii (push) Failing after 14s
2026-03-11 08:11:49 -05:00
c77a11442c Fix input on linux 2026-03-11 07:56:03 -05:00
5bd43a4643 Fix Dolphin crash 2026-03-11 07:27:06 -05:00
9b87dfa1a9 Only exec action on main 2026-03-10 21:59:15 -05:00
2e3173ea40 Enable all jobs.
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 16s
Build Dusk / build-psp (push) Failing after 15s
Build Dusk / build-gamecube (push) Failing after 16s
Build Dusk / build-wii (push) Failing after 14s
2026-03-10 21:53:13 -05:00
68eac7cf83 Build wii
Some checks failed
Build Dusk / build-wii (push) Failing after 14s
2026-03-10 21:48:12 -05:00
6709505630 Build gamecube
Some checks failed
Build Dusk / build-gamecube (push) Failing after 16s
2026-03-10 21:43:59 -05:00
af6e962a5d Try rename
Some checks failed
Build Dusk / build-psp (push) Failing after 13s
2026-03-10 21:39:00 -05:00
18e6bdabaa test 2
Some checks failed
Build Dusk / build-psp (push) Failing after 14s
2026-03-10 21:35:50 -05:00
9743942eae Try zip PSP
Some checks failed
Build Dusk / build-psp (push) Failing after 17s
2026-03-10 21:33:27 -05:00
23062137a8 Disable tests for now.
Some checks failed
Build Dusk / build-linux (push) Failing after 14s
2026-03-10 21:23:08 -05:00
46f7fb5ccd Use v6
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 28s
2026-03-10 21:21:37 -05:00
9c90c49a6b Test build linux
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
Build Dusk / build-linux (push) Failing after 28s
2026-03-10 21:19:55 -05:00
4517b63557 Fixed compiling
Some checks failed
Build Dusk / run-tests (push) Failing after 15s
2026-03-10 21:11:12 -05:00
58c239f4b4 Fixing tests more.
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
2026-03-10 20:53:28 -05:00
cc8845ba3e Run linux tests
Some checks failed
Build Dusk / run-tests (push) Failing after 14s
2026-03-10 20:51:58 -05:00
6b69ce2901 Try github
Some checks failed
Build Dusk / run-tests (push) Failing after 36s
2026-03-10 20:46:29 -05:00
55300ed21c test2
Some checks failed
Build Dusk / run-tests (push) Successful in 30s
Build Dusk / build-linux (push) Failing after 6s
2026-03-10 16:48:14 -05:00
7346dd4339 Test
Some checks failed
Build Dusk / run-tests (push) Successful in 25s
Build Dusk / build-linux (push) Failing after 7s
2026-03-10 16:45:24 -05:00
2caf3b92ce Try github workspace
Some checks failed
Build Dusk / run-tests (push) Successful in 6s
Build Dusk / build-linux (push) Failing after 7s
2026-03-10 16:30:46 -05:00
af2cd72a1f Try mount rather than volume
Some checks failed
Build Dusk / run-tests (push) Successful in 4s
Build Dusk / build-linux (push) Failing after 4s
2026-03-10 16:30:08 -05:00
3d455ec1f8 Remove volume
Some checks failed
Build Dusk / run-tests (push) Failing after 3s
Build Dusk / build-linux (push) Failing after 3s
2026-03-10 16:26:29 -05:00
15982d7735 Try realpath over pwd
Some checks failed
Build Dusk / run-tests (push) Failing after 4s
Build Dusk / build-linux (push) Failing after 6s
2026-03-10 16:24:41 -05:00
5ae3542bd9 where am I?
Some checks failed
Build Dusk / run-tests (push) Failing after 4s
Build Dusk / build-linux (push) Failing after 5s
2026-03-10 16:23:32 -05:00
b1b02ae24b Test lsla
Some checks failed
Build Dusk / run-tests (push) Successful in 4s
Build Dusk / build-linux (push) Failing after 4s
2026-03-10 16:21:31 -05:00
f0964e2c92 Test runner
Some checks failed
Build Dusk / run-tests (push) Failing after 2m18s
Build Dusk / build-linux (push) Failing after 6s
2026-03-10 16:16:53 -05:00
e9661d2998 ADd check
Some checks failed
Build Dusk / run-tests (push) Failing after 2m21s
2026-03-10 16:01:44 -05:00
ea6468f2a9 Use git runner temp
Some checks failed
Build Dusk / run-tests (push) Failing after 29s
2026-03-10 15:36:28 -05:00
a2b38d3b83 Test Docker user
Some checks failed
Build Dusk / run-tests (push) Failing after 25s
2026-03-10 15:34:53 -05:00
d67ef02941 Use script system
All checks were successful
Build Dusk / run-tests (push) Successful in 1m15s
Build Dusk / build-linux (push) Successful in 1m6s
2026-03-10 15:15:31 -05:00
549ebe25d8 Let's get it building on linux in gitea
All checks were successful
Build Dusk / run-tests (push) Successful in 2m16s
Build Dusk / build-linux (push) Successful in 1m23s
2026-03-10 15:10:18 -05:00
9a98348582 Renders on Dolphin also. 2026-03-10 15:07:50 -05:00
c5f5b025a6 Game no longer crashes on Dolphin 2026-03-09 08:05:26 -05:00
23eaffa3a7 Fix some dolphin stuff. 2026-03-08 19:55:48 -05:00
c161809248 Renders on PSP identically. 2026-03-08 19:51:00 -05:00
4bf26dc818 Let's get this rendering on PSP and Dolphin. 2026-03-08 15:46:38 -05:00
5dd22fad6c Fixed some bugs. 2026-03-08 13:55:11 -05:00
2c3fdf7803 Add compile time endianess 2026-03-08 13:44:52 -05:00
e984b9f5d7 Asset compartmentalized 2026-03-08 13:29:40 -05:00
a3c2e37b17 Fixed errors 2026-03-08 12:01:22 -05:00
edf1b5a0a3 Technically working 2026-03-08 11:35:21 -05:00
8efdf59ebd More fixes 2026-03-08 10:20:55 -05:00
5c4537b2fa input prog 2026-03-07 22:11:11 -06:00
71e6079054 More code moving 2026-03-07 12:09:40 -06:00
dd048d9b0d Moved a bunch of code around 2026-03-07 09:35:56 -06:00
93074d653e idk 2026-03-06 16:34:45 -06:00
9139c4350a Moved all files. 2026-03-06 14:01:21 -06:00
38ce768168 kms 2026-03-06 13:40:27 -06:00
82b3dc576c remove un-needed files 2026-03-03 12:29:04 -06:00
2167889f48 Merge branch 'main' into break-literally-everything 2026-03-03 12:28:48 -06:00
e9b02c2acf Whatewver
Some checks failed
Build Dusk / run-tests (push) Successful in 1m26s
Build Dusk / build-linux (push) Successful in 1m26s
Build Dusk / build-psp (push) Failing after 1m28s
Build Dusk / build-dolphin (push) Failing after 1m28s
2026-03-02 20:14:21 -06:00
9ee446431b Moved build stuff to docker 2026-03-02 06:59:51 -06:00
df106e3988 "progress" 2026-02-28 09:55:21 -06:00
d0a057e0ee Moved all defs into main file. 2026-02-17 11:33:00 -06:00
8b49902bf6 Moved some files around 2026-02-17 10:59:21 -06:00
71c1e56564 Fix endian again
Some checks failed
Build Dusk / run-tests (push) Successful in 1m35s
Build Dusk / build-linux (push) Successful in 1m42s
Build Dusk / build-psp (push) Failing after 1m44s
Build Dusk / build-dolphin (push) Failing after 2m18s
2026-02-16 19:15:29 -06:00
1b12e67de2 Use internal endian tool
Some checks failed
Build Dusk / run-tests (push) Successful in 1m27s
Build Dusk / build-linux (push) Successful in 1m21s
Build Dusk / build-psp (push) Failing after 1m31s
Build Dusk / build-dolphin (push) Failing after 1m49s
2026-02-16 13:34:20 -06:00
291bb4bb81 Build?
Some checks failed
Build Dusk / run-tests (push) Successful in 1m20s
Build Dusk / build-linux (push) Successful in 1m30s
Build Dusk / build-psp (push) Failing after 1m35s
Build Dusk / build-dolphin (push) Failing after 2m6s
2026-02-16 13:21:04 -06:00
342ddb19f8 Finally got text rendering again. 2026-02-16 13:12:12 -06:00
9c9d2d548e Fixed whatever problem was with texture loading. 2026-02-16 12:29:25 -06:00
d7a0bb4509 Fix palette indexer bytes 2026-02-16 12:01:06 -06:00
2b1a3323a8 Tileset creator done 2026-02-16 12:00:55 -06:00
99d030003c DEbug not working so moving pcs 2026-02-15 16:41:33 -06:00
92a753560b prog 2026-02-15 01:09:28 -06:00
af9904c892 Scripts work again.
All checks were successful
Build Dusk / run-tests (push) Successful in 1m40s
Build Dusk / build-linux (push) Successful in 1m45s
Build Dusk / build-psp (push) Successful in 1m47s
Build Dusk / build-dolphin (push) Successful in 2m23s
2026-02-13 19:36:59 -06:00
e5e8c49f6c Mostly nuking old system
Some checks failed
Build Dusk / build-linux (push) Failing after 1m24s
Build Dusk / run-tests (push) Failing after 1m17s
Build Dusk / build-psp (push) Failing after 1m34s
Build Dusk / build-dolphin (push) Failing after 2m5s
2026-02-13 19:13:26 -06:00
b37e5f45ca Sweeper
All checks were successful
Build Dusk / run-tests (push) Successful in 1m28s
Build Dusk / build-linux (push) Successful in 1m33s
Build Dusk / build-psp (push) Successful in 1m53s
Build Dusk / build-dolphin (push) Successful in 2m19s
2026-02-10 21:06:09 -06:00
e1f08b07aa Need a break from Dolphin
All checks were successful
Build Dusk / run-tests (push) Successful in 1m36s
Build Dusk / build-linux (push) Successful in 1m14s
Build Dusk / build-psp (push) Successful in 2m2s
Build Dusk / build-dolphin (push) Successful in 2m49s
2026-02-09 22:18:44 -06:00
073ee8dca9 Trying to find dolphin texture bug
All checks were successful
Build Dusk / run-tests (push) Successful in 1m37s
Build Dusk / build-linux (push) Successful in 1m23s
Build Dusk / build-psp (push) Successful in 1m45s
Build Dusk / build-dolphin (push) Successful in 2m20s
2026-02-09 14:53:27 -06:00
a26e51cf46 Use local mirror for cglm
All checks were successful
Build Dusk / run-tests (push) Successful in 1m26s
Build Dusk / build-linux (push) Successful in 1m33s
Build Dusk / build-psp (push) Successful in 2m8s
Build Dusk / build-dolphin (push) Successful in 2m1s
2026-02-09 13:19:13 -06:00
dfed732825 Try different branch for upload binary action
All checks were successful
Build Dusk / run-tests (push) Successful in 1m46s
Build Dusk / build-linux (push) Successful in 2m10s
Build Dusk / build-psp (push) Successful in 2m42s
Build Dusk / build-dolphin (push) Successful in 3m23s
2026-02-09 12:13:48 -06:00
87aa70c6d2 Push userdata?
Some checks failed
Build Dusk / run-tests (push) Successful in 1m43s
Build Dusk / build-linux (push) Failing after 1m40s
Build Dusk / build-psp (push) Failing after 2m21s
Build Dusk / build-dolphin (push) Failing after 2m42s
2026-02-09 12:03:35 -06:00
aa2979ffe7 Fix main
Some checks failed
Build Dusk / run-tests (push) Failing after 1m15s
Build Dusk / build-linux (push) Failing after 1m34s
Build Dusk / build-psp (push) Failing after 1m45s
Build Dusk / build-dolphin (push) Failing after 2m7s
2026-02-09 11:54:53 -06:00
236e16aa6d Fix url format
Some checks failed
Build Dusk / run-tests (push) Failing after 1s
Build Dusk / build-linux (push) Failing after 1s
Build Dusk / build-psp (push) Failing after 1s
Build Dusk / build-dolphin (push) Failing after 1s
2026-02-09 11:51:04 -06:00
184bb970e6 Update to not rely on third party actions
Some checks failed
Build Dusk / run-tests (push) Failing after 2s
Build Dusk / build-linux (push) Failing after 2s
Build Dusk / build-psp (push) Failing after 1s
Build Dusk / build-dolphin (push) Failing after 2s
2026-02-09 10:59:34 -06:00
bd54469891 test some stuff
Some checks failed
Build Dusk / run-tests (push) Failing after 2m48s
Build Dusk / build-linux (push) Failing after 2m21s
Build Dusk / build-psp (push) Failing after 1m46s
Build Dusk / build-dolphin (push) Failing after 1m57s
2026-02-09 10:39:46 -06:00
2f5dccc3ef Texture loading
All checks were successful
Build Dusk / run-tests (push) Successful in 1m44s
Build Dusk / build-linux (push) Successful in 1m38s
Build Dusk / build-psp (push) Successful in 1m59s
Build Dusk / build-dolphin (push) Successful in 1m59s
2026-02-09 09:29:16 -06:00
592edb90a0 Test lua rgb rainbow
All checks were successful
Build Dusk / run-tests (push) Successful in 1m15s
Build Dusk / build-linux (push) Successful in 1m23s
Build Dusk / build-psp (push) Successful in 1m26s
Build Dusk / build-dolphin (push) Successful in 2m6s
2026-02-08 22:30:53 -06:00
3db7e6b1b9 Fixed palette lookup
All checks were successful
Build Dusk / run-tests (push) Successful in 1m18s
Build Dusk / build-linux (push) Successful in 1m21s
Build Dusk / build-psp (push) Successful in 1m30s
Build Dusk / build-dolphin (push) Successful in 1m51s
2026-02-08 21:26:42 -06:00
13c4df0d85 Compiles on dolphin, finally
All checks were successful
Build Dusk / run-tests (push) Successful in 1m39s
Build Dusk / build-linux (push) Successful in 1m34s
Build Dusk / build-psp (push) Successful in 2m7s
Build Dusk / build-dolphin (push) Successful in 1m48s
2026-02-08 19:30:02 -06:00
ef25fb09da Fix linux building
All checks were successful
Build Dusk / run-tests (push) Successful in 2m20s
Build Dusk / build-linux (push) Successful in 2m5s
Build Dusk / build-psp (push) Successful in 2m19s
Build Dusk / build-dolphin (push) Successful in 3m39s
2026-02-08 10:14:52 -06:00
03cf4a9efe See if dolphin will render the floating text demo
Some checks failed
Build Dusk / run-tests (push) Successful in 1m6s
Build Dusk / build-linux (push) Failing after 1m12s
Build Dusk / build-psp (push) Successful in 2m0s
Build Dusk / build-dolphin (push) Successful in 2m41s
2026-02-08 10:09:45 -06:00
53dd36efdd Fixed alpha textures properly on PSP
Some checks failed
Build Dusk / run-tests (push) Successful in 1m25s
Build Dusk / build-linux (push) Failing after 1m13s
Build Dusk / build-psp (push) Successful in 2m2s
Build Dusk / build-dolphin (push) Successful in 2m22s
2026-02-08 09:54:40 -06:00
ad9e841a42 Removed CXX target
All checks were successful
Build Dusk / run-tests (push) Successful in 1m46s
Build Dusk / build-linux (push) Successful in 1m36s
Build Dusk / build-psp (push) Successful in 2m56s
Build Dusk / build-dolphin (push) Successful in 5m38s
2026-02-07 17:08:03 -06:00
14f3f464c7 Prog on fixing psp alpha textures
All checks were successful
Build Dusk / run-tests (push) Successful in 1m20s
Build Dusk / build-linux (push) Successful in 1m39s
Build Dusk / build-psp (push) Successful in 1m51s
Build Dusk / build-dolphin (push) Successful in 2m36s
2026-02-07 15:29:29 -06:00
cbe51cc8d0 Speedup build
All checks were successful
Build Dusk / run-tests (push) Successful in 1m10s
Build Dusk / build-linux (push) Successful in 1m4s
Build Dusk / build-psp (push) Successful in 1m36s
Build Dusk / build-dolphin (push) Successful in 2m6s
2026-02-06 16:50:50 -06:00
efaa3f6eea Fix building on PSP
All checks were successful
Build Dusk / run-tests (push) Successful in 1m26s
Build Dusk / build-linux (push) Successful in 1m31s
Build Dusk / build-psp (push) Successful in 1m44s
Build Dusk / build-dolphin (push) Successful in 2m36s
2026-02-06 16:29:12 -06:00
52cce9a3b0 ADd meta.xml
Some checks failed
Build Dusk / build-dolphin (push) Successful in 3m6s
Build Dusk / run-tests (push) Successful in 1m38s
Build Dusk / build-linux (push) Failing after 2m15s
Build Dusk / build-psp (push) Failing after 2m23s
2026-02-06 16:14:54 -06:00
b7b390311e Forgor wii stuff
Some checks failed
Build Dusk / build-dolphin (push) Failing after 3m13s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 16:09:31 -06:00
c1eeddd14b Fix dir spelling
Some checks failed
Build Dusk / build-dolphin (push) Failing after 2m22s
Build Dusk / run-tests (push) Successful in 2m4s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
2026-02-06 16:03:47 -06:00
1a7a55dfc3 Fix missing mkdirp
Some checks failed
Build Dusk / build-dolphin (push) Failing after 4m14s
Build Dusk / run-tests (push) Successful in 3m24s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
2026-02-06 15:54:06 -06:00
fe5927ea6a Add more bin
Some checks failed
Build Dusk / build-dolphin (push) Failing after 3m41s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:49:52 -06:00
119c794ad7 Add bin
Some checks failed
Build Dusk / build-dolphin (push) Failing after 4m13s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:44:11 -06:00
e2076b2c1c Also build wii
Some checks failed
Build Dusk / build-dolphin (push) Failing after 3m55s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:39:33 -06:00
5208c5148e Fix cmake?
Some checks failed
Build Dusk / build-dolphin (push) Failing after 5m18s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:32:00 -06:00
d80660b097 cur dir
Some checks failed
Build Dusk / build-dolphin (push) Failing after 3m30s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:27:33 -06:00
b916d0278b install cmake
Some checks failed
Build Dusk / build-dolphin (push) Failing after 3m5s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has started running
2026-02-06 15:21:24 -06:00
d51e13e620 Update
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m36s
Build Dusk / run-tests (push) Successful in 4m9s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has started running
2026-02-06 15:13:03 -06:00
40ad4326ef Do it all ourselves
Some checks failed
Build Dusk / build-gamecube (push) Failing after 12s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:11:50 -06:00
b8afc1684a with --yes
Some checks failed
Build Dusk / build-gamecube (push) Failing after 41s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 15:10:47 -06:00
8348b31ac8 re
Some checks failed
Build Dusk / build-gamecube (push) Failing after 20s
Build Dusk / run-tests (push) Has started running
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
2026-02-06 15:08:58 -06:00
411f2dbcce 403 fix?
Some checks failed
Build Dusk / run-tests (push) Waiting to run
Build Dusk / build-gamecube (push) Failing after 18s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
2026-02-06 15:02:41 -06:00
ee89c08160 Manually setup ppc
Some checks failed
Build Dusk / build-gamecube (push) Failing after 6s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has started running
2026-02-06 15:00:28 -06:00
357607a89f more echoing
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m13s
Build Dusk / run-tests (push) Successful in 3m11s
Build Dusk / build-linux (push) Failing after 2m36s
Build Dusk / build-psp (push) Has been cancelled
2026-02-06 14:52:45 -06:00
8d6dc2df44 Try sudo
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m16s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:50:49 -06:00
5207582ab3 Try more
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m15s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:47:44 -06:00
71768e6154 Try outside
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m33s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:45:07 -06:00
ecbe235523 Try try again
Some checks failed
Build Dusk / build-gamecube (push) Failing after 53s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:43:10 -06:00
afef079d1e Fix cli order
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m0s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:40:07 -06:00
df17696c69 try append u
Some checks failed
Build Dusk / build-gamecube (push) Failing after 52s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:38:49 -06:00
065bf0908f Fix crap
Some checks failed
Build Dusk / build-gamecube (push) Failing after 42s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:34:53 -06:00
5b6755e9cf Try fix workdir
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m38s
Build Dusk / run-tests (push) Successful in 4m0s
Build Dusk / build-linux (push) Failing after 2m53s
Build Dusk / build-psp (push) Failing after 3m30s
2026-02-06 14:19:59 -06:00
b08482acf1 Build cube again
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m11s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:15:29 -06:00
80c9c1d389 Try mount differently.
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m12s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:12:05 -06:00
bb7db57bda yes
Some checks failed
Build Dusk / build-gamecube (push) Failing after 50s
Build Dusk / run-tests (push) Successful in 2m5s
Build Dusk / build-linux (push) Failing after 2m17s
Build Dusk / build-psp (push) Has been cancelled
2026-02-06 14:05:28 -06:00
6a83ac767c cli 2026-02-06 14:05:18 -06:00
7e47ef9d74 try official docker steps
Some checks failed
Build Dusk / build-gamecube (push) Failing after 38s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:03:34 -06:00
e7ec603526 yet another
Some checks failed
Build Dusk / build-gamecube (push) Failing after 44s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 14:00:49 -06:00
2d8ae09bd8 Test again?
Some checks failed
Build Dusk / build-gamecube (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
2026-02-06 13:58:48 -06:00
b2affbc0a7 Try something else?
Some checks failed
Build Dusk / build-gamecube (push) Failing after 39s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 13:56:39 -06:00
d50bc61ada Prog
Some checks failed
Build Dusk / build-linux (push) Waiting to run
Build Dusk / build-psp (push) Waiting to run
Build Dusk / build-gamecube (push) Failing after 29s
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 13:54:53 -06:00
ec6b032b45 Take sH out
Some checks failed
Build Dusk / build-gamecube (push) Failing after 56s
Build Dusk / build-wii (push) Failing after 44s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 13:51:07 -06:00
bc72f48496 Try again?
Some checks failed
Build Dusk / build-gamecube (push) Failing after 44s
Build Dusk / run-tests (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-wii (push) Has been cancelled
2026-02-06 13:48:11 -06:00
dcf06fbd36 Update shell
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m3s
Build Dusk / run-tests (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-wii (push) Has been cancelled
2026-02-06 13:46:15 -06:00
96311d72c2 Retry build
Some checks failed
Build Dusk / build-gamecube (push) Failing after 1m26s
Build Dusk / build-wii (push) Failing after 1m19s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 13:41:27 -06:00
07938cccc7 Build dolphin first while I test.
Some checks failed
Build Dusk / build-dolphin (push) Failing after 5m38s
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / run-tests (push) Has been cancelled
2026-02-06 13:34:56 -06:00
097c8c00f9 Fixed flickering
Some checks failed
Build Dusk / run-tests (push) Successful in 1m42s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
Build Dusk / build-dolphin (push) Has been cancelled
2026-02-06 13:31:15 -06:00
aa5b41fe31 First texture rendering (if broken) 2026-02-06 12:48:49 -06:00
0d56859d94 Alpha textures 2026-02-05 23:28:26 -06:00
1af5f238e4 RGBA textures 2026-02-05 21:57:56 -06:00
dd697d5650 Emu vs Real! 2026-02-05 08:43:49 -06:00
5cf299a1c7 Mesh working, lua broken 2026-02-05 08:21:19 -06:00
67bf825cc9 Camera 2026-02-05 00:42:04 -06:00
56e1696cd4 Asset loading 2026-02-04 21:52:14 -06:00
d955fb6430 Debugging functions. 2026-02-04 18:32:20 -06:00
dd910a31aa Actually compiled 2026-02-04 17:44:53 -06:00
708c4d0ec3 "Improved" 2026-02-04 15:54:09 -06:00
ad13d6c6a1 SDL2 example builds. 2026-02-04 11:17:25 -06:00
1c32158142 DOlphin progress 2026-02-04 10:16:16 -06:00
467 changed files with 11802 additions and 3619 deletions

View File

@@ -1,74 +0,0 @@
name: Build Dusk
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake for tests
run: cmake -S . -B build -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux
- name: Build tests
run: cmake --build build -- -j$(nproc)
- name: Run tests
run: ctest --output-on-failure --test-dir build
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=linux
- name: Build
run: cmake --build build -- -j$(nproc)
- name: List build output
run: ls -lh build
- name: Upload Linux binary
uses: actions/upload-artifact@v3
with:
name: dusk-linux
path: build/Dusk
if-no-files-found: error
build-psp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp -DENABLE_TESTS=OFF
- name: Build
run: cmake --build build -- -j$(nproc)
- name: Move EBOOT.PBP to Dusk subfolder
run: |
mkdir -p build/gitea/Dusk
mv build/EBOOT.PBP build/gitea/Dusk/EBOOT.PBP
- name: List build output
run: ls -lh build/gitea/Dusk
- name: Upload PSP binary
uses: actions/upload-artifact@v3
with:
name: dusk-psp
path: build/gitea/
if-no-files-found: error

117
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,117 @@
name: Build Dusk
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Run tests in Docker
run: ./scripts/test-linux-docker.sh
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build Linux
run: ./scripts/build-linux-docker.sh
- name: Upload Linux binary
uses: actions/upload-artifact@v6
with:
name: dusk-linux
path: build-linux/Dusk
if-no-files-found: error
build-psp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build psp
run: ./scripts/build-psp-docker.sh
- name: Move EBOOT.PBP to Dusk subfolder
run: |
mkdir -p ./git-artifcats/Dusk/PSP/GAME/Dusk
cp build-psp/EBOOT.PBP ./git-artifcats/Dusk/PSP/GAME/Dusk/EBOOT.PBP
- name: Upload psp binary
uses: actions/upload-artifact@v6
with:
name: dusk-psp
path: ./git-artifcats/Dusk
if-no-files-found: error
build-knulli:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build knulli
run: ./scripts/build-knulli-docker.sh
- name: Move output to Dusk subfolder
run: |
mkdir -p ./git-artifcats/Dusk
cp -r build-knulli/dusk ./git-artifcats/Dusk
- name: Upload knulli binary
uses: actions/upload-artifact@v6
with:
name: dusk-knulli
path: ./git-artifcats/Dusk
if-no-files-found: error
build-gamecube:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build GameCube
run: ./scripts/build-gamecube-docker.sh
- name: Copy output files.
run: |
mkdir -p ./git-artifcats/Dusk
cp build-gamecube/Dusk.dol ./git-artifcats/Dusk/Dusk.dol
cp build-gamecube/dusk.dsk ./git-artifcats/Dusk/dusk.dsk
- name: Upload GameCube binary
uses: actions/upload-artifact@v6
with:
name: dusk-gamecube
path: ./git-artifcats/Dusk
if-no-files-found: error
build-wii:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build Wii
run: ./scripts/build-wii-docker.sh
- name: Copy output files.
run: |
mkdir -p ./git-artifcats/Dusk/apps/Dusk
cp build-wii/Dusk.dol ./git-artifcats/Dusk/apps/Dusk/Dusk.dol
cp build-wii/dusk.dsk ./git-artifcats/Dusk/apps/Dusk/dusk.dsk
cp docker/dolphin/meta.xml ./git-artifcats/Dusk/apps/Dusk/meta.xml
- name: Upload Wii binary
uses: actions/upload-artifact@v6
with:
name: dusk-wii
path: ./git-artifcats/Dusk
if-no-files-found: error

3
.gitignore vendored
View File

@@ -102,3 +102,6 @@ yarn.lock
.editor .editor
.venv .venv
/build2
/build*

View File

@@ -4,18 +4,13 @@
# https://opensource.org/licenses/MIT # https://opensource.org/licenses/MIT
# Setup # Setup
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.18)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
option(ENABLE_TESTS "Enable tests" ON) option(DUSK_BUILD_TESTS "Enable tests" OFF)
# Set target system
if(NOT DEFINED DUSK_TARGET_SYSTEM)
set(DUSK_TARGET_SYSTEM "linux")
# set(DUSK_TARGET_SYSTEM "psp")
endif()
# Prep cache # Prep cache
set(DUSK_CACHE_TARGET "dusk-target") set(DUSK_CACHE_TARGET "dusk-target")
@@ -35,110 +30,85 @@ set(DUSK_BUILD_BINARY ${DUSK_BUILD_DIR}/Dusk CACHE INTERNAL ${DUSK_CACHE_TARGET}
set(DUSK_ASSETS "" CACHE INTERNAL ${DUSK_CACHE_TARGET}) set(DUSK_ASSETS "" CACHE INTERNAL ${DUSK_CACHE_TARGET})
set(DUSK_LIBRARY_TARGET_NAME "DuskCore" CACHE INTERNAL ${DUSK_CACHE_TARGET}) set(DUSK_LIBRARY_TARGET_NAME "DuskCore" CACHE INTERNAL ${DUSK_CACHE_TARGET})
set(DUSK_BINARY_TARGET_NAME "Dusk" CACHE INTERNAL ${DUSK_CACHE_TARGET}) set(DUSK_BINARY_TARGET_NAME "Dusk" CACHE INTERNAL ${DUSK_CACHE_TARGET})
set(DUSK_ASSETS_ZIP "${DUSK_BUILD_DIR}/dusk.dsk" CACHE INTERNAL ${DUSK_CACHE_TARGET})
if(NOT DEFINED DUSK_TARGET_SYSTEM)
set(DUSK_TARGET_SYSTEM "linux")
endif()
# Create directories # Create directories
file(MAKE_DIRECTORY ${DUSK_GENERATED_HEADERS_DIR}) file(MAKE_DIRECTORY ${DUSK_GENERATED_HEADERS_DIR})
file(MAKE_DIRECTORY ${DUSK_TEMP_DIR})
file(MAKE_DIRECTORY ${DUSK_BUILT_ASSETS_DIR})
# Find packages # Required build packages
find_package(Python3 COMPONENTS Interpreter REQUIRED) find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Toolchains
if(DUSK_TARGET_SYSTEM STREQUAL "psp")
find_package(pspsdk REQUIRED)
endif()
# Init Project. # Init Project.
project(${DUSK_LIBRARY_TARGET_NAME} project(${DUSK_LIBRARY_TARGET_NAME}
VERSION 1.0.0 VERSION 1.0.0
LANGUAGES C LANGUAGES C
) )
# MainLibrary # Either, create library and binary separately (used for tests), or make them
add_library(${DUSK_LIBRARY_TARGET_NAME}) # one in the same so all code is in the binary only.
# Binary Executable # Binary Executable
add_executable(${DUSK_BINARY_TARGET_NAME}) add_executable(${DUSK_BINARY_TARGET_NAME} ${DUSK_SOURCES_DIR}/dusk/null.c)
# Link library to binary and test if(DUSK_BUILD_TESTS)
# MainLibrary
add_library(${DUSK_LIBRARY_TARGET_NAME} STATIC)
# Link library to binary
target_link_libraries(${DUSK_BINARY_TARGET_NAME} target_link_libraries(${DUSK_BINARY_TARGET_NAME}
PUBLIC PUBLIC
${DUSK_LIBRARY_TARGET_NAME} ${DUSK_LIBRARY_TARGET_NAME}
) )
else()
set(DUSK_LIBRARY_TARGET_NAME "${DUSK_BINARY_TARGET_NAME}" CACHE INTERNAL ${DUSK_CACHE_TARGET})
endif()
# Definitions
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
)
# Toolchains
include(cmake/targets/${DUSK_TARGET_SYSTEM}.cmake)
# Add tools # Add tools
add_subdirectory(tools) add_subdirectory(tools)
# Assets # Include generated headers from tools.
add_subdirectory(assets) target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
${DUSK_GENERATED_HEADERS_DIR}
# Add libraries
if(DUSK_TARGET_SYSTEM STREQUAL "linux")
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
SDL2
OpenGL::GL
GL
) )
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp") # Add main code
find_package(SDL2 REQUIRED) add_subdirectory(${DUSK_SOURCES_DIR})
find_package(OpenGL REQUIRED)
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
${SDL2_LIBRARIES}
SDL2
OpenGL::GL
zip
bz2
z
mbedtls
mbedcrypto
lzma
)
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
${SDL2_INCLUDE_DIRS}
)
endif()
# Force turn tests off for now
set(ENABLE_TESTS OFF CACHE BOOL "Enable tests" FORCE)
# Add code
add_subdirectory(src)
# Handle tests
if(ENABLE_TESTS)
enable_testing()
add_subdirectory(test)
endif()
# Build assets
dusk_run_python(
DUSK_ASSETS_BUILT
tools.asset.bundle
--assets ${DUSK_ASSETS_DIR}
--output-assets ${DUSK_BUILT_ASSETS_DIR}
--output-file ${DUSK_BUILD_DIR}/dusk.dsk
--headers-dir ${DUSK_GENERATED_HEADERS_DIR}
--input ${DUSK_ASSETS}
)
add_dependencies(${DUSK_LIBRARY_TARGET_NAME} DUSK_ASSETS_BUILT)
# Include generated headers # Include generated headers
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
${DUSK_GENERATED_HEADERS_DIR} ${DUSK_GENERATED_HEADERS_DIR}
) )
# Postbuild # Handle tests
if(DUSK_TARGET_SYSTEM STREQUAL "psp") if(DUSK_BUILD_TESTS)
create_pbp_file( enable_testing()
TARGET "${DUSK_BINARY_TARGET_NAME}" add_subdirectory(test)
ICON_PATH NULL
BACKGROUND_PATH NULL
PREVIEW_PATH NULL
TITLE "${DUSK_BINARY_TARGET_NAME}"
PSAR_PATH ${DUSK_BUILD_DIR}/dusk.dsk
VERSION 01.00
)
endif() endif()
# Build assets
file(GLOB_RECURSE DUSK_ASSET_FILES CONFIGURE_DEPENDS "${DUSK_ASSETS_DIR}/*")
add_custom_command(
OUTPUT "${DUSK_ASSETS_ZIP}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${DUSK_ASSETS_DIR}"
COMMAND ${CMAKE_COMMAND} -E rm -f "${DUSK_ASSETS_ZIP}"
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${DUSK_ASSETS_ZIP}" --format=zip -- .
WORKING_DIRECTORY "${DUSK_ASSETS_DIR}"
DEPENDS ${DUSK_ASSET_FILES}
VERBATIM
)
add_custom_target(DUSK_ASSETS_BUILT DEPENDS "${DUSK_ASSETS_ZIP}")
add_dependencies(${DUSK_LIBRARY_TARGET_NAME} DUSK_ASSETS_BUILT)

View File

@@ -35,10 +35,24 @@ def processPalettizedImage(asset):
imagePalette = extractPaletteFromImage(image) imagePalette = extractPaletteFromImage(image)
# Find palette that contains every color # Find palette that contains every color
for palette in palettes: palette = None
if all(color in palette['pixels'] for color in imagePalette): for p in palettes:
hasAllColors = True
for color in imagePalette:
for palColor in p['pixels']:
if color[0] == palColor[0] and color[1] == palColor[1] and color[2] == palColor[2] and color[3] == palColor[3]:
break
elif color[3] == 0 and palColor[3] == 0:
break break
else: else:
print('Pallete {} does not contain color #{}'.format(p['paletteName'], '{:02x}{:02x}{:02x}{:02x}'.format(color[0], color[1], color[2], color[3])))
hasAllColors = False
break
if hasAllColors:
palette = p
break
if palette is None:
palette = palettes[0] # Just to avoid reference error palette = palettes[0] # Just to avoid reference error
print(f"No matching palette found for {assetPath}!") print(f"No matching palette found for {assetPath}!")
# Find which pixel is missing # Find which pixel is missing

View File

@@ -1,3 +1,4 @@
import json
import os import os
from PIL import Image from PIL import Image
import datetime import datetime
@@ -78,6 +79,7 @@ def processPalette(asset):
def processPaletteList(): def processPaletteList():
data = f"// Auto-generated palette list\n" data = f"// Auto-generated palette list\n"
print(f"Generating palette list with {len(palettes)} palettes.")
for palette in palettes: for palette in palettes:
data += f"#include \"{palette['headerFile']}\"\n" data += f"#include \"{palette['headerFile']}\"\n"
data += f"\n" data += f"\n"

View File

@@ -126,6 +126,7 @@ def processTileset(asset):
data += f"#pragma once\n" data += f"#pragma once\n"
data += f"#include \"display/tileset/tileset.h\"\n\n" data += f"#include \"display/tileset/tileset.h\"\n\n"
data += f"static const tileset_t TILESET_{tilesetNameUpper} = {{\n" data += f"static const tileset_t TILESET_{tilesetNameUpper} = {{\n"
data += f" .name = {json.dumps(tilesetName)},\n"
data += f" .tileWidth = {tilesetData['tileWidth']},\n" data += f" .tileWidth = {tilesetData['tileWidth']},\n"
data += f" .tileHeight = {tilesetData['tileHeight']},\n" data += f" .tileHeight = {tilesetData['tileHeight']},\n"
data += f" .tileCount = {tilesetData['columns'] * tilesetData['rows']},\n" data += f" .tileCount = {tilesetData['columns'] * tilesetData['rows']},\n"

47
archive/assetpalette.c Normal file
View File

@@ -0,0 +1,47 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "assetpalette.h"
#include "asset/assettype.h"
#include "assert/assert.h"
errorret_t assetPaletteLoad(assetentire_t entire) {
assertNotNull(entire.data, "Data pointer cannot be NULL.");
assertNotNull(entire.output, "Output pointer cannot be NULL.");
assetpalette_t *assetData = (assetpalette_t *)entire.data;
palette_t *palette = (palette_t *)entire.output;
// Read header and version (first 4 bytes)
if(
assetData->header[0] != 'D' ||
assetData->header[1] != 'P' ||
assetData->header[2] != 'F'
) {
errorThrow("Invalid palette header");
}
// Version (can only be 1 atm)
if(assetData->version != 0x01) {
errorThrow("Unsupported palette version");
}
// Check color count.
if(
assetData->colorCount == 0 ||
assetData->colorCount > PALETTE_COLOR_COUNT_MAX
) {
errorThrow("Invalid palette color count");
}
paletteInit(
palette,
assetData->colorCount,
assetData->colors
);
errorOk();
}

30
archive/assetpalette.h Normal file
View File

@@ -0,0 +1,30 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "error/error.h"
#include "display/texture/palette.h"
typedef struct assetentire_s assetentire_t;
#pragma pack(push, 1)
typedef struct {
char_t header[3];
uint8_t version;
uint8_t colorCount;
color_t colors[PALETTE_COLOR_COUNT_MAX];
} assetpalette_t;
#pragma pack(pop)
/**
* Loads a palette from the given data pointer into the output palette.
*
* @param entire Data received from the asset loader system.
* @return An error code.
*/
errorret_t assetPaletteLoad(assetentire_t entire);

View File

@@ -22,13 +22,13 @@ int moduleMapLoad(lua_State *L) {
// Potentially provide up to 3 params // Potentially provide up to 3 params
chunkpos_t initial = { .x = 0, .y = 0, .z = 0 }; chunkpos_t initial = { .x = 0, .y = 0, .z = 0 };
if(lua_isnumber(L, 2)) { if(lua_isnumber(L, 2)) {
initial.x = (chunkunit_t)luaL_checkinteger(L, 2); initial.x = (chunkunit_t)lua_tonumber(L, 2);
} }
if(lua_isnumber(L, 3)) { if(lua_isnumber(L, 3)) {
initial.y = (chunkunit_t)luaL_checkinteger(L, 3); initial.y = (chunkunit_t)lua_tonumber(L, 3);
} }
if(lua_isnumber(L, 4)) { if(lua_isnumber(L, 4)) {
initial.z = (chunkunit_t)luaL_checkinteger(L, 4); initial.z = (chunkunit_t)lua_tonumber(L, 4);
} }
// Load the map. // Load the map.

View File

@@ -0,0 +1,12 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
sdl2.c
psp.c
dolphin.c
)

View File

@@ -0,0 +1,92 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "dolphin.h"
void displayInitDolphin(void) {
VIDEO_Init();
DISPLAY.screenMode = VIDEO_GetPreferredMode(NULL);
DISPLAY.frameBuffer[0] = MEM_K0_TO_K1(
SYS_AllocateFramebuffer(DISPLAY.screenMode)
);
DISPLAY.frameBuffer[1] = MEM_K0_TO_K1(
SYS_AllocateFramebuffer(DISPLAY.screenMode)
);
VIDEO_Configure(DISPLAY.screenMode);
VIDEO_SetNextFramebuffer(DISPLAY.frameBuffer[DISPLAY.whichFrameBuffer]);
// VIDEO_SetPostRetraceCallback(copy_buffers);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(DISPLAY.screenMode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
DISPLAY.fifoBuffer = memalign(32, DISPLAY_FIFO_SIZE);
memoryZero(DISPLAY.fifoBuffer, DISPLAY_FIFO_SIZE);
GX_Init(DISPLAY.fifoBuffer, DISPLAY_FIFO_SIZE);
// This seems to be mostly related to interlacing vs progressive
GX_SetViewport(
0, 0,
DISPLAY.screenMode->fbWidth, DISPLAY.screenMode->efbHeight,
0, 1
);
float_t yscale = GX_GetYScaleFactor(
DISPLAY.screenMode->efbHeight, DISPLAY.screenMode->xfbHeight
);
uint32_t xfbHeight = GX_SetDispCopyYScale(yscale);
GX_SetScissor(
0, 0,
DISPLAY.screenMode->fbWidth, DISPLAY.screenMode->efbHeight
);
GX_SetDispCopySrc(
0, 0,
DISPLAY.screenMode->fbWidth, DISPLAY.screenMode->efbHeight
);
GX_SetDispCopyDst(DISPLAY.screenMode->fbWidth, xfbHeight);
GX_SetCopyFilter(
DISPLAY.screenMode->aa,
DISPLAY.screenMode->sample_pattern,
GX_TRUE,
DISPLAY.screenMode->vfilter
);
GX_SetFieldMode(
DISPLAY.screenMode->field_rendering,
(
(DISPLAY.screenMode->viHeight == 2 * DISPLAY.screenMode->xfbHeight) ?
GX_ENABLE :
GX_DISABLE
)
);
// Setup cull modes
GX_SetCullMode(GX_CULL_NONE);
GX_SetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
GX_CopyDisp(DISPLAY.frameBuffer[DISPLAY.whichFrameBuffer], GX_TRUE);
GX_SetDispCopyGamma(GX_GM_1_0);
GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_INDEX16);
GX_SetVtxDesc(GX_VA_CLR0, GX_INDEX16);
GX_SetVtxDesc(GX_VA_TEX0, GX_INDEX16);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_U8, 0);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
}
void displayDolphinSwap(void) {
GX_DrawDone();
DISPLAY.whichFrameBuffer ^= 1;
GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
GX_SetColorUpdate(GX_TRUE);
GX_CopyDisp(DISPLAY.frameBuffer[DISPLAY.whichFrameBuffer], GX_TRUE);
VIDEO_SetNextFramebuffer(DISPLAY.frameBuffer[DISPLAY.whichFrameBuffer]);
VIDEO_Flush();
VIDEO_WaitVSync();
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
#include "display/displaydefs.h"
typedef struct {
void *frameBuffer[2];// Double-Bufferred
int whichFrameBuffer;
GXRModeObj *screenMode;
void *fifoBuffer;
} displaydolphin_t;
/**
* Initializes the display for Dolphin.
*/
void displayDolphinInit(void);
/**
* Swaps the back buffer to the front for Dolphin.
*/
void displayDolphinSwap(void);

12
archive/platform/psp.c Normal file
View File

@@ -0,0 +1,12 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "psp.h"
void displayInitPSP(void) {
DISPLAY.usingShaderedPalettes = false;
}

13
archive/platform/psp.h Normal file
View File

@@ -0,0 +1,13 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
/**
* Initializes the display for PSP.
*/
void displayInitPSP(void);

32
archive/platform/sdl2.c Normal file
View File

@@ -0,0 +1,32 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "sdl2.h"
void displaySDL2Update(void) {
}
void displaySDL2Swap(void) {
SDL_GL_SwapWindow(DISPLAY.window);
GLenum err;
while((err = glGetError()) != GL_NO_ERROR) {
debugPrint("GL Error: %d\n", err);
}
}
void displaySDL2Dispose(void) {
if(DISPLAY.glContext) {
SDL_GL_DeleteContext(DISPLAY.glContext);
DISPLAY.glContext = NULL;
}
if(DISPLAY.window) {
SDL_DestroyWindow(DISPLAY.window);
DISPLAY.window = NULL;
}
SDL_Quit();
}

35
archive/platform/sdl2.h Normal file
View File

@@ -0,0 +1,35 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
typedef struct {
SDL_Window *window;
SDL_GLContext glContext;
bool_t usingShaderedPalettes;
} displaysdl2_t;
/**
* Initializes the display for SDL2.
*/
void displaySDL2Init(void);
/**
* Updates the display for SDL2.
*/
void displaySDL2Update(void);
/**
* Swaps the display buffers for SDL2.
*/
void displaySDL2Swap(void);
/**
* Disposes of the display for SDL2.
*/
void displaySDL2Dispose(void);

View File

@@ -12,10 +12,9 @@
int scriptFuncEntityAdd(lua_State *L) { int scriptFuncEntityAdd(lua_State *L) {
assertNotNull(L, "Lua state cannot be NULL"); assertNotNull(L, "Lua state cannot be NULL");
assertTrue(lua_isnumber(L, 1), "Expected integer entity type");
assertTrue(lua_isinteger(L, 1), "Expected integer entity type"); entitytype_t entityType = (entitytype_t)luaL_checknumber(L, 1);
lua_Integer entityType = luaL_checkinteger(L, 1);
assertTrue( assertTrue(
entityType >= ENTITY_TYPE_NULL && entityType < ENTITY_TYPE_COUNT, entityType >= ENTITY_TYPE_NULL && entityType < ENTITY_TYPE_COUNT,
"Invalid entity type passed to scriptFuncEntityAdd" "Invalid entity type passed to scriptFuncEntityAdd"

View File

@@ -8,7 +8,7 @@
#include "uiframe.h" #include "uiframe.h"
#include "display/spritebatch.h" #include "display/spritebatch.h"
#include "assert/assert.h" #include "assert/assert.h"
#include <math.h> #include "util/math.h"
void uiFrameDraw( void uiFrameDraw(
const float_t x, const float_t x,

View File

@@ -1,21 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DUSK_GAME_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Game assets directory")
# Palette asset needs to be added before any images.
add_subdirectory(palette)
# Languages need to be added before anything that uses text.
add_subdirectory(locale)
# Rest, order doesn't matter
add_asset(SCRIPT init.lua)
# Subdirs
add_subdirectory(entity)
add_subdirectory(map)
add_subdirectory(ui)
add_subdirectory(scene)

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_asset(TILESET entities.tsx)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.2" name="entities" tilewidth="16" tileheight="16" tilecount="64" columns="8">
<image source="entities.png" width="128" height="128"/>
</tileset>

View File

@@ -1,10 +1,10 @@
module('platform')
module('input') module('input')
module('platform')
module('scene') module('scene')
module('locale') module('locale')
-- Default Input bindings. -- Default Input bindings.
if PLATFORM == "psp" then if PSP then
inputBind("up", INPUT_ACTION_UP) inputBind("up", INPUT_ACTION_UP)
inputBind("down", INPUT_ACTION_DOWN) inputBind("down", INPUT_ACTION_DOWN)
inputBind("left", INPUT_ACTION_LEFT) inputBind("left", INPUT_ACTION_LEFT)
@@ -16,7 +16,21 @@ if PLATFORM == "psp" then
inputBind("lstick_down", INPUT_ACTION_DOWN) inputBind("lstick_down", INPUT_ACTION_DOWN)
inputBind("lstick_left", INPUT_ACTION_LEFT) inputBind("lstick_left", INPUT_ACTION_LEFT)
inputBind("lstick_right", INPUT_ACTION_RIGHT) inputBind("lstick_right", INPUT_ACTION_RIGHT)
else
elseif DOLPHIN then
inputBind("up", INPUT_ACTION_UP)
inputBind("down", INPUT_ACTION_DOWN)
inputBind("left", INPUT_ACTION_LEFT)
inputBind("right", INPUT_ACTION_RIGHT)
inputBind("b", INPUT_ACTION_CANCEL)
inputBind("a", INPUT_ACTION_ACCEPT)
inputBind("z", INPUT_ACTION_RAGEQUIT)
inputBind("lstick_up", INPUT_ACTION_UP)
inputBind("lstick_down", INPUT_ACTION_DOWN)
inputBind("lstick_left", INPUT_ACTION_LEFT)
inputBind("lstick_right", INPUT_ACTION_RIGHT)
elseif LINUX then
if INPUT_KEYBOARD then if INPUT_KEYBOARD then
inputBind("w", INPUT_ACTION_UP) inputBind("w", INPUT_ACTION_UP)
inputBind("s", INPUT_ACTION_DOWN) inputBind("s", INPUT_ACTION_DOWN)
@@ -35,7 +49,29 @@ else
inputBind("escape", INPUT_ACTION_RAGEQUIT) inputBind("escape", INPUT_ACTION_RAGEQUIT)
end end
if INPUT_GAMEPAD then
inputBind("gamepad_up", INPUT_ACTION_UP)
inputBind("gamepad_down", INPUT_ACTION_DOWN)
inputBind("gamepad_left", INPUT_ACTION_LEFT)
inputBind("gamepad_right", INPUT_ACTION_RIGHT)
inputBind("gamepad_a", INPUT_ACTION_ACCEPT)
inputBind("gamepad_b", INPUT_ACTION_CANCEL)
inputBind("gamepad_back", INPUT_ACTION_RAGEQUIT)
inputBind("gamepad_lstick_up", INPUT_ACTION_UP)
inputBind("gamepad_lstick_down", INPUT_ACTION_DOWN)
inputBind("gamepad_lstick_left", INPUT_ACTION_LEFT)
inputBind("gamepad_lstick_right", INPUT_ACTION_RIGHT)
end end
localeSet(DUSK_LOCALE_EN_US) if INPUT_POINTER then
sceneSet('scene/initial.dsf') inputBind("mouse_x", INPUT_ACTION_POINTERX)
inputBind("mouse_y", INPUT_ACTION_POINTERY)
end
else
print("Unknown platform, no default input bindings set.")
end
sceneSet('scene/minesweeper.lua')

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_asset(LANGUAGE en_US.po)

View File

@@ -7,9 +7,3 @@ msgstr ""
msgid "ui.test" msgid "ui.test"
msgstr "Hello this is a test." msgstr "Hello this is a test."
msgid "map.test"
msgstr "This is a map test."
msgid "test.test2"
msgstr "This is another test."

BIN
assets/main_palette.dpf Normal file

Binary file not shown.

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_asset(PALETTE palette0.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_asset(SCRIPT initial.lua)

View File

@@ -1,44 +0,0 @@
module('spritebatch')
module('camera')
module('color')
-- module('ui')
module('text')
module('screen')
module('time')
module('map')
module('glm')
screenSetBackground(colorBlack())
mapLoad('map/testmap/testmap.dmf')
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
mapCamera = cameraCreate()
text = "Hello World"
function sceneDispose()
end
function sceneUpdate()
end
function sceneRender()
-- Map Test
cameraPushMatrix(mapCamera)
mapCamera.position = vec3(300, 300, 300)
mapRender()
cameraPopMatrix()
-- UI Test
cameraPushMatrix(camera)
camera.bottom = screenGetHeight()
camera.right = screenGetWidth()
width, height = textMeasure(text)
x = (screenGetWidth() - width)
x = math.sin(TIME.time * 2) * (x / 2) + (x / 2)
y = (screenGetHeight() - height) / 2
y = math.cos(TIME.time * 3) * (y) + (y)
textDraw(x, y, text, colorMagenta())
cameraPopMatrix()
end

View File

@@ -0,0 +1,256 @@
module('spritebatch')
module('camera')
module('color')
module('ui')
module('screen')
module('time')
module('glm')
module('text')
module('tileset')
module('texture')
module('input')
CELL_STATE_DEFAULT = 0
CELL_STATE_HOVER = 1
CELL_STATE_DOWN = 2
CELL_STATE_DISABLED = 3
screenSetBackground(colorCornflowerBlue())
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
-- tilesetUi = tilesetGetByName("ui")
-- textureUi = textureLoad(tilesetUi.texture)
-- tilesetBorder = tilesetGetByName("border")
-- textureBorder = textureLoad(tilesetBorder.texture)
-- textureGrid = textureLoad("minesweeper/grid_bg.dpi")
-- tilesetCell = tilesetGetByName("cell")
-- textureCell = textureLoad(tilesetCell.texture)
-- cellSliceDefault = tilesetPositionGetUV(tilesetCell, 3, 5)
-- cellSliceHover = tilesetPositionGetUV(tilesetCell, 3, 4)
-- cellSliceDown = tilesetPositionGetUV(tilesetCell, 3, 6)
-- cellSliceDisabled = tilesetPositionGetUV(tilesetCell, 3, 7)
-- sweepwerCols = 10
-- sweeperRows = 14
-- mouseX = -1
-- mouseY = -1
-- centerX = 0
-- centerY = 0
-- boardWidth = sweepwerCols * tilesetCell.tileWidth
-- boardHeight = sweeperRows * tilesetCell.tileHeight
-- i = 0
-- cells = {}
-- for y = 1, sweeperRows do
-- for x = 1, sweepwerCols do
-- cells[i] = CELL_STATE_DEFAULT
-- i = i + 1
-- end
-- end
function cellDraw(x, y, type)
local slice = cellSliceDefault
if type == CELL_STATE_HOVER then
slice = cellSliceHover
elseif type == CELL_STATE_DOWN then
slice = cellSliceDown
elseif type == CELL_STATE_DISABLED then
slice = cellSliceDisabled
end
spriteBatchPush(textureCell,
x, y,
x + tilesetCell.tileWidth, y + tilesetCell.tileHeight,
colorWhite(),
slice.u0, slice.v0,
slice.u1, slice.v1
)
end
function backgroundDraw()
local t = (TIME.time / 40) % 1
local scaleX = screenGetWidth() / textureGrid.width
local scaleY = screenGetHeight() / textureGrid.height
local u0 = t * scaleX
local v0 = t * scaleY
local u1 = scaleX + u0
local v1 = scaleY + v0
spriteBatchPush(textureGrid,
0, 0,
screenGetWidth(), screenGetHeight(),
colorWhite(),
u0, v0,
u1, v1
)
end
function borderDraw(x, y, innerWidth, innerHeight)
-- Top Left
local uv = tilesetPositionGetUV(tilesetBorder, 0, 0)
spriteBatchPush(textureBorder,
x - tilesetBorder.tileWidth, y - tilesetBorder.tileWidth,
x, y,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Top Right
uv = tilesetPositionGetUV(tilesetBorder, 10, 0)
spriteBatchPush(textureBorder,
x + innerWidth, y - tilesetBorder.tileHeight,
x + innerWidth + tilesetBorder.tileWidth, y,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Bottom Left
uv = tilesetPositionGetUV(tilesetBorder, 0, 10)
spriteBatchPush(textureBorder,
x - tilesetBorder.tileWidth, y + innerHeight,
x, y + innerHeight + tilesetBorder.tileHeight,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Bottom Right
uv = tilesetPositionGetUV(tilesetBorder, 10, 10)
spriteBatchPush(textureBorder,
x + innerWidth, y + innerHeight,
x + innerWidth + tilesetBorder.tileWidth, y + innerHeight + tilesetBorder.tileHeight,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Top
uv = tilesetPositionGetUV(tilesetBorder, 1, 0)
spriteBatchPush(textureBorder,
x, y - tilesetBorder.tileHeight,
x + innerWidth, y,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Bottom
uv = tilesetPositionGetUV(tilesetBorder, 1, 10)
spriteBatchPush(textureBorder,
x, y + innerHeight,
x + innerWidth, y + innerHeight + tilesetBorder.tileHeight,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Left
uv = tilesetPositionGetUV(tilesetBorder, 0, 1)
spriteBatchPush(textureBorder,
x - tilesetBorder.tileWidth, y,
x, y + innerHeight,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
-- Right
uv = tilesetPositionGetUV(tilesetBorder, 10, 1)
spriteBatchPush(textureBorder,
x + innerWidth, y,
x + innerWidth + tilesetBorder.tileWidth, y + innerHeight,
colorWhite(),
uv.u0, uv.v0,
uv.u1, uv.v1
)
end
x = 0
y = 0
function sceneDispose()
end
function sceneUpdate()
x = x + inputAxis(INPUT_ACTION_LEFT, INPUT_ACTION_RIGHT)
y = y + inputAxis(INPUT_ACTION_UP, INPUT_ACTION_DOWN)
end
function sceneRender()
-- Update camera
cameraPushMatrix(camera)
camera.bottom = screenGetHeight()
camera.right = screenGetWidth()
spriteBatchPush(
nil,
x, y, x + 32, y + 32,
colorWhite()
)
-- Update mouse position
-- if INPUT_POINTER then
-- mouseX = inputGetValue(INPUT_ACTION_POINTERX) * screenGetWidth()
-- mouseY = inputGetValue(INPUT_ACTION_POINTERY) * screenGetHeight()
-- -- Draw cursor
-- spriteBatchPush(
-- nil,
-- mouseX - 2, mouseY - 2,
-- mouseX + 2, mouseY + 2,
-- colorRed(),
-- 0, 0,
-- 1, 1
-- )
-- end
-- textDraw(10, 10, "Hello World")
-- centerX = math.floor(screenGetWidth() / 2)
-- centerY = math.floor(screenGetHeight() / 2)
-- Draw elements
-- backgroundDraw()
-- borderDraw(
-- centerX - (boardWidth / 2), centerY - (boardHeight / 2),
-- boardWidth, boardHeight
-- )
-- i = 0
-- -- Foreach cell
-- local offX = centerX - (boardWidth / 2)
-- local offY = centerY - (boardHeight / 2)
-- for y = 0, sweeperRows - 1 do
-- for x = 0, sweepwerCols - 1 do
-- i = y * sweepwerCols + x
-- -- Hovered
-- if
-- cells[i] == CELL_STATE_DEFAULT and
-- mouseX >= x * tilesetCell.tileWidth + offX and mouseX < (x + 1) * tilesetCell.tileWidth + offX and
-- mouseY >= y * tilesetCell.tileHeight + offY and mouseY < (y + 1) * tilesetCell.tileHeight + offY
-- then
-- cells[i] = CELL_STATE_HOVER
-- else
-- cells[i] = CELL_STATE_DEFAULT
-- end
-- cellDraw(
-- x * tilesetCell.tileWidth + offX,
-- y * tilesetCell.tileHeight + offY,
-- cells[i]
-- )
-- end
-- end
spriteBatchFlush()
cameraPopMatrix()
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.2" name="prarie" tilewidth="16" tileheight="16" tilecount="21" columns="7">
<image source="prarie.png" width="112" height="48"/>
</tileset>

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_asset(TILESET minogram.png type=PALETTIZED tileWidth=6 tileHeight=10 columns=16 rows=6)# Fixes PSP rendering

BIN
assets/ui/minogram.dpt Normal file

Binary file not shown.

BIN
assets/ui/minogram.dtf Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,17 @@
include(FetchContent)
set(ENABLE_ZSTD OFF CACHE BOOL "" FORCE)
set(BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(BUILD_REGRESS OFF CACHE BOOL "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(BUILD_DOC OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(LIBZIP_DO_INSTALL OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
libzip
GIT_REPOSITORY https://github.com/nih-at/libzip.git
GIT_TAG v1.11.4
)
FetchContent_MakeAvailable(libzip)

View File

@@ -0,0 +1,20 @@
# Compile lua
include(FetchContent)
FetchContent_Declare(
liblua
URL https://www.lua.org/ftp/lua-5.5.0.tar.gz
)
FetchContent_MakeAvailable(liblua)
set(LUA_SRC_DIR "${liblua_SOURCE_DIR}/src")
set(LUA_C_FILES
lapi.c lauxlib.c lbaselib.c lcode.c lcorolib.c lctype.c ldblib.c ldebug.c
ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c
loadlib.c lobject.c lopcodes.c loslib.c lparser.c lstate.c lstring.c
lstrlib.c ltable.c ltablib.c ltm.c lundump.c lutf8lib.c lvm.c lzio.c
)
list(TRANSFORM LUA_C_FILES PREPEND "${LUA_SRC_DIR}/")
add_library(liblua STATIC ${LUA_C_FILES})
target_include_directories(liblua PUBLIC "${LUA_SRC_DIR}")
target_compile_definitions(liblua PRIVATE LUA_USE_C89)
add_library(lua::lua ALIAS liblua)
set(Lua_FOUND TRUE CACHE BOOL "Lua found" FORCE)

View File

@@ -6,6 +6,7 @@
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
cglm cglm
# GIT_REPOSITORY https://git.wish.moe/YourWishes/cglm.git
GIT_REPOSITORY https://github.com/recp/cglm.git GIT_REPOSITORY https://github.com/recp/cglm.git
GIT_TAG v0.9.6 GIT_TAG v0.9.6
) )

View File

@@ -1,17 +1,43 @@
# Allow user to manually specify libzip paths
# LIBZIP_ROOT: root directory for libzip (optional)
# LIBZIP_INCLUDE_DIR: path to zip.h (optional)
# LIBZIP_LIBRARY: path to libzip library (optional)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
if(NOT LIBZIP_INCLUDE_DIR AND LIBZIP_ROOT)
find_path(LIBZIP_INCLUDE_DIR NAMES zip.h HINTS "${LIBZIP_ROOT}/include")
endif()
if(NOT LIBZIP_INCLUDE_DIR)
find_path(LIBZIP_INCLUDE_DIR NAMES zip.h) find_path(LIBZIP_INCLUDE_DIR NAMES zip.h)
endif()
mark_as_advanced(LIBZIP_INCLUDE_DIR) mark_as_advanced(LIBZIP_INCLUDE_DIR)
if(NOT LIBZIP_LIBRARY AND LIBZIP_ROOT)
find_library(LIBZIP_LIBRARY NAMES zip HINTS "${LIBZIP_ROOT}/lib")
endif()
if(NOT LIBZIP_LIBRARY)
find_library(LIBZIP_LIBRARY NAMES zip) find_library(LIBZIP_LIBRARY NAMES zip)
endif()
mark_as_advanced(LIBZIP_LIBRARY) mark_as_advanced(LIBZIP_LIBRARY)
if(LIBZIP_LIBRARY)
get_filename_component(_libzip_libdir ${LIBZIP_LIBRARY} DIRECTORY) get_filename_component(_libzip_libdir ${LIBZIP_LIBRARY} DIRECTORY)
endif()
if(NOT _libzip_pkgcfg AND LIBZIP_ROOT)
find_file(_libzip_pkgcfg libzip.pc
HINTS "${LIBZIP_ROOT}/lib/pkgconfig" "${LIBZIP_ROOT}/libdata/pkgconfig"
NO_DEFAULT_PATH
)
endif()
if(NOT _libzip_pkgcfg AND LIBZIP_LIBRARY)
find_file(_libzip_pkgcfg libzip.pc find_file(_libzip_pkgcfg libzip.pc
HINTS ${_libzip_libdir} ${LIBZIP_INCLUDE_DIR}/.. HINTS ${_libzip_libdir} ${LIBZIP_INCLUDE_DIR}/..
PATH_SUFFIXES pkgconfig lib/pkgconfig libdata/pkgconfig PATH_SUFFIXES pkgconfig lib/pkgconfig libdata/pkgconfig
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( find_package_handle_standard_args(

View File

@@ -1,106 +0,0 @@
# Copyright (c) 2025 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
if(NOT TARGET pspsdk)
message(STATUS "Looking for PSPSDK...")
set(PSPSDK_FOUND FALSE CACHE INTERNAL "PSPSDK found")
set(PSPSDK_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/_pspsdk")
set(PSPSDK_SEARCH_ROOTS
"${PSPSDK_ROOT}"
"$ENV{PSPDEV}"
"$ENV{HOME}/pspdev"
"/usr/local/pspdev"
"/opt/pspdev"
"/usr/pspdev"
"${PSPSDK_DOWNLOAD_DIR}/pspdev"
)
foreach(root IN LISTS PSPSDK_SEARCH_ROOTS)
list(APPEND PSPSDK_BIN_HINTS "${root}/bin")
list(APPEND PSPSDK_INCLUDE_HINTS "${root}/include")
list(APPEND PSPSDK_LIB_HINTS "${root}/lib")
endforeach()
# Find PSP GCC
find_program(PSPSDK_PSP_GCC NAMES psp-gcc HINTS ${PSPSDK_BIN_HINTS})
# If we did not find it, download it.
if(NOT PSPSDK_PSP_GCC)
message(STATUS "psp-gcc not found in system paths. Downloading PSPSDK tarball...")
file(DOWNLOAD
"https://github.com/pspdev/pspdev/releases/download/v20260101/pspdev-ubuntu-latest-x86_64.tar.gz"
"${CMAKE_BINARY_DIR}/pspsdk.tar.gz"
EXPECTED_HASH SHA256=68fb6063323e695a43415a151b3dd9ded61d00605f02d20146cc6933c11830f8
SHOW_PROGRESS
)
# Make output dir
file(MAKE_DIRECTORY "${PSPSDK_DOWNLOAD_DIR}")
# Extract the tarball
execute_process(
COMMAND
${CMAKE_COMMAND} -E tar xzf "${CMAKE_BINARY_DIR}/pspsdk.tar.gz"
WORKING_DIRECTORY
"${PSPSDK_DOWNLOAD_DIR}"
RESULT_VARIABLE
tar_result
)
if(NOT tar_result EQUAL 0)
message(FATAL_ERROR "Failed to extract PSPSDK tarball")
endif()
# Retry discovery with extracted fallback
find_program(PSPSDK_PSP_GCC NAMES psp-gcc HINTS ${PSPSDK_BIN_HINTS})
endif()
if(PSPSDK_PSP_GCC)
get_filename_component(PSPSDK_BIN_ROOT "${PSPSDK_PSP_GCC}" DIRECTORY)
get_filename_component(PSPSDK_ROOT "${PSPSDK_BIN_ROOT}" DIRECTORY)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(ENV{PSPDEV} "${PSPSDK_ROOT}")
set(CMAKE_TOOLCHAIN_FILE "${PSPSDK_ROOT}/psp/share/pspdev.cmake")
set(BUILD_PRX ON CACHE BOOL "Build PRX modules")
include("${PSPSDK_ROOT}/psp/share/pspdev.cmake")
set(CMAKE_C_COMPILER ${PSPSDK_BIN_ROOT}/psp-gcc)
set(CMAKE_CXX_COMPILER ${PSPSDK_BIN_ROOT}/psp-g++)
if(NOT DEFINED PSP)
message(FATAL_ERROR "PSP environment variable is not set correctly.")
endif()
add_library(pspsdk INTERFACE IMPORTED)
set_target_properties(pspsdk PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PSPSDK_INCLUDE_DIR}"
INTERFACE_LINK_DIRECTORIES "${PSPSDK_LIB_DIR}"
)
target_include_directories(pspsdk
INTERFACE
${PSPDEV}/psp/include
${PSPDEV}/psp/sdk/include
)
target_link_directories(pspsdk
INTERFACE
${PSPDEV}/lib
${PSPDEV}/psp/lib
${PSPDEV}/psp/sdk/lib
)
target_link_libraries(pspsdk INTERFACE
pspdebug
pspdisplay
pspge
pspctrl
pspgu
pspaudio
pspaudiolib
psputility
pspvfpu
pspvram
psphprm
)
endif()
endif()

View File

@@ -0,0 +1,42 @@
# Target definitions
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_DOLPHIN
DUSK_INPUT_GAMEPAD
DUSK_DISPLAY_WIDTH=640
DUSK_DISPLAY_HEIGHT=480
)
# Custom compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")
# Need PkgConfig
find_package(PkgConfig REQUIRED)
pkg_check_modules(zip IMPORTED_TARGET libzip)
# Disable all warnings
target_compile_options(${DUSK_LIBRARY_TARGET_NAME} PRIVATE -w)
# Custom flags for cglm
set(CGLM_SHARED OFF CACHE BOOL "Build cglm shared" FORCE)
set(CGLM_STATIC ON CACHE BOOL "Build cglm static" FORCE)
find_package(cglm REQUIRED)
include(cmake/modules/CompileLua.cmake)
# Link libraries
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
cglm
liblua
m
fat
PkgConfig::zip
)
# Postbuild
set(DUSK_BINARY_TARGET_NAME_DOL "${DUSK_BUILD_DIR}/Dusk.dol")
add_custom_command(TARGET ${DUSK_BINARY_TARGET_NAME} POST_BUILD
COMMAND elf2dol
"$<TARGET_FILE:${DUSK_BINARY_TARGET_NAME}>"
"${DUSK_BINARY_TARGET_NAME_DOL}"
COMMENT "Generating ${DUSK_BINARY_TARGET_NAME_DOL} from ${DUSK_BINARY_TARGET_NAME}"
)

View File

@@ -0,0 +1,5 @@
include(cmake/targets/dolphin.cmake)
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_GAMECUBE
)

View File

@@ -0,0 +1,45 @@
# Find link platform-specific libraries
set(OpenGL_GL_PREFERENCE LEGACY)
find_package(SDL2 REQUIRED)
find_library(EGL_LIB EGL REQUIRED)
find_library(GL_LIB GL REQUIRED)
find_package(OpenGL REQUIRED)
# Setup endianess at compile time to optimize.
include(TestBigEndian)
test_big_endian(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_PLATFORM_ENDIAN_BIG
)
else()
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_PLATFORM_ENDIAN_LITTLE
)
endif()
# Link required libraries.
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
SDL2
pthread
OpenGL::GLES2
${GL_LIB}
${EGL_LIB}
m
)
# Define platform-specific macros.
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_SDL2
DUSK_OPENGL
DUSK_OPENGL_ES
DUSK_LINUX
DUSK_DISPLAY_SIZE_DYNAMIC
DUSK_DISPLAY_WIDTH_DEFAULT=640
DUSK_DISPLAY_HEIGHT_DEFAULT=480
DUSK_DISPLAY_SCREEN_HEIGHT=240
DUSK_INPUT_KEYBOARD
DUSK_INPUT_POINTER
DUSK_INPUT_GAMEPAD
DUSK_TIME_DYNAMIC
)

41
cmake/targets/linux.cmake Normal file
View File

@@ -0,0 +1,41 @@
# Find link platform-specific libraries
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
# Setup endianess at compile time to optimize.
include(TestBigEndian)
test_big_endian(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_PLATFORM_ENDIAN_BIG
)
else()
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_PLATFORM_ENDIAN_LITTLE
)
endif()
# Link required libraries.
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
SDL2
pthread
OpenGL::GL
GL
m
)
# Define platform-specific macros.
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_SDL2
DUSK_OPENGL
# DUSK_OPENGL_LEGACY
DUSK_LINUX
DUSK_DISPLAY_SIZE_DYNAMIC
DUSK_DISPLAY_WIDTH_DEFAULT=640
DUSK_DISPLAY_HEIGHT_DEFAULT=480
DUSK_DISPLAY_SCREEN_HEIGHT=240
DUSK_INPUT_KEYBOARD
DUSK_INPUT_POINTER
DUSK_INPUT_GAMEPAD
DUSK_TIME_DYNAMIC
)

53
cmake/targets/psp.cmake Normal file
View File

@@ -0,0 +1,53 @@
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
${SDL2_LIBRARIES}
SDL2
pthread
OpenGL::GL
zip
bz2
z
mbedtls
mbedcrypto
lzma
m
pspdebug
pspdisplay
pspge
pspctrl
pspgu
pspaudio
pspaudiolib
psputility
pspvfpu
pspvram
psphprm
)
target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PRIVATE
${SDL2_INCLUDE_DIRS}
)
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_SDL2
DUSK_OPENGL
DUSK_PSP
DUSK_INPUT_GAMEPAD
DUSK_PLATFORM_ENDIAN_LITTLE
DUSK_OPENGL_LEGACY
DUSK_DISPLAY_WIDTH=480
DUSK_DISPLAY_HEIGHT=272
)
# Postbuild, create .pbp file for PSP.
create_pbp_file(
TARGET "${DUSK_BINARY_TARGET_NAME}"
ICON_PATH NULL
BACKGROUND_PATH NULL
PREVIEW_PATH NULL
TITLE "${DUSK_BINARY_TARGET_NAME}"
PSAR_PATH ${DUSK_ASSETS_ZIP}
VERSION 01.00
)

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