https://github.com/peterhellberg/zig-dos-like-rotozoom
Zig port of Mattias Gustavssons port of rotozoom code by seancode
https://github.com/peterhellberg/zig-dos-like-rotozoom
gamedev zig
Last synced: 4 months ago
JSON representation
Zig port of Mattias Gustavssons port of rotozoom code by seancode
- Host: GitHub
- URL: https://github.com/peterhellberg/zig-dos-like-rotozoom
- Owner: peterhellberg
- License: other
- Created: 2024-09-07T01:03:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-07T09:57:39.000Z (over 1 year ago)
- Last Synced: 2025-02-01T18:14:58.206Z (about 1 year ago)
- Topics: gamedev, zig
- Language: Zig
- Homepage:
- Size: 1.64 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-dos-like-rotozoom :floppy_disk:
Getting the [rotozoom](https://github.com/mattiasgustavsson/dos-like/blob/main/source/rotozoom.c)
example from [dos-like](https://github.com/mattiasgustavsson/dos-like) to build in
[Zig](https://ziglang.org/) :zap:
> [!Note]
> `zig translate-c -lc rotozoom.c > rotozoom.zig` was used as a starting point of the port.
>
> Most of the time was spent figuring out how to setup the build :joy:
## Rotozoom effect

This image is used in the rotozoom effect.
## Requirements
A fairly recent version of [Zig master](https://ziglang.org/download/#release-master)
(which would be `0.14.0-dev.1472` when this was written)
- `SDL2`
- `GLEW`
- `pthread`
## Compilation
You should hopefully be able to compile the binary by calling `zig build`
> [!Note]
> As a convenience you can compile and run the binary via `zig build run`
> (or `zig build run -- -w` if you want to start in windowed mode)
## Links
- https://mattiasgustavsson.itch.io/dos-like
- https://ziglang.org/
- https://seancode.com/demofx/