[HELP] Single questions & Help Thread [n00b] (66)

41 Name: #!/usr/bin/anonymous : 2008-08-10 00:57 ID:cA4bH4MK

>>40

unsigned char map[100][100];

This is your map.

#define HAS_MONSTER 1
#define HAS_ITEM 2
#define HAS_OBJECT 4
#define HAS_STAIRS 8

These are your flags.

struct thing { struct thing *next; /* other fields */ };
struct thing *monsters, *items, *objects, *stairs;

These are your linked lists which actually contain interesting things.

Drawing the map is easy; simply scan the map[][] array and then fill in the blanks.

Pathfinding is easy; only map[][] needs to be consulted.

This thread has been closed. You cannot post in this thread any longer.