http://bugs.freeciv.org/Ticket/Display.html?id=39559 >
On 14/08/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
>
> It still does not compile. But there is patch somewhere in RT that
> should fix some of the older problems, so I'm avoiding duplicate work
> here.
There was no usable patch for fixing those problems. So I had to
write it myself. With attached patch gui-win32 compiles.
It has not adopted to new cursor code, but old one had to go.
- ML
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/graphics.c freeciv/client/gui-win32/graphics.c
--- freeciv/client/gui-win32/graphics.c 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/graphics.c 2007-08-15 01:56:51.0 +0300
@@ -90,8 +90,7 @@
Load the cursors (mouse substitute sprites), including a goto cursor,
an airdrop cursor, a nuke cursor, and a patrol cursor.
**/
-void
-load_cursors(void)
+void load_cursors(void)
{
enum cursor_type cursor;
ICONINFO ii;
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/mapview.c freeciv/client/gui-win32/mapview.c
--- freeciv/client/gui-win32/mapview.c 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/mapview.c 2007-08-15 02:01:01.0 +0300
@@ -201,6 +201,11 @@
SetWindowText(unit_info_frame, get_unit_info_label_text1(punitlist));
SetWindowText(unit_info_label, get_unit_info_label_text2(punitlist));
+ /* Cursor handling has changed a lot. New form is not yet implemented
+ * for gui-win32. Old code below is probably never needed again, but
+ * I left it here just in case. Remove when new implementation is in
+ * place. */
+#if 0
switch (hover_state) {
case HOVER_NONE:
if (action_state == CURSOR_ACTION_SELECT) {
@@ -245,6 +250,7 @@
cursor_type = CURSOR_PARADROP;
break;
}
+#endif
do_mainwin_layout();
}
@@ -258,6 +264,14 @@
}
/**
+ This function will change the current mouse cursor.
+**/
+void update_mouse_cursor(enum cursor_type new_cursor_type)
+{
+ /* PORT ME */
+}
+
+/**
**/
void update_turn_done_button(bool do_restore)
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/mapview.h freeciv/client/gui-win32/mapview.h
--- freeciv/client/gui-win32/mapview.h 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/mapview.h 2007-08-15 01:23:57.0 +0300
@@ -22,6 +22,7 @@
void overview_expose(HDC hdc);
void map_handle_hscroll(int pos);
void map_handle_vscroll(int pos);
+void anim_cursor(float time);
/* These values are stored in the mapview struct now. */
#define map_view_x mapview.map_x0
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/menu.c freeciv/client/gui-win32/menu.c
--- freeciv/client/gui-win32/menu.c 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/menu.c 2007-08-15 01:27:04.0 +0300
@@ -1156,7 +1156,8 @@
!unit_has_type_flag(punit, F_UNDISBANDABLE));
my_enable_menu(menu, IDM_ORDERS_HOMECITY,
can_unit_change_homecity(punit));
- my_enable_menu(menu, IDM_ORDERS_LOAD, find_transporter_for_unit(punit));
+ my_enable_menu(menu, IDM_ORDERS_LOAD,
+ find_transporter_for_unit(punit)->id);
my_enable_menu(menu, IDM_ORDERS_UNLOAD,
(can_unit_unload(punit, game_find_unit_by_number(punit->transported_by))
&& can_unit_exist_at_tile(punit, punit->tile))
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/optiondlg.c freeciv/client/gui-win32/optiondlg.c
--- freeciv/client/gui-win32/optiondlg.c 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/optiondlg.c 2007-08-15 01:30:35.0 +0300
@@ -80,6 +80,9 @@
}
}
break;
+case COT_FONT:
+ /* FIXME: */
+ break;
}
} client_options_iterate_end;
DestroyWindow(dlg);
@@ -153,7 +156,10 @@
(void *) fcwin_box_add_edit(vbox, "", 40, 0, 0, TRUE, TRUE, 0);
break;
}
-}
+ case COT_FONT:
+ /* FIXME: */
+ break;
+}
} client_options_iterate_end;
fcwin_box_add_box(hbox,vbox_labels,TRUE,TRUE,0);
fcwin_box_add_box(hbox,vbox,TRUE,TRUE,0);
@@ -199,6 +205,9 @@
}
SetWindowText((HWND)(o->p_gui_data), o->p_string_value);
break;
+case COT_FONT:
+ /* FIXME: */
+ break;
}
} client_options_iterate_end;
fcwin_redo_layout(option_dialog);
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/pages.c freeciv/client/gui-win32/pages.c
--- freeciv/client/gui-win32/pages.c 2007-08-04 18:38:53.0 +0300
+++ freeciv/client/gui-win32/pages.c 2007-08-15 02:02:27.0 +0300
@@ -15,6 +15,8 @@
#include
#endif
+#include "connectdlg_g.h"
+
#include "pages.h"
/***