I'm somewhat new to C, and I'm trying to port Undertale to the TI-84 CE. I'm using the CE C Toolchain. I'm having two main issues, but here's some info. I have 3 main files so far, main.c, vars.h, and func.c. The names are self explainatory.
First problem: I want to make variables in the vars.h file, include them in func.c, then include func.c in main.c. I don't know what I'm doing wrong, it keeps throwing errors.
Second problem: I don't really know how to put this into words, so here's an example. I have a variable called playerX in vars.h. If I include vars.h in func.c, it can be altered by a function that detects left/right input and adds/subtracts 1 from it accordingly. Then, the function would be called in main.c. This would then be used in func.c to display the character on screen. How would I get this to work?
I am very sorry if the grammar is hard to follow, I'm not very good with English. Thanks in advance! Here is the github link https://github.com/slimefolf/calctale.
First problem: I want to make variables in the vars.h file, include them in func.c, then include func.c in main.c. I don't know what I'm doing wrong, it keeps throwing errors.
Second problem: I don't really know how to put this into words, so here's an example. I have a variable called playerX in vars.h. If I include vars.h in func.c, it can be altered by a function that detects left/right input and adds/subtracts 1 from it accordingly. Then, the function would be called in main.c. This would then be used in func.c to display the character on screen. How would I get this to work?
I am very sorry if the grammar is hard to follow, I'm not very good with English. Thanks in advance! Here is the github link https://github.com/slimefolf/calctale.