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
- Host: GitHub
- URL: https://github.com/shinyquagsire23/frem-c-template
- Owner: shinyquagsire23
- License: other
- Created: 2014-07-06T02:25:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-06T02:25:47.000Z (almost 11 years ago)
- Last Synced: 2025-01-23T14:45:14.951Z (5 months ago)
- Language: C
- Size: 113 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.