|
| 1 | +; `brush_filter` command takes an int parameter which is the filter mask. |
| 2 | +; The "everything" filter mask is 0x0FF0 (4080); to disable certain brushes, |
| 3 | +; clear their bits as per the table below. It is important that the upper |
| 4 | +; two bits of the filter mask remain set, as dromed checks if all 16 bits are |
| 5 | +; set when deciding if any filters are active or not. |
| 6 | +; |
| 7 | +; - 0x010: Terrain |
| 8 | +; - 0x020: Light |
| 9 | +; - 0x040: Area |
| 10 | +; - 0x080: Object |
| 11 | +; - 0x100: Flow |
| 12 | +; - 0x200: Room |
| 13 | +; |
| 14 | +; This script uses the config variables FM* (Filter Mask) to decide which |
| 15 | +; filter mode it is in; it has a primary mode which is cycled through, and |
| 16 | +; a secondary mode which is toggled as needed. |
| 17 | +; |
| 18 | +; Primary mode: |
| 19 | +; |
| 20 | +; - FM0: show Terrain and Objects |
| 21 | +; - FM1: show Terrain only |
| 22 | +; - FM2: show Objects only |
| 23 | +; - FM3: show Lights only |
| 24 | +; - FM4: show secondary only (if any secondary is active) |
| 25 | +; |
| 26 | +; Secondary mode: |
| 27 | +; |
| 28 | +; - FMA: also show Area brushes |
| 29 | +; - FMR: also show Room brushes |
| 30 | +; - FMF: also show Flow brushes |
| 31 | +; - FMx: temporary flag while toggling. |
| 32 | + |
1 | 33 | ; Cycle to the next filter mode (or start with mode 0 if none set yet) |
2 | | -ifdef FM5 unset FM5 |
3 | | -ifdef FM4 set FM5 1 |
4 | 34 | ifdef FM4 unset FM4 |
5 | | -ifdef FM3 set FM4 1 |
| 35 | +ifdef FM3 ifdef FMA set FM4 1 |
| 36 | +ifdef FM3 ifdef FMF set FM4 1 |
| 37 | +ifdef FM3 ifdef FMR set FM4 1 |
6 | 38 | ifdef FM3 unset FM3 |
7 | 39 | ifdef FM2 set FM3 1 |
8 | 40 | ifdef FM2 unset FM2 |
9 | 41 | ifdef FM1 set FM2 1 |
10 | 42 | ifdef FM1 unset FM1 |
11 | 43 | ifdef FM0 set FM1 1 |
12 | 44 | ifdef FM0 unset FM0 |
13 | | -ifndef FM0 ifndef FM1 ifndef FM2 ifndef FM3 ifndef FM4 ifndef FM5 set FM0 1 |
| 45 | +ifndef FM0 ifndef FM1 ifndef FM2 ifndef FM3 ifndef FM4 set FM0 1 |
14 | 46 |
|
15 | | -; Apply the current filter mode |
16 | | -ifdef FM0 mprint Filter 0: Terrain and Object brushes (Ctrl+V to reset) |
17 | | -ifdef FM0 brush_filter 3216 |
18 | | -ifdef FM1 mprint Filter 1: Area brushes (Ctrl+V to reset) |
19 | | -ifdef FM1 brush_filter 3136 |
20 | | -ifdef FM2 mprint Filter 2: Terrain brushes (Ctrl+V to reset) |
21 | | -ifdef FM2 brush_filter 3088 |
22 | | -ifdef FM3 mprint Filter 3: Object brushes (Ctrl+V to reset) |
23 | | -ifdef FM3 brush_filter 3200 |
24 | | -ifdef FM4 mprint Filter 4: Flow brushes (Ctrl+V to reset) |
25 | | -ifdef FM4 brush_filter 3328 |
26 | | -ifdef FM5 mprint Filter 5: Room brushes (Ctrl+V to reset) |
27 | | -ifdef FM5 brush_filter 3584 |
| 47 | +run .\cmds\FilterApply.cmd |
0 commit comments