Posted: Mon Sep 01, 2008 8:35 pm
Sure. Here you go:
Also, in HeadUpDisplay.h, add
inside the @interface HeadUpDisplay: NSObject declaration and the declaration for - (BOOL) reticleTargetSensitive;. Of course, remember to add the reticle_target_sensitive key in your shipdata.,plist and hold down Shift while starting up Oolite for the change in shipdata to take effect.
That's all. You should be good to go. Hope I haven't messed up the diff too much.
Code: Select all
Comparing: D:\Ootrunk_v1.71.2\src\Core\HeadUpDisplay.m
To: D:\oosvn\trunk\src\Core\HeadUpDisplay.m
====
====
59 <! void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloat z1, GLfloat overallAlpha);
!> void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloat z1, GLfloat overallAlpha, BOOL reticleTargetSensitive);
135 !> reticleTargetSensitive = [hudinfo boolForKey:@"reticle_target_sensitive" defaultValue:NO];
!>
!> - (BOOL) reticleTargetSensitive
!> {
!> return reticleTargetSensitive;
!> }
!>
!>
!> - (void) setReticleTargetSensitive:(BOOL) newReticleTargetSensitiveValue
!> {
!> reticleTargetSensitive = !!newReticleTargetSensitiveValue; // ensure YES or NO.
!> }
!>
!>
1446 <! hudDrawReticleOnTarget([player primaryTarget], player, z1, overallAlpha);
!> hudDrawReticleOnTarget([player primaryTarget], player, z1, overallAlpha, reticleTargetSensitive);
1923 <! void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloat z1, GLfloat overallAlpha)
!> void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloat z1, GLfloat overallAlpha, BOOL reticleTargetSensitive)
2021 <! // draw the reticle
2022 <! GLColorWithOverallAlpha(green_color, overallAlpha);
!> // draw the reticle
!> // If reticle is target sensitive, draw target box in red when target passes through crosshairs.
!> if (reticleTargetSensitive && [UNIVERSE getFirstEntityTargettedByPlayer] == [player1 primaryTarget])
!> {
!> GLColorWithOverallAlpha(red_color, overallAlpha);
!> }
!> else
!> {
!> GLColorWithOverallAlpha(green_color, overallAlpha);
!> }
Code: Select all
BOOL reticleTargetSensitive;
That's all. You should be good to go. Hope I haven't messed up the diff too much.