#29228 - ThUg4LiFe - Sun Nov 14, 2004 6:03 pm
is the 'curses' library for C programming a header file? and what is its actual content?
..or is there a way i can find out its content myself
#29230 - yaustar - Sun Nov 14, 2004 6:56 pm
I assume you are asking what goes in a C header file..
A header file in C will contain no code and no data. It usually consists of function prototypes
eg Code: |
extern void gotoEarth(int x, int y); |
defines
eg Code: |
#define EARTH_WEIGHT 30000000 |
macros
eg Code: |
#define EARTH_SPEED 4444*n |
Please note it has been a while since I have last coded so I am not 100% about the syntax.
edit: oops, when the OP said 'curses', I thought he meant swearing... my bad... sorry
_________________
[Blog] [Portfolio]
Last edited by yaustar on Tue Nov 16, 2004 1:03 am; edited 1 time in total
#29232 - ThUg4LiFe - Sun Nov 14, 2004 7:08 pm
well, im only asking because in the FAQ thread - after learning C it says to find the 'curses' library (possibly called 'pdcurses' or 'ncurses', something like that) and make more sophisticated text-based programs.. but i dont know where the curses library is or what is in it that can be of any use
#29233 - tepples - Sun Nov 14, 2004 7:38 pm
There is "pdcurses" on the MinGW download page. The binary distribution consists of a header file and a library that wraps the Win32 console API with a more standard curses style API.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#29237 - ThUg4LiFe - Sun Nov 14, 2004 8:41 pm
ive only been learning C programming recently and well i still have no idea about programming for windows, where are GBA games generally run? DOS or windows? im assuming windows, but as im not using windows at the moment then i guess 'pdcurses' is of no use yet.. i downloaded it anyway
surely 'pdcurses' would be of no significance though when the game is to be run on the GBA and not windows?
#29238 - tepples - Sun Nov 14, 2004 8:50 pm
GBA games are typically developed on Windows; they're run either on the GBA or on an emulator inside Windows.
My FAQ recommends the PDCurses library so that you can familiarize yourself with the character cell model, which is what Win32 console programs use and which is also what GBA background display modes 0 through 2 use. Point is to learn text mode in a familiar environment (Windows) so that you don't have to learn both the basic idea behind text mode and the complications of the GBA hardware at once. If you can make basic clones of Tetris, Pong, Breakout, and Pac-Man run in Win32 text mode through curses, you'll be able to "think in text mode" enough to make backgrounds for 2D console games without having to resort to the slower bitmap modes.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#29239 - ThUg4LiFe - Sun Nov 14, 2004 9:06 pm
i think i see what you mean.
i doubt the book im learning C from will not cover anything about programming codes for windows, and i will have to rely on the various online articles for making W32console programs
#29240 - keldon - Sun Nov 14, 2004 9:16 pm
Coding for windows is nothing difficult. Especially with all these easy to use libraries going around, but I don't think working with tile modes is that difficult to work with.
#29241 - ThUg4LiFe - Sun Nov 14, 2004 9:33 pm
the game i want to program will be a scrolling 2D platform game, i already have various ideas about programming and game-design techniques to make the most of limited rescources the GBA would provide, such as file space for imagery, and memory for saving/temporarily storing the various data.. i have no idea which "mode" would be used for this type of game.. and i "hope" to be able to use multiple layers which may scroll/move at different (a slower) speed if they are closer to the front.. and one extra layer to accompany the closest layer which would move slightly differently to the rest of the layers - i do not even though yet if this is possible for the GBA
once programming graphics comes into it there is a big void in my head lol the seriously in-depth programming ive ever done was for manipulating data etc and reading/writing data and the usual kind of programming features, text/character-based games, or writing a complex macro to use multiple built-in features of a program which may or may not have included graphics, to create my own program.. however, i had never used C to program anything before and had that amount of power available so i dont know how to use half of it (yet)! im almost half way through a 600 page book on programming for C i bought the other week and i feel i should be able to program with it a while before the end of this year
#29250 - allenu - Mon Nov 15, 2004 1:53 am
ThUg4LiFe wrote: |
is the 'curses' library for C programming a header file? and what is its actual content?
|
The curses library should be more than just the header file. You'll need the actual library (binary code) as well. I believe curses allows you to manipulate text in terminal windows, like you'd see on a unix-based system. I don't think you'll be able to use it to make a text-based game on the GBA.