// Copyright 2023 xensik. All rights reserved. // // Use of this source code is governed by a GNU GPLv3 license // that can be found in the LICENSE file. #include "s1_xb.hpp" namespace xsk::gsc::s1_xb { extern std::array, code_count> const code_list; extern std::array, func_count> const func_list; extern std::array, meth_count> const meth_list; extern std::array, token_count> const token_list; context::context() : gsc::context(props::waitframe, engine::s1, endian::big, system::xb2, max_string_id) { code_map_.reserve(code_list.size()); code_map_rev_.reserve(code_list.size()); func_map_.reserve(func_list.size()); func_map_rev_.reserve(func_list.size()); meth_map_.reserve(meth_list.size()); meth_map_rev_.reserve(meth_list.size()); token_map_.reserve(token_list.size()); token_map_rev_.reserve(token_list.size()); for (auto const& entry : code_list) { code_map_.insert({ entry.first, entry.second }); code_map_rev_.insert({ entry.second, entry.first }); } for (auto const& entry : func_list) { func_map_.insert({ entry.first, entry.second }); func_map_rev_.insert({ entry.second, entry.first }); } for (auto const& entry : meth_list) { meth_map_.insert({ entry.first, entry.second }); meth_map_rev_.insert({ entry.second, entry.first }); } for (auto const& entry : token_list) { token_map_.insert({ entry.first, entry.second }); token_map_rev_.insert({ entry.second, entry.first }); } } } // namespace xsk::gsc::s1_xb