• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisãob4b2b066ebedcdb19f035b54fad4ad9e39931c26 (tree)
Hora2016-11-26 20:49:54
AutorDeskull <desull@user...>
CommiterDeskull

Mensagem de Log

拡大縮小後の描画範囲計算を修正 / Fix calculation after scaling process.

Mudança Sumário

Diff

--- a/src/main-win.c
+++ b/src/main-win.c
@@ -1039,10 +1039,6 @@ static void term_getsize(term_data *td)
10391039 rc.top = 0;
10401040 rc.bottom = rc.top + hgt;
10411041
1042- /* XXX XXX XXX */
1043- /* rc.right += 1; */
1044- /* rc.bottom += 1; */
1045-
10461042 /* Adjust */
10471043 AdjustWindowRectEx(&rc, td->dwStyle, TRUE, td->dwExStyle);
10481044
@@ -5963,9 +5959,44 @@ static void tile_zoom_in()
59635959 term_data *td = &data[0];
59645960 if(td->tile_hgt < TILE_HEIGHT_MAX && inkey_flag && use_new_gmode)
59655961 {
5962+ uint cols;
5963+ uint rows;
59665964 td->tile_hgt += 2;
59675965 td->tile_wid += 1;
59685966 term_change_tile_size(td);
5967+
5968+ cols = (td->size_wid - td->size_ow1) / td->tile_wid;
5969+ rows = (td->size_hgt - td->size_oh1) / td->tile_hgt;
5970+
5971+ /* New size */
5972+ if ((td->cols != cols) || (td->rows != rows))
5973+ {
5974+ /* Save old term */
5975+ term *old_term = Term;
5976+
5977+ /* Save the new size */
5978+ td->cols = cols;
5979+ td->rows = rows;
5980+
5981+ /* Activate */
5982+ Term_activate(&td->t);
5983+
5984+ /* Resize the term */
5985+ Term_resize(td->cols, td->rows);
5986+
5987+ /* Activate */
5988+ Term_activate(old_term);
5989+
5990+ /* Redraw later */
5991+ InvalidateRect(td->w, NULL, TRUE);
5992+
5993+ /* HACK - Redraw all windows */
5994+ p_ptr->window = 0xFFFFFFFF;
5995+ window_stuff();
5996+ }
5997+
5998+ td->size_hack = FALSE;
5999+
59696000 term_window_resize(td);
59706001 }
59716002 }
@@ -5975,9 +6006,44 @@ static void tile_zoom_out()
59756006 term_data *td = &data[0];
59766007 if(td->tile_hgt >= TILE_HEIGHT_MIN && inkey_flag && use_new_gmode)
59776008 {
6009+ uint cols;
6010+ uint rows;
59786011 td->tile_hgt -= 2;
59796012 td->tile_wid -= 1;
59806013 term_change_tile_size(td);
6014+
6015+ cols = (td->size_wid - td->size_ow1) / td->tile_wid;
6016+ rows = (td->size_hgt - td->size_oh1) / td->tile_hgt;
6017+
6018+ /* New size */
6019+ if ((td->cols != cols) || (td->rows != rows))
6020+ {
6021+ /* Save old term */
6022+ term *old_term = Term;
6023+
6024+ /* Save the new size */
6025+ td->cols = cols;
6026+ td->rows = rows;
6027+
6028+ /* Activate */
6029+ Term_activate(&td->t);
6030+
6031+ /* Resize the term */
6032+ Term_resize(td->cols, td->rows);
6033+
6034+ /* Activate */
6035+ Term_activate(old_term);
6036+
6037+ /* Redraw later */
6038+ InvalidateRect(td->w, NULL, TRUE);
6039+
6040+ /* HACK - Redraw all windows */
6041+ p_ptr->window = 0xFFFFFFFF;
6042+ window_stuff();
6043+ }
6044+
6045+ td->size_hack = FALSE;
6046+
59816047 term_window_resize(td);
59826048 }
59836049 }
\ No newline at end of file
Show on old repository browser