dirt_part_source 
A part's sprite as mess reads it: the images a genital draws in the layers the reference generator draws that part from (dirt_part_layers()), their colour layers' states taken together, or the plain pecs' shape a human chest without breasts takes its mess in (dirt_pecs_guide()). A mess aimed at the part's zone takes its share on these pixels (dirt_part_own()). Made once and never changed.
Vars | |
| cached_key | part_key(), once built. |
|---|---|
| facing_layers | alist(direction = layer_at() there), once worked out. |
| guide | Whether it's the pecs guide: never drawn, and kept to where the chest shows. |
| height | Pixels down the sheet. |
| icon | The sheet: an icon file, or an icon made at run time. |
| kind | A DIRT_PART_* define. |
| organ_slot | The organ slot of the genital it's drawn for, or null for the guide. |
| state_layers | The layer each state draws at, in step with states, as get_overlay() works it out, custom layering included; or
null where no layer is read (the guide, never drawn, lies under everything). |
| states | The states drawn, every layer's colour layers together. |
| topmost_layer | top_layer(), worked out with them. |
| width | Pixels across the sheet. |
Procs | |
| New | Arguments: |
| layer_at | Returns the layer of the topmost image that shows the source in one direction: the least layer number of its states with pixels there (dirt_sprite_facings()). INFINITY when none has (the guide lies under everything). A butt shows its front image facing north and its back image, under the body's skin, the other ways. Worked out once for every direction. |
| layered | Returns whether the source's images draw at more than one layer, so what it draws over can change with direction. |
| part_key | Returns what the source draws, as text: sources with the same key take mess on the same pixels. |
| pixels | Returns the source's pixels in one direction, any opacity counting, every state's together, as indexes in row-major order (dirt_sprite_pixels()): none on a sheet that isn't 32x32. You should NEVER modify the list it returns. |
| read_layers | Works out layer_at() in every direction, and top_layer(). |
| top_layer | Returns the layer of the topmost image the source draws in any direction. |
| under | Returns whether the source draws under a surface in one direction, as its topmost image there does (layer_at()), so its share is drawn in that surface's masks rather than on itself. |
Var Details
cached_key 
part_key(), once built.
facing_layers 
alist(direction = layer_at() there), once worked out.
guide 
Whether it's the pecs guide: never drawn, and kept to where the chest shows.
height 
Pixels down the sheet.
icon 
The sheet: an icon file, or an icon made at run time.
kind 
A DIRT_PART_* define.
organ_slot 
The organ slot of the genital it's drawn for, or null for the guide.
state_layers 
The layer each state draws at, in step with states, as get_overlay() works it out, custom layering included; or
null where no layer is read (the guide, never drawn, lies under everything).
states 
The states drawn, every layer's colour layers together.
topmost_layer 
top_layer(), worked out with them.
width 
Pixels across the sheet.
Proc Details
New
Arguments:
- kind: A DIRT_PART_* define.
- icon: The sheet.
- states: The states drawn.
- guide: Whether it's the pecs guide.
- state_layers: The layer each state draws at, in step with
states, or null.
layer_at
Returns the layer of the topmost image that shows the source in one direction: the least layer number of its states with pixels there (dirt_sprite_facings()). INFINITY when none has (the guide lies under everything). A butt shows its front image facing north and its back image, under the body's skin, the other ways. Worked out once for every direction.
Arguments:
- direction: The direction.
layered
Returns whether the source's images draw at more than one layer, so what it draws over can change with direction.
part_key
Returns what the source draws, as text: sources with the same key take mess on the same pixels.
pixels
Returns the source's pixels in one direction, any opacity counting, every state's together, as indexes in row-major order (dirt_sprite_pixels()): none on a sheet that isn't 32x32. You should NEVER modify the list it returns.
Arguments:
- direction: The direction.
read_layers
Works out layer_at() in every direction, and top_layer().
top_layer
Returns the layer of the topmost image the source draws in any direction.
under
Returns whether the source draws under a surface in one direction, as its topmost image there does (layer_at()), so its share is drawn in that surface's masks rather than on itself.
Arguments:
- direction: The direction.
- surface_layer: The surface's layer: a garment's, DIRT_UNDERCLOTHES_LAYER or DIRT_SKIN_LAYER.