Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations Fix template creation build and refit # Conflicts: # Makefile.bundle.in # config.lib # src/animated_tile.cpp # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_base.hpp # src/blitter/8bpp_base.hpp # src/blitter/null.hpp # src/build_vehicle_gui.cpp # src/command.cpp # src/command_func.h # src/console_gui.cpp # src/core/smallstack_type.hpp # src/date.cpp # src/debug.cpp # src/genworld_gui.cpp # src/ground_vehicle.hpp # src/group_gui.cpp # src/lang/korean.txt # src/linkgraph/linkgraph_gui.h # src/main_gui.cpp # src/misc_gui.cpp # src/network/core/game.h # src/network/core/packet.cpp # src/network/core/udp.cpp # src/network/core/udp.h # src/network/network_content.cpp # src/network/network_type.h # src/network/network_udp.cpp # src/newgrf_house.h # src/openttd.cpp # src/order_cmd.cpp # src/order_gui.cpp # src/os/unix/crashlog_unix.cpp # src/os/windows/crashlog_win.cpp # src/osk_gui.cpp # src/pathfinder/opf/opf_ship.cpp # src/rail_cmd.cpp # src/rail_gui.cpp # src/saveload/saveload.cpp # src/settings.cpp # src/settings_gui.cpp # src/smallmap_gui.h # src/station_base.h # src/station_cmd.cpp # src/table/gameopt_settings.ini # src/table/newgrf_debug_data.h # src/table/settings.ini # src/timetable_gui.cpp # src/toolbar_gui.cpp # src/train_gui.cpp # src/vehicle.cpp # src/vehicle_gui.cpp # src/vehiclelist.cpp # src/viewport.cpp # src/widgets/dropdown.cpp # src/window_gui.h
This commit is contained in:
15
src/gfx.cpp
15
src/gfx.cpp
@@ -86,9 +86,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
||||
|
||||
if (_cursor.visible) UndrawMouseCursor();
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_networking) NetworkUndrawChatMessage();
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
blitter->ScrollBuffer(_screen.dst_ptr, left, top, width, height, xo, yo);
|
||||
/* This part of the screen is now dirty. */
|
||||
@@ -511,9 +509,9 @@ int DrawString(int left, int right, int top, const char *str, TextColour colour,
|
||||
}
|
||||
|
||||
Layouter layout(str, INT32_MAX, colour, fontsize);
|
||||
if (layout.Length() == 0) return 0;
|
||||
if (layout.size() == 0) return 0;
|
||||
|
||||
return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline, true);
|
||||
return DrawLayoutLine(layout.front(), top, left, right, align, underline, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -576,7 +574,7 @@ int GetStringLineCount(StringID str, int maxw)
|
||||
GetString(buffer, str, lastof(buffer));
|
||||
|
||||
Layouter layout(buffer, maxw);
|
||||
return layout.Length();
|
||||
return layout.size();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -649,8 +647,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, const char *st
|
||||
int last_line = top;
|
||||
int first_line = bottom;
|
||||
|
||||
for (const ParagraphLayouter::Line **iter = layout.Begin(); iter != layout.End(); iter++) {
|
||||
const ParagraphLayouter::Line *line = *iter;
|
||||
for (const ParagraphLayouter::Line *line : layout) {
|
||||
|
||||
int line_height = line->GetLeading();
|
||||
if (y >= top && y < bottom) {
|
||||
@@ -970,7 +967,7 @@ static void GfxBlitter(const Sprite * const sprite, int x, int y, BlitterMode mo
|
||||
if (topleft <= clicked && clicked <= bottomright) {
|
||||
uint offset = (((size_t)clicked - (size_t)topleft) / (blitter->GetScreenDepth() / 8)) % bp.pitch;
|
||||
if (offset < (uint)bp.width) {
|
||||
_newgrf_debug_sprite_picker.sprites.Include(sprite_id);
|
||||
include(_newgrf_debug_sprite_picker.sprites, sprite_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1291,9 +1288,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_networking) NetworkUndrawChatMessage();
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
DrawOverlappedWindowForAll(left, top, right, bottom);
|
||||
|
||||
|
Reference in New Issue
Block a user