Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - battlestar

Pages: [1]
TI-Nspire / Battlestar for Nspire
« on: June 22, 2013, 02:43:56 am »
Hello! I am starting to port a text-based game called battlestar to the Nspire. It is included in the BSD-games package, and I plan on porting many others, such as phantasia and adventure.

I fixed backspace.

I am having trouble with savefiles, but I think I have almost fixed them.
Also, The screen is kind of buggy (at least on my non-CX), so I am trying to figure that out.

Ndless / Ndless v3.1 Read text file
« on: January 21, 2013, 07:36:26 pm »
I am currently working on a port of battlestar(from bsd-games package) to the nspire. To get comfortable with programming, I am learning how to do the basics. I have mastered basic input and output, but I am clueless as how to read a file, say "file.tns". It is all text.

Right now my code is something like this: (not exactly, but all the code pertaining to the file reading)

Code: [Select]
FILE *test;

test = fopen("file.tns", "rt");
char line[80];
while(fgets(line, 80, test) != NULL) {
   displn(line,1); //Display string with newline

I have "file.tns" in the same directory as my program on the nspire.

The nspire displays gibberish.
Any suggestions? I am using the latest version of ndless.

Pages: [1]