[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus doc/ChangeLog.html src/include/ui.h s...
From: |
Martin Renold |
Subject: |
[Stratagus-CVS] stratagus doc/ChangeLog.html src/include/ui.h s... |
Date: |
Wed, 03 Sep 2003 09:30:43 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Martin Renold <address@hidden> 03/09/03 09:30:43
Modified files:
doc : ChangeLog.html
src/include : ui.h
src/ui : botpanel.c ccl_ui.c
src/unit : unittype.c
Log message:
fixed save/load with NEW_UI
Patches:
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.520 stratagus/doc/ChangeLog.html:1.521
--- stratagus/doc/ChangeLog.html:1.520 Wed Sep 3 05:27:50 2003
+++ stratagus/doc/ChangeLog.html Wed Sep 3 09:30:42 2003
@@ -2,7 +2,7 @@
<html>
<head>
<!--
----- $Id: ChangeLog.html,v 1.520 2003/09/03 09:27:50 mr-russ Exp $
+---- $Id: ChangeLog.html,v 1.521 2003/09/03 13:30:42 martinxyz Exp $
---- (c) Copyright 1998-2003 by Lutz Sammer
@@ -36,6 +36,7 @@
<li>Future 1.19 Release<p>
<ul>
<li>++
+ <li>NEW_UI: Fixed save/load (from Martin Renold).
<li>Pathfinder fixes for when the goal moves (EXPERIMENTAL) (from Russell
Smith).
<li>Added repair-costs and repair-hp for units that can be repaired (from
Russell Smith).
<li>Changed can-repair to repair-range, allows flexible repair distances
(from Russell Smith).
Index: stratagus/src/include/ui.h
diff -u stratagus/src/include/ui.h:1.65 stratagus/src/include/ui.h:1.66
--- stratagus/src/include/ui.h:1.65 Sun Aug 17 11:57:07 2003
+++ stratagus/src/include/ui.h Wed Sep 3 09:30:43 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ui.h,v 1.65 2003/08/17 15:57:07 n0body Exp $
+// $Id: ui.h,v 1.66 2003/09/03 13:30:43 martinxyz Exp $
#ifndef __UI_H__
#define __UI_H__
@@ -328,6 +328,14 @@
extern int SpeedKeyScroll; /// Keyboard Scrolling Speed, in Frames
extern int SpeedMouseScroll; /// Mouse Scrolling Speed, in Frames
+
+// only exported to save them
+#ifdef NEW_UI
+extern SCM SelectionChangedHook; /// Script to add/remove buttons
+extern SCM SelectedUnitChangedHook; /// Script to refresh buttons
+extern SCM ChooseTargetBeginHook; /// Script to draw target selection buttons
+extern SCM ChooseTargetFinishHook; /// Script to draw target selection buttons
+#endif
/*----------------------------------------------------------------------------
-- Functions
Index: stratagus/src/ui/botpanel.c
diff -u stratagus/src/ui/botpanel.c:1.84 stratagus/src/ui/botpanel.c:1.85
--- stratagus/src/ui/botpanel.c:1.84 Sun Aug 17 11:57:08 2003
+++ stratagus/src/ui/botpanel.c Wed Sep 3 09:30:43 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: botpanel.c,v 1.84 2003/08/17 15:57:08 n0body Exp $
+// $Id: botpanel.c,v 1.85 2003/09/03 13:30:43 martinxyz Exp $
//@{
@@ -114,7 +114,7 @@
#endif
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: buttons $Id: botpanel.c,v 1.84 2003/08/17
15:57:08 n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: buttons $Id: botpanel.c,v 1.85 2003/09/03
13:30:43 martinxyz Exp $\n\n");
#ifndef NEW_UI
for( i=0; i<NumUnitButtons; ++i ) {
@@ -251,6 +251,24 @@
}
CLprintf(file,"))\n\n");
}
+#else
+
+ CLprintf(file,"(set-selection-changed-hook '");
+ lprin1CL(SelectionChangedHook,file);
+ CLprintf(file,")\n");
+
+ CLprintf(file,"(set-selected-unit-changed-hook '");
+ lprin1CL(SelectedUnitChangedHook,file);
+ CLprintf(file,")\n");
+
+ CLprintf(file,"(set-choose-target-begin-hook '");
+ lprin1CL(ChooseTargetBeginHook,file);
+ CLprintf(file,")\n");
+
+ CLprintf(file,"(set-choose-target-finish-hook '");
+ lprin1CL(ChooseTargetFinishHook,file);
+ CLprintf(file,")\n");
+
#endif
CLprintf(file,"(set-show-command-key! %s)\n\n",
Index: stratagus/src/ui/ccl_ui.c
diff -u stratagus/src/ui/ccl_ui.c:1.120 stratagus/src/ui/ccl_ui.c:1.121
--- stratagus/src/ui/ccl_ui.c:1.120 Wed Aug 13 10:55:45 2003
+++ stratagus/src/ui/ccl_ui.c Wed Sep 3 09:30:43 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_ui.c,v 1.120 2003/08/13 14:55:45 martinxyz Exp $
+// $Id: ccl_ui.c,v 1.121 2003/09/03 13:30:43 martinxyz Exp $
//@{
@@ -83,7 +83,7 @@
if( ChooseTargetBeginHook == NIL ) {
DebugLevel0Fn("Hook is NIL!\n");
} else {
- gh_apply(ChooseTargetBeginHook,NIL);
+ gh_eval(ChooseTargetBeginHook,NIL);
}
// FIXME: maybe write this from ccl?
SetStatusLine("Select Target");
@@ -103,7 +103,7 @@
if( ChooseTargetFinishHook == NIL ) {
DebugLevel0Fn("Hook is NIL!\n");
} else {
- gh_apply(ChooseTargetFinishHook,NIL);
+ gh_eval(ChooseTargetFinishHook,NIL);
}
}
@@ -600,7 +600,7 @@
gh_display(Selected[0]->Type->AddButtonsHook);
gh_newline();
*/
- gh_apply(Selected[0]->Type->AddButtonsHook,NIL);
+ gh_eval(Selected[0]->Type->AddButtonsHook,NIL);
}
}
return SCM_UNSPECIFIED;
@@ -3270,7 +3270,7 @@
gh_display(SelectionChangedHook);
gh_newline();
//}
- gh_apply(SelectionChangedHook, NIL);
+ gh_eval(SelectionChangedHook,NIL);
} else {
DebugLevel0Fn("Hook empty!\n");
}
@@ -3296,7 +3296,7 @@
//gh_display(SelectedUnitChangedHook);
//gh_newline();
//}
- gh_apply(SelectedUnitChangedHook, NIL);
+ gh_eval(SelectedUnitChangedHook,NIL);
} else {
DebugLevel0Fn("Hook empty!\n");
}
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.92 stratagus/src/unit/unittype.c:1.93
--- stratagus/src/unit/unittype.c:1.92 Wed Sep 3 05:27:53 2003
+++ stratagus/src/unit/unittype.c Wed Sep 3 09:30:43 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.92 2003/09/03 09:27:53 mr-russ Exp $
+// $Id: unittype.c,v 1.93 2003/09/03 13:30:43 martinxyz Exp $
//@{
@@ -984,6 +984,12 @@
CLprintf(file," 'teleporter\n");
}
+#ifdef NEW_UI
+ CLprintf(file," 'add-buttons '");
+ lprin1CL(type->AddButtonsHook,file);
+ CLprintf(file,"\n");
+#endif
+
CLprintf(file," 'sounds '(");
if( type->Sound.Selected.Name ) {
CLprintf(file,"\n selected \"%s\"",type->Sound.Selected.Name);
@@ -1001,6 +1007,7 @@
if( type->Sound.Dead.Name ) {
CLprintf(file,"\n dead \"%s\"",type->Sound.Dead.Name);
}
+
// FIXME: Attack should be removed!
if( type->Weapon.Attack.Name ) {
CLprintf(file,"\n attack \"%s\"",type->Weapon.Attack.Name);
@@ -1059,7 +1066,7 @@
char **sp;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.92 2003/09/03
09:27:53 mr-russ Exp $\n\n");
+ CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.93 2003/09/03
13:30:43 martinxyz Exp $\n\n");
// Original number to internal unit-type name.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus doc/ChangeLog.html src/include/ui.h s...,
Martin Renold <=