Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void lcars_RenderViewScreen(void){
- char i;
- int vWidth = 228, vHeight = 173;
- for( i = 0; i <= (sizeof(MapData)/sizeof(MapObject_t)); i++){
- MapObject_t *object = &MapData[i];
- if( object->type == OBJ_SHIP || object->type == OBJ_PROJ ){
- Relativity_t data = GetPositional(PlayerData->Position.coords[0], PlayerData->Position.coords[1], PlayerData->Position.coords[2], object->Position.coords[0], object->Position.coords[1], object->Position.coords[2]);
- if( data.distance <= VISUAL_RANGE ){
- if( (abs(data.xyOffset - PlayerData->Position.angles[0]) <= 45) && (abs(data.zOffset - PlayerData->Position.angles[1]) <= 45) ){
- int xcoord = data.xyOffset - PlayerData->Position.angles[0] + 45;
- char ycoord = data.zOffset - PlayerData->Position.angles[1] +45;
- char scale = 10-(data.distance / 2000);
- xcoord = (xcoord * vWidth) / 91;
- ycoord = (ycoord * vHeight) / 91;
- if(object->type == OBJ_SHIP)
- gfx_ScaledTransparentSprite_NoClip(sprite_BorgSphere, xcoord, ycoord, scale, scale);
- if(object->type == OBJ_PROJ)
- gfx_ScaledTransparentSprite_NoClip(sprite_Phaser, xcoord, ycoord, scale, scale);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement