////////////////////////////////////////////////////////////////////
//
// Theseus Engine V1.0
//
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
#include <litec.h>
//ROOM.c
typedef struct
{
int roomNumber;
BMAP* image;
STRING* name;
} ROOM;
/*
//a function to visualize an room on a panel
void room_visualize(DUNGEON* dungeon, PANEL* panel)
{
panel->bmap = dungeon->image;
}
*/
//a function to visualize an item on a panel
void item_visualize( Inventory* inventory, PANEL* panel ) {
panel->bmap = inventory->image;
}
//ROOM creation function, returns pointer to the newly created ROOM
ROOM* room_create( int number, String* imageName )
{
ROOM* room = malloc( sizeof( ROOM ) );
//always fill ALL the room's properties immediately after!
room->roomNumber = number;
room->image = bmap_create( imageName );
room->name = imageName;
return room; //return the new room back
}
//function to remove an room
void room_remove( ROOM* room )
{
ptr_remove( room->image ); //remove bitmap first
ptr_remove( room->name ); //remove name
free( room ); //THEN remove room
}