home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / objpage.c < prev    next >
Text File  |  1998-06-08  |  16KB  |  563 lines

  1. /*
  2.  * $Source: f:/miner/source/main/editor/rcs/objpage.c $
  3.  * $Revision: 2.0 $
  4.  * $Author: john $
  5.  * $Date: 1995/02/27 11:34:43 $
  6.  * 
  7.  * object selection stuff.
  8.  * 
  9.  * $Log: objpage.c $
  10.  * Revision 2.0  1995/02/27  11:34:43  john
  11.  * Version 2.0! No anonymous unions, Watcom 10.0, with no need
  12.  * for bitmaps.tbl.
  13.  * 
  14.  * Revision 1.37  1995/01/14  19:17:55  john
  15.  * First version of object paging.
  16.  * 
  17.  * Revision 1.36  1995/01/05  16:20:13  mike
  18.  * bah, remove the int3.
  19.  * 
  20.  * Revision 1.35  1995/01/05  12:47:13  mike
  21.  * Move code about to prevent compiler warning.
  22.  * 
  23.  * Revision 1.34  1994/11/18  15:23:55  john
  24.  * Made so the int3 for drawing an invalib object just returns.
  25.  * 
  26.  * Revision 1.33  1994/11/02  16:19:18  matt
  27.  * Moved draw_model_picture() out of editor, and cleaned up code
  28.  * 
  29.  * Revision 1.32  1994/10/23  02:11:18  matt
  30.  * Got rid of obsolete hostage_info stuff
  31.  * 
  32.  * Revision 1.31  1994/09/09  14:41:35  matt
  33.  * New parms for draw_polygon_model()
  34.  * 
  35.  * Revision 1.30  1994/08/29  19:26:53  matt
  36.  * Fixed botches change from yesterday
  37.  * 
  38.  * Revision 1.29  1994/08/28  23:40:35  matt
  39.  * 
  40.  * 
  41.  * Revision 1.28  1994/08/14  23:15:32  matt
  42.  * Added animating bitmap hostages, and cleaned up vclips a bit
  43.  * 
  44.  * Revision 1.27  1994/08/13  14:59:02  matt
  45.  * Finished adding support for miscellaneous objects
  46.  * 
  47.  * Revision 1.26  1994/08/09  16:06:15  john
  48.  * Added the ability to place players.  Made old
  49.  * Player variable be ConsoleObject.
  50.  * 
  51.  * Revision 1.25  1994/07/28  16:59:23  mike
  52.  * objects containing objects.
  53.  * 
  54.  * Revision 1.24  1994/06/08  18:17:25  john
  55.  * Changed the way object types and id's work for hostages
  56.  * and powerups.
  57.  * 
  58.  * Revision 1.23  1994/06/07  16:52:30  matt
  59.  * Made object lighting work correctly; changed name of Ambient_light to
  60.  * Dynamic_light; cleaned up polygobj object rendering a little.
  61.  * 
  62.  * Revision 1.22  1994/05/31  18:42:07  matt
  63.  * Made robot photos unlighted
  64.  * 
  65.  * Revision 1.21  1994/05/26  21:09:34  matt
  66.  * Moved robot stuff out of polygon model and into robot_info struct
  67.  * Made new file, robot.c, to deal with robots
  68.  * 
  69.  * Revision 1.20  1994/05/19  12:10:11  matt
  70.  * Use new vecmat macros and globals
  71.  * 
  72.  * Revision 1.19  1994/05/17  14:45:27  mike
  73.  * Get object type and id from ObjType and ObjId.
  74.  * 
  75.  * Revision 1.18  1994/05/17  12:03:36  mike
  76.  * Deal with little known fact that polygon object != robot.
  77.  * 
  78.  * Revision 1.17  1994/04/29  09:16:56  matt
  79.  * Added support for multiple-piece explosions
  80.  * 
  81.  * Revision 1.16  1994/04/18  14:15:00  john
  82.  * Initial version of robot dialog box.
  83.  * 
  84.  * Revision 1.15  1994/04/11  12:01:36  yuan
  85.  * Fixed resetting to first object on page annoyance.
  86.  * 
  87.  * Revision 1.14  1994/04/01  14:35:50  yuan
  88.  * Removed debug "id %d\n" for placing objects
  89.  * 
  90.  * Revision 1.13  1994/04/01  11:17:04  yuan
  91.  * Added objects to objpage. Added buttons for easier tmap scrolling.
  92.  * Objects are selected fully from objpage and add object menu or pad.
  93.  * 
  94.  * Revision 1.12  1994/03/25  18:42:26  matt
  95.  * Adjusted constant to make robot pictures more correct size
  96.  * 
  97.  * Revision 1.11  1994/03/25  16:57:17  matt
  98.  * New parm to draw_polygon_object(), and draw object "snapshots" in
  99.  * correct size (although this probably doesn't work yet).
  100.  * 
  101.  * Revision 1.10  1994/03/25  14:23:01  matt
  102.  * Disabled lighting when taking "snapshots" of robots
  103.  * 
  104.  * Revision 1.9  1994/03/17  10:47:24  john
  105.  * Corrected all kinds of problems associated with N_polygon_objects.
  106.  * 
  107.  * Revision 1.8  1994/03/16  11:07:31  john
  108.  * Made zoom work a bit better.
  109.  * 
  110.  * Revision 1.7  1994/03/16  10:50:32  john
  111.  * fixed warning with constant length.
  112.  * 
  113.  * Revision 1.6  1994/03/16  10:43:18  john
  114.  * Added controls to rotate/zoom object.
  115.  * 
  116.  * Revision 1.5  1994/03/15  22:23:24  matt
  117.  * Render little bitmap pictures of robots for display on editor page
  118.  * 
  119.  * Revision 1.4  1994/02/01  11:27:14  john
  120.  * Hacked in 8 object types for demo.
  121.  * 
  122.  * Revision 1.3  1994/01/26  16:42:19  john
  123.  * Display numbers instead of bitmaps... made 
  124.  * Num_robot_types or whatever be set to 4
  125.  * in init_object_page... this is a hack!!!
  126.  * 
  127.  * Revision 1.2  1993/12/16  17:26:24  john
  128.  * Moved texture and object selection to texpage and objpage
  129.  * 
  130.  * Revision 1.1  1993/12/16  16:12:57  john
  131.  * Initial revision
  132.  * 
  133.  * 
  134.  */
  135.  
  136.  
  137.  
  138. #pragma off (unreferenced)
  139. static char rcsid[] = "$Id: objpage.c 2.0 1995/02/27 11:34:43 john Exp $";
  140. #pragma on (unreferenced)
  141.  
  142. // Num_robot_types -->  N_polygon_models
  143. // Cur_robot_type --> Cur_robot_type
  144. // Texture[Cur_robot_type]->bitmap  ---> robot_bms[robot_bm_nums[ Cur_robot_type ] ] 
  145.  
  146. #include <stdlib.h>
  147. #include <stdio.h>
  148.  
  149.  
  150. #include "inferno.h"
  151. #include "screens.h"            // For GAME_SCREEN?????
  152. #include "editor.h"            // For TMAP_CURBOX??????
  153. #include "gr.h"                // For canves, font stuff
  154. #include "ui.h"                // For UI_GADGET stuff
  155. #include "object.h"            // For robot_bms
  156. #include "mono.h"                // For debugging
  157. #include "error.h"
  158.  
  159. #include "objpage.h"
  160. #include "bm.h"
  161. #include "player.h"
  162. #include "piggy.h"
  163.  
  164.  
  165. #define OBJS_PER_PAGE 8
  166.  
  167. static UI_GADGET_USERBOX * ObjBox[OBJS_PER_PAGE];
  168. static UI_GADGET_USERBOX * ObjCurrent;
  169.  
  170. static int ObjectPage = 0;
  171.  
  172. //static char Description[8][20] = { "Pig", "Star", "Little\nJosh", "Big\nJosh", "Flying\nPig", "Flying\nStar", 
  173. //"Little\nFlying\nJosh", "Big\nFlying\nJosh" };
  174.  
  175. //static grs_canvas * ObjnameCanvas;
  176. //static char object_filename[13];
  177.  
  178. //static void objpage_print_name( char name[13] ) {
  179. //     short w,h,aw;
  180. //
  181. //    gr_set_current_canvas( ObjnameCanvas );
  182. //    gr_get_string_size( name, &w, &h, &aw );
  183. //    gr_string( 0, 0, name );              
  184. //     //gr_set_fontcolor( CBLACK, CWHITE );
  185. //}
  186.  
  187. //static void objpage_display_name( char *format, ... ) {
  188. //    va_list ap;
  189. //
  190. //    va_start(ap, format);
  191. //   vsprintf(object_filename, format, ap);
  192. //    va_end(ap);
  193. //
  194. //   objpage_print_name(object_filename);
  195. //        
  196. //}
  197.  
  198. #include "vecmat.h"
  199. #include "3d.h"
  200. #include "polyobj.h"
  201. #include "texmap.h"
  202.  
  203. #include "hostage.h"
  204. #include "powerup.h"
  205.  
  206. vms_angvec objpage_view_orient;
  207. fix objpage_view_dist;
  208.  
  209. //this is bad to have the extern, but this snapshot stuff is special
  210. extern int polyobj_lighting;
  211.  
  212.  
  213. //canvas set
  214. //    Type is optional.  If you pass -1, type is determined, else type is used, and id is not xlated through ObjId.
  215. draw_robot_picture(int id, vms_angvec *orient_angles, int type)
  216. {
  217.  
  218.     if (id >= Num_total_object_types)
  219.         return;
  220.  
  221.     if ( type == -1 )    {
  222.         type = ObjType[id];        // Find the object type, given an object id.
  223.         id = ObjId[id];    // Translate to sub-id.
  224.     }
  225.  
  226.     switch (type) {
  227.  
  228.         case OL_HOSTAGE:
  229.             PIGGY_PAGE_IN(Vclip[Hostage_vclip_num[id]].frames[0]);
  230.             gr_bitmap(0,0,&GameBitmaps[Vclip[Hostage_vclip_num[id]].frames[0].index]);
  231.             break;
  232.  
  233.         case OL_POWERUP:
  234.             if ( Powerup_info[id].vclip_num > -1 )    {
  235.                 PIGGY_PAGE_IN(Vclip[Powerup_info[id].vclip_num].frames[0]);
  236.                 gr_bitmap(0,0,&GameBitmaps[Vclip[Powerup_info[id].vclip_num].frames[0].index]);
  237.             }
  238.             break;
  239.  
  240.         case OL_PLAYER:
  241.             draw_model_picture(Player_ship->model_num,orient_angles);        // Draw a poly model below
  242.             break;
  243.  
  244.         case OL_ROBOT:
  245.             draw_model_picture(Robot_info[id].model_num,orient_angles);    // Draw a poly model below
  246.             break;
  247.  
  248.         case OL_CONTROL_CENTER:
  249.         case OL_CLUTTER:
  250.             draw_model_picture(id,orient_angles);
  251.             break;
  252.         default:
  253.             //Int3();    // Invalid type!!!
  254.             return;
  255.     }
  256.  
  257. }
  258.  
  259. void redraw_current_object()
  260. {
  261.     grs_canvas * cc;
  262.  
  263.     cc = grd_curcanv;
  264.     gr_set_current_canvas(ObjCurrent->canvas);
  265.     draw_robot_picture(Cur_robot_type,&objpage_view_orient, -1);
  266.     gr_set_current_canvas(cc);
  267. }
  268.  
  269. void gr_label_box( int i)
  270. {
  271.  
  272.     gr_clear_canvas(BM_XRGB(0,0,0));
  273.     draw_robot_picture(i,&objpage_view_orient, -1);
  274.  
  275. //    char s[20];
  276. //    sprintf( s, " %d ", i );
  277. //    gr_clear_canvas( BM_XRGB(0,15,0) );
  278. //    gr_set_fontcolor( CWHITE, BM_XRGB(0,15,0) );
  279. //    ui_string_centered(  grd_curcanv->cv_bitmap.bm_w/2, grd_curcanv->cv_bitmap.bm_h/2, Description[i] );
  280. }
  281.  
  282. int objpage_goto_first()
  283. {
  284.     int i;
  285.  
  286.     ObjectPage=0;
  287.     for (i=0;  i<OBJS_PER_PAGE; i++ ) {
  288.         gr_set_current_canvas(ObjBox[i]->canvas);
  289.         if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types ) {
  290.             //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  291.             gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  292.         } else
  293.             gr_clear_canvas( CGREY );
  294.     }
  295.  
  296.     return 1;
  297. }
  298.  
  299. int objpage_goto_last()
  300. {
  301.     int i;
  302.  
  303.     ObjectPage=(Num_total_object_types)/OBJS_PER_PAGE;
  304.     for (i=0;  i<OBJS_PER_PAGE; i++ )
  305.     {
  306.         gr_set_current_canvas(ObjBox[i]->canvas);
  307.         if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types )
  308.         {
  309.             //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  310.             gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  311.         } else {
  312.             gr_clear_canvas( CGREY );
  313.         }
  314.     }
  315.     return 1;
  316. }
  317.  
  318. static int objpage_goto_prev()
  319. {
  320.     int i;
  321.     if (ObjectPage > 0) {
  322.         ObjectPage--;
  323.         for (i=0;  i<OBJS_PER_PAGE; i++ )
  324.         {
  325.             gr_set_current_canvas(ObjBox[i]->canvas);
  326.             if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types)
  327.             {
  328.                 //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  329.                 gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  330.             } else {
  331.                 gr_clear_canvas( CGREY );
  332.             }
  333.         }
  334.     }
  335.     return 1;
  336. }
  337.  
  338. static int objpage_goto_next()
  339. {
  340.     int i;
  341.     if ((ObjectPage+1)*OBJS_PER_PAGE < Num_total_object_types) {
  342.         ObjectPage++;
  343.         for (i=0;  i<OBJS_PER_PAGE; i++ )
  344.         {
  345.             gr_set_current_canvas(ObjBox[i]->canvas);
  346.             if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types)
  347.             {
  348.                 //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  349.                 gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  350.             } else {
  351.                 gr_clear_canvas( CGREY );
  352.             }
  353.         }
  354.     }
  355.     return 1;
  356. }
  357.  
  358. int objpage_grab_current(int n)
  359. {
  360.     int i;
  361.  
  362.     if ( (n<0) || ( n>= Num_total_object_types) ) return 0;
  363.     
  364.     ObjectPage = n / OBJS_PER_PAGE;
  365.     
  366.     if (ObjectPage*OBJS_PER_PAGE < Num_total_object_types) {
  367.         for (i=0;  i<OBJS_PER_PAGE; i++ )
  368.         {
  369.             gr_set_current_canvas(ObjBox[i]->canvas);
  370.             if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types)
  371.             {
  372.                 //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  373.                 gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  374.             } else {
  375.                 gr_clear_canvas( CGREY );
  376.             }
  377.         }
  378.     }
  379.  
  380.     Cur_robot_type = n;
  381.     gr_set_current_canvas(ObjCurrent->canvas);
  382.     //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] );
  383.     gr_label_box(Cur_robot_type);
  384.  
  385.     //objpage_display_name( Texture[Cur_robot_type]->filename );
  386.     
  387.     return 1;
  388. }
  389.  
  390. int objpage_goto_next_object()
  391. {
  392.     int n;
  393.  
  394.     n = Cur_robot_type++;
  395.      if (n >= Num_total_object_types) n = 0;
  396.  
  397.     objpage_grab_current(n);
  398.  
  399.     return 1;
  400.  
  401. }
  402.  
  403. #define OBJBOX_X    (TMAPBOX_X)    //location of first one
  404. #define OBJBOX_Y    (OBJCURBOX_Y - 24 )
  405. #define OBJBOX_W    64
  406. #define OBJBOX_H    64
  407.  
  408. #define DELTA_ANG 0x800
  409.  
  410. int objpage_increase_pitch()
  411. {
  412.     objpage_view_orient.p += DELTA_ANG;
  413.     redraw_current_object();
  414.     return 1;
  415. }
  416.  
  417. int objpage_decrease_pitch()
  418. {
  419.     objpage_view_orient.p -= DELTA_ANG;
  420.     redraw_current_object();
  421.     return 1;
  422. }
  423.  
  424. int objpage_increase_heading()
  425. {
  426.     objpage_view_orient.h += DELTA_ANG;
  427.     redraw_current_object();
  428.     return 1;
  429. }
  430.  
  431. int objpage_decrease_heading()
  432. {
  433.     objpage_view_orient.h -= DELTA_ANG;
  434.     redraw_current_object();
  435.     return 1;
  436. }
  437.  
  438. int objpage_increase_bank()
  439. {
  440.     objpage_view_orient.b += DELTA_ANG;
  441.     redraw_current_object();
  442.     return 1;
  443. }
  444.  
  445. int objpage_decrease_bank()
  446. {
  447.     objpage_view_orient.b -= DELTA_ANG;
  448.     redraw_current_object();
  449.     return 1;
  450. }
  451.  
  452. int objpage_increase_z()
  453. {
  454.     objpage_view_dist -= 0x8000;
  455.     redraw_current_object();
  456.     return 1;
  457. }
  458.  
  459. int objpage_decrease_z()
  460. {
  461.     objpage_view_dist += 0x8000;
  462.     redraw_current_object();
  463.     return 1;
  464. }
  465.  
  466. int objpage_reset_orient()
  467. {
  468.     objpage_view_orient.p = 0;
  469.     objpage_view_orient.b = 0;
  470.     objpage_view_orient.h = -0x8000;
  471.     //objpage_view_dist = DEFAULT_VIEW_DIST;
  472.     redraw_current_object();
  473.     return 1;
  474. }
  475.  
  476.  
  477. // INIT TEXTURE STUFF
  478.  
  479. void objpage_init( UI_WINDOW *win )
  480. {
  481.     int i;
  482.  
  483.     //Num_total_object_types = N_polygon_models + N_hostage_types + N_powerup_types;
  484.     //Assert (N_polygon_models < MAX_POLYGON_MODELS);
  485.     //Assert (Num_total_object_types < MAX_OBJTYPE );
  486.     //Assert (N_hostage_types < MAX_HOSTAGE_TYPES ); 
  487.     //Assert (N_powerup_types < MAX_POWERUP_TYPES );
  488.     // Assert (N_robot_types < MAX_ROBOTS);
  489.  
  490.     ui_add_gadget_button( win, OBJCURBOX_X + 00, OBJCURBOX_Y - 27, 30, 20, "<<", objpage_goto_prev );
  491.     ui_add_gadget_button( win, OBJCURBOX_X + 32, OBJCURBOX_Y - 27, 30, 20, ">>", objpage_goto_next );
  492.  
  493.     ui_add_gadget_button( win, OBJCURBOX_X + 00, OBJCURBOX_Y - 54, 30, 20, "B", objpage_goto_first );
  494.     ui_add_gadget_button( win, OBJCURBOX_X + 32, OBJCURBOX_Y - 54, 30, 20, "E", objpage_goto_last );
  495.  
  496.     ui_add_gadget_button( win, OBJCURBOX_X + 25, OBJCURBOX_Y + 62, 22, 13, "P-", objpage_decrease_pitch );
  497.     ui_add_gadget_button( win, OBJCURBOX_X + 25, OBJCURBOX_Y + 90, 22, 13, "P+", objpage_increase_pitch );
  498.     ui_add_gadget_button( win, OBJCURBOX_X + 00, OBJCURBOX_Y + 90, 22, 13, "B-", objpage_decrease_bank );
  499.     ui_add_gadget_button( win, OBJCURBOX_X + 50, OBJCURBOX_Y + 90, 22, 13, "B+", objpage_increase_bank );
  500.     ui_add_gadget_button( win, OBJCURBOX_X + 00, OBJCURBOX_Y + 76, 22, 13, "H-", objpage_decrease_heading );
  501.     ui_add_gadget_button( win, OBJCURBOX_X + 50, OBJCURBOX_Y + 76, 22, 13, "H+", objpage_increase_heading );
  502.     ui_add_gadget_button( win, OBJCURBOX_X + 00, OBJCURBOX_Y + 62, 22, 13, "Z+", objpage_increase_z );
  503.     ui_add_gadget_button( win, OBJCURBOX_X + 50, OBJCURBOX_Y + 62, 22, 13, "Z-", objpage_decrease_z );
  504.     ui_add_gadget_button( win, OBJCURBOX_X + 25, OBJCURBOX_Y + 76, 22, 13, "R", objpage_reset_orient );
  505.  
  506.     for (i=0;i<OBJS_PER_PAGE;i++)
  507.         ObjBox[i] = ui_add_gadget_userbox( win, OBJBOX_X + (i/2)*(2+OBJBOX_W), OBJBOX_Y + (i%2)*(2+OBJBOX_H), OBJBOX_W, OBJBOX_H);
  508.  
  509.     ObjCurrent = ui_add_gadget_userbox( win, OBJCURBOX_X, OBJCURBOX_Y-5, 64, 64 );
  510.  
  511.     objpage_reset_orient();
  512.  
  513.     for (i=0;  i<OBJS_PER_PAGE; i++ )
  514.     {
  515.         gr_set_current_canvas(ObjBox[i]->canvas);
  516.         if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types)
  517.         {
  518.                 //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] );
  519.                 gr_label_box(i+ObjectPage*OBJS_PER_PAGE );
  520.         } else {
  521.             gr_clear_canvas( CGREY );
  522.         }
  523.     }
  524.  
  525. // Don't reset robot_type when we return to editor.
  526. //    Cur_robot_type = ObjectPage*OBJS_PER_PAGE;
  527.     gr_set_current_canvas(ObjCurrent->canvas);
  528.     //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] );
  529.     gr_label_box(Cur_robot_type);
  530.  
  531.     //ObjnameCanvas = gr_create_sub_canvas(&grd_curscreen->sc_canvas, OBJCURBOX_X , OBJCURBOX_Y + OBJBOX_H + 10, 100, 20);
  532.     //gr_set_current_canvas( ObjnameCanvas );
  533.     //gr_set_curfont( ui_small_font ); 
  534.    //gr_set_fontcolor( CBLACK, CWHITE );
  535.     //objpage_display_name( Texture[Cur_robot_type]->filename );
  536.  
  537. }
  538.  
  539. void objpage_close()
  540. {
  541.     //gr_free_sub_canvas(ObjnameCanvas);
  542. }
  543.  
  544.  
  545. // DO TEXTURE STUFF
  546.  
  547. void objpage_do()
  548. {
  549.     int i;
  550.  
  551.     for (i=0; i<OBJS_PER_PAGE; i++ )
  552.     {
  553.         if (ObjBox[i]->b1_clicked && (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types))
  554.         {
  555.             Cur_robot_type = i+ObjectPage*OBJS_PER_PAGE;
  556.             gr_set_current_canvas(ObjCurrent->canvas);
  557.             //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] );
  558.             gr_label_box(Cur_robot_type);
  559.             //objpage_display_name( Texture[Cur_robot_type]->filename );
  560.         }
  561.     }
  562. }
  563.