Commit graph

84 commits

Author SHA1 Message Date
Lephenixnoir
c3d9b53758
fxsdk: forward errors during make 2021-01-31 19:06:21 +01:00
Lephenixnoir
0db7ae9e2b
cmake: detect compiler install path in a LANG-agnostic way 2021-01-30 23:01:28 +01:00
Lephenixnoir
8259e2dfc8
fxconv: add a generic name_regex parameter to simplify naming 2021-01-29 14:29:36 +01:00
Lephenixnoir
2596a53c6b
(irrelevant fixes) 2021-01-29 14:29:25 +01:00
Lephenixnoir
8eed69b7a0
fxsdk: do not build if CMake fails 2021-01-28 22:15:41 +01:00
Lephenixnoir
51e60fcf06
cmake: add a utility to find simple libraries 2021-01-28 22:15:41 +01:00
Lephenixnoir
74766f381b
fxsdk: enable missing options on new projects 2021-01-27 22:21:39 +01:00
Lephenixnoir
0902fdc904
cmake: provide a function to set up assets' language and dependencies 2021-01-27 20:32:34 +01:00
Lephenixnoir
4e1e3c86b4
avoid warnings when FXSDK_CMAKE_MODULE_PATH is unused 2021-01-27 15:26:43 +01:00
Lephenixnoir
70ff9ba6b8
fxsdk: define TARGET_FX9860G and TARGET_FXCG50 in Makefiles
The older FX9860G and FXCG50 are still supported for backwards
compatibility, but are deprecated.
2021-01-27 11:26:22 +01:00
Lephenixnoir
4a6bc4724d
fxsdk: expose CMake module folder for library installs
Adds a new CMake variable FXSDK_CMAKE_MODULE_PATH where libraries can
install CMake module files.

Also remove FindGint.cmake which is now in gint.
2021-01-27 08:46:57 +01:00
Lephenixnoir
f5085e693d
fxsdk: add DSP assemblers flags 2021-01-26 10:09:03 +01:00
Lephenixnoir
ad5d9bdb4c
fxsdk: update Makefile-based build system for fxconv
* Use [find] for sources since it's used for dependency files...
* Get fxconv parameters from fxconv-metadata.txt
* Approximate dependencies: every asset depends on every metadata file
* Update location of example image
2021-01-26 09:47:16 +01:00
Lephenixnoir
e8bbf63d95
update README 2021-01-25 22:53:22 +01:00
Lephenixnoir
47504ff179
fxconv: replace _encode_{word,long} with u16, u32 2021-01-25 19:12:46 +01:00
Lephenixnoir
53ea134c62
fxsdk: add options to fxsdk build 2021-01-25 10:40:55 +01:00
Lephenixnoir
1992aac4bd
cmake: define FXSDK_COMPILER_INSTALL for library installs 2021-01-23 15:02:42 +01:00
Lephenixnoir
fe36c99f98
cmake: reconfigure based on Makefile, not folder
This way [fxsdk build-*] will reconfigure if CMake fails the first time.
2021-01-22 16:12:06 +01:00
Lephenixnoir
e75c6aca59
fxsdk: do not force -m3 on fx to allow SH4 assembler 2021-01-22 16:10:40 +01:00
Lephenixnoir
985e86df77
cmake: add a helper module to retrieve version from Git tags 2021-01-22 14:42:05 +01:00
Lephenixnoir
6e24074688
remove the update command for Makefile build systems 2021-01-21 11:56:38 +01:00
Lephenixnoir
802ba12e5e
add GiteaPC support 2021-01-15 19:11:45 +01:00
Lephenixnoir
e2ba617405
fxsdk: command-line interface for fxSDK 2.3
* Add the CMake build system
* Use CMake as the default for new projects
* Change [fxsdk new] but continue supporting the previous signature
* Automatically configure in [fxsdk build-fx] and [fxsdk build-cg]
* Improve help screen
2021-01-14 11:07:06 +01:00
Lephenixnoir
d5759423db
fxsdk: helpers for CMake build systems 2021-01-14 11:07:06 +01:00
Lephenixnoir
7a43c1253d
fxg1a: always add a sensible internal name
The internal name is required to exist and have a certain format for the
add-in to appear in the main menu; this should be enforced at the lowest
possible level to avoid unpleasant surprises.

This change defaults the internal name to essentially @INTERNAL, where
the letters of INTERNAL are the upper-case variables of every letter
found in the standard name (up to 7).
2021-01-14 11:07:01 +01:00
Lephenixnoir
94e1dd4da9
change install to include fxSDK CMake files 2021-01-12 19:01:19 +01:00
Lephenixnoir
ee7c5d63ca
(small cleanup) 2021-01-12 18:53:32 +01:00
Lephenixnoir
431633612f
rewrite configure script 2021-01-11 22:23:00 +01:00
Lephenixnoir
7a4e5cde3b
fxsdk: move default project.cfg out of fxsdk.sh 2021-01-11 21:49:14 +01:00
Lephenixnoir
c9b1db8221
fxsdk: remove the WIP command-line interface
The fxSDK will no longer specify the final values for these parameters,
leaving them to the user in CMakeLists.txt or project.cfg, as reasonable
defaults are good enough.
2021-01-11 21:29:04 +01:00
Lephenixnoir
42f2b5c175
fxconv: support metadata discovery in fxconv-metadata.txt
This change adds a new way for fxconv to discover metadata for file
conversions. This complements the existing mechanism of passing
parameters on the command-line.

The new mechanism activates when fxconv is called without a type
argument. Type information and metadata are searched in an
fxconv-metadata.txt file in the same folder as the resource. The
metadata file lists parameters, with some additional flexibility enabled
by the use of wildcards.

This way of declaring will replace command-line argument passing, which
currently read parameters from the unreadable and not-so-maitainable
project.cfg file. Both the GNU make and CMake build systems should use
it in the future. The current way is still supported only for older
projects and one-shot conversions outside of projects.
2021-01-11 19:21:04 +01:00
Lephenixnoir
0d6a7728a1
fix return code for build-* and -s option
No idea how that slipped in there, damn.
2021-01-07 11:50:01 +01:00
Lephenixnoir
fefff0637a
add __pycache__ and .vscode to the default .gitignore 2021-01-04 13:45:56 +01:00
Lephenixnoir
203572b2af
fxsdk: add a sensible .gitignore when creating projects 2020-12-30 20:58:37 +01:00
Lephenixnoir
f461c08a17
fxconv: introduce an ObjectData interface to avoid assembly
ObjectData is a stream-like object that accepts bytes, bytearrays,
references to external variables and references to other bundled data to
create structures with pointers without having to write assembly.

Internally ObjectData unfolds into static data and an assembly
instruction. Existing assembly support remains fully compatible.

* Added an ObjectData interface to ease reference generation
* Ported topti to ObjectData (instead of assembly)
* Ported libimg_fx and libimg_cg to ObjectData (idem)
2020-12-22 14:51:43 +01:00
Lephenixnoir
f11c70aac4
fxsdk: change INCLUDE flags to support folders inside GCC
Useful for OpenLibm as it is installed inside an [openlibm] folder but
needs to be included directly as it uses #include without the openlibm/
part.
2020-10-24 18:54:16 +02:00
Lephenixnoir
ee9c459c69
fxconv: add custom conversions
Custom conversions can be used by:
* Providing a converters.py in the main directory with a convert()
  function
* Specifying --custom on the fxconv command-line or using a subfolder or
  assets-{fx,cg} unused by standard fxconv
2020-10-23 13:05:50 +02:00
Lephenixnoir
e3af6a5d4b
fxconv: add character spacing in topti fonts
Adds a new parameter "char-spacing" (default: 1) to change character
spacing for fonts rendered with topti.
2020-10-05 16:12:34 +02:00
Lephenixnoir
74b0bfaba1
fxsdk: don't use basename -s for busybox compatibility 2020-09-22 15:36:28 +02:00
Lephenixnoir
cf12d5cfd1
fxsdk: disable warning about missing field initializers 2020-08-14 18:48:58 +02:00
Lephenixnoir
66d88bef7a
fxconv: better support for indexed images
Indexed images don't have an alpha channel, so the detection of
transparent pixels in fxconv failed. This change forces a conversion of
indexed images to RGBA to properly handle this.
2020-07-16 15:42:23 +02:00
Lephenixnoir
84f77c3136
fxconv: support Unicode fonts
This commit adds the Unicode input feature where fonts are defined by a
set of block files under a common directory.
2020-07-14 15:29:41 +02:00
Lephenixnoir
77c277721f
fxconv: support Unicode in topti fonts (WIP)
This commit changes the output structure of topti to a format that
supports arbitrary Unicode blocks, but still only accepts the fixed set
of charsets that was defined before.
2020-07-14 12:25:39 +02:00
Lephenixnoir
bd49e9506e
fxconv: fix temporary files not being removed 2020-07-14 12:20:50 +02:00
Lephenixnoir
66e2f8429c
fxsdk: update starter's main.c for changes in dtext() 2020-07-14 12:20:49 +02:00
Lephenixnoir
822b5107e5
fxconv: expose Area and Grid in the API 2020-07-14 12:20:49 +02:00
Lephenixnoir
f11f6929b4 Merge pull request 'fxconv API accepts PIL.Image.Image' (#4) from Darks/fxsdk:master into master 2020-05-30 15:35:13 +02:00
Darks
b80f2a117a
fxconv API accepts PIL.Image.Image 2020-05-30 15:27:58 +02:00
Lephenixnoir
ce78d4814c
fxconv: add support for script mode (-s) 2020-05-30 12:17:06 +02:00
Lephenixnoir
c9dd9fad18
fxconv: add support for libimg images on fx-9860G 2020-03-15 12:11:32 +01:00