From ea7ba7ae87bb5e1f707dd448ce818c440337416a Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Thu, 31 Mar 2005 09:38:53 +0000 Subject: [PATCH] remove ObjType, ObjId, ObjStrength and OL_ constants; use "object" instead of "robot" in some places; draw and place reactors with correct modelnum --- ChangeLog | 9 ++++ main/bm.c | 7 +-- main/bm.h | 18 +------- main/bmread.c | 64 +-------------------------- main/editor/editor.h | 10 ++--- main/editor/eglobal.c | 9 ++-- main/editor/eobject.c | 74 ++++++++++++++----------------- main/editor/medrobot.c | 74 +++++++------------------------ main/editor/objpage.c | 99 +++++++++++++++++++++++++----------------- main/editor/objpage.h | 4 +- 10 files changed, 132 insertions(+), 236 deletions(-) diff --git a/ChangeLog b/ChangeLog index d788056a..7d26d2a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-03-31 Chris Taylor + + * main/bm.c, main/bm.h, main/bmread.c, main/editor/editor.h, + main/editor/eglobal.c, main/editor/eobject.c, + main/editor/medrobot.c, main/editor/objpage.c, + main/editor/objpage.h: remove ObjType, ObjId, ObjStrength and + OL_ constants; use "object" instead of "robot" in some places; + draw and place reactors with correct modelnum + 2005-03-29 Bradley Bell * mem/mem.c: remove obsolete malloc.h diff --git a/main/bm.c b/main/bm.c index 28181604..8517eb67 100644 --- a/main/bm.c +++ b/main/bm.c @@ -1,4 +1,4 @@ -/* $Id: bm.c,v 1.48 2005-03-16 23:06:14 btb Exp $ */ +/* $Id: bm.c,v 1.49 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -62,10 +62,7 @@ ubyte Sounds[MAX_SOUNDS]; ubyte AltSounds[MAX_SOUNDS]; #ifdef EDITOR -int Num_total_object_types; -sbyte ObjType[MAX_OBJTYPE]; -sbyte ObjId[MAX_OBJTYPE]; -fix ObjStrength[MAX_OBJTYPE]; +int Num_object_subtypes = 1; #endif //for each model, a model number for dying & dead variants, or -1 if none diff --git a/main/bm.h b/main/bm.h index 9801abac..3b767053 100644 --- a/main/bm.h +++ b/main/bm.h @@ -1,4 +1,4 @@ -/* $Id: bm.h,v 1.14 2005-03-16 23:06:14 btb Exp $ */ +/* $Id: bm.h,v 1.15 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -77,21 +77,7 @@ void bm_close(); // Initializes the Texture[] array of bmd_bitmap structures. void init_textures(); -#define OL_ROBOT 1 -#define OL_HOSTAGE 2 -#define OL_POWERUP 3 -#define OL_CONTROL_CENTER 4 -#define OL_PLAYER 5 -#define OL_CLUTTER 6 //some sort of misc object -#define OL_EXIT 7 //the exit model for external scenes -#define OL_WEAPON 8 //a weapon that can be placed - -#define MAX_OBJTYPE 140 - -extern int Num_total_object_types; // Total number of object types, including robots, hostages, powerups, control centers, faces -extern sbyte ObjType[MAX_OBJTYPE]; // Type of an object, such as Robot, eg if ObjType[11] == OL_ROBOT, then object #11 is a robot -extern sbyte ObjId[MAX_OBJTYPE]; // ID of a robot, within its class, eg if ObjType[11] == 3, then object #11 is the third robot -extern fix ObjStrength[MAX_OBJTYPE]; // initial strength of each object +extern int Num_object_subtypes; // Number of possible IDs for the current type of object to be placed #define MAX_OBJ_BITMAPS 610 diff --git a/main/bmread.c b/main/bmread.c index 0fc1672d..7d2d778c 100644 --- a/main/bmread.c +++ b/main/bmread.c @@ -1,4 +1,4 @@ -/* $Id: bmread.c,v 1.14 2005-02-26 07:04:47 chris Exp $ */ +/* $Id: bmread.c,v 1.15 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -429,10 +429,6 @@ int bm_init_use_tbl() init_polygon_models(); - ObjType[0] = OL_PLAYER; - ObjId[0] = 0; - Num_total_object_types = 1; - for (i=0; icontrol_type = CT_POWERUP; - obj->rtype.vclip_info.vclip_num = Hostage_vclip_num[ObjId[object_type]]; + obj->rtype.vclip_info.vclip_num = Hostage_vclip_num[object_id]; obj->rtype.vclip_info.frametime = Vclip[obj->rtype.vclip_info.vclip_num].frame_time; obj->rtype.vclip_info.framenum = 0; break; - case OL_ROBOT: + case OBJ_ROBOT: - objnum = obj_create(OBJ_ROBOT,ObjId[object_type],segp-Segments,object_pos, - &seg_matrix,Polygon_models[Robot_info[ObjId[object_type]].model_num].rad, - CT_AI,MT_PHYSICS,RT_POLYOBJ); + objnum = obj_create(OBJ_ROBOT, object_id, segp - Segments, object_pos, + &seg_matrix, Polygon_models[Robot_info[object_id].model_num].rad, + CT_AI, MT_PHYSICS, RT_POLYOBJ); if ( objnum < 0 ) return 0; @@ -188,11 +190,11 @@ int place_object(segment *segp, vms_vector *object_pos, int object_type) } break; - case OL_POWERUP: + case OBJ_POWERUP: - objnum = obj_create(OBJ_POWERUP,ObjId[object_type], - segp-Segments,object_pos,&seg_matrix,Powerup_info[ObjId[object_type]].size, - CT_POWERUP,MT_NONE,RT_POWERUP); + objnum = obj_create(OBJ_POWERUP, object_id, + segp - Segments, object_pos, &seg_matrix, Powerup_info[object_id].size, + CT_POWERUP, MT_NONE, RT_POWERUP); if ( objnum < 0 ) return 0; @@ -212,43 +214,29 @@ int place_object(segment *segp, vms_vector *object_pos, int object_type) break; - case OL_CLUTTER: - case OL_CONTROL_CENTER: + case OBJ_CNTRLCEN: { - int obj_type,control_type; - - if (ObjType[object_type]==OL_CONTROL_CENTER) { - obj_type = OBJ_CNTRLCEN; - control_type = CT_CNTRLCEN; - } - else { - obj_type = OBJ_CLUTTER; - control_type = CT_NONE; - } - - objnum = obj_create(obj_type,object_type,segp-Segments,object_pos, - &seg_matrix,Polygon_models[ObjId[object_type]].rad, - control_type,MT_NONE,RT_POLYOBJ); + objnum = obj_create(OBJ_CNTRLCEN, object_id, segp - Segments, object_pos, + &seg_matrix, Polygon_models[object_id].rad, + CT_CNTRLCEN, MT_NONE, RT_POLYOBJ); if ( objnum < 0 ) return 0; obj = &Objects[objnum]; - obj->shields = ObjStrength[object_type]; - //Set polygon-object-specific data - obj->shields = ObjStrength[object_type]; - obj->rtype.pobj_info.model_num = ObjId[object_type]; + obj->shields = 0; // stored in Reactor_strength or calculated + obj->rtype.pobj_info.model_num = Reactors[object_id].model_num; obj->rtype.pobj_info.subobj_flags = 0; break; } - case OL_PLAYER: { - objnum = obj_create(OBJ_PLAYER,ObjId[object_type],segp-Segments,object_pos, - &seg_matrix,Polygon_models[Player_ship->model_num].rad, - CT_NONE,MT_PHYSICS,RT_POLYOBJ); + case OBJ_PLAYER: { + objnum = obj_create(OBJ_PLAYER, object_id, segp - Segments, object_pos, + &seg_matrix, Polygon_models[Player_ship->model_num].rad, + CT_NONE, MT_PHYSICS, RT_POLYOBJ); if ( objnum < 0 ) return 0; @@ -325,7 +313,8 @@ int ObjectPlaceObject(void) vms_vector cur_object_loc; #ifdef SHAREWARE - if (ObjType[Cur_robot_type] == OL_PLAYER) { + if (Cur_object_type == OBJ_PLAYER) + { int num_players = compute_num_players(); Assert(num_players <= MAX_PLAYERS); if (num_players == MAX_PLAYERS) { @@ -336,7 +325,8 @@ int ObjectPlaceObject(void) #endif #ifndef SHAREWARE - if (ObjType[Cur_robot_type] == OL_PLAYER) { + if (Cur_object_type == OBJ_PLAYER) + { int num_players = compute_num_players(); Assert(num_players <= MAX_MULTI_PLAYERS); if (num_players > MAX_PLAYERS) @@ -352,7 +342,7 @@ int ObjectPlaceObject(void) compute_segment_center(&cur_object_loc, Cursegp); old_cur_object_index = Cur_object_index; - rval = place_object(Cursegp, &cur_object_loc, Cur_robot_type); + rval = place_object(Cursegp, &cur_object_loc, Cur_object_type, Cur_object_id); if (old_cur_object_index != Cur_object_index) Objects[Cur_object_index].rtype.pobj_info.tmap_override = -1; @@ -372,7 +362,7 @@ int ObjectPlaceObjectTmap(void) compute_segment_center(&cur_object_loc, Cursegp); old_cur_object_index = Cur_object_index; - rval = place_object(Cursegp, &cur_object_loc, Cur_robot_type); + rval = place_object(Cursegp, &cur_object_loc, Cur_object_type, Cur_object_id); if ((Cur_object_index != old_cur_object_index) && (Objects[Cur_object_index].render_type == RT_POLYOBJ)) Objects[Cur_object_index].rtype.pobj_info.tmap_override = CurrentTexture; diff --git a/main/editor/medrobot.c b/main/editor/medrobot.c index 09e2cd78..19856f1e 100644 --- a/main/editor/medrobot.c +++ b/main/editor/medrobot.c @@ -1,4 +1,4 @@ -/* $Id: medrobot.c,v 1.5 2005-01-24 22:26:06 schaffner Exp $ */ +/* $Id: medrobot.c,v 1.6 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -19,7 +19,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ #ifdef RCS -static char rcsid[] = "$Id: medrobot.c,v 1.5 2005-01-24 22:26:06 schaffner Exp $"; +static char rcsid[] = "$Id: medrobot.c,v 1.6 2005-03-31 09:38:53 chris Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -79,38 +79,6 @@ static int old_object; static fix Time; static vms_angvec angles={0,0,0}, goody_angles={0,0,0}; -//------------------------------------------------------------------------- -// Given a pointer to an object, returns a number that cooresponds to the -// object id as used in the objpage stuff. -//------------------------------------------------------------------------- -int get_object_id( object * obj ) -{ - int i; - int goal_type; - - switch( obj->type ) { - case OBJ_PLAYER: goal_type=OL_PLAYER; break; - case OBJ_ROBOT: goal_type=OL_ROBOT; break; - case OBJ_POWERUP: goal_type=OL_POWERUP; break; - case OBJ_CNTRLCEN: goal_type=OL_CONTROL_CENTER; break; - case OBJ_HOSTAGE: goal_type=OL_HOSTAGE; break; - case OBJ_CLUTTER: goal_type=OL_CLUTTER; break; - default: - Int3(); // Invalid object type - return -1; - } - - // Find first object with the same type as this - // one and then add the object id to that to find - // the offset into the list. - - for (i=0; i< Num_total_object_types; i++ ) { - if ( ObjType[i]==goal_type) - return obj->id + i; - } - return -1; -} - void call_init_ai_object(object *objp, int behavior) { int hide_segment; @@ -166,7 +134,7 @@ int RobotNextType() obj->shields = Robot_info[obj->id].strength; call_init_ai_object(obj, AIB_NORMAL); - Cur_robot_type = obj->id; + Cur_object_id = obj->id; } } Update_flags |= UF_WORLD_CHANGED; @@ -195,7 +163,7 @@ int RobotPrevType() obj->shields = Robot_info[obj->id].strength; call_init_ai_object(obj, AIB_NORMAL); - Cur_robot_type = obj->id; + Cur_object_id = obj->id; } } Update_flags |= UF_WORLD_CHANGED; @@ -472,10 +440,11 @@ int LocalObjectPlaceObject(void) Cur_goody_count = 0; - while (ObjType[Cur_robot_type] != OL_ROBOT) { // && (ObjType[Cur_robot_type] != OL_POWERUP)) { - Cur_robot_type++; - if (Cur_robot_type >= N_robot_types) - Cur_robot_type = 0; + if (Cur_object_type != OBJ_ROBOT) + { + Cur_object_type = OBJ_ROBOT; + Cur_object_id = 3; // class 1 drone + Num_object_subtypes = N_robot_types; } rval = ObjectPlaceObject(); @@ -642,11 +611,11 @@ void do_robot_window() // Redraw the object in the little 64x64 box //------------------------------------------------------------ if (Cur_object_index > -1 ) { - int id; + object *obj = &Objects[Cur_object_index]; + gr_set_current_canvas( RobotViewBox->canvas ); - id = get_object_id(&Objects[Cur_object_index]); - if ( id > -1 ) - draw_robot_picture(id, &angles, -1 ); + if ( obj->id > -1 ) + draw_object_picture(obj->id, &angles, obj->type ); else gr_clear_canvas( CGREY ); angles.h += fixmul(0x1000, DeltaTime ); @@ -662,21 +631,10 @@ void do_robot_window() // Redraw the contained object in the other little box //------------------------------------------------------------ if ((Cur_object_index > -1 ) && (Cur_goody_count > 0)) { - int id; - gr_set_current_canvas( ContainsViewBox->canvas ); - id = Cur_goody_id; - if ( id > -1 ) { - int ol_type=0; - if (Cur_goody_type == OBJ_ROBOT) - ol_type = OL_ROBOT; - else if (Cur_goody_type == OBJ_POWERUP) - ol_type = OL_POWERUP; - else - Int3(); // Error? Unknown goody type! - - draw_robot_picture(id, &goody_angles, ol_type ); - } else + if ( Cur_goody_id > -1 ) + draw_object_picture(Cur_goody_id, &goody_angles, Cur_goody_type); + else gr_clear_canvas( CGREY ); goody_angles.h += fixmul(0x1000, DeltaTime ); } else { diff --git a/main/editor/objpage.c b/main/editor/objpage.c index 932ff817..1d4804c3 100644 --- a/main/editor/objpage.c +++ b/main/editor/objpage.c @@ -1,4 +1,4 @@ -/* $Id: objpage.c,v 1.3 2004-12-19 15:21:11 btb Exp $ */ +/* $Id: objpage.c,v 1.4 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -19,7 +19,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ #ifdef RCS -static char rcsid[] = "$Id: objpage.c,v 1.3 2004-12-19 15:21:11 btb Exp $"; +static char rcsid[] = "$Id: objpage.c,v 1.4 2005-03-31 09:38:53 chris Exp $"; #endif // Num_robot_types --> N_polygon_models @@ -47,7 +47,7 @@ static char rcsid[] = "$Id: objpage.c,v 1.3 2004-12-19 15:21:11 btb Exp $"; #include "bm.h" #include "player.h" #include "piggy.h" - +#include "cntrlcen.h" #define OBJS_PER_PAGE 8 @@ -98,43 +98,37 @@ extern int polyobj_lighting; //canvas set -// Type is optional. If you pass -1, type is determined, else type is used, and id is not xlated through ObjId. -void draw_robot_picture(int id, vms_angvec *orient_angles, int type) +void draw_object_picture(int id, vms_angvec *orient_angles, int type) { - if (id >= Num_total_object_types) + if (id >= Num_object_subtypes) return; - if ( type == -1 ) { - type = ObjType[id]; // Find the object type, given an object id. - id = ObjId[id]; // Translate to sub-id. - } - switch (type) { - case OL_HOSTAGE: + case OBJ_HOSTAGE: PIGGY_PAGE_IN(Vclip[Hostage_vclip_num[id]].frames[0]); gr_bitmap(0,0,&GameBitmaps[Vclip[Hostage_vclip_num[id]].frames[0].index]); break; - case OL_POWERUP: + case OBJ_POWERUP: if ( Powerup_info[id].vclip_num > -1 ) { PIGGY_PAGE_IN(Vclip[Powerup_info[id].vclip_num].frames[0]); gr_bitmap(0,0,&GameBitmaps[Vclip[Powerup_info[id].vclip_num].frames[0].index]); } break; - case OL_PLAYER: + case OBJ_PLAYER: draw_model_picture(Player_ship->model_num,orient_angles); // Draw a poly model below break; - case OL_ROBOT: + case OBJ_ROBOT: draw_model_picture(Robot_info[id].model_num,orient_angles); // Draw a poly model below break; - case OL_CONTROL_CENTER: - case OL_CLUTTER: - draw_model_picture(id,orient_angles); + case OBJ_CNTRLCEN: + case OBJ_CLUTTER: + draw_model_picture(Reactors[id].model_num, orient_angles); break; default: //Int3(); // Invalid type!!! @@ -149,7 +143,7 @@ void redraw_current_object() cc = grd_curcanv; gr_set_current_canvas(ObjCurrent->canvas); - draw_robot_picture(Cur_robot_type,&objpage_view_orient, -1); + draw_object_picture(Cur_object_id, &objpage_view_orient, Cur_object_type); gr_set_current_canvas(cc); } @@ -157,7 +151,7 @@ void gr_label_box( int i) { gr_clear_canvas(BM_XRGB(0,0,0)); - draw_robot_picture(i,&objpage_view_orient, -1); + draw_object_picture(i, &objpage_view_orient, Cur_object_type); // char s[20]; // sprintf( s, " %d ", i ); @@ -173,7 +167,7 @@ int objpage_goto_first() ObjectPage=0; for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types ) { + if (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes ) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); } else @@ -187,11 +181,11 @@ int objpage_goto_last() { int i; - ObjectPage=(Num_total_object_types)/OBJS_PER_PAGE; + ObjectPage=(Num_object_subtypes)/OBJS_PER_PAGE; for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types ) + if (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes ) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); @@ -210,7 +204,7 @@ static int objpage_goto_prev() for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types) + if (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); @@ -225,12 +219,12 @@ static int objpage_goto_prev() static int objpage_goto_next() { int i; - if ((ObjectPage+1)*OBJS_PER_PAGE < Num_total_object_types) { + if ((ObjectPage+1)*OBJS_PER_PAGE < Num_object_subtypes) { ObjectPage++; for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types) + if (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); @@ -246,15 +240,15 @@ int objpage_grab_current(int n) { int i; - if ( (n<0) || ( n>= Num_total_object_types) ) return 0; + if ((n < 0) || (n >= Num_object_subtypes)) return 0; ObjectPage = n / OBJS_PER_PAGE; - if (ObjectPage*OBJS_PER_PAGE < Num_total_object_types) { + if (ObjectPage*OBJS_PER_PAGE < Num_object_subtypes) { for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types) + if (i + ObjectPage*OBJS_PER_PAGE < Num_object_subtypes) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); @@ -264,10 +258,10 @@ int objpage_grab_current(int n) } } - Cur_robot_type = n; + Cur_object_id = n; gr_set_current_canvas(ObjCurrent->canvas); //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] ); - gr_label_box(Cur_robot_type); + gr_label_box(Cur_object_id); //objpage_display_name( Texture[Cur_robot_type]->filename ); @@ -276,12 +270,37 @@ int objpage_grab_current(int n) int objpage_goto_next_object() { - int n; + // there should be a pop-up menu for this + switch (Cur_object_type) + { + case OBJ_ROBOT: + Cur_object_type = OBJ_HOSTAGE; + Num_object_subtypes = 1; + break; + + case OBJ_HOSTAGE: + Cur_object_type = OBJ_PLAYER; + Num_object_subtypes = 1; // can have anarchy/coop, but this is handled automatically + break; - n = Cur_robot_type++; - if (n >= Num_total_object_types) n = 0; + case OBJ_PLAYER: + Cur_object_type = OBJ_POWERUP; + Num_object_subtypes = N_powerup_types; + break; + + case OBJ_POWERUP: + Cur_object_type = OBJ_CNTRLCEN; + Num_object_subtypes = Num_reactors; + break; + + case OBJ_CNTRLCEN: + default: + Cur_object_type = OBJ_ROBOT; + Num_object_subtypes = N_robot_types; + break; + } - objpage_grab_current(n); + objpage_grab_current(0); return 1; @@ -400,7 +419,7 @@ void objpage_init( UI_WINDOW *win ) for (i=0; icanvas); - if (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types) + if (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes) { //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ i+ObjectPage*OBJS_PER_PAGE ] ] ); gr_label_box(i+ObjectPage*OBJS_PER_PAGE ); @@ -413,7 +432,7 @@ void objpage_init( UI_WINDOW *win ) // Cur_robot_type = ObjectPage*OBJS_PER_PAGE; gr_set_current_canvas(ObjCurrent->canvas); //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] ); - gr_label_box(Cur_robot_type); + gr_label_box(Cur_object_id); //ObjnameCanvas = gr_create_sub_canvas(&grd_curscreen->sc_canvas, OBJCURBOX_X , OBJCURBOX_Y + OBJBOX_H + 10, 100, 20); //gr_set_current_canvas( ObjnameCanvas ); @@ -437,12 +456,12 @@ void objpage_do() for (i=0; ib1_clicked && (i+ObjectPage*OBJS_PER_PAGE < Num_total_object_types)) + if (ObjBox[i]->b1_clicked && (i+ObjectPage*OBJS_PER_PAGE < Num_object_subtypes)) { - Cur_robot_type = i+ObjectPage*OBJS_PER_PAGE; + Cur_object_id = i+ObjectPage*OBJS_PER_PAGE; gr_set_current_canvas(ObjCurrent->canvas); //gr_ubitmap(0,0, robot_bms[robot_bm_nums[ Cur_robot_type ] ] ); - gr_label_box(Cur_robot_type); + gr_label_box(Cur_object_id); //objpage_display_name( Texture[Cur_robot_type]->filename ); } } diff --git a/main/editor/objpage.h b/main/editor/objpage.h index 7c26b70a..eaabff50 100644 --- a/main/editor/objpage.h +++ b/main/editor/objpage.h @@ -1,4 +1,4 @@ -/* $Id: objpage.h,v 1.2 2004-12-19 14:52:48 btb Exp $ */ +/* $Id: objpage.h,v 1.3 2005-03-31 09:38:53 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -30,6 +30,6 @@ void objpage_init( UI_WINDOW *win ); void objpage_close(); void objpage_do(); -extern void draw_robot_picture(int id, vms_angvec *orient_angles, int type); +extern void draw_object_picture(int id, vms_angvec *orient_angles, int type); #endif -- 2.39.2