There's no way on earth I'm doing 20 * 80 of char file[11]; no ........ing way. Reason is that the array exists for the potential to add a filename...there may be only one tile on the board which...
Type: Posts; User: sufthingol
There's no way on earth I'm doing 20 * 80 of char file[11]; no ........ing way. Reason is that the array exists for the potential to add a filename...there may be only one tile on the board which...
char file[11];
That uses 24 bytes. I am not happy about that when I will be having it in a struct array 20 * 80.
How do I create a dynamic array that starts of at a minimal size, and then...
Eventually in my roguelike game I plan to have have the game system update the underground board at the same time as the above ground board, so that monsters can come out of a passage from the...
struct x_mttype { struct {
unsigned int type : 5;
unsigned int locale : 1;
...
Look, I don't think you can access a variable in main from a function called in main; you're gonna have to explain that to me, it's just not makin' any sense.
Explain how passing works, if thou dost please.
You can't really do that in roguelikes. Would not I have to send a pointer to the object, to the function, though?
i still get errors when i add the brackets
#include <curses.h>
int s_palettep;
int s_usflag;
int s_cposr;
int s_cposc;
struct x_mttype { struct { unsigned int type : 5;
unsigned int obs ...
create a continuous loop that does the stuff you want and then reads the keypress. there's a function in curses that reads the key without pausing, i believe.
struct test
{
unsigned int type : 6;
};
how much memory will that use?
struct x_mttype { struct { unsigned int type : 6;
unsigned int locale : 1;
unsigned int obs : 1;
...
#include <curses.h>
int main(int argc, char *argv[])
{
initscr();
start_color();
init_pair(1, COLOR_RED, COLOR_BLACK);
addch(65 | COLOR_PAIR(1));
Windows ME -- bloodshed Dev c++
How may I get my program to recognise the arrow keys? I can get ESC key recognised with 27, but there is no ascii number for the arrow keys as I am aware. But there's surely another way to do it.
#include <curses.h>
int main(int argc, char *argv[])
{
initscr();
raw();
int a = getch();
printf(%d, a);
can I access a particular element of a list directly, or must I go through the whole list first?
I have found out how to do it.
int a = 0;
do
{
addch(a | A_ALTCHARSET);refresh();
++a;
}
while (a < 256);getch();
Apparently there is a video mode that let's you display those glyphs directly. A programmer known as Tim Sweeny did it in his dos program ZZT. I wish I knew how he did it. He was using Pascal btw.
Pianorain: no need to apologise.
Ok...I am using DevvC++ bloodshed and pdcurses from http://gnuwin32.sourceforge.net/packages/pdcurses.htm
1. I am using Win32, not linux, so please if anyone knows about windows, help me
2. I very much *do* want to print the characters that I *know* are able to be printed. May I have some help with...
437 codepage
http://en.wikipedia.org/wiki/Codepage_437
stop holding back info
Excuse me? How dare you call me arrogant?
I disagree. I think that with a CERTAIN method (that I don't know) ALL of the chars are printable. I've seen them all printed in the ZZT dos program. In...
Yes they are *blinks*
Try ZZT for instance; an oop based programming gcs
So, anone else (not using linux, who knows about the ansi system)?