lowercasify, grammar corrections, and minor license fixes.

This commit is contained in:
Alex Gentilucci 2020-05-27 14:57:03 -06:00
parent dfc71fd6d3
commit c3b7f0d7a0
Signed by: nytpu
GPG Key ID: 144ADD49F173F5CE
6 changed files with 50 additions and 49 deletions

View File

@ -1,3 +1,4 @@
This project is dual-licensed under the Unlicense and MIT licenses.
This project is dual-licensed under the Unlicense and MIT licenses.
You may use this code under the terms of either license.
See UNLICENSE for a copy of the Unlicense text, and LICENSE_MIT for a copy of the MIT License text.

View File

@ -1,4 +1,4 @@
# Identical to the DevKitARM template makefile, but uses tonclib instead of libgba
# identical to the devkitarm template makefile, but uses tonclib instead of libgba
#---------------------------------------------------------------------------------
.SUFFIXES:
@ -8,7 +8,7 @@ ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
# Use this abomination because the makefile re-calls make using -f, so I have
# use this abomination because the makefile re-calls make using -f, so i have
# to get makefile directory, not CURDIR
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/gba_rules.mak

View File

@ -1,8 +1,10 @@
# *untitled* — a game boy advance game
currently under development, with very few current updates here. see my
[blog][1] for updates (mirrored on [gemini][2] and [gopher][3], with all
game-related posts under the heading `making-a-gba-game`).
[blog][1] for updates (mirrored on gemini
(<gemini://tilde.team/~nytpu/blog/>) and gopher
(<gopher://tilde.team:70/1/~nytpu/blog>), with all game-related posts under the
heading `making-a-gba-game`).
will update readme when more progress is made.
@ -11,12 +13,10 @@ will update readme when more progress is made.
in-depth and useful [tonc tutorial][stt-3]. without these tools and
references, i would have been totally unable to make anything like this.
* [devkitpro][stt-4] for their amazing [devkitarm][stt-5] toolchain, complete
with an custom `libc` and `gcc`, without which i wouldn't have even
with a custom `libc` and `gcc`, without which i wouldn't have even
thought of attempting anything with the gba.
[1]: https://tilde.team/~nytpu/blog/tag_gbagame.html
[2]: gemini://tilde.team/~nytpu/blog/
[3]: gopher://tilde.team:70/1/~nytpu/blog
[stt-1]: http://www.coranac.com/
[stt-2]: http://www.coranac.com/projects/tonc/

View File

@ -1,4 +1,4 @@
# Adopted from $DEVKTIARM/gba_rules but uses libtonc instead of libgba
# adopted from $DEVKTIARM/gba_rules but uses libtonc instead of libgba
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)

39
src/gbagame.c Normal file
View File

@ -0,0 +1,39 @@
// uncomment to use production headers
//#define PRODUCTION
#ifndef PRODUCTION
// include all tonc functions, better to only include files you're using
#include <tonc.h>
#else
// trim these down to only what you're using. if you use all of these,
// just use tonc.h
#include <tonc_types.h> // define useful data types and macros (almost required)
#include <tonc_memdef.h> // register/memory locations & register macros
#include <tonc_bios.h> // bios control flags & registers (includes compression)
#include <tonc_core.h> // many useful functions
#include <tonc_input.h> // key checking and polling functions
#include <tonc_irq.h> // used for managing interrupts
#include <tonc_math.h> // math macros and luts
#include <tonc_oam.h> // manage oam attributes (including affines)
#include <tonc_tte.h> // tonc text engine
#include <tonc_video.h> // macros, functions, & defines for various video modes
#include <tonc_surface.h> // create and manage surfaces
#include <tonc_nocash.h> // nocash debugging functions
#endif // PRODUCTION
int main(void) {
// wait for vsync (necessary for this? probably not, but good practice)
vid_vsync();
// bitmap mode 3, enable bg2 (bitmap layer)
REG_DISPCNT = DCNT_MODE3 | DCNT_BG2;
// plot rgb points
m3_plot(119, 80, RGB15(31, 0, 0)); // Red
m3_plot(120, 80, RGB15(0, 31, 0)); // Green
m3_plot(121, 80, RGB15(0, 0, 31)); // Blue
while (1); // loop so you don't get nasal demons
return 0;

View File

@ -1,39 +0,0 @@
// Uncomment to use production headers
//#define PRODUCTION
#ifndef PRODUCTION
// Include all tonc functions, better to only include files you're using
#include <tonc.h>
#else
// Trim these down to only what you're using. If you use all of these,
// just use tonc.h
#include <tonc_types.h> // Define useful data types and macros (almost required)
#include <tonc_memdef.h> // Register/memory locations & register macros
#include <tonc_bios.h> // BIOS control flags & registers (includes compression)
#include <tonc_core.h> // Many useful functions
#include <tonc_input.h> // Key checking and polling functions
#include <tonc_irq.h> // Used for managing interrupts
#include <tonc_math.h> // Math macros and LUTs
#include <tonc_oam.h> // Manage OAM attributes (including affines)
#include <tonc_tte.h> // Tonc Text Engine
#include <tonc_video.h> // Macros, functions, & defines for various video modes
#include <tonc_surface.h> // Create and manage surfaces
#include <tonc_nocash.h> // NoCash Debugging functions
#endif // PRODUCTION
int main(void) {
// Wait for vsync (necessary for this? probably not, but good practice)
vid_vsync();
// Bitmap mode 3, enable BG2 (bitmap layer)
REG_DISPCNT = DCNT_MODE3 | DCNT_BG2;
// Plot RGB points
m3_plot(119, 80, RGB15(31, 0, 0)); // Red
m3_plot(120, 80, RGB15(0, 31, 0)); // Green
m3_plot(121, 80, RGB15(0, 0, 31)); // Blue
while (1); // Loop so you don't get nasal demons
return 0;
}