Skip to content

Commit a435365

Browse files
authored
Merge pull request #896 from ab9rf/viewport-spatter-flag
fill out `viewport_spatter_flag`
2 parents 5aee008 + 8927af4 commit a435365

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

‎changelog.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Template for new versions:
2020

2121
## Structures
2222
- added support for overriding code generation for a specific type
23+
- added ``graphic_viewport_spatter_flag`` and related definitions
2324

2425
# 53.16-r1
2526

‎df.descriptor.xml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@
208208
<int32_t name='texpos'/>
209209
</struct-type>
210210

211-
<bitfield-type type-name='viewport_spatter_flag' base-type='uint32_t'> TODO: defined in g_src/graphics.h
212-
<flag-bit name='todo'/>
213-
</bitfield-type>
214-
215211
<struct-type type-name='spatter_graphics_infost'>
216212
<int64_t name='flags' original-name='local_id'/> cannot use bitfield here, since it ignores base-type
217213
<int32_t name='texpos'/>

‎df.g_src.graphics.xml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,24 @@
326326
-- Skipped: VIEWPORT_FLOOR_FLAG_*
327327
-- Unused: VIEWPORT_WALL_FLAG_*
328328
-- Unused: GraphicsRampType
329+
330+
<enum-type type-name='viewport_spatter_flag_fire' base-type='uint32_t'> bay12: VIEWPORT_FLAG_SPATTER_FIRE_*
331+
<enum-item name='FRAME_1' value='1'/>
332+
<enum-item name='FRAME_2' value='2'/>
333+
<enum-item name='FRAME_4' value='3' comment='not a typo'/>
334+
<enum-item name='FRAME_3' value='4' comment='not a typo'/>
335+
</enum-type>
336+
337+
<bitfield-type type-name='viewport_spatter_flag' base-type='uint32_t'> bay12: VIEWPORT_SPATTER_FLAG_*
338+
<flag-bit name='shape_type' original-name='SHAPE_TYPE' count='6'/>
339+
<flag-bit name='material_type' original-name='MATERIAL_TYPE' count='5'/>
340+
<flag-bit name='color_index_bits' original-name='COLOR_INDEX_BITS' count='8'/>
341+
<flag-bit count='9' comment='unused'/>
342+
<flag-bit name='fire_frame_type' type-name='viewport_spatter_flag_fire'
343+
original-name='FIRE_FRAME' count='3'/>
344+
<flag-bit name='accepts_spatter' original-name='ACCEPTS_SPATTER'/>
345+
</bitfield-type>
346+
329347
-- Skipped: VIEWPORT_RAMP_FLAG_*
330348
-- Skipped: VIEWPORT_SHADOW_FLAG_*
331349

@@ -349,7 +367,7 @@
349367
<pointer type-name='uint64_t' name='screentexpos_floor_flag' is-array='true'/> VIEWPORT_FLOOR_FLAG_*
350368
<pointer type-name='int32_t' name='screentexpos_background_two' is-array='true' comment='boulder, plant, etc.'/>
351369
<pointer type-name='uint32_t' name='screentexpos_liquid_flag' is-array='true'/> VIEWPORT_LIQUID_FLAG_*
352-
<pointer type-name='uint32_t' name='screentexpos_spatter_flag' is-array='true'/> VIEWPORT_SPATTER_FLAG_*
370+
<pointer type-name='viewport_spatter_flag' name='screentexpos_spatter_flag' is-array='true'/> VIEWPORT_SPATTER_FLAG_*
353371
<pointer type-name='int32_t' name='screentexpos_spatter' is-array='true'/>
354372
<pointer type-name='uint64_t' name='screentexpos_ramp_flag' is-array='true'/> VIEWPORT_RAMP_FLAG_*
355373
<pointer type-name='uint32_t' name='screentexpos_shadow_flag' is-array='true'/> VIEWPORT_SHADOW_FLAG_*

0 commit comments

Comments
 (0)