Skip to content

Instantly share code, notes, and snippets.

View jsmolina's full-sized avatar

Jordi Sesmero jsmolina

  • Barcelona
View GitHub Profile
@jsmolina
jsmolina / docker-compose.yml
Created August 18, 2024 16:22
Allegro 4: using allegro tools from any OS by running them from docker
version: "3"
services:
allegro:
image: docker.io/amarillion/alleg4-buildenv
volumes:
- ./static:/data
# allegro tools in version 4 fail for no reason even on DOS.
@jsmolina
jsmolina / dat.c
Created August 22, 2024 16:50
Simplest ever static files compacter for games onto one datafile. Use dat.c as a commandline utility to generate data.dat file, use dat_manager to uncompress on runtime.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
// Code based on mills32 Little-Game-Engine-for-VGA-EGA
struct dirent *direntry;
@jsmolina
jsmolina / dat_compress.c
Created December 16, 2024 19:12
dat file manager for any size
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_FILENAME_LEN 16
// Estructura para almacenar la cabecera de cada archivo (nombre y tamaño)
typedef struct {
char filename[MAX_FILENAME_LEN];
long long filesize;
################################################################################
## __ __ _ ___ _____ _ __ _ _ _ ##
## | \/ (_) __|_ _|__ _ _| |/ / _| \| | (_)___ ##
## | |\/| | \__ \ | |/ -_) '_| ' < || | .` |_| / _ \ ##
## |_| |_|_|___/ |_|\___|_| |_|\_\_,_|_|\_(_)_\___/ MiSTerKuN.io ##
################################################################################
## Project : MiSTer FPGA
## Module : Native ARMv7 C/C++ Toolchain for MiSTer HPS
## Purpose : Provide easy toolchain to build applications, kernel, etc.
## Author : Marcus Andrade <Boogermann>