remove gameview tool icon and optimize flightbounds render
This commit is contained in:
@@ -112,6 +112,8 @@ public:
|
||||
|
||||
bool isTile(int pX, int pZ);
|
||||
|
||||
bool hasFlightBounds() const { return mFlags & 1; };
|
||||
|
||||
async_priority loading_priority() const override
|
||||
{
|
||||
return async_priority::high;
|
||||
@@ -185,9 +187,9 @@ private:
|
||||
glm::vec3 _center;
|
||||
float _cam_dist;
|
||||
|
||||
// MFBO:
|
||||
glm::vec3 mMinimumValues[3 * 3];
|
||||
glm::vec3 mMaximumValues[3 * 3];
|
||||
// MFBO: requires mFlags & 1
|
||||
glm::vec3 mMinimumValues[3 * 3] = {};
|
||||
glm::vec3 mMaximumValues[3 * 3] = {};
|
||||
|
||||
unsigned _chunk_update_flags;
|
||||
|
||||
|
||||
@@ -2249,8 +2249,6 @@ void MapView::setupViewMenu()
|
||||
//! \todo space+h in object mode
|
||||
ADD_TOGGLE_NS (view_menu, "Hidden models", _draw_hidden_models);
|
||||
|
||||
ADD_TOGGLE_NS(view_menu, "Game Mode", _game_mode_camera);
|
||||
|
||||
auto debug_menu (view_menu->addMenu ("Debug"));
|
||||
ADD_TOGGLE_NS (debug_menu, "Occlusion boxes", _draw_occlusion_boxes);
|
||||
|
||||
@@ -2260,6 +2258,8 @@ void MapView::setupViewMenu()
|
||||
|
||||
ADD_TOGGLE (view_menu, "Show Node Editor", "Shift+N", _show_node_editor);
|
||||
|
||||
ADD_TOGGLE_NS(view_menu, "Game View", _game_mode_camera);
|
||||
|
||||
view_menu->addSeparator();
|
||||
view_menu->addAction(createTextSeparator("Minimap"));
|
||||
view_menu->addSeparator();
|
||||
|
||||
@@ -1026,7 +1026,10 @@ void WorldRender::draw (glm::mat4x4 const& model_view
|
||||
|
||||
for (MapTile* tile : _world->mapIndex.loaded_tiles())
|
||||
{
|
||||
tile->flightBoundsRenderer()->draw(mfbo_shader);
|
||||
if (tile->hasFlightBounds())
|
||||
{
|
||||
tile->flightBoundsRenderer()->draw(mfbo_shader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1405,6 +1405,8 @@ std::array<float, 4> TextureSet::get_textures_weight_for_unit(unsigned int unit_
|
||||
|
||||
void TextureSet::updateDoodadMapping()
|
||||
{
|
||||
// NOTE : tempalphamap needs to be applied first with apply_alpha_changes()
|
||||
|
||||
std::array<std::uint16_t, 8> new_doodad_mapping{};
|
||||
// std::array<std::array<std::uint8_t, 8>, 8> new_doodad_mapping{};
|
||||
// for (auto& row : new_doodad_mapping) {
|
||||
@@ -1424,8 +1426,10 @@ void TextureSet::updateDoodadMapping()
|
||||
int very_innacurate_count = 0;
|
||||
int higher_count = 0;
|
||||
int lower_count = 0;
|
||||
auto blizzard_mapping_readable = getDoodadMappingReadable();
|
||||
std::array<std::array<std::uint8_t, 8>, 8> blizzard_mapping_readable;
|
||||
bool debug_test = true;
|
||||
if (debug_test)
|
||||
blizzard_mapping_readable = getDoodadMappingReadable();
|
||||
|
||||
// 8x8 bits per unit
|
||||
for (int unit_x = 0; unit_x < 8; unit_x++)
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Noggit
|
||||
tool_layout->setAlignment(quick_palette_btn, Qt::AlignTop);
|
||||
|
||||
|
||||
auto geffect_tools_btn(new QPushButton("Ground Effect Tools", this));
|
||||
auto geffect_tools_btn(new QPushButton(/*"Ground Effect Tools"*/ "In developement", this));
|
||||
tool_layout->addWidget(geffect_tools_btn);
|
||||
tool_layout->setAlignment(geffect_tools_btn, Qt::AlignTop);
|
||||
|
||||
|
||||
@@ -132,9 +132,9 @@ ViewToolbar::ViewToolbar(MapView *mapView, ViewToolbar *tb)
|
||||
|
||||
// normal view mode icon, and make them only 1 at a time out of the 3 view modes?
|
||||
// add_tool_icon(mapView, &mapView->_game_mode_camera, tr("Normal view"), FontNoggit::VIEW_AXIS, tb);
|
||||
add_tool_icon(mapView, &mapView->_game_mode_camera, tr("Game view"), FontNoggit::VIEW_MODE_GAME, tb);
|
||||
// add_tool_icon(mapView, &mapView->_game_mode_camera, tr("Game view"), FontNoggit::VIEW_MODE_GAME, tb);
|
||||
// add_tool_icon(mapView, &mapView->_game_mode_camera, tr("Tile view"), FontNoggit::VIEW_MODE_2D, tb);
|
||||
addSeparator();
|
||||
// addSeparator();
|
||||
|
||||
add_tool_icon(mapView, &mapView->_show_minimap_window, tr("Show Minimap"),FontNoggit::TOOL_MINIMAP_EDITOR, tb);
|
||||
add_tool_icon(mapView, &mapView->_show_detail_info_window, tr("Details info"), FontNoggit::INFO, tb);
|
||||
@@ -412,7 +412,6 @@ void ViewToolbar::add_tool_icon(MapView* mapView,
|
||||
mapView->getCamera()->position.y = ground_pos.y + 2;
|
||||
}
|
||||
|
||||
|
||||
action->setChecked(view_state->get());
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user