![]() |
N64 QOI Encoder Demo 1.0.1
Encoder for N64 that saves it to SD card
|
#include <stdio.h>#include <stdlib.h>#include <libdragon.h>#include "config.h"#include "qoi_enc_n64.h"#include "colorconv.h"Go to the source code of this file.
Macros | |
| #define | ENC_BUFFER_SIZE 4096 |
| Small buffer size for encoder because of memory constrant of 4MB for N64 without the 4MB Expansion Pak. | |
Enumerations | |
| enum | whichScreenshotType { SCREENSHOT_NEVER_TAKEN , SCREENSHOT_TYPE_NULL , SCREENSHOT_TYPE_RAW , SCREENSHOT_TYPE_QOI , SCREENSHOT_FRAME_CAPTURED , SCREENSHOT_NO_SD_CARD } |
| Checks what type of screenshot was taken to perform different actions based on the type of screenshot taken, such as displaying different information on the screen or saving the screenshot in a different way. More... | |
Functions | |
| bool | save_screenshot (surface_t *disp, const char *filename, uint32_t *bytesWritten) |
| Saves the screenshot to the SD card if it somehow exists. | |
| bool | save_screenshot_null (surface_t *disp, uint32_t *bytesWritten) |
| Saves the screenshot to null, which is used for testing the performance of the encoder without the bottleneck of writing to the SD card. | |
| bool | save_screenshot_raw (surface_t *disp, const char *filename, uint32_t *bytesWritten) |
| Saves the raw screenshot to the SD card if it somehow exists. | |
| int | main (void) |
| Entry point for this N64 ROM. | |
Variables | |
| enum whichScreenshotType | whichScreenshotType |
| #define ENC_BUFFER_SIZE 4096 |
| enum whichScreenshotType |
Checks what type of screenshot was taken to perform different actions based on the type of screenshot taken, such as displaying different information on the screen or saving the screenshot in a different way.
| int main | ( | void | ) |
| bool save_screenshot | ( | surface_t * | disp, |
| const char * | filename, | ||
| uint32_t * | bytesWritten ) |
Saves the screenshot to the SD card if it somehow exists.
| disp | The surface to capture, which is the framebuffer of the N64 display |
| filename | The name of the file to save the screenshot to |
| bytesWritten | The number of bytes written to the file |
| bool save_screenshot_null | ( | surface_t * | disp, |
| uint32_t * | bytesWritten ) |
Saves the screenshot to null, which is used for testing the performance of the encoder without the bottleneck of writing to the SD card.
| disp | The surface to capture, which is the framebuffer of the N64 display |
| bytesWritten | The number of bytes written to the file |
| bool save_screenshot_raw | ( | surface_t * | disp, |
| const char * | filename, | ||
| uint32_t * | bytesWritten ) |
Saves the raw screenshot to the SD card if it somehow exists.
| disp | The surface to capture, which is the framebuffer of the N64 display |
| filename | The name of the file to save the screenshot to |
| bytesWritten | The number of bytes written to the file |