• R/O
  • SSH
  • HTTPS

angband65: Commit


Commit MetaInfo

Revision155 (tree)
Zeit2009-05-20 02:43:21
Autorpaulblay

Log Message

Hopefully this tidies up a few compiler warnings from the previous commit.

Ändern Zusammenfassung

Diff

--- trunk/Angband65/src/main-gcu.c (revision 154)
+++ trunk/Angband65/src/main-gcu.c (revision 155)
@@ -582,7 +582,7 @@
582582 * Erase a grid of space
583583 * Hack -- try to be "semi-efficient".
584584 */
585-static errr Term_wipe_gcu(s16b x, s16b y, int n)
585+static errr Term_wipe_gcu(s16b x, s16b y, s16b n)
586586 {
587587 term_data *td = (term_data *)(Term->data);
588588
@@ -609,7 +609,7 @@
609609 /*
610610 * Place some text on the screen using an attribute
611611 */
612-static errr Term_text_gcu(s16b x, s16b y, int n, byte a, cptr s)
612+static errr Term_text_gcu(s16b x, s16b y, s16b n, byte a, cptr s)
613613 {
614614 term_data *td = (term_data *)(Term->data);
615615
--- trunk/Angband65/src/death.c (revision 154)
+++ trunk/Angband65/src/death.c (revision 155)
@@ -145,7 +145,7 @@
145145
146146 s16b wid, hgt;
147147 s16b i = 2;
148- s16b width = 0;
148+ int width = 0;
149149
150150
151151 path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "crown.txt");
@@ -164,7 +164,7 @@
164164
165165 /* Dump the file to the screen */
166166 while (file_getl(fp, buf, sizeof(buf)))
167- put_str(buf, i++, (wid/2) - (width/2));
167+ put_str(buf, i++, (wid/2) - (s16b) (width/2));
168168
169169 file_close(fp);
170170 }
--- trunk/Angband65/src/gtk/main-gtk.c (revision 154)
+++ trunk/Angband65/src/gtk/main-gtk.c (revision 155)
@@ -170,12 +170,12 @@
170170 return(255 * td->font.h);
171171 }
172172
173-static int row_in_pixels(term_data *td, int x)
173+static int row_in_pixels(term_data *td, s16b x)
174174 {
175175 return(x * td->font.w);
176176 }
177177
178-static int col_in_pixels(term_data *td, int y)
178+static int col_in_pixels(term_data *td, s16b y)
179179 {
180180 return(y * td->font.h);
181181 }
@@ -183,7 +183,7 @@
183183 /*
184184 * Find the square a particular pixel is part of.
185185 */
186-static void pixel_to_square(int * const x, int * const y, const int ox, const int oy)
186+static void pixel_to_square(s16b * const x, s16b * const y, const s16b ox, const s16b oy)
187187 {
188188 term_data *td = (term_data*)(Term->data);
189189
@@ -249,8 +249,8 @@
249249
250250 void set_row_and_cols(term_data *td)
251251 {
252- int cols = td->cols;
253- int rows = td->rows;
252+ s16b cols = td->cols;
253+ s16b rows = td->rows;
254254
255255 td->cols = td->size.w / td->font.w;
256256 td->rows= td->size.h / td->font.h;
--- trunk/Angband65/src/gtk/main-gtk.h (revision 154)
+++ trunk/Angband65/src/gtk/main-gtk.h (revision 155)
@@ -65,8 +65,8 @@
6565 int number;
6666
6767 bool visible, initialized;
68- int rows;
69- int cols;
68+ s16b rows;
69+ s16b cols;
7070 point location;
7171 measurements size; /* of the window */
7272 measurements tile, actual;
@@ -166,15 +166,16 @@
166166 EVENT_MONSTERHEALTH,
167167
168168 EVENT_PLAYERSPEED,
169- EVENT_DUNGEONLEVEL,
169+ EVENT_DUNGEONLEVEL
170170 };
171171
172172 static game_event_type my_statusline_events[] =
173173 {
174- EVENT_STUDYSTATUS,
174+ EVENT_STUDYSTATUS, /* TODO Is this needed? */
175175 EVENT_STATUS,
176176 EVENT_DETECTIONSTATUS,
177177 EVENT_STATE,
178+ EVENT_READING
178179 };
179180
180181 /* Various variables */
@@ -201,7 +202,7 @@
201202 /*
202203 * Find the square a particular pixel is part of.
203204 */
204-static void pixel_to_square(int * const x, int * const y, const int ox, const int oy);
205+static void pixel_to_square(s16b * const x, s16b * const y, const s16b ox, const s16b oy);
205206
206207 void set_term_matrix(term_data *td);
207208 /* Cairo's rect type to Gdks */
--- trunk/Angband65/src/main-x11.c (revision 154)
+++ trunk/Angband65/src/main-x11.c (revision 155)
@@ -1807,8 +1807,8 @@
18071807 int z = 0;
18081808
18091809 /* Where is the mouse */
1810- int x = xev->xbutton.x;
1811- int y = xev->xbutton.y;
1810+ s16b x = (s16b) xev->xbutton.x;
1811+ s16b y = (s16b) xev->xbutton.y;
18121812
18131813 /* Which button is involved */
18141814 if (xev->xbutton.button == Button1) z = 1;
@@ -2056,7 +2056,7 @@
20562056 /*
20572057 * Draw the cursor as a rectangular outline
20582058 */
2059-static errr Term_curs_x11(int x, int y)
2059+static errr Term_curs_x11(s16b x, s16b y)
20602060 {
20612061 term_data *td = (term_data*)(Term->data);
20622062
@@ -2073,7 +2073,7 @@
20732073 /*
20742074 * Draw the double width cursor as a rectangular outline
20752075 */
2076-static errr Term_bigcurs_x11(int x, int y)
2076+static errr Term_bigcurs_x11(s16b x, s16b y)
20772077 {
20782078 term_data *td = (term_data*)(Term->data);
20792079
@@ -2090,7 +2090,7 @@
20902090 /*
20912091 * Erase some characters.
20922092 */
2093-static errr Term_wipe_x11(int x, int y, int n)
2093+static errr Term_wipe_x11(s16b x, s16b y, int n)
20942094 {
20952095 /* Erase (use black) */
20962096 Infoclr_set(clr[TERM_DARK]);
@@ -2106,7 +2106,7 @@
21062106 /*
21072107 * Draw some textual characters.
21082108 */
2109-static errr Term_text_x11(int x, int y, int n, byte a, cptr s)
2109+static errr Term_text_x11(s16b x, s16b y, int n, byte a, cptr s)
21102110 {
21112111 /* Draw the text */
21122112 Infoclr_set(clr[a]);
Show on old repository browser