mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 20:29:17 +00:00
added hooks to saveHQShot
This commit is contained in:
parent
c8fa9f745f
commit
64a3191946
@ -939,6 +939,8 @@ void IMAGESAVE(SDL_Surface *s, const char *fname) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
hookset<void(SDL_Surface*)> *hooks_hqshot;
|
||||||
|
|
||||||
#if CAP_SDL
|
#if CAP_SDL
|
||||||
void saveHighQualityShot(const char *fname, const char *caption, int fade) {
|
void saveHighQualityShot(const char *fname, const char *caption, int fade) {
|
||||||
|
|
||||||
@ -988,6 +990,8 @@ void saveHighQualityShot(const char *fname, const char *caption, int fade) {
|
|||||||
SDL_FillRect(s, NULL, numi==1 ? backcolor : i ? 0xFFFFFF : 0);
|
SDL_FillRect(s, NULL, numi==1 ? backcolor : i ? 0xFFFFFF : 0);
|
||||||
drawfullmap();
|
drawfullmap();
|
||||||
|
|
||||||
|
callhooks(hooks_hqshot, s);
|
||||||
|
|
||||||
if(fade < 255)
|
if(fade < 255)
|
||||||
for(int y=0; y<vid.yres; y++)
|
for(int y=0; y<vid.yres; y++)
|
||||||
for(int x=0; x<vid.xres; x++) {
|
for(int x=0; x<vid.xres; x++) {
|
||||||
@ -1005,6 +1009,7 @@ void saveHighQualityShot(const char *fname, const char *caption, int fade) {
|
|||||||
if(!fname) fname = buf;
|
if(!fname) fname = buf;
|
||||||
IMAGESAVE(s, fname);
|
IMAGESAVE(s, fname);
|
||||||
|
|
||||||
|
|
||||||
if(i == 0) addMessage(XLAT("Saved the high quality shot to %1", fname));
|
if(i == 0) addMessage(XLAT("Saved the high quality shot to %1", fname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user