Skip to content

Instantly share code, notes, and snippets.

View zephray's full-sized avatar
🐟
Fish-touching

Wenting Zhang zephray

🐟
Fish-touching
View GitHub Profile
@zephray
zephray / ebmviewer.c
Created March 22, 2017 03:34
ebm image viewer
#include <SDL.h>
#include <stdio.h>
#define RGB(r, g, b) (((r)<<16)|((g)<<8)|(b))
void displayImage(SDL_Surface *surface, uint8_t *image) {
uint32_t *pixels = (uint32_t *)surface->pixels;
uint32_t pixel;
uint16_t raw;
uint8_t y;