Fixed parsing unit and not player.
This commit is contained in:
parent
789d2f5281
commit
31721024d6
3 changed files with 8 additions and 3 deletions
src
|
@ -124,6 +124,11 @@
|
|||
|
||||
#include "video.h"
|
||||
|
||||
#ifndef __STRUCT_PLAYER__
|
||||
#define __STRUCT_PLAYER__
|
||||
typedef struct _player_ Player;
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
-- Defines
|
||||
----------------------------------------------------------------------------*/
|
||||
|
@ -205,7 +210,7 @@ extern IconId IconByIdent(const char* ident); /// name -> icon
|
|||
extern const char* IdentOfIcon(IconId icon); /// icon -> name
|
||||
|
||||
/// draw icon of an unit
|
||||
extern void DrawUnitIcon(const void*,IconId,unsigned,unsigned,unsigned);
|
||||
extern void DrawUnitIcon(const Player*,IconId,unsigned,unsigned,unsigned);
|
||||
|
||||
extern void SaveIcons(FILE*); /// Save icons
|
||||
extern void IconCclRegister(void); /// register CCL features
|
||||
|
|
|
@ -520,7 +520,7 @@ global const char* IdentOfIcon(IconId icon)
|
|||
** @param x X display position
|
||||
** @param y Y display position
|
||||
*/
|
||||
global void DrawUnitIcon(const void* player,IconId icon,unsigned flags
|
||||
global void DrawUnitIcon(const Player* player,IconId icon,unsigned flags
|
||||
,unsigned x,unsigned y)
|
||||
{
|
||||
int color;
|
||||
|
|
|
@ -212,7 +212,7 @@ global void DrawUnitInfo(const Unit* unit)
|
|||
//
|
||||
if( unit->Orders[0].Action==UnitActionBuilded ) {
|
||||
if( !OriginalBuilding ) {
|
||||
DrawUnitIcon(unit->Data.Builded.Worker
|
||||
DrawUnitIcon(unit->Data.Builded.Worker->Player
|
||||
,unit->Data.Builded.Worker->Type->Icon.Icon
|
||||
,0,x+107,y+8+70);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue