Update of /cvsroot/playerstage/code/stage/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3274/src

Modified Files:
      Tag: opengl
        block.cc gui_gl.c 
Log Message:
gave blocks height and added 2.5d pioneer model

Index: gui_gl.c
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/Attic/gui_gl.c,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -C2 -d -r1.1.2.23 -r1.1.2.24
*** gui_gl.c    8 Jul 2007 01:44:09 -0000       1.1.2.23
--- gui_gl.c    8 Jul 2007 02:08:53 -0000       1.1.2.24
***************
*** 1048,1052 ****
    else if( event->state & GDK_BUTTON1_MASK && world->win->dragging )
      {
!       printf( "dragging an object\n" );
  
        if( world->win->selected_models )
--- 1048,1052 ----
    else if( event->state & GDK_BUTTON1_MASK && world->win->dragging )
      {
!       //printf( "dragging an object\n" );
  
        if( world->win->selected_models )
***************
*** 1076,1080 ****
    else if( event->state & GDK_BUTTON3_MASK && world->win->dragging ) 
      {
!       printf( "rotating an object\n" );
        
        if( world->win->selected_models )
--- 1076,1080 ----
    else if( event->state & GDK_BUTTON3_MASK && world->win->dragging ) 
      {
!       //printf( "rotating an object\n" );
        
        if( world->win->selected_models )
***************
*** 1085,1089 ****
                           world, &obx, &oby, &obz );
          
!         printf( "rotating model to %f %f\n", obx, oby );
          
          for( GList* it = world->win->selected_models;
--- 1085,1089 ----
                           world, &obx, &oby, &obz );
          
!         //printf( "rotating model to %f %f\n", obx, oby );
          
          for( GList* it = world->win->selected_models;
***************
*** 1129,1133 ****
                      stg_world_t*  world )
  {
!   puts( "RELEASE" );
  
    // stop dragging models when mouse 1 is released
--- 1129,1133 ----
                      stg_world_t*  world )
  {
!   //puts( "RELEASE" );
  
    // stop dragging models when mouse 1 is released

Index: block.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/Attic/block.cc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** block.cc    8 Jul 2007 01:44:09 -0000       1.1.2.1
--- block.cc    8 Jul 2007 02:08:53 -0000       1.1.2.2
***************
*** 137,143 ****
  
    // assuming the blocks currently fit in a square +/- one billion units
!   double minx, miny, maxx, maxy;
    minx = miny =  BILLION;
    maxx = maxy = -BILLION;
    
    GList* it;
--- 137,145 ----
  
    // assuming the blocks currently fit in a square +/- one billion units
!   double minx, miny, maxx, maxy; 
    minx = miny =  BILLION;
    maxx = maxy = -BILLION;
+ 
+   double maxz = 0;
    
    GList* it;
***************
*** 158,161 ****
--- 160,167 ----
          assert( ! isnan( pt->y ) );
        }      
+ 
+       
+       if( (block->height + block->z_offset) > maxz )
+       maxz = (block->height + block->z_offset);
      }
  
***************
*** 165,168 ****
--- 171,176 ----
    double scaley = (maxy - miny);
  
+   double scalez = size->z / maxz;
+ 
    for( it=blocks; it; it=it->next ) // examine all the blocks again
      { 
***************
*** 182,185 ****
--- 190,196 ----
        }
  
+       block->height *= scalez;
+       block->z_offset *= scalez;
+ 
        // recalculate the GL drawlist
        stg_block_update( block );


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to