graphics: begin to rewrite code to be more simple: - add

a struct Texture to store a sf::Texture and the application's texture sizes,
 - add a texture resources manager and retrieve codes to allow - if needed,
 rescaling startsplash and spidlogo at startup - loading some graphics with
 different resolutions:     buttons, inventory, pcedbuttons, statarea,
 startanim,     startbut, startup, terscreen, textbar, transcript   can be
 used to load high resolution pictures.

Note: currently, render_image and res_image are a mess as Texture and sf:Texture classes
  cohabit :-~
This commit is contained in:
Laurent alonso
2020-10-15 19:37:38 +02:00
committed by Celtic Minstrel
parent 44c063abd2
commit e625927a29
15 changed files with 226 additions and 39 deletions

View File

@@ -3355,7 +3355,7 @@ void edit_custom_sheets() {
spec_scen_g.init_sheet(0);
spec_scen_g.sheets[0]->copyToImage().saveToFile((pic_dir/"sheet0.png").string().c_str());
all_pics.insert(all_pics.begin(), 0);
ResMgr::graphics.pushPath(pic_dir);
ResMgr::textures.pushPath(pic_dir);
}
set_cursor(watch_curs);