News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Renamed graphics functions

Started by ceeac, April 18, 2026, 12:49:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

As part of the graphics backend refactor (r11927) a number of function names in simgraph.h were changed; the old and new names can be found in the table below.
Functions marked with (*) are very likely going to be moved from simgraph to font_t to reduce code duplication in simgraph16 and a future simgraphgl, and to prepare support for multiple display fonts.

Old nameNew name
color_idx_to_rgbpalette_lookup
color_rgb_to_idxpalette_indexof
env_t_rgb_to_system_colorsenv_t_rgb_to_system_colors
add_poly_clipadd_poly_clip
clear_all_poly_clipclear_all_poly_clip
activate_ribi_clipactivate_ribi_clip
get_tile_raster_widthget_tile_raster_width
get_base_tile_raster_widthget_base_tile_raster_width
display_set_base_raster_widthset_base_raster_width
zoom_factor_upzoom_factor_up
zoom_factor_downzoom_factor_down
simgraph_initinit
is_display_initis_display_init
simgraph_exitexit
simgraph_resizeon_window_resized
display_load_fontload_font (*)
get_image_countget_image_count
register_imageregister_image
display_free_all_images_abovefree_all_images_above
display_get_base_image_offsetget_base_image_offset
display_get_image_offsetget_image_offset
display_mark_img_dirtymark_img_dirty
mark_rect_dirty_wcmark_rect_dirty_wc
mark_rect_dirty_clipmark_rect_dirty_clip
mark_screen_dirtymark_screen_dirty
display_get_widthget_screen_size
display_get_heightget_screen_size
display_set_heightset_screen_height
display_set_actual_widthset_screen_actual_width
display_get_best_matching_sizeget_best_matching_size
display_fit_img_to_widthfit_img_to_width
display_day_night_shiftset_daynight_level
display_scroll_bandmove_scroll_band
display_set_player_color_schemeset_player_color_scheme
display_img_aligneddraw_img_aligned
display_img_auxdraw_img_aux
display_rezoomed_img_blenddraw_rezoomed_img_blend
display_img_blenddraw_img_blend
display_rezoomed_img_alphadraw_rezoomed_img_alpha
display_img_alphadraw_img_alpha
display_color_imgdraw_color_img
display_base_imgdraw_base_img
display_img_stretchdraw_stretch_map
display_img_stretch_blenddraw_stretch_map_blend
display_base_img_blenddraw_base_img_blend
display_base_img_alphadraw_base_img_alpha
display_normaldraw_normal
display_colordraw_color
display_blenddraw_blend
display_alphadraw_alpha
current_tile_raster_widthcurrent_tile_raster_width
get_current_tile_raster_widthget_current_tile_raster_width
display_set_image_procset_image_procs
display_blend_colorsblend_colors
display_blend_wh_rgbtint_rect
display_fillbox_wh_rgbdraw_rect
display_fillbox_wh_clip_rgbdraw_rect_clipped
display_filled_roundbox_clipdraw_rounded_rect_clipped
display_vline_wh_clip_rgbdraw_vline_clipped
display_flush_bufferflush_framebuffer
display_show_pointerset_cursor_visible
display_set_pointerset_default_cursor
display_show_load_pointerset_show_load_cursor
display_array_whdraw_array
display_outline_proportional_rgbdraw_text_outlined
display_shadow_proportional_rgbdraw_text_shadowed
display_ddd_box_rgbdraw_box3d
display_ddd_box_clip_rgbdraw_box3d_clipped
get_next_char<removed>
get_prev_char<removed>
display_get_char_widthget_char_width (*)
display_get_number_widthget_number_width (*)
has_characterfont_has_character (*)
get_next_char_with_metricsget_next_char_with_metrics (*)
get_prev_char_with_metricsget_prev_char_with_metrics (*)
display_fit_proportionalcalc_text_index_for_width (*)
proportional_string_widthcalc_text_width (*)
proportional_string_len_widthcalc_text_width_n (*)
display_calc_proportional_string_len_widthcalc_text_width_n (*)
display_calc_proportional_multiline_string_len_widthcalc_multiline_text_size (*)
display_text_proportional_len_clip_rgbdraw_text_clipped_n
display_proportional_rgbdraw_text
display_proportional_clip_rgbdraw_text_clipped
display_proportional_ellipsis_rgbdraw_text_ellipsis
display_ddd_proportional_clipdraw_textbox3d_clipped
display_multiline_text_rgbdraw_multiline_text
display_direct_line_rgbdraw_line
display_direct_line_dotted_rgbdraw_line_dotted
display_circle_rgbdraw_empty_circle
display_filled_circle_rgbdraw_filled_circle
draw_bezier_rgbdraw_bezier
display_right_triangle_rgbdraw_right_triangle
display_signal_direction_rgbdraw_signal_direction
display_set_clip_whset_clip_rect
display_get_clip_whget_clip_rect
display_push_clip_whpush_clip_rect
display_swap_clip_whswap_clip_rect
display_pop_clip_whpop_clip_rect
display_snapshottake_screenshot

prissi

These names are much more sensible, given that the old fixed font is gone as is some other things which led to those names.