Compare commits

...

2 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 2125b27a82
README.md: Update according to ESP32 port 2024-01-30 00:52:40 +01:00
Xavier Del Campo Romero 601e4a2685
gfx: #undef quad
Surprisingly, esp-idf #includes files such as sys/types.h when pulling
other standard header files, even when not explicitly defined. While
this is not a serious issue, incredibly their sys/types.h implementation
uses "#define quad", therefore breaking user code such as anything
related to "struct quad".
2024-01-30 00:45:27 +01:00
4 changed files with 31 additions and 2 deletions

View File

@ -112,7 +112,7 @@ building `enet`.
A stripped version of the executable, as well as game assets, will be
located in `build/cdimg`.
#### Dependencies
##### Dependencies
A cross-compiled `i386-mingw32` version of all required dependencies
is needed before building `jancity`.
@ -126,6 +126,31 @@ of this writing, so it is provisionally provided on
Read [the documentation](doc/BUILD-win9x.md) for further reference on
how to build the dependencies from source.
#### Espressif ESP32
```sh
ENETDIR=<enet-prefix> \
cmake -B build -DCMAKE_TOOLCHAIN_FILE=cmake/win9x-toolchain.cmake
cmake --build build
```
Where:
- `ENETDIR` is the path to the cross-compiled version for `enet`.
##### Dependencies
[`esp-idf`](https://github.com/espressif/esp-idf) is required to build this
or any ESP32-related project. The `release/v5.1` branch is assumed here.
As pointed out by
[their documentation](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/api-guides/build-system.html?highlight=idf_path#initialization),
remember to assign the `IDF_PATH` environment variable to the directory
where `esp-idf` is located.
`esp-idf` requires to build `enet` using a custom CMake wrapper on top of it.
For this project, this has been provided by the
[`enet-esp32`](https://gitea.privatedns.org/xavi/enet-esp32) repository.
## License
Unless stated otherwise, **jancity** follows the license described by the

View File

@ -3,6 +3,8 @@
#include <stdbool.h>
#undef quad
#ifdef __cplusplus
extern "C"
{

View File

@ -4,6 +4,8 @@
#include <stddef.h>
#include <stdlib.h>
#undef quad
int quad_from_sprite(const struct sprite *const s, struct quad *const q)
{
return -1;

View File

@ -1,9 +1,9 @@
#ifndef GFX_H
#define GFX_H
#include <gfx/port.h>
#include <stdbool.h>
#include <stdio.h>
#include <gfx/port.h>
#ifdef __cplusplus
extern "C"