An open API service indexing awesome lists of open source software.

https://github.com/shinyquagsire23/frem-c-template

C Template code for callasm in Fire Red and Emerald
https://github.com/shinyquagsire23/frem-c-template

Last synced: 3 months ago
JSON representation

C Template code for callasm in Fire Red and Emerald

Awesome Lists containing this project

README

        

FREM-C-Template
--------------

A simple C template for executing C code in Fire Red and Emerald via callasm or other methods, shipping with a custom auto-inserting makefile. To compile, execute **make -B fname=<.gba file> offset=**. This uses the split useful.h system from the Ruins of Alph port, so to maintain proper cross-platform support changes in useful-bpre.h must be echoed to useful-bpee.h and vice versa.

There are two main C files used in this project, main.c and main-minimal.c. The difference is the usage between them. main.c features a callback hooking function which will allow you to exit and return from the overworld into your custom code. This is useful for things like cutscenes where you will want to have complete control over the GBA hardware. The second is main-minimal.c. This one features the proper #includes, and a main loop. Nothing else. This is useful for routines which do stuff behind the scenes which may or may not be too complicated to write in ASM. Both files are designed to be used with callasm, although they can work in other places if done properly.