[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/human/ui.ccl data/ccl/orc/ui...
From: |
Nehal Mistry |
Subject: |
[Stratagus-CVS] stratagus data/ccl/human/ui.ccl data/ccl/orc/ui... |
Date: |
Sun, 02 Nov 2003 19:14:34 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Nehal Mistry <address@hidden> 03/11/02 19:14:33
Modified files:
data/ccl/human : ui.ccl
data/ccl/orc : ui.ccl
doc : ChangeLog.html
src/include : ui.h unit.h
src/ui : ccl_ui.c mainscr.c
Log message:
allow selection of more than 9 units
Patches:
Index: stratagus/data/ccl/human/ui.ccl
diff -u stratagus/data/ccl/human/ui.ccl:1.43
stratagus/data/ccl/human/ui.ccl:1.44
--- stratagus/data/ccl/human/ui.ccl:1.43 Thu Oct 16 21:23:08 2003
+++ stratagus/data/ccl/human/ui.ccl Sun Nov 2 19:14:32 2003
@@ -26,7 +26,7 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: ui.ccl,v 1.43 2003/10/17 01:23:08 jsalmon3 Exp $
+;; $Id: ui.ccl,v 1.44 2003/11/03 00:14:32 nehalmistry Exp $
(define-cursor 'cursor-point 'human
'image "ui/human/cursors/human_gauntlet.png"
@@ -98,7 +98,8 @@
(list 'pos '(118 220) 'size icon_size)
(list 'pos '( 6 274) 'size icon_size)
(list 'pos '( 62 274) 'size icon_size)
- (list 'pos '(118 274) 'size icon_size)))
+ (list 'pos '(118 274) 'size icon_size))
+ 'max-text-pos (list (+ info_panel_x 10) (+ info_panel_y 10)))
)
'training (list
'single (list
Index: stratagus/data/ccl/orc/ui.ccl
diff -u stratagus/data/ccl/orc/ui.ccl:1.42 stratagus/data/ccl/orc/ui.ccl:1.43
--- stratagus/data/ccl/orc/ui.ccl:1.42 Thu Oct 16 21:23:09 2003
+++ stratagus/data/ccl/orc/ui.ccl Sun Nov 2 19:14:32 2003
@@ -26,7 +26,7 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: ui.ccl,v 1.42 2003/10/17 01:23:09 jsalmon3 Exp $
+;; $Id: ui.ccl,v 1.43 2003/11/03 00:14:32 nehalmistry Exp $
(define-cursor 'cursor-point 'orc
'image "ui/orc/cursors/orcish_claw.png"
@@ -98,7 +98,8 @@
(list 'pos '(118 220) 'size icon_size)
(list 'pos '( 6 274) 'size icon_size)
(list 'pos '( 62 274) 'size icon_size)
- (list 'pos '(118 274) 'size icon_size)))
+ (list 'pos '(118 274) 'size icon_size))
+ 'max-text-pos (list (+ info_panel_x 10) (+ info_panel_y 10)))
)
'training (list
'single (list
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.566 stratagus/doc/ChangeLog.html:1.567
--- stratagus/doc/ChangeLog.html:1.566 Sun Nov 2 16:12:52 2003
+++ stratagus/doc/ChangeLog.html Sun Nov 2 19:14:33 2003
@@ -2,7 +2,7 @@
<html>
<head>
<!--
----- $Id: ChangeLog.html,v 1.566 2003/11/02 21:12:52 mr-russ Exp $
+---- $Id: ChangeLog.html,v 1.567 2003/11/03 00:14:33 nehalmistry Exp $
---- (c) Copyright 1998-2003 by Lutz Sammer
@@ -36,6 +36,7 @@
<li>Future 2.00 Release<p>
<ul>
<li>++
+ <li>Allow selection of more than 9 units (from Nehal Mistry).
<li>Upgraded Network Code, Variable packet size and don't send repeat
commands (from Russell Smith).
<li>Fixed Bug #6063: Copy and Paste isn't working in boxes (from Russell
Smith).
<li>Fixed Bug #6085: Pb in saving spell order action (from Russell Smith).
Index: stratagus/src/include/ui.h
diff -u stratagus/src/include/ui.h:1.75 stratagus/src/include/ui.h:1.76
--- stratagus/src/include/ui.h:1.75 Thu Oct 16 21:23:09 2003
+++ stratagus/src/include/ui.h Sun Nov 2 19:14:33 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ui.h,v 1.75 2003/10/17 01:23:09 jsalmon3 Exp $
+// $Id: ui.h,v 1.76 2003/11/03 00:14:33 nehalmistry Exp $
#ifndef __UI_H__
#define __UI_H__
@@ -195,6 +195,8 @@
int SelectedFont;
int SelectedTextX;
int SelectedTextY;
+ int MaxSelectedTextX; /// position to place '+#' text
+ int MaxSelectedTextY; /// if > maximum units selected
Button* SingleTrainingButton;
char* SingleTrainingText;
Index: stratagus/src/include/unit.h
diff -u stratagus/src/include/unit.h:1.227 stratagus/src/include/unit.h:1.228
--- stratagus/src/include/unit.h:1.227 Sat Nov 1 23:20:38 2003
+++ stratagus/src/include/unit.h Sun Nov 2 19:14:33 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit.h,v 1.227 2003/11/02 04:20:38 jsalmon3 Exp $
+// $Id: unit.h,v 1.228 2003/11/03 00:14:33 nehalmistry Exp $
#ifndef __UNIT_H__
#define __UNIT_H__
@@ -674,13 +674,13 @@
/**
** How many units could be selected
*/
-#define MaxSelectable 9
+#define MaxSelectable 54
// FIXME: hardcoded...
/**
** How many units could be in a group
*/
-#define NUM_UNITS_PER_GROUP 9
+#define NUM_UNITS_PER_GROUP MaxSelectable
/**
** How many groups supported
Index: stratagus/src/ui/ccl_ui.c
diff -u stratagus/src/ui/ccl_ui.c:1.144 stratagus/src/ui/ccl_ui.c:1.145
--- stratagus/src/ui/ccl_ui.c:1.144 Fri Oct 31 17:16:57 2003
+++ stratagus/src/ui/ccl_ui.c Sun Nov 2 19:14:33 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_ui.c,v 1.144 2003/10/31 22:16:57 jsalmon3 Exp $
+// $Id: ccl_ui.c,v 1.145 2003/11/03 00:14:33 nehalmistry Exp $
//@{
@@ -770,6 +770,11 @@
slist = gh_cdr(slist);
CclParseIcon(value, &ui->SelectedButtons[i++]);
}
+ } else if (gh_eq_p(value, gh_symbol2scm("max-text-pos"))) {
+ value = gh_car(sublist);
+ sublist = gh_cdr(sublist);
+ ui->MaxSelectedTextX = gh_scm2int(gh_car(value));
+ ui->MaxSelectedTextY = gh_scm2int(gh_car(gh_cdr(value)));
} else {
errl("Unsupported tag", value);
}
Index: stratagus/src/ui/mainscr.c
diff -u stratagus/src/ui/mainscr.c:1.136 stratagus/src/ui/mainscr.c:1.137
--- stratagus/src/ui/mainscr.c:1.136 Sat Nov 1 16:23:15 2003
+++ stratagus/src/ui/mainscr.c Sun Nov 2 19:14:33 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: mainscr.c,v 1.136 2003/11/01 21:23:15 jsalmon3 Exp $
+// $Id: mainscr.c,v 1.137 2003/11/03 00:14:33 nehalmistry Exp $
//@{
@@ -1110,6 +1110,9 @@
global void DrawInfoPanel(void)
{
int i;
+ UI *ui;
+
+ ui = &TheUI;
if (NumSelected) {
if (NumSelected > 1) {
@@ -1118,7 +1121,8 @@
//
PlayerPixels(ThisPlayer); // can only be own!
DrawInfoPanelBackground(0);
- for (i = 0; i < NumSelected; ++i) {
+ for (i = 0; i < (NumSelected > ui->NumSelectedButtons ?
+ ui->NumSelectedButtons : NumSelected); ++i) {
DrawUnitIcon(ThisPlayer,
Selected[i]->Type->Icon.Icon,
(ButtonAreaUnderCursor == ButtonAreaSelected &&
ButtonUnderCursor == i) ?
@@ -1139,6 +1143,11 @@
SetStatusLine(Selected[i]->Type->Name);
}
}
+ }
+ if (NumSelected > ui->NumSelectedButtons) {
+ char buf[4];
+ sprintf(buf, "+%d", NumSelected - TheUI.NumSelectedButtons);
+ VideoDrawText(ui->MaxSelectedTextX, ui->MaxSelectedTextY,
GameFont, buf);
}
return;
} else {
- [Stratagus-CVS] stratagus data/ccl/human/ui.ccl data/ccl/orc/ui...,
Nehal Mistry <=