0 Members and 1 Guest are viewing this topic.
//Make FileNSPIRE_HARDWARE ?= NON_CASAS = arm-none-eabi-asASFLAGS = -mcpu=arm7tdmiGCC = arm-none-eabi-gccGCCFLAGS = -mcpu=arm7tdmi -Os -Wall -W -fpic -fno-merge-constantsLD = arm-none-eabi-ldLDFLAGS = OBJCOPY = arm-none-eabi-objcopyHEADERSDIR=../headersSYSTEMDIR=../systemTOOLSDIR=../../toolsOBJ = main.o syscalls.o utils.o vector.o particle.o particle_system.o gravity_particles.oall: demo.c.o: $(GCC) $(GCCFLAGS) -c -I$(HEADERSDIR) -D $(NSPIRE_HARDWARE) $<demo: $(OBJ) @rm -rf [email protected] $(GCC) $(GCCFLAGS) $(LDFLAGS) -T $(SYSTEMDIR)/ldscript $(SYSTEMDIR)/crt0.s $^ -o [email protected] $(OBJCOPY) -O binary [email protected] [email protected] mkdir -p ../../res/$(NSPIRE_HARDWARE) $(TOOLSDIR)/MakeTNS/MakeTNS [email protected] ../../res/$(NSPIRE_HARDWARE)/[email protected] rm -f [email protected] [email protected].PHONY: cleanclean: @rm -rf *.bin *.elf *.o
#include <os.h>#include "utils.h"#include "common.h"asm(".string \"PRG\"\n");int main(void) {unsigned char marker[]={0x18,0x3c,0x7e,0xff};int c,key,lengthchange,ycord,leftx,length;unsigned long int score;float spritepos;clearScreen();showSimpleDialogBox("TI-Nspire Tunnel","TI-Nspire Tunnel\n\nUse the Left and Right keys to control your ship!");clearScreen();score=0;lengthchange=1;spritepos=77;score=0;leftx=45;length=81;c=0;for(ycord=0;ycord<SCREEN_HEIGHT;ycord++) { c=rand(2); if (c==0) { leftx--; } else if (c==1) { leftx++; }}ycord=0;while(!isKeyPressed(KEY_NSPIRE_ESC));return 0;}