Exemplo n.º 1
0
static void _load_player(savefile_ptr file)
{
    int i;
    for (i = 0; i < _MAX_SLOTS; i++)
    {
        _spells[i].realm = REALM_NONE;
        _spells[i].spell = 0;
    }

    while (1)
    {
        i = savefile_read_u16b(file);
        if (i == 0xFFFF) break;
        assert(0 <= i && i < _MAX_SLOTS);
        _spells[i].realm = savefile_read_byte(file);
        _spells[i].spell = savefile_read_byte(file);
    }
}
Exemplo n.º 2
0
void msg_on_load(savefile_ptr file)
{
    int i;
    int count = savefile_read_s16b(file);

    for (i = 0; i < count; i++)
    {
        s32b turn = 0;
        s32b count = 0;
        byte color = TERM_WHITE;
        string_ptr msg = 0;

        msg = savefile_read_string(file);
        turn = savefile_read_s32b(file);
        count = savefile_read_s32b(file);
        color = savefile_read_byte(file);

        _cmsg_add_aux(color, string_buffer(msg), turn, count);
        string_free(msg);
    }
}