[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src dialog.cc,1.26,1.27 dialog.h,1.49
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src dialog.cc,1.26,1.27 dialog.h,1.49,1.50 dialog_screen.cc,1.7,1.8 lex.prefs.cc,1.10,1.11 |
Date: |
Sat, 27 Apr 2002 18:08:31 -0400 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv26412
Modified Files:
dialog.cc dialog.h dialog_screen.cc lex.prefs.cc
Log Message:
FIXED: Portrait and name match now
Index: dialog.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog.cc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** dialog.cc 25 Apr 2002 21:44:44 -0000 1.26
--- dialog.cc 27 Apr 2002 22:08:29 -0000 1.27
***************
*** 32,39 ****
// Constructor
! dialog::dialog ()
{
strings = NULL;
! npc_portrait_= "Default";
}
--- 32,40 ----
// Constructor
! dialog::dialog (character_base *npc)
{
strings = NULL;
! npc_portrait_= npc->get_portrait ();
! npc_name_ = npc->get_name ();
}
***************
*** 185,189 ****
text_.push_back (scan_string (nls::translate (strings[answer])));
! // get the NPC color
char *npc = PyString_AsString (PyList_GetItem (speaker, rnd));
if (npc != NULL)
--- 186,190 ----
text_.push_back (scan_string (nls::translate (strings[answer])));
! // get the NPC color, portrait and name
char *npc = PyString_AsString (PyList_GetItem (speaker, rnd));
if (npc != NULL)
***************
*** 197,200 ****
--- 198,202 ----
npc_color_ = mychar->get_color ();
npc_portrait_ = mychar->get_portrait ();
+ npc_name_ = npc;
}
}
Index: dialog.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** dialog.h 25 Apr 2002 21:44:44 -0000 1.49
--- dialog.h 27 Apr 2002 22:08:29 -0000 1.50
***************
*** 26,30 ****
*/
!
#include "python_class.h"
#include "py_object.h"
--- 26,30 ----
*/
! #include "character_base.h"
#include "python_class.h"
#include "py_object.h"
***************
*** 51,57 ****
/**
* Default constructor.
! *
*/
! dialog ();
/**
--- 51,57 ----
/**
* Default constructor.
! * @param npc The npc this dialogue is assigned to.
*/
! dialog (character_base *npc);
/**
***************
*** 113,117 ****
*
*
! * @return the npc color.
*/
u_int32 npc_color () { return npc_color_; }
--- 113,117 ----
*
*
! * @return the NPC's color.
*/
u_int32 npc_color () { return npc_color_; }
***************
*** 125,128 ****
--- 125,136 ----
string npc_portrait () { return npc_portrait_; }
+ /**
+ * Returns the name to be displayed under the NPC's portrait.
+ *
+ *
+ * @return name of the NPC.
+ */
+ string npc_name () { return npc_name_; }
+
/**
* Returns the number of %text lines available at this point of
***************
*** 155,161 ****
vector<string> text_; // NPC's speech and according Player
responses
vector<string>::iterator i_text;// Iterator for the text_ vector
- u_int32 npc_color_; // The color of the NPC's text
- string npc_portrait_; // Portrait of the NPC currently speaking
vector<s_int32> answers; // The indices with which to call
instance.run ()
vector<s_int32> choices; // Strings player can chose from
--- 163,171 ----
vector<string> text_; // NPC's speech and according Player
responses
vector<string>::iterator i_text;// Iterator for the text_ vector
+ u_int32 npc_color_; // Current NPCs text color
+ string npc_portrait_; // Current NPCs portrait
+ string npc_name_; // Current NPCs name
+
vector<s_int32> answers; // The indices with which to call
instance.run ()
vector<s_int32> choices; // Strings player can chose from
Index: dialog_screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog_screen.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dialog_screen.cc 25 Apr 2002 21:44:44 -0000 1.7
--- dialog_screen.cc 27 Apr 2002 22:08:29 -0000 1.8
***************
*** 49,56 ****
audio::play_wave (-1, 0);
is_running = true;
!
// Init position & size
! win_container::move(20,20);
! win_container::resize(280,105);
// Load the different fonts
--- 49,57 ----
audio::play_wave (-1, 0);
is_running = true;
! portrait = "None";
!
// Init position & size
! win_container::move (20, 20);
! win_container::resize (280, 105);
// Load the different fonts
***************
*** 64,70 ****
theme = win_manager::get_theme ("original");
! set_border(*theme);
! set_background(*theme);
! set_trans_background(true);
// Full or half-sized window
--- 65,71 ----
theme = win_manager::get_theme ("original");
! set_border (*theme);
! set_background (*theme);
! set_trans_background (true);
// Full or half-sized window
***************
*** 76,102 ****
// Init the low level dialogue stuff
! dlg = new dialog;
// Create dialogue window
// The NPC's portrait
face = new win_image();
! face->move(5,5);
! ((image*)face)->resize(64,64);
face->pack();
face->set_visible (true);
// The NPC's name
! name = new win_label();
! name->set_font(*(fonts[0]));
! name->move(5,74);
! ((label*)name)->resize(64,0);
name->set_form (label::AUTO_HEIGHT);
name->set_visible (true);
// The list with the dialogue
! sel = new win_select();
! sel->set_scrollbar(*theme);
! sel->move(80,0);
! sel->resize(200,height());
sel->set_mode (win_select::MODE_BRIGHTNESS);
sel->set_layout (win_container::LIST_LAYOUT);
--- 77,103 ----
// Init the low level dialogue stuff
! dlg = new dialog (mynpc);
// Create dialogue window
// The NPC's portrait
face = new win_image();
! face->move (5, 5);
! ((image*)face)->resize (64, 64);
face->pack();
face->set_visible (true);
// The NPC's name
! name = new win_label ();
! name->set_font (*(fonts[0]));
! name->move (5, 74);
! ((label*)name)->resize (64, 0);
name->set_form (label::AUTO_HEIGHT);
name->set_visible (true);
// The list with the dialogue
! sel = new win_select ();
! sel->set_scrollbar (*theme);
! sel->move (80, 0);
! sel->resize (200, height ());
sel->set_mode (win_select::MODE_BRIGHTNESS);
sel->set_layout (win_container::LIST_LAYOUT);
***************
*** 116,125 ****
win_event::ACTIVATE_KEY);
- // set the NPC's portrait
- portrait = "none";
- set_portrait (mynpc->get_portrait ());
- // ... and name
- set_name (mynpc->get_name ());
-
// add everything to our container
add (face);
--- 117,120 ----
***************
*** 187,192 ****
}
! // update the NPC's portrait
set_portrait (dlg->npc_portrait ());
// Add NPC text and all player reactions to container
--- 182,188 ----
}
! // update the NPC's portrait and name
set_portrait (dlg->npc_portrait ());
+ set_name (dlg->npc_name ());
// Add NPC text and all player reactions to container
***************
*** 257,261 ****
{
face->image::resize (64, 64);
! face->fillrect (0, 0, 64, 64, 0xff00ff);
return;
}
--- 253,257 ----
{
face->image::resize (64, 64);
! face->fillrect (0, 0, 64, 64, 0x00ff00ff);
return;
}
Index: lex.prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/lex.prefs.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** lex.prefs.cc 27 Apr 2002 19:40:46 -0000 1.10
--- lex.prefs.cc 27 Apr 2002 22:08:29 -0000 1.11
***************
*** 1354,1358 ****
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
! extern int isatty YY_PROTO(( int ));
#endif
#endif
--- 1354,1358 ----
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
! #include<unistd.h>
#endif
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src dialog.cc,1.26,1.27 dialog.h,1.49,1.50 dialog_screen.cc,1.7,1.8 lex.prefs.cc,1.10,1.11,
Kai Sterker <address@hidden> <=