Hilite Status: Improved

Allow defining multiple stops per field. Add hitpointbar.
This commit is contained in:
Pasi Kallinen
2017-09-26 10:04:19 +03:00
parent cac4344754
commit 69f7a78dba
37 changed files with 3227 additions and 1532 deletions

View File

@@ -462,7 +462,6 @@ boolean is_restoring;
(*cibase->nprocs->win_putmsghistory)(cibase->ndata, msg, is_restoring);
}
#ifdef STATUS_VIA_WINDOWPORT
void
chainin_status_init()
{
@@ -487,29 +486,15 @@ boolean enable;
}
void
chainin_status_update(idx, ptr, chg, percent)
int idx, chg, percent;
chainin_status_update(idx, ptr, chg, percent, color, colormasks)
int idx, chg, percent, color;
genericptr_t ptr;
unsigned long *colormasks;
{
(*cibase->nprocs->win_status_update)(cibase->ndata, idx, ptr, chg,
percent);
percent, color, colormasks);
}
#ifdef STATUS_HILITES
void
chainin_status_threshold(fldidx, thresholdtype, threshold, behavior, under,
over)
int fldidx, thresholdtype;
int behavior, under, over;
anything threshold;
{
(*cibase->nprocs->win_status_threshold)(cibase->ndata, fldidx,
thresholdtype, threshold,
behavior, under, over);
}
#endif
#endif
boolean
chainin_can_suspend()
{
@@ -561,12 +546,7 @@ struct window_procs chainin_procs = {
chainin_outrip, chainin_preference_update, chainin_getmsghistory,
chainin_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
chainin_status_init, chainin_status_finish, chainin_status_enablefield,
chainin_status_update,
#ifdef STATUS_HILITES
chainin_status_threshold,
#endif
#endif
chainin_can_suspend,
};

View File

@@ -586,7 +586,6 @@ boolean is_restoring;
(*tdp->nprocs->win_putmsghistory)(msg, is_restoring);
}
#ifdef STATUS_VIA_WINDOWPORT
void
chainout_status_init(vp)
void *vp;
@@ -619,33 +618,17 @@ boolean enable;
}
void
chainout_status_update(vp, idx, ptr, chg, percent)
chainout_status_update(vp, idx, ptr, chg, percent, color, colormasks)
void *vp;
int idx, chg, percent;
genericptr_t ptr;
unsigned long *colormasks;
{
struct chainout_data *tdp = vp;
(*tdp->nprocs->win_status_update)(idx, ptr, chg, percent);
(*tdp->nprocs->win_status_update)(idx, ptr, chg, percent, color, colormasks);
}
#ifdef STATUS_HILITES
void
chainout_status_threshold(vp, fldidx, thresholdtype, threshold, behavior,
under, over)
void *vp;
int fldidx, thresholdtype;
int behavior, under, over;
anything threshold;
{
struct chainout_data *tdp = vp;
(*tdp->nprocs->win_status_threshold)(fldidx, thresholdtype, threshold,
behavior, under, over);
}
#endif
#endif
boolean
chainout_can_suspend(vp)
void *vp;
@@ -700,12 +683,7 @@ struct chain_procs chainout_procs = {
chainout_outrip, chainout_preference_update, chainout_getmsghistory,
chainout_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
chainout_status_init, chainout_status_finish, chainout_status_enablefield,
chainout_status_update,
#ifdef STATUS_HILITES
chainout_status_threshold,
#endif
#endif
chainout_can_suspend,
};

View File

@@ -1027,7 +1027,6 @@ boolean is_restoring;
POST;
}
#ifdef STATUS_VIA_WINDOWPORT
void
trace_status_init(vp)
void *vp;
@@ -1084,10 +1083,11 @@ boolean enable;
}
void
trace_status_update(vp, idx, ptr, chg, percent)
trace_status_update(vp, idx, ptr, chg, color, colormasks)
void *vp;
int idx, chg, percent;
genericptr_t ptr;
unsigned long *colormasks;
{
struct trace_data *tdp = vp;
@@ -1095,33 +1095,10 @@ genericptr_t ptr;
ptr, chg, percent);
PRE;
(*tdp->nprocs->win_status_update)(tdp->ndata, idx, ptr, chg, percent);
(*tdp->nprocs->win_status_update)(tdp->ndata, idx, ptr, chg, color colormasks);
POST;
}
#ifdef STATUS_HILITES
void
trace_status_threshold(vp, fldidx, thresholdtype, threshold, behavior, under,
over)
void *vp;
int fldidx, thresholdtype;
int behavior, under, over;
anything threshold;
{
struct trace_data *tdp = vp;
/* XXX how do we print an anything? We don't. */
fprintf(wc_tracelogf, "%sstatus_threshold(%d, %d, -, %d, %d, %d)\n",
INDENT, fldidx, thresholdtype, behavior, under, over);
PRE;
(*tdp->nprocs->win_status_threshold)(tdp->ndata, fldidx, thresholdtype,
threshold, behavior, under, over);
POST;
}
#endif
#endif
boolean
trace_can_suspend(vp)
void *vp;
@@ -1179,12 +1156,7 @@ struct chain_procs trace_procs = {
trace_outrip, trace_preference_update, trace_getmsghistory,
trace_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
trace_status_init, trace_status_finish, trace_status_enablefield,
trace_status_update,
#ifdef STATUS_HILITES
trace_status_threshold,
#endif
#endif
trace_can_suspend,
};