common: fix gamedef_hl_t::get_default_palette()
This commit is contained in:
parent
e6e232d43e
commit
4d1901534f
|
|
@ -407,7 +407,7 @@ struct gamedef_hl_t : public gamedef_q1_like_t<GAME_HALF_LIFE>
|
||||||
|
|
||||||
const std::vector<qvec3b> &get_default_palette() const
|
const std::vector<qvec3b> &get_default_palette() const
|
||||||
{
|
{
|
||||||
static constexpr std::initializer_list<qvec3b> palette{};
|
static const std::vector<qvec3b> palette;
|
||||||
return palette;
|
return palette;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ namespace img
|
||||||
LogPrint("INFO: Falling back to built-in palette.\n");
|
LogPrint("INFO: Falling back to built-in palette.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
auto pal = game->get_default_palette();
|
auto &pal = game->get_default_palette();
|
||||||
|
|
||||||
std::copy(pal.begin(), pal.end(), std::back_inserter(palette));
|
std::copy(pal.begin(), pal.end(), std::back_inserter(palette));
|
||||||
}
|
}
|
||||||
|
|
@ -461,4 +461,4 @@ breakOut:;
|
||||||
LogPrint("WARNING: failed to load or convert textures.\n");
|
LogPrint("WARNING: failed to load or convert textures.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue