From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:Diablo CEL and CL2 sprites" |
|---|
| claim | "CL2 pixel commands: 0x00-0x7F transparent run of that many pixels; 0x80-0xBE fill run of (0xBF - control) pixels with the one colour byte that follows; 0xBF-0xFF (256 - control) literal pixel bytes follow. CEL has only 0x01-0x7F literal bytes and 0x80-0xFF transparent run of (256 - control)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Diablo CEL and CL2 sprites" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Cl2Command" |
|---|
| values | | 0x00-0x7F | "CL2_TRANSPARENT" |
|---|
| 0x80-0xBE | "CL2_FILL" |
|---|
| 0xBF-0xFF | "CL2_PIXELS" |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Cl2ToClx decodes the three command ranges using the helpers of Source/utils/clx_decode.hpp" |
|---|
| repo | "https://github.com/diasurgical/devilutionX" |
|---|
| commit | "a927236209828a1f1dcb7ef32bdd03a288710c29" |
|---|
| path | "Source/utils/cl2_to_clx.cpp" |
|---|
|
| type | "source" |
|---|
| detail | "CEL transparent test is control >= 0x80, width = -(int8)control" |
|---|
| repo | "https://github.com/diasurgical/devilutionX" |
|---|
| commit | "a927236209828a1f1dcb7ef32bdd03a288710c29" |
|---|
| path | "Source/utils/cel_to_clx.cpp" |
|---|
|
| type | "source" |
|---|
| detail | "IsClxOpaque (>= 0x80), IsClxOpaqueFill (<= 0xBE), GetClxOpaqueFillWidth (0xBF - control), GetClxOpaquePixelsWidth (-(int8)control)" |
|---|
| repo | "https://github.com/diasurgical/devilutionX" |
|---|
| commit | "a927236209828a1f1dcb7ef32bdd03a288710c29" |
|---|
| path | "Source/utils/clx_decode.hpp" |
|---|
| lines | "12-35" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "CL2 pixel commands" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:42:33.063Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:27:11.824Z" |
|---|
| summary | "cl2_to_clx.cpp 66-93 with clx_decode.hpp 12-35: control >= 0x80 is opaque, <= 0xBE a fill of (0xBF - control) pixels with 1 colour byte, else (256 - control) literal pixels, below 0x80 transparent…" |
|---|
| changed | |
|---|
|
|
|---|