Skip to content

Commit

Permalink
v2.6 released
Browse files Browse the repository at this point in the history
  • Loading branch information
Trylobot committed Jan 22, 2013
1 parent f79e46f commit 72ecfc0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
11 changes: 6 additions & 5 deletions release/changes.log
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
______________________________________________________________________________
editor version 2.5.1 (starsector 0.54.1a)
- compatible with name change
- weapon editor can modify offsets
- switch between turret/hardpoint mode
- force reload of all vanilla and modded data with tilde [~]
editor version 2.6 (starsector 0.54.1a)
- weapon editor can modify offsets (possibly buggy)
- weapon editor can set images
- weapon editor can switch between turret/hardpoint mode
- tilde [~] now toggles vanilla data on/off and forces a reload of all data
- compatible with "Starsector" name change
______________________________________________________________________________
editor version 2.5 (starfarer 0.53.1a RC5)
- added weapon editor prototype (incomplete)
Expand Down
17 changes: 9 additions & 8 deletions src/TData.type.bmx
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,24 @@ Type TData
Method modify_weapon_offset( i%, img_x#,img_y#, spr_w#,spr_h#, weapon_display_mode$, reflect_over_y_axis%=False )
If Not weapon Then Return
Local offsets#[]
Local x#,y#
Select weapon_display_mode
Case "turret"
offsets = weapon.turretOffsets
If Not offsets Or i < 0 Or i > offsets.Length-2 Then Return
img_x = img_x - (spr_w / 2.0)
img_y = img_y - (spr_h / 2.0)
If reflect_over_y_axis Then img_y :* -1
x = img_x - (spr_w / 2.0)
y = img_y - (spr_h / 2.0)
If reflect_over_y_axis Then y :* -1
Case "hardpoint"
offsets = weapon.hardpointOffsets
If Not offsets Or i < 0 Or i > offsets.Length-2 Then Return
img_x = img_x - (spr_w / 2.0)
img_y = img_y - (spr_h)
If reflect_over_y_axis Then img_y :* -1
x = img_x - (spr_w / 2.0)
y = img_y - (spr_h)
If reflect_over_y_axis Then y :* -1
EndSelect
If Not offsets Then Return
offsets[i] = img_x
offsets[i+1] = img_y
offsets[i] = x
offsets[i+1] = y
EndMethod

Method remove_nearest_weapon_offset( img_x#,img_y#, spr_w#,spr_h#, weapon_display_mode$ )
Expand Down

0 comments on commit 72ecfc0

Please sign in to comment.