[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.22,1.23 data_scr
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.22,1.23 data_screen.h,1.10,1.11 gamedata.cc,1.26,1.27 gamedata.h,1.12,1.13 |
Date: |
Thu, 22 Aug 2002 13:56:42 -0400 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv10031/src
Modified Files:
data_screen.cc data_screen.h gamedata.cc gamedata.h
Log Message:
UPDATED for automake 1.6
ADDED label with current gametime to save games
Index: data_screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/data_screen.cc,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** data_screen.cc 25 Apr 2002 19:30:08 -0000 1.22
--- data_screen.cc 22 Aug 2002 17:56:40 -0000 1.23
***************
*** 29,32 ****
--- 29,33 ----
#include "pnm.h"
#include "gamedata.h"
+ #include "gamedate.h"
#include "image.h"
#include "input.h"
***************
*** 105,109 ****
--- 106,112 ----
win_image *shot;
win_write *entry;
+ win_label *date;
win_container *box = NULL;
+ win_font *yellow = win_manager::get_font ("yellow");
gamedata *gdata;
***************
*** 120,127 ****
shot->set_visible_border (true);
shot->pack();
!
entry = new win_write ();
! entry->move (100, 2);
! ((label_input*)entry)->resize (130, 54);
entry->set_font (*font);
entry->set_text (gdata->description ());
--- 123,138 ----
shot->set_visible_border (true);
shot->pack();
!
! date = new win_label ();
! date->move (100, 2);
! ((label*)date)->resize (130, 14);
! date->set_font (*yellow);
! date->set_text (gdata->gametime ());
! date->set_cursor_visible (false);
! date->pack();
!
entry = new win_write ();
! entry->move (100, 18);
! ((label_input*)entry)->resize (130, 40);
entry->set_font (*font);
entry->set_text (gdata->description ());
***************
*** 135,138 ****
--- 146,150 ----
box->resize (230, 58);
box->add (shot);
+ box->add (date);
box->add (entry);
box->set_visible_all (true);
***************
*** 150,153 ****
--- 162,168 ----
if (mode == SAVE_SCREEN)
{
+ sprintf (gametime, "Day %i - %02i:%02i", gamedate::day (),
+ gamedate::hour (), gamedate::minute ());
+
shot = new win_image ();
shot->move (5, 2);
***************
*** 157,164 ****
shot->pack ();
entry = new win_write ();
entry->set_font (*font);
! entry->move (100, 2);
! ((label_input*) entry)->resize (130, 54);
entry->set_text ("Empty Slot");
entry->set_cursor_visible (false);
--- 172,187 ----
shot->pack ();
+ date = new win_label ();
+ date->move (100, 2);
+ ((label*)date)->resize (130, 14);
+ date->set_font (*yellow);
+ date->set_text (gametime);
+ date->set_cursor_visible (false);
+ date->pack();
+
entry = new win_write ();
entry->set_font (*font);
! entry->move (100, 18);
! ((label_input*) entry)->resize (130, 40);
entry->set_text ("Empty Slot");
entry->set_cursor_visible (false);
***************
*** 171,174 ****
--- 194,198 ----
box->resize (230, 58);
box->add (shot);
+ box->add (date);
box->add (entry);
box->set_visible_all (true);
***************
*** 274,277 ****
--- 298,302 ----
if (gdata != NULL)
{
+ gdata->set_gametime (gametime);
string filepath = gdata->directory ();
filepath += "/preview.pnm";
Index: data_screen.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/data_screen.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** data_screen.h 29 Oct 2001 15:58:37 -0000 1.10
--- data_screen.h 22 Aug 2002 17:56:40 -0000 1.11
***************
*** 118,121 ****
--- 118,122 ----
int mode; // Whether we're saving or loading
bool aborted; // Indicates whether action has been
cancelled
+ char gametime[20]; // time when saving the game
};
Index: gamedata.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gamedata.cc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** gamedata.cc 20 Aug 2002 17:40:40 -0000 1.26
--- gamedata.cc 22 Aug 2002 17:56:40 -0000 1.27
***************
*** 104,107 ****
--- 104,112 ----
}
+ void gamedata::set_gametime (string time)
+ {
+ Gametime = time;
+ }
+
bool gamedata::load_characters (u_int32 pos)
{
Index: gamedata.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gamedata.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** gamedata.h 26 May 2002 09:27:27 -0000 1.12
--- gamedata.h 22 Aug 2002 17:56:40 -0000 1.13
***************
*** 149,152 ****
--- 149,158 ----
void set_directory (string);
+ /**
+ * Set the in-game time of the saved %game.
+ *
+ * @param string In-game time of the saved %game.
+ */
+ void set_gametime (string);
//@}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src data_screen.cc,1.22,1.23 data_screen.h,1.10,1.11 gamedata.cc,1.26,1.27 gamedata.h,1.12,1.13,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: wastesedge/po remove-potcdate.sin,NONE,1.1 Makevars,1.1,1.2 fr.po,1.2,1.3
- Next by Date:
[Adonthell-commits] CVS: adonthell config.status,1.15,1.16 configure.in,1.67,1.68 missing,1.3,1.4
- Previous by thread:
[Adonthell-commits] CVS: wastesedge/po remove-potcdate.sin,NONE,1.1 Makevars,1.1,1.2 fr.po,1.2,1.3
- Next by thread:
[Adonthell-commits] CVS: adonthell config.status,1.15,1.16 configure.in,1.67,1.68 missing,1.3,1.4
- Index(es):