示例#1
0
internal void
game_init()
{
    player = object_init(25, 23,
                         '@', 0xffffffff, 0x000000ff);
    game_object *npc = object_init((GRID_COL_COUNT / 2) - 3, GRID_ROW_COUNT / 2,
                         '@', 0xff0000ff, 0x000000ff);

    object_list_append(&gameObjects, player);
    object_list_append(&gameObjects, npc);

    make_map();
}
示例#2
0
static CmdExecuteValue_t
create_command_execute(Command_t *parent)
{
   CreateCommand_t *command = (CreateCommand_t*) parent;
   command->changed = object_list_get_changed(command->list);
   object_list_append(command->list, object_ref(command->obj));
   return CMD_APPEND;
}