[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src main.cc,1.39.2.21,1.39.2.22 landm
From: |
Alexandre Courbot <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src main.cc,1.39.2.21,1.39.2.22 landmap.cc,1.18.2.11,1.18.2.12 |
Date: |
Thu, 04 Apr 2002 13:10:57 -0500 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv9239/src
Modified Files:
Tag: Branch_road_to_0-4
main.cc landmap.cc
Log Message:
Updated map engine.
Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.39.2.21
retrieving revision 1.39.2.22
diff -C2 -r1.39.2.21 -r1.39.2.22
*** main.cc 3 Apr 2002 16:11:30 -0000 1.39.2.21
--- main.cc 4 Apr 2002 18:10:54 -0000 1.39.2.22
***************
*** 153,156 ****
--- 153,160 ----
mchar->set_limits(16,12);
+ // Quick fix for the character size.
+ for (map_placeable::iterator it = mchar->begin(); it != mchar->end();
++it)
+ it->second.zsize += 5;
+
// Adding map objects
map_object_with_gfx * mobj;
***************
*** 298,350 ****
{
mapsquare * sq = gc.lmap.get (i, j);
! for (mapsquare::iterator it = sq->begin ();
! it != sq->end (); it++)
{
! if (it->x () == i && it->y () == j)
! drawqueue.push_back (*it);
}
! }
! }
drawqueue.sort();
- // sort (drawqueue.begin (), drawqueue.end (), boah);
! for (list <mapsquare_info>::iterator it = drawqueue.begin ();
! it != drawqueue.end (); it++)
{
! switch ((*it).obj->type ())
! {
! case CHARACTER:
! ((map_character_with_gfx *)
! (*it).obj)->draw ((*it).x () * mapsquare_size +
(*it).ox (),
! (*it).y () * mapsquare_size +
(*it).oy ());
! // ((map_character_with_gfx *)
! // (*it).obj)->draw_walkable ((*it).x () *
mapsquare_size + (*it).ox (),
! // (*it).y () * mapsquare_size +
(*it).oy ());
! // ((map_character_with_gfx *)
! // (*it).obj)->draw_border ((*it).x () *
mapsquare_size + (*it).ox (),
! // (*it).y () * mapsquare_size +
(*it).oy ());
! break;
!
! case OBJECT:
! ((map_object_with_gfx *)
! (*it).obj)->draw ((*it).x () * mapsquare_size +
(*it).ox (),
! (*it).y () * mapsquare_size +
(*it).oy () - (*it).z());
! // ((map_object_with_gfx *)
! // (*it).obj)->draw_walkable ((*it).x () *
mapsquare_size + (*it).ox (),
! // (*it).y () * mapsquare_size +
(*it).oy ());
! // ((map_object_with_gfx *)
! // (*it).obj)->draw_border ((*it).x () *
mapsquare_size + (*it).ox (),
! // (*it).y () * mapsquare_size +
(*it).oy ());
! break;
!
! default:
! break;
! }
}
!
! drawqueue.clear ();
!
!
if (gc.draw_grid)
{
--- 302,360 ----
{
mapsquare * sq = gc.lmap.get (i, j);
! mapsquare::iterator it = sq->end();
! while (it != sq->begin())
{
! --it;
! if (!it->oy())
! {
! if (it->x () == i && it->y () == j)
! drawqueue.push_back(*it);
! }
! else
! {
! if (it->x () == i && it->y () == j - 1)
! drawqueue.push_back(*it);
! }
!
}
! }
! // }
! // for (mapsquare::iterator it = sq->begin ();
! // it != sq->end (); it++)
! // {
! // if (it->x () == i && it->y () == j)
! // drawqueue.push_back (*it);
! // }
! // }
! // }
drawqueue.sort();
! for (list <mapsquare_info>::iterator it = drawqueue.begin ();
! it != drawqueue.end (); it++)
! {
! switch ((*it).obj->type ())
{
! case CHARACTER:
! ((map_character_with_gfx *)
! (*it).obj)->draw ((*it).x () * mapsquare_size + (*it).ox
(),
! (*it).y () * mapsquare_size + (*it).oy
());
! break;
!
! case OBJECT:
! ((map_object_with_gfx *)
! (*it).obj)->draw ((*it).x () * mapsquare_size + (*it).ox
(),
! (*it).y () * mapsquare_size + (*it).oy
() - (*it).z());
! break;
!
! default:
! break;
}
! }
!
! drawqueue.clear ();
! }
!
!
if (gc.draw_grid)
{
***************
*** 358,362 ****
screen::show ();
screen::clear ();
-
}
--- 368,371 ----
Index: landmap.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/landmap.cc,v
retrieving revision 1.18.2.11
retrieving revision 1.18.2.12
diff -C2 -r1.18.2.11 -r1.18.2.12
*** landmap.cc 3 Apr 2002 16:03:20 -0000 1.18.2.11
--- landmap.cc 4 Apr 2002 18:10:54 -0000 1.18.2.12
***************
*** 37,40 ****
--- 37,45 ----
if (oy() > mi.oy()) return false;
+ if (obj->type() == OBJECT) return true;
+ if (obj->type() == CHARACTER) return false;
+ // if (z() + obj->current_state()->zsize < mi.z() +
mi.obj->current_state()->zsize) return true;
+ // if (z() + obj->current_state()->zsize > mi.z() +
mi.obj->current_state()->zsize) return false;
+
// if ((y() * mapsquare_size) + oy() + mapsquare_size <=
// (mi.y() - (mi.obj->current_state()->area_height() - 1)) *
mapsquare_size + mi.oy()) return true;
***************
*** 43,47 ****
// mapsquare_size + mi.y() * mapsquare_size + mi.oy()) return false;
- // if (z() + obj->current_state()->zsize < mi.z() +
mi.obj->current_state()->zsize) return true;
// If the objects are at the same y position, we better
// make an arbitrary test to make sure a moving object
--- 48,51 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src main.cc,1.39.2.21,1.39.2.22 landmap.cc,1.18.2.11,1.18.2.12,
Alexandre Courbot <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit gui_settings.cc,NONE,1.1.2.1 gui_settings.h,NONE,1.1.2.1 Makefile.am,1.41.2.10,1.41.2.11 dlg_module.cc,1.1.2.12,1.1.2.13 dlg_module_entry.cc,1.1.2.2,1.1.2.3 dlg_module_entry.h,1.1.2.2,1.1.2.3 dlg_types.h,1.1.2.7,1.1.2.8 gui_circle.cc,1.1.2.5,1.1.2.6 gui_circle.h,1.1.2.3,1.1.2.4 gui_dlgedit.cc,1.1.2.13,1.1.2.14 gui_dlgedit.h,1.1.2.9,1.1.2.10 gui_dlgedit_events.cc,1.1.2.7,1.1.2.8 gui_graph.cc,1.1.2.17,1.1.2.18 lex.loadlg.cc,1.12.4.2,1.12.4.3 loadlg.l,1.9.4.2,1.9.4.3 main.cc,1.52.2.4,1.52.2.5
- Next by Date:
[Adonthell-commits] CVS: adonthell configure.in,1.50.2.9,1.50.2.10
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit gui_settings.cc,NONE,1.1.2.1 gui_settings.h,NONE,1.1.2.1 Makefile.am,1.41.2.10,1.41.2.11 dlg_module.cc,1.1.2.12,1.1.2.13 dlg_module_entry.cc,1.1.2.2,1.1.2.3 dlg_module_entry.h,1.1.2.2,1.1.2.3 dlg_types.h,1.1.2.7,1.1.2.8 gui_circle.cc,1.1.2.5,1.1.2.6 gui_circle.h,1.1.2.3,1.1.2.4 gui_dlgedit.cc,1.1.2.13,1.1.2.14 gui_dlgedit.h,1.1.2.9,1.1.2.10 gui_dlgedit_events.cc,1.1.2.7,1.1.2.8 gui_graph.cc,1.1.2.17,1.1.2.18 lex.loadlg.cc,1.12.4.2,1.12.4.3 loadlg.l,1.9.4.2,1.9.4.3 main.cc,1.52.2.4,1.52.2.5
- Next by thread:
[Adonthell-commits] CVS: adonthell configure.in,1.50.2.9,1.50.2.10
- Index(es):