Skip to content

Commit

Permalink
Add ui_lever_target_type global and locate it on OS X
Browse files Browse the repository at this point in the history
This is defined as a normal enum with a bunch of anonymous items
for now, because find-offsets requires enum attributes, which aren't
generated for complex enums (i.e. enums with holes/explicit values).

Fixes DFHack#45, although it hasn't been located on Linux/Windows yet
  • Loading branch information
lethosor committed Dec 19, 2015
1 parent 9105ebc commit 3cf3123
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
88 changes: 88 additions & 0 deletions df.globals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,94 @@
<int32_t refers-to='$global.world.selected_building.jobs[$]'/>
</global-object>

<enum-type type-name='lever_target_type' base-type='int8_t'>
<enum-item name='None' value='-1'/>
0-59
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
<enum-item/><enum-item/><enum-item/><enum-item/><enum-item/>
60
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='VerticalBars'/> 'B'
<enum-item/>
<enum-item/>
<enum-item/>
70
<enum-item name='FloorBars'/> 'F'
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
80
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='SpearsSpikes'/> 'S'
<enum-item name='TrackStop'/> 'T'
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
90
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='GearAssembly'/> 'a'
<enum-item name='Bridge'/> 'b'
<enum-item name='Chain'/> 'c'
100
<enum-item name='Door'/> 'd'
<enum-item/>
<enum-item name='Floodgate'/> 'f'
<enum-item name='FloorGrate'/> 'g'
<enum-item name='Hatch'/> 'h'
<enum-item/>
<enum-item name='Cage'/> 'j'
<enum-item/>
<enum-item/>
<enum-item/>
110
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='Support'/> 's'
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='WallGrate'/> 'w'
</enum-type>

<!-- To find: enter 'q'uery, select a lever, queue a "link to" job and search for changes. -->
<global-object name='ui_lever_target_type'>
<enum base-type='int8_t' type-name='lever_target_type'/>
</global-object>

<global-object name='window_x' type-name='int32_t'/>
<global-object name='window_y' type-name='int32_t'/>
<global-object name='window_z' type-name='int32_t'/>
Expand Down
2 changes: 2 additions & 0 deletions symbols.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<global-address name='ui_unit_view_mode'/>
<global-address name='ui_workshop_in_add'/>
<global-address name='ui_workshop_job_cursor'/>
<global-address name='ui_lever_target_type'/>

<global-address name='window_x'/>
<global-address name='window_y'/>
Expand Down Expand Up @@ -8033,6 +8034,7 @@
<global-address name='ui_workshop_job_cursor' value='0x1ae0b08'/>
<global-address name='ui_building_in_assign' value='0x1ae0b41'/>
<global-address name='ui_building_in_resize' value='0x1ae0b40'/>
<global-address name='ui_lever_target_type' value='0x1ae0b16'/>

<global-address name='window_x' value='0x15601d4'/>
<global-address name='window_y' value='0x15601d8'/>
Expand Down

0 comments on commit 3cf3123

Please sign in to comment.