2. Knobs Data
2.1. DONE Knobs Data Contents
CLOSED: [2019-12-05 Thu 18:25]
2.1.1. Knobs Grid State Data
monolith_page_mstate *mstate;
monolith_page_mstate_new(pg, &knobs->mstate);
monolith_page_mstate_free(&knobs->mstate);
2.1.2. DONE Knobs Arc State Data
CLOSED: [2019-12-05 Thu 18:16]
monolith_page_arcstate *astate;
monolith_page_arcstate_new(pg, &knobs->astate);
monolith_page_arcstate_free(&knobs->astate);
2.1.3. DONE Knobs Values
CLOSED: [2019-12-05 Thu 18:19] 16x8 grids, so 128 total knob values. All contained in a struct.
GFFLT vals[128];
zero'd out to begin.
for (i = 0; i < 128; i++) {
knobs->vals[i] = 0;
}
2.1.4. DONE Selected values
CLOSED: [2019-12-05 Thu 18:23] Which knob value is selected (per lane). Should be in range 0-31.
int selected[4];
Negative values indicate nothing is selected.
for (i = 0; i < 4; i++) {
knobs->selected[i] = -1;
}
2.1.5. DONE Increment value
CLOSED: [2019-12-05 Thu 18:24]
How much to increment by when turned. 0.001
is probably
okay?
GFFLT inc;
Negative values indicate nothing is selected.
knobs->inc = 0.001;
2.1.6. TODO Aux Knob
An integer value set between 0 and 127 (or negative to disable).
Used to assign the griffin to any knob from any lane.
int aux_knob;
knobs->aux_knob = -1;
static void knobs_aux_knob(page_knobs_d *knobs,
int lane,
int x, int y);
static void knobs_aux_knob(page_knobs_d *knobs,
int lane,
int x, int y)
{
int k;
k = (lane * 4 + x) + y * 16;
if (k < 0) return;
if (k >= 128) return;
knobs->aux_knob = k;
}
2.2. DONE Knobs Typedef Declaration
CLOSED: [2019-12-05 Thu 18:24]
All knobs page data is contained in a struct called page_knobs_d
.
typedef struct page_knobs_d page_knobs_d;
struct page_knobs_d {
<<page_knobs_contents>>
};
2.3. DONE Knobs Data Allocation/Initialization
CLOSED: [2019-12-05 Thu 18:24]
Knobs data is initiatlized with the function page_knobs_init
.
static void page_knobs_init(monolith_page *pg, page_knobs_d *knobs);
static void page_knobs_init(monolith_page *pg, page_knobs_d *knobs)
{
int i;
<<knobs_init>>
}
2.4. DONE Knobs Data Cleanup
CLOSED: [2019-12-05 Thu 18:24]
Knobs data is freed with the funciton page_knobs_free
.
static void page_knobs_cleanup(page_knobs_d *knobs);
static void page_knobs_cleanup(page_knobs_d *knobs)
{
<<knobs_cleanup>>
}
prev | home | next