From 3dd69a92a062fd4c2aa467ffd235c55ec0b49cb1 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Mon, 16 Sep 2024 15:11:47 +0700 Subject: [PATCH 01/55] implement SBARDEF parsing --- src/CMakeLists.txt | 1 + src/doomdef.h | 27 +++++ src/m_json.c | 52 +++++++-- src/m_json.h | 5 +- src/p_user.c | 58 +++++++++- src/p_user.h | 3 + src/r_skydefs.c | 14 +-- src/st_sbardef.c | 266 +++++++++++++++++++++++++++++++++++++++++++++ src/st_sbardef.h | 151 +++++++++++++++++++++++++ src/st_stuff.c | 141 ++++++++++++++++++++++++ src/wi_interlvl.c | 8 +- 11 files changed, 696 insertions(+), 30 deletions(-) create mode 100644 src/st_sbardef.c create mode 100644 src/st_sbardef.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b83e9099e..6dc4cea9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,7 @@ set(WOOF_SOURCES s_sound.c s_sound.h sounds.c sounds.h st_lib.c st_lib.h + st_sbardef.c st_sbardef.h st_stuff.c st_stuff.h statdump.c statdump.h tables.c tables.h diff --git a/src/doomdef.h b/src/doomdef.h index 24c04c46a..3583882c1 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -176,6 +176,33 @@ typedef enum { NUMPOWERS, } powertype_t; +typedef enum +{ + item_noitem = -1, + item_messageonly, + item_bluecard, + item_yellowcard, + item_redcard, + item_blueskull, + item_yellowskull, + item_redskull, + item_backpack, + item_healthbonus, + item_stimpack, + item_medikit, + item_soulsphere, + item_megasphere, + item_armorbonus, + item_greenarmor, + item_bluearmor, + item_areamap, + item_lightamp, + item_berserk, + item_invisibility, + item_radsuit, + item_invulnerability, +} itemtype_t; + // Power up durations (how many seconds till expiration). typedef enum { INVULNTICS = (30*TICRATE), diff --git a/src/m_json.c b/src/m_json.c index 893765af2..2d8c355a5 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -15,50 +15,63 @@ #include #include +#include "doomtype.h" #include "i_printf.h" +#include "w_wad.h" +#include "z_zone.h" #include "cjson/cJSON.h" -json_t *JS_Open(const char *type, version_t version, const char *data) +json_t *JS_Open(const char *lump, const char *type, version_t maxversion) { - const char *s; + int lumpnum = W_CheckNumForName(lump); + if (lumpnum < 0) + { + return NULL; + } - json_t *json = cJSON_Parse(data); + json_t *json = cJSON_Parse(W_CacheLumpNum(lumpnum, PU_CACHE)); if (json == NULL) { - I_Printf(VB_ERROR, "%s: error before %s", type, cJSON_GetErrorPtr()); + const char *error_ptr = cJSON_GetErrorPtr(); + if (error_ptr) + { + I_Printf(VB_ERROR, "%s: parsing error before %s", lump, error_ptr); + } return NULL; } json_t *js_type = JS_GetObject(json, "type"); if (!JS_IsString(js_type)) { - I_Printf(VB_ERROR, "%s: no type string", type); + I_Printf(VB_ERROR, "%s: no type string", lump); return NULL; } - s = JS_GetString(js_type); + const char *s = JS_GetString(js_type); if (strcmp(s, type)) { - I_Printf(VB_ERROR, "%s: wrong type %s", type, s); + I_Printf(VB_ERROR, "%s: wrong type %s", lump, s); return NULL; } json_t *js_version = JS_GetObject(json, "version"); if (!JS_IsString(js_version)) { - I_Printf(VB_ERROR, "%s: no version string", type); + I_Printf(VB_ERROR, "%s: no version string", lump); return NULL; } s = JS_GetString(js_version); version_t v = {0}; sscanf(s, "%d.%d.%d", &v.major, &v.minor, &v.revision); - if (!(v.major == version.major && v.minor == version.minor - && v.revision == version.revision)) + if ((maxversion.major < v.major + || (maxversion.major <= v.major && maxversion.minor < v.minor) + || (maxversion.major <= v.major && maxversion.minor <= v.minor + && maxversion.revision < v.revision))) { - I_Printf(VB_ERROR, "%s: unsupported version %d.%d.%d", type, v.major, - v.minor, v.revision); + I_Printf(VB_ERROR, "%s: max supported version %d.%d.%d", lump, + maxversion.major, maxversion.minor, maxversion.revision); return NULL; } @@ -70,11 +83,21 @@ void JS_Close(json_t *json) cJSON_Delete(json); } +boolean JS_IsObject(json_t *json) +{ + return cJSON_IsObject(json); +} + boolean JS_IsNull(json_t *json) { return cJSON_IsNull(json); } +boolean JS_IsBoolean(json_t *json) +{ + return cJSON_IsBool(json); +} + boolean JS_IsNumber(json_t *json) { return cJSON_IsNumber(json); @@ -105,6 +128,11 @@ json_t *JS_GetArrayItem(json_t *json, int index) return cJSON_GetArrayItem(json, index); } +boolean JS_GetBoolean(json_t *json) +{ + return !!json->valueint; +} + double JS_GetNumber(json_t *json) { return json->valuedouble; diff --git a/src/m_json.h b/src/m_json.h index e595f0c73..925c1aefc 100644 --- a/src/m_json.h +++ b/src/m_json.h @@ -25,16 +25,19 @@ typedef struct int revision; } version_t; -json_t *JS_Open(const char *type, version_t version, const char *data); +json_t *JS_Open(const char *lump, const char *type, version_t maxversion); void JS_Close(json_t *json); json_t *JS_GetObject(json_t *json, const char *string); +boolean JS_IsObject(json_t *json); boolean JS_IsNull(json_t *json); +boolean JS_IsBoolean(json_t *json); boolean JS_IsNumber(json_t *json); boolean JS_IsString(json_t *json); boolean JS_IsArray(json_t *json); +boolean JS_GetBoolean(json_t *json); double JS_GetNumber(json_t *json); int JS_GetInteger(json_t *json); const char *JS_GetString(json_t *json); diff --git a/src/p_user.c b/src/p_user.c index 295ef53c3..3ebfb1c6e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -22,6 +22,7 @@ #include #include "d_event.h" +#include "d_items.h" #include "d_player.h" #include "d_ticcmd.h" #include "doomdef.h" @@ -39,7 +40,6 @@ #include "p_user.h" #include "r_defs.h" #include "r_main.h" -#include "r_state.h" #include "st_stuff.h" static fixed_t PlayerSlope(player_t *player) @@ -595,6 +595,62 @@ void P_PlayerThink (player_t* player) player->powers[pw_infrared] > 4*32 || player->powers[pw_infrared] & 8; } +boolean P_EvaluateItemOwned(itemtype_t item, player_t *player) +{ + switch (item) + { + case item_bluecard: + case item_yellowcard: + case item_redcard: + case item_blueskull: + case item_yellowskull: + case item_redskull: + return player->cards[item - item_bluecard] != 0; + + case item_backpack: + return 0; // TODO + // return player->maxammo[player->readyweapon] + // == weaponinfo[player->readyweapon] + // .AmmoInfo() + // .maxupgradedammo; + + case item_greenarmor: + case item_bluearmor: + return player->armortype == (item - item_greenarmor + 1); + + case item_areamap: + return player->powers[pw_allmap] != 0; + + case item_lightamp: + return player->powers[pw_infrared] != 0; + + case item_berserk: + return player->powers[pw_strength] != 0; + + case item_invisibility: + return player->powers[pw_invisibility] != 0; + + case item_radsuit: + return player->powers[pw_ironfeet] != 0; + + case item_invulnerability: + return player->powers[pw_invulnerability] != 0; + + case item_healthbonus: + case item_stimpack: + case item_medikit: + case item_soulsphere: + case item_megasphere: + case item_armorbonus: + case item_noitem: + case item_messageonly: + default: + break; + } + + return false; +} + //---------------------------------------------------------------------------- // // $Log: p_user.c,v $ diff --git a/src/p_user.h b/src/p_user.h index 2fafed16f..363d99252 100644 --- a/src/p_user.h +++ b/src/p_user.h @@ -22,6 +22,7 @@ #ifndef __P_USER__ #define __P_USER__ +#include "doomdef.h" #include "m_fixed.h" #include "tables.h" @@ -42,6 +43,8 @@ typedef enum extern death_use_action_t death_use_action; +boolean P_EvaluateItemOwned(itemtype_t item, struct player_s *player); + extern boolean onground; // whether player is on ground or in air #endif // __P_USER__ diff --git a/src/r_skydefs.c b/src/r_skydefs.c index f7e87c131..cd0bc0ac1 100644 --- a/src/r_skydefs.c +++ b/src/r_skydefs.c @@ -20,7 +20,6 @@ #include "m_fixed.h" #include "m_json.h" #include "m_misc.h" -#include "w_wad.h" static boolean ParseFire(json_t *json, fire_t *out) { @@ -130,23 +129,16 @@ static boolean ParseFlatMap(json_t *json, flatmap_t *out) skydefs_t *R_ParseSkyDefs(void) { - int lumpnum = W_CheckNumForName("SKYDEFS"); - if (lumpnum < 0) - { - return NULL; - } - - json_t *json = JS_Open("skydefs", (version_t){1, 0, 0}, - W_CacheLumpNum(lumpnum, PU_CACHE)); + json_t *json = JS_Open("SKYDEFS", "skydefs", (version_t){1, 0, 0}); if (json == NULL) { - JS_Close(json); return NULL; } json_t *data = JS_GetObject(json, "data"); - if (JS_IsNull(data)) + if (JS_IsNull(data) || !JS_IsObject(data)) { + I_Printf(VB_ERROR, "SBARDEF: no data"); JS_Close(json); return NULL; } diff --git a/src/st_sbardef.c b/src/st_sbardef.c new file mode 100644 index 000000000..ec8d40b5c --- /dev/null +++ b/src/st_sbardef.c @@ -0,0 +1,266 @@ + +#include "st_sbardef.h" + +#include + +#include "doomdef.h" +#include "doomtype.h" +#include "i_printf.h" +#include "m_array.h" +#include "m_json.h" +#include "v_fmt.h" + +static boolean ParseSbarCondition(json_t *json, sbarcondition_t *out) +{ + json_t *condition = JS_GetObject(json, "condition"); + json_t *param = JS_GetObject(json, "param"); + if (!JS_IsNumber(condition) || !JS_IsNumber(param)) + { + return false; + } + out->condition = JS_GetInteger(condition); + out->param = JS_GetInteger(param); + + return true; +} + +static boolean ParseSbarFrame(json_t *json, sbarframe_t *out) +{ + json_t *lump = JS_GetObject(json, "lump"); + if (!JS_IsString(lump)) + { + return false; + } + out->lump = JS_GetString(lump); + + json_t *duration = JS_GetObject(json, "duration"); + if (!JS_IsNumber(duration)) + { + return false; + } + out->duration = JS_GetNumber(duration) * TICRATE; + return true; +} + +static boolean ParseSbarElem(json_t *json, sbarelem_t *out); + +static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, + sbarelem_t *out) +{ + out->elemtype = type; + + json_t *x_pos = JS_GetObject(json, "x"); + json_t *y_pos = JS_GetObject(json, "y"); + json_t *alignment = JS_GetObject(json, "alignment"); + if (!JS_IsNumber(x_pos) || !JS_IsNumber(y_pos) || !JS_IsNumber(alignment)) + { + return false; + } + out->x_pos = JS_GetInteger(x_pos); + out->y_pos = JS_GetInteger(y_pos); + out->alignment = JS_GetInteger(alignment); + + json_t *tranmap = JS_GetObject(json, "tranmap"); + json_t *translation = JS_GetObject(json, "translation"); + if (!JS_IsString(tranmap) || !JS_IsString(translation)) + { + return false; + } + out->tranmap = JS_GetString(tranmap); + out->translation = JS_GetString(translation); + + json_t *js_conditions = JS_GetObject(json, "conditions"); + json_t *js_condition = NULL; + JS_ArrayForEach(js_condition, js_conditions) + { + sbarcondition_t condition = {0}; + if (ParseSbarCondition(js_condition, &condition)) + { + array_push(out->conditions, condition); + } + } + + json_t *js_children = JS_GetObject(json, "children"); + json_t *js_child = NULL; + JS_ArrayForEach(js_child, js_children) + { + sbarelem_t elem = {0}; + if (ParseSbarElem(js_child, &elem)) + { + array_push(out->children, elem); + } + } + + switch (type) + { + case sbe_graphic: + json_t *patch = JS_GetObject(json, "patch"); + if (!JS_IsString(patch)) + { + return false; + } + out->patch = V_CachePatchName(JS_GetString(patch), PU_STATIC); + break; + + case sbe_animation: + json_t *js_frames = JS_GetObject(json, "frames"); + json_t *js_frame = NULL; + JS_ArrayForEach(js_frame, js_frames) + { + sbarframe_t frame = {0}; + if (ParseSbarFrame(js_frame, &frame)) + { + array_push(out->frames, frame); + } + } + break; + + case sbe_number: + case sbe_percent: + json_t *font = JS_GetObject(json, "font"); + if (!JS_IsString(font)) + { + return false; + } + out->font = JS_GetString(font); + + json_t *numbertype = JS_GetObject(json, "numbertype"); + json_t *param = JS_GetObject(json, "param"); + json_t *maxlength = JS_GetObject(json, "maxlength"); + if (!JS_IsNumber(numbertype) || !JS_IsNumber(param) + || !JS_IsNumber(maxlength)) + { + return false; + } + out->numbertype = JS_GetInteger(numbertype); + out->param = JS_GetInteger(param); + out->maxlength = JS_GetInteger(maxlength); + + default: + break; + } + return true; +} + +static const char *names[] = +{ + [sbe_canvas] = "canvas", + [sbe_graphic] = "graphic", + [sbe_animation] = "animation", + [sbe_face] = "face", + [sbe_facebackground] = "facebackground", + [sbe_number] = "number", + [sbe_percent] = "percent" +}; + +static boolean ParseSbarElem(json_t *json, sbarelem_t *out) +{ + for (sbarelementtype_t i = sbe_none + 1; i < sbe_max; ++i) + { + json_t *obj = JS_GetObject(json, names[i]); + if (obj && JS_IsObject(obj)) + { + return ParseSbarElemType(obj, i, out); + } + } + + return false; +} + +static boolean ParseNumberFont(json_t *json, numberfont_t *out) +{ + json_t *name = JS_GetObject(json, "name"); + json_t *stem = JS_GetObject(json, "stem"); + if (!JS_IsString(name) || !JS_IsString(stem)) + { + return false; + } + out->name = JS_GetString(name); + out->stem = JS_GetString(stem); + + json_t *type = JS_GetObject(json, "type"); + if (!JS_IsNumber(type)) + { + return false; + } + out->type = JS_GetInteger(type); + + return true; +} + +static boolean ParseStatusBar(json_t *json, statusbar_t *out) +{ + json_t *height = JS_GetObject(json, "height"); + json_t *fullscreenrender = JS_GetObject(json, "fullscreenrender"); + if (!JS_IsNumber(height) || !JS_IsBoolean(fullscreenrender)) + { + return false; + } + out->height = JS_GetInteger(height); + out->fullscreenrender = JS_GetBoolean(fullscreenrender); + + json_t *fillflat = JS_GetObject(json, "fillflat"); + if (!JS_IsString(json)) + { + return false; + } + out->fillflat = JS_GetString(fillflat); + + json_t *js_children = JS_GetObject(json, "children"); + json_t *js_child = NULL; + JS_ArrayForEach(js_child, js_children) + { + sbarelem_t elem = {0}; + if (ParseSbarElem(js_child, &elem)) + { + array_push(out->children, elem); + } + } + + return true; +} + +sbardefs_t *ST_ParseSbarDef(void) +{ + json_t *json = JS_Open("SBARDEF", "statusbar", (version_t){1, 0, 0}); + if (json == NULL) + { + return NULL; + } + + json_t *data = JS_GetObject(json, "data"); + if (JS_IsNull(data) || !JS_IsObject(data)) + { + I_Printf(VB_ERROR, "SBARDEF: no data"); + JS_Close(json); + return NULL; + } + + sbardefs_t *out = calloc(1, sizeof(*out)); + + json_t *js_numberfonts = JS_GetObject(data, "numberfonts"); + json_t *js_numberfont = NULL; + + JS_ArrayForEach(js_numberfont, js_numberfonts) + { + numberfont_t numberfont = {0}; + if (ParseNumberFont(js_numberfont, &numberfont)) + { + array_push(out->numberfonts, numberfont); + } + } + + json_t *js_statusbars = JS_GetObject(data, "statusbars"); + json_t *js_statusbar = NULL; + + JS_ArrayForEach(js_statusbar, js_statusbars) + { + statusbar_t statusbar = {0}; + if (ParseStatusBar(js_statusbar, &statusbar)) + { + array_push(out->statusbars, statusbar); + } + } + + return out; +} diff --git a/src/st_sbardef.h b/src/st_sbardef.h new file mode 100644 index 000000000..a746d69a1 --- /dev/null +++ b/src/st_sbardef.h @@ -0,0 +1,151 @@ + +#ifndef ST_SBARDEF_H +#define ST_SBARDEF_H + +#include "doomtype.h" +#include "r_defs.h" + +typedef enum +{ + sbf_none = -1, + sbf_mono0, + sbf_monomax, + sbf_proportional, +} numfonttype_t; + +typedef enum +{ + sbc_none = -1, + sbc_weaponowned, + sbc_weaponselected, + sbc_weaponnotselected, + sbc_weaponhasammo, + sbc_selectedweaponhasammo, + sbc_selectedweaponammotype, + sbc_weaponslotowned, + sbc_weaponslotnotowned, + sbc_weaponslotselected, + sbc_weaponslotnotselected, + sbc_itemowned, + sbc_itemnotowned, + sbc_featurelevelgreaterequal, + sbc_featurelevelless, + sbc_sessiontypeeequal, + sbc_sessiontypenotequal, + sbc_modeeequal, + sbc_modenotequal, + sbc_hudmodeequal, + + sbc_max, +} sbarconditiontype_t; + +typedef struct +{ + sbarconditiontype_t condition; + int param; +} sbarcondition_t; + +typedef enum +{ + sbn_none = -1, + sbn_health, + sbn_armor, + sbn_frags, + sbn_ammo, + sbn_ammoselected, + sbn_maxammo, + sbn_weaponammo, + sbn_weaponmaxammo, + + sbn_max, +} sbarnumbertype_t; + +typedef enum +{ + sbe_none = -1, + sbe_canvas, + sbe_graphic, + sbe_animation, + sbe_face, + sbe_facebackground, + sbe_number, + sbe_percent, + + sbe_max, +} sbarelementtype_t; + +typedef enum +{ + sbe_h_left = 0x00, + sbe_h_middle = 0x01, + sbe_h_right = 0x02, + + sbe_h_mask = 0x03, + + sbe_v_top = 0x00, + sbe_v_middle = 0x04, + sbe_v_bottom = 0x08, + + sbe_v_mask = 0x0C, +} sbaralignment_t; + +typedef struct +{ + const char *lump; + int duration; +} sbarframe_t; + +typedef struct sbarelem_s sbarelem_t; + +struct sbarelem_s +{ + sbarelementtype_t elemtype; + int x_pos; + int y_pos; + sbaralignment_t alignment; + const char *tranmap; + const char *translation; + sbarcondition_t *conditions; + sbarelem_t *children; + + // graphic + patch_t *patch; + + // animation + sbarframe_t *frames; + + // number, percent + const char *font; + sbarnumbertype_t numbertype; + int param; + int maxlength; +}; + +typedef struct +{ + int height; + boolean fullscreenrender; + const char *fillflat; + sbarelem_t *children; +} statusbar_t; + +typedef struct sbarnumfont_t +{ + const char *name; + numfonttype_t type; + const char *stem; + int monowidth; + patch_t *numbers[10]; + patch_t *percent; + patch_t *minus; +} numberfont_t; + +typedef struct +{ + numberfont_t *numberfonts; + statusbar_t *statusbars; +} sbardefs_t; + +sbardefs_t *ST_ParseSbarDef(void); + +#endif diff --git a/src/st_stuff.c b/src/st_stuff.c index 8ad76fa67..cbd490aff 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -28,10 +28,12 @@ #include "d_player.h" #include "doomdef.h" #include "doomstat.h" +#include "doomtype.h" #include "hu_stuff.h" // [FG] hud_displayed #include "i_printf.h" #include "i_video.h" #include "info.h" +#include "m_array.h" #include "m_cheat.h" #include "m_config.h" #include "m_misc.h" @@ -39,6 +41,7 @@ #include "m_swap.h" #include "mn_menu.h" #include "p_mobj.h" +#include "p_user.h" #include "r_data.h" #include "r_defs.h" #include "r_main.h" @@ -47,6 +50,7 @@ #include "sounds.h" #include "st_lib.h" #include "st_stuff.h" +#include "st_sbardef.h" #include "tables.h" #include "v_fmt.h" #include "v_video.h" @@ -318,10 +322,145 @@ int st_keyorskull[3]; // a random number per tick static int st_randomnumber; +static sbardefs_t *sbardef; + // // STATUS BAR CODE // +static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) +{ + boolean result = true; + int currsessiontype = netgame ? MIN(deathmatch + 1, 2) : 0; + // boolean compacthud = frame_width < frame_adjusted_width; + + sbarcondition_t *cond; + array_foreach(cond, conditions) + { + switch (cond->condition) + { + case sbc_weaponowned: + result &= !!player->weaponowned[cond->param]; + break; + + case sbc_weaponselected: + result &= player->readyweapon == cond->param; + break; + + case sbc_weaponnotselected: + result &= player->readyweapon != cond->param; + break; + + case sbc_weaponhasammo: + result &= weaponinfo[cond->param].ammo != am_noammo; + break; + + case sbc_selectedweaponhasammo: + result &= weaponinfo[player->readyweapon].ammo != am_noammo; + break; + + case sbc_selectedweaponammotype: + result &= + weaponinfo[player->readyweapon].ammo == cond->param; + break; + + case sbc_weaponslotowned: + { + // TODO + // boolean owned = false; + // for( const weaponinfo_t* weapon : weaponinfo.All() ) + // { + // if( weapon->slot == condition.param && + // player->weaponowned[ weapon->index ] ) + // { + // owned = true; + // break; + // } + // } + // result &= owned; + } + break; + + case sbc_weaponslotnotowned: + { + // TODO + // bool notowned = true; + // for( const weaponinfo_t* weapon : weaponinfo.All() ) + // { + // if( weapon->slot == condition.param && + // player->weaponowned[ weapon->index ] ) + // { + // notowned = false; + // break; + // } + // } + // result &= notowned; + } + break; + + case sbc_weaponslotselected: + // TODO + // result &= weaponinfo[ player->readyweapon ].slot == + // condition.param; + break; + + case sbc_weaponslotnotselected: + // TODO + // result &= weaponinfo[ player->readyweapon ].slot != + // condition.param; + break; + + case sbc_itemowned: + result &= + !!P_EvaluateItemOwned((itemtype_t)cond->param, player); + break; + + case sbc_itemnotowned: + result &= + !P_EvaluateItemOwned((itemtype_t)cond->param, player); + break; + + case sbc_featurelevelgreaterequal: + // result &= featureslookup[ (int32_t)gameversion ] >= + // condition.param; + break; + + case sbc_featurelevelless: + // result &= featureslookup[ (int32_t)gameversion ] < + // condition.param ; + break; + + case sbc_sessiontypeeequal: + result &= currsessiontype == cond->param; + break; + + case sbc_sessiontypenotequal: + result &= currsessiontype != cond->param; + break; + + case sbc_modeeequal: + result &= gamemode == (cond->param + 1); + break; + + case sbc_modenotequal: + result &= gamemode != (cond->param + 1); + break; + + case sbc_hudmodeequal: + // TODO + // result &= ( !!condition->param == compacthud ); + break; + + case sbc_none: + default: + result = false; + break; + } + } + + return result; +} + void ST_Stop(void); static boolean st_solidbackground; @@ -1420,6 +1559,8 @@ static int StatusBarBufferHeight(void) void ST_Init(void) { + sbardef = ST_ParseSbarDef(); + ST_loadData(); } diff --git a/src/wi_interlvl.c b/src/wi_interlvl.c index 59ad0a024..fccc3bd9b 100644 --- a/src/wi_interlvl.c +++ b/src/wi_interlvl.c @@ -16,7 +16,6 @@ #include "doomdef.h" #include "doomtype.h" #include "i_printf.h" -#include "w_wad.h" #include "z_zone.h" #define M_ARRAY_MALLOC(size) Z_Malloc((size), PU_LEVEL, NULL) @@ -153,17 +152,16 @@ static void ParseLevelLayer(json_t *json, interlevellayer_t *out) interlevel_t *WI_ParseInterlevel(const char *lumpname) { - json_t *json = JS_Open("interlevel", (version_t){1, 0, 0}, - W_CacheLumpName(lumpname, PU_CACHE)); + json_t *json = JS_Open(lumpname, "interlevel", (version_t){1, 0, 0}); if (json == NULL) { - JS_Close(json); return NULL; } json_t *data = JS_GetObject(json, "data"); - if (JS_IsNull(data)) + if (JS_IsNull(data) || !JS_IsObject(data)) { + I_Printf(VB_ERROR, "%s: no data", lumpname); JS_Close(json); return NULL; } From fb42f4f9b93f76c093251809af830defcd88d88e Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 01:31:12 +0700 Subject: [PATCH 02/55] Legacy of Rust works --- src/d_main.c | 3 + src/m_json.c | 10 + src/m_json.h | 1 + src/st_sbardef.c | 150 +++++++++---- src/st_sbardef.h | 27 ++- src/st_stuff.c | 550 ++++++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 694 insertions(+), 47 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index bff549081..aeadc3ee0 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -359,6 +359,9 @@ void D_Display (void) if (gamestate == GS_LEVEL && automap_off && gametic) R_RenderPlayerView (&players[displayplayer]); + if (gamestate == GS_LEVEL && gametic) + ST_Drawer(true, true); + if (gamestate == GS_LEVEL && gametic) HU_Drawer (); diff --git a/src/m_json.c b/src/m_json.c index 2d8c355a5..5ae6b3592 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -147,3 +147,13 @@ const char *JS_GetString(json_t *json) { return json->valuestring; } + +const char *JS_GetStringValue(json_t *json, const char *string) +{ + json_t *obj = JS_GetObject(json, string); + if (JS_IsString(obj)) + { + return json->valuestring; + } + return NULL; +} diff --git a/src/m_json.h b/src/m_json.h index 925c1aefc..160644f65 100644 --- a/src/m_json.h +++ b/src/m_json.h @@ -41,6 +41,7 @@ boolean JS_GetBoolean(json_t *json); double JS_GetNumber(json_t *json); int JS_GetInteger(json_t *json); const char *JS_GetString(json_t *json); +const char *JS_GetStringValue(json_t *json, const char *string); int JS_GetArraySize(json_t *json); json_t *JS_GetArrayItem(json_t *json, int index); diff --git a/src/st_sbardef.c b/src/st_sbardef.c index ec8d40b5c..71753b02f 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -1,6 +1,7 @@ #include "st_sbardef.h" +#include #include #include "doomdef.h" @@ -8,7 +9,26 @@ #include "i_printf.h" #include "m_array.h" #include "m_json.h" +#include "m_swap.h" +#include "r_defs.h" #include "v_fmt.h" +#include "w_wad.h" +#include "z_zone.h" + +static patch_t *CachePatchName(const char *name) +{ + int lumpnum = W_CheckNumForName(name); + if (lumpnum < 0) + { + lumpnum = (W_CheckNumForName)(name, ns_sprites); + if (lumpnum < 0) + { + I_Printf(VB_ERROR, "SBARDEF: patch %s not found", name); + return NULL; + } + } + return V_CachePatchNum(lumpnum, PU_STATIC); +} static boolean ParseSbarCondition(json_t *json, sbarcondition_t *out) { @@ -31,7 +51,7 @@ static boolean ParseSbarFrame(json_t *json, sbarframe_t *out) { return false; } - out->lump = JS_GetString(lump); + out->patch = CachePatchName(JS_GetString(lump)); json_t *duration = JS_GetObject(json, "duration"); if (!JS_IsNumber(duration)) @@ -60,14 +80,8 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, out->y_pos = JS_GetInteger(y_pos); out->alignment = JS_GetInteger(alignment); - json_t *tranmap = JS_GetObject(json, "tranmap"); - json_t *translation = JS_GetObject(json, "translation"); - if (!JS_IsString(tranmap) || !JS_IsString(translation)) - { - return false; - } - out->tranmap = JS_GetString(tranmap); - out->translation = JS_GetString(translation); + out->tranmap = JS_GetStringValue(json, "tranmap"); + out->translation = JS_GetStringValue(json, "translation"); json_t *js_conditions = JS_GetObject(json, "conditions"); json_t *js_condition = NULL; @@ -94,47 +108,63 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, switch (type) { case sbe_graphic: - json_t *patch = JS_GetObject(json, "patch"); - if (!JS_IsString(patch)) { - return false; + json_t *patch = JS_GetObject(json, "patch"); + if (!JS_IsString(patch)) + { + return false; + } + out->patch = CachePatchName(JS_GetString(patch)); } - out->patch = V_CachePatchName(JS_GetString(patch), PU_STATIC); break; case sbe_animation: - json_t *js_frames = JS_GetObject(json, "frames"); - json_t *js_frame = NULL; - JS_ArrayForEach(js_frame, js_frames) { - sbarframe_t frame = {0}; - if (ParseSbarFrame(js_frame, &frame)) + json_t *js_frames = JS_GetObject(json, "frames"); + json_t *js_frame = NULL; + JS_ArrayForEach(js_frame, js_frames) { - array_push(out->frames, frame); + sbarframe_t frame = {0}; + if (ParseSbarFrame(js_frame, &frame)) + { + array_push(out->frames, frame); + } } } break; + case sbe_face: + out->priority = 0; + out->lastattackdown = -1; + out->oldhealth = -1; + out->lasthealthcalc = 0; + out->faceindex = 0; + out->facecount = 0; + break; + case sbe_number: case sbe_percent: - json_t *font = JS_GetObject(json, "font"); - if (!JS_IsString(font)) { - return false; - } - out->font = JS_GetString(font); + json_t *font = JS_GetObject(json, "font"); + if (!JS_IsString(font)) + { + return false; + } + out->numfont = JS_GetString(font); - json_t *numbertype = JS_GetObject(json, "numbertype"); - json_t *param = JS_GetObject(json, "param"); - json_t *maxlength = JS_GetObject(json, "maxlength"); - if (!JS_IsNumber(numbertype) || !JS_IsNumber(param) - || !JS_IsNumber(maxlength)) - { - return false; + json_t *numbertype = JS_GetObject(json, "type"); + json_t *param = JS_GetObject(json, "param"); + json_t *maxlength = JS_GetObject(json, "maxlength"); + if (!JS_IsNumber(numbertype) || !JS_IsNumber(param) + || !JS_IsNumber(maxlength)) + { + return false; + } + out->numtype = JS_GetInteger(numbertype); + out->numparam = JS_GetInteger(param); + out->maxlength = JS_GetInteger(maxlength); } - out->numbertype = JS_GetInteger(numbertype); - out->param = JS_GetInteger(param); - out->maxlength = JS_GetInteger(maxlength); + break; default: break; @@ -185,6 +215,51 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) } out->type = JS_GetInteger(type); + char lump[9] = {0}; + boolean found = false; + int maxwidth = 0; + + for (int num = 0; num < 10; ++num) + { + snprintf(lump, sizeof(lump), "%sNUM%d", out->stem, num); + found = W_CheckNumForName(lump); + if (found < 0) + { + I_Printf(VB_ERROR, "SBARDEF: patch \"%s\" not found", lump); + return false; + } + out->numbers[num] = V_CachePatchNum(found, PU_STATIC); + maxwidth = MAX(maxwidth, SHORT(out->numbers[num]->width)); + } + + snprintf(lump, sizeof(lump), "%sMINUS", out->stem); + found = W_CheckNumForName(lump); + if (found >= 0) + { + out->minus = V_CachePatchNum(found, PU_STATIC); + maxwidth = MAX(maxwidth, SHORT(out->minus->width)); + } + + snprintf(lump, sizeof(lump), "%sPRCNT", out->stem); + found = W_CheckNumForName(lump); + if (found >= 0) + { + out->percent = V_CachePatchNum(found, PU_STATIC); + maxwidth = MAX(maxwidth, SHORT(out->percent->width)); + } + + switch (out->type) + { + case sbf_mono0: + out->monowidth = SHORT(out->numbers[0]->width); + break; + case sbf_monomax: + out->monowidth = maxwidth; + break; + default: + break; + } + return true; } @@ -199,12 +274,7 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out) out->height = JS_GetInteger(height); out->fullscreenrender = JS_GetBoolean(fullscreenrender); - json_t *fillflat = JS_GetObject(json, "fillflat"); - if (!JS_IsString(json)) - { - return false; - } - out->fillflat = JS_GetString(fillflat); + out->fillflat = JS_GetStringValue(json, "fillflat"); json_t *js_children = JS_GetObject(json, "children"); json_t *js_child = NULL; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index a746d69a1..f40afb1ba 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -91,11 +91,12 @@ typedef enum typedef struct { - const char *lump; + patch_t *patch; int duration; } sbarframe_t; typedef struct sbarelem_s sbarelem_t; +typedef struct numberfont_s numberfont_t; struct sbarelem_s { @@ -113,12 +114,26 @@ struct sbarelem_s // animation sbarframe_t *frames; + int frame_index; + int duration_left; // number, percent - const char *font; - sbarnumbertype_t numbertype; - int param; + const char *numfont; + sbarnumbertype_t numtype; + numberfont_t *font; + int numparam; int maxlength; + int number; + int xoffset; + int numnumbers; + + // face + int priority; + int faceindex; + int facecount; + int lasthealthcalc; + int oldhealth; + int lastattackdown; }; typedef struct @@ -129,7 +144,7 @@ typedef struct sbarelem_t *children; } statusbar_t; -typedef struct sbarnumfont_t +struct numberfont_s { const char *name; numfonttype_t type; @@ -138,7 +153,7 @@ typedef struct sbarnumfont_t patch_t *numbers[10]; patch_t *percent; patch_t *minus; -} numberfont_t; +}; typedef struct { diff --git a/src/st_stuff.c b/src/st_stuff.c index cbd490aff..44d5ef62c 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -324,10 +324,48 @@ static int st_randomnumber; static sbardefs_t *sbardef; +static patch_t **facepatches = NULL; + // // STATUS BAR CODE // +static void LoadFacePathes(void) +{ + char lump[9] = {0}; + + for (int painface = 0; painface < ST_NUMPAINFACES; ++painface) + { + for (int straightface = 0; straightface < ST_NUMSTRAIGHTFACES; + ++straightface) + { + snprintf(lump, sizeof(lump), "STFST%d%d", painface, straightface); + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + } + + snprintf(lump, sizeof(lump), "STFTR%d0", painface); // turn right + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + snprintf(lump, sizeof(lump), "STFTL%d0", painface); // turn left + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + snprintf(lump, sizeof(lump), "STFOUCH%d", painface); // ouch! + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + snprintf(lump, sizeof(lump), "STFEVL%d", painface); // evil grin ;) + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + snprintf(lump, sizeof(lump), "STFKILL%d", painface); // pissed off + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + } + + snprintf(lump, sizeof(lump), "STFGOD0"); + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + snprintf(lump, sizeof(lump), "STFDEAD0"); + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); +} + static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) { boolean result = true; @@ -448,7 +486,8 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) case sbc_hudmodeequal: // TODO - // result &= ( !!condition->param == compacthud ); + // result &= ( !!cond->param == compacthud ); + result &= (!!cond->param == false); break; case sbc_none: @@ -461,6 +500,499 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) return result; } +static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) +{ + int result = 0; + switch (number) + { + case sbn_health: + result = player->health; + break; + + case sbn_armor: + result = player->armorpoints; + break; + + case sbn_frags: + for (int p = 0; p < MAXPLAYERS; ++p) + { + result += player->frags[p]; + } + break; + + case sbn_ammo: + result = player->ammo[param]; + break; + + case sbn_ammoselected: + result = player->ammo[weaponinfo[player->readyweapon].ammo]; + break; + + case sbn_maxammo: + result = player->maxammo[param]; + break; + + case sbn_weaponammo: + result = player->ammo[weaponinfo[param].ammo]; + break; + + case sbn_weaponmaxammo: + result = player->maxammo[weaponinfo[param].ammo]; + break; + + case sbn_none: + default: + break; + } + + return result; +} + +static int CalcPainOffset(sbarelem_t *elem) +{ + int health = plyr->health > 100 ? 100 : plyr->health; + elem->lasthealthcalc = + ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); + elem->oldhealth = health; + return elem->lasthealthcalc; +} + +static void UpdateFace(sbarelem_t *elem) +{ + player_t *player = &players[displayplayer]; + + if (elem->priority < 10) + { + // dead + if (!player->health) + { + elem->priority = 9; + elem->faceindex = ST_DEADFACE; + elem->facecount = 1; + } + } + + if (elem->priority < 9) + { + if (player->bonuscount) + { + // picking up bonus + boolean doevilgrin = false; + + for (int i = 0; i < NUMWEAPONS; ++i) + { + if (oldweaponsowned[i] != player->weaponowned[i]) + { + doevilgrin = true; + oldweaponsowned[i] = player->weaponowned[i]; + } + } + + if (doevilgrin) + { + // evil grin if just picked up weapon + elem->priority = 8; + elem->facecount = ST_EVILGRINCOUNT; + elem->faceindex = CalcPainOffset(elem) + ST_EVILGRINOFFSET; + } + } + } + + if (elem->priority < 8) + { + if (player->damagecount && player->attacker + && player->attacker != player->mo) + { + // being attacked + elem->priority = 7; + + angle_t diffangle = 0; + boolean right = false; + + if (player->health - elem->oldhealth > ST_MUCHPAIN) + { + elem->facecount = ST_TURNCOUNT; + elem->faceindex = CalcPainOffset(elem) + ST_OUCHOFFSET; + } + else + { + angle_t badguyangle = + R_PointToAngle2(player->mo->x, player->mo->y, + player->attacker->x, player->attacker->y); + + if (badguyangle > player->mo->angle) + { + // whether right or left + diffangle = badguyangle - player->mo->angle; + right = diffangle > ANG180; + } + else + { + // whether left or right + diffangle = player->mo->angle - badguyangle; + right = diffangle <= ANG180; + } // confusing, aint it? + + elem->facecount = ST_TURNCOUNT; + elem->faceindex = CalcPainOffset(elem); + + if (diffangle < ANG45) + { + // head-on + elem->faceindex += ST_RAMPAGEOFFSET; + } + else if (right) + { + // turn face right + elem->faceindex += ST_TURNOFFSET; + } + else + { + // turn face left + elem->faceindex += ST_TURNOFFSET + 1; + } + } + } + } + + if (elem->priority < 7) + { + // getting hurt because of your own damn stupidity + if (player->damagecount) + { + if (player->health - elem->oldhealth > ST_MUCHPAIN) + { + elem->priority = 7; + elem->facecount = ST_TURNCOUNT; + elem->faceindex = CalcPainOffset(elem) + ST_OUCHOFFSET; + } + else + { + elem->priority = 6; + elem->facecount = ST_TURNCOUNT; + elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; + } + } + } + + if (elem->priority < 6) + { + // rapid firing + if (player->attackdown) + { + if (elem->lastattackdown == -1) + { + elem->lastattackdown = ST_RAMPAGEDELAY; + } + else if (!--elem->lastattackdown) + { + elem->priority = 5; + elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; + elem->facecount = 1; + elem->lastattackdown = 1; + } + } + else + { + elem->lastattackdown = -1; + } + } + + if (elem->priority < 5) + { + // invulnerability + if ((player->cheats & CF_GODMODE) || player->powers[pw_invulnerability]) + { + elem->priority = 4; + elem->faceindex = ST_GODFACE; + elem->facecount = 1; + } + } + + // look left or look right if the facecount has timed out + if (!elem->facecount) + { + elem->faceindex = CalcPainOffset(elem) + (M_Random() % 3); + elem->facecount = ST_STRAIGHTFACECOUNT; + elem->priority = 0; + } + + --elem->facecount; +} + +static void UpdateNumber(sbarelem_t *elem) +{ + player_t *player = &players[displayplayer]; + int number = ResolveNumber(elem->numtype, elem->numparam, player); + int power = (number < 0 ? elem->maxlength - 1 : elem->maxlength); + int max = (int)pow(10.0, power) - 1; + int numglyphs = 0; + int numnumbers = 0; + + numberfont_t *font; + array_foreach(font, sbardef->numberfonts) + { + if (!strcmp(font->name, elem->numfont)) + { + break; + } + } + + if (number < 0 && font->minus != NULL) + { + number = MAX(-max, number); + numnumbers = (int)log10(-number) + 1; + numglyphs = numnumbers + 1; + } + else + { + number = BETWEEN(0, max, number); + numnumbers = numglyphs = number != 0 ? ((int)log10(number) + 1) : 1; + } + + if (elem->elemtype == sbe_percent && font->percent != NULL) + { + ++numglyphs; + } + + int totalwidth = font->monowidth * numglyphs; + if (font->type == sbf_proportional) + { + totalwidth = 0; + if (number < 0 && font->minus != NULL) + { + totalwidth += SHORT(font->minus->width); + } + int tempnum = number; + while (tempnum > 0) + { + int workingnum = tempnum % 10; + totalwidth = SHORT(font->numbers[workingnum]->width); + tempnum /= 10; + } + if (elem->elemtype == sbe_percent && font->percent != NULL) + { + totalwidth += SHORT(font->percent->width); + } + } + + elem->xoffset = 0; + if (elem->alignment & sbe_h_middle) + { + elem->xoffset -= (totalwidth >> 1); + } + else if (elem->alignment & sbe_h_right) + { + elem->xoffset -= totalwidth; + } + + elem->font = font; + elem->number = number; + elem->numnumbers = numnumbers; +} + +static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) +{ + if (!patch) + { + return; + } + + int width = SHORT(patch->width); + int height = SHORT(patch->height); + + if (alignment & sbe_h_middle) + { + x -= (width >> 1); + } + else if (alignment & sbe_h_right) + { + x -= width; + } + + if (alignment & sbe_v_middle) + { + y -= (height >> 1); + } + else if (alignment & sbe_v_bottom) + { + y -= height; + } + + V_DrawPatch(x, y, patch); +} + +static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) +{ + numberfont_t *font = elem->font; + int width = + (font->type == sbf_proportional) ? SHORT(glyph->width) : font->monowidth; + int widthdiff = + (font->type != sbf_proportional) ? (SHORT(glyph->width) - width) : 0; + + if (elem->alignment & sbe_h_middle) + { + elem->xoffset += ((width + widthdiff) >> 1); + } + else if (elem->alignment & sbe_h_right) + { + elem->xoffset += (width + widthdiff); + } + + DrawPatch(x + elem->xoffset, y, elem->alignment, glyph); + + if (elem->alignment & sbe_h_middle) + { + elem->xoffset += (width - ((width - widthdiff) >> 1)); + } + else if (elem->alignment & sbe_h_right) + { + elem->xoffset += -widthdiff; + } + else + { + elem->xoffset += width; + } +} + +static void DrawNumber(int x, int y, sbarelem_t *elem) +{ + int number = elem->number; + int base_xoffset = elem->xoffset; + numberfont_t *font = elem->font; + + if (number < 0 && font->minus != NULL) + { + DrawGlyph(x, y, elem, font->minus); + number = -number; + } + + int glyphindex = elem->numnumbers; + while (glyphindex > 0) + { + int glyphbase = (int)pow(10.0, --glyphindex); + int workingnum = number / glyphbase; + DrawGlyph(x, y, elem, font->numbers[workingnum]); + number -= (workingnum * glyphbase); + } + + if (elem->elemtype == sbe_percent && font->percent != NULL) + { + DrawGlyph(x, y, elem, font->percent); + } + + elem->xoffset = base_xoffset; +} + +static void UpdateAnimation(sbarelem_t *elem) +{ + if (elem->duration_left == 0) + { + elem->frame_index++; + if (elem->frame_index == array_size(elem->frames)) + { + elem->frame_index = 0; + } + elem->duration_left = elem->frames[elem->frame_index].duration; + } + + elem->duration_left--; +} + +static void UpdateElem(sbarelem_t *elem) +{ + switch (elem->elemtype) + { + case sbe_face: + UpdateFace(elem); + break; + case sbe_animation: + UpdateAnimation(elem); + break; + case sbe_number: + case sbe_percent: + UpdateNumber(elem); + break; + default: + break; + } + + sbarelem_t *child; + array_foreach(child, elem->children) + { + UpdateElem(child); + } +} + +static void UpdateStatusBar(void) +{ + statusbar_t *statusbar; + array_foreach(statusbar, sbardef->statusbars) + { + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + UpdateElem(child); + } + } +} + +static void DrawElem(int x, int y, sbarelem_t *elem) +{ + x += elem->x_pos; + y += elem->y_pos; + + if (CheckConditions(elem->conditions, &players[displayplayer])) + { + switch (elem->elemtype) + { + case sbe_graphic: + DrawPatch(x, y, elem->alignment, elem->patch); + break; + + case sbe_face: + { + patch_t *patch = facepatches[elem->faceindex]; + DrawPatch(x, y, elem->alignment, patch); + } + break; + + case sbe_animation: + { + patch_t *patch = elem->frames[elem->frame_index].patch; + DrawPatch(x, y, elem->alignment, patch); + } + break; + + case sbe_number: + case sbe_percent: + DrawNumber(x, y, elem); + break; + + default: + break; + } + + sbarelem_t *child; + array_foreach(child, elem->children) + { + DrawElem(x, y, child); + } + } +} + +static void DrawStatusBar(void) +{ + int barindex = MAX(screenblocks - 10, 0); + statusbar_t *statusbar = &sbardef->statusbars[barindex]; + + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + DrawElem(0, SCREENHEIGHT - statusbar->height, child); + } +} + void ST_Stop(void); static boolean st_solidbackground; @@ -1006,6 +1538,12 @@ static void ST_doPaletteStuff(void); void ST_Ticker(void) { + if (sbardef) + { + UpdateStatusBar(); + return; + } + st_health = SmoothCount(st_health, plyr->health); st_armor = SmoothCount(st_armor, plyr->armorpoints); @@ -1196,6 +1734,12 @@ static void ST_MoveHud (void); void ST_Drawer(boolean fullscreen, boolean refresh) { + if (sbardef) + { + DrawStatusBar(); + return; + } + st_statusbaron = !fullscreen || automap_on; // [crispy] immediately redraw status bar after help screens have been shown st_firsttime = st_firsttime || refresh || inhelpscreens; @@ -1560,6 +2104,10 @@ static int StatusBarBufferHeight(void) void ST_Init(void) { sbardef = ST_ParseSbarDef(); + if (sbardef) + { + LoadFacePathes(); + } ST_loadData(); } From a6893f21342e87275093741b3793347254923ccb Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 09:52:55 +0700 Subject: [PATCH 03/55] fix palette changes, cosmetics --- src/st_stuff.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 44d5ef62c..f13390d19 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -729,12 +729,15 @@ static void UpdateNumber(sbarelem_t *elem) int numglyphs = 0; int numnumbers = 0; - numberfont_t *font; - array_foreach(font, sbardef->numberfonts) + numberfont_t *font = elem->font; + if (font == NULL) { - if (!strcmp(font->name, elem->numfont)) + array_foreach(font, sbardef->numberfonts) { - break; + if (!strcmp(font->name, elem->numfont)) + { + break; + } } } @@ -825,10 +828,18 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) { numberfont_t *font = elem->font; - int width = - (font->type == sbf_proportional) ? SHORT(glyph->width) : font->monowidth; - int widthdiff = - (font->type != sbf_proportional) ? (SHORT(glyph->width) - width) : 0; + int width, widthdiff; + + if (font->type == sbf_proportional) + { + width = SHORT(glyph->width); + widthdiff = 0; + } + else + { + width = font->monowidth; + widthdiff = SHORT(glyph->width) - width; + } if (elem->alignment & sbe_h_middle) { @@ -926,14 +937,13 @@ static void UpdateElem(sbarelem_t *elem) static void UpdateStatusBar(void) { - statusbar_t *statusbar; - array_foreach(statusbar, sbardef->statusbars) + int barindex = MAX(screenblocks - 10, 0); + statusbar_t *statusbar = &sbardef->statusbars[barindex]; + + sbarelem_t *child; + array_foreach(child, statusbar->children) { - sbarelem_t *child; - array_foreach(child, statusbar->children) - { - UpdateElem(child); - } + UpdateElem(child); } } @@ -1541,6 +1551,10 @@ void ST_Ticker(void) if (sbardef) { UpdateStatusBar(); + if (!nodrawers) + { + ST_doPaletteStuff(); + } return; } From c40caecd5428fa13fd15c884b0a4be3e2b083e76 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 11:01:55 +0700 Subject: [PATCH 04/55] more cleanup --- src/st_sbardef.c | 14 +++--- src/st_sbardef.h | 2 +- src/st_stuff.c | 110 +++++++++++++++++++++++------------------------ 3 files changed, 61 insertions(+), 65 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 71753b02f..96a7391f1 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -134,12 +134,8 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, break; case sbe_face: - out->priority = 0; out->lastattackdown = -1; out->oldhealth = -1; - out->lasthealthcalc = 0; - out->faceindex = 0; - out->facecount = 0; break; case sbe_number: @@ -150,7 +146,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - out->numfont = JS_GetString(font); + out->fontname = JS_GetString(font); json_t *numbertype = JS_GetObject(json, "type"); json_t *param = JS_GetObject(json, "param"); @@ -172,7 +168,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, return true; } -static const char *names[] = +static const char *sbe_names[] = { [sbe_canvas] = "canvas", [sbe_graphic] = "graphic", @@ -185,12 +181,12 @@ static const char *names[] = static boolean ParseSbarElem(json_t *json, sbarelem_t *out) { - for (sbarelementtype_t i = sbe_none + 1; i < sbe_max; ++i) + for (sbarelementtype_t type = sbe_none + 1; type < sbe_max; ++type) { - json_t *obj = JS_GetObject(json, names[i]); + json_t *obj = JS_GetObject(json, sbe_names[type]); if (obj && JS_IsObject(obj)) { - return ParseSbarElemType(obj, i, out); + return ParseSbarElemType(obj, type, out); } } diff --git a/src/st_sbardef.h b/src/st_sbardef.h index f40afb1ba..b50804346 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -118,7 +118,7 @@ struct sbarelem_s int duration_left; // number, percent - const char *numfont; + const char *fontname; sbarnumbertype_t numtype; numberfont_t *font; int numparam; diff --git a/src/st_stuff.c b/src/st_stuff.c index f13390d19..da6bb4f67 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -330,7 +330,7 @@ static patch_t **facepatches = NULL; // STATUS BAR CODE // -static void LoadFacePathes(void) +static void LoadFacePatches(void) { char lump[9] = {0}; @@ -734,7 +734,7 @@ static void UpdateNumber(sbarelem_t *elem) { array_foreach(font, sbardef->numberfonts) { - if (!strcmp(font->name, elem->numfont)) + if (!strcmp(font->name, elem->fontname)) { break; } @@ -794,6 +794,58 @@ static void UpdateNumber(sbarelem_t *elem) elem->numnumbers = numnumbers; } +static void UpdateAnimation(sbarelem_t *elem) +{ + if (elem->duration_left == 0) + { + ++elem->frame_index; + if (elem->frame_index == array_size(elem->frames)) + { + elem->frame_index = 0; + } + elem->duration_left = elem->frames[elem->frame_index].duration; + } + + --elem->duration_left; +} + +static void UpdateElem(sbarelem_t *elem) +{ + switch (elem->elemtype) + { + case sbe_face: + UpdateFace(elem); + break; + case sbe_animation: + UpdateAnimation(elem); + break; + case sbe_number: + case sbe_percent: + UpdateNumber(elem); + break; + default: + break; + } + + sbarelem_t *child; + array_foreach(child, elem->children) + { + UpdateElem(child); + } +} + +static void UpdateStatusBar(void) +{ + int barindex = MAX(screenblocks - 10, 0); + statusbar_t *statusbar = &sbardef->statusbars[barindex]; + + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + UpdateElem(child); + } +} + static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) { if (!patch) @@ -895,58 +947,6 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) elem->xoffset = base_xoffset; } -static void UpdateAnimation(sbarelem_t *elem) -{ - if (elem->duration_left == 0) - { - elem->frame_index++; - if (elem->frame_index == array_size(elem->frames)) - { - elem->frame_index = 0; - } - elem->duration_left = elem->frames[elem->frame_index].duration; - } - - elem->duration_left--; -} - -static void UpdateElem(sbarelem_t *elem) -{ - switch (elem->elemtype) - { - case sbe_face: - UpdateFace(elem); - break; - case sbe_animation: - UpdateAnimation(elem); - break; - case sbe_number: - case sbe_percent: - UpdateNumber(elem); - break; - default: - break; - } - - sbarelem_t *child; - array_foreach(child, elem->children) - { - UpdateElem(child); - } -} - -static void UpdateStatusBar(void) -{ - int barindex = MAX(screenblocks - 10, 0); - statusbar_t *statusbar = &sbardef->statusbars[barindex]; - - sbarelem_t *child; - array_foreach(child, statusbar->children) - { - UpdateElem(child); - } -} - static void DrawElem(int x, int y, sbarelem_t *elem) { x += elem->x_pos; @@ -2120,7 +2120,7 @@ void ST_Init(void) sbardef = ST_ParseSbarDef(); if (sbardef) { - LoadFacePathes(); + LoadFacePatches(); } ST_loadData(); From 90cdfabc322369b523bc757f342d43bfdb3ab275 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 11:11:22 +0700 Subject: [PATCH 05/55] always update all statusbars --- src/st_stuff.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index da6bb4f67..df6c1b79e 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -836,13 +836,14 @@ static void UpdateElem(sbarelem_t *elem) static void UpdateStatusBar(void) { - int barindex = MAX(screenblocks - 10, 0); - statusbar_t *statusbar = &sbardef->statusbars[barindex]; - - sbarelem_t *child; - array_foreach(child, statusbar->children) + statusbar_t *statusbar; + array_foreach(statusbar, sbardef->statusbars) { - UpdateElem(child); + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + UpdateElem(child); + } } } From 0c3588bb05870a0011644e8cc88d6702a8b176ad Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 12:20:58 +0700 Subject: [PATCH 06/55] use M_snprintf --- src/st_sbardef.c | 8 ++++---- src/st_stuff.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 96a7391f1..a56872c59 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -1,7 +1,6 @@ #include "st_sbardef.h" -#include #include #include "doomdef.h" @@ -9,6 +8,7 @@ #include "i_printf.h" #include "m_array.h" #include "m_json.h" +#include "m_misc.h" #include "m_swap.h" #include "r_defs.h" #include "v_fmt.h" @@ -217,7 +217,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) for (int num = 0; num < 10; ++num) { - snprintf(lump, sizeof(lump), "%sNUM%d", out->stem, num); + M_snprintf(lump, sizeof(lump), "%sNUM%d", out->stem, num); found = W_CheckNumForName(lump); if (found < 0) { @@ -228,7 +228,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) maxwidth = MAX(maxwidth, SHORT(out->numbers[num]->width)); } - snprintf(lump, sizeof(lump), "%sMINUS", out->stem); + M_snprintf(lump, sizeof(lump), "%sMINUS", out->stem); found = W_CheckNumForName(lump); if (found >= 0) { @@ -236,7 +236,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) maxwidth = MAX(maxwidth, SHORT(out->minus->width)); } - snprintf(lump, sizeof(lump), "%sPRCNT", out->stem); + M_snprintf(lump, sizeof(lump), "%sPRCNT", out->stem); found = W_CheckNumForName(lump); if (found >= 0) { diff --git a/src/st_stuff.c b/src/st_stuff.c index df6c1b79e..83e78406d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -339,30 +339,30 @@ static void LoadFacePatches(void) for (int straightface = 0; straightface < ST_NUMSTRAIGHTFACES; ++straightface) { - snprintf(lump, sizeof(lump), "STFST%d%d", painface, straightface); + M_snprintf(lump, sizeof(lump), "STFST%d%d", painface, straightface); array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); } - snprintf(lump, sizeof(lump), "STFTR%d0", painface); // turn right + M_snprintf(lump, sizeof(lump), "STFTR%d0", painface); // turn right array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); - snprintf(lump, sizeof(lump), "STFTL%d0", painface); // turn left + M_snprintf(lump, sizeof(lump), "STFTL%d0", painface); // turn left array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); - snprintf(lump, sizeof(lump), "STFOUCH%d", painface); // ouch! + M_snprintf(lump, sizeof(lump), "STFOUCH%d", painface); // ouch! array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); - snprintf(lump, sizeof(lump), "STFEVL%d", painface); // evil grin ;) + M_snprintf(lump, sizeof(lump), "STFEVL%d", painface); // evil grin ;) array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); - snprintf(lump, sizeof(lump), "STFKILL%d", painface); // pissed off + M_snprintf(lump, sizeof(lump), "STFKILL%d", painface); // pissed off array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); } - snprintf(lump, sizeof(lump), "STFGOD0"); + M_snprintf(lump, sizeof(lump), "STFGOD0"); array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); - snprintf(lump, sizeof(lump), "STFDEAD0"); + M_snprintf(lump, sizeof(lump), "STFDEAD0"); array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); } From 77ae8d3df3be9c2d97b78eaef09ff7cdf4ba7af3 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 21:26:11 +0700 Subject: [PATCH 07/55] refresh elements, fix crahes --- src/r_main.c | 3 - src/st_sbardef.c | 23 +----- src/st_sbardef.h | 6 +- src/st_stuff.c | 204 ++++++++++++++++++++++++++++++++++------------- 4 files changed, 156 insertions(+), 80 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 1107f23ff..5b887e821 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -673,9 +673,6 @@ void R_ExecuteSetViewSize (void) } } - // [crispy] forcefully initialize the status bar backing screen - ST_refreshBackground(); - pspr_interp = false; } diff --git a/src/st_sbardef.c b/src/st_sbardef.c index a56872c59..8c9fe8ca7 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -15,21 +15,6 @@ #include "w_wad.h" #include "z_zone.h" -static patch_t *CachePatchName(const char *name) -{ - int lumpnum = W_CheckNumForName(name); - if (lumpnum < 0) - { - lumpnum = (W_CheckNumForName)(name, ns_sprites); - if (lumpnum < 0) - { - I_Printf(VB_ERROR, "SBARDEF: patch %s not found", name); - return NULL; - } - } - return V_CachePatchNum(lumpnum, PU_STATIC); -} - static boolean ParseSbarCondition(json_t *json, sbarcondition_t *out) { json_t *condition = JS_GetObject(json, "condition"); @@ -51,7 +36,7 @@ static boolean ParseSbarFrame(json_t *json, sbarframe_t *out) { return false; } - out->patch = CachePatchName(JS_GetString(lump)); + out->patch_name = JS_GetString(lump); json_t *duration = JS_GetObject(json, "duration"); if (!JS_IsNumber(duration)) @@ -114,7 +99,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - out->patch = CachePatchName(JS_GetString(patch)); + out->patch_name = JS_GetString(patch); } break; @@ -146,7 +131,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - out->fontname = JS_GetString(font); + out->font_name = JS_GetString(font); json_t *numbertype = JS_GetObject(json, "type"); json_t *param = JS_GetObject(json, "param"); @@ -212,7 +197,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) out->type = JS_GetInteger(type); char lump[9] = {0}; - boolean found = false; + int found; int maxwidth = 0; for (int num = 0; num < 10; ++num) diff --git a/src/st_sbardef.h b/src/st_sbardef.h index b50804346..6ac5173cf 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -91,6 +91,7 @@ typedef enum typedef struct { + const char *patch_name; patch_t *patch; int duration; } sbarframe_t; @@ -110,6 +111,7 @@ struct sbarelem_s sbarelem_t *children; // graphic + const char *patch_name; patch_t *patch; // animation @@ -118,9 +120,9 @@ struct sbarelem_s int duration_left; // number, percent - const char *fontname; - sbarnumbertype_t numtype; + const char *font_name; numberfont_t *font; + sbarnumbertype_t numtype; int numparam; int maxlength; int number; diff --git a/src/st_stuff.c b/src/st_stuff.c index 83e78406d..8bdf7c54d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -330,6 +330,20 @@ static patch_t **facepatches = NULL; // STATUS BAR CODE // +patch_t *CachePatchName(const char *name) +{ + int lumpnum = W_CheckNumForName(name); + if (lumpnum < 0) + { + lumpnum = (W_CheckNumForName)(name, ns_sprites); + if (lumpnum < 0) + { + return NULL; + } + } + return V_CachePatchNum(lumpnum, PU_STATIC); +} + static void LoadFacePatches(void) { char lump[9] = {0}; @@ -550,7 +564,8 @@ static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) static int CalcPainOffset(sbarelem_t *elem) { - int health = plyr->health > 100 ? 100 : plyr->health; + player_t *player = &players[displayplayer]; + int health = player->health > 100 ? 100 : player->health; elem->lasthealthcalc = ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); elem->oldhealth = health; @@ -734,7 +749,7 @@ static void UpdateNumber(sbarelem_t *elem) { array_foreach(font, sbardef->numberfonts) { - if (!strcmp(font->name, elem->fontname)) + if (!strcmp(font->name, elem->font_name)) { break; } @@ -847,6 +862,59 @@ static void UpdateStatusBar(void) } } +static void RefreshElem(sbarelem_t *elem) +{ + switch (elem->elemtype) + { + case sbe_graphic: + elem->patch = CachePatchName(elem->patch_name); + break; + + case sbe_face: + elem->priority = 0; + elem->faceindex = 0; + elem->facecount = 0; + elem->lasthealthcalc = 0; + elem->oldhealth = -1; + elem->lastattackdown = -1; + break; + + case sbe_animation: + { + sbarframe_t *frame; + array_foreach(frame, elem->frames) + { + frame->patch = CachePatchName(frame->patch_name); + } + elem->frame_index = 0; + elem->duration_left = 0; + } + break; + + default: + break; + } + + sbarelem_t *child; + array_foreach(child, elem->children) + { + RefreshElem(child); + } +} + +static void RefreshStatusBar(void) +{ + statusbar_t *statusbar; + array_foreach(statusbar, sbardef->statusbars) + { + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + RefreshElem(child); + } + } +} + static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) { if (!patch) @@ -1579,71 +1647,84 @@ boolean palette_changes = true; static void ST_doPaletteStuff(void) { - int palette; - byte* pal; - int cnt = plyr->damagecount; - - // killough 7/14/98: beta version did not cause red berserk palette - if (!beta_emulation) + player_t *player = &players[displayplayer]; + int cnt = player->damagecount; + int numpal; - if (plyr->powers[pw_strength]) + // killough 7/14/98: beta version did not cause red berserk palette + if (!beta_emulation) { - // slowly fade the berzerk out - int bzc = 12 - (plyr->powers[pw_strength]>>6); - if (bzc > cnt) - cnt = bzc; + + if (player->powers[pw_strength]) + { + // slowly fade the berzerk out + int bzc = 12 - (player->powers[pw_strength] >> 6); + if (bzc > cnt) + { + cnt = bzc; + } + } } - if (STRICTMODE(!palette_changes)) - { - palette = 0; - } - else - if (cnt) - { - // In Chex Quest, the player never sees red. Instead, the radiation suit - // palette is used to tint the screen green, as though the player is being - // covered in goo by an attacking flemoid. - if (gameversion == exe_chex) + if (STRICTMODE(!palette_changes)) { - palette = RADIATIONPAL; + numpal = 0; } - else + else if (cnt) { - palette = (cnt+7)>>3; - if (palette >= NUMREDPALS) - palette = NUMREDPALS-1; - // [crispy] tune down a bit so the menu remains legible - if (menuactive || paused) - palette >>= 1; - palette += STARTREDPALS; + // In Chex Quest, the player never sees red. Instead, the radiation suit + // palette is used to tint the screen green, as though the player is + // being covered in goo by an attacking flemoid. + if (gameversion == exe_chex) + { + numpal = RADIATIONPAL; + } + else + { + numpal = (cnt + 7) >> 3; + if (numpal >= NUMREDPALS) + { + numpal = NUMREDPALS - 1; + } + // [crispy] tune down a bit so the menu remains legible + if (menuactive || paused) + { + numpal >>= 1; + } + numpal += STARTREDPALS; + } + } + else if (player->bonuscount) + { + numpal = (player->bonuscount + 7) >> 3; + if (numpal >= NUMBONUSPALS) + { + numpal = NUMBONUSPALS - 1; + } + numpal += STARTBONUSPALS; + } + // killough 7/14/98: beta version did not cause green palette + else if (beta_emulation) + { + numpal = 0; + } + else if (player->powers[pw_ironfeet] > 4 * 32 + || player->powers[pw_ironfeet] & 8) + { + numpal = RADIATIONPAL; } - } - else - if (plyr->bonuscount) - { - palette = (plyr->bonuscount+7)>>3; - if (palette >= NUMBONUSPALS) - palette = NUMBONUSPALS-1; - palette += STARTBONUSPALS; - } else - // killough 7/14/98: beta version did not cause green palette - if (beta_emulation) - palette = 0; - else - if (plyr->powers[pw_ironfeet] > 4*32 || plyr->powers[pw_ironfeet] & 8) - palette = RADIATIONPAL; - else - palette = 0; + { + numpal = 0; + } - if (palette != st_palette) + if (numpal != st_palette) { - st_palette = palette; - // haleyjd: must cast to byte *, arith. on void pointer is - // a GNU C extension - pal = (byte *)W_CacheLumpNum(lu_palette, PU_CACHE) + palette*768; - I_SetPalette (pal); + st_palette = numpal; + // haleyjd: must cast to byte *, arith. on void pointer is + // a GNU C extension + byte *pal = (byte *)W_CacheLumpNum(lu_palette, PU_CACHE) + numpal * 768; + I_SetPalette(pal); } } @@ -2076,6 +2157,11 @@ static boolean st_stopped = true; void ST_Start(void) { + if (sbardef) + { + RefreshStatusBar(); + return; + } if (!st_stopped) ST_Stop(); ST_initData(); @@ -2085,6 +2171,10 @@ void ST_Start(void) void ST_Stop(void) { + if (sbardef) + { + return; + } if (st_stopped) return; if (!nodrawers) @@ -2122,6 +2212,8 @@ void ST_Init(void) if (sbardef) { LoadFacePatches(); + lu_palette = W_GetNumForName ("PLAYPAL"); + return; } ST_loadData(); From 45cb31ddc13b4f216b90f49903202832c473cb08 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 20 Sep 2024 22:00:30 +0700 Subject: [PATCH 08/55] fix id24res.wad crash --- src/st_stuff.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 8bdf7c54d..14dc7b333 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -535,7 +535,10 @@ static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) break; case sbn_ammo: - result = player->ammo[param]; + if (param >= 0 && param < NUMAMMO) + { + result = player->ammo[param]; + } break; case sbn_ammoselected: @@ -543,15 +546,24 @@ static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) break; case sbn_maxammo: - result = player->maxammo[param]; + if (param >= 0 && param < NUMAMMO) + { + result = player->maxammo[param]; + } break; case sbn_weaponammo: - result = player->ammo[weaponinfo[param].ammo]; + if (param >= 0 && param < NUMWEAPONS) + { + result = player->ammo[weaponinfo[param].ammo]; + } break; case sbn_weaponmaxammo: - result = player->maxammo[weaponinfo[param].ammo]; + if (param >= 0 && param < NUMWEAPONS) + { + result = player->maxammo[weaponinfo[param].ammo]; + } break; case sbn_none: From 1e375ea97bd1b4fafdb4f58de8f0a8dc83de79ed Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sat, 21 Sep 2024 10:00:27 +0700 Subject: [PATCH 09/55] make some of the `UpdateFace` variables static, cosmetics --- src/st_sbardef.c | 27 ++++++++++++++++---------- src/st_sbardef.h | 19 ++++++++++++++----- src/st_stuff.c | 49 ++++++++++++++++++++++++------------------------ 3 files changed, 55 insertions(+), 40 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 8c9fe8ca7..e30acf468 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -1,3 +1,15 @@ +// +// Copyright(C) 2024 Roman Fomin +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. #include "st_sbardef.h" @@ -118,11 +130,6 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, } break; - case sbe_face: - out->lastattackdown = -1; - out->oldhealth = -1; - break; - case sbe_number: case sbe_percent: { @@ -133,15 +140,15 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, } out->font_name = JS_GetString(font); - json_t *numbertype = JS_GetObject(json, "type"); + json_t *type = JS_GetObject(json, "type"); json_t *param = JS_GetObject(json, "param"); json_t *maxlength = JS_GetObject(json, "maxlength"); - if (!JS_IsNumber(numbertype) || !JS_IsNumber(param) + if (!JS_IsNumber(type) || !JS_IsNumber(param) || !JS_IsNumber(maxlength)) { return false; } - out->numtype = JS_GetInteger(numbertype); + out->numtype = JS_GetInteger(type); out->numparam = JS_GetInteger(param); out->maxlength = JS_GetInteger(maxlength); } @@ -271,7 +278,7 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out) return true; } -sbardefs_t *ST_ParseSbarDef(void) +sbardef_t *ST_ParseSbarDef(void) { json_t *json = JS_Open("SBARDEF", "statusbar", (version_t){1, 0, 0}); if (json == NULL) @@ -287,7 +294,7 @@ sbardefs_t *ST_ParseSbarDef(void) return NULL; } - sbardefs_t *out = calloc(1, sizeof(*out)); + sbardef_t *out = calloc(1, sizeof(*out)); json_t *js_numberfonts = JS_GetObject(data, "numberfonts"); json_t *js_numberfont = NULL; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 6ac5173cf..3eea0d874 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -1,3 +1,15 @@ +// +// Copyright(C) 2024 Roman Fomin +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. #ifndef ST_SBARDEF_H #define ST_SBARDEF_H @@ -130,12 +142,9 @@ struct sbarelem_s int numnumbers; // face - int priority; int faceindex; int facecount; - int lasthealthcalc; int oldhealth; - int lastattackdown; }; typedef struct @@ -161,8 +170,8 @@ typedef struct { numberfont_t *numberfonts; statusbar_t *statusbars; -} sbardefs_t; +} sbardef_t; -sbardefs_t *ST_ParseSbarDef(void); +sbardef_t *ST_ParseSbarDef(void); #endif diff --git a/src/st_stuff.c b/src/st_stuff.c index 14dc7b333..690bdb5f7 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -322,7 +322,7 @@ int st_keyorskull[3]; // a random number per tick static int st_randomnumber; -static sbardefs_t *sbardef; +static sbardef_t *sbardef; static patch_t **facepatches = NULL; @@ -578,28 +578,30 @@ static int CalcPainOffset(sbarelem_t *elem) { player_t *player = &players[displayplayer]; int health = player->health > 100 ? 100 : player->health; - elem->lasthealthcalc = + int lasthealthcalc = ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); elem->oldhealth = health; - return elem->lasthealthcalc; + return lasthealthcalc; } static void UpdateFace(sbarelem_t *elem) { player_t *player = &players[displayplayer]; + static int priority; + static int lastattackdown = -1; - if (elem->priority < 10) + if (priority < 10) { // dead if (!player->health) { - elem->priority = 9; + priority = 9; elem->faceindex = ST_DEADFACE; elem->facecount = 1; } } - if (elem->priority < 9) + if (priority < 9) { if (player->bonuscount) { @@ -618,20 +620,20 @@ static void UpdateFace(sbarelem_t *elem) if (doevilgrin) { // evil grin if just picked up weapon - elem->priority = 8; + priority = 8; elem->facecount = ST_EVILGRINCOUNT; elem->faceindex = CalcPainOffset(elem) + ST_EVILGRINOFFSET; } } } - if (elem->priority < 8) + if (priority < 8) { if (player->damagecount && player->attacker && player->attacker != player->mo) { // being attacked - elem->priority = 7; + priority = 7; angle_t diffangle = 0; boolean right = false; @@ -682,55 +684,55 @@ static void UpdateFace(sbarelem_t *elem) } } - if (elem->priority < 7) + if (priority < 7) { // getting hurt because of your own damn stupidity if (player->damagecount) { if (player->health - elem->oldhealth > ST_MUCHPAIN) { - elem->priority = 7; + priority = 7; elem->facecount = ST_TURNCOUNT; elem->faceindex = CalcPainOffset(elem) + ST_OUCHOFFSET; } else { - elem->priority = 6; + priority = 6; elem->facecount = ST_TURNCOUNT; elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; } } } - if (elem->priority < 6) + if (priority < 6) { // rapid firing if (player->attackdown) { - if (elem->lastattackdown == -1) + if (lastattackdown == -1) { - elem->lastattackdown = ST_RAMPAGEDELAY; + lastattackdown = ST_RAMPAGEDELAY; } - else if (!--elem->lastattackdown) + else if (!--lastattackdown) { - elem->priority = 5; + priority = 5; elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; elem->facecount = 1; - elem->lastattackdown = 1; + lastattackdown = 1; } } else { - elem->lastattackdown = -1; + lastattackdown = -1; } } - if (elem->priority < 5) + if (priority < 5) { // invulnerability if ((player->cheats & CF_GODMODE) || player->powers[pw_invulnerability]) { - elem->priority = 4; + priority = 4; elem->faceindex = ST_GODFACE; elem->facecount = 1; } @@ -741,7 +743,7 @@ static void UpdateFace(sbarelem_t *elem) { elem->faceindex = CalcPainOffset(elem) + (M_Random() % 3); elem->facecount = ST_STRAIGHTFACECOUNT; - elem->priority = 0; + priority = 0; } --elem->facecount; @@ -883,12 +885,9 @@ static void RefreshElem(sbarelem_t *elem) break; case sbe_face: - elem->priority = 0; elem->faceindex = 0; elem->facecount = 0; - elem->lasthealthcalc = 0; elem->oldhealth = -1; - elem->lastattackdown = -1; break; case sbe_animation: From 8aaced8acb8bb49b25c93298032d97bfa59f220a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sat, 21 Sep 2024 17:23:18 +0700 Subject: [PATCH 10/55] add weaponinfo slot field --- src/d_items.c | 33 ++++++---- src/d_items.h | 2 + src/st_stuff.c | 166 ++++++++++++++++++++++++------------------------- 3 files changed, 105 insertions(+), 96 deletions(-) diff --git a/src/d_items.c b/src/d_items.c index d0c9f85d2..7c8612939 100644 --- a/src/d_items.c +++ b/src/d_items.c @@ -44,8 +44,9 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_NULL, 1, 0, - WPF_FLEEMELEE | WPF_AUTOSWITCHFROM | WPF_NOAUTOSWITCHTO - }, + WPF_FLEEMELEE | WPF_AUTOSWITCHFROM | WPF_NOAUTOSWITCHTO, + 1 + }, { // pistol am_clip, @@ -56,8 +57,9 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_PISTOLFLASH, 1, 0, - WPF_AUTOSWITCHFROM - }, + WPF_AUTOSWITCHFROM, + 2 + }, { // shotgun am_shell, @@ -68,7 +70,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_SGUNFLASH1, 1, 0, - WPF_NOFLAG + WPF_NOFLAG, + 3 }, { // chaingun @@ -80,7 +83,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_CHAINFLASH1, 1, 0, - WPF_NOFLAG + WPF_NOFLAG, + 4 }, { // missile launcher @@ -92,7 +96,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_MISSILEFLASH1, 1, 0, - WPF_NOAUTOFIRE + WPF_NOAUTOFIRE, + 5 }, { // plasma rifle @@ -104,7 +109,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_PLASMAFLASH1, 1, 0, - WPF_NOFLAG + WPF_NOFLAG, + 6 }, { // bfg 9000 @@ -116,7 +122,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_BFGFLASH1, 40, 0, - WPF_NOAUTOFIRE + WPF_NOAUTOFIRE, + 7 }, { // chainsaw @@ -128,7 +135,8 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_NULL, 1, 0, - WPF_NOTHRUST | WPF_FLEEMELEE | WPF_NOAUTOSWITCHTO + WPF_NOTHRUST | WPF_FLEEMELEE | WPF_NOAUTOSWITCHTO, + 1 }, { // super shotgun @@ -140,8 +148,9 @@ weaponinfo_t weaponinfo[NUMWEAPONS+2] = S_DSGUNFLASH1, 2, 0, - WPF_NOFLAG - }, + WPF_NOFLAG, + 3 + }, { 0 }, diff --git a/src/d_items.h b/src/d_items.h index 20e8abb3a..a120a69b9 100644 --- a/src/d_items.h +++ b/src/d_items.h @@ -57,6 +57,8 @@ typedef struct int ammopershot; int intflags; int flags; + // id24 + int slot; } weaponinfo_t; extern weaponinfo_t weaponinfo[NUMWEAPONS+2]; diff --git a/src/st_stuff.c b/src/st_stuff.c index 690bdb5f7..64008f540 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -392,7 +392,10 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) switch (cond->condition) { case sbc_weaponowned: - result &= !!player->weaponowned[cond->param]; + if (cond->param >= 0 && cond->param < NUMWEAPONS) + { + result &= !!player->weaponowned[cond->param]; + } break; case sbc_weaponselected: @@ -418,48 +421,42 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) case sbc_weaponslotowned: { - // TODO - // boolean owned = false; - // for( const weaponinfo_t* weapon : weaponinfo.All() ) - // { - // if( weapon->slot == condition.param && - // player->weaponowned[ weapon->index ] ) - // { - // owned = true; - // break; - // } - // } - // result &= owned; + boolean owned = false; + for (int i = 0; i < NUMWEAPONS; ++i) + { + if (weaponinfo[i].slot == cond->param + && player->weaponowned[i]) + { + owned = true; + break; + } + } + result &= owned; } break; case sbc_weaponslotnotowned: { - // TODO - // bool notowned = true; - // for( const weaponinfo_t* weapon : weaponinfo.All() ) - // { - // if( weapon->slot == condition.param && - // player->weaponowned[ weapon->index ] ) - // { - // notowned = false; - // break; - // } - // } - // result &= notowned; + boolean notowned = true; + for (int i = 0; i < NUMWEAPONS; ++i) + { + if (weaponinfo[i].slot == cond->param + && player->weaponowned[i]) + { + notowned = false; + break; + } + } + result &= notowned; } break; case sbc_weaponslotselected: - // TODO - // result &= weaponinfo[ player->readyweapon ].slot == - // condition.param; + result &= weaponinfo[player->readyweapon].slot == cond->param; break; case sbc_weaponslotnotselected: - // TODO - // result &= weaponinfo[ player->readyweapon ].slot != - // condition.param; + result &= weaponinfo[player->readyweapon].slot != cond->param; break; case sbc_itemowned: @@ -473,13 +470,11 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) break; case sbc_featurelevelgreaterequal: - // result &= featureslookup[ (int32_t)gameversion ] >= - // condition.param; + // ignore break; case sbc_featurelevelless: - // result &= featureslookup[ (int32_t)gameversion ] < - // condition.param ; + // ignore break; case sbc_sessiontypeeequal: @@ -1029,45 +1024,47 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) static void DrawElem(int x, int y, sbarelem_t *elem) { + if (!CheckConditions(elem->conditions, &players[displayplayer])) + { + return; + } + x += elem->x_pos; y += elem->y_pos; - if (CheckConditions(elem->conditions, &players[displayplayer])) + switch (elem->elemtype) { - switch (elem->elemtype) - { - case sbe_graphic: - DrawPatch(x, y, elem->alignment, elem->patch); - break; + case sbe_graphic: + DrawPatch(x, y, elem->alignment, elem->patch); + break; - case sbe_face: - { - patch_t *patch = facepatches[elem->faceindex]; - DrawPatch(x, y, elem->alignment, patch); - } - break; + case sbe_face: + { + patch_t *patch = facepatches[elem->faceindex]; + DrawPatch(x, y, elem->alignment, patch); + } + break; - case sbe_animation: - { - patch_t *patch = elem->frames[elem->frame_index].patch; - DrawPatch(x, y, elem->alignment, patch); - } - break; + case sbe_animation: + { + patch_t *patch = elem->frames[elem->frame_index].patch; + DrawPatch(x, y, elem->alignment, patch); + } + break; - case sbe_number: - case sbe_percent: - DrawNumber(x, y, elem); - break; + case sbe_number: + case sbe_percent: + DrawNumber(x, y, elem); + break; - default: - break; - } + default: + break; + } - sbarelem_t *child; - array_foreach(child, elem->children) - { - DrawElem(x, y, child); - } + sbarelem_t *child; + array_foreach(child, elem->children) + { + DrawElem(x, y, child); } } @@ -1660,7 +1657,7 @@ static void ST_doPaletteStuff(void) { player_t *player = &players[displayplayer]; int cnt = player->damagecount; - int numpal; + int palette_index; // killough 7/14/98: beta version did not cause red berserk palette if (!beta_emulation) @@ -1679,7 +1676,7 @@ static void ST_doPaletteStuff(void) if (STRICTMODE(!palette_changes)) { - numpal = 0; + palette_index = 0; } else if (cnt) { @@ -1688,54 +1685,55 @@ static void ST_doPaletteStuff(void) // being covered in goo by an attacking flemoid. if (gameversion == exe_chex) { - numpal = RADIATIONPAL; + palette_index = RADIATIONPAL; } else { - numpal = (cnt + 7) >> 3; - if (numpal >= NUMREDPALS) + palette_index = (cnt + 7) >> 3; + if (palette_index >= NUMREDPALS) { - numpal = NUMREDPALS - 1; + palette_index = NUMREDPALS - 1; } // [crispy] tune down a bit so the menu remains legible if (menuactive || paused) { - numpal >>= 1; + palette_index >>= 1; } - numpal += STARTREDPALS; + palette_index += STARTREDPALS; } } else if (player->bonuscount) { - numpal = (player->bonuscount + 7) >> 3; - if (numpal >= NUMBONUSPALS) + palette_index = (player->bonuscount + 7) >> 3; + if (palette_index >= NUMBONUSPALS) { - numpal = NUMBONUSPALS - 1; + palette_index = NUMBONUSPALS - 1; } - numpal += STARTBONUSPALS; + palette_index += STARTBONUSPALS; } // killough 7/14/98: beta version did not cause green palette else if (beta_emulation) { - numpal = 0; + palette_index = 0; } else if (player->powers[pw_ironfeet] > 4 * 32 || player->powers[pw_ironfeet] & 8) { - numpal = RADIATIONPAL; + palette_index = RADIATIONPAL; } else { - numpal = 0; + palette_index = 0; } - if (numpal != st_palette) + if (palette_index != st_palette) { - st_palette = numpal; + st_palette = palette_index; // haleyjd: must cast to byte *, arith. on void pointer is // a GNU C extension - byte *pal = (byte *)W_CacheLumpNum(lu_palette, PU_CACHE) + numpal * 768; - I_SetPalette(pal); + byte *palette = + (byte *)W_CacheLumpNum(lu_palette, PU_CACHE) + palette_index * 768; + I_SetPalette(palette); } } From c8e53599f5f8beef8a263249983c271d6fc630cf Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sat, 21 Sep 2024 22:44:33 +0700 Subject: [PATCH 11/55] fill background, add default sbardef to base --- base/all-all/sbardef | 1955 ++++++++++++++++++++++++++++++++++++++++++ src/m_json.c | 2 +- src/r_main.c | 2 + src/st_stuff.c | 58 +- src/st_stuff.h | 3 +- 5 files changed, 2013 insertions(+), 7 deletions(-) create mode 100644 base/all-all/sbardef diff --git a/base/all-all/sbardef b/base/all-all/sbardef new file mode 100644 index 000000000..725c69cd7 --- /dev/null +++ b/base/all-all/sbardef @@ -0,0 +1,1955 @@ +{ + "type": "statusbar", + "version": "1.0.0", + "metadata": null, + "data": + { + "numberfonts": + [ + { + "name": "BigRed", + "type": 0, + "stem": "STT" + }, + { + "name": "SmallGrey", + "type": 0, + "stem": "STG" + }, + { + "name": "SmallYellow", + "type": 0, + "stem": "STYS" + } + ], + "statusbars": + [ + { + "height": 32, + "fullscreenrender": false, + "fillflat": null, + "children": + [ + { + "graphic": + { + "x": 160, + "y": 0, + "alignment": 1, + "patch": "STBAR", + "tranmap": null, + "translation": null, + "conditions": null, + "children": null + } + }, + { + "facebackground": + { + "x": 143, + "y": 1, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 15, + "param": 0 + } + ], + "children": null + } + }, + { + "face": + { + "x": 143, + "y": 0, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 44, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 104, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "percent": + { + "x": 235, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 138, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 2, + "param": 0, + "maxlength": 2, + "conditions": + [ + { + "condition": 14, + "param": 2 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 104, + "y": 0, + "alignment": 0, + "patch": "STARMS", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 15, + "param": 2 + } + ], + "children": + [ + { + "graphic": + { + "x": 7, + "y": 4, + "alignment": 0, + "patch": "STGNUM2", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 2 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 7, + "y": 4, + "alignment": 0, + "patch": "STYSNUM2", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 2 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 19, + "y": 4, + "alignment": 0, + "patch": "STGNUM3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 3 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 19, + "y": 4, + "alignment": 0, + "patch": "STYSNUM3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 3 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 31, + "y": 4, + "alignment": 0, + "patch": "STGNUM4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 31, + "y": 4, + "alignment": 0, + "patch": "STYSNUM4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 7, + "y": 14, + "alignment": 0, + "patch": "STGNUM5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 7, + "y": 14, + "alignment": 0, + "patch": "STYSNUM5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 19, + "y": 14, + "alignment": 0, + "patch": "STGNUM6", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 19, + "y": 14, + "alignment": 0, + "patch": "STYSNUM6", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 31, + "y": 14, + "alignment": 0, + "patch": "STGNUM7", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 7, + "param": 7 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 31, + "y": 14, + "alignment": 0, + "patch": "STYSNUM7", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 6, + "param": 7 + } + ], + "children": null + } + } + ] + } + }, + { + "number": + { + "x": 288, + "y": 5, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 3, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 314, + "y": 5, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 5, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 288, + "y": 11, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 3, + "param": 1, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 314, + "y": 11, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 5, + "param": 1, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 288, + "y": 17, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 3, + "param": 3, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 314, + "y": 17, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 5, + "param": 3, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 288, + "y": 23, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 3, + "param": 2, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 314, + "y": 23, + "alignment": 2, + "font": "SmallYellow", + "tranmap": null, + "translation": null, + "type": 5, + "param": 2, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 3, + "alignment": 0, + "patch": "STKEYS0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 11, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 3, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 1 + }, + { + "condition": 10, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 3, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 3, + "alignment": 0, + "patch": "STKEYS6", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 13, + "alignment": 0, + "patch": "STKEYS1", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 11, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 13, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 2 + }, + { + "condition": 10, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 13, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 13, + "alignment": 0, + "patch": "STKEYS7", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 23, + "alignment": 0, + "patch": "STKEYS2", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 11, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 23, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 3 + }, + { + "condition": 10, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 23, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 239, + "y": 23, + "alignment": 0, + "patch": "STKEYS8", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + } + ] + }, + { + "height": 200, + "fullscreenrender": true, + "fillflat": null, + "children": + [ + { + "canvas": + { + "x": 0, + "y": 0, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 18, + "param": 0 + } + ], + "children": + [ + { + "facebackground": + { + "x": 19, + "y": 162, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 15, + "param": 0 + } + ], + "children": null + } + }, + { + "face": + { + "x": 20, + "y": 161, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 53, + "y": 175, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "graphic": + { + "x": 292, + "y": 189, + "alignment": 0, + "patch": "CLIPA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 0 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 295, + "y": 186, + "alignment": 0, + "patch": "SHELA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 297, + "y": 192, + "alignment": 0, + "patch": "FTNKA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 2 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 295, + "y": 195, + "alignment": 0, + "patch": "ROCKA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 3 + } + ], + "children": null + } + }, + { + "number": + { + "x": 285, + "y": 175, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 125, + "y": 192, + "alignment": 0, + "patch": "ARM1A0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 15 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 125, + "y": 192, + "alignment": 0, + "patch": "ARM2A0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 15 + } + ], + "children": null + } + }, + { + "number": + { + "x": 145, + "y": 175, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 300, + "y": 5, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 2, + "param": 0, + "maxlength": 2, + "conditions": + [ + { + "condition": 14, + "param": 2 + } + ], + "children": null + } + }, + { + "canvas": + { + "x": 310, + "y": 168, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": null, + "children": + [ + { + "graphic": + { + "x": 0, + "y": 0, + "alignment": 0, + "patch": "STKEYS0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 11, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 0, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 1 + }, + { + "condition": 10, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 0, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 0, + "alignment": 0, + "patch": "STKEYS6", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 10, + "alignment": 0, + "patch": "STKEYS1", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 11, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 10, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 2 + }, + { + "condition": 10, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 10, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 10, + "alignment": 0, + "patch": "STKEYS7", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 20, + "alignment": 0, + "patch": "STKEYS2", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 11, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 20, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 3 + }, + { + "condition": 10, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 20, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 0, + "y": 20, + "alignment": 0, + "patch": "STKEYS8", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + } + ] + } + } + ] + } + }, + { + "canvas": + { + "x": 0, + "y": 0, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 18, + "param": 1 + } + ], + "children": + [ + { + "facebackground": + { + "x": 79, + "y": 162, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 15, + "param": 0 + } + ], + "children": null + } + }, + { + "face": + { + "x": 80, + "y": 161, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 114, + "y": 170, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "graphic": + { + "x": 178, + "y": 163, + "alignment": 0, + "patch": "CLIPA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 0 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 178, + "y": 160, + "alignment": 0, + "patch": "SHELA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 180, + "y": 165, + "alignment": 0, + "patch": "FTNKA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 2 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 180, + "y": 166, + "alignment": 0, + "patch": "ROCKA0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 5, + "param": 3 + } + ], + "children": null + } + }, + { + "number": + { + "x": 198, + "y": 150, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 180, + "y": 187, + "alignment": 0, + "patch": "ARM1A0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 15 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 180, + "y": 187, + "alignment": 0, + "patch": "ARM2A0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 15 + } + ], + "children": null + } + }, + { + "number": + { + "x": 198, + "y": 170, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": null, + "children": null + } + }, + { + "number": + { + "x": 114, + "y": 150, + "alignment": 0, + "font": "BigRed", + "tranmap": null, + "translation": null, + "type": 2, + "param": 0, + "maxlength": 2, + "conditions": + [ + { + "condition": 14, + "param": 2 + } + ], + "children": null + } + }, + { + "canvas": + { + "x": 160, + "y": 191, + "alignment": 0, + "tranmap": null, + "translation": null, + "conditions": null, + "children": + [ + { + "graphic": + { + "x": -15, + "y": 0, + "alignment": 0, + "patch": "STKEYS0", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 11, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -15, + "y": 0, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 1 + }, + { + "condition": 10, + "param": 4 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -15, + "y": 0, + "alignment": 0, + "patch": "STKEYS3", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -15, + "y": 0, + "alignment": 0, + "patch": "STKEYS6", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 1 + }, + { + "condition": 10, + "param": 4 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -5, + "y": 0, + "alignment": 0, + "patch": "STKEYS1", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 11, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -5, + "y": 0, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 2 + }, + { + "condition": 10, + "param": 5 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -5, + "y": 0, + "alignment": 0, + "patch": "STKEYS4", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": -5, + "y": 0, + "alignment": 0, + "patch": "STKEYS7", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 2 + }, + { + "condition": 10, + "param": 5 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 5, + "y": 0, + "alignment": 0, + "patch": "STKEYS2", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 11, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 5, + "y": 0, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 11, + "param": 3 + }, + { + "condition": 10, + "param": 6 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 5, + "y": 0, + "alignment": 0, + "patch": "STKEYS5", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 13, + "param": 1 + } + ], + "children": null + } + }, + { + "graphic": + { + "x": 5, + "y": 0, + "alignment": 0, + "patch": "STKEYS8", + "tranmap": null, + "translation": null, + "conditions": + [ + { + "condition": 10, + "param": 3 + }, + { + "condition": 10, + "param": 6 + }, + { + "condition": 12, + "param": 1 + } + ], + "children": null + } + } + ] + } + } + ] + } + } + ] + }, + { + "height": 200, + "fullscreenrender": true, + "fillflat": null, + "children": null + } + ] + } +} diff --git a/src/m_json.c b/src/m_json.c index 5ae6b3592..7480b17db 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -153,7 +153,7 @@ const char *JS_GetStringValue(json_t *json, const char *string) json_t *obj = JS_GetObject(json, string); if (JS_IsString(obj)) { - return json->valuestring; + return obj->valuestring; } return NULL; } diff --git a/src/r_main.c b/src/r_main.c index 5b887e821..ed6292c92 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -673,6 +673,8 @@ void R_ExecuteSetViewSize (void) } } + st_refresh_background = true; + pspr_interp = false; } diff --git a/src/st_stuff.c b/src/st_stuff.c index 64008f540..81be05a3d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1068,11 +1068,61 @@ static void DrawElem(int x, int y, sbarelem_t *elem) } } +boolean st_refresh_background = true; + +static void DrawBackground(const char *name) +{ + if (!st_refresh_background) + { + V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, + ST_Y); + return; + } + + V_UseBuffer(st_backing_screen); + + if (!name) + { + name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; + } + + byte *flat = V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); + + V_TileBlock64(ST_Y, video.unscaledw, ST_HEIGHT, flat); + + if (screenblocks == 10) + { + patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); + for (int x = 0; x < video.unscaledw; x += 8) + { + V_DrawPatch(x - video.deltaw, 0, patch); + } + } + + V_RestoreBuffer(); + + V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, ST_Y); + + st_refresh_background = false; +} + static void DrawStatusBar(void) { + static int old_barindex = -1; + int barindex = MAX(screenblocks - 10, 0); statusbar_t *statusbar = &sbardef->statusbars[barindex]; + if (!statusbar->fullscreenrender) + { + if (old_barindex != barindex) + { + st_refresh_background = true; + old_barindex = barindex; + } + DrawBackground(statusbar->fillflat); + } + sbarelem_t *child; array_foreach(child, statusbar->children) { @@ -2230,10 +2280,10 @@ void ST_Init(void) void ST_InitRes(void) { - int height = V_ScaleY(StatusBarBufferHeight()); - - // killough 11/98: allocate enough for hires - st_backing_screen = Z_Malloc(video.pitch * height * sizeof(*st_backing_screen), PU_RENDERER, 0); + // killough 11/98: allocate enough for hires + st_backing_screen = + Z_Malloc(video.pitch * V_ScaleY(ST_HEIGHT) * sizeof(*st_backing_screen), + PU_RENDERER, 0); } void ST_Warnings(void) diff --git a/src/st_stuff.h b/src/st_stuff.h index 807a9039d..c3238d1bd 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -57,8 +57,7 @@ void ST_Warnings(void); void ST_ResetPalette(void); -// [crispy] forcefully initialize the status bar backing screen -void ST_refreshBackground(void); +extern boolean st_refresh_background; void ST_InitRes(void); From 610581ad4f8b27216d1fc5986649843017ba8148 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sun, 22 Sep 2024 00:04:00 +0700 Subject: [PATCH 12/55] add support for Boom colors --- base/all-all/{sbardef => sbardef.lmp} | 292 +++++++++++++++++++++++++- src/st_sbardef.c | 3 + src/st_sbardef.h | 7 + src/st_stuff.c | 67 +++--- src/v_video.c | 12 ++ src/v_video.h | 2 + 6 files changed, 350 insertions(+), 33 deletions(-) rename base/all-all/{sbardef => sbardef.lmp} (89%) diff --git a/base/all-all/sbardef b/base/all-all/sbardef.lmp similarity index 89% rename from base/all-all/sbardef rename to base/all-all/sbardef.lmp index 725c69cd7..3525c3721 100644 --- a/base/all-all/sbardef +++ b/base/all-all/sbardef.lmp @@ -90,6 +90,100 @@ { "condition": 4, "param": 0 + }, + { + "condition": 22, + "param": 0 + } + ], + "children": null + } + }, + { + "number": + { + "x": 44, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRRED", + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + }, + { + "condition": 20, + "param": 0 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "number": + { + "x": 44, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGOLD", + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + }, + { + "condition": 20, + "param": 25 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "number": + { + "x": 44, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGREEN", + "type": 4, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 4, + "param": 0 + }, + { + "condition": 20, + "param": 50 + }, + { + "condition": 22, + "param": 1 } ], "children": null @@ -107,7 +201,91 @@ "type": 0, "param": 0, "maxlength": 3, - "conditions": null, + "conditions": + [ + { + "condition": 22, + "param": 0 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 104, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRRED", + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 19, + "param": 0 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 104, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGOLD", + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 19, + "param": 25 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 104, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGREEN", + "type": 0, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 19, + "param": 50 + }, + { + "condition": 22, + "param": 1 + } + ], "children": null } }, @@ -123,7 +301,117 @@ "type": 1, "param": 0, "maxlength": 3, - "conditions": null, + "conditions": + [ + { + "condition": 22, + "param": 0 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 235, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRRED", + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 21, + "param": 0 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 235, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGOLD", + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 21, + "param": 25 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 235, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRGREEN", + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 21, + "param": 50 + }, + { + "condition": 22, + "param": 1 + } + ], + "children": null + } + }, + { + "percent": + { + "x": 235, + "y": 3, + "alignment": 2, + "font": "BigRed", + "tranmap": null, + "translation": "CRBLUE", + "type": 1, + "param": 0, + "maxlength": 3, + "conditions": + [ + { + "condition": 21, + "param": 100 + }, + { + "condition": 22, + "param": 1 + } + ], "children": null } }, diff --git a/src/st_sbardef.c b/src/st_sbardef.c index e30acf468..1bdf14aae 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -24,6 +24,7 @@ #include "m_swap.h" #include "r_defs.h" #include "v_fmt.h" +#include "v_video.h" #include "w_wad.h" #include "z_zone.h" @@ -80,6 +81,8 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, out->tranmap = JS_GetStringValue(json, "tranmap"); out->translation = JS_GetStringValue(json, "translation"); + out->cr = out->translation ? V_CRByName(out->translation) : CR_NONE; + json_t *js_conditions = JS_GetObject(json, "conditions"); json_t *js_condition = NULL; JS_ArrayForEach(js_condition, js_conditions) diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 3eea0d874..bd43aab29 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -16,6 +16,7 @@ #include "doomtype.h" #include "r_defs.h" +#include "v_video.h" typedef enum { @@ -47,6 +48,11 @@ typedef enum sbc_modeeequal, sbc_modenotequal, sbc_hudmodeequal, + // Woof! + sbc_healthgreaterequal, + sbc_ammogreaterequal_percent, + sbc_armorgreaterequal, + sbc_boomtranslation, sbc_max, } sbarconditiontype_t; @@ -119,6 +125,7 @@ struct sbarelem_s sbaralignment_t alignment; const char *tranmap; const char *translation; + crange_idx_e cr; sbarcondition_t *conditions; sbarelem_t *children; diff --git a/src/st_stuff.c b/src/st_stuff.c index 81be05a3d..bc35d42d0 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -407,7 +407,10 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) break; case sbc_weaponhasammo: - result &= weaponinfo[cond->param].ammo != am_noammo; + if (cond->param >= 0 && cond->param < NUMWEAPONS) + { + result &= weaponinfo[cond->param].ammo != am_noammo; + } break; case sbc_selectedweaponhasammo: @@ -499,6 +502,31 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) result &= (!!cond->param == false); break; + // Woof! additions + case sbc_healthgreaterequal: + result &= player->health >= cond->param; + break; + + case sbc_ammogreaterequal_percent: + { + ammotype_t type = weaponinfo[player->readyweapon].ammo; + if (type != am_noammo) + { + result &= + (player->ammo[type] * 100 / player->maxammo[type]) + >= cond->param; + } + } + break; + + case sbc_armorgreaterequal: + result &= player->armorpoints >= cond->param; + break; + + case sbc_boomtranslation: + result &= sts_colored_numbers == cond->param; + break; + case sbc_none: default: result = false; @@ -921,7 +949,8 @@ static void RefreshStatusBar(void) } } -static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) +static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, + crange_idx_e cr) { if (!patch) { @@ -949,7 +978,7 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch) y -= height; } - V_DrawPatch(x, y, patch); + V_DrawPatchTranslated(x, y, patch, colrngs[cr]); } static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) @@ -977,7 +1006,7 @@ static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) elem->xoffset += (width + widthdiff); } - DrawPatch(x + elem->xoffset, y, elem->alignment, glyph); + DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, elem->cr); if (elem->alignment & sbe_h_middle) { @@ -1035,20 +1064,20 @@ static void DrawElem(int x, int y, sbarelem_t *elem) switch (elem->elemtype) { case sbe_graphic: - DrawPatch(x, y, elem->alignment, elem->patch); + DrawPatch(x, y, elem->alignment, elem->patch, elem->cr); break; case sbe_face: { patch_t *patch = facepatches[elem->faceindex]; - DrawPatch(x, y, elem->alignment, patch); + DrawPatch(x, y, elem->alignment, patch, elem->cr); } break; case sbe_animation: { patch_t *patch = elem->frames[elem->frame_index].patch; - DrawPatch(x, y, elem->alignment, patch); + DrawPatch(x, y, elem->alignment, patch, elem->cr); } break; @@ -2241,30 +2270,6 @@ void ST_Stop(void) st_stopped = true; } -static int StatusBarBufferHeight(void) -{ - int i; - int st_height = ST_HEIGHT; - patch_t *const patch = W_CacheLumpName("brdr_b", PU_CACHE); - - if (patch && SHORT(patch->height) > st_height) - st_height = SHORT(patch->height); - - if (sbar && SHORT(sbar->height) > st_height) - st_height = SHORT(sbar->height); - - if (armsbg && SHORT(armsbg->height) > st_height) - st_height = SHORT(armsbg->height); - - for (i = 0; i < MAXPLAYERS; i++) - { - if (faceback[i] && SHORT(faceback[i]->height) > st_height) - st_height = SHORT(faceback[i]->height); - } - - return st_height; -} - void ST_Init(void) { sbardef = ST_ParseSbarDef(); diff --git a/src/v_video.c b/src/v_video.c index 4e2fccf4c..c53181055 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -139,6 +139,18 @@ int V_BloodColor(int blood) return bloodcolor[blood]; } +crange_idx_e V_CRByName(const char *name) +{ + for (const crdef_t *p = crdefs; p->name; ++p) + { + if (!strcmp(p->name, name)) + { + return p - crdefs; + } + } + return CR_NONE; +} + int v_lightest_color, v_darkest_color; byte invul_gray[256]; diff --git a/src/v_video.h b/src/v_video.h index 15e8e66bc..f2bd5b1a2 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -86,6 +86,8 @@ typedef enum // jff 1/16/98 end palette color range additions +crange_idx_e V_CRByName(const char *name); + extern pixel_t *I_VideoBuffer; // jff 4/24/98 loads color translation lumps From f1bb5becf2b45106a68a0a82c3518b4e5b41cc5c Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 24 Sep 2024 21:48:27 +0700 Subject: [PATCH 13/55] add dependecy on base directory --- src/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6dc4cea9f..0cc9484c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -282,11 +282,13 @@ if(MSVC) target_link_options(woof-setup PRIVATE "/MANIFEST:NO") endif() -add_custom_command(TARGET woof POST_BUILD +add_custom_target(woof-base COMMAND ${CMAKE_COMMAND} -E tar cf - "$/woof.pk3" --format=zip . + "${CMAKE_CURRENT_BINARY_DIR}/woof.pk3" --format=zip . WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/base") +add_dependencies(woof woof-base) + # Install # # Rename woof-com and woof-exe executables. @@ -313,9 +315,10 @@ if(WIN32) else() install(TARGETS woof woof-setup RUNTIME DESTINATION .) endif() - install(FILES "$/woof.com" DESTINATION .) - install(FILES "$/woof.exe" DESTINATION .) - install(FILES "$/woof.pk3" DESTINATION .) + install(FILES "$/woof.com" + "$/woof.exe" + "$/woof.pk3" + DESTINATION .) else() install(TARGETS woof woof-setup RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES "$/woof.pk3" From 5e954e257fa5dbc8dfc9ff63aa47264a4475d40a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 01:11:31 +0700 Subject: [PATCH 14/55] restore base/stbardef.lmp, implement UpdateBoomColors function --- base/all-all/sbardef.lmp | 292 +-------------------------------------- src/st_sbardef.h | 7 +- src/st_stuff.c | 144 ++++++++++++++----- 3 files changed, 114 insertions(+), 329 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 3525c3721..725c69cd7 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -90,100 +90,6 @@ { "condition": 4, "param": 0 - }, - { - "condition": 22, - "param": 0 - } - ], - "children": null - } - }, - { - "number": - { - "x": 44, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRRED", - "type": 4, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 4, - "param": 0 - }, - { - "condition": 20, - "param": 0 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "number": - { - "x": 44, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGOLD", - "type": 4, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 4, - "param": 0 - }, - { - "condition": 20, - "param": 25 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "number": - { - "x": 44, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGREEN", - "type": 4, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 4, - "param": 0 - }, - { - "condition": 20, - "param": 50 - }, - { - "condition": 22, - "param": 1 } ], "children": null @@ -201,91 +107,7 @@ "type": 0, "param": 0, "maxlength": 3, - "conditions": - [ - { - "condition": 22, - "param": 0 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 104, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRRED", - "type": 0, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 19, - "param": 0 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 104, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGOLD", - "type": 0, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 19, - "param": 25 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 104, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGREEN", - "type": 0, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 19, - "param": 50 - }, - { - "condition": 22, - "param": 1 - } - ], + "conditions": null, "children": null } }, @@ -301,117 +123,7 @@ "type": 1, "param": 0, "maxlength": 3, - "conditions": - [ - { - "condition": 22, - "param": 0 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 235, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRRED", - "type": 1, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 21, - "param": 0 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 235, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGOLD", - "type": 1, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 21, - "param": 25 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 235, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRGREEN", - "type": 1, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 21, - "param": 50 - }, - { - "condition": 22, - "param": 1 - } - ], - "children": null - } - }, - { - "percent": - { - "x": 235, - "y": 3, - "alignment": 2, - "font": "BigRed", - "tranmap": null, - "translation": "CRBLUE", - "type": 1, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 21, - "param": 100 - }, - { - "condition": 22, - "param": 1 - } - ], + "conditions": null, "children": null } }, diff --git a/src/st_sbardef.h b/src/st_sbardef.h index bd43aab29..007eb92cb 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -48,12 +48,6 @@ typedef enum sbc_modeeequal, sbc_modenotequal, sbc_hudmodeequal, - // Woof! - sbc_healthgreaterequal, - sbc_ammogreaterequal_percent, - sbc_armorgreaterequal, - sbc_boomtranslation, - sbc_max, } sbarconditiontype_t; @@ -126,6 +120,7 @@ struct sbarelem_s const char *tranmap; const char *translation; crange_idx_e cr; + crange_idx_e crboom; sbarcondition_t *conditions; sbarelem_t *children; diff --git a/src/st_stuff.c b/src/st_stuff.c index bc35d42d0..d8d74b455 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -502,31 +502,6 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) result &= (!!cond->param == false); break; - // Woof! additions - case sbc_healthgreaterequal: - result &= player->health >= cond->param; - break; - - case sbc_ammogreaterequal_percent: - { - ammotype_t type = weaponinfo[player->readyweapon].ammo; - if (type != am_noammo) - { - result &= - (player->ammo[type] * 100 / player->maxammo[type]) - >= cond->param; - } - } - break; - - case sbc_armorgreaterequal: - result &= player->armorpoints >= cond->param; - break; - - case sbc_boomtranslation: - result &= sts_colored_numbers == cond->param; - break; - case sbc_none: default: result = false; @@ -861,19 +836,113 @@ static void UpdateAnimation(sbarelem_t *elem) --elem->duration_left; } -static void UpdateElem(sbarelem_t *elem) +static void UpdateBoomColors(sbarelem_t *elem, player_t *player) +{ + if (!sts_colored_numbers) + { + elem->crboom = CR_NONE; + return; + } + + int invul = (player->powers[pw_invulnerability] > 4 * 32 + || player->powers[pw_invulnerability] & 8) + || player->cheats & CF_GODMODE; + + crange_idx_e cr; + + switch (elem->numtype) + { + case sbn_health: + { + int health = player->health; + if (invul) + cr = CR_GRAY; + else if (health < health_red) + cr = CR_RED; + else if (health < health_yellow) + cr = CR_GOLD; + else if (health <= health_green) + cr = CR_GREEN; + else + cr = CR_BLUE2; + } + break; + case sbn_armor: + if (hud_armor_type) + { + if (invul) + cr = CR_GRAY; + else if (!player->armortype) + cr = CR_RED; + else if (player->armortype == 1) + cr = CR_GREEN; + else + cr = CR_BLUE2; + } + else + { + int armor = player->armorpoints; + if (invul) + cr = CR_GRAY; + else if (armor < armor_red) + cr = CR_RED; + else if (armor < armor_yellow) + cr = CR_GOLD; + else if (armor <= armor_green) + cr = CR_GREEN; + else + cr = CR_BLUE2; + } + break; + case sbn_ammoselected: + { + ammotype_t type = weaponinfo[player->readyweapon].ammo; + if (type == am_noammo) + { + return; + } + + int maxammo = player->maxammo[type]; + int ammo = player->ammo[type]; + + // backpack changes thresholds + if (player->backpack && !hud_backpack_thresholds) + { + maxammo /= 2; + } + + if (ammo * 100 < ammo_red * maxammo) + cr = CR_RED; + else if (ammo * 100 < ammo_yellow * maxammo) + cr = CR_GOLD; + else if (ammo > maxammo) + cr = CR_BLUE2; + else + cr = CR_GREEN; + } + break; + default: + cr = CR_NONE; + break; + } + + elem->crboom = cr; +} + +static void UpdateElem(sbarelem_t *elem, player_t *player) { switch (elem->elemtype) { case sbe_face: - UpdateFace(elem); + UpdateFace(elem, player); break; case sbe_animation: UpdateAnimation(elem); break; case sbe_number: case sbe_percent: - UpdateNumber(elem); + UpdateBoomColors(elem, player); + UpdateNumber(elem, player); break; default: break; @@ -882,19 +951,21 @@ static void UpdateElem(sbarelem_t *elem) sbarelem_t *child; array_foreach(child, elem->children) { - UpdateElem(child); + UpdateElem(child, player); } } static void UpdateStatusBar(void) { + player_t *player = &players[displayplayer]; + statusbar_t *statusbar; array_foreach(statusbar, sbardef->statusbars) { sbarelem_t *child; array_foreach(child, statusbar->children) { - UpdateElem(child); + UpdateElem(child, player); } } } @@ -1006,7 +1077,8 @@ static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) elem->xoffset += (width + widthdiff); } - DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, elem->cr); + DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, + elem->crboom == CR_NONE ? elem->cr : elem->crboom); if (elem->alignment & sbe_h_middle) { @@ -1045,15 +1117,21 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) if (elem->elemtype == sbe_percent && font->percent != NULL) { + crange_idx_e oldcr = elem->crboom; + if (sts_pct_always_gray) + { + elem->crboom = CR_GRAY; + } DrawGlyph(x, y, elem, font->percent); + elem->crboom = oldcr; } elem->xoffset = base_xoffset; } -static void DrawElem(int x, int y, sbarelem_t *elem) +static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) { - if (!CheckConditions(elem->conditions, &players[displayplayer])) + if (!CheckConditions(elem->conditions, player)) { return; } From f2dbea1999178f2cfa30bc3c30eca98f388b9619 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 01:12:49 +0700 Subject: [PATCH 15/55] cosmetics --- src/st_stuff.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index d8d74b455..b323ae7d2 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -384,6 +384,7 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) { boolean result = true; int currsessiontype = netgame ? MIN(deathmatch + 1, 2) : 0; + // TODO // boolean compacthud = frame_width < frame_adjusted_width; sbarcondition_t *cond; @@ -572,9 +573,8 @@ static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) return result; } -static int CalcPainOffset(sbarelem_t *elem) +static int CalcPainOffset(sbarelem_t *elem, player_t *player) { - player_t *player = &players[displayplayer]; int health = player->health > 100 ? 100 : player->health; int lasthealthcalc = ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); @@ -582,9 +582,8 @@ static int CalcPainOffset(sbarelem_t *elem) return lasthealthcalc; } -static void UpdateFace(sbarelem_t *elem) +static void UpdateFace(sbarelem_t *elem, player_t *player) { - player_t *player = &players[displayplayer]; static int priority; static int lastattackdown = -1; @@ -620,7 +619,7 @@ static void UpdateFace(sbarelem_t *elem) // evil grin if just picked up weapon priority = 8; elem->facecount = ST_EVILGRINCOUNT; - elem->faceindex = CalcPainOffset(elem) + ST_EVILGRINOFFSET; + elem->faceindex = CalcPainOffset(elem, player) + ST_EVILGRINOFFSET; } } } @@ -639,7 +638,7 @@ static void UpdateFace(sbarelem_t *elem) if (player->health - elem->oldhealth > ST_MUCHPAIN) { elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem) + ST_OUCHOFFSET; + elem->faceindex = CalcPainOffset(elem, player) + ST_OUCHOFFSET; } else { @@ -661,7 +660,7 @@ static void UpdateFace(sbarelem_t *elem) } // confusing, aint it? elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem); + elem->faceindex = CalcPainOffset(elem, player); if (diffangle < ANG45) { @@ -691,13 +690,13 @@ static void UpdateFace(sbarelem_t *elem) { priority = 7; elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem) + ST_OUCHOFFSET; + elem->faceindex = CalcPainOffset(elem, player) + ST_OUCHOFFSET; } else { priority = 6; elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; + elem->faceindex = CalcPainOffset(elem, player) + ST_RAMPAGEOFFSET; } } } @@ -714,7 +713,7 @@ static void UpdateFace(sbarelem_t *elem) else if (!--lastattackdown) { priority = 5; - elem->faceindex = CalcPainOffset(elem) + ST_RAMPAGEOFFSET; + elem->faceindex = CalcPainOffset(elem, player) + ST_RAMPAGEOFFSET; elem->facecount = 1; lastattackdown = 1; } @@ -739,7 +738,7 @@ static void UpdateFace(sbarelem_t *elem) // look left or look right if the facecount has timed out if (!elem->facecount) { - elem->faceindex = CalcPainOffset(elem) + (M_Random() % 3); + elem->faceindex = CalcPainOffset(elem, player) + (M_Random() % 3); elem->facecount = ST_STRAIGHTFACECOUNT; priority = 0; } @@ -747,9 +746,8 @@ static void UpdateFace(sbarelem_t *elem) --elem->facecount; } -static void UpdateNumber(sbarelem_t *elem) +static void UpdateNumber(sbarelem_t *elem, player_t *player) { - player_t *player = &players[displayplayer]; int number = ResolveNumber(elem->numtype, elem->numparam, player); int power = (number < 0 ? elem->maxlength - 1 : elem->maxlength); int max = (int)pow(10.0, power) - 1; @@ -1171,7 +1169,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) sbarelem_t *child; array_foreach(child, elem->children) { - DrawElem(x, y, child); + DrawElem(x, y, child, player); } } @@ -1215,6 +1213,8 @@ static void DrawBackground(const char *name) static void DrawStatusBar(void) { + player_t *player = &players[displayplayer]; + static int old_barindex = -1; int barindex = MAX(screenblocks - 10, 0); @@ -1233,7 +1233,7 @@ static void DrawStatusBar(void) sbarelem_t *child; array_foreach(child, statusbar->children) { - DrawElem(0, SCREENHEIGHT - statusbar->height, child); + DrawElem(0, SCREENHEIGHT - statusbar->height, child, player); } } From 6caf7bd9b7dd4255f7fd06ee10b6b8c57a1136a9 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 11:16:17 +0700 Subject: [PATCH 16/55] smooth counts --- src/st_sbardef.h | 1 + src/st_stuff.c | 82 +++++++++++++++++++++++++++++------------------- 2 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 007eb92cb..f141fb2e9 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -142,6 +142,7 @@ struct sbarelem_s int number; int xoffset; int numnumbers; + int oldvalue; // face int faceindex; diff --git a/src/st_stuff.c b/src/st_stuff.c index b323ae7d2..117bf4d85 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -513,17 +513,54 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) return result; } -static int ResolveNumber(sbarnumbertype_t number, int param, player_t *player) +// [Alaux] +static int SmoothCount(int shownval, int realval) +{ + int step = realval - shownval; + + if (!hud_animated_counts || !step) + { + return realval; + } + else + { + int sign = step / abs(step); + step = BETWEEN(1, 7, abs(step) / 20); + shownval += (step + 1) * sign; + + if ((sign > 0 && shownval > realval) + || (sign < 0 && shownval < realval)) + { + shownval = realval; + } + + return shownval; + } +} + +static int ResolveNumber(sbarelem_t *elem, player_t *player) { int result = 0; - switch (number) + int param = elem->numparam; + + switch (elem->numtype) { case sbn_health: - result = player->health; + if (elem->oldvalue == -1) + { + elem->oldvalue = player->health; + } + result = SmoothCount(elem->oldvalue, player->health); + elem->oldvalue = result; break; case sbn_armor: - result = player->armorpoints; + if (elem->oldvalue == -1) + { + elem->oldvalue = player->armorpoints; + } + result = SmoothCount(elem->oldvalue, player->armorpoints); + elem->oldvalue = result; break; case sbn_frags: @@ -748,7 +785,7 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) static void UpdateNumber(sbarelem_t *elem, player_t *player) { - int number = ResolveNumber(elem->numtype, elem->numparam, player); + int number = ResolveNumber(elem, player); int power = (number < 0 ? elem->maxlength - 1 : elem->maxlength); int max = (int)pow(10.0, power) - 1; int numglyphs = 0; @@ -842,9 +879,8 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) return; } - int invul = (player->powers[pw_invulnerability] > 4 * 32 - || player->powers[pw_invulnerability] & 8) - || player->cheats & CF_GODMODE; + boolean invul = (player->powers[pw_invulnerability] + || player->cheats & CF_GODMODE); crange_idx_e cr; @@ -994,6 +1030,11 @@ static void RefreshElem(sbarelem_t *elem) } break; + case sbe_number: + case sbe_percent: + elem->oldvalue = -1; + break; + default: break; } @@ -1752,31 +1793,6 @@ void ST_updateWidgets(void) } -// [Alaux] -static int SmoothCount(int shownval, int realval) -{ - int step = realval - shownval; - - if (!hud_animated_counts || !step) - { - return realval; - } - else - { - int sign = step / abs(step); - step = BETWEEN(1, 7, abs(step) / 20); - shownval += (step+1)*sign; - - if ( (sign > 0 && shownval > realval) - ||(sign < 0 && shownval < realval)) - { - shownval = realval; - } - - return shownval; - } -} - boolean st_invul; static void ST_doPaletteStuff(void); From 0d20d64f8d8b79f300f63c4fabf4e4f021885efb Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 15:11:28 +0700 Subject: [PATCH 17/55] implement widescreen mode, fix automap, F5 switches to fullscreen HUD --- src/d_main.c | 12 ------------ src/mn_menu.c | 40 +++++++++------------------------------ src/mn_setup.c | 49 ++---------------------------------------------- src/p_user.c | 6 +----- src/st_sbardef.h | 7 +++++++ src/st_stuff.c | 27 ++++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 95 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index aeadc3ee0..24b17cada 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -255,7 +255,6 @@ void D_Display (void) static boolean viewactivestate = false; static boolean menuactivestate = false; static boolean inhelpscreensstate = false; - static boolean fullscreen = false; static gamestate_t oldgamestate = GS_NONE; static int borderdrawcount; int wipestart; @@ -323,24 +322,13 @@ void D_Display (void) break; if (automapactive) { - static overlay_t last_automapoverlay; if (!automapoverlay) { // [FG] update automap while playing R_RenderPlayerView(&players[displayplayer]); AM_Drawer(); - if (last_automapoverlay && scaledviewheight == 200) - { - redrawsbar = true; - } } - last_automapoverlay = automapoverlay; } - if (wipe || (scaledviewheight != 200 && fullscreen) // killough 11/98 - || (inhelpscreensstate && !inhelpscreens)) - redrawsbar = true; // just put away the help screen - ST_Drawer(scaledviewheight == 200, redrawsbar ); // killough 11/98 - fullscreen = scaledviewheight == 200; // killough 11/98 break; case GS_INTERMISSION: WI_Drawer(); diff --git a/src/mn_menu.c b/src/mn_menu.c index d02436b32..825c9b057 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -76,10 +76,6 @@ // int detailLevel; obsolete -- killough int screenblocks; // has default -int saved_screenblocks; - -static int screenSize; // temp for screenblocks (0-9) - static int quickSaveSlot; // -1 = no quicksave slot picked! static int messageToPrint; // 1 = message to be printed @@ -1568,28 +1564,16 @@ void MN_SizeDisplay(int choice) switch (choice) { case 0: - if (screenSize > 0) - { - screenblocks--; - screenSize--; - hud_displayed = 0; - } + screenblocks--; break; case 1: - if (screenSize < 8) - { - screenblocks++; - screenSize++; - } - else - { - hud_displayed = !hud_displayed; - HU_disable_all_widgets(); - } + screenblocks++; + break; + default: break; } + screenblocks = BETWEEN(3, 11, screenblocks); R_SetViewSize(screenblocks /*, detailLevel obsolete -- killough */); - saved_screenblocks = screenblocks; } ///////////////////////////////////////////////////////////////////////////// @@ -1980,8 +1964,6 @@ void M_Init(void) highlight_item = 0; whichSkull = 0; skullAnimCounter = 10; - saved_screenblocks = screenblocks; - screenSize = screenblocks - 3; messageToPrint = 0; messageString = NULL; messageLastMenuActive = menuactive; @@ -2283,19 +2265,15 @@ static boolean ShortcutResponder(const event_t *ev) return false; // HUD mode control } - if (screenSize < 8) // function on default F5 + if (screenblocks < 11) { - while (screenSize < 8 || !hud_displayed) // make hud visible - { - MN_SizeDisplay(1); // when configuring it - } + screenblocks = 11; } else { - hud_displayed = 1; // jff 3/3/98 turn hud on - hud_active = (hud_active + 1) % 3; // cycle hud_active - HU_disable_all_widgets(); + screenblocks = 10; } + MN_SizeDisplay(-1); return true; } diff --git a/src/mn_setup.c b/src/mn_setup.c index 27142de96..e83b2329f 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -309,8 +309,6 @@ enum str_curve, str_center_weapon, str_screensize, - str_hudtype, - str_hudmode, str_show_widgets, str_show_adv_widgets, str_crosshair, @@ -1614,25 +1612,7 @@ static setup_tab_t stat_tabs[] = { static void SizeDisplayAlt(void) { - int choice = -1; - - if (screenblocks > saved_screenblocks) - { - choice = 1; - } - else if (screenblocks < saved_screenblocks) - { - choice = 0; - } - - screenblocks = saved_screenblocks; - - if (choice != -1) - { - MN_SizeDisplay(choice); - } - - hud_displayed = (screenblocks == 11); + MN_SizeDisplay(-1); } static const char *screensize_strings[] = { @@ -1641,17 +1621,6 @@ static const char *screensize_strings[] = { "Status Bar", "Status Bar", "Status Bar", "Fullscreen" }; -static const char *hudtype_strings[] = {"Crispy", "Boom No Bars", "Boom"}; - -static const char **GetHUDModeStrings(void) -{ - static const char *crispy_strings[] = {"Off", "Original", "Widescreen"}; - static const char *boom_strings[] = {"Minimal", "Compact", "Distributed"}; - return hud_type ? boom_strings : crispy_strings; -} - -static void UpdateHUDModeStrings(void); - #define H_X_THRM8 (M_X_THRM8 - 14) #define H_X (M_X - 14) @@ -1672,13 +1641,7 @@ static setup_menu_t stat_settings1[] = { MI_GAP, - {"Fullscreen HUD", S_SKIP | S_TITLE, H_X, M_SPC}, - - {"HUD Type", S_CHOICE, H_X, M_SPC, {"hud_type"}, - .strings_id = str_hudtype, .action = UpdateHUDModeStrings}, - - {"HUD Mode", S_CHOICE, H_X, M_SPC, {"hud_active"}, - .strings_id = str_hudmode}, + {"Widescreen Mode", S_ONOFF, H_X, M_SPC, {"st_widescreen_mode"}}, MI_GAP, @@ -4381,8 +4344,6 @@ static const char **selectstrings[] = { curve_strings, center_weapon_strings, screensize_strings, - hudtype_strings, - NULL, // str_hudmode show_widgets_strings, show_adv_widgets_strings, crosshair_strings, @@ -4422,11 +4383,6 @@ static const char **GetStrings(int id) return NULL; } -static void UpdateHUDModeStrings(void) -{ - selectstrings[str_hudmode] = GetHUDModeStrings(); -} - static const char **GetMidiPlayerStrings(void) { return I_DeviceList(); @@ -4434,7 +4390,6 @@ static const char **GetMidiPlayerStrings(void) void MN_InitMenuStrings(void) { - UpdateHUDModeStrings(); selectstrings[str_resolution_scale] = GetResolutionScaleStrings(); selectstrings[str_midi_player] = GetMidiPlayerStrings(); selectstrings[str_mouse_accel] = GetMouseAccelStrings(); diff --git a/src/p_user.c b/src/p_user.c index 3ebfb1c6e..f7abf3882 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -608,11 +608,7 @@ boolean P_EvaluateItemOwned(itemtype_t item, player_t *player) return player->cards[item - item_bluecard] != 0; case item_backpack: - return 0; // TODO - // return player->maxammo[player->readyweapon] - // == weaponinfo[player->readyweapon] - // .AmmoInfo() - // .maxupgradedammo; + return player->backpack; case item_greenarmor: case item_bluearmor: diff --git a/src/st_sbardef.h b/src/st_sbardef.h index f141fb2e9..19c043b22 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -26,6 +26,13 @@ typedef enum sbf_proportional, } numfonttype_t; +typedef enum +{ + sbm_none, + sbm_compact, + sbm_wide, +} sbarmode_t; + typedef enum { sbc_none = -1, diff --git a/src/st_stuff.c b/src/st_stuff.c index 117bf4d85..65c72f42e 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -324,6 +324,10 @@ static int st_randomnumber; static sbardef_t *sbardef; +static boolean st_widescreen_mode; + +static sbarmode_t sbarmode; + static patch_t **facepatches = NULL; // @@ -1088,6 +1092,18 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, y -= height; } + if (sbarmode == sbm_wide && !(alignment & sbe_h_middle)) + { + if (x < SCREENWIDTH / 2) + { + x -= video.deltaw; + } + else + { + x += video.deltaw; + } + } + V_DrawPatchTranslated(x, y, patch, colrngs[cr]); } @@ -1259,6 +1275,12 @@ static void DrawStatusBar(void) static int old_barindex = -1; int barindex = MAX(screenblocks - 10, 0); + + if (automapactive && automapoverlay == AM_OVERLAY_OFF) + { + barindex = 0; + } + statusbar_t *statusbar = &sbardef->statusbars[barindex]; if (!statusbar->fullscreenrender) @@ -1271,6 +1293,9 @@ static void DrawStatusBar(void) DrawBackground(statusbar->fillflat); } + sbarmode = + statusbar->fullscreenrender && st_widescreen_mode ? sbm_wide : sbm_none; + sbarelem_t *child; array_foreach(child, statusbar->children) { @@ -2426,6 +2451,8 @@ void ST_ResetPalette(void) void ST_BindSTSVariables(void) { + M_BindBool("st_widescreen_mode", &st_widescreen_mode, NULL, + false, ss_stat, wad_no, "Widescreen HUD"); M_BindBool("sts_colored_numbers", &sts_colored_numbers, NULL, false, ss_stat, wad_yes, "Colored numbers on the status bar"); M_BindBool("sts_pct_always_gray", &sts_pct_always_gray, NULL, From 69fd439fb5164cdc7fa702f40ab4cda5f5ea936c Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 16:40:50 +0700 Subject: [PATCH 18/55] initial cleanup --- src/CMakeLists.txt | 1 - src/d_main.c | 20 +- src/g_game.c | 8 - src/hu_crosshair.c | 4 +- src/hu_lib.c | 1 - src/hu_stuff.c | 19 +- src/hu_stuff.h | 1 - src/mn_menu.c | 27 - src/mn_menu.h | 2 - src/mn_setup.c | 18 - src/st_lib.c | 295 ----------- src/st_lib.h | 179 ------- src/st_stuff.c | 1263 ++++---------------------------------------- src/st_stuff.h | 9 +- src/wi_stuff.c | 3 +- 15 files changed, 136 insertions(+), 1714 deletions(-) delete mode 100644 src/st_lib.c delete mode 100644 src/st_lib.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0cc9484c1..135b858a0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -129,7 +129,6 @@ set(WOOF_SOURCES s_musinfo.c s_musinfo.h s_sound.c s_sound.h sounds.c sounds.h - st_lib.c st_lib.h st_sbardef.c st_sbardef.h st_stuff.c st_stuff.h statdump.c statdump.h diff --git a/src/d_main.c b/src/d_main.c index 24b17cada..bf489ff31 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -254,11 +254,10 @@ void D_Display (void) { static boolean viewactivestate = false; static boolean menuactivestate = false; - static boolean inhelpscreensstate = false; static gamestate_t oldgamestate = GS_NONE; static int borderdrawcount; int wipestart; - boolean done, wipe, redrawsbar; + boolean done, wipe; if (demobar && PLAYBACK_SKIP) { @@ -283,8 +282,6 @@ void D_Display (void) } } - redrawsbar = false; - wipe = false; // save the current screen if about to wipe @@ -345,10 +342,10 @@ void D_Display (void) // draw the view directly if (gamestate == GS_LEVEL && automap_off && gametic) - R_RenderPlayerView (&players[displayplayer]); - - if (gamestate == GS_LEVEL && gametic) - ST_Drawer(true, true); + { + R_RenderPlayerView(&players[displayplayer]); + ST_Drawer(); + } if (gamestate == GS_LEVEL && gametic) HU_Drawer (); @@ -379,18 +376,16 @@ void D_Display (void) menuactivestate = menuactive; viewactivestate = viewactive; - inhelpscreensstate = inhelpscreens; oldgamestate = wipegamestate = gamestate; if (gamestate == GS_LEVEL && automapactive && automapoverlay) { AM_Drawer(); - ST_Drawer(scaledviewheight == 200, redrawsbar); + ST_Drawer(); HU_Drawer(); - // [crispy] force redraw of status bar and border + // [crispy] force redraw of border viewactivestate = false; - inhelpscreensstate = true; } // draw pause pic @@ -2447,7 +2442,6 @@ void D_DoomMain(void) I_Printf(VB_INFO, "ST_Init: Init status bar."); ST_Init(); - ST_Warnings(); // andrewj: voxel support I_Printf(VB_INFO, "VX_Init: "); diff --git a/src/g_game.c b/src/g_game.c index 19fe81763..bdcb9e131 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -956,9 +956,6 @@ static void G_DoLoadLevel(void) { displayplayer = consoleplayer; // view the guy you are playing } - // [Alaux] Update smooth count values - st_health = players[displayplayer].health; - st_armor = players[displayplayer].armorpoints; gameaction = ga_nothing; // Set the initial listener parameters using the player's initial state. @@ -2585,11 +2582,6 @@ static void G_DoLoadGame(void) // done Z_Free(savebuffer); - // [Alaux] Update smooth count values; - // the same procedure is done in G_LoadLevel, but we have to repeat it here - st_health = players[displayplayer].health; - st_armor = players[displayplayer].armorpoints; - if (setsizeneeded) R_ExecuteSetViewSize(); diff --git a/src/hu_crosshair.c b/src/hu_crosshair.c index 71005c1e6..50e8804be 100644 --- a/src/hu_crosshair.c +++ b/src/hu_crosshair.c @@ -109,9 +109,11 @@ void HU_UpdateCrosshair(void) crosshair.y = (screenblocks <= 10) ? (SCREENHEIGHT - ST_HEIGHT) / 2 : SCREENHEIGHT / 2; + boolean invul = (plr->cheats & CF_GODMODE) || plr->powers[pw_invulnerability]; + if (hud_crosshair_health) { - crosshair.cr = HU_ColorByHealth(plr->health, 100, st_invul); + crosshair.cr = HU_ColorByHealth(plr->health, 100, invul); } else { diff --git a/src/hu_lib.c b/src/hu_lib.c index f0c15ccc7..818786ac3 100644 --- a/src/hu_lib.c +++ b/src/hu_lib.c @@ -69,7 +69,6 @@ void HUlib_reset_align_offsets (void) int bottom = SCREENHEIGHT; if (scaledviewheight < SCREENHEIGHT || - draw_crispy_hud || automap_on) { bottom -= 32; // ST_HEIGHT diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 1fe3acdef..8e5004f22 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -60,7 +60,6 @@ static int hud_widget_font; static boolean hud_widget_layout; int hud_type; // Crispy HUD or Boom variants -boolean draw_crispy_hud; // // Locally used constants, shortcuts. @@ -808,6 +807,7 @@ static void HU_widget_build_ammo (void) // do the hud health display static void HU_widget_build_health (void) { +/* InitStringBuffer("HEL "); int i = 4; @@ -851,11 +851,13 @@ static void HU_widget_build_health (void) // transfer the init string to the widget HUlib_add_string_to_cur_line(&w_health, hud_stringbuffer); +*/ } // do the hud armor display static crange_idx_e CRByArmor(void) { +/* // color of armor depends on type if (hud_armor_type) { @@ -877,10 +879,12 @@ static crange_idx_e CRByArmor(void) (armor <= armor_green) ? CR_GREEN : CR_BLUE; } +*/ } static void HU_widget_build_armor (void) { +/* InitStringBuffer("ARM "); int i = 4; @@ -923,10 +927,12 @@ static void HU_widget_build_armor (void) // transfer the init string to the widget HUlib_add_string_to_cur_line(&w_armor, hud_stringbuffer); +*/ } static void HU_widget_build_compact (void) { +/* const crange_idx_e cr_health = CRByHealth(plr->health, 100, st_invul); const crange_idx_e cr_armor = CRByArmor(); @@ -983,6 +989,7 @@ static void HU_widget_build_compact (void) } HUlib_add_string_to_cur_line(&w_compact, hud_stringbuffer); } +*/ } // do the hud weapon display @@ -1441,11 +1448,6 @@ void HU_Drawer(void) } w++; } - - if (draw_crispy_hud) - { - ST_Drawer (false, true); - } } // [FG] draw Time widget on intermission screen @@ -1523,7 +1525,6 @@ void HU_Ticker(void) plr = &players[displayplayer]; // killough 3/7/98 HU_disable_all_widgets(); - draw_crispy_hud = false; if ((automapactive && hud_widget_font == 1) || (!automapactive && hud_widget_font == 2) || @@ -1674,10 +1675,6 @@ void HU_Ticker(void) { if (hud_type == HUD_TYPE_CRISPY) { - if (hud_active > 0) - { - draw_crispy_hud = true; - } } else { diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 4993285ff..6588ad95c 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -86,7 +86,6 @@ enum }; extern int hud_type; -extern boolean draw_crispy_hud; enum { diff --git a/src/mn_menu.c b/src/mn_menu.c index 825c9b057..abe1d5670 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -98,8 +98,6 @@ static int saveCharIndex; // which char we're editing // old save description before edit static char saveOldString[SAVESTRINGSIZE]; -boolean inhelpscreens; // indicates we are in or just left a help screen - boolean menuactive; // The menus are up static boolean options_active; @@ -310,9 +308,6 @@ static menu_t MainDef = { static void M_DrawMainMenu(void) { - // [crispy] force status bar refresh - inhelpscreens = true; - options_active = false; V_DrawPatch(94, 2, V_CachePatchName("M_DOOM", PU_CACHE)); @@ -418,8 +413,6 @@ static void M_FinishHelp(int choice) // killough 10/98 static void M_DrawReadThis1(void) { - inhelpscreens = true; - V_DrawPatchFullScreen(V_CachePatchName("HELP2", PU_CACHE)); } @@ -430,8 +423,6 @@ static void M_DrawReadThis1(void) static void M_DrawReadThis2(void) { - inhelpscreens = true; - // We only ever draw the second page if this is // gameversion == exe_doom_1_9 and gamemode == registered @@ -440,8 +431,6 @@ static void M_DrawReadThis2(void) static void M_DrawReadThisCommercial(void) { - inhelpscreens = true; - V_DrawPatchFullScreen(V_CachePatchName("HELP", PU_CACHE)); } @@ -559,9 +548,6 @@ void M_AddEpisode(const char *map, const char *gfx, const char *txt, static void M_DrawEpisode(void) { - // [crispy] force status bar refresh - inhelpscreens = true; - MN_DrawTitle(54, EpiDef.y - 25, "M_EPISOD", "Which Episode?"); } @@ -633,9 +619,6 @@ static menu_t NewDef = { static void M_DrawNewGame(void) { - // [crispy] force status bar refresh - inhelpscreens = true; - MN_DrawTitle(96, 14, "M_NEWG", "NEW GAME"); MN_DrawTitle(54, 38, "M_SKILL", "Choose Skill Level:"); } @@ -827,9 +810,6 @@ static void M_DrawSaveLoadBottomLine(void) char pagestr[16]; const int y = LoadDef.y + LINEHEIGHT * load_page; - // [crispy] force status bar refresh - inhelpscreens = true; - int index = (menu_input == mouse_mode ? highlight_item : itemOn); int flags = currentMenu->menuitems[index].flags; @@ -1672,8 +1652,6 @@ static void M_ExtHelp(int choice) static void M_DrawExtHelp(void) { char namebfr[] = "HELPnn"; // [FG] char array! - - inhelpscreens = true; // killough 5/1/98 namebfr[4] = extended_help_index / 10 + 0x30; namebfr[5] = extended_help_index % 10 + 0x30; V_DrawPatchFullScreen(V_CachePatchName(namebfr, PU_CACHE)); @@ -1697,7 +1675,6 @@ static void M_DrawHelp(void) helplump = W_CheckNumForName("HELP1"); } - inhelpscreens = true; // killough 10/98 V_DrawPatchFullScreen(V_CachePatchNum(helplump, PU_CACHE)); } @@ -1905,9 +1882,6 @@ static void M_Setup(int choice) void MN_ClearMenus(void) { - // force status bar refresh - inhelpscreens = true; - menuactive = 0; options_active = false; print_warning_about_changes = 0; // killough 8/15/98 @@ -3121,7 +3095,6 @@ void M_Drawer(void) if (MN_MenuIsShaded()) { - inhelpscreens = true; V_ShadeScreen(); } diff --git a/src/mn_menu.h b/src/mn_menu.h index f4ccb5760..1e7e305e7 100644 --- a/src/mn_menu.h +++ b/src/mn_menu.h @@ -91,8 +91,6 @@ void MN_InitMenuStrings(void); boolean MN_StartsWithMapIdentifier(char *str); -extern boolean inhelpscreens; - int MN_GetPixelWidth(const char *ch); void MN_DrawString(int cx, int cy, int color, const char *ch); diff --git a/src/mn_setup.c b/src/mn_setup.c index e83b2329f..2004a5e1f 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -1477,8 +1477,6 @@ void MN_KeyBindings(int choice) void MN_DrawKeybnd(void) { - inhelpscreens = true; // killough 4/6/98: Force status bar redraw - // Set up the Key Binding screen DrawBackground("FLOOR4_6"); // Draw background @@ -1581,8 +1579,6 @@ void MN_Weapons(int choice) void MN_DrawWeapons(void) { - inhelpscreens = true; // killough 4/6/98: Force status bar redraw - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_WEAP", "Weapons"); DrawTabs(); @@ -1774,8 +1770,6 @@ void MN_StatusBar(int choice) void MN_DrawStatusHUD(void) { - inhelpscreens = true; // killough 4/6/98: Force status bar redraw - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_STAT", "Status Bar/HUD"); DrawTabs(); @@ -1865,8 +1859,6 @@ void MN_Automap(int choice) void MN_DrawAutoMap(void) { - inhelpscreens = true; // killough 4/6/98: Force status bar redraw - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_AUTO", "Automap"); DrawInstructions(); @@ -1945,8 +1937,6 @@ void MN_Enemy(int choice) void MN_DrawEnemy(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_ENEM", "Enemies"); DrawInstructions(); @@ -2039,8 +2029,6 @@ void MN_Compat(int choice) void MN_DrawCompat(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_COMPAT", "Compatibility"); DrawInstructions(); @@ -2419,8 +2407,6 @@ static void MN_Equalizer(void) void MN_DrawEqualizer(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_GENERL", "General"); DrawTabs(); @@ -2755,8 +2741,6 @@ static void MN_Gyro(void) void MN_DrawGyro(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_GENERL", "General"); DrawTabs(); @@ -2953,8 +2937,6 @@ void MN_General(int choice) void MN_DrawGeneral(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); // Draw background MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_GENERL", "General"); DrawTabs(); diff --git a/src/st_lib.c b/src/st_lib.c deleted file mode 100644 index f76f73854..000000000 --- a/src/st_lib.c +++ /dev/null @@ -1,295 +0,0 @@ -// -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// -// DESCRIPTION: -// The status bar widget code. -// -//----------------------------------------------------------------------------- - -#include "st_lib.h" - -#include "m_swap.h" -#include "r_defs.h" -#include "v_video.h" -#include "v_fmt.h" -#include "w_wad.h" -#include "z_zone.h" - -boolean sts_colored_numbers; //jff 2/18/98 control to disable status color changes -boolean sts_pct_always_gray; // killough 2/21/98: always gray %'s? bug or feature? - -patch_t* sttminus; - -// -// STlib_init() -// -// Hack display negative frags. Loads and store the stminus lump. -// -// Passed nothing, returns nothing -// -void STlib_init(void) -{ - // [FG] allow playing with the Doom v1.2 IWAD which is missing the STTMINUS lump - if (W_CheckNumForName("STTMINUS") >= 0) - sttminus = V_CachePatchName("STTMINUS", PU_STATIC); - else - sttminus = NULL; -} - -// -// STlib_initNum() -// -// Initializes an st_number_t widget -// -// Passed the widget, its position, the patches for the digits, a pointer -// to the value displayed, a pointer to the on/off control, and the width -// Returns nothing -// -void STlib_initNum -( st_number_t* n, - int x, - int y, - patch_t** pl, - int* num, - boolean* on, - int width ) -{ - n->x = x; - n->y = y; - n->oldnum = 0; - n->width = width; - n->num = num; - n->on = on; - n->p = pl; -} - -// -// STlib_drawNum() -// -// A fairly efficient way to draw a number based on differences from the -// old number. -// -// Passed a st_number_t widget and a color range for output. -// Returns nothing -// -static void STlib_drawNum -( st_number_t* n, - byte *outrng ) //jff 2/16/98 add color translation to digit output -{ - int numdigits = n->width; - int num = *n->num; - - int w = SHORT(n->p[0]->width); - int x = n->x; - - int neg; - - n->oldnum = *n->num; - - neg = num < 0; - - if (neg) - { - if (numdigits == 2 && num < -9) - num = -9; - else if (numdigits == 3 && num < -99) - num = -99; - - num = -num; - } - - // if non-number, do not draw it - if (num == LARGENUMBER) - return; - - //jff 2/16/98 add color translation to digit output - // in the special case of 0, you draw 0 - if (!num) - { - if (outrng && sts_colored_numbers) - V_DrawPatchTranslated(x - w, n->y, n->p[ 0 ],outrng); - else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x - w, n->y, n->p[ 0 ]); - } - - // draw the new number - //jff 2/16/98 add color translation to digit output - while (num && numdigits--) - { - x -= w; - if (outrng && sts_colored_numbers) - V_DrawPatchTranslated(x, n->y, n->p[ num % 10 ],outrng); - else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x, n->y, n->p[ num % 10 ]); - num /= 10; - } - - // draw a minus sign if necessary - //jff 2/16/98 add color translation to digit output - if (neg && sttminus) - { - w = SHORT(sttminus->width); - if (outrng && sts_colored_numbers) - V_DrawPatchTranslated(x - w, n->y, sttminus,outrng); - else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x - w, n->y, sttminus); - } -} - -// -// STlib_updateNum() -// -// Draws a number conditionally based on the widget's enable -// -// Passed a number widget and the output color range -// Returns nothing -// -void STlib_updateNum -( st_number_t* n, - byte *outrng ) //jff 2/16/98 add color translation to digit output -{ - if (*n->on) STlib_drawNum(n, outrng); -} - -// -// STlib_initPercent() -// -// Initialize a st_percent_t number with percent sign widget -// -// Passed a st_percent_t widget, the position, the digit patches, a pointer -// to the number to display, a pointer to the enable flag, and patch -// for the percent sign. -// Returns nothing. -// -void STlib_initPercent -( st_percent_t* p, - int x, - int y, - patch_t** pl, - int* num, - boolean* on, - patch_t* percent ) -{ - STlib_initNum(&p->n, x, y, pl, num, on, 3); - p->p = percent; -} - -// -// STlib_updatePercent() -// -// Draws a number/percent conditionally based on the widget's enable -// -// Passed a precent widget and the output color range -// Returns nothing -// -void STlib_updatePercent -( st_percent_t* per, - byte *outrng ) //jff 2/16/98 add color translation to digit output -{ - // Remove the check for 'refresh' because this causes percent symbols to always appear - // in automap overlay mode. - if (*per->n.on) // killough 2/21/98: fix percents not updated; - { - V_DrawPatchTranslated - ( - per->n.x, - per->n.y, - per->p, - // [FG] fix always gray percent / always red mismatch - sts_pct_always_gray ? cr_gray : - !sts_colored_numbers ? NULL : - outrng - ); - } - - STlib_updateNum(&per->n, outrng); -} - -// -// STlib_initMultIcon() -// -// Initialize a st_multicon_t widget, used for a multigraphic display -// like the status bar's keys. -// -// Passed a st_multicon_t widget, the position, the graphic patches, a pointer -// to the numbers representing what to display, and pointer to the enable flag -// Returns nothing. -// -void STlib_initMultIcon -( st_multicon_t* i, - int x, - int y, - patch_t** il, - int* inum, - boolean* on ) -{ - i->x = x; - i->y = y; - i->oldinum = -1; - i->inum = inum; - i->on = on; - i->p = il; -} - -// -// STlib_updateMultIcon() -// -// Draw a st_multicon_t widget, used for a multigraphic display -// like the status bar's keys. Displays each when the control -// numbers change -// -// Passed a st_multicon_t widget -// Returns nothing. -// -void STlib_updateMultIcon -( st_multicon_t* mi ) -{ - if (*mi->on) - { - if (*mi->inum != -1) // killough 2/16/98: redraw only if != -1 - V_DrawPatch(mi->x, mi->y, mi->p[*mi->inum]); - } -} - -//---------------------------------------------------------------------------- -// -// $Log: st_lib.c,v $ -// Revision 1.8 1998/05/11 10:44:42 jim -// formatted/documented st_lib -// -// Revision 1.7 1998/05/03 22:58:17 killough -// Fix header #includes at top, nothing else -// -// Revision 1.6 1998/02/23 04:56:34 killough -// Fix percent sign problems -// -// Revision 1.5 1998/02/19 16:55:09 jim -// Optimized HUD and made more configurable -// -// Revision 1.4 1998/02/18 00:59:13 jim -// Addition of HUD -// -// Revision 1.3 1998/02/17 06:17:03 killough -// Add support for erasing keys in status bar -// -// Revision 1.2 1998/01/26 19:24:56 phares -// First rev with no ^Ms -// -// Revision 1.1.1.1 1998/01/19 14:03:03 rand -// Lee's Jan 19 sources -// -// -//---------------------------------------------------------------------------- - diff --git a/src/st_lib.h b/src/st_lib.h deleted file mode 100644 index dedf01c91..000000000 --- a/src/st_lib.h +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: -// The status bar widget definitions and prototypes -// -//----------------------------------------------------------------------------- - -#ifndef __STLIB__ -#define __STLIB__ - -#include "doomtype.h" - -#define LARGENUMBER 1994 - -// We are referring to patches. -struct patch_s; - -extern boolean sts_colored_numbers;// status numbers do not change colors -extern boolean sts_pct_always_gray;// status percents do not change colors - -// -// Typedefs of widgets -// - -// Number widget - -typedef struct -{ - // upper right-hand corner - // of the number (right-justified) - int x; - int y; - - // max # of digits in number - int width; - - // last number value - int oldnum; - - // pointer to current value - int* num; - - // pointer to boolean stating - // whether to update number - boolean* on; - - // list of patches for 0-9 - struct patch_s** p; - - // user data - int data; -} st_number_t; - -// Percent widget ("child" of number widget, -// or, more precisely, contains a number widget.) -typedef struct -{ - // number information - st_number_t n; - - // percent sign graphic - struct patch_s* p; -} st_percent_t; - -// Multiple Icon widget -typedef struct -{ - // center-justified location of icons - int x; - int y; - - // last icon number - int oldinum; - - // pointer to current icon - int* inum; - - // pointer to boolean stating - // whether to update icon - boolean* on; - - // list of icons - struct patch_s** p; - - // user data - int data; - -} st_multicon_t; - -// -// Widget creation, access, and update routines -// - -// Initializes widget library. -// More precisely, initialize STMINUS, -// everything else is done somewhere else. -// -void STlib_init(void); - -// Number widget routines -void STlib_initNum -( st_number_t* n, - int x, - int y, - struct patch_s** pl, - int* num, - boolean* on, - int width ); - -void STlib_updateNum -( st_number_t* n, - byte *outrng ); //jff 1/16/98 add color translation to digit output - - -// Percent widget routines -void STlib_initPercent -( st_percent_t* p, - int x, - int y, - struct patch_s** pl, - int* num, - boolean* on, - struct patch_s* percent ); - - -void STlib_updatePercent -( st_percent_t* per, - byte *outrng ); //jff 1/16/98 add color translation to percent output - - -// Multiple Icon widget routines -void STlib_initMultIcon -( st_multicon_t* mi, - int x, - int y, - struct patch_s** il, - int* inum, - boolean* on ); - - -void STlib_updateMultIcon -( st_multicon_t* mi ); - -#endif - - -//---------------------------------------------------------------------------- -// -// $Log: st_lib.h,v $ -// Revision 1.5 1998/05/11 10:44:46 jim -// formatted/documented st_lib -// -// Revision 1.4 1998/02/19 16:55:12 jim -// Optimized HUD and made more configurable -// -// Revision 1.3 1998/02/18 00:59:16 jim -// Addition of HUD -// -// Revision 1.2 1998/01/26 19:27:55 phares -// First rev with no ^Ms -// -// Revision 1.1.1.1 1998/01/19 14:03:03 rand -// Lee's Jan 19 sources -// -// -//---------------------------------------------------------------------------- - diff --git a/src/st_stuff.c b/src/st_stuff.c index 65c72f42e..9d339576e 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -30,7 +30,6 @@ #include "doomstat.h" #include "doomtype.h" #include "hu_stuff.h" // [FG] hud_displayed -#include "i_printf.h" #include "i_video.h" #include "info.h" #include "m_array.h" @@ -39,7 +38,6 @@ #include "m_misc.h" #include "m_random.h" #include "m_swap.h" -#include "mn_menu.h" #include "p_mobj.h" #include "p_user.h" #include "r_data.h" @@ -47,8 +45,6 @@ #include "r_main.h" #include "r_state.h" #include "s_sound.h" -#include "sounds.h" -#include "st_lib.h" #include "st_stuff.h" #include "st_sbardef.h" #include "tables.h" @@ -70,13 +66,6 @@ // Radiation suit, green shift. #define RADIATIONPAL 13 -// Location of status bar -#define ST_X 0 -#define ST_X2 104 - -#define ST_FX 143 -#define ST_FY 169 - // Number of status faces. #define ST_NUMPAINFACES 5 #define ST_NUMSTRAIGHTFACES 3 @@ -90,177 +79,33 @@ #define ST_NUMXDTHFACES 9 #define ST_NUMFACES \ - (ST_FACESTRIDE*ST_NUMPAINFACES+ST_NUMEXTRAFACES+ST_NUMXDTHFACES) - -#define ST_TURNOFFSET (ST_NUMSTRAIGHTFACES) -#define ST_OUCHOFFSET (ST_TURNOFFSET + ST_NUMTURNFACES) -#define ST_EVILGRINOFFSET (ST_OUCHOFFSET + 1) -#define ST_RAMPAGEOFFSET (ST_EVILGRINOFFSET + 1) -#define ST_GODFACE (ST_NUMPAINFACES*ST_FACESTRIDE) -#define ST_DEADFACE (ST_GODFACE+1) -#define ST_XDTHFACE (ST_DEADFACE+1) - -#define ST_FACESX 143 -#define ST_FACESY 168 - -#define ST_EVILGRINCOUNT (2*TICRATE) -#define ST_STRAIGHTFACECOUNT (TICRATE/2) -#define ST_TURNCOUNT (1*TICRATE) -#define ST_OUCHCOUNT (1*TICRATE) -#define ST_RAMPAGEDELAY (2*TICRATE) - -#define ST_MUCHPAIN 20 - -// Location and size of statistics, -// justified according to widget type. -// Problem is, within which space? STbar? Screen? -// Note: this could be read in by a lump. -// Problem is, is the stuff rendered -// into a buffer, -// or into the frame buffer? -// I dunno, why don't you go and find out!!! killough - -// AMMO number pos. -#define ST_AMMOWIDTH 3 -#define ST_AMMOX 44 -#define ST_AMMOY 171 - -// HEALTH number pos. -#define ST_HEALTHWIDTH 3 -#define ST_HEALTHX 90 -#define ST_HEALTHY 171 - -// Weapon pos. -#define ST_ARMSX 111 -#define ST_ARMSY 172 -#define ST_ARMSBGX 104 -#define ST_ARMSBGY 168 -#define ST_ARMSXSPACE 12 -#define ST_ARMSYSPACE 10 - -// Frags pos. -#define ST_FRAGSX 138 -#define ST_FRAGSY 171 -#define ST_FRAGSWIDTH 2 - -// ARMOR number pos. -#define ST_ARMORWIDTH 3 -#define ST_ARMORX 221 -#define ST_ARMORY 171 - -// Key icon positions. -#define ST_KEY0WIDTH 8 -#define ST_KEY0HEIGHT 5 -#define ST_KEY0X 239 -#define ST_KEY0Y 171 -#define ST_KEY1WIDTH ST_KEY0WIDTH -#define ST_KEY1X 239 -#define ST_KEY1Y 181 -#define ST_KEY2WIDTH ST_KEY0WIDTH -#define ST_KEY2X 239 -#define ST_KEY2Y 191 - -// Ammunition counter. -#define ST_AMMO0WIDTH 3 -#define ST_AMMO0HEIGHT 6 -#define ST_AMMO0X 288 -#define ST_AMMO0Y 173 -#define ST_AMMO1WIDTH ST_AMMO0WIDTH -#define ST_AMMO1X 288 -#define ST_AMMO1Y 179 -#define ST_AMMO2WIDTH ST_AMMO0WIDTH -#define ST_AMMO2X 288 -#define ST_AMMO2Y 191 -#define ST_AMMO3WIDTH ST_AMMO0WIDTH -#define ST_AMMO3X 288 -#define ST_AMMO3Y 185 - -// Indicate maximum ammunition. -// Only needed because backpack exists. -#define ST_MAXAMMO0WIDTH 3 -#define ST_MAXAMMO0HEIGHT 5 -#define ST_MAXAMMO0X 314 -#define ST_MAXAMMO0Y 173 -#define ST_MAXAMMO1WIDTH ST_MAXAMMO0WIDTH -#define ST_MAXAMMO1X 314 -#define ST_MAXAMMO1Y 179 -#define ST_MAXAMMO2WIDTH ST_MAXAMMO0WIDTH -#define ST_MAXAMMO2X 314 -#define ST_MAXAMMO2Y 191 -#define ST_MAXAMMO3WIDTH ST_MAXAMMO0WIDTH -#define ST_MAXAMMO3X 314 -#define ST_MAXAMMO3Y 185 - -// killough 2/8/98: weapon info position macros UNUSED, removed here - -// graphics are drawn to a backing screen and blitted to the real screen -static pixel_t *st_backing_screen = NULL; - -// main player in game -static player_t *plyr; - -// ST_Start() has just been called -static boolean st_firsttime; - -// lump number for PLAYPAL -static int lu_palette; - -// whether left-side main status bar is active -static boolean st_statusbaron; - -// [crispy] distinguish classic status bar with background and player face -// from Crispy HUD -static boolean st_crispyhud; -static boolean st_classicstatusbar; - -// !deathmatch -static boolean st_notdeathmatch; - -// !deathmatch && st_statusbaron -static boolean st_armson; + (ST_FACESTRIDE * ST_NUMPAINFACES + ST_NUMEXTRAFACES + ST_NUMXDTHFACES) -// !deathmatch -static boolean st_fragson; +#define ST_TURNOFFSET (ST_NUMSTRAIGHTFACES) +#define ST_OUCHOFFSET (ST_TURNOFFSET + ST_NUMTURNFACES) +#define ST_EVILGRINOFFSET (ST_OUCHOFFSET + 1) +#define ST_RAMPAGEOFFSET (ST_EVILGRINOFFSET + 1) +#define ST_GODFACE (ST_NUMPAINFACES * ST_FACESTRIDE) +#define ST_DEADFACE (ST_GODFACE + 1) +#define ST_XDTHFACE (ST_DEADFACE + 1) -// main bar left -static patch_t *sbar; +#define ST_EVILGRINCOUNT (2 * TICRATE) +#define ST_STRAIGHTFACECOUNT (TICRATE / 2) +#define ST_TURNCOUNT (1 * TICRATE) +#define ST_OUCHCOUNT (1 * TICRATE) +#define ST_RAMPAGEDELAY (2 * TICRATE) -// main bar right, for doom 1.0 -static patch_t *sbarr; +#define ST_MUCHPAIN 20 -// 0-9, tall numbers -static patch_t *tallnum[10]; - -// tall % sign -static patch_t *tallpercent; - -// 0-9, short, yellow (,different!) numbers -static patch_t *shortnum[10]; - -// 3 key-cards, 3 skulls, 3 card/skull combos -// jff 2/24/98 extend number of patches by three skull/card combos -static patch_t *keys[NUMCARDS+3]; - -// face status patches -static patch_t *faces[ST_NUMFACES]; -static int have_xdthfaces; - -// face background -static patch_t *faceback[MAXPLAYERS]; // killough 3/7/98: make array - - // main bar right -static patch_t *armsbg; - -// weapon ownership patches -static patch_t *arms[6][2]; - -// ready-weapon widget -static st_number_t w_ready; +// graphics are drawn to a backing screen and blitted to the real screen +static pixel_t *st_backing_screen = NULL; // [Alaux] static boolean hud_animated_counts; -int st_health = 100; -int st_armor = 0; + +static boolean sts_colored_numbers; + +static boolean sts_pct_always_gray; //jff 2/16/98 status color change levels int ammo_red; // ammo percent less than which status is red @@ -275,52 +120,11 @@ int armor_green; // armor amount above is blue, below is green boolean hud_backpack_thresholds; // backpack changes thresholds boolean hud_armor_type; // color of armor depends on type - // in deathmatch only, summary of frags stats -static st_number_t w_frags; - -// health widget -static st_percent_t w_health; - -// weapon ownership widgets -static st_multicon_t w_arms[6]; - -// face status widget -static st_multicon_t w_faces; - -// keycard widgets -static st_multicon_t w_keyboxes[3]; - -// armor widget -static st_percent_t w_armor; - -// ammo widgets -static st_number_t w_ammo[4]; - -// max ammo widgets -static st_number_t w_maxammo[4]; - - // number of frags so far in deathmatch -static int st_fragscount; - -// used to use appopriately pained face -static int st_oldhealth = -1; - // used for evil grin static boolean oldweaponsowned[NUMWEAPONS]; - // count until face changes -static int st_facecount = 0; - -// current face index, used by w_faces -static int st_faceindex = 0; - -// holds key-type for each key box on bar -static int keyboxes[3]; // [crispy] blinking key or skull in the status bar -int st_keyorskull[3]; - -// a random number per tick -static int st_randomnumber; +int st_keyorskull[3]; static sbardef_t *sbardef; @@ -330,6 +134,8 @@ static sbarmode_t sbarmode; static patch_t **facepatches = NULL; +static int have_xdthfaces; + // // STATUS BAR CODE // @@ -382,6 +188,23 @@ static void LoadFacePatches(void) M_snprintf(lump, sizeof(lump), "STFDEAD0"); array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + + // [FG] support face gib animations as in the 3DO/Jaguar/PSX ports + int painface; + for (painface = 0; painface < ST_NUMXDTHFACES; ++painface) + { + M_snprintf(lump, sizeof(lump), "STFXDTH%d", painface); + + if (W_CheckNumForName(lump) != -1) + { + array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); + } + else + { + break; + } + } + have_xdthfaces = painface; } static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) @@ -623,6 +446,20 @@ static int CalcPainOffset(sbarelem_t *elem, player_t *player) return lasthealthcalc; } +static int DeadFace(player_t *player) +{ + const int state = + (player->mo->state - states) - mobjinfo[player->mo->type].xdeathstate; + + // [FG] support face gib animations as in the 3DO/Jaguar/PSX ports + if (have_xdthfaces && state >= 0) + { + return ST_XDTHFACE + MIN(state, have_xdthfaces - 1); + } + + return ST_DEADFACE; +} + static void UpdateFace(sbarelem_t *elem, player_t *player) { static int priority; @@ -634,7 +471,7 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) if (!player->health) { priority = 9; - elem->faceindex = ST_DEADFACE; + elem->faceindex = DeadFace(player); elem->facecount = 1; } } @@ -676,8 +513,11 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) angle_t diffangle = 0; boolean right = false; + // [FG] show "Ouch Face" as intended if (player->health - elem->oldhealth > ST_MUCHPAIN) { + // [FG] raise "Ouch Face" priority + priority = 8; elem->facecount = ST_TURNCOUNT; elem->faceindex = CalcPainOffset(elem, player) + ST_OUCHOFFSET; } @@ -993,10 +833,8 @@ static void UpdateElem(sbarelem_t *elem, player_t *player) } } -static void UpdateStatusBar(void) +static void UpdateStatusBar(player_t *player) { - player_t *player = &players[displayplayer]; - statusbar_t *statusbar; array_foreach(statusbar, sbardef->statusbars) { @@ -1303,10 +1141,9 @@ static void DrawStatusBar(void) } } -void ST_Stop(void); - static boolean st_solidbackground; +/* static void ST_DrawSolidBackground(int st_x) { // [FG] calculate average color of the 16px left and right of the status bar @@ -1358,297 +1195,21 @@ static void ST_DrawSolidBackground(int st_x) Z_ChangeTag (pal, PU_CACHE); } - -void ST_refreshBackground(void) -{ - int st_x; - - if (!st_classicstatusbar) - { - return; - } - - st_x = ST_X + (SCREENWIDTH - SHORT(sbar->width)) / 2 + SHORT(sbar->leftoffset); - - V_UseBuffer(st_backing_screen); - - if (video.unscaledw != ST_WIDTH) - { - if (st_solidbackground) - { - ST_DrawSolidBackground(st_x); - } - else - { - // [crispy] this is our own local copy of R_FillBackScreen() to fill - // the entire background of st_backing_screen with the bezel - // pattern, so it appears to the left and right of the status bar - // in widescreen mode - const char *name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; - - const byte *src = V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); - - V_TileBlock64(SCREENHEIGHT - ST_HEIGHT, video.unscaledw, ST_HEIGHT, src); - - // [crispy] preserve bezel bottom edge - if (scaledviewwidth == video.unscaledw) - { - int x; - patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); - - for (x = 0; x < video.deltaw; x += 8) - { - V_DrawPatch(x - video.deltaw, 0, patch); - V_DrawPatch(video.unscaledw - video.deltaw - x - 8, 0, patch); - } - } - } - } - - // [crispy] center unity rerelease wide status bar - V_DrawPatch(st_x, 0, sbar); - - // draw right side of bar if needed (Doom 1.0) - if (sbarr) - V_DrawPatch(ST_ARMSBGX, 0, sbarr); - - if (st_notdeathmatch) - V_DrawPatch(ST_ARMSBGX, 0, armsbg); - - // killough 3/7/98: make face background change with displayplayer - if (netgame) - V_DrawPatch(ST_FX, 0, faceback[displayplayer]); - - V_RestoreBuffer(); - - // [crispy] copy entire video.unscaledw, to preserve the pattern to the left - // and right of the status bar in widescren mode - V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, ST_Y); -} +*/ // Respond to keyboard input events, // intercept cheats. boolean ST_Responder(event_t *ev) { - // Filter automap on/off. - if (ev->type == ev_keyup && (ev->data1.i & 0xffff0000) == AM_MSGHEADER) - { - if (ev->data1.i == AM_MSGENTERED) - { - st_firsttime = true; - } - } - else // if a user keypress... - return M_CheatResponder(ev); // Try cheat responder in m_cheat.c - return false; -} - -int ST_calcPainOffset(void) -{ - static int lastcalc; - static int oldhealth = -1; - int health = plyr->health > 100 ? 100 : plyr->health; - - if (health != oldhealth) - { - lastcalc = ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); - oldhealth = health; - } - return lastcalc; -} - -// -// This is a not-very-pretty routine which handles -// the face states and their timing. -// the precedence of expressions is: -// dead > evil grin > turned head > straight ahead -// - -static int ST_DeadFace(void) -{ - const int state = (plyr->mo->state - states) - mobjinfo[plyr->mo->type].xdeathstate; - - // [FG] support face gib animations as in the 3DO/Jaguar/PSX ports - if (have_xdthfaces && state >= 0) - { - return ST_XDTHFACE + MIN(state, have_xdthfaces - 1); - } - - return ST_DEADFACE; -} - -void ST_updateFaceWidget(void) -{ - int i; - angle_t badguyangle; - angle_t diffang; - static int lastattackdown = -1; - static int priority = 0; - boolean doevilgrin; - - if (priority < 10) - { - // dead - if (!plyr->health) - { - priority = 9; - st_faceindex = ST_DeadFace(); - st_facecount = 1; - } - } - - if (priority < 9) - { - if (plyr->bonuscount) - { - // picking up bonus - doevilgrin = false; - - for (i=0;iweaponowned[i]) - { - doevilgrin = true; - oldweaponsowned[i] = plyr->weaponowned[i]; - } - } - if (doevilgrin) - { - // evil grin if just picked up weapon - priority = 8; - st_facecount = ST_EVILGRINCOUNT; - st_faceindex = ST_calcPainOffset() + ST_EVILGRINOFFSET; - } - } - - } - - if (priority < 8) - { - if (plyr->damagecount && plyr->attacker && plyr->attacker != plyr->mo) - { - // being attacked - priority = 7; - - // [FG] show "Ouch Face" as intended - if (st_oldhealth - plyr->health > ST_MUCHPAIN) - { - // [FG] raise "Ouch Face" priority - priority = 8; - st_facecount = ST_TURNCOUNT; - st_faceindex = ST_calcPainOffset() + ST_OUCHOFFSET; - } - else - { - badguyangle = R_PointToAngle2(plyr->mo->x, - plyr->mo->y, - plyr->attacker->x, - plyr->attacker->y); - - if (badguyangle > plyr->mo->angle) - { - // whether right or left - diffang = badguyangle - plyr->mo->angle; - i = diffang > ANG180; - } - else - { - // whether left or right - diffang = plyr->mo->angle - badguyangle; - i = diffang <= ANG180; - } // confusing, aint it? - - - st_facecount = ST_TURNCOUNT; - st_faceindex = ST_calcPainOffset(); - - if (diffang < ANG45) - { - // head-on - st_faceindex += ST_RAMPAGEOFFSET; - } - else if (i) - { - // turn face right - st_faceindex += ST_TURNOFFSET; - } - else - { - // turn face left - st_faceindex += ST_TURNOFFSET+1; - } - } - } - } - - if (priority < 7) - { - // getting hurt because of your own damn stupidity - if (plyr->damagecount) - { - // [FG] show "Ouch Face" as intended - if (st_oldhealth - plyr->health > ST_MUCHPAIN) - { - priority = 7; - st_facecount = ST_TURNCOUNT; - st_faceindex = ST_calcPainOffset() + ST_OUCHOFFSET; - } - else - { - priority = 6; - st_facecount = ST_TURNCOUNT; - st_faceindex = ST_calcPainOffset() + ST_RAMPAGEOFFSET; - } - - } - - } - - if (priority < 6) - { - // rapid firing - if (plyr->attackdown) - { - if (lastattackdown==-1) - lastattackdown = ST_RAMPAGEDELAY; - else if (!--lastattackdown) - { - priority = 5; - st_faceindex = ST_calcPainOffset() + ST_RAMPAGEOFFSET; - st_facecount = 1; - lastattackdown = 1; - } - } - else - lastattackdown = -1; - - } - - if (priority < 5) + // Filter automap on/off. + if (ev->type == ev_keyup && (ev->data1.i & 0xffff0000) == AM_MSGHEADER) { - // invulnerability - if ((plyr->cheats & CF_GODMODE) - || plyr->powers[pw_invulnerability]) - { - priority = 4; - - st_faceindex = ST_GODFACE; - st_facecount = 1; - - } - + return false; } - - // look left or look right if the facecount has timed out - if (!st_facecount) + else // if a user keypress... { - st_faceindex = ST_calcPainOffset() + (st_randomnumber % 3); - st_facecount = ST_STRAIGHTFACECOUNT; - priority = 0; + return M_CheatResponder(ev); // Try cheat responder in m_cheat.c } - - st_facecount--; - } static boolean sts_traditional_keys; // killough 2/28/98: traditional status bar keys @@ -1712,150 +1273,14 @@ int ST_BlinkKey(player_t* player, int index) return -1; } -static int largeammo = LARGENUMBER; // means "n/a" - -void ST_updateWidgets(void) -{ - int i; - - // must redirect the pointer if the ready weapon has changed. - // if (w_ready.data != plyr->readyweapon) - // { - if (weaponinfo[plyr->readyweapon].ammo == am_noammo) - w_ready.num = &largeammo; - else - w_ready.num = &plyr->ammo[weaponinfo[plyr->readyweapon].ammo]; - //{ - // static int tic=0; - // static int dir=-1; - // if (!(tic&15)) - // plyr->ammo[weaponinfo[plyr->readyweapon].ammo]+=dir; - // if (plyr->ammo[weaponinfo[plyr->readyweapon].ammo] == -100) - // dir = 1; - // tic++; - // } - w_ready.data = plyr->readyweapon; - - // if (*w_ready.on) - // STlib_updateNum(&w_ready, true); - // refresh weapon change - // } - - // update keycard multiple widgets - for (i=0;i<3;i++) - { - keyboxes[i] = plyr->cards[i] ? i : -1; - - //jff 2/24/98 select double key - //killough 2/28/98: preserve traditional keys by config option - - if (plyr->cards[i+3]) - keyboxes[i] = keyboxes[i]==-1 || sts_traditional_keys ? i+3 : i+6; - } - - // [crispy] blinking key or skull in the status bar - if (plyr->keyblinktics) - { - if (!hud_blink_keys || - !(st_classicstatusbar || (hud_displayed && hud_active > 0))) - { - plyr->keyblinktics = 0; - } - else - { - if (!(plyr->keyblinktics & (2*KEYBLINKMASK - 1))) - S_StartSoundPitch(NULL, sfx_itemup, PITCH_NONE); - - plyr->keyblinktics--; - - for (i = 0; i < 3; i++) - { - switch (ST_BlinkKey(plyr, i)) - { - case KEYBLINK_NONE: - continue; - - case KEYBLINK_CARD: - keyboxes[i] = i; - break; - - case KEYBLINK_SKULL: - keyboxes[i] = i + 3; - break; - - case KEYBLINK_BOTH: - keyboxes[i] = i + 6; - break; - - default: - keyboxes[i] = -1; - break; - } - } - } - } - - // refresh everything if this is him coming back to life - ST_updateFaceWidget(); - - // used for armbg patch - st_notdeathmatch = !deathmatch; - - // used by w_arms[] widgets - st_armson = st_statusbaron && !deathmatch; - - // used by w_frags widget - st_fragson = deathmatch && st_statusbaron; - st_fragscount = 0; - - for (i=0 ; ifrags[i]; - else - st_fragscount -= plyr->frags[i]; - } - -} - -boolean st_invul; -static void ST_doPaletteStuff(void); - -void ST_Ticker(void) -{ - if (sbardef) - { - UpdateStatusBar(); - if (!nodrawers) - { - ST_doPaletteStuff(); - } - return; - } - - st_health = SmoothCount(st_health, plyr->health); - st_armor = SmoothCount(st_armor, plyr->armorpoints); - - st_randomnumber = M_Random(); - ST_updateWidgets(); - st_oldhealth = plyr->health; - - st_invul = (plyr->powers[pw_invulnerability] > 4*32 || - plyr->powers[pw_invulnerability] & 8) || - plyr->cheats & CF_GODMODE; - - if (!nodrawers) - ST_doPaletteStuff(); // Do red-/gold-shifts from damage/items -} - -static int st_palette = 0; boolean palette_changes = true; -static void ST_doPaletteStuff(void) +static void DoPaletteStuff(player_t *player) { - player_t *player = &players[displayplayer]; - int cnt = player->damagecount; - int palette_index; + static int oldpalette = 0; + int palette; + + int damagecount = player->damagecount; // killough 7/14/98: beta version did not cause red berserk palette if (!beta_emulation) @@ -1864,542 +1289,118 @@ static void ST_doPaletteStuff(void) if (player->powers[pw_strength]) { // slowly fade the berzerk out - int bzc = 12 - (player->powers[pw_strength] >> 6); - if (bzc > cnt) + int berzerkcount = 12 - (player->powers[pw_strength] >> 6); + if (berzerkcount > damagecount) { - cnt = bzc; + damagecount = berzerkcount; } } } if (STRICTMODE(!palette_changes)) { - palette_index = 0; + palette = 0; } - else if (cnt) + else if (damagecount) { // In Chex Quest, the player never sees red. Instead, the radiation suit // palette is used to tint the screen green, as though the player is // being covered in goo by an attacking flemoid. if (gameversion == exe_chex) { - palette_index = RADIATIONPAL; + palette = RADIATIONPAL; } else { - palette_index = (cnt + 7) >> 3; - if (palette_index >= NUMREDPALS) + palette = (damagecount + 7) >> 3; + if (palette >= NUMREDPALS) { - palette_index = NUMREDPALS - 1; + palette = NUMREDPALS - 1; } // [crispy] tune down a bit so the menu remains legible if (menuactive || paused) { - palette_index >>= 1; + palette >>= 1; } - palette_index += STARTREDPALS; + palette += STARTREDPALS; } } else if (player->bonuscount) { - palette_index = (player->bonuscount + 7) >> 3; - if (palette_index >= NUMBONUSPALS) + palette = (player->bonuscount + 7) >> 3; + if (palette >= NUMBONUSPALS) { - palette_index = NUMBONUSPALS - 1; + palette = NUMBONUSPALS - 1; } - palette_index += STARTBONUSPALS; + palette += STARTBONUSPALS; } // killough 7/14/98: beta version did not cause green palette else if (beta_emulation) { - palette_index = 0; + palette = 0; } else if (player->powers[pw_ironfeet] > 4 * 32 || player->powers[pw_ironfeet] & 8) { - palette_index = RADIATIONPAL; + palette = RADIATIONPAL; } else { - palette_index = 0; + palette = 0; } - if (palette_index != st_palette) + if (palette != oldpalette) { - st_palette = palette_index; + oldpalette = palette; // haleyjd: must cast to byte *, arith. on void pointer is // a GNU C extension - byte *palette = - (byte *)W_CacheLumpNum(lu_palette, PU_CACHE) + palette_index * 768; - I_SetPalette(palette); + I_SetPalette((byte *)W_CacheLumpName("PLAYPAL", PU_CACHE) + + palette * 768); } } -void ST_drawWidgets(void) -{ - int i; - int maxammo = plyr->maxammo[weaponinfo[w_ready.data].ammo]; - - // [Alaux] Used to color health and armor counts based on - // the real values, only ever relevant when using smooth counts - const int health = plyr->health, armor = plyr->armorpoints; - - // clear area - if (!st_crispyhud && st_statusbaron) - { - V_CopyRect(video.deltaw, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, - video.deltaw, ST_Y); - } - - // used by w_arms[] widgets - st_armson = st_statusbaron && !deathmatch; - - // used by w_frags widget - st_fragson = deathmatch && st_statusbaron; - - // backpack changes thresholds - if (plyr->backpack && !hud_backpack_thresholds) - maxammo /= 2; - - //jff 2/16/98 make color of ammo depend on amount - if (*w_ready.num*100 < ammo_red*maxammo) - STlib_updateNum(&w_ready, cr_red); - else - if (*w_ready.num*100 < - ammo_yellow*maxammo) - STlib_updateNum(&w_ready, cr_gold); - else if (*w_ready.num > maxammo) - STlib_updateNum(&w_ready, cr_blue2); - else - STlib_updateNum(&w_ready, cr_green); - - for (i=0;i<4;i++) - { - STlib_updateNum(&w_ammo[i], NULL); //jff 2/16/98 no xlation - STlib_updateNum(&w_maxammo[i], NULL); - } - - // [Alaux] Make color of health gray when invulnerable - if (st_invul) - STlib_updatePercent(&w_health, cr_gray); - else - //jff 2/16/98 make color of health depend on amount - if (healtharmortype) - STlib_updatePercent(&w_armor, cr_red); - else if (plyr->armortype == 1) - STlib_updatePercent(&w_armor, cr_green); - else - STlib_updatePercent(&w_armor, cr_blue2); - } - else - { - if (st_invul) - STlib_updatePercent(&w_armor, cr_gray); - else - //jff 2/16/98 make color of armor depend on amount - if (armor= 0) - { - sbar = V_CachePatchName("STBAR", PU_STATIC); - sbarr = NULL; - } - else - { - sbar = V_CachePatchName("STMBARL", PU_STATIC); - sbarr = V_CachePatchName("STMBARR", PU_STATIC); - } - - // face states - facenum = 0; - for (i=0;iweaponowned[i]; - - for (i=0;i<3;i++) - keyboxes[i] = -1; - - STlib_init(); } -static int distributed_delta = 0; - -void ST_createWidgets(void) -{ - int i; - - // ready weapon ammo - STlib_initNum(&w_ready, - ST_AMMOX - distributed_delta, - ST_AMMOY, - tallnum, - weaponinfo[plyr->readyweapon].ammo != am_noammo ? - &plyr->ammo[weaponinfo[plyr->readyweapon].ammo] : - &largeammo, - &st_statusbaron, - ST_AMMOWIDTH ); - - // the last weapon type - w_ready.data = plyr->readyweapon; - - // health percentage - STlib_initPercent(&w_health, - ST_HEALTHX - distributed_delta, - ST_HEALTHY, - tallnum, - &st_health, - &st_statusbaron, - tallpercent); - - // weapons owned - for(i=0;i<6;i++) - { - STlib_initMultIcon(&w_arms[i], - ST_ARMSX+(i%3)*ST_ARMSXSPACE - distributed_delta, - ST_ARMSY+(i/3)*ST_ARMSYSPACE, - arms[i], (int *) &plyr->weaponowned[i+1], - &st_armson); - } - - // frags sum - STlib_initNum(&w_frags, - ST_FRAGSX - distributed_delta, - ST_FRAGSY, - tallnum, - &st_fragscount, - &st_fragson, - ST_FRAGSWIDTH); - - // faces - STlib_initMultIcon(&w_faces, - ST_FACESX, - ST_FACESY, - faces, - &st_faceindex, - &st_classicstatusbar); - - // armor percentage - should be colored later - STlib_initPercent(&w_armor, - ST_ARMORX + distributed_delta, - ST_ARMORY, - tallnum, - &st_armor, - &st_statusbaron, tallpercent); - - // keyboxes 0-2 - STlib_initMultIcon(&w_keyboxes[0], - ST_KEY0X + distributed_delta, - ST_KEY0Y, - keys, - &keyboxes[0], - &st_statusbaron); - - STlib_initMultIcon(&w_keyboxes[1], - ST_KEY1X + distributed_delta, - ST_KEY1Y, - keys, - &keyboxes[1], - &st_statusbaron); - - STlib_initMultIcon(&w_keyboxes[2], - ST_KEY2X + distributed_delta, - ST_KEY2Y, - keys, - &keyboxes[2], - &st_statusbaron); - - // ammo count (all four kinds) - STlib_initNum(&w_ammo[0], - ST_AMMO0X + distributed_delta, - ST_AMMO0Y, - shortnum, - &plyr->ammo[0], - &st_statusbaron, - ST_AMMO0WIDTH); - - STlib_initNum(&w_ammo[1], - ST_AMMO1X + distributed_delta, - ST_AMMO1Y, - shortnum, - &plyr->ammo[1], - &st_statusbaron, - ST_AMMO1WIDTH); - - STlib_initNum(&w_ammo[2], - ST_AMMO2X + distributed_delta, - ST_AMMO2Y, - shortnum, - &plyr->ammo[2], - &st_statusbaron, - ST_AMMO2WIDTH); - - STlib_initNum(&w_ammo[3], - ST_AMMO3X + distributed_delta, - ST_AMMO3Y, - shortnum, - &plyr->ammo[3], - &st_statusbaron, - ST_AMMO3WIDTH); - - // max ammo count (all four kinds) - STlib_initNum(&w_maxammo[0], - ST_MAXAMMO0X + distributed_delta, - ST_MAXAMMO0Y, - shortnum, - &plyr->maxammo[0], - &st_statusbaron, - ST_MAXAMMO0WIDTH); - - STlib_initNum(&w_maxammo[1], - ST_MAXAMMO1X + distributed_delta, - ST_MAXAMMO1Y, - shortnum, - &plyr->maxammo[1], - &st_statusbaron, - ST_MAXAMMO1WIDTH); - - STlib_initNum(&w_maxammo[2], - ST_MAXAMMO2X + distributed_delta, - ST_MAXAMMO2Y, - shortnum, - &plyr->maxammo[2], - &st_statusbaron, - ST_MAXAMMO2WIDTH); - - STlib_initNum(&w_maxammo[3], - ST_MAXAMMO3X + distributed_delta, - ST_MAXAMMO3Y, - shortnum, - &plyr->maxammo[3], - &st_statusbaron, - ST_MAXAMMO3WIDTH); -} - -static void ST_MoveHud (void) +void ST_Drawer(void) { - static int odelta = 0; - - if (st_crispyhud && hud_active == 2) - distributed_delta = video.deltaw; - else - distributed_delta = 0; - - if (distributed_delta != odelta) + if (!sbardef) { - ST_createWidgets(); - odelta = distributed_delta; + return; } + DrawStatusBar(); } -static boolean st_stopped = true; - void ST_Start(void) { - if (sbardef) - { - RefreshStatusBar(); - return; - } - if (!st_stopped) - ST_Stop(); - ST_initData(); - ST_createWidgets(); - st_stopped = false; -} - -void ST_Stop(void) -{ - if (sbardef) - { - return; - } - if (st_stopped) - return; - if (!nodrawers) - I_SetPalette (W_CacheLumpNum (lu_palette, PU_CACHE)); - st_stopped = true; + if (!sbardef) + { + return; + } + RefreshStatusBar(); } void ST_Init(void) { - sbardef = ST_ParseSbarDef(); - if (sbardef) - { - LoadFacePatches(); - lu_palette = W_GetNumForName ("PLAYPAL"); - return; - } - - ST_loadData(); + sbardef = ST_ParseSbarDef(); + if (sbardef) + { + LoadFacePatches(); + } } void ST_InitRes(void) @@ -2410,43 +1411,9 @@ void ST_InitRes(void) PU_RENDERER, 0); } -void ST_Warnings(void) -{ - int i; - patch_t *const patch = V_CachePatchName("brdr_b", PU_CACHE); - - if (patch && SHORT(patch->height) > ST_HEIGHT) - { - I_Printf(VB_WARNING, "ST_Init: Non-standard BRDR_B height of %d. " - "Expected <= %d.", SHORT(patch->height), ST_HEIGHT); - } - - if (sbar && SHORT(sbar->height) != ST_HEIGHT) - { - I_Printf(VB_WARNING, "ST_Init: Non-standard STBAR height of %d. " - "Expected %d.", SHORT(sbar->height), ST_HEIGHT); - } - - if (armsbg && SHORT(armsbg->height) > ST_HEIGHT) - { - I_Printf(VB_WARNING, "ST_Init: Non-standard STARMS height of %d. " - "Expected <= %d.", SHORT(armsbg->height), ST_HEIGHT); - } - - for (i = 0; i < MAXPLAYERS; i++) - { - if (faceback[i] && SHORT(faceback[i]->height) > ST_HEIGHT) - { - I_Printf(VB_WARNING, "ST_Init: Non-standard STFB%d height of %d. " - "Expected <= %d.", i, SHORT(faceback[i]->height), ST_HEIGHT); - } - } -} - void ST_ResetPalette(void) { - st_palette = -1; - I_SetPalette(W_CacheLumpNum(lu_palette, PU_CACHE)); + I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE)); } void ST_BindSTSVariables(void) diff --git a/src/st_stuff.h b/src/st_stuff.h index c3238d1bd..eec8a7fcc 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -46,14 +46,13 @@ boolean ST_Responder(struct event_s *ev); void ST_Ticker(void); // Called by main loop. -void ST_Drawer(boolean fullscreen, boolean refresh); +void ST_Drawer(void); // Called when the console player is spawned on each level. void ST_Start(void); // Called by startup code. void ST_Init(void); -void ST_Warnings(void); void ST_ResetPalette(void); @@ -63,10 +62,6 @@ void ST_InitRes(void); // killough 5/2/98: moved from m_misc.c: -// [Alaux] -extern int st_health; -extern int st_armor; - extern int health_red; // health amount less than which status is red extern int health_yellow; // health amount less than which status is yellow extern int health_green; // health amount above is blue, below is green @@ -87,8 +82,6 @@ extern boolean hud_armor_type; // color of armor depends on type extern boolean palette_changes; -extern boolean st_invul; - void ST_BindSTSVariables(void); #endif diff --git a/src/wi_stuff.c b/src/wi_stuff.c index 165328e9b..4592fef3c 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -36,7 +36,6 @@ #include "mn_menu.h" #include "r_defs.h" #include "s_sound.h" -#include "st_lib.h" #include "sounds.h" #include "u_mapinfo.h" #include "v_fmt.h" @@ -46,6 +45,8 @@ #include "wi_stuff.h" #include "z_zone.h" +#define LARGENUMBER 1994 + // // Data needed to add patches to full screen intermission pics. // Patches are statistics messages, and animations. From f0a9fdc86fd2418d8c9fe37eba78227728bba027 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 25 Sep 2024 18:31:20 +0700 Subject: [PATCH 19/55] update dig* font --- base/all-all/{digl.png => dig033.png} | Bin 1151 -> 1151 bytes base/all-all/{dig0.png => dig034.png} | Bin 1155 -> 1155 bytes base/all-all/dig035.png | Bin 0 -> 1156 bytes base/all-all/dig036.png | Bin 0 -> 1159 bytes base/all-all/{dig43.png => dig037.png} | Bin 1154 -> 1154 bytes base/all-all/{dig8.png => dig038.png} | Bin 1153 -> 1153 bytes base/all-all/dig039.png | Bin 0 -> 1152 bytes base/all-all/{dig1.png => dig040.png} | Bin 1155 -> 1155 bytes base/all-all/{dig37.png => dig041.png} | Bin 1154 -> 1154 bytes base/all-all/{dig4.png => dig042.png} | Bin 1155 -> 1155 bytes base/all-all/dig043.png | Bin 0 -> 1155 bytes base/all-all/{dig45.png => dig044.png} | Bin 1150 -> 1149 bytes base/all-all/dig045.png | Bin 0 -> 1150 bytes base/all-all/{dig46.png => dig046.png} | Bin 1144 -> 1144 bytes base/all-all/dig047.png | Bin 0 -> 1154 bytes base/all-all/dig048.png | Bin 0 -> 1155 bytes base/all-all/{dig2.png => dig049.png} | Bin 1157 -> 1157 bytes base/all-all/{dig3.png => dig050.png} | Bin 1158 -> 1158 bytes base/all-all/dig051.png | Bin 0 -> 1158 bytes base/all-all/dig052.png | Bin 0 -> 1155 bytes base/all-all/dig053.png | Bin 0 -> 1156 bytes base/all-all/dig054.png | Bin 0 -> 1155 bytes base/all-all/dig055.png | Bin 0 -> 1159 bytes base/all-all/dig056.png | Bin 0 -> 1153 bytes base/all-all/dig057.png | Bin 0 -> 1154 bytes base/all-all/{dig58.png => dig058.png} | Bin 1147 -> 1147 bytes base/all-all/dig059.png | Bin 0 -> 1150 bytes base/all-all/dig060.png | Bin 0 -> 1158 bytes base/all-all/dig061.png | Bin 0 -> 1151 bytes base/all-all/dig062.png | Bin 0 -> 1158 bytes base/all-all/dig063.png | Bin 0 -> 1156 bytes base/all-all/dig064.png | Bin 0 -> 1159 bytes base/all-all/dig065.png | Bin 0 -> 1157 bytes base/all-all/dig066.png | Bin 0 -> 1157 bytes base/all-all/dig067.png | Bin 0 -> 1155 bytes base/all-all/dig068.png | Bin 0 -> 1159 bytes base/all-all/dig069.png | Bin 0 -> 1153 bytes base/all-all/dig070.png | Bin 0 -> 1155 bytes base/all-all/dig071.png | Bin 0 -> 1159 bytes base/all-all/{digh.png => dig072.png} | Bin 1161 -> 1161 bytes base/all-all/dig073.png | Bin 0 -> 1157 bytes base/all-all/dig074.png | Bin 0 -> 1159 bytes base/all-all/dig075.png | Bin 0 -> 1158 bytes base/all-all/dig076.png | Bin 0 -> 1151 bytes base/all-all/dig077.png | Bin 0 -> 1157 bytes base/all-all/{dign.png => dig078.png} | Bin 1161 -> 1161 bytes base/all-all/dig079.png | Bin 0 -> 1155 bytes base/all-all/dig080.png | Bin 0 -> 1156 bytes base/all-all/dig081.png | Bin 0 -> 1156 bytes base/all-all/dig082.png | Bin 0 -> 1158 bytes base/all-all/dig083.png | Bin 0 -> 1156 bytes base/all-all/dig084.png | Bin 0 -> 1156 bytes base/all-all/dig085.png | Bin 0 -> 1157 bytes base/all-all/dig086.png | Bin 0 -> 1160 bytes base/all-all/dig087.png | Bin 0 -> 1156 bytes base/all-all/dig088.png | Bin 0 -> 1158 bytes base/all-all/dig089.png | Bin 0 -> 1160 bytes base/all-all/dig090.png | Bin 0 -> 1155 bytes base/all-all/dig091.png | Bin 0 -> 1155 bytes base/all-all/dig092.png | Bin 0 -> 1153 bytes base/all-all/dig093.png | Bin 0 -> 1154 bytes base/all-all/dig094.png | Bin 0 -> 1151 bytes base/all-all/dig095.png | Bin 0 -> 1147 bytes base/all-all/dig096.png | Bin 0 -> 1150 bytes base/all-all/dig097.png | Bin 0 -> 1157 bytes base/all-all/dig098.png | Bin 0 -> 1157 bytes base/all-all/dig099.png | Bin 0 -> 1155 bytes base/all-all/dig100.png | Bin 0 -> 1159 bytes base/all-all/dig101.png | Bin 0 -> 1153 bytes base/all-all/dig102.png | Bin 0 -> 1155 bytes base/all-all/dig103.png | Bin 0 -> 1159 bytes base/all-all/{digv.png => dig104.png} | Bin 1161 -> 1161 bytes base/all-all/dig105.png | Bin 0 -> 1157 bytes base/all-all/dig106.png | Bin 0 -> 1159 bytes base/all-all/dig107.png | Bin 0 -> 1158 bytes base/all-all/dig108.png | Bin 0 -> 1151 bytes base/all-all/dig109.png | Bin 0 -> 1157 bytes base/all-all/dig110.png | Bin 0 -> 1161 bytes base/all-all/dig111.png | Bin 0 -> 1155 bytes base/all-all/dig112.png | Bin 0 -> 1156 bytes base/all-all/dig113.png | Bin 0 -> 1156 bytes base/all-all/dig114.png | Bin 0 -> 1158 bytes base/all-all/dig115.png | Bin 0 -> 1156 bytes base/all-all/dig116.png | Bin 0 -> 1156 bytes base/all-all/dig117.png | Bin 0 -> 1157 bytes base/all-all/dig118.png | Bin 0 -> 1160 bytes base/all-all/dig119.png | Bin 0 -> 1156 bytes base/all-all/dig120.png | Bin 0 -> 1158 bytes base/all-all/dig121.png | Bin 0 -> 1160 bytes base/all-all/dig122.png | Bin 0 -> 1155 bytes base/all-all/dig123.png | Bin 0 -> 1157 bytes base/all-all/dig124.png | Bin 0 -> 1148 bytes base/all-all/dig125.png | Bin 0 -> 1159 bytes base/all-all/dig126.png | Bin 0 -> 1154 bytes base/all-all/dig47.png | Bin 1154 -> 0 bytes base/all-all/dig5.png | Bin 1157 -> 0 bytes base/all-all/dig6.png | Bin 1154 -> 0 bytes base/all-all/dig7.png | Bin 1159 -> 0 bytes base/all-all/dig9.png | Bin 1153 -> 0 bytes base/all-all/dig91.png | Bin 1154 -> 0 bytes base/all-all/dig93.png | Bin 1154 -> 0 bytes base/all-all/diga.png | Bin 1157 -> 0 bytes base/all-all/digb.png | Bin 1156 -> 0 bytes base/all-all/digc.png | Bin 1155 -> 0 bytes base/all-all/digd.png | Bin 1159 -> 0 bytes base/all-all/dige.png | Bin 1153 -> 0 bytes base/all-all/digf.png | Bin 1155 -> 0 bytes base/all-all/digg.png | Bin 1158 -> 0 bytes base/all-all/digi.png | Bin 1156 -> 0 bytes base/all-all/digj.png | Bin 1160 -> 0 bytes base/all-all/digk.png | Bin 1160 -> 0 bytes base/all-all/digm.png | Bin 1156 -> 0 bytes base/all-all/digo.png | Bin 1155 -> 0 bytes base/all-all/digp.png | Bin 1155 -> 0 bytes base/all-all/digq.png | Bin 1155 -> 0 bytes base/all-all/digr.png | Bin 1157 -> 0 bytes base/all-all/digs.png | Bin 1157 -> 0 bytes base/all-all/digt.png | Bin 1156 -> 0 bytes base/all-all/digu.png | Bin 1157 -> 0 bytes base/all-all/digw.png | Bin 1156 -> 0 bytes base/all-all/digx.png | Bin 1160 -> 0 bytes base/all-all/digy.png | Bin 1160 -> 0 bytes base/all-all/digz.png | Bin 1154 -> 0 bytes 123 files changed, 0 insertions(+), 0 deletions(-) rename base/all-all/{digl.png => dig033.png} (84%) rename base/all-all/{dig0.png => dig034.png} (83%) create mode 100644 base/all-all/dig035.png create mode 100644 base/all-all/dig036.png rename base/all-all/{dig43.png => dig037.png} (83%) rename base/all-all/{dig8.png => dig038.png} (83%) create mode 100644 base/all-all/dig039.png rename base/all-all/{dig1.png => dig040.png} (83%) rename base/all-all/{dig37.png => dig041.png} (83%) rename base/all-all/{dig4.png => dig042.png} (83%) create mode 100644 base/all-all/dig043.png rename base/all-all/{dig45.png => dig044.png} (84%) create mode 100644 base/all-all/dig045.png rename base/all-all/{dig46.png => dig046.png} (84%) create mode 100644 base/all-all/dig047.png create mode 100644 base/all-all/dig048.png rename base/all-all/{dig2.png => dig049.png} (83%) rename base/all-all/{dig3.png => dig050.png} (83%) create mode 100644 base/all-all/dig051.png create mode 100644 base/all-all/dig052.png create mode 100644 base/all-all/dig053.png create mode 100644 base/all-all/dig054.png create mode 100644 base/all-all/dig055.png create mode 100644 base/all-all/dig056.png create mode 100644 base/all-all/dig057.png rename base/all-all/{dig58.png => dig058.png} (84%) create mode 100644 base/all-all/dig059.png create mode 100644 base/all-all/dig060.png create mode 100644 base/all-all/dig061.png create mode 100644 base/all-all/dig062.png create mode 100644 base/all-all/dig063.png create mode 100644 base/all-all/dig064.png create mode 100644 base/all-all/dig065.png create mode 100644 base/all-all/dig066.png create mode 100644 base/all-all/dig067.png create mode 100644 base/all-all/dig068.png create mode 100644 base/all-all/dig069.png create mode 100644 base/all-all/dig070.png create mode 100644 base/all-all/dig071.png rename base/all-all/{digh.png => dig072.png} (83%) create mode 100644 base/all-all/dig073.png create mode 100644 base/all-all/dig074.png create mode 100644 base/all-all/dig075.png create mode 100644 base/all-all/dig076.png create mode 100644 base/all-all/dig077.png rename base/all-all/{dign.png => dig078.png} (83%) create mode 100644 base/all-all/dig079.png create mode 100644 base/all-all/dig080.png create mode 100644 base/all-all/dig081.png create mode 100644 base/all-all/dig082.png create mode 100644 base/all-all/dig083.png create mode 100644 base/all-all/dig084.png create mode 100644 base/all-all/dig085.png create mode 100644 base/all-all/dig086.png create mode 100644 base/all-all/dig087.png create mode 100644 base/all-all/dig088.png create mode 100644 base/all-all/dig089.png create mode 100644 base/all-all/dig090.png create mode 100644 base/all-all/dig091.png create mode 100644 base/all-all/dig092.png create mode 100644 base/all-all/dig093.png create mode 100644 base/all-all/dig094.png create mode 100644 base/all-all/dig095.png create mode 100644 base/all-all/dig096.png create mode 100644 base/all-all/dig097.png create mode 100644 base/all-all/dig098.png create mode 100644 base/all-all/dig099.png create mode 100644 base/all-all/dig100.png create mode 100644 base/all-all/dig101.png create mode 100644 base/all-all/dig102.png create mode 100644 base/all-all/dig103.png rename base/all-all/{digv.png => dig104.png} (83%) create mode 100644 base/all-all/dig105.png create mode 100644 base/all-all/dig106.png create mode 100644 base/all-all/dig107.png create mode 100644 base/all-all/dig108.png create mode 100644 base/all-all/dig109.png create mode 100644 base/all-all/dig110.png create mode 100644 base/all-all/dig111.png create mode 100644 base/all-all/dig112.png create mode 100644 base/all-all/dig113.png create mode 100644 base/all-all/dig114.png create mode 100644 base/all-all/dig115.png create mode 100644 base/all-all/dig116.png create mode 100644 base/all-all/dig117.png create mode 100644 base/all-all/dig118.png create mode 100644 base/all-all/dig119.png create mode 100644 base/all-all/dig120.png create mode 100644 base/all-all/dig121.png create mode 100644 base/all-all/dig122.png create mode 100644 base/all-all/dig123.png create mode 100644 base/all-all/dig124.png create mode 100644 base/all-all/dig125.png create mode 100644 base/all-all/dig126.png delete mode 100644 base/all-all/dig47.png delete mode 100644 base/all-all/dig5.png delete mode 100644 base/all-all/dig6.png delete mode 100644 base/all-all/dig7.png delete mode 100644 base/all-all/dig9.png delete mode 100644 base/all-all/dig91.png delete mode 100644 base/all-all/dig93.png delete mode 100644 base/all-all/diga.png delete mode 100644 base/all-all/digb.png delete mode 100644 base/all-all/digc.png delete mode 100644 base/all-all/digd.png delete mode 100644 base/all-all/dige.png delete mode 100644 base/all-all/digf.png delete mode 100644 base/all-all/digg.png delete mode 100644 base/all-all/digi.png delete mode 100644 base/all-all/digj.png delete mode 100644 base/all-all/digk.png delete mode 100644 base/all-all/digm.png delete mode 100644 base/all-all/digo.png delete mode 100644 base/all-all/digp.png delete mode 100644 base/all-all/digq.png delete mode 100644 base/all-all/digr.png delete mode 100644 base/all-all/digs.png delete mode 100644 base/all-all/digt.png delete mode 100644 base/all-all/digu.png delete mode 100644 base/all-all/digw.png delete mode 100644 base/all-all/digx.png delete mode 100644 base/all-all/digy.png delete mode 100644 base/all-all/digz.png diff --git a/base/all-all/digl.png b/base/all-all/dig033.png similarity index 84% rename from base/all-all/digl.png rename to base/all-all/dig033.png index d34197a65c126217c29bea2288ced5175055880c..36777b8214cf1e8b7f48ae78d2ffbf60b34af66e 100644 GIT binary patch delta 64 zcmey*@toS$sTqM(+*#Ms6wFp065g-MM~jZJ}pA@vID U%IgQW6fgjRr>mdKI;Vst0C)2e(EtDd diff --git a/base/all-all/dig0.png b/base/all-all/dig034.png similarity index 83% rename from base/all-all/dig0.png rename to base/all-all/dig034.png index 0ee318454cfe4fedab42f7e7ce11b11d141f6cd4..0c580a29e89c09fb9f728f1678386a033615f255 100644 GIT binary patch delta 68 zcmZqXZ06ix&OF(f`P1Y8W^Pu7;P33JlPy^kw0`h2@%%SuP@Ir*bZ|N{F)}j?GYc>< YTr}X^obG;QDFYCAy85}Sb4q9e0942k8UO$Q diff --git a/base/all-all/dig035.png b/base/all-all/dig035.png new file mode 100644 index 0000000000000000000000000000000000000000..39bd996d519d948aac0c96022847801cd30ece7d GIT binary patch literal 1156 zcmd^7F{`9j6h1FY;%3dmLWs!`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKX_|Ml*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*%GuE)(1*Ddxn zb|o$+*ycA)dYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WiwF$a1cqP`0MeZUgaFR%+~W?nOYBQ*Q=EBNXqfTuV(u6*`ysRS z>6J@e+psWUZrt(2En$2cie9I{ZAJ-H`JHpt3Lex>32kBn!SxP z_~qA6Nb=F;#p4(Ee-8d--unnu`26~V&tAeGpT7R$EB?3FXYlB+kAL!9=OL+t%O_VC KzkmJm$NvEOL}Hcz literal 0 HcmV?d00001 diff --git a/base/all-all/dig036.png b/base/all-all/dig036.png new file mode 100644 index 0000000000000000000000000000000000000000..9ec3e5a84a72318e7c34358a354cf95e4c65129e GIT binary patch literal 1159 zcmd^9F^l6y6n@7hr@d1a7b+B@LIe?9s8FFog$gC7J+vEz)p0ryL4`te;9?4eC?F0M zf~YXT2Rd-!Bnqf-p~4U!s4#~M7h5=Bhzl1k6mW3?C%ABN#a{O^yMH6Yycy;(?|UEf zeauf!uB@|%pF9MBv&)O~r*!|226K8s*P9o~UjQfY*YCG!x{2czAbUHnj4H(8}7?)uj01Lnbz{3vTZm?bAW{&Fy zmo+X*oDZ?dZzkz+9PdlA8;09~zs}uN<}6aXiLFUwj)_r*dJ$-SPt9BQFrOxqq-0%0h-L7rh&1SP&t(ME>VzHRbW=+#fCX>3ZtEw7}M#JH7Fc{={ zo@H5*BvBL*Lc%cgec$su$8jvnGEGz0bxqS0Md^0Ck|ZSS9*)r=zSclByq-85ySGAog?OrJ<7qcI25o*9dIQ zGga46syr+bHz#%y7(G|@E!oi}Qx(!IjAE}x96z*NPq!S^uw>2XBF2Z-+s@7FQkkY= z>2rOPiDjT#W83070GvQs#AEM5# z*VzW_%44n_m{~A2?|9-Cu|X^l38IB4Awq3HrNK~vzC_L0H5EaVI7MJ-i#sdn01AKv zzyr`EU}fUo#*~)g8rBt*5s;dYKmR`a65t;E@bv1A+bzHU=>YeJ`HVi*gYPcBrYf`C zZQO%jfBTpwKfOHv;@Rmh;d{)k5kLC;`;%86e0%@?&wpgEPcQy4=)dy(kw6~2dHFBB P4403u&VPUO&5!>9zSd{8 literal 0 HcmV?d00001 diff --git a/base/all-all/dig43.png b/base/all-all/dig037.png similarity index 83% rename from base/all-all/dig43.png rename to base/all-all/dig037.png index ebf2e4882425edb6b5b5230c6013cf304986ccd6..c57c7e83b2970cc91ee28bfbf976e84154da83c0 100644 GIT binary patch delta 67 zcmZqTY~tKt&OF(f`P1Y8W^Pu7;P33JlPy^kG=K0j@%%S$@Dw=v;s1X&gKkDomJY^3 WUzvykM%RT5K;Y@>=d#Wzp$P!ns}(~4 delta 68 zcmZqTY~tKt&dkU#*^&A4gTe~DWM4fo>UWi diff --git a/base/all-all/dig8.png b/base/all-all/dig038.png similarity index 83% rename from base/all-all/dig8.png rename to base/all-all/dig038.png index 67213d20f01600c348b5b6e19ae1eace277d191c..c622b4c9bcdc99a9efbf3fd5b09df1f6068633ba 100644 GIT binary patch delta 66 zcmZqVY~!s&hQZ}f7{z1+h&-}$)T z_v_1R^X&1{#{h74b$RiM+z&}mj~DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{)6*r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%rkmMkzphfa}ErdS4CFlX)@x@N*aI+AOdgz zBnem@gdU1X6$N6_Z F{|C_;Wh?*y literal 0 HcmV?d00001 diff --git a/base/all-all/dig1.png b/base/all-all/dig040.png similarity index 83% rename from base/all-all/dig1.png rename to base/all-all/dig040.png index 335adcab1a08bf53ffb751848e39731dba83c2eb..5b9ebbf4b97598d03709bc4a598c84fd478457c7 100644 GIT binary patch delta 68 zcmZqXZ06ix&OF(f`P1Y8W^Pu7;P33JlPy^kw0`h2@%;av&oEKCLBhl6Py1wnLIF00 X>QLG68J{n`U;qM7S3j3^P6FVdQ&MBb@0EW5}@Bjb+ diff --git a/base/all-all/dig37.png b/base/all-all/dig041.png similarity index 83% rename from base/all-all/dig37.png rename to base/all-all/dig041.png index 5ec81b0c8131438854ed1e9aa7d07109ec5ad7d8..5f90e906451c94cfb9ba586b43da97da7b504833 100644 GIT binary patch delta 67 zcmZqTY~tKt&OF(f`P1Y8W^Pu7;P33JlPy^kG=K0j@%;av&oJ46%g5+|=K==i2v&wE W60+f~j7+;2fWXt$&t;ucLK6V5UK5J| delta 68 zcmZqTY~tKt&dkU#*^&A4gTe~DWM4ff+`aB diff --git a/base/all-all/dig4.png b/base/all-all/dig042.png similarity index 83% rename from base/all-all/dig4.png rename to base/all-all/dig042.png index 9c80f088f6ac2fd98ae8853f791b903b87ef9ee6..418d2cfff702b5336c9c11348873dbebfdd806fa 100644 GIT binary patch delta 68 zcmZqXZ06ix&OF(f`P1Y8W^Pu7;P33JlPy^kw0`h2@dOkx3mE-Lzj1&e$++QW0tXXA Xp|4EDm(7{l3_#%N>gTe~DWM4f(Et@9 delta 69 zcmZqXZ06ix&dkU#*^&A4kMWe01@I-0zT}?wyhI`upTHz!^OL;^{;36gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZko5V*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*rCuE)(1*Ddxn zb|o$+*yh(wdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%$k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|8l$Ajyv|FFt*G?|JYqbN9VZzB~Kr_3z)D{qon#m+=0Nf8K@X4?g}`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKYMS@6*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*#yzryVjH!ZGe z>`Gitu+6WU^fZePWw@UNyRo;)opok+sny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xv_x*OeU9Z=x)vD{d#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylalOuV=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201*t@%>@urmLsZe_C z$e>~gh}PKmxLjgcVw$4wqpqVMAixRWEx-<74bTC!05w1fFb2o~Vt^rl2S6kvdL0h9 zT4B>*QD7XSnvA%yk_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|^&b|e>1wTK#yy14u?|-_$xuU)xUv>AVC*Kp5Y4$p9 z!Ee9cC&~L4=U+d+^E&vK`QYO(-@Q8HAHMkLvxlEhP<{UC-#`BI%~zxbE*@W=|MBRD Gm;V8!F<|ci literal 0 HcmV?d00001 diff --git a/base/all-all/dig46.png b/base/all-all/dig046.png similarity index 84% rename from base/all-all/dig46.png rename to base/all-all/dig046.png index fee6a1fb6bbe548facef6e144d03118750eb4bad..bbf7a4bf52104ee7cd847c45bd0c620a2a9611b1 100644 GIT binary patch delta 57 zcmeyt@q=T7IrC&^=1-FYn7LUQg1@t?PPSxGkpIEY#IxfhZ-P(mdKI;Vst054b)vH$=8 delta 58 zcmeyt@q=T7IWr@}WJl)DlLMH!Skm|>oS$sTq9C8Z#K?B%37Y|@3j+@W!)H^^4gm%r N@O1TaS?83{1ONcO5I_I` diff --git a/base/all-all/dig047.png b/base/all-all/dig047.png new file mode 100644 index 0000000000000000000000000000000000000000..ceae7c9fdedd15b499f6609606aa25389f822d04 GIT binary patch literal 1154 zcmd^7F{|5F6h7&rRT}l7K~RONRD&8k2&zGY1`Q(B3(Bj?Q-}hhXi!0e2Mr2UKokw4 z)!-Bl8a$X*0Sz8B2`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZkl(q*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*%GuE)(1*Ddxn zb|o$+*yh(wdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%$k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|AO8btBxFkf literal 0 HcmV?d00001 diff --git a/base/all-all/dig048.png b/base/all-all/dig048.png new file mode 100644 index 0000000000000000000000000000000000000000..f47a2cb9b04e639312edd6ae259a0857ac100302 GIT binary patch literal 1155 zcmd^7F{`9j6h1Gz!QJ&egjkqF5(^0vun=NlVPO*A;(IYXmvupcg#n8xEDX3H!NMgL zLzu#1ib-O?VhRf(Q&>zfg~b*Y1DU`OhA@FCHZa8$Q*80lo!s~SMlSc<%RQX)osau{ zKR&xLFP?n(1OP6suP&dH`&|;$qX*=?{XY2{-~l}Q`o&Z76gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJM{U*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*rCuE)(1*Ddxn zb|o$+*yguQdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%&k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|VVL;e+(2P6507+11LFy1 ZCI-LP;tIMs|O~6tVyS delta 71 zcmZqWY~|cw&dkU#*^&A4>yJ7l8l( diff --git a/base/all-all/dig3.png b/base/all-all/dig050.png similarity index 83% rename from base/all-all/dig3.png rename to base/all-all/dig050.png index c0179a0ef34060e2715533d696c4edcb74b6d83e..392072991e8b5ebc1c140982d7f91bcaa1a1c204 100644 GIT binary patch delta 71 zcmZqUY~$Qu&OF(f`P1Y8W^Pu7;P33JlPy^kbbs(O@klp3us>YS*2c?|U^e66fd+x} a1O|qiazZoAtSX)|0D-5gpUXO@geCwXD;9YG delta 72 zcmZqUY~$Qu&dkU#*^&A4{6jN+rF_0;yn8Lsm8yLbAQ*7~41WxXIei#`)-n>Zu1h@xJ9zT0To&ra63}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFS+XH%;?yHakwIhoabzMtz!Y<9Hp0T@b81Z|SRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxW~6!>^s~panoW~ zSdr6zB+Q1%#jmY3eACUh>k8; zDzD3&BC(RloKC01;jrKD`@Y|9x9jz~>$=rywOB0Lwr!fGuIs9*rqk(UG8vD@d7fuk zmLy3OMPV2QLEw3w>$-rF7z{*FOfZU0!{OfdH?Fs`ow;dMx-n7p zTvlUA4#a`O3kJt23@g$!N3H5&QH|!)tS*vj6qQ*xNrQ3h<)NDfcH&!+YYZLTw^Y|q z99^#Rph%oNv=Uz*I*MmXwk8@1pJqW6yTj1-0@HCd(^hm-QuP61eC*xb(s)zK^HeB3 zc4Sbo1Vn4>dt5HDEHO>d_fgkT5D?%5@D^YPum)HGv;Z|g2`~o80Ahe4fCoS%BYGVU z*mc-6SQHq?=s2jV#6<*#Yyv|t2mtBM0YU)hcJ8sq-4eSJ+Z1OW78+*!yO=vh%znu1 ze0uFtZ){kYFgNaa;tsJzED%FP6H!EjT8B!7i3}r=m~&vryehIXPm>XMR?+}u01oEM|uk&vJ&fxje>pO0@{Qjp4oEz$M@>L)Hc=;_+nPzX} z41W9l6Ow#*b@A1+`@aVNFzDYkg2a&q7M8@b$bFZXcHcRud- z{rLRGynOh{LjbtEes=YO+#iylF3!n$`#Sjx;2fTR{qiY!3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@wiyrHqHCl>^Pksief(+?b37;$Ez^xgP`-grR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y+n*W+f1>lXVO zyAqcZZ1dYDJ+cI>TlXO-DqYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz+cDv1Hvs$hCzVEtju~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cjXU9Yp9xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL?%eItcw5TzR46@m zWKgjLL~GpbaJj^?#56_UM_orjK!6j#JAf^~3ZMgM0cwB}U<{A}!~jD84}eHU^g0}{ z@3CpHC@_xEaZpu>iwF$a1cqP`0MeZUgaFRn+~W?nOYBQ*Q=EBNXqfTuW9}F+`ysRS z>6J^pwP9hx+_>k7Tf`QzKnxL0L=h2c9V!(jGK@rG&VeEGs>sSbO-9^XNdu4pL;wze zBmpY}4;H4R71yw?po}1_!|>0)FTVmfgYRD4+;h9*_di|W+)|&CuX^z9vsXlAn!SrN z`1Q9(B>DLI>dTiGzXbm JKl$c|{{W;kVs-!k literal 0 HcmV?d00001 diff --git a/base/all-all/dig053.png b/base/all-all/dig053.png new file mode 100644 index 0000000000000000000000000000000000000000..41446d25185055a2a8198c3a94c60a1cf3e627c5 GIT binary patch literal 1156 zcmd^7F{`9j6h1FYaCgl^f&@1aVj*D)3rQ?2EM((bd@qLQvMxxlFkmr-g#iN+EL`}fFs^G)&>z&&{S`ST~_DR4B$P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{OD?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR@}g*f--`z4#PkHKK~5h48DGLeaG#V-~V)hb3=VZzUskOmtPQ-Y4$eG z;K!dHk>rP07muIce;NGCy!8(M0xmy!0pI`e>p#`mZ{M}=KZ4&se)r`s#(USK60V+H LU;O;(m*4&eFfnAs literal 0 HcmV?d00001 diff --git a/base/all-all/dig054.png b/base/all-all/dig054.png new file mode 100644 index 0000000000000000000000000000000000000000..b9ab818eb4b830c319ad7f3f9a8983b32d10d624 GIT binary patch literal 1155 zcmd^7F{`9j6h50JxV!E{f`v;YSV)+{!Vn7!3rTzr-&@0TS(iw#aKT~<3j+pZv2cmS zBursoiXkyzF@=SYDJ-U#!i6oS7?LTbn8Lsm8<=8>fh^>uJGt-uja=@zmwPzpJ0JJ^ zetdRqo;~{b5dfTBU7kND_lG2?2lvT&^D6lh;66P2>cs_l3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@wiyrG|l_j>^Pksief(+^=Z0|<8>IWf}r!frR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y-TU*UF%n-*6! zb|o$+*ycA)dYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WiwF$a1cqP`0MeZUgaFR%++&ZsC9X9tF}wP9hx+_>Y3JH!^TKnxL0L=h2c9V!(jGK@rG&VeEGs>sSbO-9^VNdu4pL;wze zBmpY}4;H4R6*sV{po}1_!|;#4&Yl9?gYTYS-*LO;_di|W+)$sAuX_0HDYke?b#mYP8@b$bFZXcHcRud- zegERxym<2N69BlldVcwm+;5Sf9-Wc%_Uq(NfHQdU>8oetDR4B$P?lvOBG21;NVmmaf~{_S`gU zU7u-MsVGxfE+lCzin$t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!xmu3N2Ei^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9aLGnVVLn8xvK} zWi^)MKpZ%{U~rtmup&)!)T%BP)o4D=>LRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%1*ic^fH6P@5CaSWJOCmY(d%%) zuEVCmqQE#t$3aykE+Q~w6BvR)07!QZ5CS-NbB{glme`fpra1Gk&@kiQ#N07r_Csdp z(`%Qyv0-7t+_>k7JH!^TKnxL0L=h2c9V!(jGK@rG&VeEGs>sSbO-9^XNdu4pL;wze zBmpY}4;H4R6*sV{po}1_!|;#4FFpZy0AIblzUOww?|-_$xuxDGU-kIQ=bsUkY4$E2 zz)wFvCCT@$EG6qgGx1M&>&j9p!cfs6rzAA8dT8WL4yh^h@wFu z8cgw^!GlRuP{D%+L0!<`!GnejE*N5n2NM+Vkb(yf9x}Yr<@CPyH+s3}Uhd(Z?|hu^ z`}N6{d3OKH`v7oud2#-f+@F%5?%gHl^)JbLfV=SI`)7~IQ{ZThp)AWnM4snamZfQ$ zq9|DvM2X=9is8W4BvTP}iO0p_x@kVnX2v9IwN06$G8*Q65D(6lDXL00saa_xNFp{R+2B+_bo= zu`6*o!8X5c($g$Hl;M67?8e?Ech;HRrB)l8O=QeMy$rO%S4XarIdWo4p*ipk(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-J&R;#Y-7K=sOwoTL2bzN1}bUK|(Cgbrq&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|Rauq?gMlcD2}aRrINbaG#`QYenVVLn8xvK} zWi^)MKpZ%{U~rtmup&)!R96>^YBZl_b&*t~sLaAi8jNEv58X7d6W@wlW9aCY zYK2XMMS*dQj)SU7Ttr~VCNKnp0Fde&AOvu3`W}1SEpb(1o8rvFLc@&z7<0#n*$rkmMkzphfa}ErdS4CFlY0~1>N*aI+AOdgz zBnemXzFLzyIk1=bCy%M)lcG7e5e{Y4#@W zz^mULk|ck5{>`&{FN1%WPd?|L!^PLnAAIrE?|-5~X7~2(gMS~M{(48g!R6zt^FO}* G@x_1d1!NWg literal 0 HcmV?d00001 diff --git a/base/all-all/dig057.png b/base/all-all/dig057.png new file mode 100644 index 0000000000000000000000000000000000000000..9ad77692ef57e20897512e6432d782d3a61b30e5 GIT binary patch literal 1154 zcmd^7F{`9j6h1FYaI@xNHWr2$u#jX53m>ttu#m*J_+AXpWnGY9VL-wZ76uGRuyBdR z>@tPL6hmUbVhRf(Q&>zf#S}}h7|0Y;Ou)bt8<=8>DYkei0w?#qzmdy5_i_*CeCOkS z->auL=J}(K9|6Gm_0{Dwa=%N0dia2xw?8I-0X%@GUq63Bo&ra63}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFS+Xw@veQHakwIhoabzMtz!Y<9Hp0T@b81Z|SRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxW_kJ>^s~panoW~ zSdr6zB+Q1%#jmY3eACUh>k8; zDzD3&BC(RloKC01;jrKD`@Y|9x9jz~>$=rywOB0Lwr!fGuIs9*rqk(UG8vD@d7fuk zmLy3OMPV2QLEw3w>$-rF7z{*FOfZU0!{OfdH?Fs`ow;dMx-n7p zTvlUA4#a`O3kJt23@g$!N3H5&QH|!)tS*vj6qQ*xNrQ3h<)NDfcH&!+YYZLTw^Y|q z99^#Rph%oNv=Uz*I*MmXwk8@1pJqW6yTj1-0@HCd(^hm-QuP61eC*xb(s*6U^HeB3 zc4Sbo1Vn4>dt5HDEHO>d_fgkT5D?%5@CIN9um)HGv;Z|g2`~o80Ahe4fCoS%BYGVU z*mc-6SQHq?=s2jV#6<*#Yyv|t2mtBM0YU)hZtk(i-4eSJ+Z1OW78+*!+n75>%znu1 ze0uFtuWeYEFgNab;tsJzED%FP6H!EjT8B!7i3}r=m~&vryehIXPm>Y%R?+}u01oEM|@AIz!&ftegTe~DWM4fTr3kH delta 61 zcmey(@tb3VIWr@}WJl)DlLMH!Skm|>oS$sTqM($(#KbP0l+XkKHt!L7 diff --git a/base/all-all/dig059.png b/base/all-all/dig059.png new file mode 100644 index 0000000000000000000000000000000000000000..b6a43732e234d98c5f735026cb13bf72879a4ff5 GIT binary patch literal 1150 zcmd^7F{`9j6h50r@MX=z!onr8v5+u@g#jTJ7LxcD_pRZ%tP2t>3|LrL7-B$z0h1UQ z!W0%$3|SW}rmz^230O=q#S~ju49OHjn8Ji9HZa8$Q*7X+JGt-uja=@zmwPzpJ0JJ^ zetdduUfh50J^)-?J-&QK?zc%$=V#=+`8xd*;0&IA`uq`j3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@wiyr%w}(<)8k}vD9inD*k{=`N!C%+1;NVmmaf~{_S`fZ zU7u=Nr6?0wE+uIsiiIHLJfCu0!m<&=gf#6_lt)nxMcDu*fB}HVJ-*&z-{E$Nn-;qU zR~0VD*cLal>@-adRkR-myOFmkoON!mGOJC@S!_%ry$ZC_SBI{WJ927EkvZ@U(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-JAUAJ1T7K=sOwzJu+X_~sOCzHu|JRXfkMN#B= zo~CIW$59joLEw3w>$-rF7z{*FOfim6VYv7Gjq9y!XKq@xZj4pE zkkv$z199N+g28bL!-_P`QLCn0)Wi8CZ_2bD##J7TvtX2XMdW6Io%&Yn8lj{6mg*Xc zqsw&>l&MohR_g1aqj;udYoej>SsuiR8%DMln2xKNwxXMost*v8WAE;k#;Z!6XF}z% zLxV~rAX;PJ<8p~rg;|EakGhV6fB+|e*8n?!HNXm>1!w>&fDu3rkN|`L9srSy=yf_cYf z(`%P{Wy8XRxpBu6cZe-wi5MZ8h$131I@BtRWf+RYoC8DVRgsl>nvA%!k_I3HhyWY_ zNdnde9xTjAD{f#@Llr~RMA7emUpxW02VXtAzTmyPFSC6hQfBEF| G@BahTD`OY{ literal 0 HcmV?d00001 diff --git a/base/all-all/dig060.png b/base/all-all/dig060.png new file mode 100644 index 0000000000000000000000000000000000000000..78d7a999db5a0b6dec7804264944ca7677c61a78 GIT binary patch literal 1158 zcmd^7F{|WM6h3bk$-428B1IM>LIP zijq}9lo(E+7!GVrG8Ivmcw8)Qn&!=HcAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1bBYJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+Jyej2+DwG~O zGN@PrqBZtCE|*xAn5O9asOu;Q2yg;;4X^`P19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfTffgu6 zdhJrLY*?5uH|}`i4zWcn5JN;0QAC7Vhf0Ns3?q@4b7084DzY+9lM#1T(g0)t5r6|A zMZn6ygM}$+#SLsKC?g2#F#PME^G^WI;M-@{cie9I{Z9`#H`E7YRd0WN`8iRUW^eNh ze*NtcDZYPo@zL`KzXbm>_uhH@$JxbKFW~3L_bxyD62{8+fBx_YzA4}PEdSyq@dm)v Mlk1D$KYsD!f6QTI1poj5 literal 0 HcmV?d00001 diff --git a/base/all-all/dig061.png b/base/all-all/dig061.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee053c5d8c07b73e58dcd52535aee97dcba947e GIT binary patch literal 1151 zcmd^7F{`9j6h50raP!Q=fQ89g7?3c9g@q6c3)%H8?u+61SQjJ+F~MRA3quS@un<x0V#pdWFolJX30O=qg~cnT7|0Y;Oku(l8<=8>DYkg&PVReuBbR&bo8L9*X%-*Ka6bulV{el?>&)&_tBuVjGG?J(23p~(BUi~BIkBbC9QcOl=z^v4 zy38pOD~ZhMbUGXk`~AM}`|WnSUawcHRo8Wk#iDK7rfKTBuBvJ}olYi`@pzo)d6s2K zl0;DyhG7r{p69u)YumPInucL$nx?9%EX#wzKorFUqv$jo?tOpbdY$deO{>z4iK^$a z8cT8@4jf)EI8I?$k)}DStBXZ7noqO3NUBj(X5l0a#<7=&ZW`E$Z$+*#badZRT|;qn zxypkgaq`ege0}IBo+;UyXefM|1ySq{L)!~X$JI<*(M?I!2Z-^pcXvzUwv^|oPu|4psErV5g4)w48b4(q&o))0i64}#~yb}T$R|SIPXH?XOoj3BJT@XvoPz5sXxKfJtt;C9dNf4acAqdp^F^}%;9z9K5q?0r0f zH@|*NlAl~%K7IB0m*8LKy$^4`zy0ar)6dU7`t6UW0N?if`QNv*uSpSHJ-@#E{nS+v$DpZ}f7{z1+h&-}$)T z_wxG6>^=PWAprC)pI$s8_xmKM`}fFs^JDTiz&*JB`uP*`6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKna$o!r^m_UP!#*&aF?c=I9`Qe7X+>6EnT;r_0mio!4qg23}U*L7{%Hcito3{BHiRh4DA-|vf}m|zs027|rtuU)UTow;dMx-nMu zTvlUA4#d903kJt23@g$!N40gasD|@NRu@S%jLIw=r@<)p^3Y8KJMpc^H3p9ETdHd) zjxJYuP$W(sT8Xa@9K|ywTN4e1PqQG3-9c!3f$6xKX)C%Zsd^tVKJMJ@(s*6U^HeB3 zc4$zs1Vn4x?Qprovcxn+-$z|XK|p{Lz*~SVzzU!RXaH(}5?}<70mJ|U01tpjM)W!y zu$d14iEx3w{wp>+%B;zu}N|2VWDBhzl*tJ#Ow#m z)~8o4_1cDo33KC)CvFiN!~!uyG!aEasCB4R7|Spei8=d*%&Q_R^E4T8XC)0l1`q)_ z0Fnf(3_Mtvl2%;9x`Hx-unxmF|Mb2BID;RaUEOiJ<@Y~b;M`E3lCOI3{nKxW$~1c$ zXYlK9k4f_U^5To<_g@A7GVeV?^{2~UdgmWroc+~%bpGOlKR&zu2qOICo9&-(J}0$s N`Q+;2_bW@(cUSG3KdGC<5VcYg$e~!s8As;+C{t3u{ur%;!vT03Kt3}pnwP} zbayIDa3P2blPDm93l)aAP~pOb4z5t)5Emx6aKOa{T)1$t#io0i-M^7x-VF12?|UEf zeLp_CGEX0V_7DJ0FE7rXllwyw)X9Bv-u#gK4R9ZxJ$-Rbo&ra63}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFYi!H`D3$WO5jf_eHTA47O>yj^kw*c0tg3-okYo+n$+b zt?Ls_D-~rd%Y`HjMKKqIjOP=Mi&-{gm_AMW6y;HrLs2$>319%=VTbS6xb1Mgz*U1? zjctjG5jOeFG(Aq@eHrdX!Di^Ka%Y*@ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW+ith(^?JEnc3s!D?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{>t@Q+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p7?G_gcEK5vN^nKKI6a)k~0=x&<04xDofCiujC;^5589)rs2k-!hWJIt1 z9=i^wQ!EOMV{{x;RpKH7LpFgS7zBWH=Kvvqb36C2#mxe{5}On!9u^vA{B_J7B4*cT zHa@*{sdqNaO_&*XJaL2AAQp%rqKPOXLajrk!bpaJNX*$YWL_0nnWxE!J1c1bGJpuc z0gxnMW#Hbzl(gasRuz;HgmoDH`OoRs0Qcbg=T~>!Zu$LB7dSW67v!rRe0TAZs7$lB zaSwj^^%IhOe0lcd#mUdXzsv_8qxvoU#J@dx`sJ(h*PmZJ`r{*b`PZWdpI&c%Bb9J@ Mes%WySKqw(4co;2{MM9z0}t-A?a&f1{Us?&TiN`Oe4v zzVDx28fUlf-UfiPi^u2B$o(D(>hy%1S6|0}1DwFqPoF;`PoAaO9%Y&)B61wZFbqx8 z6h%o2FNi&sr+O?{s%Xf9CUQ8RU)A-y>GUv}?DKp#9Ck^viK0~yEPcOq-G$>cmNhes zO4FvQTFCN5l5$ZT2|~v6DaXYu8!=4K>kVkyqbQf6Y>Kh~3;-Pf4?BFj!ETA01+E)h zR@fG}7-N%N)yZ)h?TcVH_O~NHmS5;M(<9Ivyi++zfqW~sKy=jCuVNvk|AhhdQh(L`CZ(Mu*PXF7!8rG)wrx zWrjKxi9oc*uEWIwivp7bJr6Yvc^(0d0B-@d04snNpaG}=3V;zn3J?Jd09*hf8PRLM z$K?|18uJ{Z2yGh`g}8{okWF9+1_2=589)GFU(Y>sxLx3~z$U?|i@Ay^_by@&VQ)9+ zZ9RJBP;V@l8!*#vc;XhZLCg^YL<3Pkgi3=_fw2Tbfta(eOPnGw5=WB}H&#*sBme<` z1t3YlQpdfC32DVOtV<|D2&y3X{hzZZ0Jq?)XO}nJuKE2>7uZ+S1M*exfBE<`qB6}~ z$1V8j)dwVb@8bNE=chk@_}%L>fYa<>y!-JlA3Zre`QqMR-~9aBxA?=I`!4&(i|MOB QNikeJx;+2&;pZ>^1A(h&sQ>@~ literal 0 HcmV?d00001 diff --git a/base/all-all/dig065.png b/base/all-all/dig065.png new file mode 100644 index 0000000000000000000000000000000000000000..ee3279b4ed2a29ba52948d8fd6bdc8a34515bdbf GIT binary patch literal 1157 zcmd^9F{`9j6h50JakK8jWGxJ_u#hl?g&`Ie7LxcD-;3e7JQpNb7_gYa!hiu;EZoFm zSf;R;Vn_@an1F?lDGW?8g@G+B1~SDI6PUmhyD-HBrr6@8JGt-uja=@zmwP$qJ0JJ^ zxG$exnP(3_eh2_(mlx;PWPg_g_252PZ=NTA1KfwFUp;$5jsiz>3}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFS+XH%;?)HakwIhoabzM!PiK#PKQ&`yl8%Z|SRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxX0HU-1WFw;=0AY z#;(NW1l#3Umdwh=E#XHh33FFL`N4a zmDgoXkyuG&PN&o1aMRb^Qo3+XKq@RZcJ1? zm(^I3199N+g28bL!-_P`QC(dus?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)d_fgkT5D?%5@ETwXumb1+T7Vj$1Q-Kk05QN2zylzX5xouv z?0ak)EDDTcbR1Mw;vxb=CV?Rs1b|fM03m>L+xNJ`?GpPE+Z1OW78+*!+n75>%znsh zeR}0muWVSDFgNaa;uf(*ED%FP6H!EjT8B!7i3}r=m~&vryehIXPm>mRR?+}u01myQi^L>S5QU})?xVPo3k$g?!kB0S9jcQ`Tb7^I5*TMmX{pb4fSCR^s NPp-~?`{J7){sWcaW!nG% literal 0 HcmV?d00001 diff --git a/base/all-all/dig066.png b/base/all-all/dig066.png new file mode 100644 index 0000000000000000000000000000000000000000..2c0063341a5478900caf54b2e48d156689437a1a GIT binary patch literal 1157 zcmd^9F^l6y6n>lK(B_my0Tl{SAvh6Ss8B!<6)KdR_Rww=R>$c;1Ql8k#DxM1=s*M& z3a7#Z2SjjT5(QMaP+>S1Djaa3;tCb!;=+Xs2V7jhg$ox4*+7by+5Ht7MLx*ivZrd_#0} z!BTl$<`jvQMCN!r?)UrMZnxcT*X#9ix$L^GZQJ>L-Zag0I<4!vs;cpLJQ|IL!(pE1 zS(YV95=BuMhCvW`p69x*ZQG`48it{1nyRX@EcbdnQ4|x5qGP|m^Zk|UwYD=etx7jW zs-DYgEXje`b9lkvIE7(Fn&zmsF6Px>HqPoIsRmJ*g`+eW#$Fz}X<#S56}d*=(S1vG z4aL#rDi4ap$wMpg^}eHcretfPq3~%IM6ufsZ7(n#S2JxzHzif?A;yQTyIB~oOL>+G zrN<5oDwcp~joU3Q7Fd>;rs(^q>nI2aa0GY@umM;Cv;Yl24Nw9M0WyFXpby{y5Xp#M z`#p9YPN!HD7{};1sH((81cpokLof&csm=jH0OzjnVT+pub|p3`PCP6$%=mXPcZir> zpV|2I(xqP8FgIal-1Ec@VuM&9hKMGjhzPX~l?o#n1|l(M&yaalWM!TvE$*$P0muL% z00%%W0V@Od7N(>WSFoy}j3BJT@Q=UFzXUje7tgNmx!v*mpAK+tsZYpLz5m_i*F#NJ>DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%5%=i)Pf2k`atn|p3|{Qjp4oLlN+@>TDBb@c^NnP%_e z0sQ#WW0L&n`ts8k=RX8*nRnjjU&7TVFaLb_@VE1`C;#eKkKyh2ALPIM@%zuD5U!uz LT>kpx%WwY!tafB2 literal 0 HcmV?d00001 diff --git a/base/all-all/dig068.png b/base/all-all/dig068.png new file mode 100644 index 0000000000000000000000000000000000000000..11e09049b215b5be42e877e44ca92d0a0fa3d666 GIT binary patch literal 1159 zcmd^7F{|5F6h7&rD2?7jr79>?g9xH{&>*O2HE2*1y`a1*JcTGAiUt)_@SqYER1igj zpc+i^Ac_Z*sGz}v20=Y&@Zdp11`nq7V2TG9JS5=3gNF?6c6#6Y8@=3fF89Fs&d2$_ zU!Pr@7xzB92LKmWPcEO6_d^oY-7}I;KPUeHoWZlFFCLSxz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkF(jSY2HsJhw*q{6uZG-o2KhHUWVZ!2s+Q3yKZaSQ`4+< zeWGclqKsv^kffm~=7Ny%e8O=t%Z3cor)i&}Jc@EC$_6k23;;ar@a-D63tZ1})#9SY zuEhBW+x*m|$4R^|!`&#@482wEEHk@Htu{8B$e4tB8EA#C4qPR3oTWEtRynW<8i;=?{>TGcDr7$m&@g1vFN&PHk-9=+cZsG*Hu-G$K%mxG#n1|JkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1Vit>xrV6U=$tu{hjZxT(7g8scBWZF;ewh zR%1yH#GbA0F{E4nGEdJi!^Y~9V=cvH&LR46@m zU{J9HL~Gn`aX!bg#56_UM_orjK!78_TYwF~5}*TU0cwB}UrkmMl3^ecbM_3GS4CFlX)@y0N*aI+AOdgz zqzG6UxVJDRt+;|!1!V+b9fp6syZ8p+4*c}|`j*=bzyIk0=R|!@R`t=3PrfB8)9g*$ zf!Dv^C&dR>mk(dueHHx6d~nWx^#lBNe$IdWF8lcG(M$N`93S3?)Ayf#`Nf}qldS_> NJ-)vD^Pksief(+^=Z0|<8>IWf}r!frR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y=UU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WA{FedxcvMjyngiU&F`4MI(z4`|9tfK&wr3IxO#GZ@#f2K Ge*6yygk<0V literal 0 HcmV?d00001 diff --git a/base/all-all/dig070.png b/base/all-all/dig070.png new file mode 100644 index 0000000000000000000000000000000000000000..7d33d264833d2ac4c769a066c176d76813c0a72e GIT binary patch literal 1155 zcmd^7F{`9j6h50JxNptFfDl6@SV)+{LWqThg(SYk_hNW1>w*Le6D+2%Fu{N<7A~=v zU8XQF#gG`Vn8HHH1T3bQ!r~QE3}gsXOkrS(4NPDHQ*80lo!s~SMlSc<%RQX)osau{ zub*C<=Z`;n3;^d>mlw~-{VoaW(L-|HzDWKAcnD9weEx(y1&-zz%Cam(IP zijq}9lo(E+7!GVrG8Ivmcw8)Qo969ocAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1dYDJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+J+?4V>6-tjC z8B{C*(Hi?6mrE>5OjGoI)O8dD1ULb_0oVbo0Xl#dpav)b#sC>W3@`-n0ElEnufqXX zD{LAp3XEfP98^`}A_7A;fgu6 zdhJp-HY`k-8}~eMhu9((h#{hhC?Z0wL#4t*hLK3jIWS~i6*rtp@E^DrWTgNA literal 0 HcmV?d00001 diff --git a/base/all-all/dig071.png b/base/all-all/dig071.png new file mode 100644 index 0000000000000000000000000000000000000000..356006459ef400617918256fac54eb0c7cc37940 GIT binary patch literal 1159 zcmd^7F{|5F6h3L_(`(d+;Av2a22n)upg~X#8Z?MTFX+9hJcTGAiYN-zph1HQDu|*% zAsS5ZpnwNARY8LX4Tid)!Gi}CGI%i5g9lSw@Q{KB4<0hSK!?-&-rwluo_o26bH4L& zzwgzPYxC^E!v_Fxc6E92l-wVapib|T^X8}YZ-D#o>}E1~KOP@OqkUQK`u%N|t&?OKMT;QlJa6v0t!+-BoMTrL)iuIpyAS=+Xg$)stTx~@l~(Qr5%3t-?@-zDUg3Gh|*BS(&HFh&wB305X6G zzyXjXU~S;u!i==y3RX2#F+@!i{rS(?*8un6$EVkK+-~{(PZu~h)EDHdKKbGDTcR?} z-o`!n<=4+h^7E^Uub!R02|h3%eagRp%P(L2adL9{ul|}o51)Tv&QDx*UJT5kq9!`!M;0>xfv2mV%Q~loCIEQ*7j*yt delta 75 zcmeC=?Bv{F&dkU#*^&A4SI#F}Csg_((UXFkfb4YvXlbP+7>K ea_9&{2ou8=1CHpmS*)iSfWXt$&t;ucLK6TBDHO2) diff --git a/base/all-all/dig073.png b/base/all-all/dig073.png new file mode 100644 index 0000000000000000000000000000000000000000..8c92fab022858d6592e8c98515e1f63a6ad85a81 GIT binary patch literal 1157 zcmd^9F{|5F6h5gbN~1h9Xi!^0HK@gd1`UF0(4aJWL3veq3Q<4=4GL)Rpn?i2h@e5V zf|%k#g9p>9puvL%K|N^j;K4%%4W{+r!37lzO~Hc)4;fy!)BE1v=;fY!xtDXk^KrkA z`_r>)^Wwp$4*=le>gnZkvVTZ|x<4T6&FkbZfB`)F=EW0o6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HjWX`1)*`Dr#g7R6ya?$dM^$D1(hf?(}=E7xspdtsWj zuFo~CRFs)47m_p)#as|Fo=-R~X4#NoMl|hHlt)nxMcDu*fB}G~1HRi~-{EeB+ZMYT z*Cno|*ycA)dY;F}GCWL!{lwem&L*?hsny126B+YRF9WUc)v>E&j-1$1XbyctbacT| zd0pldiIqg=d_EtK$HU>!_x*0S+iW&n*R9v<<#O4!ZPPS$T~}2#o6V-v>0~m=^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH%9a43pmf>CrHjSjxQb-lIiEKIA?jj5{V zvKmWrAPyZ~FgQ+OSdpeVYF!u0YP^_bb&*u#sLaA?8cbp@58X7d6W@wlW8~<*rMiaV z=yH_@MdIY4mH7I|Q9M(!HPKM`Gz+5G9fh_Rn2xKNwxXMost*z4Q}6Cq#@kX}q(bSj zV}pt%AX;PJ<7$OviD`lCd_lPZGffyp1h$14?I#eo5Wf+UZoI^wARgsl>nzXpHk_I3HhyWY_ zxdf~XJX)BNQryC}f--`z4#PkGx%e939(@1&`i|QzzyIj~=Z5-%Jk>|vJ$*@3rrF!L z2fzIK@$DyZb@|nc`#%T&G9Nrd_1iz;bBta+5`Xyn;iE4Hg8{tsKlx02D@sPo#%jtdZZ}f7`z1#!mJ0Iu! zUOl@s&+b3G4*+KuPtTu|_YO(w?rn0PUM7D6+=gf0zIZ~u0!MQUWmy&?@;uM7EKSoC zMaillN(?7Z3y{8FaYqd!}n|4E^s}^Rf~%n zyAtOkZ1Yo-9w+g>40oeoGxS!uv&`%+wc6NhB4ZNjWuO(lI&hWDkrP`A&7NCtr_jkU(a=p%WrlwWt#z@t3 zS&bz*5PJ?U7#ycCtVq)w)z!tU8cfGoT_n{YDzk8u2E*9PLpKfV#J3{X=sUV^sji_o zx?JT!kvMs1CBEKw6wj1wO*9lf&4MU)`=RXxrsHa+t>~tt>OI8xuyr?c<6S9FQ=#+BnVTkzBK%NuUj{Qjp0oD=nktm@v6ProB7)9iKL zf;Vp;kmBbT=U>0L`})z(znuYmboCED)PH&NaI7$LGLB7|j%6hTv@ND(z}$vz`5%Vr@+kO(P8h!`P4kQBiU zILII=rWiCriYZb=oFc^(Q%v!S6ax-2#S{^ySaHB92HfH`!tuWMH@w_)FZXcHcRud- zegE{*JbUo)0RWs`JUM?x?$=0A_wJJO`kUkrfV=SYv9IwN$3xbvBEnT;@?YU{z zx<1piQc*Q65D(6lDXL00saa_xN&)eTUm6Zd&YW zT$Q+-V4Ghz>1h@p%5Xmkc4KdoJL}9|rB)l8O=QeMy$rO%S4XarIdWo4p*ipk(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-JAUAJ1T7K=sOwoTL2bzN1}bUK|(Cgbrq&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|Rauq?gMlcD2}aRrINbaG#`RXVGdHbDHzul{ z%W5pifjDq@!QeQBVMUtes8wAos?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)yR7p<%|qin(LN?1#+G zr`IlZWy8XRxpB)AcZe-wffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%$k_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|YhC!Y|NY4#@W zz)wHFO_J|ioPY5A-j9#I`}RJ->o5Mrhx!*kym$W3)#snSzf1pq>y6Xz>|byG^6r`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJPJ9*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ>G1wU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WF19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfUy0z)te0IALaLICHk@3F_-5?3X*Db74BG|c$-F?WoZ{gB!D z^xCD~*|0ESZrt<49b$`EAclx0qKF8!4wVWM8Ac*8=fIG8Rb*wJCN1u*qyfkPA^-i=U)LlfH$wM@44Oa`=2gwZmG}7s2+d+{A;2z&ECZW z`1Q9>Nb=(9@{8AxehL0zKKPh_`q|k>k00X2zY3Y$w>KBx&ENj;H~9ot&#o_j|MHuk F{saDWVXOcE literal 0 HcmV?d00001 diff --git a/base/all-all/dig077.png b/base/all-all/dig077.png new file mode 100644 index 0000000000000000000000000000000000000000..e7a05cec6ae689e2a2bd30e60438b5a03341303e GIT binary patch literal 1157 zcmd^9F{|WM6h6;YvTl5)2ofJpF3<@J32dNw;wr-!2GN24xHcX7N4!*vj}p0{${#;Xk<6@Q#8D>b+K1F#Ho{jKY@wzDv;N;f8| zp37=1$$>aU?;v6xyI1ZeM@x> z#nI&|4~oReLo4z1p`&=FWNV_K@M#uAu{#WHFEAZfGi^mTB~>3F#>dXxuZ)+ayhw%8 zV@C!ROF*>7uEW&|%M#NReIIol1pxt00IvY{02_c7paG}>N`Nsy1`q=b0XzUA8PV%- z!1WsEb1VvsV{{x;RpKH7LneVC7zBV+=KvvqbJO?O;eLhd5}Oof9u^vA{Og!IMod3s z_CCFFsh2h^O;{MWJaLcMAQp%rqKPOXLajrk!bFCVNX$7fWL_0nnWssMTPtY*GJpuc z0gy|;%D{t#DJjJ*Y%3@u2cm_mlb8m-k63 OTt2+I`1QfpKl}%*gk^02 literal 0 HcmV?d00001 diff --git a/base/all-all/dign.png b/base/all-all/dig078.png similarity index 83% rename from base/all-all/dign.png rename to base/all-all/dig078.png index 519a9ea3e1483b130bb51eb16c0d2e6e04410de0..dfa03748e8b308ee63a4ea68e9092b94250f54f3 100644 GIT binary patch delta 75 zcmeC=?Bv{F&OF(f`P1Y8W^Pu7;P33JlPy`~4OLHVz2S fK|xTBZGjNO#RHtXZ7dFSG5~?6tDnm{r-UW|RY(@Q diff --git a/base/all-all/dig079.png b/base/all-all/dig079.png new file mode 100644 index 0000000000000000000000000000000000000000..f47a2cb9b04e639312edd6ae259a0857ac100302 GIT binary patch literal 1155 zcmd^7F{`9j6h1Gz!QJ&egjkqF5(^0vun=NlVPO*A;(IYXmvupcg#n8xEDX3H!NMgL zLzu#1ib-O?VhRf(Q&>zfg~b*Y1DU`OhA@FCHZa8$Q*80lo!s~SMlSc<%RQX)osau{ zKR&xLFP?n(1OP6suP&dH`&|;$qX*=?{XY2{-~l}Q`o&Z76gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJM{U*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*rCuE)(1*Ddxn zb|o$+*yguQdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%&k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|*M+8Z?MhFX+80JcTGAiUt)lc+jAL3ZiJx zqbitUf(8$!RY8LXK?L=n!Gi}688jH`!37U4cu2v6DIPMsLWk4)-rwluo_o26bH4L& zzwf7K7v{LEXJW&a3Z}KLPH*v!^efkf*@W979=_g@`=Qvn)%~ zG(}OeDu@!p2^7PDtx2XL>JpE$*;UiLn@kSl@xCZ_gTXdU*KxcI!!8IGo;P>h*0!gn zS?l^l(@I4d%W@$}Ls85HA>;Xk<6@Q#8KzIuK1F#H`b=)R@8 zhT`aQl?O%Q)EDHd?!7$whNw)l z*KrGe`SoLx{Pg_v@r%1Z2mdg)AMlrO_T}XV?_YlM;Ij`u|5rG@4S)Rj(W6&SU;j-i O;rz+P>2F_s`@?_UWMX>& literal 0 HcmV?d00001 diff --git a/base/all-all/dig081.png b/base/all-all/dig081.png new file mode 100644 index 0000000000000000000000000000000000000000..79edd96eff57551033722107e8767d188373d42b GIT binary patch literal 1156 zcmd^7F{|5F82w&CpVBA~m1m7I;6Z~53W%aX zp&Cr^AczO2RY8LX4Td_P!4wY~GH7tA3m!bU;2{MM9z0}t?ez7&_cwaE-@V)q&iM}a zoR?3o%(MHS-UooQ%Zu};=~0#^-o zHMS)#M%d)n)ATrr_hq;n1)HI_%AI9qx2e^{<}@-Upzppw)6SCX`1PDTGw?|Rpaq^G#U+u!#vNk zEK8CkilQ(KgCOuc&vjkfwoTJC3`5g2RaIqK?)7@2C?*(1$9{k3`zzOLZD(d$m2Qkw zJ(ty3k^`~l@Pff{3d4#t%~5S#%&Wm{oYh5A4Wcp&M`@B{nHeJS;TK`1dh)h?rfU z+4%I*rQX^wH(_Sn>ckCVgIFMjh$fTahYas z>I8oND)b^To&izIgrW1`d~x Mug-t{>boER1OB;VQ2+n{ literal 0 HcmV?d00001 diff --git a/base/all-all/dig082.png b/base/all-all/dig082.png new file mode 100644 index 0000000000000000000000000000000000000000..35a8e18aeaab414af70e9dec16fd31c0b573f4c5 GIT binary patch literal 1158 zcmd^7F^l6y6n>W_XmiRUhyn^xp@0Z3RHzU{g$i9xd+0U_tL1c{1Ql8k#DxM1=s+YY zbVP*-E<|u)5(PvsM1>(PRJd@V;tCgrxNzY@0T-9x!i6DMINi(a{*4UtW|+r&-}{*F z`{Cx=ymIP zijq}9lo(E+7!GVrG8Ivmc%08q)9IVZjsxK zwk0k`*yN{adYr`jGTe=V?a*82&MLFp)M{dL8X1#NF9WUc)q$&Ij-1$1X!d+VbacT| zd0pldiIqg=cs%a+``vEWb=_vOS*=#f<+5$t`F!3q&2&1g>$<9{@pwEMjfTTvp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRHIQJICKG#JKS9=d5@C%zTAM&HqWOLYy! z(d8-+ip0r7EAjQdqj;udYoej>X%LH}}xtc7e+hn-nJ=78+*!o0vO9%&yOD zeR}0muWXo`Ff;CX;uf(%ED%FP6H!EjT8B!7kqiTon6qcdyehIXPm>Y%R?+}u01oEM|uZzzB9>9xd*Z17+`29~8I4A03@>TDA^YlxiGR@w_ z1Nixu4@mN(tIJQHpZ^s6%e?h2|H;?zJhqTAb-zv82R^s}4y;3U2O_ZQ!t|3+%z N>dE!x?~iZ4{}1Q(WfuSd literal 0 HcmV?d00001 diff --git a/base/all-all/dig083.png b/base/all-all/dig083.png new file mode 100644 index 0000000000000000000000000000000000000000..41446d25185055a2a8198c3a94c60a1cf3e627c5 GIT binary patch literal 1156 zcmd^7F{`9j6h1FYaCgl^f&@1aVj*D)3rQ?2EM((bd@qLQvMxxlFkmr-g#iN+EL`}fFs^G)&>z&&{S`ST~_DR4B$P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{OD?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR@}g*f--`z4#PkHKK~5h48DGLeaG#V-~V)hb3=VZzUskOmtPQ-Y4$eG z;K!dHk>rP07muIce;NGCy!8(M0xmy!0pI`e>p#`mZ{M}=KZ4&se)r`s#(USK60V+H LU;O;(m*4&eFfnAs literal 0 HcmV?d00001 diff --git a/base/all-all/dig084.png b/base/all-all/dig084.png new file mode 100644 index 0000000000000000000000000000000000000000..4911d08dfa95e995665711b531040844777ddc71 GIT binary patch literal 1156 zcmd^7F{|5F6h6tLD2@8iph0Z~6+{#df{LO+gP-gYQ9*+T4Tid)!Gi}48C)>bg9i^PxR8Pe4<0hSY^V3VztPJ*_i_*CeCOkS z->=Uu%+vdy-v@xx^T%hGq4vGC7RL`=Zzl23?wN;&>H?%OGeyZ{fO)ZO=@z z*7b>|m5MT!Rp#`6is#Vi{#OrNHGit;GRp(q=`1TX;bu)}v7?3TD$;JU$O zjctjG5jOetG(Aq@eHrdX!FK4ab7z&=ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW>$+~U*{oKp<#O4!?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{@V3g+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p*sOB_LX3*WqG;Wr=BuzK^<&f`9-=fOh~}fE7Rs&;Zl`CBP6M1Be0o03HC5jOexB z<8q19DHa9BF***aDsd5kA)CMu3<5y9bAS-QxtV+DaJ#@|iA{Y$SAYKT4XK3l MM;B+me|z=vKQ*0XwEzGB literal 0 HcmV?d00001 diff --git a/base/all-all/dig085.png b/base/all-all/dig085.png new file mode 100644 index 0000000000000000000000000000000000000000..8494216a9545abe102354bcced9d4c58066c27ee GIT binary patch literal 1157 zcmd^9F^l6y6n@KcXmiTqLIE8SoC*$dr2r3j%;X;K13W%V9 z;8d94LWK*HC?Gf&DhzQzg$oyg+kgtgxo}~E0xmYeg$oC+SV)nV+5HctQ3DB&f4fvfh3d{{e6c&%b#2lpJ}MW_y%rnuy489K$d) zO;Z#lDZC)|Sf1*!V5y=Z3!2E`VsSg0y_-%ClgU2Mcf(8jKTv6uDX8B)%1UX6WbxTk}lC z(Pdkc%FNGWI}6O%(+0Ne8lt5Ny38f1A4bj~uw37;9o4X8%@7r>j~E>~XS>v|3u&J4 zh06?eDiVQcja`S!B^CuH33?uC8uB~>906_swg4-D2A~G001AK+Knf563;qX=yq6@|Enz>rB`2nGQl)fqqlVBhsUbhuq&TVS2w)WuxIlzSJkhp@LB z^tK+oa;R$y76#1qd!D#OtPyj>0MS4c5TVkbRA4N@P$1^)>k_93jKtBT#l4kO00}?< zU;)S_V5#HY#DtXM8rCHgAp}(ry#4e1bAS{0_Qlmbw>y6S(*gD^^$~fh_r7`d6;YXH z?&1V~`uWk_Cvkc4+JFC-yi*Z`pJW{=7UfF{{BWG Psc`x9>f)ErzJB!|(dlPC literal 0 HcmV?d00001 diff --git a/base/all-all/dig086.png b/base/all-all/dig086.png new file mode 100644 index 0000000000000000000000000000000000000000..572b48cc47ca6675e1298dd556f03f5c4a0c1948 GIT binary patch literal 1160 zcmd^7F{|WM6h6yC@_gYLBx1xA0fSBvB}IxLDWc{r*=O`+*(?M}5!n<|q=*n9E-3<= zVw5RT3^=S2QjD4+;2k~~Y6=f{Tg(M9{F&Bi4=M#>LSvF*tK27@+hE zb|ub7*yh(wdYr`jGTe=V&Cpxr&N8#R)M{h1iHu38mw{IJ>cCYpM^0=hG<&`wI=Wz~ zye@N!#7ZJ_JRbM^{cgA0Znx|8dbwOK7K^UyX0ut_woTL2bzN1}csw4BM#JGS&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|RausMy`CtF2}aSe-{1NE%Jn+inVMFm8zWWE zWi^)MKKn&0a@BoNpM6dlG z7Yl3}EDDTcbR1Mw;vxb=Hi01+1b}qs03m>LGxxB?%^Vjcwkb|LEHupcmoayUm|dUQ z`1I1Hp4l)nVQSp+#0_GLSRjUoCZdQ4wGNdEBN+xFF=x+^c~xX(o+cx1t)v0S03rYf zK$3u!fqM&6(uylsRZvC{)?xU^U+13!+<~tjT-|cJ;rBmX;9OJhlCOI8t9xG%m1*`S z?!XT}zD1JnTwZ+q@bu{izyJ0+z-j)`Kh=BuqrZRp_w4z%zdZWp^ACSMdF_qw-~3Z7 S-+xM~;qva)#jl@y`Q$(Jy=QL# literal 0 HcmV?d00001 diff --git a/base/all-all/dig087.png b/base/all-all/dig087.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f2c9473275313a84a1d47d7ffd8ebb02685241 GIT binary patch literal 1156 zcmd^7F{|5F6h5y>Q5xl;K?NlhR20#A&>)JS8Z;=4UQk|Cogy{DR4B$P?lvOBG2j4ief(+?b37;$Ez^xgJ9`-3)k&zduE!A zu1__sQj}7b3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9zSew*W+e^>kj({ zmlZB1*yY!4dYZ)N($nx?MnvMeW)$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD<$T%uK7+jftw~ zvKmWrAPyW}FgQ+OSdpeVYS|R?dNeDurby~hRAu2L4aTvThi)3!iEl-&F?4j_Qe8uF zbh*xhB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2ap!Iq#`{X1r9$Pg zBZG=1AX?*Yhl>SP6{acrKI%FO0s@=>J^*Y1Rsc(Y4xj<30LB0rKnySh@BoNpM6bgE z`ySgCivr^q9S2pFxQM`zO<)KH0U+HuKnUR6%suXKyTHD}F2$*bg@zgbG3JgDvmY{B zpI*7tdmH8^%#2%}xJB#`3&ar7L=+LB(VXzFLzyIk1=bHMOeAQ>KpZ!QwrrDb~ zgWumhB*`x?FTQ_u@3-I|=935fzqp659zFaH&feXf;)BNk-;|&K`uN*XNh;y;>D9#_ IPkwsy9}!byT>t<8 literal 0 HcmV?d00001 diff --git a/base/all-all/dig088.png b/base/all-all/dig088.png new file mode 100644 index 0000000000000000000000000000000000000000..87a7a5a4c489529b2a2d181f6691bec1c705e8f0 GIT binary patch literal 1158 zcmd^7F{|5F6h3JvN~1p1qJly-s6`DPGzh9eg9g#+1?5%cDMSHLG^n7#g9a585JiKM zYH*7O4ThLh1q~iF2x_PX4<0mR@L;G14<1x7B?T8ecu3%N>gj#&Z}f7{x!eQiJ0Iu! zetL9ip56WUE&!ZeJUo9)-gik*cW#q>^?mXOz-@T+^^*tWD{wT&P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{05?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPYB@I9Z5CJ#< zQUt6FJXn~LR@}g*f--`z4#VI7I{OOX7Ce1?dBg3R-~aT0b4A@Jt9tLdhu;vDY4$p9 z!Oy?kBgIcH&cAqa=VkB@^UnMHzqp6bosB)&&U`KCqa=!hit@7Lr&D zVG4^WhQxry6cz(Jg~b$8OtFQt7BKm967P2&>Z@P=;(r_ z^193^5-W+!`F!sC{&+lgUAN!wx7%&owwujnwOTbzvsf(Zx~{5fHk(bS)5&C#=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~UH;ZPLC1f%FY8XbLq=Xx94S(;X*8&g%! zWi^)MKpZ-}U~rtmup&)!)TS<0)p$9}>LRJeQJIC)G?>I*9=d5@C%zTA#>mlqOLYy! z(d8-+ip0r7EAjP_qj;udYoej>X%@7@5EAC)dK^Z|gK2a0OPx782|tP literal 0 HcmV?d00001 diff --git a/base/all-all/dig090.png b/base/all-all/dig090.png new file mode 100644 index 0000000000000000000000000000000000000000..e6d12d5cd98d6a3dcf1ee15fe6a80237d980cd92 GIT binary patch literal 1155 zcmd^7F{`9j6h50raI@y&5*J(|!4L^k7_hJ~U?GWbabFD2WnGY9;ewDUEDRWsVBr#r zNtnW7AVXrnVhRf(Q&>!33X3hK7|0Y;OkrRG8<=8>DYke^2%Oya{zfkM+{-jbYr6G zxva*L9Ebyl7YvS57*?cdj_T@SQH|!)tS*vj6qQ*xNrQ3h<)NDfcH&!+YYZLTw^Y|q z99^#Rph%oNv=Uz*I*MmXwk8@1pJqW6yTj1-0@HCd(^hm-QuP61eC*xb(s)_Q^HeB3 zc4Sbo1Vn4>dt5HDEHO>d_fgkT5D?%5@CslDum*;yCtqlY*UuVd~QG5aC2 z^Xauqy|iIr!rZv!i95s=u|NzFO+*n9Y8@&SCNhjfV$Ojf^Qy?oJWWR2T1f+t0Ym@} zfFuDc0}mFaq!l-?si2G?ti$k+zt6t_xC7rly}IRg!|#8(z`3SACSUc=H;=y}D%0#u z+<{+yeMpiYTwZ+k?C#IO8|JNd`4@lbXFq)X{0;NbhoAiZ>3x8I|9SA!dk^m~NFiK4 My1Mx7^XK3H2eVLPX#fBK literal 0 HcmV?d00001 diff --git a/base/all-all/dig091.png b/base/all-all/dig091.png new file mode 100644 index 0000000000000000000000000000000000000000..9cbc253c646c9c3408b73ce8a30cffdd11267a98 GIT binary patch literal 1155 zcmd^7F{`9j6h51m;AVXf3k$utFknD}g|HSw zGKIy!4jTg&Q&RrC3LHk(bS(>%|!EK8Ck zilQ(KgCOuc&vjkfwoTJC3`5g2RaIqK9*st#C?*(1=kfU9`&-xRY-ed&m2S*bJ(ty3 zk^^z%@Pff{3d4#t%~4%ltg6X!p4CNCO`NDvr;K>$d14iEx3_j6AJ?$_9t*rvGfu+T8$KgQfCVh&?w@6#KX zdT+zZgr)Jo6ZeQMVu2VUnusDI)H+lu%w(8|#GE5T=2elEd76xPu#yHK1Bd_|04V}i z1|BU;Nh@w)TR|B?Scl=Ce_wqI@Cbf-dHcZap5OoUfOAKEMOO9skI%m+D%0$JK7!wV z|AG|1yt)4R)#G=;zsx6>sQv)6%gfjQ=x;uqBK7M9*oUXzfg~b+A3}lKaCSYKS4NNh`6dQQyPVReuBbR&b{*VOq=$xE)uamz3&f(_km(R&l;AoDaEXzVfp66MXrD>X? zC|MOmiQxo_;lS1;QxSEE$Hn5VY2MFf$LaJ?6#LPrPt$E2ufuQ^1fAzCUAMLExoOtA zKGU>PQKqt7NYYpob3w>>KH<2SWkZG;(zH)e9z{76WdoQ11^^!S_->2+3b#w#w79CV zD{(o&Hot4q(=0xe;eHbA#@;4()|uUmN3N1Na$-xNIq(h9(FIH8 zb(vEnRuY-h>2x?8_WOO`_uK7uyN^hPD@&j;oorqMMSc4-n&H@9vhy+ftsVLg}$1 zgNh{}T4Ueia*1V$X^Os&x{iW?04IQV06Ty+KnKtQ)Bq*G7$5_P0fqn`0FjL7bvWQ^ zg-wG+fpLtEgQ`kgL}17!Fa(1DknS8H1aR)>9(&v^aaCfQ;>^QB!;F6)bH|9;51E}$ zuU+b`4GRA-0GGVu)xWiil9_P^mDHVI&fB4h)%BMONl%GUCBX8h{KS0&oB% z30N6;urMX9xPeUtWdvazhJXBh@fE-syt=)9;C9dNf4acAqn?qk`sjxj-x8H+_CC(w zw>O`VB!6}J#mh&(2LCc2Jh}Pt{Fm?lgr{e>Pd@(qo2T&R*=PTpzn)5@46dGEU;h5( HcR&3Hzx81; literal 0 HcmV?d00001 diff --git a/base/all-all/dig093.png b/base/all-all/dig093.png new file mode 100644 index 0000000000000000000000000000000000000000..4e96d82a4b09b60fc0dca1c414a8d4cd5a233282 GIT binary patch literal 1154 zcmd^7F{`9j6h50JakJ)OVPRMU1|&>jVZg$|fJuCd`(k)5>w*Le0}`fi!GHk?5`+jD z!W6PhF(d{IOkp8p3X3VGu-L+4AX7{+g@GwHFvS#8Z1GYAPVReuBbR&bkCaQ6=g2Vg(OWyF&Bi4=M#>LSvF*tF-`jv2#Xsd6s2K zl0;DyhG7r{p69u)YumPInucL$nx?9%EX$+ONEF2cqv$*yAAEo7dY$boO{>z4nX2cq z8cT8@jvQVvI8I?$k)}DStBX}NSfYZW`E$Z$+*#c68rTT|;qn zxypkgaq`ege0}UFo+;UyXefM|1ySsdL)!~X$JI<*(M?I!M~LxhaQAEDRVgo1q4d~^ zLB$dft#KG|y~eV{G)3P>T}MGcfHS~rfIYwlpaWL@19-Xal7UBKV9J5P#=-6diUEWUlEmQ_BQUp zufM%dk{?`Me)jyqFTp>|TkoOz0$!r}@$WDB4`00V6T&yEN9#}j{p1Hy2Um};FaP-b H>mUCEfca%P literal 0 HcmV?d00001 diff --git a/base/all-all/dig094.png b/base/all-all/dig094.png new file mode 100644 index 0000000000000000000000000000000000000000..dbacc9faa20544188dbe68293ae0e3b0444c9ae2 GIT binary patch literal 1151 zcmd^9F^l6y6n>i}=t*R5(QMaP+^DcB|?~7tL7;MvY9mmTs?1G^6yoKvFwmmb= zTGuCVBW&{9X?mQ*`!d{(g3Zud<<2s*+tg}ea~c_wP%i_m@YR8-BQE?7FUP+xdLnG|hB6t?Rm~s_}R{8jXg-VV>t% zmL*9NMNt@rK@fPJ=en+K+oow6hM{Sis;aUq_j)~16cdc1W52)i{gvyrwlg!WN;gKT zp37=1$${8&c){Q}g<(aS=BTzV=G9;}&gvqm22q)Xqcj-CULLw>U?;v6xklg7eM@x> z#nI&|4~oReLo4z1zN2`iWNV_K@M#uAvD*)AFEAZfGi^mTB~|Ys#)qxDSr~6hd6o*L z#|{iCmVjuD+bu2@SeBTk==-SaCDSEhHL^uFbDwY&H+LI=Wgy{i<<>@B{nHeJS;TK`1dh)h?rfU z+4%I*rQX;uH(_Sn^TZ8egIFMjh$ffQJH4% z;sk#E?FlJf0+*+fBxO+k8l5YeR6sJ>G?{e<%22VE_OC literal 0 HcmV?d00001 diff --git a/base/all-all/dig095.png b/base/all-all/dig095.png new file mode 100644 index 0000000000000000000000000000000000000000..e8c95bfb8af1dc1daf0a9fa33289f67fddf7a945 GIT binary patch literal 1147 zcmd^7F{`9j6h50J__F32u1kMn)6 zp52(2k3M_^0GHQKubz|pT@uvALvr4}O#TLV2+zKJ@q|1Dj^-H3vMfa8d7foinx-j= zl2t*J7*3!V4s1;_6;YRXT&-@K=Ivr}n$M3#ahOboG~LDVCJg%^=sa)jx~*+5O|#bZ zg{GB?GMD8-lBS}V3qr>83CG1O8#2t8rhSU?D9WKI8^8oG0Pu9cH#;19+^uojVqard z;(CT{e%qwyMSLv7!z|cOy>0GnGP_HyHa45cScG~RXoas%TqSel#Fj#H$=ry)wXTZG<989RW+Z_XS3OKI?eMu%d#X% zq9_W(FbD$A^IX@pZQC?W!!R^WQ&m-#<m zB{>jB4lfuSr!cHY(;U^+#j2Vt=UH7O)g&sjaFzzs*vmsV4eZ3XBG(u@x^Jnjp*Xr+ zDSEhHL^uFbDvt&H+LI=dSN*!2KHg65A9P9u^vA{M(p2Ma*H$?0tIU zQm<`TnXokOdEy?iMJy0QL=#a&gj$D6g_#T!k(hI2$h<1DGEb8h_g2yXWB?I>10YGj z%D|(ADJjJ*Y%3@u2z~Un03N{i&u{Lz-SPXME^uzCPspg=`|jyiL}i-2iwE%2 z&yPv+gX^o$UR?Yb{L8%a{%?O?ehS|xWNLr>{?RYa#~0s{4{-hD=IYnazy9GrhM8a7 literal 0 HcmV?d00001 diff --git a/base/all-all/dig096.png b/base/all-all/dig096.png new file mode 100644 index 0000000000000000000000000000000000000000..72f2a44fae3db478e5ceec099ad264382433cdef GIT binary patch literal 1150 zcmd^7F{`9j6h50JxVz>d#KI*OE=ZWd!otGBLbATaeQ|j%>w+W}1}vtqFknD}g-e7C z$rQp)F-Z(qOkp8p3X3VGm|_cyflM*Q6b7c)fW;J3Z1Ga%E*R~@#wQh0B~{j{PGpKKPEvvxKGZT?~}g(?!(I$ub+{pz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkE_*9(|lMgPV@Ot6vxS=Pt$!IZ^N()f{o{`UAMLErD@i> zzR>KH<2SWkZG;)3i@f9z{76WdoQ11^}Lp_)43cs%xfzu)h-+ill%o6TmmTD5K4G)-OCRaMRB^Vw`Rolf&S&$28@ zk|>J8Fbsmg^E}seZQC|Y(=ZH8(^OTJWqC9jiK3Wb6rIQ8qwnurZ(}=4)2ei1rs}z@ z#*!R}BZn6Zj#C&`q-l=Y)WxcrEazEWB-JD;vv8IM)7Z;HHx2B>w<6aVJGyVFuAw-( zT;)NLIC*F#zCLyo&y;LUG!#C~f+%*!q3s2x<7%d@=%%FVBgFXByN9*$u9TOlPT~i{55Il>6;YXHZ{r^P z_WNU!e0+8J#p?&Z2LCW0eS+$ns~<0(eERdhi?{Gg_vGo3}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFS+XH%;?)HakwIhoabzM!PiK#PKQ&`yl8%Z|SRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxX0HU-1WFw;=0AY z#;(NW1l#3Umdwh=E#XHh33FFL`N4a zmDgoXkyuG&PN&o1aMRb^Qo3+XKq@RZcJ1? zm(^I3199N+g28bL!-_P`QC(dus?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)d_fgkT5D?%5@ETwXumb1+T7Vj$1Q-Kk05QN2zylzX5xouv z?0ak)EDDTcbR1Mw;vxb=CV?Rs1b|fM03m>L+xNJ`?GpPE+Z1OW78+*!+n75>%znsh zeR}0muWVSDFgNaa;uf(*ED%FP6H!EjT8B!7i3}r=m~&vryehIXPm>mRR?+}u01myQi^L>S5QU})?xVPo3k$g?!kB0S9jcQ`Tb7^I5*TMmX{pb4fSCR^s NPp-~?`{J7){sWcaW!nG% literal 0 HcmV?d00001 diff --git a/base/all-all/dig098.png b/base/all-all/dig098.png new file mode 100644 index 0000000000000000000000000000000000000000..2c0063341a5478900caf54b2e48d156689437a1a GIT binary patch literal 1157 zcmd^9F^l6y6n>lK(B_my0Tl{SAvh6Ss8B!<6)KdR_Rww=R>$c;1Ql8k#DxM1=s*M& z3a7#Z2SjjT5(QMaP+>S1Djaa3;tCb!;=+Xs2V7jhg$ox4*+7by+5Ht7MLx*ivZrd_#0} z!BTl$<`jvQMCN!r?)UrMZnxcT*X#9ix$L^GZQJ>L-Zag0I<4!vs;cpLJQ|IL!(pE1 zS(YV95=BuMhCvW`p69x*ZQG`48it{1nyRX@EcbdnQ4|x5qGP|m^Zk|UwYD=etx7jW zs-DYgEXje`b9lkvIE7(Fn&zmsF6Px>HqPoIsRmJ*g`+eW#$Fz}X<#S56}d*=(S1vG z4aL#rDi4ap$wMpg^}eHcretfPq3~%IM6ufsZ7(n#S2JxzHzif?A;yQTyIB~oOL>+G zrN<5oDwcp~joU3Q7Fd>;rs(^q>nI2aa0GY@umM;Cv;Yl24Nw9M0WyFXpby{y5Xp#M z`#p9YPN!HD7{};1sH((81cpokLof&csm=jH0OzjnVT+pub|p3`PCP6$%=mXPcZir> zpV|2I(xqP8FgIal-1Ec@VuM&9hKMGjhzPX~l?o#n1|l(M&yaalWM!TvE$*$P0muL% z00%%W0V@Od7N(>WSFoy}j3BJT@Q=UFzXUje7tgNmx!v*mpAK+tsZYpLz5m_i*F#NJ>DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%5%=i)Pf2k`atn|p3|{Qjp4oLlN+@>TDBb@c^NnP%_e z0sQ#WW0L&n`ts8k=RX8*nRnjjU&7TVFaLb_@VE1`C;#eKkKyh2ALPIM@%zuD5U!uz LT>kpx%WwY!tafB2 literal 0 HcmV?d00001 diff --git a/base/all-all/dig100.png b/base/all-all/dig100.png new file mode 100644 index 0000000000000000000000000000000000000000..11e09049b215b5be42e877e44ca92d0a0fa3d666 GIT binary patch literal 1159 zcmd^7F{|5F6h7&rD2?7jr79>?g9xH{&>*O2HE2*1y`a1*JcTGAiUt)_@SqYER1igj zpc+i^Ac_Z*sGz}v20=Y&@Zdp11`nq7V2TG9JS5=3gNF?6c6#6Y8@=3fF89Fs&d2$_ zU!Pr@7xzB92LKmWPcEO6_d^oY-7}I;KPUeHoWZlFFCLSxz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkF(jSY2HsJhw*q{6uZG-o2KhHUWVZ!2s+Q3yKZaSQ`4+< zeWGclqKsv^kffm~=7Ny%e8O=t%Z3cor)i&}Jc@EC$_6k23;;ar@a-D63tZ1})#9SY zuEhBW+x*m|$4R^|!`&#@482wEEHk@Htu{8B$e4tB8EA#C4qPR3oTWEtRynW<8i;=?{>TGcDr7$m&@g1vFN&PHk-9=+cZsG*Hu-G$K%mxG#n1|JkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1Vit>xrV6U=$tu{hjZxT(7g8scBWZF;ewh zR%1yH#GbA0F{E4nGEdJi!^Y~9V=cvH&LR46@m zU{J9HL~Gn`aX!bg#56_UM_orjK!78_TYwF~5}*TU0cwB}UrkmMl3^ecbM_3GS4CFlX)@y0N*aI+AOdgz zqzG6UxVJDRt+;|!1!V+b9fp6syZ8p+4*c}|`j*=bzyIk0=R|!@R`t=3PrfB8)9g*$ zf!Dv^C&dR>mk(dueHHx6d~nWx^#lBNe$IdWF8lcG(M$N`93S3?)Ayf#`Nf}qldS_> NJ-)vD^Pksief(+^=Z0|<8>IWf}r!frR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y=UU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WA{FedxcvMjyngiU&F`4MI(z4`|9tfK&wr3IxO#GZ@#f2K Ge*6yygk<0V literal 0 HcmV?d00001 diff --git a/base/all-all/dig102.png b/base/all-all/dig102.png new file mode 100644 index 0000000000000000000000000000000000000000..7d33d264833d2ac4c769a066c176d76813c0a72e GIT binary patch literal 1155 zcmd^7F{`9j6h50JxNptFfDl6@SV)+{LWqThg(SYk_hNW1>w*Le6D+2%Fu{N<7A~=v zU8XQF#gG`Vn8HHH1T3bQ!r~QE3}gsXOkrS(4NPDHQ*80lo!s~SMlSc<%RQX)osau{ zub*C<=Z`;n3;^d>mlw~-{VoaW(L-|HzDWKAcnD9weEx(y1&-zz%Cam(IP zijq}9lo(E+7!GVrG8Ivmcw8)Qo969ocAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1dYDJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+J+?4V>6-tjC z8B{C*(Hi?6mrE>5OjGoI)O8dD1ULb_0oVbo0Xl#dpav)b#sC>W3@`-n0ElEnufqXX zD{LAp3XEfP98^`}A_7A;fgu6 zdhJp-HY`k-8}~eMhu9((h#{hhC?Z0wL#4t*hLK3jIWS~i6*rtp@E^DrWTgNA literal 0 HcmV?d00001 diff --git a/base/all-all/dig103.png b/base/all-all/dig103.png new file mode 100644 index 0000000000000000000000000000000000000000..356006459ef400617918256fac54eb0c7cc37940 GIT binary patch literal 1159 zcmd^7F{|5F6h3L_(`(d+;Av2a22n)upg~X#8Z?MTFX+9hJcTGAiYN-zph1HQDu|*% zAsS5ZpnwNARY8LX4Tid)!Gi}CGI%i5g9lSw@Q{KB4<0hSK!?-&-rwluo_o26bH4L& zzwgzPYxC^E!v_Fxc6E92l-wVapib|T^X8}YZ-D#o>}E1~KOP@OqkUQK`u%N|t&?OKMT;QlJa6v0t!+-BoMTrL)iuIpyAS=+Xg$)stTx~@l~(Qr5%3t-?@-zDUg3Gh|*BS(&HFh&wB305X6G zzyXjXU~S;u!i==y3RX2#F+@!i{rS(?*8un6$EVkK+-~{(PZu~h)EDHdKKbGDTcR?} z-o`!n<=4+h^7E^Uub!R02|h3%eagRp%P(L2adL9{ul|}o51)Tv&QDx*UJT5kq9!`!M;0>xfv2mV%Q~loCIEQ*7j*yt delta 75 zcmeC=?Bv{F&dkU#*^&A4SI#F}Csg_((UXFkfb4(>S?>QG-EA ea)!hV2OWm#QtZr&Lr#BV00K`}KbLh*2~7YIyA=}v diff --git a/base/all-all/dig105.png b/base/all-all/dig105.png new file mode 100644 index 0000000000000000000000000000000000000000..8c92fab022858d6592e8c98515e1f63a6ad85a81 GIT binary patch literal 1157 zcmd^9F{|5F6h5gbN~1h9Xi!^0HK@gd1`UF0(4aJWL3veq3Q<4=4GL)Rpn?i2h@e5V zf|%k#g9p>9puvL%K|N^j;K4%%4W{+r!37lzO~Hc)4;fy!)BE1v=;fY!xtDXk^KrkA z`_r>)^Wwp$4*=le>gnZkvVTZ|x<4T6&FkbZfB`)F=EW0o6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HjWX`1)*`Dr#g7R6ya?$dM^$D1(hf?(}=E7xspdtsWj zuFo~CRFs)47m_p)#as|Fo=-R~X4#NoMl|hHlt)nxMcDu*fB}G~1HRi~-{EeB+ZMYT z*Cno|*ycA)dY;F}GCWL!{lwem&L*?hsny126B+YRF9WUc)v>E&j-1$1XbyctbacT| zd0pldiIqg=d_EtK$HU>!_x*0S+iW&n*R9v<<#O4!ZPPS$T~}2#o6V-v>0~m=^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH%9a43pmf>CrHjSjxQb-lIiEKIA?jj5{V zvKmWrAPyZ~FgQ+OSdpeVYF!u0YP^_bb&*u#sLaA?8cbp@58X7d6W@wlW8~<*rMiaV z=yH_@MdIY4mH7I|Q9M(!HPKM`Gz+5G9fh_Rn2xKNwxXMost*z4Q}6Cq#@kX}q(bSj zV}pt%AX;PJ<7$OviD`lCd_lPZGffyp1h$14?I#eo5Wf+UZoI^wARgsl>nzXpHk_I3HhyWY_ zxdf~XJX)BNQryC}f--`z4#PkGx%e939(@1&`i|QzzyIj~=Z5-%Jk>|vJ$*@3rrF!L z2fzIK@$DyZb@|nc`#%T&G9Nrd_1iz;bBta+5`Xyn;iE4Hg8{tsKlx02D@sPo#%jtdZZ}f7`z1#!mJ0Iu! zUOl@s&+b3G4*+KuPtTu|_YO(w?rn0PUM7D6+=gf0zIZ~u0!MQUWmy&?@;uM7EKSoC zMaillN(?7Z3y{8FaYqd!}n|4E^s}^Rf~%n zyAtOkZ1Yo-9w+g>40oeoGxS!uv&`%+wc6NhB4ZNjWuO(lI&hWDkrP`A&7NCtr_jkU(a=p%WrlwWt#z@t3 zS&bz*5PJ?U7#ycCtVq)w)z!tU8cfGoT_n{YDzk8u2E*9PLpKfV#J3{X=sUV^sji_o zx?JT!kvMs1CBEKw6wj1wO*9lf&4MU)`=RXxrsHa+t>~tt>OI8xuyr?c<6S9FQ=#+BnVTkzBK%NuUj{Qjp0oD=nktm@v6ProB7)9iKL zf;Vp;kmBbT=U>0L`})z(znuYmboCED)PH&NaI7$LGLB7|j%6hTv@ND(z}$vz`5%Vr@+kO(P8h!`P4kQBiU zILII=rWiCriYZb=oFc^(Q%v!S6ax-2#S{^ySaHB92HfH`!tuWMH@w_)FZXcHcRud- zegE{*JbUo)0RWs`JUM?x?$=0A_wJJO`kUkrfV=SYv9IwN$3xbvBEnT;@?YU{z zx<1piQc*Q65D(6lDXL00saa_xN&)eTUm6Zd&YW zT$Q+-V4Ghz>1h@p%5Xmkc4KdoJL}9|rB)l8O=QeMy$rO%S4XarIdWo4p*ipk(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-JAUAJ1T7K=sOwoTL2bzN1}bUK|(Cgbrq&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|Rauq?gMlcD2}aRrINbaG#`RXVGdHbDHzul{ z%W5pifjDq@!QeQBVMUtes8wAos?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)yR7p<%|qin(LN?1#+G zr`IlZWy8XRxpB)AcZe-wffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%$k_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|YhC!Y|NY4#@W zz)wHFO_J|ioPY5A-j9#I`}RJ->o5Mrhx!*kym$W3)#snSzf1pq>y6Xz>|byG^6r`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJPJ9*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ>G1wU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WF19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfUy0z)te0IALaLICHk@3F_-5?3X*Db74BG|c$-F?WoZ{gB!D z^xCD~*|0ESZrt<49b$`EAclx0qKF8!4wVWM8Ac*8=fIG8Rb*wJCN1u*qyfkPA^-i=U)LlfH$wM@44Oa`=2gwZmG}7s2+d+{A;2z&ECZW z`1Q9>Nb=(9@{8AxehL0zKKPh_`q|k>k00X2zY3Y$w>KBx&ENj;H~9ot&#o_j|MHuk F{saDWVXOcE literal 0 HcmV?d00001 diff --git a/base/all-all/dig109.png b/base/all-all/dig109.png new file mode 100644 index 0000000000000000000000000000000000000000..e7a05cec6ae689e2a2bd30e60438b5a03341303e GIT binary patch literal 1157 zcmd^9F{|WM6h6;YvTl5)2ofJpF3<@J32dNw;wr-!2GN24xHcX7N4!*vj}p0{${#;Xk<6@Q#8D>b+K1F#Ho{jKY@wzDv;N;f8| zp37=1$$>aU?;v6xyI1ZeM@x> z#nI&|4~oReLo4z1p`&=FWNV_K@M#uAu{#WHFEAZfGi^mTB~>3F#>dXxuZ)+ayhw%8 zV@C!ROF*>7uEW&|%M#NReIIol1pxt00IvY{02_c7paG}>N`Nsy1`q=b0XzUA8PV%- z!1WsEb1VvsV{{x;RpKH7LneVC7zBV+=KvvqbJO?O;eLhd5}Oof9u^vA{Og!IMod3s z_CCFFsh2h^O;{MWJaLcMAQp%rqKPOXLajrk!bFCVNX$7fWL_0nnWssMTPtY*GJpuc z0gy|;%D{t#DJjJ*Y%3@u2cm_mlb8m-k63 OTt2+I`1QfpKl}%*gk^02 literal 0 HcmV?d00001 diff --git a/base/all-all/dig110.png b/base/all-all/dig110.png new file mode 100644 index 0000000000000000000000000000000000000000..dfa03748e8b308ee63a4ea68e9092b94250f54f3 GIT binary patch literal 1161 zcmd^7F{|5F6h0vYrBNRq1XZaZDu~n&4JuVZ6b)*l7nE0(r$-bJMS}_&JZMlr1+{1p zRD%f~1aZN%DyY;@4ThSc!Gi}uGYH~RQ#^Q3!9!X+c<_+nZ9Tp3{f%DkxtDu5=Q|(w z`<`8#8z*<(xdQ+vXOB)FllvA4>h?`?UVa__1#lBCK6~snnoF&I;v@e3)*x!!ab!M+pt4Yi{GG?JZ4Ya~nb59vMa%xMlB?d;{(*;}O zO@-4WRu&mi=pB#8{eHjO?YgepY&NUas%_h*X%>q`UDvbOtg5QAEGLu6csw4BMp>4n zX&T3I7=}R*_`dJDuH!hCWf_K{>$<9{ilRu8)bIBNL5ML7kAuO^^VW{rSoYj7OHCgu zS|%xxDEUI)=6IcD{*W|-#~MQGcoD8xkshHL^uFbDwY&Hw@c`)cl?!|f8=0_y~)F6Jtx-0O%vguUIM zxAo|iL%pzIVZdC!=80Rx8Zk!<5Di2D5h@Kz1;!E#1!B&=E^&&$NE}T@Tw6&6kN^Y# z7JwuHOC9$nCZrYDur8qpA*h1jkH1eo1-JoUK0d$ZcE#_1y1>4q?vby0zfg~b*Y1DU`OhA@FCHZa8$Q*80lo!s~SMlSc<%RQX)osau{ zKR&xLFP?n(1OP6suP&dH`&|;$qX*=?{XY2{-~l}Q`o&Z76gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJM{U*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*rCuE)(1*Ddxn zb|o$+*yguQdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%&k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|*M+8Z?MhFX+80JcTGAiUt)lc+jAL3ZiJx zqbitUf(8$!RY8LXK?L=n!Gi}688jH`!37U4cu2v6DIPMsLWk4)-rwluo_o26bH4L& zzwf7K7v{LEXJW&a3Z}KLPH*v!^efkf*@W979=_g@`=Qvn)%~ zG(}OeDu@!p2^7PDtx2XL>JpE$*;UiLn@kSl@xCZ_gTXdU*KxcI!!8IGo;P>h*0!gn zS?l^l(@I4d%W@$}Ls85HA>;Xk<6@Q#8KzIuK1F#H`b=)R@8 zhT`aQl?O%Q)EDHd?!7$whNw)l z*KrGe`SoLx{Pg_v@r%1Z2mdg)AMlrO_T}XV?_YlM;Ij`u|5rG@4S)Rj(W6&SU;j-i O;rz+P>2F_s`@?_UWMX>& literal 0 HcmV?d00001 diff --git a/base/all-all/dig113.png b/base/all-all/dig113.png new file mode 100644 index 0000000000000000000000000000000000000000..79edd96eff57551033722107e8767d188373d42b GIT binary patch literal 1156 zcmd^7F{|5F82w&CpVBA~m1m7I;6Z~53W%aX zp&Cr^AczO2RY8LX4Td_P!4wY~GH7tA3m!bU;2{MM9z0}t?ez7&_cwaE-@V)q&iM}a zoR?3o%(MHS-UooQ%Zu};=~0#^-o zHMS)#M%d)n)ATrr_hq;n1)HI_%AI9qx2e^{<}@-Upzppw)6SCX`1PDTGw?|Rpaq^G#U+u!#vNk zEK8CkilQ(KgCOuc&vjkfwoTJC3`5g2RaIqK?)7@2C?*(1$9{k3`zzOLZD(d$m2Qkw zJ(ty3k^`~l@Pff{3d4#t%~5S#%&Wm{oYh5A4Wcp&M`@B{nHeJS;TK`1dh)h?rfU z+4%I*rQX^wH(_Sn>ckCVgIFMjh$fTahYas z>I8oND)b^To&izIgrW1`d~x Mug-t{>boER1OB;VQ2+n{ literal 0 HcmV?d00001 diff --git a/base/all-all/dig114.png b/base/all-all/dig114.png new file mode 100644 index 0000000000000000000000000000000000000000..35a8e18aeaab414af70e9dec16fd31c0b573f4c5 GIT binary patch literal 1158 zcmd^7F^l6y6n>W_XmiRUhyn^xp@0Z3RHzU{g$i9xd+0U_tL1c{1Ql8k#DxM1=s+YY zbVP*-E<|u)5(PvsM1>(PRJd@V;tCgrxNzY@0T-9x!i6DMINi(a{*4UtW|+r&-}{*F z`{Cx=ymIP zijq}9lo(E+7!GVrG8Ivmc%08q)9IVZjsxK zwk0k`*yN{adYr`jGTe=V?a*82&MLFp)M{dL8X1#NF9WUc)q$&Ij-1$1X!d+VbacT| zd0pldiIqg=cs%a+``vEWb=_vOS*=#f<+5$t`F!3q&2&1g>$<9{@pwEMjfTTvp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRHIQJICKG#JKS9=d5@C%zTAM&HqWOLYy! z(d8-+ip0r7EAjQdqj;udYoej>X%LH}}xtc7e+hn-nJ=78+*!o0vO9%&yOD zeR}0muWXo`Ff;CX;uf(%ED%FP6H!EjT8B!7kqiTon6qcdyehIXPm>Y%R?+}u01oEM|uZzzB9>9xd*Z17+`29~8I4A03@>TDA^YlxiGR@w_ z1Nixu4@mN(tIJQHpZ^s6%e?h2|H;?zJhqTAb-zv82R^s}4y;3U2O_ZQ!t|3+%z N>dE!x?~iZ4{}1Q(WfuSd literal 0 HcmV?d00001 diff --git a/base/all-all/dig115.png b/base/all-all/dig115.png new file mode 100644 index 0000000000000000000000000000000000000000..41446d25185055a2a8198c3a94c60a1cf3e627c5 GIT binary patch literal 1156 zcmd^7F{`9j6h1FYaCgl^f&@1aVj*D)3rQ?2EM((bd@qLQvMxxlFkmr-g#iN+EL`}fFs^G)&>z&&{S`ST~_DR4B$P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{OD?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR@}g*f--`z4#PkHKK~5h48DGLeaG#V-~V)hb3=VZzUskOmtPQ-Y4$eG z;K!dHk>rP07muIce;NGCy!8(M0xmy!0pI`e>p#`mZ{M}=KZ4&se)r`s#(USK60V+H LU;O;(m*4&eFfnAs literal 0 HcmV?d00001 diff --git a/base/all-all/dig116.png b/base/all-all/dig116.png new file mode 100644 index 0000000000000000000000000000000000000000..4911d08dfa95e995665711b531040844777ddc71 GIT binary patch literal 1156 zcmd^7F{|5F6h6tLD2@8iph0Z~6+{#df{LO+gP-gYQ9*+T4Tid)!Gi}48C)>bg9i^PxR8Pe4<0hSY^V3VztPJ*_i_*CeCOkS z->=Uu%+vdy-v@xx^T%hGq4vGC7RL`=Zzl23?wN;&>H?%OGeyZ{fO)ZO=@z z*7b>|m5MT!Rp#`6is#Vi{#OrNHGit;GRp(q=`1TX;bu)}v7?3TD$;JU$O zjctjG5jOetG(Aq@eHrdX!FK4ab7z&=ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW>$+~U*{oKp<#O4!?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{@V3g+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p*sOB_LX3*WqG;Wr=BuzK^<&f`9-=fOh~}fE7Rs&;Zl`CBP6M1Be0o03HC5jOexB z<8q19DHa9BF***aDsd5kA)CMu3<5y9bAS-QxtV+DaJ#@|iA{Y$SAYKT4XK3l MM;B+me|z=vKQ*0XwEzGB literal 0 HcmV?d00001 diff --git a/base/all-all/dig117.png b/base/all-all/dig117.png new file mode 100644 index 0000000000000000000000000000000000000000..8494216a9545abe102354bcced9d4c58066c27ee GIT binary patch literal 1157 zcmd^9F^l6y6n@KcXmiTqLIE8SoC*$dr2r3j%;X;K13W%V9 z;8d94LWK*HC?Gf&DhzQzg$oyg+kgtgxo}~E0xmYeg$oC+SV)nV+5HctQ3DB&f4fvfh3d{{e6c&%b#2lpJ}MW_y%rnuy489K$d) zO;Z#lDZC)|Sf1*!V5y=Z3!2E`VsSg0y_-%ClgU2Mcf(8jKTv6uDX8B)%1UX6WbxTk}lC z(Pdkc%FNGWI}6O%(+0Ne8lt5Ny38f1A4bj~uw37;9o4X8%@7r>j~E>~XS>v|3u&J4 zh06?eDiVQcja`S!B^CuH33?uC8uB~>906_swg4-D2A~G001AK+Knf563;qX=yq6@|Enz>rB`2nGQl)fqqlVBhsUbhuq&TVS2w)WuxIlzSJkhp@LB z^tK+oa;R$y76#1qd!D#OtPyj>0MS4c5TVkbRA4N@P$1^)>k_93jKtBT#l4kO00}?< zU;)S_V5#HY#DtXM8rCHgAp}(ry#4e1bAS{0_Qlmbw>y6S(*gD^^$~fh_r7`d6;YXH z?&1V~`uWk_Cvkc4+JFC-yi*Z`pJW{=7UfF{{BWG Psc`x9>f)ErzJB!|(dlPC literal 0 HcmV?d00001 diff --git a/base/all-all/dig118.png b/base/all-all/dig118.png new file mode 100644 index 0000000000000000000000000000000000000000..572b48cc47ca6675e1298dd556f03f5c4a0c1948 GIT binary patch literal 1160 zcmd^7F{|WM6h6yC@_gYLBx1xA0fSBvB}IxLDWc{r*=O`+*(?M}5!n<|q=*n9E-3<= zVw5RT3^=S2QjD4+;2k~~Y6=f{Tg(M9{F&Bi4=M#>LSvF*tK27@+hE zb|ub7*yh(wdYr`jGTe=V&Cpxr&N8#R)M{h1iHu38mw{IJ>cCYpM^0=hG<&`wI=Wz~ zye@N!#7ZJ_JRbM^{cgA0Znx|8dbwOK7K^UyX0ut_woTL2bzN1}csw4BM#JGS&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|RausMy`CtF2}aSe-{1NE%Jn+inVMFm8zWWE zWi^)MKKn&0a@BoNpM6dlG z7Yl3}EDDTcbR1Mw;vxb=Hi01+1b}qs03m>LGxxB?%^Vjcwkb|LEHupcmoayUm|dUQ z`1I1Hp4l)nVQSp+#0_GLSRjUoCZdQ4wGNdEBN+xFF=x+^c~xX(o+cx1t)v0S03rYf zK$3u!fqM&6(uylsRZvC{)?xU^U+13!+<~tjT-|cJ;rBmX;9OJhlCOI8t9xG%m1*`S z?!XT}zD1JnTwZ+q@bu{izyJ0+z-j)`Kh=BuqrZRp_w4z%zdZWp^ACSMdF_qw-~3Z7 S-+xM~;qva)#jl@y`Q$(Jy=QL# literal 0 HcmV?d00001 diff --git a/base/all-all/dig119.png b/base/all-all/dig119.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f2c9473275313a84a1d47d7ffd8ebb02685241 GIT binary patch literal 1156 zcmd^7F{|5F6h5y>Q5xl;K?NlhR20#A&>)JS8Z;=4UQk|Cogy{DR4B$P?lvOBG2j4ief(+?b37;$Ez^xgJ9`-3)k&zduE!A zu1__sQj}7b3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9zSew*W+e^>kj({ zmlZB1*yY!4dYZ)N($nx?MnvMeW)$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD<$T%uK7+jftw~ zvKmWrAPyW}FgQ+OSdpeVYS|R?dNeDurby~hRAu2L4aTvThi)3!iEl-&F?4j_Qe8uF zbh*xhB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2ap!Iq#`{X1r9$Pg zBZG=1AX?*Yhl>SP6{acrKI%FO0s@=>J^*Y1Rsc(Y4xj<30LB0rKnySh@BoNpM6bgE z`ySgCivr^q9S2pFxQM`zO<)KH0U+HuKnUR6%suXKyTHD}F2$*bg@zgbG3JgDvmY{B zpI*7tdmH8^%#2%}xJB#`3&ar7L=+LB(VXzFLzyIk1=bHMOeAQ>KpZ!QwrrDb~ zgWumhB*`x?FTQ_u@3-I|=935fzqp659zFaH&feXf;)BNk-;|&K`uN*XNh;y;>D9#_ IPkwsy9}!byT>t<8 literal 0 HcmV?d00001 diff --git a/base/all-all/dig120.png b/base/all-all/dig120.png new file mode 100644 index 0000000000000000000000000000000000000000..87a7a5a4c489529b2a2d181f6691bec1c705e8f0 GIT binary patch literal 1158 zcmd^7F{|5F6h3JvN~1p1qJly-s6`DPGzh9eg9g#+1?5%cDMSHLG^n7#g9a585JiKM zYH*7O4ThLh1q~iF2x_PX4<0mR@L;G14<1x7B?T8ecu3%N>gj#&Z}f7{x!eQiJ0Iu! zetL9ip56WUE&!ZeJUo9)-gik*cW#q>^?mXOz-@T+^^*tWD{wT&P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{05?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPYB@I9Z5CJ#< zQUt6FJXn~LR@}g*f--`z4#VI7I{OOX7Ce1?dBg3R-~aT0b4A@Jt9tLdhu;vDY4$p9 z!Oy?kBgIcH&cAqa=VkB@^UnMHzqp6bosB)&&U`KCqa=!hit@7Lr&D zVG4^WhQxry6cz(Jg~b$8OtFQt7BKm967P2&>Z@P=;(r_ z^193^5-W+!`F!sC{&+lgUAN!wx7%&owwujnwOTbzvsf(Zx~{5fHk(bS)5&C#=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~UH;ZPLC1f%FY8XbLq=Xx94S(;X*8&g%! zWi^)MKpZ-}U~rtmup&)!)TS<0)p$9}>LRJeQJIC)G?>I*9=d5@C%zTA#>mlqOLYy! z(d8-+ip0r7EAjP_qj;udYoej>X%@7@5EAC)dK^Z|gK2a0OPx782|tP literal 0 HcmV?d00001 diff --git a/base/all-all/dig122.png b/base/all-all/dig122.png new file mode 100644 index 0000000000000000000000000000000000000000..e6d12d5cd98d6a3dcf1ee15fe6a80237d980cd92 GIT binary patch literal 1155 zcmd^7F{`9j6h50raI@y&5*J(|!4L^k7_hJ~U?GWbabFD2WnGY9;ewDUEDRWsVBr#r zNtnW7AVXrnVhRf(Q&>!33X3hK7|0Y;OkrRG8<=8>DYke^2%Oya{zfkM+{-jbYr6G zxva*L9Ebyl7YvS57*?cdj_T@SQH|!)tS*vj6qQ*xNrQ3h<)NDfcH&!+YYZLTw^Y|q z99^#Rph%oNv=Uz*I*MmXwk8@1pJqW6yTj1-0@HCd(^hm-QuP61eC*xb(s)_Q^HeB3 zc4Sbo1Vn4>dt5HDEHO>d_fgkT5D?%5@CslDum*;yCtqlY*UuVd~QG5aC2 z^Xauqy|iIr!rZv!i95s=u|NzFO+*n9Y8@&SCNhjfV$Ojf^Qy?oJWWR2T1f+t0Ym@} zfFuDc0}mFaq!l-?si2G?ti$k+zt6t_xC7rly}IRg!|#8(z`3SACSUc=H;=y}D%0#u z+<{+yeMpiYTwZ+k?C#IO8|JNd`4@lbXFq)X{0;NbhoAiZ>3x8I|9SA!dk^m~NFiK4 My1Mx7^XK3H2eVLPX#fBK literal 0 HcmV?d00001 diff --git a/base/all-all/dig123.png b/base/all-all/dig123.png new file mode 100644 index 0000000000000000000000000000000000000000..0adeb517063a18ea16a9b061ae64f666897a4f9d GIT binary patch literal 1157 zcmd^9F{|5F6h3Kal|=8ML4%rTP(c(A8Z-!^f}o<+3(Bj?Q-}g;5mW^Y9#l|31yMAJ zR)Z-X1odDN6;$w`K~N7G4E3NPg9k%Bc<`WthZH<`@Q~qUJH7Ayjb84#mwP$qJ0JJ^ zxW7KTGS448dH?|DmrpOAll?;y)V;f8z5Xfr2jDI|`})Nbauhh4V<^kA5RvD3mSt(0 zrYK5Q1yN!+fnqqYHOW*&UE*=ExNe$vv)OSvJru=$H0slI8^`M~Tm?brc}v%AZF_E- zwXV-JtyGk$EEkeA7R6i;GM-O3E@s(~VTLsAQtJSLOy2WDAwr$fibzN6gHJwf;lgW5I&htFW zvLs2OCh5RaKVd!C)YYVuDe08V>iqzj3|JcIKv4>BdCW zb6JfgIS>a9FBlxBFsw+^9M#puq8iPoSzRR6C@QmXk_O}0%R@H}?8LVs*BCmwZ>g@K zIJ#WrL6JClXeGWrbQI5&Y)v#2KFxwCc88(u1*YR_rmg6vr0N62_}II9c6L*L$Vu2VUnusDI)H+luOk@~|#GC^|=2elEd78AiwUP!P1Bd_| z0J#LL3_Mtvl2Y8jrh+npunxn&|2_W-;12xw{OXq54Zr{C0Oy+elswh_mruVXD%0#u z+=17>e|+;vTwZ+f;@+#^J@dgCsz1Qw>5cQsMH+ L)y1D*e*epVdDvs@ literal 0 HcmV?d00001 diff --git a/base/all-all/dig124.png b/base/all-all/dig124.png new file mode 100644 index 0000000000000000000000000000000000000000..acb1e946ed5a68ddd5ddf34ebe8d8200420eca38 GIT binary patch literal 1148 zcmd^7F{`9j6h50J@nzkIg%HCUFd$(H3kw4l7LxdOeJ_URvM!ilVZdSv3j;2ZVBxYB zLzu$A6hqbpizzIGOkpv_6c$@p3}lKaCNP01HZa8$Q*7~4<>bEiH*&e>Uhd(X?|j_v z`{n7idH&$h0{}R`y1aNs?hi>&XZOi@^K`Gitu+49p^fZePWw@UN+p)LKomFOcsny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xP+wC@+&1$vk`@ZYC#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD>Ga=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201xO2Bl<83L=Q=#yR7p<%|qkGW&S?1#+O zr&liZ)`o=%bK{ODZV_9=0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR$Rlnf--`z4#PkGKK};b9=v#VeaG#V-~V)hb3=VWzUt#2FTW=$)9h{B zgV%39CCN{&F1~tx_FM1|^T9*J=;f~u|GfJABlzj^v+urqa`rE&fUC#X7r%e~!>j)Q D7A9fS literal 0 HcmV?d00001 diff --git a/base/all-all/dig125.png b/base/all-all/dig125.png new file mode 100644 index 0000000000000000000000000000000000000000..5473c24c83347d3b9d63604617a930088f37b6fd GIT binary patch literal 1159 zcmd^7F{|5F6h0vorBUDWpn^(75JeOZ8br~cL4#=Yg7TvB6rzA=G^n7#gD5H}AW{v2 zXmEoE4IWIQf(AoXFw}zvLk(3Sg9ej&@L-Ax9#Zh&!7UjcbUD56{f%DExtDw3eCOkQ z-^)iA#>wqFw*lbf{K45{@_s;)x^m(Sxr0dB&hFQ42eU!JAe9%Y&)B61wZFbqx8 z6h%o2FNi&sr+O?{s%Xf9CUUq~T+U|ir_;k^vd{C~aM&fuCW=-;(E5Jkx=Y8YEo*KV zm8MNqwUFhBB;}$w5`>KBQ;v&SHe#5d*Bj8ZM^P?C*%V~~7yvo|9(MR{gI$Z8C9Z31 zD{Kl}jo|^OS%zWgx~{6Kq9~Fi_4|E65Mm6&<6yA!ytU&tmOVGjQq#wZ zmPtw^O1{vyIbLU3xyJ}J%~DO3FUsM3l2&F%nj1HZ%UFvTNX`b+f z%M5iY5`k!qU5Cph76m2=dLC*T@;m|@0p0;@0agGFKn+j<6aXWD6d(c^0Js1|GNRXh zk8O*y8Rj`g5!yB?3ULvEAwggW1_2=589)GFU(G#qxLsmfV4dL9#azXddmpifu(uoZ zwjRB5s5cfY44CWJJaLOyBj$(!qJbzNLZv~ez*vHzK+M_KB~B3-iKEGgYb&V$5`X}} z0+1qLspH`Ym@Chk?dVcoBlUuLue*gIiz(?8N^B+(DczSy8w-@K%{Pgzezwxi9-~Ge=^6cZc QL~Vfc`xj?F-~0N-f0Gz!cmMzZ literal 0 HcmV?d00001 diff --git a/base/all-all/dig126.png b/base/all-all/dig126.png new file mode 100644 index 0000000000000000000000000000000000000000..7490a70cabafdd62f2eb2aa734dcadfe12d24943 GIT binary patch literal 1154 zcmd^7F{|5F6h7&rRT{mA3K|ru6cyCsL4%+gG-wd1UQk|Co*q#^1Pv-Ya(_&Mx_d&->z|Xq0Z!oRyJwHcQ{ZThp)AWnM4snamZfQ$ zq9|DvM2X=9is8W4BvTP}iO2c;dOH0unH-t2~N<|sVav@1WQOpG)Sdr6zB+J~%#jmY3eBExh>k8; zDzD3&BC(Rl9FNESe!tu8w%hG`yh5RaKVdUau#LVuDe0?Du!RzjD3Sc4nqk>BdOa zb6JfgIS_jeFBlxBFsw+^9M#svyc*2LSzRR6AS$zPlm^4t%R@H}?8LVs*XTRCZ>g@K zIJ#WrL6JClXeGYhcNEW*Y)v#2KFxwCcKf021*YR_rmg6vr0PAy_^@?13*%iW&r+fE z*nvUC5)iF%yT!!<%M#NReIIol1pxt$0Pg`d084-tpaG}>N`N6i1`q@E0XzUA8PRLM z$F9Ta6pI4m7##;ymAHt&kWF9+1_2=5IY0>D+{`^}akId##3sdwhlPe2{~_iM5wq(v z8=qdf)H@sICd`amp14755DUZ*(L@vxq1K^NVI;#qBXi$j?8Z>xNK?MyeXiyuypuDO)g(x7320akegGyCUKokvv zXfVNp+IldJ0vbGM5X6H96Fhjxputd6Ja}-yLkfm^@Q~q+r}w2lqnCT`r+iD6=fpJg(QtcF&Bi4=M#>LSvF*t0Zsc9u|Hcb&Fk% z%Mur3Z1d|TJx$|78SclycI2&dXO-E@)M{h1iHvEemw{IJ>d;j(M^0=hH2c0GI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=*%UAJ5==ks~nwoTL2bzN1}WHK3#$D`3G&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|Raut%{k|xQ2}aRrFxdP4+Vz&UGc&D9H^!=- z%W5pif!KF=!QeQBVMUtesAXNutKn>t)kRVbqcRJ}X)ubtJap5*PJAnJje(>4mg*Xc zqsvtu6p53ER^saeNAXO_)d_fgkT5D?%5@E%|bumV^Dv;Z|g2`~c40AhdvfCoS%BYGVU z*mc-6SQHq?=s2jV#6<*#Yyv|t2mtBM0YU)hhWEI`?EpkI#e)YGJfz^kgNF=nJiRad8NJ+dFZXiJ_Z{x{ zaesJxWuD*t@GbzHUp~5cLiTq_P`7W9_4?c7Z-86y__L=E$x+~Fj-f2eLPVbDS(c?~ znxZIK6-0^Q1d8Fn)+AFAb&1F2@_IghGn*Z!(?e10N25MXw{g4aU?;v6xyI1ZeM@x> z#nI&|4~oReLo4z1p`&=FWNV_K@M#uAu{#WHFEAZfGi^mTB~>3F#>d{>t&CTtyhw%8 zV@C!ROF*>7zQ@%H%M#NReIIol1pxt00Ivad0Be92paG}>N`Nsy1`q=b0XzUA8PV%- zz^=pj9E$?u7##;ymAHt&kV#+&1_2<|IY0>D-0&WI+^w)Hu}N{}VWDBhzlphH#O#O6 z&ZpNd^~#2&2@B(GpSVM85DUZ*(L@vxq1K^NVIspwB<36#GOvoP%+rM8t(7zY89)T! z0LUd^W#GZWl$7EIHWic+gmoDH`Oo>M0B7*clPl8Oe{?rJ{vXG4=En_rsykml`kbgt zvo~=DKmT&?=99R*c<}W0Pr8Whl=L4(rj1?5%cDMSHLG$=u(9yF++f+!k9 zt58!ssNli0DroSaK~O_AcresM1`URI@ZdqAE~MbWgNF=nJiRad8NJ+dFZXcH_Z{x{ z{q*?Syg0vi4geQdk1n5(`+XAB-8^Pksief(+^=Z0|<8>HzL9p_?rR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y)S?{K@sO^aQP zs}h$JZ1bBYJ+ZtQJxXPw!r)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0X>sG7PVzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nx6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<7Fw&Q=#nozv6k_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|xV~n7-jJ{Q;G0KZ5|wH8 zHqPMJ-##SCkFPF2eR}to;Msd;KVCe5Pd<78ul|DP%KiJ_zc_pS=lS!$<*)uAb#V3Y L`ttYBp8fDINSh0wRb* zYy>ff1G?bCBnqf-A%YLhzl2nDB$7(E?l^{V#}A=%b$^%c{9vo-uFG` z`(8f1G*2JB{|Eq1FV4@Nk@G$Y>cL&I-+Z0?4R9Bpe){|gxe6T3F_dLlh{*Fi%d#|0 zQxqkuf+#VZKrtNHnq(@XF7Y^@-%O`(CzHc?yf2E~V9=%MCXQEO*apGU^A@h#*!Ijc zYh9mcTB#^wSuP}LD2lltWIUg6T+Ff|!}Mv|rznr29E!35OaKD_4?BFb!LG&40@n?; zH7-kBjIhaXrs;7K@5^vE3bsRUoja?{UZz$Po72dcgnAihg|7}=C3ED&mO``V8=|8N zmdfigr%0?MGRNa_zu)h6yRPdto6TyqYTI_XT+Zk7rfH_rXbb1Ok{pOVhZhWvQy5mHX^vXf#k?BK##vn?)gUUfaFhna*vmsV4eZ3XBG>3Ux^Jnj zp*Xr+ zdhEcUVhM=W*mbyAU|C|CqVJ=wqaYx_5#SBL7GMRi1ZV(ifD&K`kO9O1eE<)DNJjM9 z@3C!hI>n;EI7Y`oRV6MWFk}%Jf+n37Ul!@7bpg0K$5KmR%X1mFa|dUi>A`;YFn$N%H_f_b$jU-j_I^UsLN zGm##XCFO(@I!EQ=j7Yd$G`nf=C9Y+*DoLbaqs)bAAWc5b9i-r|L4E1 SUfdy%;o`~V*)Jboee*B1AZK&{ diff --git a/base/all-all/dig9.png b/base/all-all/dig9.png deleted file mode 100644 index 157f0c4b91e1570d8c50614492d509eae11b75ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1153 zcmd^7F^l6y6n>i{Xm53k3KiOm3KcqVp+bcU6)KcOd+0X0td`S(2r6_z5Em*GP(U0i z1QEmp7Yev=5*?^;p~4UsDqQ%$fh$xPVuA}36foohhPZHX#g;F#m!FYg-VF12@B1F} zec#_)o9AaAodLl4)sxF--t2~N<|sVav@1WQOpG)$ykKyg!muJubJVgf=G9;}&gvqm22q)Xqcj-CULLw>U?;v6xklg7eM@x> z#nI&|4~oReLo4z1zN2`iWNV_K@M#uAvD*)AFEAZfGi^mTB~|Ys#)r<`E{r#&JWGYr zV+RHmOF*>7uEWIw%M#NReIIol1pxt$0B-@d04sncKm$+%lmJ733?K&R19$*LGNRXh zk8O+7DHa9BF***aDsd5kA)CMu3<5y9bAS-Qx#K-_xLsgdVw2*;!$QN1e;0Fyh}rd- ztxvC9>WvL^6K2NyIdO~FAQp%rqKPOXLajrk!bpaJNX*$YWL_0nnWqWGdn;)GGJpuc z0gxnMW#Hbzl(ga+))kZygmoDH_V@W`04MOxvuiTje{^><{vX#@%nxhwRrkMs@&!?u zX7Azzetva9lKj=>C(loR3SNA0^47SeKi>TD-~s&g&)Ju+fA>EpWpMTQ L`tp}gUwr#7*xq7W diff --git a/base/all-all/dig91.png b/base/all-all/dig91.png deleted file mode 100644 index 23caabc36c895ba8be38424625267d7d838ec4e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmd^7F{|5F6h5!7t&)g`1`P^PL4!&?XwaZR1r4In3(Bj)Q+Nu9qCpQ->OlpyC?JXo zf@(0qg90AhRs{tN(IBV?4IVtGkimnY9z1w(!9xljJb1|PrgC~;`ZIdD=U(pNobNl_ z?|bp|(mcEO;2r>+T|7R&BKJoms5__Ry!j#d3*Z!yj^kw*E`p%*yt(VPwmmh? zTGuCen)En{_hq;n1)HI_%AI9qcd6CJW)m5cP%i_m@YR8-BQETr3t{*Ue_Lwr!iHsq4C`s_}R{8jXg-VV>t% zmL*9NMNt@rK@fPJ=en+K+oow6hM{Sis;aUq_j)~16cdc1W52)i{gvx=wlg)YN;gKT zp37=1$${8&c){Q}g<(aS=BTbNX4POi&gvqm22q)Xqcj-CULLw>U?;v6xklg7eM@x> z#nI&|4~oReLo4z1zN2`iWNV_K@M#uAvD*)AFEAZfGi^mTB~|Ys#)qxDnHz6Pd728P z#|{iCmVjuD+bz!LSeBTk==-SaCDSEhHL^uFbDwY&H+LI=a%=d#myWSCAKL}JS;TK_;)dPh?rfU z+4%I*rQX;uGhu4HpA$ETEnuP(`K|Iyvf_8%E{qW`W_n*D`9KQYW!++ElR}HCy Ni$|B|zdyYG>0e6sV*~&I diff --git a/base/all-all/dig93.png b/base/all-all/dig93.png deleted file mode 100644 index 5c5230a354e887c6931a896a307742cee8b594a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmd^7F{|5F6h5yneM%x88Z;yj^kw*E`p%*yt(VPwmmh? zTGuC-BQETr3t{*Ue_Lwr!iHsq4C`s_}R{8jXg-VV>t% zmL*9NMNt@rK@fPJ=en+K+oow6hM{Sis;aUq_j)~16cdc1W52)i{gvx=wlg)YN;gKT zp37=1$${8&c){Q}g<(aS=BTbNX4POi&gvqm22q)Xqcj-CULLw>U?;v6xklg7eM@x> z#nI&|4~oReLo4z1zN2`iWNV_K@M#uAvD*)AFEAZfGi^mTB~|Ys#)qxDnHz6Qd728P z#|{iCmVjuD+bz!LSeBTk==-SaCDSEhHL^uFbDwY&H+LI=Z5#N#myWSCAKL}JS;TK`1dh)h?rfU z+4%I*rQX^wGhu3cm=iaMEnvX{YQ5*g;FnkTNb=Lmiw93{{~SE~=;Z9zbN=(s)@Nt;zdwEP`x^U1QE0#hzkW2P(TC~ zf+)lULv-N6+$o^Kg$hGlh~UD70v8a$5Em|7IAFpBT)1#?#g;F#m!FYg-V8Im_kEA~ zKIX@#SLWHn_a6el+2zIgGqS%!f;zoV*4uBBzX0yT)6cFSlcT`V979=_g@`=Qvn)%~ zG(}OeDu@!p2^7PDtx2XL>JpFh`R#Q2W->X9$NQq#4F=mZUB~e<47(s`J#XQ^8NU*qlbjB-G15D|~g}Dw!iEwiKE@-w+*L zuvA``IYnY6kvSfZ`~7~m+ikbo^?JQrF1xO4+jc&mH%&90PV2g^s%ktQk4B^6aG2+L zmSstjL{SumVGsnK=ee$H+qP+%hGA%$rmCte%e`Jt6vYIi=-BV?e1GM7t?kTAtI~~; zs^_vAOL8Fg99}RuPGMM)ra7vui+MGejkCH)szFp{;V2D;v6qK#8rX?%MXu3zbl*~4 zLveJu%7Y?t^3Y0rz3(WVDcPE6D14d)QSA0Z+Y3y`)l6H_O-a>zi1A_TZWhL?Ql6zk z>9GTYiX|Xg<93US1(qeIDf&L@Itl^;906VfYyg%3EkFZM1C#(mfD9l8=mU5FL^7h+ zeve&;(CDLzWAJ| zOtW`!0xy4lboWVIo_}(E`Xacwck;v8$ME5Mznz{wy7}tek3RV0ceuU>e}Dhr*Y>B2 RFGwm}KE68t<1{ooddwd_0{DQa=%G}dT@`Nx8Edx0o;SfpFMpRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxW|_p-1WFw;=0AY z#;(NW1l#3Umdwh=E#XHh33FFL`N4a zmDgoXkyuG&PN&o1aMRb^Qo3+XKq@RZcJ1? zm(^I3199N+g28bL!-_P`QC(dus?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)d_fgkT5D?%5@DgAPumb1+T7Vj$1Q-Kk05QN2zylzX5xouv z?0ak)EDDTcbR1Mw;vxb=Hi01+1b}qs03m>L$9vr2c8Pt7ZHhAw3k@^=Rm>eDWaL>#4TcrSRjUoCZdQ4wGNdE6B$M#G3UULc~xX(o+cEpt)v0S03rYf zK$3u!fd>my(u!+XS5QU})?xU^-xr?(oWa*mZpdu^(cR7Xe_UTOKd#AFz4g`A7er;6 zy^Aw={>!^0`Tq6g$4?*p96WpD?E4G;!*8!XxZkP|AAa=CPrv^L_u`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJIZ;*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*&zzryVjH!ZGe z>`Gitu+49q^fZePWw@UNyRo;)opok+sny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xv_x*OeU9Z=x)vD{d#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylalOuV=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201*t@%>@v@ZXsZe_C z$e>~gh}PKmxLjgcVw$4wqpqVMAixRWHNXyF4bTC!05w1fFb2o~Vt^rl2S6kvdL0h9 zT4B>*QD7XS9tF}v|(Yw+;}@D?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G@*EFB@I9Z5CJ#< zk_4;_JXn~LR@}g*f--`z4#QXfTzmy^20uKxCbRuVcQ@nzaec=;-;l5R;QL445|wH8 zF3#Y$-#;SBPp>Y&czW+eaP!XD&leBi^N%0goS%R5)7fXQ-u>`>_~RM%C-v)#=cEv> N9$sJm_2td8e*tvCVLAW+ diff --git a/base/all-all/digd.png b/base/all-all/digd.png deleted file mode 100644 index 1a14a7d2868c6c1f1008dcd3988dbcf5e3d88b6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmd^9F^l6y6n>jcqP-JFg$jizpacb6s8At@3Kb&J9@>q<>Np*ULxm0maUp^N3W%UW zO9W?v3mtJ`5(QMaP$7s5L0q^{aRC>GxNu>J11>J$!i9?~wtShr{EQ6qW|+sk@B5hV zF+V=OF?$a`d#NHrWPgtYb#YGCyYG{~0nXv^S5F_2qrlM|Ls^!Eh&<1;EKAcg zMNzUUh!VpI6vKh7Nv0y|5|8uwUDLdoPLGqxp(ysl;Vw-#al8t{We{|pw{YFowr8eU z>-tpFN=2E-av@10QOpG)Sdr6zB+W3%#jmY3eCQ6h>k8; zDzD3&BC(RloKC01;jrKDce~wYvstZH%jL4`y7_$Gwr$fibzN6gHJMDth5RaKVde!nk@VuDe08VvTnzjnROc4nqk>Bd;q zb6JfgIS~5}FBlxBFsw+^9M#puyc*6XSzRR6Feg@K zIJ#WrL6JClXeGWra1_s!Y)v#2KFxwCb_b#D1*YR_rmg6vr0RXd__%Yo3*%KO&r+fE z*r7qi5)iL(x5LE(%M#NReIIol1pxt00IvbI04snFparM_N`MhS1`q=b06YL<8S(3I zz~vH~28#mY7##;ym2?q-A(Oxm3<5x^bAS-Qx#vCZaJ#@|iEWBg4+{-5{!PpsBW6Ef zwm!XbsaH14O_&*Pb>bGWMJy0QL=#a&gj$D6g|Q4nku+!Dka<;PWu7J!Z(B(NkO4#h z4uB*9D+3P}rlb_tu&$ttAgsgi&wqMf0-V8jPi}~||LE>D{vXHJ%*!=-st4a*JtHpD z?0uZUFTZ|3lAl~(e*X00=ivD}XD@pEXSY}HzvzAZ(}O>5U-Gx_p0ng%`Tf(2XMgoS S`i5MF>qj@2zkTuihkpSQQet5M diff --git a/base/all-all/dige.png b/base/all-all/dige.png deleted file mode 100644 index 0b4bf792d92e0ff755c63232f1de9f619964bb8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1153 zcmd^7F{|5F6h5z^D2aGz(4e*&6i~r~1`QfCXi!?cpu8wNg(x731|IP zijq}9lo(E+7!GVrG8Ivmcw8>8=ks^7*>O5O6vcit>eF-^$Llccf}r)hmFqUPy)eyM z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y=U?{K@qO@m#H zZHcQ1Hu?2DJ+ZtQJxXPwz?YBjMrkBnKUmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0X>)N(mE|*Qy%;)pEuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxMF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WiwF$a1cqP`0MeZUgaFPB@3F_-3cC`U6lWe58fN^vm^((ye#q>6 zdhJqgY*?DGFy7CJJH!UDKnxL0L=h2c9V!(jGK@rG&VeEGs>sSbO(@=5Ndu4pL;wze zBmpY}4;H4R6*sV{po}1_!|<yZu}6{FAev&+o&RpWlZ+etP}lpU3xJz@M+~Q2#~C2`Pii2Ui!b IzJC7W|Mxs&h5!Hn diff --git a/base/all-all/digf.png b/base/all-all/digf.png deleted file mode 100644 index 3dbf8a01a98848030239ea4b26bff44874805f83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{|5F6h1GZD2aGz(4aP=Xi&g|1`QfCXi!qUp!cfq6rzAA8Wa%J!yQymK@<&w zsMG`xDi~^76*PFzV5kd%dhp;O1r3Ip;=zLp9#Zh&!9#|(_4K~p* z_vZPveg5F#0{}R`y1aNn?~iCO_wLg3=9}~{fV=Sg*~_Q&DG98=F^=OPq9}?y&$BGc zFpR28vcd@x!wKLTiml0}BI100Go8MlOpfF6p)B`guc&pr9W=@;f)7Y92vx4}Q3a`lA>2x|A4*UInx7%$to7HO7b=`8goX_WN+fJv`rfKTB9*@VP(P%gv7DbWg zd77qi91}vKC<=nW_kGuOZQHgi%P{m!h?euZN)XLYp7x%4IzL0ef~MX8GQZXn$Gqg-R+G3$Mq%m{hEH&{jV;+penQc zZJfbRKYvV0=+&LG@6I2?qfZ{g@8ACVs diff --git a/base/all-all/digg.png b/base/all-all/digg.png deleted file mode 100644 index a531502506689cc791b743064025bcfaa18f7e0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmd^7F^l6y6n>jc(A|keg$muB3I!B!p+bcU6)LoecF}DVR>$dr2r9H7hzk`8C?J9g z!70Q97dmj^Bnqf-A%Y<;RJd?JkPEml7Z)yEDB$7_T)1#?#g;F#m!FYg-VF12@B1F} zeLp_EHqRbBegFVxS5GdUk^3VO)V))3-hP+-18@pYzj%I0o&ra63}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFYi!x6|pn$>cB|?~7tL7<6g6iQ`omE`y-;yoKvFwmmb= zTGuC2#w&Ye|ex2e^{<}@-UpDSEhHL^uFbDwY&H+LI=Z^Q#;dX(`5}On!9u^vA{JWStM9i+w zY<+s=Qm<^7n=mup&xu>a2C+a45luu95o#SO6-F`)L}JdKA@i!p$~;Xd-djlnkO4#h z4uB*9D+Biyrlb|uu&$ttAgsgi@3&{41DwFO&#uXA|Iyve_aV;=xc49z3|p* z_u}c5*?aKe0|4j^o?Jd7_xmKMdw0lr^KJ4Mz#Vw{#q-DHDR4B$P?lvOBG2*Q65D(6lDXL00sb_4)|t^`xS1NxM^`! zV^`vGf^B}&q~}?DEW^Vj*p0nS?yNJrORY9Go5+}jdKqYiuZ~=kxh^JRS~*{eHjQZrAJeYPIURZn0RjZQC?WUDs7rO{dezWHKI)^E}V8 zEJ>0mio!4qg23}U*L7{%Hcito3{BHiRh4DA-|vf}m|zs0hr@&KZ(Oglow;dMx-n7p zTvlUA4#d903kJt23@g$!M|E|vs7CW?Ru@S%ipngUq`^4$^3Y8KJMpc^HHMDvTdHd) zjxJYuP$W(sT8Xa@9mO*xTN4e1PqQG3-C<~Zf$6xKX)C%Zsd^tVKJDGz(s*6U^HeB3 zc4Sbo1Vn4x?{T@rvcxn+-$z|XK|p{rz#D)az#5$d14iEx3x4fr4?v}VJu}yL2VWDBhzm2(5#2kjq z&ZpNd_1cDo33KD!oVY`55evi+(L@vxq1K^NVIspwBi*YHz9cHs z>}_1Y&%b;?k{=B&KYf1hr{Ma%i@UFS{KqhO)qD8x`p5g9J^JIj-{FT}@4Ayu{uz); O7(BkZ{O!^8_x}O_gJVtr diff --git a/base/all-all/digj.png b/base/all-all/digj.png deleted file mode 100644 index 55ae304f1f8c9dae54c1bbd66cbcdba72d13a960..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmd^7F{|WM6h7}gBOQG5G4bjmB zOXYQ$QzTXrnd9-e-|u(3-FCZOuh+}vvg^9GZRhiO(=^lRw65!_s>b8-XfzrQhk2f7 zS(YS86h&be20`F?p6j}{ZJVZP7>1^4s;bJe-0Ss3QA{w3j{W}5_gAjh+Rn_hD%}{V zdM>N6BnM*8;RS=^6owUPnxopfm{)_@IID}K8boClj?!QldwJ-lft~nP6oSOTIoZnwBtU|C|CqVJ=wqaYx_5#SZT24D%$0yF?MKnXAe$N*x1K7a>6BqMt5 z_toLk<*7B>s*N^DY`cvxtd@vmd<5HY(x zv+?PrOTDyVZo+n37gp!K#8Xg0K$5zy3M@1mFaoJiI2e{YQ5@A+RNb>!w%a0!2`6+mOdh-4GhkyJDzr1^K@%;G*-+lJZ*JnR`ar*2Oe*K-A U>EAqkL8{^E-u2~gA3uKjFTWCHb^rhX diff --git a/base/all-all/digk.png b/base/all-all/digk.png deleted file mode 100644 index 2b28b9700f6a8991628f983cacadcbaad87adb6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmd^7F^l6y6n=Y`pxYCR3Ka@bp(TR2P@zH)6@rMI_Rwu~td7%yI8yj^kw*c0sW4yt(VPwmmh? zTGuC-BQE?7D8TSj=X#wr!iHsq4C`s_}R{8jXg-VV>t% zmL*9NMNt@rK@fPJ=en+K+oow6hM{Sis;aUq_j)~16cdc1W52)i{gvx2Y-eg(m2Qkw zJ(ty3k^`~l@Pff{3d4#t%~6ZGm{o)6IID}K8boClj?!QldwJ-lft~nP6oSOTIoZnrp}V_9OFqVJ=wqaYx_5#TMr24D%W0B8YffD&K`kO9O1eE<)DNJjM9 z@3HH!X|O0Tj?r;YRf&rT4A}&RU=RS(odbjb&K>Vzi<>!iCAKL}JS;TK_;)dPh?rfU z+4%I*rQX;uGhu4HpA$ETEnBnZ#TVBPehhBzoxD7I%6|rz=U?6Y_3O!RFV8Oq4FDu|*% zp@N#?K_MPYtAYj(8VvQI!4wZFWDwL)4<1Z$i-#0Ec<_+nji>jeKckm>?&TiN`M$&b zz8{`knWy(2-UEQsi}SOm}uYufI+H0=NxNE}uOnPl2O3hO#UR5qX|xS(c`0 zilSsy5G95aD24-DlT1a_B_8MV>*@6EWO5jf_eHTA47O>yj^kw*c0tg3-okYo+n$+b zt?Ls_D-~rd%Y`HjMKKqIjOP=Mi&-{gm_AMW6y;HrLs2$>319%=VTW(lxb1Mgz*U1? zjctjG5jOetG(Aq@eHrdX!Di^Ka%Y*@ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW+ith(^?JEnc3s!D?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{>t@Q+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p7?G_gcEK5vN^nKKI6a)k~0=xm(04xDofCiujC;^5589)rs2k-!hWJIt1 z9=i^wQ!EOMV{{x;RpKH7LpFgS7zBWH=KvvqbHjVs;%0$eiA{d^;}0O0E8>GgARze9q0I3VZUx5?iC19a@n?R(=>HmS5-Be&8E}oWHQO~Jj=2q zNunqU!!QT}&+}Z@wQbupO~WuWO;c4>mgV7aD2if&QFI=S4!*x}z0P(Prd8?2RMm4? zjU_n{hYl|o9H%g>NYfnE)y1+JFJ@U?B-J=7vv8UQli15cHx2B>w<6aVIl6DDuAw-( zT;)NLIC*F#zCLmk&y;LUG!#C~f+%)Jq3s2x<7%d@=%%FVL&W&BcXun}RVgo0q4e0X zLB$dft#QA{)e6fJ(-eIlbsYr(0nPxg0d@dufDWJqr~yiV2|xxA1B?JX03sRD>v+Vz z$ELxez&J+7K~*I#A~0kV7=l3nNOukp0yy`)r#@pew!A-0GGVu)xWiil9_P^mDLVJs4J4h@-CMONl%Lh;s08h{KS0&oB% z30N6;v@j*DxPeUtWdvazhJXBX^*O)=eDnO4%=RDM{fz&|^%e8ehJ4lK*H6DBD%0$J zT);2CzDJTD-dsO^@$l#1<%5gwuRev3-~Z@`%f}Bc1_O5RF2J9kT(%?guir=^+&sCx K{{6F;-~9_yuwWSg diff --git a/base/all-all/digp.png b/base/all-all/digp.png deleted file mode 100644 index 574c644ad51674a9f51fb19365699719bbc389e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{|5F6h1GZl@s-$f(A7eMS}_+G-%MEL4(@r1?5%cDMSHLG$pS@ z`|;tGd4Bi9y8v*0`QYLax!)l{^=^~%`rG6WfZOo!i^uoLQ{ZThp)AWnM4snamZfQ$ zq9|DvM2X=9is8W4BvTP}iO0p_dNzAAogOEXLs9I9!!Av?al8)0RS>kEw{+dcw&$i< z>-tpFN=2E-av@10QOpG)bkC~YBHIO$K%mxl;?St zWl54mQ51$@5Cop*xvp#5wrQG%VQ8ABs;Vr@{eE8*#RQ}1G#KoCf8%<&WP3rxq=Ok2@SN!9y^@v(DvOXF23&r_lF z*r7qi5)iGi>u|Zmvcxn+-$z|XK|p{Lz-xdVz#5D-0&Vd+%0icVw2+3!$QN1e-m@Zh}jRA zolmb_>Xi)(6XwR-IdO;BAQp%rqKPOXLajrk!dQl(NX*$cWL_0nnWqWGTPtY*GJpuc z0gxnMW#GZWl(gaoHWic+gmoDH_SgC60B7*@(G{8PKf0S4|Bvfy=BEw$syp92_>!nh zvo~=DKmYOpNq%&B@#*8(j OF7IDm{QB9G@BRg$*<-T+ diff --git a/base/all-all/digq.png b/base/all-all/digq.png deleted file mode 100644 index c03f48f96cb8b07da3b30f6562215b6cf46bb079..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{|5F6h5z^RTA;gpg~PVQ9%I@8Z>Coph0Q%g7T{J6rzAyG$`Gitu+6WV^fZePWw@UN+p)LKomFOcsny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xP+wC@+&1$vk`@ZYC#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD>Ga=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201xO2Bl<4q~gQ=#rkmMkzphfa}ErdS4CFlX+rVdN*aI+AOdgz zBnem=h{`m3 z6KC+tuOE}-rKfV2P@a%)LAI=}Z{d=GNc<17~m#_Jk_rLxK{(eBSzYqR=P72}j M;nl@&Up#yDFN`r_00000 diff --git a/base/all-all/digr.png b/base/all-all/digr.png deleted file mode 100644 index bee312737cbb074097d98edb16844109ac547ef1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F{|5F6h5y>Q4;Y`L4!gxsGxuc4H^X1pg}ZxLGM-NDMSHLG$EzK@<&o zL{L*aD8z$FRnXu;gP|TYc<`Vh0S|uEg9jH>@Q{KB4<0hS@$|m*XY_Kp* z$Nlx$rFr_`(E|WDy*NL6PWI19Q1|YT_2%c~Z-6`S?AsSl$x+~Fj-f2eLPVbDS(c?~ znxZIK6-0^Q1d8Fn)+AFAb&1FM{AN1+IGG&A<9$)=27@k5H*vfQ!(|Y(p0{w_#;Xk<6@Q#8KzIuK1F#H^8NU*qlbjB-G15D|~g}Dw!iEwiKE@-w+*L zuvA``IYnY6kvSfZ`~7~m+jU*H*=$y;)pEIP+jc&mH%&90PV2g^s%ktQk4B^6aG2+L zmSstjL{SumVGsnK=ee$H+qP+%hGA%$rmCte%e`Jt6vYIi=-BV?e1GkFt?kTAtI~~; zs^_vAOL8Fg99}RuPGMM)ra7vui+MGejkCH)szFp{;V2D;v6qK#8rX?%MXu3zbl*~4 zLveJu%7Y?t^3Y0rz3(WVDcPE6D14d)QSA0Z+Y3y`)l6H_O-a>zi1DFww+rK4DbG@& z^w@zx#S##$vFmWLz_P?NMc+qVM?pYrB`2nGQl)j2>2;N0>aI@~UBSz?po#KS_vjQ<#Ohlttr znXON+TKVKJpYcU zOtZIf0>AzK@b;6qIQ#m=y|=;3&rW_h<-fW*|MG65Uj6mO`@4_dKD>GZ*Vp&y>mQOg QBo!{6UY`B&0gBvY!2kdN diff --git a/base/all-all/digs.png b/base/all-all/digs.png deleted file mode 100644 index 18a71bfcd84def02c1124408862d5ebc095d9ddc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F{|5F6h5z^RTA+~L4(q2(4c|`4Jv5Rpg~FXg7T{J6rzAA8WbvsDJrNz1yMAJ zMo?2csNli0DroSa!B7txTpkI#e)YGJfz^kgNF=nJiRad8NJ+dFZXiJ_Z{x{ zaesJxWuD*t@GbzHUp~5cLiTq_P`7W9_4?c7Z-86y__L=E$x+~Fj-f2eLPVbDS(c?~ znxZIK6-0^Q1d8Fn)+AFAb&1F2@_IghGn*Z!(?e10N25MXw{g4aU?;v6xyI1ZeM@x> z#nI&|4~oReLo4z1p`&=FWNV_K@M#uAu{#WHFEAZfGi^mTB~>3F#>d{>t&CTtyhw%8 zV@C!ROF*>7zQ@%H%M#NReIIol1pxt00Ivad0Be92paG}>N`Nsy1`q=b0XzUA8PV%- zz^=pj9E$?u7##;ymAHt&kV#+&1_2<|IY0>D-0&WI+^w)Hu}N{}VWDBhzlphH#O#O6 z&ZpNd^~#2&2@B(GpSVM85DUZ*(L@vxq1K^NVIspwB<36#GOvoP%+rM8t(7zY89)T! z0LUd^W#GZWl$7EIHWic+gmoDH`Oo>M0B7*clPl8Oe{?rJ{vXG4=En_rsykml`kbgt zvo~=DKmT&?=99R*c<}W0PrlK(B;IUfC_CQhzbQ-t2~N<|sVav@1WQOpG)Sdr6zB+J~%#jmY3eBExh>k8; zDzD3&BC(Rl9FNESe!tu8w%hG`yh5RaKVdUau#LVuDe0?Du!RzjD3KcBZCP>BdOa zb6JfgIS_jeFBlxBFsw+^9M#putQt(mSzRR6AS$zPlm^4t%R@H}?8LVs*XTRCZ>g@K zIJ#WrL6JClXeGYhcNEW*Y)v#2KFxwCcKf021*YR_rmg6vr0PAy_^@?1bK`X>Pg9}v z*nvUC5)iF%yT$n&%M#NReIIol1pxt$0B-;`084-lparM_N`N6i1`q@E0XzUA8PRLM z$HfAh28#mY7##;ymAHt&kWF9+1_2=5IY0>D-0>c^xS8Xk#5To=hlPe2|2F0h5wq(v z8=qdf)N31NCQOZYbK(ZEMJy0QL=#a&gj$D6g^>&ck(je*$h<1DGEWnVcUIB>WB?I> z10YGj%D}yaDQU$OtSTrY2nk$be{^><{vX#@%*z$|s`tNs{EVnf zvv+Xr$&wl>ogHw3<&%Iy%y4G$; PC0stby7=|s&A0yoBkN=6 diff --git a/base/all-all/digu.png b/base/all-all/digu.png deleted file mode 100644 index 47c97d1f442ce7b3a2bd00b1a906d500b62f88e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F^l6y6n>lKPJ1U7K~!jo3Ka^tP@zJF3Kb&J9=eT|)p1%7hYB4C;zET23W!7j zEfJhKTqxkeNpzsXg$hAjsBqyz#T70LapA&+4_sWpg$ox~Z22;K`577J%`n4z-}jjB zW8S{FG0&fV^%MZkubyANB>N*0)Y&On?|(`@0Gz^$>)U7KC~!2#P?lvOBG2C?1NQ65D(6lDXL00saacKC6P+Xb%YxN31x zV^`vQgl&G`q{m6TFT>p^*bKc@?kqFAORY9Go5+}idKqYiuMS)#bL7O9LbK-^qN59z z%Ih+xNUS6>$K!Fo-|u$2?RL9fub0c^VzKDDZZ?~>ZQC?WUDs7rjmP8BXfzxS^E}V8 zEJ>0mio!4qg23}U*L7{%Hcito3{BHiRh4DA*XxO*m|zqg`~98ouUxOQovCS6x-nAq zTvlUA4#b|r3kJt23@g$!M|E{Es|M3?Ru@S%h{`M+rNJ=v^3Y8KJMpc^HTsV3TdHd) zjxJYuP$W(sT8Xds9mO*xTN4e1PqQG3-F|3$f$6xKX)C%Zsd^7FK5X61+<0Hg(^M!u zc3@Dk1Vn4xZgD=xvcxn+-$z|XK|p{bz(;@$z!IPXXaQ<~5?~0B0mJ}(01tpjM)cb6 zak0Rr!J@!8M#n)_B`zW`WD*#HK>$c~4iEx354?vhZsxcsu}yK}VWDBhe~P(7#O(Ua z#;2Dq_1=b=2~*>9pSVG65evi+(L@vxq1K^NVI;#qBH${vXHp%x^35R8M|*{)(tf zvk!3sf4;kT_$00_zqvj8BY6GA$(!@*YyR%*)Ai%Ww_l!JT>O4<2Qc|?_Ui7@&%cmV OxO#ST`Pa9vfBhFmdtv(k diff --git a/base/all-all/digw.png b/base/all-all/digw.png deleted file mode 100644 index 5afef7cacfc0688ee9ab6c54b772b1281112a308..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F^l6y6n=ZlMRz9_6)F@Wh!%9gEM`3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@i?E~Pp2Oylf!ttFN)n@uuao-952JL3xd}37Ovaa_RKVE zU7u)LsVHMvE+lCvin$u*vVI>2VV8%WyXeHbZZfJIl;&Q>%&1X=F@7y$rO%R|l?=IdWo4q1p2d(a{A< z<#m};Bvulc$$-t5>-9uYOfZU${r=APSFYFE&djtb-59BQ zE~~L52V&3R1%u-hh81a=quRQdSA*F&tBa%>L}eC^(qI^SdFZBro%mMd8huCiE!8y? zN0+NSC=w?Rt;E;+j^de;t%-)hr&$oiZa=iWz;s;Av=!ZyRK157AGYphVceDSEEP(R z9T-$B0nr+_TU;!#EHO>d_fgkT5D?%9@E%|TumorU8h{$01Q-Hj05L!xzylzX5xw?% z>^huIu_!Q((Q!~!iHisf*#w4Q5CGDh1B3w11Mgvrn+0|yHYrX#EHupc4>5O$m|dUQ z`1I1H?rfNwFf%^Ri5tWQu|NzFO+*n9Y8@&SMluXUV$Pl+^Qy?oJWVJ*T1f+t0Ym@} zfFuDc1NRoDq!m}Ns-TP@ti$l#KWAS9oWS?5ugPrx(LK!ge_Y=(zpltvJ^k+GH$-Kc zeTWnI{f|#c^7G4!FK?dw7Ti8M`T6YXia&pTdiTlskE7c+Z{X$;y#4d(;*0C^9;t-O M7uOemeRccOzXlFs)Bpeg diff --git a/base/all-all/digx.png b/base/all-all/digx.png deleted file mode 100644 index 07f8e37320385c996b47b20d1f97e5b1ed2e3285..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmd^7F{|5F6h5z^=q2i_3K~?ZK~S~0pg|8bXwaZGdO>;B<0(V|Q8XwZs0Tq6P(c(8 zY9gp99#rsPS_L$C&|s*c8a#MVX$B33n&QEO3m#JN;K4(NH=f>?{)}GkxtDu5=lc%# z`+j_MZJyox=pF!^T|T^cOzw9{P^WjudGlTJH^3cuboJx`c?ulOF_dLlh{*Fi%d#|0 zQxqkuf+#VZKrtNHnq(@XF7Y^@-%O`(CX>T>yf2E~V6aWobsR6lunU6L^A@h#*!Ijc zYh9mcTB#^wSuP}LD2lltWIUg6T+Ff|!}Mv|rznr29E!35OaKD_4?BFl#%+h|1+E(G zYHUkfjIhaXrs;7K@5^vE3N}M;l{?GKZd0p?&1qyzLcI*M!dC~bk~wl>OQG5G4bjmB zOXYQ$QzTXrnd9-e-|u(3-FCZOuh+}vvg^9GZRhiO(=^lRw65!_s>b8-XfzrQhk2f7 zS(YS86h&be20`F?p6j}{ZJVZP7>1^4s;bJe-0Ss3QA{w3j{W}5_gAjh+Rn_hD%}{V zdM>N6BnM*8;RS=^6owUPnxopfm{)_@IID}K8boClj?!QldwJ-lft~nP6oSOTIoZnwBtU|C|CqVJ=wqaYx_5#Tkz24D%$0yF?MKnXAe$N*x1K7a>6BqMt5 z_toLk<*7B>s*N^DY`cvxtd@o!@85HY(x zv+?PrOTDsTZo+n37gp!K#8Xg0K$5KmR%V65s^BeSA%3`;YE+#{c8`n)zu(zUuC?hhGtu zY4$cw;Fp&llH|vi7hgO%{W*C0&dCpFS6BS^pL}qBe*XOQod4_(xPSHD=byq~zu#T_ U_Wn07Ni|$PxW4%H{?ix#0(JyrZvX%Q diff --git a/base/all-all/digy.png b/base/all-all/digy.png deleted file mode 100644 index bc5dd6bbaeee4f0252e1a133213e98ae8d605cb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmd^7F{|5F6h5!7eM%yX1`SH9L8WT(ph1HM4I0!|FDS2iJcTGAiUtK#>VgIZR1igj zN(C{&g93({L}icK?VZ= zeJ>tenVox|+yj8l#l!Q*Rp#`6is#Vi{#Opm60it;GRp(q=`1TX;bu*0_-Y?rv1mB{>kg4lfuSr!cHY(;T&^i&@p5jZ#S##$v2Afa$FjsUMc+qVM?pY(4fJC1`QfCXi!?cpu8$Pg(x731_cE5a0eAsP>TjZ z6=I496+F1D0)lwZV5kQT9z3{^f(AoP@!-J)4=EVx!9#{Op5B-Kj9%`!mwPzp`wsW} zet3FipWpxFJ^-9wKE8NH?>jV@ySM3i{ayMOz-@T?XhU;RJ9E#nxm~5ph1ho=)FSCdcvkP?r0_V3%c^Bv}#CMbR<{7QWxQ?##9u z)0`MarDOo!t;dV`YanVOu#T6!?*x8fCYfZJ-*xEuEWg&*DZDp zE-PG&ur02q*=dp-DzYC%+hMRSyjAWlGp9}LX>3i1Sw%(}>H}ZPJvDU|V)sHz_Dspq zMN<_tg;!+mbUGalhy8xP+wC@+&1$vkx^B5#&gb*CZKu;|(=>HmkH_QDXfzxSi=xQ$ zJWbO$jtL=A6a_)x`@ZYCwryLMWf+F8>#C~udOcZ|Q;g$NzrPQ|wI3{9Z)Q8SX^nKV zQ1wJnBe~~^k|hWl$IC1$Fw3T#*Mr$OZ_2bD#8pm4Su{+7g7{hFrlAx2R^Ky2NB1qw zGu66?%G4`}lZIyB(*j#@4cXGfERW*E?-MtOY|l4rS2JxzH+zW5ap!Lr*4s**Wl|OJ z1B*!%pjzW@hl>SP6=oTRA(|#i5(1n6-T`a@Rsc(Y7N7yB0EPfLKmyPQ2mq*LRIkGU zyAG#QEK5uh^gPsc>LLn5H-(`X6o7UY00h9h;XUqfyTGo(Hp5APrGdHlJ`s*Fx9@Y? zkX`xATNmaw%&ZS{;uf(*ED;H!jVL2RV?wRNNQHq+&Dpb5QI~mDWGTf5D;WSPfD9l2 z&?I1O;laU-w&EJrHB>Q>hLAu0KK}yX48D1GMQ8hu?qJ-_>N^y1dptMiAy{SI$Fe(=-7k6zvpm|O7YxA*2(|B% Date: Thu, 26 Sep 2024 00:40:53 +0700 Subject: [PATCH 20/55] implement monsec and time HUD widgets --- base/all-all/sbardef.lmp | 127 ++++++++++++++++----- src/CMakeLists.txt | 1 + src/d_main.c | 6 +- src/hu_stuff.c | 4 +- src/st_sbardef.c | 88 ++++++++++++++- src/st_sbardef.h | 43 ++++++- src/st_stuff.c | 236 ++++++++++++++++++++++++++++++++++----- src/st_stuff.h | 2 + src/st_widgets.c | 111 ++++++++++++++++++ src/st_widgets.h | 23 ++++ 10 files changed, 576 insertions(+), 65 deletions(-) create mode 100644 src/st_widgets.c create mode 100644 src/st_widgets.h diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 725c69cd7..202555496 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -22,10 +22,23 @@ "stem": "STYS" } ], + "hudfonts": + [ + { + "name": "ConFont", + "type": 2, + "stem": "STCFN" + }, + { + "name": "SmallFont", + "type": 0, + "stem": "DIG" + } + ], "statusbars": [ { - "height": 32, + "height": 200, "fullscreenrender": false, "fillflat": null, "children": @@ -34,7 +47,7 @@ "graphic": { "x": 160, - "y": 0, + "y": 168, "alignment": 1, "patch": "STBAR", "tranmap": null, @@ -47,7 +60,7 @@ "facebackground": { "x": 143, - "y": 1, + "y": 169, "alignment": 0, "tranmap": null, "translation": null, @@ -65,7 +78,7 @@ "face": { "x": 143, - "y": 0, + "y": 168, "alignment": 0, "tranmap": null, "translation": null, @@ -77,7 +90,7 @@ "number": { "x": 44, - "y": 3, + "y": 171, "alignment": 2, "font": "BigRed", "tranmap": null, @@ -99,7 +112,7 @@ "percent": { "x": 104, - "y": 3, + "y": 171, "alignment": 2, "font": "BigRed", "tranmap": null, @@ -115,7 +128,7 @@ "percent": { "x": 235, - "y": 3, + "y": 171, "alignment": 2, "font": "BigRed", "tranmap": null, @@ -131,7 +144,7 @@ "number": { "x": 138, - "y": 3, + "y": 171, "alignment": 2, "font": "BigRed", "tranmap": null, @@ -153,7 +166,7 @@ "graphic": { "x": 104, - "y": 0, + "y": 168, "alignment": 0, "patch": "STARMS", "tranmap": null, @@ -402,7 +415,7 @@ "number": { "x": 288, - "y": 5, + "y": 173, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -418,7 +431,7 @@ "number": { "x": 314, - "y": 5, + "y": 173, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -434,7 +447,7 @@ "number": { "x": 288, - "y": 11, + "y": 179, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -450,7 +463,7 @@ "number": { "x": 314, - "y": 11, + "y": 179, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -466,7 +479,7 @@ "number": { "x": 288, - "y": 17, + "y": 185, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -482,7 +495,7 @@ "number": { "x": 314, - "y": 17, + "y": 185, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -498,7 +511,7 @@ "number": { "x": 288, - "y": 23, + "y": 191, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -514,7 +527,7 @@ "number": { "x": 314, - "y": 23, + "y": 191, "alignment": 2, "font": "SmallYellow", "tranmap": null, @@ -530,7 +543,7 @@ "graphic": { "x": 239, - "y": 3, + "y": 171, "alignment": 0, "patch": "STKEYS0", "tranmap": null, @@ -553,7 +566,7 @@ "graphic": { "x": 239, - "y": 3, + "y": 171, "alignment": 0, "patch": "STKEYS3", "tranmap": null, @@ -576,7 +589,7 @@ "graphic": { "x": 239, - "y": 3, + "y": 171, "alignment": 0, "patch": "STKEYS3", "tranmap": null, @@ -603,7 +616,7 @@ "graphic": { "x": 239, - "y": 3, + "y": 171, "alignment": 0, "patch": "STKEYS6", "tranmap": null, @@ -630,7 +643,7 @@ "graphic": { "x": 239, - "y": 13, + "y": 181, "alignment": 0, "patch": "STKEYS1", "tranmap": null, @@ -653,7 +666,7 @@ "graphic": { "x": 239, - "y": 13, + "y": 181, "alignment": 0, "patch": "STKEYS4", "tranmap": null, @@ -676,7 +689,7 @@ "graphic": { "x": 239, - "y": 13, + "y": 181, "alignment": 0, "patch": "STKEYS4", "tranmap": null, @@ -703,7 +716,7 @@ "graphic": { "x": 239, - "y": 13, + "y": 181, "alignment": 0, "patch": "STKEYS7", "tranmap": null, @@ -730,7 +743,7 @@ "graphic": { "x": 239, - "y": 23, + "y": 191, "alignment": 0, "patch": "STKEYS2", "tranmap": null, @@ -753,7 +766,7 @@ "graphic": { "x": 239, - "y": 23, + "y": 191, "alignment": 0, "patch": "STKEYS5", "tranmap": null, @@ -776,7 +789,7 @@ "graphic": { "x": 239, - "y": 23, + "y": 191, "alignment": 0, "patch": "STKEYS5", "tranmap": null, @@ -803,7 +816,7 @@ "graphic": { "x": 239, - "y": 23, + "y": 191, "alignment": 0, "patch": "STKEYS8", "tranmap": null, @@ -825,6 +838,34 @@ ], "children": null } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 0, + "font": "SmallFont", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 153, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 1, + "font": "SmallFont", + "conditions": null, + "children": null + } } ] }, @@ -1384,6 +1425,34 @@ } ] } + }, + { + "widget": + { + "x": 20, + "y": 154, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 0, + "font": "SmallFont", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 20, + "y": 147, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 1, + "font": "SmallFont", + "conditions": null, + "children": null + } } ] } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 135b858a0..ea8d3aabd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -131,6 +131,7 @@ set(WOOF_SOURCES sounds.c sounds.h st_sbardef.c st_sbardef.h st_stuff.c st_stuff.h + st_widgets.c st_widgets.h statdump.c statdump.h tables.c tables.h u_mapinfo.c u_mapinfo.h diff --git a/src/d_main.c b/src/d_main.c index bf489ff31..49ba0678f 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -310,7 +310,7 @@ void D_Display (void) } if (gamestate == GS_LEVEL && gametic) - HU_Erase(); + ST_Erase(); switch (gamestate) // do buffered drawing { @@ -368,8 +368,8 @@ void D_Display (void) borderdrawcount = 3; if (borderdrawcount) { - R_DrawViewBorder (); // erase old menu stuff - HU_Drawer (); + R_DrawViewBorder(); // erase old menu stuff + ST_Drawer(); borderdrawcount--; } } diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 8e5004f22..9b1efaf95 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -384,7 +384,7 @@ void HU_Init(void) M_snprintf(buffer, sizeof(buffer), "STCFN%.3d", j); if (W_CheckNumForName(buffer) != -1) big_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - +/* if ('0' <= j && j <= '9') { M_snprintf(buffer, sizeof(buffer), "DIG%.1d", j - 48); @@ -406,7 +406,7 @@ void HU_Init(void) if (W_CheckNumForName(buffer) != -1) sml_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); } - +*/ // [FG] small font available, big font unavailable if (big_font.patches[i] == NULL && sml_font.patches[i] != NULL) { diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 1bdf14aae..7842648b5 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -82,6 +82,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, out->translation = JS_GetStringValue(json, "translation"); out->cr = out->translation ? V_CRByName(out->translation) : CR_NONE; + out->crboom = CR_NONE; json_t *js_conditions = JS_GetObject(json, "conditions"); json_t *js_condition = NULL; @@ -157,6 +158,24 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, } break; + case sbe_widget: + { + json_t *font = JS_GetObject(json, "font"); + if (!JS_IsString(font)) + { + return false; + } + out->font_name = JS_GetString(font); + + json_t *type = JS_GetObject(json, "type"); + if (!JS_IsNumber(type)) + { + return false; + } + out->widgettype = JS_GetInteger(type); + } + break; + default: break; } @@ -171,7 +190,8 @@ static const char *sbe_names[] = [sbe_face] = "face", [sbe_facebackground] = "facebackground", [sbe_number] = "number", - [sbe_percent] = "percent" + [sbe_percent] = "percent", + [sbe_widget] = "widget" }; static boolean ParseSbarElem(json_t *json, sbarelem_t *out) @@ -254,6 +274,60 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) return true; } +static boolean ParseHUDFont(json_t *json, hudfont_t *out) +{ + json_t *name = JS_GetObject(json, "name"); + json_t *stem = JS_GetObject(json, "stem"); + if (!JS_IsString(name) || !JS_IsString(stem)) + { + return false; + } + out->name = JS_GetString(name); + out->stem = JS_GetString(stem); + + json_t *type = JS_GetObject(json, "type"); + if (!JS_IsNumber(type)) + { + return false; + } + out->type = JS_GetInteger(type); + + char lump[9] = {0}; + int found; + int maxwidth = 0; + int maxheight = 0; + + for (int i = 0; i < HU_FONTSIZE; ++i) + { + M_snprintf(lump, sizeof(lump), "%s%03d", out->stem, i + 33); + found = W_CheckNumForName(lump); + if (found < 0) + { + out->characters[i] = NULL; + continue; + } + out->characters[i] = V_CachePatchNum(found, PU_STATIC); + maxwidth = MAX(maxwidth, SHORT(out->characters[i]->width)); + maxheight = MAX(maxheight, SHORT(out->characters[i]->height)); + } + + out->maxheight = maxheight; + + switch (out->type) + { + case sbf_mono0: + out->monowidth = SHORT(out->characters[0]->width); + break; + case sbf_monomax: + out->monowidth = maxwidth; + break; + default: + break; + } + + return true; +} + static boolean ParseStatusBar(json_t *json, statusbar_t *out) { json_t *height = JS_GetObject(json, "height"); @@ -311,6 +385,18 @@ sbardef_t *ST_ParseSbarDef(void) } } + json_t *js_hudfonts = JS_GetObject(data, "hudfonts"); + json_t *js_hudfont = NULL; + + JS_ArrayForEach(js_hudfont, js_hudfonts) + { + hudfont_t hudfont = {0}; + if (ParseHUDFont(js_hudfont, &hudfont)) + { + array_push(out->hudfonts, hudfont); + } + } + json_t *js_statusbars = JS_GetObject(data, "statusbars"); json_t *js_statusbar = NULL; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 19c043b22..4d623dd51 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -24,7 +24,7 @@ typedef enum sbf_mono0, sbf_monomax, sbf_proportional, -} numfonttype_t; +} fonttype_t; typedef enum { @@ -89,10 +89,22 @@ typedef enum sbe_facebackground, sbe_number, sbe_percent, + sbe_widget, sbe_max, } sbarelementtype_t; +typedef enum +{ + sbw_monsec, + sbw_time, + sbw_coord, + sbw_fps, + sbw_rate, + sbw_cmd, + sbw_speed, +} sbarwidgettype_t; + typedef enum { sbe_h_left = 0x00, @@ -117,6 +129,7 @@ typedef struct typedef struct sbarelem_s sbarelem_t; typedef struct numberfont_s numberfont_t; +typedef struct hudfont_s hudfont_t; struct sbarelem_s { @@ -142,7 +155,7 @@ struct sbarelem_s // number, percent const char *font_name; - numberfont_t *font; + numberfont_t *numfont; sbarnumbertype_t numtype; int numparam; int maxlength; @@ -155,6 +168,12 @@ struct sbarelem_s int faceindex; int facecount; int oldhealth; + + // widget + sbarwidgettype_t widgettype; + hudfont_t *hudfont; + const char *string; + int totalwidth; }; typedef struct @@ -168,7 +187,7 @@ typedef struct struct numberfont_s { const char *name; - numfonttype_t type; + fonttype_t type; const char *stem; int monowidth; patch_t *numbers[10]; @@ -176,9 +195,27 @@ struct numberfont_s patch_t *minus; }; +#define HU_FONTSTART '!' /* the first font characters */ +#define HU_FONTEND (0x7f) /*jff 2/16/98 '_' the last font characters */ + +// Calculate # of glyphs in font. +#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1) +#define SPACEWIDTH 4 + +struct hudfont_s +{ + const char *name; + fonttype_t type; + const char *stem; + int monowidth; + int maxheight; + patch_t *characters[HU_FONTSIZE]; +}; + typedef struct { numberfont_t *numberfonts; + hudfont_t *hudfonts; statusbar_t *statusbars; } sbardef_t; diff --git a/src/st_stuff.c b/src/st_stuff.c index 9d339576e..c9b7a1ddd 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -29,7 +29,6 @@ #include "doomdef.h" #include "doomstat.h" #include "doomtype.h" -#include "hu_stuff.h" // [FG] hud_displayed #include "i_video.h" #include "info.h" #include "m_array.h" @@ -42,11 +41,13 @@ #include "p_user.h" #include "r_data.h" #include "r_defs.h" +#include "r_draw.h" #include "r_main.h" #include "r_state.h" #include "s_sound.h" #include "st_stuff.h" #include "st_sbardef.h" +#include "st_widgets.h" #include "tables.h" #include "v_fmt.h" #include "v_video.h" @@ -635,7 +636,7 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) int numglyphs = 0; int numnumbers = 0; - numberfont_t *font = elem->font; + numberfont_t *font = elem->numfont; if (font == NULL) { array_foreach(font, sbardef->numberfonts) @@ -695,11 +696,66 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) elem->xoffset -= totalwidth; } - elem->font = font; + elem->numfont = font; elem->number = number; elem->numnumbers = numnumbers; } +static void UpdateString(sbarelem_t *elem) +{ + int numglyphs = 0; + + hudfont_t *font = elem->hudfont; + if (font == NULL) + { + array_foreach(font, sbardef->hudfonts) + { + if (!strcmp(font->name, elem->font_name)) + { + break; + } + } + } + + numglyphs = strlen(elem->string); + + int totalwidth = font->monowidth * numglyphs; + if (font->type == sbf_proportional) + { + totalwidth = 0; + for (int i = 0; i < numglyphs; ++i) + { + int ch = elem->string[i]; + ch = M_ToUpper(ch) - HU_FONTSTART; + if (ch < 0 || ch > HU_FONTSIZE) + { + totalwidth += SPACEWIDTH; + continue; + } + patch_t *patch = font->characters[ch]; + if (patch == NULL) + { + totalwidth += SPACEWIDTH; + continue; + } + totalwidth += SHORT(patch->width); + } + } + + elem->xoffset = 0; + if (elem->alignment & sbe_h_middle) + { + elem->xoffset -= (totalwidth >> 1); + } + else if (elem->alignment & sbe_h_right) + { + elem->xoffset -= totalwidth; + } + + elem->hudfont = font; + elem->totalwidth = totalwidth; +} + static void UpdateAnimation(sbarelem_t *elem) { if (elem->duration_left == 0) @@ -807,6 +863,29 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) elem->crboom = cr; } +static void UpdateWidget(sbarelem_t *elem, player_t *player) +{ + switch (elem->widgettype) + { + case sbw_monsec: + UpdateMonSec(elem); + UpdateString(elem); + break; + case sbw_time: + UpdateStTime(elem, player); + UpdateString(elem); + break; + case sbw_coord: + case sbw_fps: + case sbw_rate: + case sbw_cmd: + case sbw_speed: + break; + default: + break; + } +} + static void UpdateElem(sbarelem_t *elem, player_t *player) { switch (elem->elemtype) @@ -814,14 +893,21 @@ static void UpdateElem(sbarelem_t *elem, player_t *player) case sbe_face: UpdateFace(elem, player); break; + case sbe_animation: UpdateAnimation(elem); break; + case sbe_number: case sbe_percent: UpdateBoomColors(elem, player); UpdateNumber(elem, player); break; + + case sbe_widget: + UpdateWidget(elem, player); + break; + default: break; } @@ -846,7 +932,7 @@ static void UpdateStatusBar(player_t *player) } } -static void RefreshElem(sbarelem_t *elem) +static void ResetElem(sbarelem_t *elem) { switch (elem->elemtype) { @@ -884,11 +970,11 @@ static void RefreshElem(sbarelem_t *elem) sbarelem_t *child; array_foreach(child, elem->children) { - RefreshElem(child); + ResetElem(child); } } -static void RefreshStatusBar(void) +static void ResetStatusBar(void) { statusbar_t *statusbar; array_foreach(statusbar, sbardef->statusbars) @@ -896,7 +982,7 @@ static void RefreshStatusBar(void) sbarelem_t *child; array_foreach(child, statusbar->children) { - RefreshElem(child); + ResetElem(child); } } } @@ -945,20 +1031,20 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, V_DrawPatchTranslated(x, y, patch, colrngs[cr]); } -static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) +static void DrawGlyph(int x, int y, sbarelem_t *elem, fonttype_t fonttype, + int monowidth, patch_t *glyph) { - numberfont_t *font = elem->font; int width, widthdiff; - if (font->type == sbf_proportional) + if (fonttype == sbf_proportional) { - width = SHORT(glyph->width); + width = glyph ? SHORT(glyph->width) : SPACEWIDTH; widthdiff = 0; } else { - width = font->monowidth; - widthdiff = SHORT(glyph->width) - width; + width = monowidth; + widthdiff = glyph ? SHORT(glyph->width) - width : SPACEWIDTH - width; } if (elem->alignment & sbe_h_middle) @@ -970,8 +1056,11 @@ static void DrawGlyph(int x, int y, sbarelem_t *elem, patch_t *glyph) elem->xoffset += (width + widthdiff); } - DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, - elem->crboom == CR_NONE ? elem->cr : elem->crboom); + if (glyph) + { + DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, + elem->crboom == CR_NONE ? elem->cr : elem->crboom); + } if (elem->alignment & sbe_h_middle) { @@ -991,11 +1080,11 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) { int number = elem->number; int base_xoffset = elem->xoffset; - numberfont_t *font = elem->font; + numberfont_t *font = elem->numfont; if (number < 0 && font->minus != NULL) { - DrawGlyph(x, y, elem, font->minus); + DrawGlyph(x, y, elem, font->type, font->monowidth, font->minus); number = -number; } @@ -1004,7 +1093,7 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) { int glyphbase = (int)pow(10.0, --glyphindex); int workingnum = number / glyphbase; - DrawGlyph(x, y, elem, font->numbers[workingnum]); + DrawGlyph(x, y, elem, font->type, font->monowidth, font->numbers[workingnum]); number -= (workingnum * glyphbase); } @@ -1015,13 +1104,53 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) { elem->crboom = CR_GRAY; } - DrawGlyph(x, y, elem, font->percent); + DrawGlyph(x, y, elem, font->type, font->monowidth, font->percent); elem->crboom = oldcr; } elem->xoffset = base_xoffset; } +static void DrawString(int x, int y, sbarelem_t *elem) +{ + int base_xoffset = elem->xoffset; + hudfont_t *font = elem->hudfont; + + const char *str = elem->string; + while (*str) + { + int ch = *str++; + + if (ch == '\x1b') + { + if (str) + { + ch = *str++; + if (ch >= '0' && ch <= '0' + CR_NONE) + { + elem->cr = ch - '0'; + } + continue; + } + } + + ch = M_ToUpper(ch) - HU_FONTSTART; + + patch_t *glyph; + if (ch < 0 || ch > HU_FONTSIZE) + { + glyph = NULL; + } + else + { + glyph = font->characters[ch]; + } + DrawGlyph(x, y, elem, font->type, font->monowidth, glyph); + } + + elem->xoffset = base_xoffset; +} + static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) { if (!CheckConditions(elem->conditions, player)) @@ -1057,6 +1186,10 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) DrawNumber(x, y, elem); break; + case sbe_widget: + DrawString(x, y, elem); + break; + default: break; } @@ -1106,27 +1239,26 @@ static void DrawBackground(const char *name) st_refresh_background = false; } +static int currbar; + static void DrawStatusBar(void) { player_t *player = &players[displayplayer]; - static int old_barindex = -1; - - int barindex = MAX(screenblocks - 10, 0); + int bar = MAX(screenblocks - 10, 0); if (automapactive && automapoverlay == AM_OVERLAY_OFF) { - barindex = 0; + bar = 0; } - statusbar_t *statusbar = &sbardef->statusbars[barindex]; + statusbar_t *statusbar = &sbardef->statusbars[bar]; if (!statusbar->fullscreenrender) { - if (old_barindex != barindex) + if (currbar != bar) { st_refresh_background = true; - old_barindex = barindex; } DrawBackground(statusbar->fillflat); } @@ -1139,6 +1271,56 @@ static void DrawStatusBar(void) { DrawElem(0, SCREENHEIGHT - statusbar->height, child, player); } + + currbar = bar; +} + +static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) +{ + if (!CheckConditions(elem->conditions, player)) + { + return; + } + + x += elem->x_pos; + y += elem->y_pos; + + if (elem->elemtype == sbe_widget) + { + int height = elem->hudfont->maxheight; + if (y > scaledviewy && y < scaledviewy + scaledviewheight - height) + { + R_VideoErase(0, y, scaledviewx, height); + R_VideoErase(scaledviewx + scaledviewwidth, y, scaledviewx, height); + } + else + { + R_VideoErase(0, y, video.unscaledw, height); + } + } + + sbarelem_t *child; + array_foreach(child, elem->children) + { + EraseElem(x, y, child, player); + } +} + +void ST_Erase(void) +{ + if (!sbardef) + { + return; + } + + player_t *player = &players[displayplayer]; + statusbar_t *statusbar = &sbardef->statusbars[currbar]; + + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + EraseElem(0, SCREENHEIGHT - statusbar->height, child, player); + } } static boolean st_solidbackground; @@ -1391,7 +1573,7 @@ void ST_Start(void) { return; } - RefreshStatusBar(); + ResetStatusBar(); } void ST_Init(void) diff --git a/src/st_stuff.h b/src/st_stuff.h index eec8a7fcc..3cd9ef862 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -48,6 +48,8 @@ void ST_Ticker(void); // Called by main loop. void ST_Drawer(void); +void ST_Erase(void); + // Called when the console player is spawned on each level. void ST_Start(void); diff --git a/src/st_widgets.c b/src/st_widgets.c new file mode 100644 index 000000000..7cbcb22aa --- /dev/null +++ b/src/st_widgets.c @@ -0,0 +1,111 @@ +// +// Copyright(C) 2024 Roman Fomin +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +#include "d_player.h" +#include "doomstat.h" +#include "m_misc.h" +#include "st_sbardef.h" +#include "i_timer.h" +#include "v_video.h" + +#define GRAY_S "\x1b\x32" +#define GREEN_S "\x1b\x33" +#define BROWN_S "\x1b\x34" +#define GOLD_S "\x1b\x35" +#define RED_S "\x1b\x36" +#define BLUE_S "\x1b\x37" + +void UpdateMonSec(sbarelem_t *elem) +{ + static char string[80]; + + string[0] = '\0'; + + int fullkillcount = 0; + int fullitemcount = 0; + int fullsecretcount = 0; + int kill_percent_count = 0; + + for (int i = 0; i < MAXPLAYERS; ++i) + { + if (playeringame[i]) + { + fullkillcount += players[i].killcount - players[i].maxkilldiscount; + fullitemcount += players[i].itemcount; + fullsecretcount += players[i].secretcount; + kill_percent_count += players[i].killcount; + } + } + + if (respawnmonsters) + { + fullkillcount = kill_percent_count; + max_kill_requirement = totalkills; + } + + int killcolor = (fullkillcount >= max_kill_requirement) ? '0' + CR_BLUE1 + : '0' + CR_GRAY; + int secretcolor = + (fullsecretcount >= totalsecret) ? '0' + CR_BLUE1 : '0' + CR_GRAY; + int itemcolor = + (fullitemcount >= totalitems) ? '0' + CR_BLUE1 : '0' + CR_GRAY; + + M_snprintf(string, sizeof(string), + RED_S"K \x1b%c%d/%d "RED_S"I \x1b%c%d/%d "RED_S"S \x1b%c%d/%d", + killcolor, fullkillcount, max_kill_requirement, + itemcolor, fullitemcount, totalitems, + secretcolor, fullsecretcount, totalsecret); + + elem->string = string; +} + +void UpdateStTime(sbarelem_t *elem, player_t *player) +{ + static char string[80]; + + string[0] = '\0'; + + int offset = 0; + + if (time_scale != 100) + { + offset += M_snprintf(string, sizeof(string), BLUE_S"%d%% ", time_scale); + } + + if (totalleveltimes) + { + const int time = (totalleveltimes + leveltime) / TICRATE; + + offset += M_snprintf( + string + offset, sizeof(string) - offset, + GREEN_S"%d:%02d ", time / 60, time % 60); + } + + if (!player->btuse_tics) + { + M_snprintf(string + offset, + sizeof(string) - offset, GRAY_S"%d:%05.2f\t", + leveltime / TICRATE / 60, + (float)(leveltime % (60 * TICRATE)) / TICRATE); + } + + if (player->btuse_tics) + { + M_snprintf(string + offset, sizeof(string) - offset, + GOLD_S"U %d:%05.2f\t", + player->btuse / TICRATE / 60, + (float)(player->btuse % (60 * TICRATE)) / TICRATE); + } + + elem->string = string; +} diff --git a/src/st_widgets.h b/src/st_widgets.h new file mode 100644 index 000000000..1f98dfd49 --- /dev/null +++ b/src/st_widgets.h @@ -0,0 +1,23 @@ +// +// Copyright(C) 2024 Roman Fomin +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +#ifndef ST_WIDGETS_H +#define ST_WIDGETS_H + +struct sbarelem_s; +struct player_s; + +void UpdateMonSec(struct sbarelem_s *elem); +void UpdateStTime(struct sbarelem_s *elem, struct player_s *player); + +#endif \ No newline at end of file From efea21c5235a366a899b76bb0bd4a0d8e375c6d1 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 26 Sep 2024 00:50:28 +0700 Subject: [PATCH 21/55] fix build --- src/hu_stuff.c | 4 ++-- src/mn_setup.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 4eeb05995..564875682 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -855,9 +855,9 @@ static void HU_widget_build_health (void) } // do the hud armor display +/* static crange_idx_e CRByArmor(void) { -/* // color of armor depends on type if (hud_armor_type) { @@ -879,8 +879,8 @@ static crange_idx_e CRByArmor(void) (armor <= armor_green) ? CR_GREEN : CR_BLUE; } -*/ } +*/ static void HU_widget_build_armor (void) { diff --git a/src/mn_setup.c b/src/mn_setup.c index a1cd20a25..fb193bb0c 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -2812,8 +2812,6 @@ static void MN_PadAdv(void) void MN_DrawPadAdv(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_GENERL", "General"); DrawTabs(); From f6f14bca33a2b6f75f1fdbf2e00d95574a47d622 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 26 Sep 2024 01:44:09 +0700 Subject: [PATCH 22/55] restore (but rename) old dig* files --- base/all-all/dig034.png | Bin 1155 -> 0 bytes base/all-all/dig035.png | Bin 1156 -> 0 bytes base/all-all/dig036.png | Bin 1159 -> 0 bytes base/all-all/dig037.png | Bin 1154 -> 1154 bytes base/all-all/dig038.png | Bin 1153 -> 0 bytes base/all-all/dig039.png | Bin 1152 -> 0 bytes base/all-all/dig040.png | Bin 1155 -> 0 bytes base/all-all/dig041.png | Bin 1154 -> 0 bytes base/all-all/dig042.png | Bin 1155 -> 0 bytes base/all-all/dig043.png | Bin 1155 -> 1154 bytes base/all-all/dig044.png | Bin 1149 -> 0 bytes base/all-all/dig045.png | Bin 1150 -> 1150 bytes base/all-all/dig046.png | Bin 1144 -> 1144 bytes base/all-all/dig047.png | Bin 1154 -> 1154 bytes base/all-all/dig048.png | Bin 1155 -> 1155 bytes base/all-all/dig049.png | Bin 1157 -> 1155 bytes base/all-all/dig050.png | Bin 1158 -> 1157 bytes base/all-all/dig051.png | Bin 1158 -> 1158 bytes base/all-all/dig052.png | Bin 1155 -> 1155 bytes base/all-all/dig053.png | Bin 1156 -> 1157 bytes base/all-all/dig054.png | Bin 1155 -> 1154 bytes base/all-all/dig055.png | Bin 1159 -> 1159 bytes base/all-all/dig056.png | Bin 1153 -> 1153 bytes base/all-all/dig057.png | Bin 1154 -> 1153 bytes base/all-all/dig058.png | Bin 1147 -> 1147 bytes base/all-all/dig059.png | Bin 1150 -> 0 bytes base/all-all/dig060.png | Bin 1158 -> 0 bytes base/all-all/dig061.png | Bin 1151 -> 0 bytes base/all-all/dig062.png | Bin 1158 -> 0 bytes base/all-all/dig063.png | Bin 1156 -> 0 bytes base/all-all/dig064.png | Bin 1159 -> 0 bytes base/all-all/dig065.png | Bin 1157 -> 1157 bytes base/all-all/dig066.png | Bin 1157 -> 1156 bytes base/all-all/dig067.png | Bin 1155 -> 1155 bytes base/all-all/dig068.png | Bin 1159 -> 1159 bytes base/all-all/dig069.png | Bin 1153 -> 1153 bytes base/all-all/dig070.png | Bin 1155 -> 1155 bytes base/all-all/dig071.png | Bin 1159 -> 1158 bytes base/all-all/dig072.png | Bin 1161 -> 1161 bytes base/all-all/dig073.png | Bin 1157 -> 1156 bytes base/all-all/dig074.png | Bin 1159 -> 1160 bytes base/all-all/dig075.png | Bin 1158 -> 1160 bytes base/all-all/dig076.png | Bin 1151 -> 1151 bytes base/all-all/dig077.png | Bin 1157 -> 1156 bytes base/all-all/dig078.png | Bin 1161 -> 1161 bytes base/all-all/dig079.png | Bin 1155 -> 1155 bytes base/all-all/dig080.png | Bin 1156 -> 1155 bytes base/all-all/dig081.png | Bin 1156 -> 1155 bytes base/all-all/dig082.png | Bin 1158 -> 1157 bytes base/all-all/dig083.png | Bin 1156 -> 1157 bytes base/all-all/dig084.png | Bin 1156 -> 1156 bytes base/all-all/dig085.png | Bin 1157 -> 1157 bytes base/all-all/dig086.png | Bin 1160 -> 1161 bytes base/all-all/dig087.png | Bin 1156 -> 1156 bytes base/all-all/dig088.png | Bin 1158 -> 1160 bytes base/all-all/dig089.png | Bin 1160 -> 1160 bytes base/all-all/dig090.png | Bin 1155 -> 1154 bytes base/all-all/dig091.png | Bin 1155 -> 1154 bytes base/all-all/dig092.png | Bin 1153 -> 0 bytes base/all-all/dig093.png | Bin 1154 -> 1154 bytes base/all-all/dig094.png | Bin 1151 -> 0 bytes base/all-all/dig095.png | Bin 1147 -> 0 bytes base/all-all/dig096.png | Bin 1150 -> 0 bytes base/all-all/dig097.png | Bin 1157 -> 0 bytes base/all-all/dig098.png | Bin 1157 -> 0 bytes base/all-all/dig099.png | Bin 1155 -> 0 bytes base/all-all/dig100.png | Bin 1159 -> 0 bytes base/all-all/dig101.png | Bin 1153 -> 0 bytes base/all-all/dig102.png | Bin 1155 -> 0 bytes base/all-all/dig103.png | Bin 1159 -> 0 bytes base/all-all/dig104.png | Bin 1161 -> 0 bytes base/all-all/dig105.png | Bin 1157 -> 0 bytes base/all-all/dig106.png | Bin 1159 -> 0 bytes base/all-all/dig107.png | Bin 1158 -> 0 bytes base/all-all/dig108.png | Bin 1151 -> 0 bytes base/all-all/dig109.png | Bin 1157 -> 0 bytes base/all-all/dig110.png | Bin 1161 -> 0 bytes base/all-all/dig111.png | Bin 1155 -> 0 bytes base/all-all/dig112.png | Bin 1156 -> 0 bytes base/all-all/dig113.png | Bin 1156 -> 0 bytes base/all-all/dig114.png | Bin 1158 -> 0 bytes base/all-all/dig115.png | Bin 1156 -> 0 bytes base/all-all/dig116.png | Bin 1156 -> 0 bytes base/all-all/dig117.png | Bin 1157 -> 0 bytes base/all-all/dig118.png | Bin 1160 -> 0 bytes base/all-all/dig119.png | Bin 1156 -> 0 bytes base/all-all/dig120.png | Bin 1158 -> 0 bytes base/all-all/dig121.png | Bin 1160 -> 0 bytes base/all-all/dig122.png | Bin 1155 -> 0 bytes base/all-all/dig123.png | Bin 1157 -> 0 bytes base/all-all/dig124.png | Bin 1148 -> 0 bytes base/all-all/dig125.png | Bin 1159 -> 0 bytes base/all-all/dig126.png | Bin 1154 -> 0 bytes src/st_sbardef.c | 2 +- 94 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 base/all-all/dig034.png delete mode 100644 base/all-all/dig035.png delete mode 100644 base/all-all/dig036.png delete mode 100644 base/all-all/dig038.png delete mode 100644 base/all-all/dig039.png delete mode 100644 base/all-all/dig040.png delete mode 100644 base/all-all/dig041.png delete mode 100644 base/all-all/dig042.png delete mode 100644 base/all-all/dig044.png delete mode 100644 base/all-all/dig059.png delete mode 100644 base/all-all/dig060.png delete mode 100644 base/all-all/dig061.png delete mode 100644 base/all-all/dig062.png delete mode 100644 base/all-all/dig063.png delete mode 100644 base/all-all/dig064.png delete mode 100644 base/all-all/dig092.png delete mode 100644 base/all-all/dig094.png delete mode 100644 base/all-all/dig095.png delete mode 100644 base/all-all/dig096.png delete mode 100644 base/all-all/dig097.png delete mode 100644 base/all-all/dig098.png delete mode 100644 base/all-all/dig099.png delete mode 100644 base/all-all/dig100.png delete mode 100644 base/all-all/dig101.png delete mode 100644 base/all-all/dig102.png delete mode 100644 base/all-all/dig103.png delete mode 100644 base/all-all/dig104.png delete mode 100644 base/all-all/dig105.png delete mode 100644 base/all-all/dig106.png delete mode 100644 base/all-all/dig107.png delete mode 100644 base/all-all/dig108.png delete mode 100644 base/all-all/dig109.png delete mode 100644 base/all-all/dig110.png delete mode 100644 base/all-all/dig111.png delete mode 100644 base/all-all/dig112.png delete mode 100644 base/all-all/dig113.png delete mode 100644 base/all-all/dig114.png delete mode 100644 base/all-all/dig115.png delete mode 100644 base/all-all/dig116.png delete mode 100644 base/all-all/dig117.png delete mode 100644 base/all-all/dig118.png delete mode 100644 base/all-all/dig119.png delete mode 100644 base/all-all/dig120.png delete mode 100644 base/all-all/dig121.png delete mode 100644 base/all-all/dig122.png delete mode 100644 base/all-all/dig123.png delete mode 100644 base/all-all/dig124.png delete mode 100644 base/all-all/dig125.png delete mode 100644 base/all-all/dig126.png diff --git a/base/all-all/dig034.png b/base/all-all/dig034.png deleted file mode 100644 index 0c580a29e89c09fb9f728f1678386a033615f255..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{`9j6h50xaI@xNVPRNVBuJRT!otFUg(SYk_hNW1>w*Le0|utBFknCy3*lJ| zVG0+f7!m^(1F;Y?0gEYyFbi8)3}lKaCSYJ78<@aArr6@8JGt-uja=@zmwPzpJ0JJ^ zzI%FQo;`f@5CG0DFV3Hl`#loWgZt#Xd6E19a37w2@%#yS3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@wiyrG|k)D>^Pksief(+^=Z0|<8>HzL9p_?rR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y)S?{K@sO^aQP zs}h$JZ1bBYJ+ZtQJxXPw!r)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0X>sG7PVzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nx6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<8>*|Q=#9tF}wqaqy+_>Y3JH!^TKnxL0L=h2c9V!(jGK@rG&VeEGs>sSbO-9^VNdu4pL;wze zBmpY}4;H4R6*sV{po}1_!|=Di&OQgY2j4!sy5n}s?|-_$xuHHLU-kYs7he*UY4$em z!4E%vNRp2)&p&f$G diff --git a/base/all-all/dig035.png b/base/all-all/dig035.png deleted file mode 100644 index 39bd996d519d948aac0c96022847801cd30ece7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F{`9j6h1FY;%3dmLWs!`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKX_|Ml*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*%GuE)(1*Ddxn zb|o$+*ycA)dYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WiwF$a1cqP`0MeZUgaFR%+~W?nOYBQ*Q=EBNXqfTuV(u6*`ysRS z>6J@e+psWUZrt(2En$2cie9I{ZAJ-H`JHpt3Lex>32kBn!SxP z_~qA6Nb=F;#p4(Ee-8d--unnu`26~V&tAeGpT7R$EB?3FXYlB+kAL!9=OL+t%O_VC KzkmJm$NvEOL}Hcz diff --git a/base/all-all/dig036.png b/base/all-all/dig036.png deleted file mode 100644 index 9ec3e5a84a72318e7c34358a354cf95e4c65129e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmd^9F^l6y6n@7hr@d1a7b+B@LIe?9s8FFog$gC7J+vEz)p0ryL4`te;9?4eC?F0M zf~YXT2Rd-!Bnqf-p~4U!s4#~M7h5=Bhzl1k6mW3?C%ABN#a{O^yMH6Yycy;(?|UEf zeauf!uB@|%pF9MBv&)O~r*!|226K8s*P9o~UjQfY*YCG!x{2czAbUHnj4H(8}7?)uj01Lnbz{3vTZm?bAW{&Fy zmo+X*oDZ?dZzkz+9PdlA8;09~zs}uN<}6aXiLFUwj)_r*dJ$-SPt9BQFrOxqq-0%0h-L7rh&1SP&t(ME>VzHRbW=+#fCX>3ZtEw7}M#JH7Fc{={ zo@H5*BvBL*Lc%cgec$su$8jvnGEGz0bxqS0Md^0Ck|ZSS9*)r=zSclByq-85ySGAog?OrJ<7qcI25o*9dIQ zGga46syr+bHz#%y7(G|@E!oi}Qx(!IjAE}x96z*NPq!S^uw>2XBF2Z-+s@7FQkkY= z>2rOPiDjT#W83070GvQs#AEM5# z*VzW_%44n_m{~A2?|9-Cu|X^l38IB4Awq3HrNK~vzC_L0H5EaVI7MJ-i#sdn01AKv zzyr`EU}fUo#*~)g8rBt*5s;dYKmR`a65t;E@bv1A+bzHU=>YeJ`HVi*gYPcBrYf`C zZQO%jfBTpwKfOHv;@Rmh;d{)k5kLC;`;%86e0%@?&wpgEPcQy4=)dy(kw6~2dHFBB P4403u&VPUO&5!>9zSd{8 diff --git a/base/all-all/dig037.png b/base/all-all/dig037.png index c57c7e83b2970cc91ee28bfbf976e84154da83c0..5ec81b0c8131438854ed1e9aa7d07109ec5ad7d8 100644 GIT binary patch delta 68 zcmZqTY~tKt&dkU#*^&A4gTe~DWM4ff+`aB delta 67 zcmZqTY~tKt&OF(f`P1Y8W^Pu7;P33JlPy^kG=K0j@%%S$@Dw=v;s1X&gKkDomJY^3 WUzvykM%RT5K;Y@>=d#Wzp$P!ns}(~4 diff --git a/base/all-all/dig038.png b/base/all-all/dig038.png deleted file mode 100644 index c622b4c9bcdc99a9efbf3fd5b09df1f6068633ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1153 zcmd^7F{`9j6h1FYaQC?n3kyRexFE|E78Vv37AEm6?u+5MtP2t>3=uK}3j>BV!NL%W zAxt4;iXkyzF@=S&Q&>zfg)AGGz(A&$VhRIOY+#Bhrr6@8JGt-uja=@zmwPzpJ0JJ^ zetvdsUYvh;4geQdPcNU7`+XAB{d?rR`62lm;2u2t{KXUU6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKX_|Ml*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*#yzryVjH!ZGe z>`Gitu+49p^fZePWw@UNyRo;)opok+sny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xv_x*OeU9Z=x)vD{d#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylalOuV=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201*t@%>@urmLsZe_C z$e>~gh}PKmxLjgcVw$4wqpqVMAixRWEx-<74bTC!05w1fFb2o~Vt^rl2S6kvdL0h9 zT4B>*QD7XSnvA%!k_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|zXty@?>$8I$3HI~o&WLm$6w{&KRSb7@{hie9=v=_%HZnB_2sKi Hzx?Sx^!s&hQZ}f7{z1+h&-}$)T z_v_1R^X&1{#{h74b$RiM+z&}mj~DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{)6*r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%rkmMkzphfa}ErdS4CFlX)@x@N*aI+AOdgz zBnem@gdU1X6$N6_Z F{|C_;Wh?*y diff --git a/base/all-all/dig040.png b/base/all-all/dig040.png deleted file mode 100644 index 5b9ebbf4b97598d03709bc4a598c84fd478457c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{`9j6h50JakJ*(f`vcM?--n>ly1h@~+zJBqPJOz&C7|OCNMC5s%Wm%f0 zDT319%=agXmexLe|8f$I*J z4fYi-O6>BRHa$(_Lly4JU_18KxwFdbKDD~oY$IbD>Q$f>zB+Q1%#jmY3eACUh>k8; zDzD3&BC(RloKC01;jrKDce~wYvstZH%jL4~`}us{bzR%GP1DqMJ(*0(vK)`cd7fuk zmLy3OMPV2QLEw3w>$-rF7z{*FOfZU0!{Ofd*RI#w&djuG-6&N( zm(^I3199N+g28bL!-_P`QGHX)>(OkIHAPa7qACl^G#JNT9=d5@C%zTA#?aAyOLYy! z(d9Z1ip0r7EAjQAqj;udYoej>X%5+E2ncWjcn`1zSON3^9Y6z60gM4MfEZv1-~kZHh+c;S zE|=K0SQHq?=s2jV#6<*#Yyv|t2mtBM0YU)hcJ6V9+XXHw>{6V1SZJ8>*D-gDnEjC1 z`t-`B-qXMR?+}u01BYxNlva%er8Kg#n8xEDRWsU?Hr8 zAxvRmU`PzOFolJXDJ%vu#RRsPVjxpYF@=FCHZa8$Q*80lo!s~SMlSc<%RQX)osau{ zKfSy$FE2j10D#NuXIHPt{g4Fp=$xFlKO}zxoWsi(ub+~qz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkMsF$+kTi%kCVxvDE6aKpQhV5UWef-2$r6=aNW+fXQtWc z`c%^@MVZKQAxUFV%mpFi`Gn(QmJJzZNYg$=c@*VPlnr147yx+Od_M2Gu5H_qFX&$BE` zk|c_vFbsnr@I23TUE8)z(=-f2(==68Wmz5!2BIh?7)7VyaPRvY*IU}o%(QCVC{;a| z)mV}Pap3TR!Ep-1iZsnp%chvuquC^DiliPzRTh?MFpj-Ebko32d@FK|p`-hj>Kclp z%XJ z3@Vm@XpMc3iv?B{rYZV9>N*Mn0-ONe1MC3S084-lpaG}=#sC>W3@`-n0ElEnufqXX zD{NaV3XEfP98^`}A_7A;fgu6 zdhJs0Y?zxcGwylf4zWWl5JN;0QAC7BhgyYFhLK3jIWS~i6V_6<>)X7Az* ze*Nt+Nq%~L_2l)VUxI&`2OlFwP=0yw;)_48-@^IV58>y>pSeGtJ@|vv!S&OdtKYx+ G_RW7#$YP2B diff --git a/base/all-all/dig042.png b/base/all-all/dig042.png deleted file mode 100644 index 418d2cfff702b5336c9c11348873dbebfdd806fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{|WM6h6BT$#df)LW+n{QUsYIMZgp(QUuLgvd`$tW3vz?MHW*Gk|Jt^ASoiI z7-WhRQw$m*#S|$5PLX1YDI#n!#eh>xF-n9fR+wUnDOPwE!tuWMH@w_)FZXcHcRud- z{cv+_UOamH5dd6VJ-K{J?$=0A=V#=+{Wkd%;0$g)e)gC=1&-zz%Cam(IP zijq}9lo(E+7!GVrG8Ivmcw8)Qo95MQcAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1dYDJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+JyeQ>)DwG~O zGN@PrqBZtCE|*xAn5O9asOu;Q2yg;;39tiL19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfUy0z)te0O`&FLICG(?y<++5?3X*Db74BG|c!{F?WoZ{gB!D z^xCCf*sw5RZrt<49b$`EAclx0qKF8!4wVWM8Ac*8=fIG8Rb*wJCL`{xqyfkPA^-8CLVsE)zY)z4*}Q$iB}SjiX$ delta 95 zcmZqTZ06ix&OF(f`P1Y8W^R9m;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P}bAMF@$4g w@(+F{9)lw0jyoF?nP;3maDYLq^#l{cOjWrs{aM-vfeINsUHx3vIVCg!0GmP@GXMYp diff --git a/base/all-all/dig044.png b/base/all-all/dig044.png deleted file mode 100644 index 2b97a9f6433a5eaf4ae57d261435a12f93a104d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1149 zcmd^7F{`9j6h1F6!Ofb7g@qv&E=ZWd!otGBLbATaeK9(}J|hy?ZIlAQNHB!2^3!mF?DUXZ82(HuirmW7Bs&$BE`(=F z(6mxf=CWK!(o__4LCAPM;kcM(LxvgCv`}%{w zT+gu0@0;|zh>vA>m<9W(x6PeRW_PL8#%2>4i%>5Et?<=}t7MLx*ivYYd_#0}!BTl$ z<`jvQMCN=xACJew;V=xtZnxWPHhtfBUAJ1T+O}<)rmpL%s^;_gY&M%tr+J=dS(YS8 z6h&be20`F?p6j}{ZJVZP7>1^4s;bJeJQ|HeQA{w3&g1dH_qVRs+0N3mD&3f=dM>N6 zBnRTi;RS=^6owUPnxne9SXGndJgbYOnnYz5&eC8SdwJ-lft~nPDJj^`}xL;#mVw>W^!$QN1e;;$Fh&hazy-#mk z>a7hc6PCs!PuwH6hy`MZXd;S;Q0q{sFq2^-5_66WnO8+t=4mqG(MlSC3?Kq<03-=m z8F;iXC9SxHZ3SfnVI78l{B!jszy*B&`u36A1Hb?20_UFkoP5>C-@g2ss7$jDaRI;l z`YB0rH`ia>J^4BKm-*n6zka`Z_TA;>PanRyfWCY7e2D+NBPDS2;`aKt=imJJA7hzf A2><{9 diff --git a/base/all-all/dig045.png b/base/all-all/dig045.png index 0bd1f583d3c2773da997235c1dce816254e347ac..3413282eaf48661444e4db35d29f112326ca2c9f 100644 GIT binary patch delta 64 zcmeyz@sDGJIWr@}WJl)DlLMH!Skm|>oS$sTqM(|<#K=d#Wzp$PzclM?0t diff --git a/base/all-all/dig046.png b/base/all-all/dig046.png index bbf7a4bf52104ee7cd847c45bd0c620a2a9611b1..fee6a1fb6bbe548facef6e144d03118750eb4bad 100644 GIT binary patch delta 58 zcmeyt@q=T7IWr@}WJl)DlLMH!Skm|>oS$sTq9C8Z#K?B%37Y|@3j+@W!)H^^4gm%r N@O1TaS?83{1ONcO5I_I` delta 57 zcmeyt@q=T7IrC&^=1-FYn7LUQg1@t?PPSxGkpIEY#IxfhZ-P(mdKI;Vst054b)vH$=8 diff --git a/base/all-all/dig047.png b/base/all-all/dig047.png index ceae7c9fdedd15b499f6609606aa25389f822d04..a54d960886371f2755d307ea39e44e60856d2c07 100644 GIT binary patch delta 68 zcmZqTY~tKt&dkU#*^&A4gTe~DWM4fj8+qg delta 67 zcmZqTY~tKt&OF(f`P1Y8W^Pu7;P33JlPy^kG=K0j@e~v>cicI^pwf7xo^6AKix|Tk WRk<(QKN#yV0D-5gpUXO@geCyUx)n?S diff --git a/base/all-all/dig048.png b/base/all-all/dig048.png index f47a2cb9b04e639312edd6ae259a0857ac100302..0ee318454cfe4fedab42f7e7ce11b11d141f6cd4 100644 GIT binary patch delta 69 zcmZqXZ06ix&dkU#*^&A4bZ|N{F)}j?GYc>< YTr}X^obG;QDFYCAy85}Sb4q9e0942k8UO$Q delta 68 zcmZqXZ06ix&OF(f`P1Y8W^Pu7;P33JlPy^kw0`h2@klo?co;ccsAu71;obP0l+XkKj2IG@ diff --git a/base/all-all/dig049.png b/base/all-all/dig049.png index 186a99fffdedb04c644491f4b8eaabb104fcc9ac..335adcab1a08bf53ffb751848e39731dba83c2eb 100644 GIT binary patch delta 96 zcmZqWZ06ix&dkU#*^&A4xLnGrEHe(41fk!+%3>OVJH}C&8CkCjL!PC{xWt~$(69D@(91j2h delta 98 zcmZqWY~$Qu&OF(f`P1Y8X6_({;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P{Gs1F@$4g y@(+F{9_fY$_J`})+IV>q%w`-s&>)bWz`$@*PH2XiRmD@FS_V&7KbLh*2~7ay%^L;) diff --git a/base/all-all/dig051.png b/base/all-all/dig051.png index d316120237202b4f50c265ac62ea481e64e4f48f..c0179a0ef34060e2715533d696c4edcb74b6d83e 100644 GIT binary patch delta 72 zcmZqUY~$Qu&dkU#*^&A4|3(Q0 X4r9^gNLd{<1|aZs^>bP0l+XkKv`Q0s diff --git a/base/all-all/dig053.png b/base/all-all/dig053.png index 41446d25185055a2a8198c3a94c60a1cf3e627c5..18a71bfcd84def02c1124408862d5ebc095d9ddc 100644 GIT binary patch delta 98 zcmZqSY~|cw&dkU#*^&A4-_!;h3S|%ze(Hen6EBp00i_>zopr0Ic^KR{#J2 diff --git a/base/all-all/dig054.png b/base/all-all/dig054.png index b9ab818eb4b830c319ad7f3f9a8983b32d10d624..81f12faa53e8016627ab5b8fa5cfd427e74977c4 100644 GIT binary patch delta 95 zcmZqXY~tKt&dkU#*^&A4YS*2c@j^Z!3Hr@>Eo bKPE#4zO52@N9WJ$WdH(CS3j3^P6S!M V!Cw;ZPuyex0#8>zmvv4FO#qxO6%_yg diff --git a/base/all-all/dig057.png b/base/all-all/dig057.png index 9ad77692ef57e20897512e6432d782d3a61b30e5..157f0c4b91e1570d8c50614492d509eae11b75ec 100644 GIT binary patch delta 94 zcmZqTY~oS$sTqM($(#KbP0l+XkKHt!L7 delta 60 zcmey(@tb3VIrC&^=1-FYn7LUQg1@t?PPSxGQ2N2o#A8sz+;XgTe~DWM4fTr3kH diff --git a/base/all-all/dig059.png b/base/all-all/dig059.png deleted file mode 100644 index b6a43732e234d98c5f735026cb13bf72879a4ff5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmd^7F{`9j6h50r@MX=z!onr8v5+u@g#jTJ7LxcD_pRZ%tP2t>3|LrL7-B$z0h1UQ z!W0%$3|SW}rmz^230O=q#S~ju49OHjn8Ji9HZa8$Q*7X+JGt-uja=@zmwPzpJ0JJ^ zetdduUfh50J^)-?J-&QK?zc%$=V#=+`8xd*;0&IA`uq`j3LMQblx10n$n!kQvNTOo z6eX*IC^4KsF&x;MWGbRA@wiyr%w}(<)8k}vD9inD*k{=`N!C%+1;NVmmaf~{_S`fZ zU7u=Nr6?0wE+uIsiiIHLJfCu0!m<&=gf#6_lt)nxMcDu*fB}HVJ-*&z-{E$Nn-;qU zR~0VD*cLal>@-adRkR-myOFmkoON!mGOJC@S!_%ry$ZC_SBI{WJ927EkvZ@U(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-JAUAJ1T7K=sOwzJu+X_~sOCzHu|JRXfkMN#B= zo~CIW$59joLEw3w>$-rF7z{*FOfim6VYv7Gjq9y!XKq@xZj4pE zkkv$z199N+g28bL!-_P`QLCn0)Wi8CZ_2bD##J7TvtX2XMdW6Io%&Yn8lj{6mg*Xc zqsw&>l&MohR_g1aqj;udYoej>SsuiR8%DMln2xKNwxXMost*v8WAE;k#;Z!6XF}z% zLxV~rAX;PJ<8p~rg;|EakGhV6fB+|e*8n?!HNXm>1!w>&fDu3rkN|`L9srSy=yf_cYf z(`%P{Wy8XRxpBu6cZe-wi5MZ8h$131I@BtRWf+RYoC8DVRgsl>nvA%!k_I3HhyWY_ zNdnde9xTjAD{f#@Llr~RMA7emUpxW02VXtAzTmyPFSC6hQfBEF| G@BahTD`OY{ diff --git a/base/all-all/dig060.png b/base/all-all/dig060.png deleted file mode 100644 index 78d7a999db5a0b6dec7804264944ca7677c61a78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmd^7F{|WM6h3bk$-428B1IM>LIP zijq}9lo(E+7!GVrG8Ivmcw8)Qn&!=HcAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1bBYJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+Jyej2+DwG~O zGN@PrqBZtCE|*xAn5O9asOu;Q2yg;;4X^`P19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfTffgu6 zdhJrLY*?5uH|}`i4zWcn5JN;0QAC7Vhf0Ns3?q@4b7084DzY+9lM#1T(g0)t5r6|A zMZn6ygM}$+#SLsKC?g2#F#PME^G^WI;M-@{cie9I{Z9`#H`E7YRd0WN`8iRUW^eNh ze*NtcDZYPo@zL`KzXbm>_uhH@$JxbKFW~3L_bxyD62{8+fBx_YzA4}PEdSyq@dm)v Mlk1D$KYsD!f6QTI1poj5 diff --git a/base/all-all/dig061.png b/base/all-all/dig061.png deleted file mode 100644 index 9ee053c5d8c07b73e58dcd52535aee97dcba947e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1151 zcmd^7F{`9j6h50raP!Q=fQ89g7?3c9g@q6c3)%H8?u+61SQjJ+F~MRA3quS@un<x0V#pdWFolJX30O=qg~cnT7|0Y;Oku(l8<=8>DYkg&PVReuBbR&bo8L9*X%-*Ka6bulV{el?>&)&_tBuVjGG?J(23p~(BUi~BIkBbC9QcOl=z^v4 zy38pOD~ZhMbUGXk`~AM}`|WnSUawcHRo8Wk#iDK7rfKTBuBvJ}olYi`@pzo)d6s2K zl0;DyhG7r{p69u)YumPInucL$nx?9%EX#wzKorFUqv$jo?tOpbdY$deO{>z4iK^$a z8cT8@4jf)EI8I?$k)}DStBXZ7noqO3NUBj(X5l0a#<7=&ZW`E$Z$+*#badZRT|;qn zxypkgaq`ege0}IBo+;UyXefM|1ySq{L)!~X$JI<*(M?I!2Z-^pcXvzUwv^|oPu|4psErV5g4)w48b4(q&o))0i64}#~yb}T$R|SIPXH?XOoj3BJT@XvoPz5sXxKfJtt;C9dNf4acAqdp^F^}%;9z9K5q?0r0f zH@|*NlAl~%K7IB0m*8LKy$^4`zy0ar)6dU7`t6UW0N?if`QNv*uSpSHJ-@#E{nS+v$DpZ}f7{z1+h&-}$)T z_wxG6>^=PWAprC)pI$s8_xmKM`}fFs^JDTiz&*JB`uP*`6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKna$o!r^m_UP!#*&aF?c=I9`Qe7X+>6EnT;r_0mio!4qg23}U*L7{%Hcito3{BHiRh4DA-|vf}m|zs027|rtuU)UTow;dMx-nMu zTvlUA4#d903kJt23@g$!N40gasD|@NRu@S%jLIw=r@<)p^3Y8KJMpc^H3p9ETdHd) zjxJYuP$W(sT8Xa@9K|ywTN4e1PqQG3-9c!3f$6xKX)C%Zsd^tVKJMJ@(s*6U^HeB3 zc4$zs1Vn4x?Qprovcxn+-$z|XK|p{Lz*~SVzzU!RXaH(}5?}<70mJ|U01tpjM)W!y zu$d14iEx3w{wp>+%B;zu}N|2VWDBhzl*tJ#Ow#m z)~8o4_1cDo33KC)CvFiN!~!uyG!aEasCB4R7|Spei8=d*%&Q_R^E4T8XC)0l1`q)_ z0Fnf(3_Mtvl2%;9x`Hx-unxmF|Mb2BID;RaUEOiJ<@Y~b;M`E3lCOI3{nKxW$~1c$ zXYlK9k4f_U^5To<_g@A7GVeV?^{2~UdgmWroc+~%bpGOlKR&zu2qOICo9&-(J}0$s N`Q+;2_bW@(cUSG3KdGC<5VcYg$e~!s8As;+C{t3u{ur%;!vT03Kt3}pnwP} zbayIDa3P2blPDm93l)aAP~pOb4z5t)5Emx6aKOa{T)1$t#io0i-M^7x-VF12?|UEf zeLp_CGEX0V_7DJ0FE7rXllwyw)X9Bv-u#gK4R9ZxJ$-Rbo&ra63}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFYi!H`D3$WO5jf_eHTA47O>yj^kw*c0tg3-okYo+n$+b zt?Ls_D-~rd%Y`HjMKKqIjOP=Mi&-{gm_AMW6y;HrLs2$>319%=VTbS6xb1Mgz*U1? zjctjG5jOeFG(Aq@eHrdX!Di^Ka%Y*@ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW+ith(^?JEnc3s!D?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{>t@Q+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p7?G_gcEK5vN^nKKI6a)k~0=x&<04xDofCiujC;^5589)rs2k-!hWJIt1 z9=i^wQ!EOMV{{x;RpKH7LpFgS7zBWH=Kvvqb36C2#mxe{5}On!9u^vA{B_J7B4*cT zHa@*{sdqNaO_&*XJaL2AAQp%rqKPOXLajrk!bpaJNX*$YWL_0nnWxE!J1c1bGJpuc z0gxnMW#Hbzl(gasRuz;HgmoDH`OoRs0Qcbg=T~>!Zu$LB7dSW67v!rRe0TAZs7$lB zaSwj^^%IhOe0lcd#mUdXzsv_8qxvoU#J@dx`sJ(h*PmZJ`r{*b`PZWdpI&c%Bb9J@ Mes%WySKqw(4co;2{MM9z0}t-A?a&f1{Us?&TiN`Oe4v zzVDx28fUlf-UfiPi^u2B$o(D(>hy%1S6|0}1DwFqPoF;`PoAaO9%Y&)B61wZFbqx8 z6h%o2FNi&sr+O?{s%Xf9CUQ8RU)A-y>GUv}?DKp#9Ck^viK0~yEPcOq-G$>cmNhes zO4FvQTFCN5l5$ZT2|~v6DaXYu8!=4K>kVkyqbQf6Y>Kh~3;-Pf4?BFj!ETA01+E)h zR@fG}7-N%N)yZ)h?TcVH_O~NHmS5;M(<9Ivyi++zfqW~sKy=jCuVNvk|AhhdQh(L`CZ(Mu*PXF7!8rG)wrx zWrjKxi9oc*uEWIwivp7bJr6Yvc^(0d0B-@d04snNpaG}=3V;zn3J?Jd09*hf8PRLM z$K?|18uJ{Z2yGh`g}8{okWF9+1_2=589)GFU(Y>sxLx3~z$U?|i@Ay^_by@&VQ)9+ zZ9RJBP;V@l8!*#vc;XhZLCg^YL<3Pkgi3=_fw2Tbfta(eOPnGw5=WB}H&#*sBme<` z1t3YlQpdfC32DVOtV<|D2&y3X{hzZZ0Jq?)XO}nJuKE2>7uZ+S1M*exfBE<`qB6}~ z$1V8j)dwVb@8bNE=chk@_}%L>fYa<>y!-JlA3Zre`QqMR-~9aBxA?=I`!4&(i|MOB QNikeJx;+2&;pZ>^1A(h&sQ>@~ diff --git a/base/all-all/dig065.png b/base/all-all/dig065.png index ee3279b4ed2a29ba52948d8fd6bdc8a34515bdbf..d0a704564f2b960c96ee0f8cf20062ce30f3a2c6 100644 GIT binary patch delta 71 zcmZqWY~|cw&dkU#*^&A4=d#Wzp$P!HHWU*8 delta 70 zcmZqWY~|cw&OF(f`P1Y8W^Pu7;P33JlPy^kbbjzN@klo?co;PZ3K$%?!SlcINj=*F ZA%@Fagr~m=@?63I1fH&bF6*2Ung9s{7UBQ^ diff --git a/base/all-all/dig066.png b/base/all-all/dig066.png index 2c0063341a5478900caf54b2e48d156689437a1a..35e0103c48189f4ea2914535b05162cd92d316b6 100644 GIT binary patch delta 97 zcmZqWY~kEs&dkU#*^&A40 delta 97 zcmZqSY~|cw&OF(f`P1Y8X6`_S;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P~OwUF@$4g x@(+F{9%-{2hKUXwY555W4N3;T?U@A_7`}N5d-R-T+yPX|;OXk;vd$@?2>^{J7~=o{ diff --git a/base/all-all/dig067.png b/base/all-all/dig067.png index a33176258427bfb7a76f0d1dd05a733a4578b226..dbc4c057b172b5b8c7f1f06861744be0b5c4f764 100644 GIT binary patch delta 69 zcmZqXZ06ix&dkU#*^&A4Bc_wec!U;yltYLArs3 cS(t;FVVep^ b-%*0$dy0su(b=o|3_#%N>gTe~DWM4fbZ{mfKJvf0h4D$a V@H4hYQ;sqKfv2mV%Q~loCIGaa72f~= diff --git a/base/all-all/dig070.png b/base/all-all/dig070.png index 7d33d264833d2ac4c769a066c176d76813c0a72e..3dbf8a01a98848030239ea4b26bff44874805f83 100644 GIT binary patch delta 69 zcmZqXZ06ix&dkU#*^&A4bZ{m%drWv!FTlz0 XVuRSl%EN`b8Gyjk)z4*}Q$iB}$SoD9 diff --git a/base/all-all/dig071.png b/base/all-all/dig071.png index 356006459ef400617918256fac54eb0c7cc37940..a531502506689cc791b743064025bcfaa18f7e0f 100644 GIT binary patch delta 99 zcmZqYY~$Qu&dkU#*^&A42|=NT9nI14-?iy0WWg+Z8+Vb&Z8prC@Mi(?4K z%;W?n#x`CD1{Fz%1ZL)zvn)@Vjz~((a5%(pb`R&~l?kq)K(!2>u6{1-oD!M<$*3BI delta 99 zcmZqUZ0Foy&OF(f`P1Y8X6|5y;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P|?%HF@$4g z@(+F{9_a=K52JI07h+?$yg_KjO_$gtpkfA3S3j3^P6SI#F}Csg_((UXFkfb4YvXlbP+7>K ea_9&{2ou8=1CHpmS*)iSfWXt$&t;ucLK6TBDHO2) delta 74 zcmeC=?Bv{F&OF(f`P1Y8W^Pu7;P33JlPy^k41Vx4@ksysf1g1`@?U;J!VLx%2ca$p drT>x*UJT5kq9!`!M;0>xfv2mV%Q~loCIEQ*7j*yt diff --git a/base/all-all/dig073.png b/base/all-all/dig073.png index 8c92fab022858d6592e8c98515e1f63a6ad85a81..0e035a3353beb04a1056d599afbc280c16aade44 100644 GIT binary patch delta 97 zcmZqWY~kEs&dkU#*^&A4`eR8Eyao diff --git a/base/all-all/dig074.png b/base/all-all/dig074.png index 2d565b775eb185077a3ecb5e5979a52575beb71a..55ae304f1f8c9dae54c1bbd66cbcdba72d13a960 100644 GIT binary patch delta 101 zcmZqY?BLvB&dkU#*^&A4b|m|@lsAyCBJk;2r;#IR})`+EDbrddGM44$rjF6*2Ung9?g B8xQ~h delta 99 zcmeC+Z0Foy&OF(f`P1Y8X6|5y;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P|?%HF@$5L zYR5)i1_qv{AOEH7m&`I!5Mp-Jng$2|9r6~&R=h{fr=SCUHx3vIVCg!00Pw; A;s5{u diff --git a/base/all-all/dig075.png b/base/all-all/dig075.png index 64d21cd2b96b834c753883775d2055e6cfc2d2cb..2b28b9700f6a8991628f983cacadcbaad87adb6a 100644 GIT binary patch delta 101 zcmZqU?BLvB&dkU#*^&A4oS$sTqM(+*#Ms6wFp065g-MM~jZJ}pA@vID U%IgQW6fgjRr>mdKI;Vst0C)2e(EtDd delta 64 zcmey*@tz2S fK|xTBZGjNO#RHtXZ7dFSG5~?6tDnm{r-UW|RY(@Q delta 75 zcmeC=?Bv{F&OF(f`P1Y8W^Pu7;P33JlPy`~4OLHVbZ|N{F)}j?GYc>< YTr}X^obG;QDFYCAy85}Sb4q9e0942k8UO$Q delta 68 zcmZqXZ06ix&OF(f`P1Y8W^Pu7;P33JlPy^kw0`h2@klo?co;ccsAu71;obP0l+XkKj2IG@ diff --git a/base/all-all/dig080.png b/base/all-all/dig080.png index 65060657264389ac6894d96880512dd4b74957e7..574c644ad51674a9f51fb19365699719bbc389e5 100644 GIT binary patch delta 96 zcmZqSZ06ix&dkU#*^&A4zopr0AhU^KmY&$ delta 96 zcmZqXY~kEs&OF(f`P1Y8X6^un;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P|nlEF@$4g w@(+F{9_a=K52FS_fd)w)1tFE+@-9paS6W0(dVN;C1*&B5boFyt=akR{09tt%3jhEB diff --git a/base/all-all/dig081.png b/base/all-all/dig081.png index 79edd96eff57551033722107e8767d188373d42b..c03f48f96cb8b07da3b30f6562215b6cf46bb079 100644 GIT binary patch delta 96 zcmZqSZ06ix&dkU#*^&A4%$#04ikgboFyt=akR{08G^vjQ{`u delta 96 zcmZqXY~kEs&OF(f`P1Y8X6^un;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P|nlEF@$4g v@(+F{9_a=K4-_!;h3S|%ze(Hen6EBp00i_>zopr0Ic^KR{#J2 diff --git a/base/all-all/dig084.png b/base/all-all/dig084.png index 4911d08dfa95e995665711b531040844777ddc71..512b83d067ebb2b11e5595af5151977418a8a172 100644 GIT binary patch delta 70 zcmZqSY~kEs&dkU#*^&A4==N+)78&qol`;+0QV>rx&QzG diff --git a/base/all-all/dig085.png b/base/all-all/dig085.png index 8494216a9545abe102354bcced9d4c58066c27ee..47c97d1f442ce7b3a2bd00b1a906d500b62f88e9 100644 GIT binary patch delta 72 zcmZqWY~|cw&dkU#*^&A4kiy delta 71 zcmZqWY~|cw&OF(f`P1Y8W^Pu7;P33JlPy`~bwiIBGBPmm9NO?Jy!r5bP0l+XkKUCS7# diff --git a/base/all-all/dig086.png b/base/all-all/dig086.png index 572b48cc47ca6675e1298dd556f03f5c4a0c1948..b824ae72d06a3efbf9111397366801eb23fe5558 100644 GIT binary patch delta 102 zcmeC+?Bv{F&dkU#*^&A4?tt B9Sr~g diff --git a/base/all-all/dig087.png b/base/all-all/dig087.png index b8f2c9473275313a84a1d47d7ffd8ebb02685241..5afef7cacfc0688ee9ab6c54b772b1281112a308 100644 GIT binary patch delta 70 zcmZqSY~kEs&dkU#*^&A4Ob@?%u?gHwUPi!PC{xWt~$(69C4j B83+IX delta 98 zcmeC+Y~$Qu&OF(f`P1Y8X6_({;P33J3=9mM1s;*b3=G`DAk4@xYmNj^P{Gs1F@$4g z@(+F{9_fGo?=z@0HZ(r8?`YVh_`+Vmh=D=yi^w$gne&5zY8gCT{an^LB{Ts57{44g diff --git a/base/all-all/dig089.png b/base/all-all/dig089.png index fc7bcb6285d1448f2e67e932528c000456689fb1..bc5dd6bbaeee4f0252e1a133213e98ae8d605cb6 100644 GIT binary patch delta 74 zcmeC+?BLvB&dkU#*^&A4zfg~b+A3}lKaCSYKS4NNh`6dQQyPVReuBbR&b{*VOq=$xE)uamz3&f(_km(R&l;AoDaEXzVfp66MXrD>X? zC|MOmiQxo_;lS1;QxSEE$Hn5VY2MFf$LaJ?6#LPrPt$E2ufuQ^1fAzCUAMLExoOtA zKGU>PQKqt7NYYpob3w>>KH<2SWkZG;(zH)e9z{76WdoQ11^^!S_->2+3b#w#w79CV zD{(o&Hot4q(=0xe;eHbA#@;4()|uUmN3N1Na$-xNIq(h9(FIH8 zb(vEnRuY-h>2x?8_WOO`_uK7uyN^hPD@&j;oorqMMSc4-n&H@9vhy+ftsVLg}$1 zgNh{}T4Ueia*1V$X^Os&x{iW?04IQV06Ty+KnKtQ)Bq*G7$5_P0fqn`0FjL7bvWQ^ zg-wG+fpLtEgQ`kgL}17!Fa(1DknS8H1aR)>9(&v^aaCfQ;>^QB!;F6)bH|9;51E}$ zuU+b`4GRA-0GGVu)xWiil9_P^mDHVI&fB4h)%BMONl%GUCBX8h{KS0&oB% z30N6;urMX9xPeUtWdvazhJXBh@fE-syt=)9;C9dNf4acAqn?qk`sjxj-x8H+_CC(w zw>O`VB!6}J#mh&(2LCc2Jh}Pt{Fm?lgr{e>Pd@(qo2T&R*=PTpzn)5@46dGEU;h5( HcR&3Hzx81; diff --git a/base/all-all/dig093.png b/base/all-all/dig093.png index 4e96d82a4b09b60fc0dca1c414a8d4cd5a233282..5c5230a354e887c6931a896a307742cee8b594a9 100644 GIT binary patch delta 68 zcmZqTY~tKt&dkU#*^&A4m60VE_V8S3j3^P6VVL;e++e{(X@wlNw*L&N W+og6p{IRKJ00K`}KbLh*2~7asj}|%r diff --git a/base/all-all/dig094.png b/base/all-all/dig094.png deleted file mode 100644 index dbacc9faa20544188dbe68293ae0e3b0444c9ae2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1151 zcmd^9F^l6y6n>i}=t*R5(QMaP+^DcB|?~7tL7;MvY9mmTs?1G^6yoKvFwmmb= zTGuCVBW&{9X?mQ*`!d{(g3Zud<<2s*+tg}ea~c_wP%i_m@YR8-BQE?7FUP+xdLnG|hB6t?Rm~s_}R{8jXg-VV>t% zmL*9NMNt@rK@fPJ=en+K+oow6hM{Sis;aUq_j)~16cdc1W52)i{gvyrwlg!WN;gKT zp37=1$${8&c){Q}g<(aS=BTzV=G9;}&gvqm22q)Xqcj-CULLw>U?;v6xklg7eM@x> z#nI&|4~oReLo4z1zN2`iWNV_K@M#uAvD*)AFEAZfGi^mTB~|Ys#)qxDSr~6hd6o*L z#|{iCmVjuD+bu2@SeBTk==-SaCDSEhHL^uFbDwY&H+LI=Wgy{i<<>@B{nHeJS;TK`1dh)h?rfU z+4%I*rQX;uH(_Sn^TZ8egIFMjh$ffQJH4% z;sk#E?FlJf0+*+fBxO+k8l5YeR6sJ>G?{e<%22VE_OC diff --git a/base/all-all/dig095.png b/base/all-all/dig095.png deleted file mode 100644 index e8c95bfb8af1dc1daf0a9fa33289f67fddf7a945..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1147 zcmd^7F{`9j6h50J__F32u1kMn)6 zp52(2k3M_^0GHQKubz|pT@uvALvr4}O#TLV2+zKJ@q|1Dj^-H3vMfa8d7foinx-j= zl2t*J7*3!V4s1;_6;YRXT&-@K=Ivr}n$M3#ahOboG~LDVCJg%^=sa)jx~*+5O|#bZ zg{GB?GMD8-lBS}V3qr>83CG1O8#2t8rhSU?D9WKI8^8oG0Pu9cH#;19+^uojVqard z;(CT{e%qwyMSLv7!z|cOy>0GnGP_HyHa45cScG~RXoas%TqSel#Fj#H$=ry)wXTZG<989RW+Z_XS3OKI?eMu%d#X% zq9_W(FbD$A^IX@pZQC?W!!R^WQ&m-#<m zB{>jB4lfuSr!cHY(;U^+#j2Vt=UH7O)g&sjaFzzs*vmsV4eZ3XBG(u@x^Jnjp*Xr+ zDSEhHL^uFbDvt&H+LI=dSN*!2KHg65A9P9u^vA{M(p2Ma*H$?0tIU zQm<`TnXokOdEy?iMJy0QL=#a&gj$D6g_#T!k(hI2$h<1DGEb8h_g2yXWB?I>10YGj z%D|(ADJjJ*Y%3@u2z~Un03N{i&u{Lz-SPXME^uzCPspg=`|jyiL}i-2iwE%2 z&yPv+gX^o$UR?Yb{L8%a{%?O?ehS|xWNLr>{?RYa#~0s{4{-hD=IYnazy9GrhM8a7 diff --git a/base/all-all/dig096.png b/base/all-all/dig096.png deleted file mode 100644 index 72f2a44fae3db478e5ceec099ad264382433cdef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmd^7F{`9j6h50JxVz>d#KI*OE=ZWd!otGBLbATaeQ|j%>w+W}1}vtqFknD}g-e7C z$rQp)F-Z(qOkp8p3X3VGm|_cyflM*Q6b7c)fW;J3Z1Ga%E*R~@#wQh0B~{j{PGpKKPEvvxKGZT?~}g(?!(I$ub+{pz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkE_*9(|lMgPV@Ot6vxS=Pt$!IZ^N()f{o{`UAMLErD@i> zzR>KH<2SWkZG;)3i@f9z{76WdoQ11^}Lp_)43cs%xfzu)h-+ill%o6TmmTD5K4G)-OCRaMRB^Vw`Rolf&S&$28@ zk|>J8Fbsmg^E}seZQC|Y(=ZH8(^OTJWqC9jiK3Wb6rIQ8qwnurZ(}=4)2ei1rs}z@ z#*!R}BZn6Zj#C&`q-l=Y)WxcrEazEWB-JD;vv8IM)7Z;HHx2B>w<6aVJGyVFuAw-( zT;)NLIC*F#zCLyo&y;LUG!#C~f+%*!q3s2x<7%d@=%%FVBgFXByN9*$u9TOlPT~i{55Il>6;YXHZ{r^P z_WNU!e0+8J#p?&Z2LCW0eS+$ns~<0(eERdhi?{Gg_vGo3}smsBJw=XvMf#0 z6h+CZAW94;Pz(pQCYg$;OFS+XH%;?)HakwIhoabzM!PiK#PKQ&`yl8%Z|SRp#`6is#Vi{#%#fyiit;GRp(q=`1TX;bxX0HU-1WFw;=0AY z#;(NW1l#3Umdwh=E#XHh33FFL`N4a zmDgoXkyuG&PN&o1aMRb^Qo3+XKq@RZcJ1? zm(^I3199N+g28bL!-_P`QC(dus?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)d_fgkT5D?%5@ETwXumb1+T7Vj$1Q-Kk05QN2zylzX5xouv z?0ak)EDDTcbR1Mw;vxb=CV?Rs1b|fM03m>L+xNJ`?GpPE+Z1OW78+*!+n75>%znsh zeR}0muWVSDFgNaa;uf(*ED%FP6H!EjT8B!7i3}r=m~&vryehIXPm>mRR?+}u01myQi^L>S5QU})?xVPo3k$g?!kB0S9jcQ`Tb7^I5*TMmX{pb4fSCR^s NPp-~?`{J7){sWcaW!nG% diff --git a/base/all-all/dig098.png b/base/all-all/dig098.png deleted file mode 100644 index 2c0063341a5478900caf54b2e48d156689437a1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F^l6y6n>lK(B_my0Tl{SAvh6Ss8B!<6)KdR_Rww=R>$c;1Ql8k#DxM1=s*M& z3a7#Z2SjjT5(QMaP+>S1Djaa3;tCb!;=+Xs2V7jhg$ox4*+7by+5Ht7MLx*ivZrd_#0} z!BTl$<`jvQMCN!r?)UrMZnxcT*X#9ix$L^GZQJ>L-Zag0I<4!vs;cpLJQ|IL!(pE1 zS(YV95=BuMhCvW`p69x*ZQG`48it{1nyRX@EcbdnQ4|x5qGP|m^Zk|UwYD=etx7jW zs-DYgEXje`b9lkvIE7(Fn&zmsF6Px>HqPoIsRmJ*g`+eW#$Fz}X<#S56}d*=(S1vG z4aL#rDi4ap$wMpg^}eHcretfPq3~%IM6ufsZ7(n#S2JxzHzif?A;yQTyIB~oOL>+G zrN<5oDwcp~joU3Q7Fd>;rs(^q>nI2aa0GY@umM;Cv;Yl24Nw9M0WyFXpby{y5Xp#M z`#p9YPN!HD7{};1sH((81cpokLof&csm=jH0OzjnVT+pub|p3`PCP6$%=mXPcZir> zpV|2I(xqP8FgIal-1Ec@VuM&9hKMGjhzPX~l?o#n1|l(M&yaalWM!TvE$*$P0muL% z00%%W0V@Od7N(>WSFoy}j3BJT@Q=UFzXUje7tgNmx!v*mpAK+tsZYpLz5m_i*F#NJ>DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRH|QJIC4G#JNT9=d5@C%zTA#?aAyOLYy! z(d8-+ip0r7EAjQAqj;udYoej>X%5%=i)Pf2k`atn|p3|{Qjp4oLlN+@>TDBb@c^NnP%_e z0sQ#WW0L&n`ts8k=RX8*nRnjjU&7TVFaLb_@VE1`C;#eKkKyh2ALPIM@%zuD5U!uz LT>kpx%WwY!tafB2 diff --git a/base/all-all/dig100.png b/base/all-all/dig100.png deleted file mode 100644 index 11e09049b215b5be42e877e44ca92d0a0fa3d666..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmd^7F{|5F6h7&rD2?7jr79>?g9xH{&>*O2HE2*1y`a1*JcTGAiUt)_@SqYER1igj zpc+i^Ac_Z*sGz}v20=Y&@Zdp11`nq7V2TG9JS5=3gNF?6c6#6Y8@=3fF89Fs&d2$_ zU!Pr@7xzB92LKmWPcEO6_d^oY-7}I;KPUeHoWZlFFCLSxz|kB-S(b%}JkPT%OVcz( zQL-wC62l1;!-1_yrXuPRkF(jSY2HsJhw*q{6uZG-o2KhHUWVZ!2s+Q3yKZaSQ`4+< zeWGclqKsv^kffm~=7Ny%e8O=t%Z3cor)i&}Jc@EC$_6k23;;ar@a-D63tZ1})#9SY zuEhBW+x*m|$4R^|!`&#@482wEEHk@Htu{8B$e4tB8EA#C4qPR3oTWEtRynW<8i;=?{>TGcDr7$m&@g1vFN&PHk-9=+cZsG*Hu-G$K%mxG#n1|JkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1Vit>xrV6U=$tu{hjZxT(7g8scBWZF;ewh zR%1yH#GbA0F{E4nGEdJi!^Y~9V=cvH&LR46@m zU{J9HL~Gn`aX!bg#56_UM_orjK!78_TYwF~5}*TU0cwB}UrkmMl3^ecbM_3GS4CFlX)@y0N*aI+AOdgz zqzG6UxVJDRt+;|!1!V+b9fp6syZ8p+4*c}|`j*=bzyIk0=R|!@R`t=3PrfB8)9g*$ zf!Dv^C&dR>mk(dueHHx6d~nWx^#lBNe$IdWF8lcG(M$N`93S3?)Ayf#`Nf}qldS_> NJ-)vD^Pksief(+^=Z0|<8>IWf}r!frR%n~JvYr- z*JqkmD#}!r3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9^Y=UU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WA{FedxcvMjyngiU&F`4MI(z4`|9tfK&wr3IxO#GZ@#f2K Ge*6yygk<0V diff --git a/base/all-all/dig102.png b/base/all-all/dig102.png deleted file mode 100644 index 7d33d264833d2ac4c769a066c176d76813c0a72e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{`9j6h50JxNptFfDl6@SV)+{LWqThg(SYk_hNW1>w*Le6D+2%Fu{N<7A~=v zU8XQF#gG`Vn8HHH1T3bQ!r~QE3}gsXOkrS(4NPDHQ*80lo!s~SMlSc<%RQX)osau{ zub*C<=Z`;n3;^d>mlw~-{VoaW(L-|HzDWKAcnD9weEx(y1&-zz%Cam(IP zijq}9lo(E+7!GVrG8Ivmcw8)Qo969ocAQQRMX?`^`ZV3f@j47wLC|^L(sf(go||T^ z>oZL&6=f>Rg(QtdF&Bi4=M#>LSvF*tAx--fO^d4< zyAqcZZ1dYDJ+ZtQJxXPwzyYPGT1M8+)C%Rno9b>u3UBPX^Lngibu9bK?g zUY9vVVkMC|olb|tVZYz^eZSpq*X#9awd%TVu~@Wi+cZsG*Hu+br_;$~G9HifJkPQ$ zNs=gv!Y~Yi!1FxUb#2==P17(8P196Wm1TJ_7>J^nU=*E(!@cisT(7g8xoK6pF;Vqg zR%1yH#DT*L2FEE3E7CMab#<|*M)PS_7fCgW$}F6u!8rEv&`kq7@vX=;hK}xAs%t2Y zE?0R_Bu*Y$iLVbG#WN*a6Agt=vmlDyVQ71S>A0F{E4nGE`T#LL_U>+J+?4V>6-tjC z8B{C*(Hi?6mrE>5OjGoI)O8dD1ULb_0oVbo0Xl#dpav)b#sC>W3@`-n0ElEnufqXX zD{LAp3XEfP98^`}A_7A;fgu6 zdhJp-HY`k-8}~eMhu9((h#{hhC?Z0wL#4t*hLK3jIWS~i6*rtp@E^DrWTgNA diff --git a/base/all-all/dig103.png b/base/all-all/dig103.png deleted file mode 100644 index 356006459ef400617918256fac54eb0c7cc37940..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmd^7F{|5F6h3L_(`(d+;Av2a22n)upg~X#8Z?MTFX+9hJcTGAiYN-zph1HQDu|*% zAsS5ZpnwNARY8LX4Tid)!Gi}CGI%i5g9lSw@Q{KB4<0hSK!?-&-rwluo_o26bH4L& zzwgzPYxC^E!v_Fxc6E92l-wVapib|T^X8}YZ-D#o>}E1~KOP@OqkUQK`u%N|t&?OKMT;QlJa6v0t!+-BoMTrL)iuIpyAS=+Xg$)stTx~@l~(Qr5%3t-?@-zDUg3Gh|*BS(&HFh&wB305X6G zzyXjXU~S;u!i==y3RX2#F+@!i{rS(?*8un6$EVkK+-~{(PZu~h)EDHdKKbGDTcR?} z-o`!n<=4+h^7E^Uub!R02|h3%eagRp%P(L2adL9{ul|}o51)Tv&QD8<=8>DYkg2_T;|zH*&e>Uhd(X?|j_v z`{~)0dH&#|2LNz>`Q+j`x!)l{-9IDe&G*UQ0B7**s~3;SQ{ZThp)AWnM4snamZfQ$ zq9|DvM2X=9is8W4BvTP}iO1#gWINpR|8w6|5Te)sy+Y8gI zb$zC3rJ_t_xsar>DCUBY@qEH@G0TPwGo)#sqCARnD9Q#f0So{<_V{XtU5mRFZX0ZC zT$i|-V3Xg>)6*r_$<9{>2x}oOvdAJp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sUIFX@HUMjY2A~Eg0mc9sKnySh@BoNpM6bgE z+ZN|@EDDTcbR1Mw;vxb=Hi01+1b}qs03m>LJNMY(euZs`O^P!Q3k@^=b<75(=lm(aJ^1eV)g8B6e*e=2&JFb``Kouneew-anPzX} z9{l>-ha@RpUVQQ5{x8A5%vkmHvEcs(b P%Hi_y)y3~$UjO(XKd)wH diff --git a/base/all-all/dig105.png b/base/all-all/dig105.png deleted file mode 100644 index 8c92fab022858d6592e8c98515e1f63a6ad85a81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F{|5F6h5gbN~1h9Xi!^0HK@gd1`UF0(4aJWL3veq3Q<4=4GL)Rpn?i2h@e5V zf|%k#g9p>9puvL%K|N^j;K4%%4W{+r!37lzO~Hc)4;fy!)BE1v=;fY!xtDXk^KrkA z`_r>)^Wwp$4*=le>gnZkvVTZ|x<4T6&FkbZfB`)F=EW0o6gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HjWX`1)*`Dr#g7R6ya?$dM^$D1(hf?(}=E7xspdtsWj zuFo~CRFs)47m_p)#as|Fo=-R~X4#NoMl|hHlt)nxMcDu*fB}G~1HRi~-{EeB+ZMYT z*Cno|*ycA)dY;F}GCWL!{lwem&L*?hsny126B+YRF9WUc)v>E&j-1$1XbyctbacT| zd0pldiIqg=d_EtK$HU>!_x*0S+iW&n*R9v<<#O4!ZPPS$T~}2#o6V-v>0~m=^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH%9a43pmf>CrHjSjxQb-lIiEKIA?jj5{V zvKmWrAPyZ~FgQ+OSdpeVYF!u0YP^_bb&*u#sLaA?8cbp@58X7d6W@wlW8~<*rMiaV z=yH_@MdIY4mH7I|Q9M(!HPKM`Gz+5G9fh_Rn2xKNwxXMost*z4Q}6Cq#@kX}q(bSj zV}pt%AX;PJ<7$OviD`lCd_lPZGffyp1h$14?I#eo5Wf+UZoI^wARgsl>nzXpHk_I3HhyWY_ zxdf~XJX)BNQryC}f--`z4#PkGx%e939(@1&`i|QzzyIj~=Z5-%Jk>|vJ$*@3rrF!L z2fzIK@$DyZb@|nc`#%T&G9Nrd_1iz;bBta+5`Xyn;iE4Hg8{tsKlx02D@sPo#%jtdZZ}f7`z1#!mJ0Iu! zUOl@s&+b3G4*+KuPtTu|_YO(w?rn0PUM7D6+=gf0zIZ~u0!MQUWmy&?@;uM7EKSoC zMaillN(?7Z3y{8FaYqd!}n|4E^s}^Rf~%n zyAtOkZ1Yo-9w+g>40oeoGxS!uv&`%+wc6NhB4ZNjWuO(lI&hWDkrP`A&7NCtr_jkU(a=p%WrlwWt#z@t3 zS&bz*5PJ?U7#ycCtVq)w)z!tU8cfGoT_n{YDzk8u2E*9PLpKfV#J3{X=sUV^sji_o zx?JT!kvMs1CBEKw6wj1wO*9lf&4MU)`=RXxrsHa+t>~tt>OI8xuyr?c<6S9FQ=#+BnVTkzBK%NuUj{Qjp0oD=nktm@v6ProB7)9iKL zf;Vp;kmBbT=U>0L`})z(znuYmboCED)PH&NaI7$LGLB7|j%6hTv@ND(z}$vz`5%Vr@+kO(P8h!`P4kQBiU zILII=rWiCriYZb=oFc^(Q%v!S6ax-2#S{^ySaHB92HfH`!tuWMH@w_)FZXcHcRud- zegE{*JbUo)0RWs`JUM?x?$=0A_wJJO`kUkrfV=SYv9IwN$3xbvBEnT;@?YU{z zx<1piQc*Q65D(6lDXL00saa_xN&)eTUm6Zd&YW zT$Q+-V4Ghz>1h@p%5Xmkc4KdoJL}9|rB)l8O=QeMy$rO%S4XarIdWo4p*ipk(a{A< z<#m};Bvulc)9G|L9QONt-}l??cD-JAUAJ1T7K=sOwoTL2bzN1}bUK|(Cgbrq&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|Rauq?gMlcD2}aRrINbaG#`RXVGdHbDHzul{ z%W5pifjDq@!QeQBVMUtes8wAos?mI!)kRW`qB097X)unxJap5*PJAnJjiICamg*Xc zqsvtu6p53ER^sbJNAXO_)yR7p<%|qin(LN?1#+G zr`IlZWy8XRxpB)AcZe-wffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%$k_I3HhyWY_ zNdi^|9xO~rD{f#@K^Z|YhC!Y|NY4#@W zz)wHFO_J|ioPY5A-j9#I`}RJ->o5Mrhx!*kym$W3)#snSzf1pq>y6Xz>|byG^6r`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJPJ9*>O5O6vcit>eF-^$Lla$1wrR|OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ>G1wU*UF%n-*6! zb|o$+*yguQdYZ+DGTcvs-PqgY&N{QZ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yW-`+mFKuGj0;YSne!VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#WF19Si_Kn+j=i~%x$7+?tC0T9WEUWWs& zR@gLH6d1?oIH;<`MFfUy0z)te0IALaLICHk@3F_-5?3X*Db74BG|c$-F?WoZ{gB!D z^xCD~*|0ESZrt<49b$`EAclx0qKF8!4wVWM8Ac*8=fIG8Rb*wJCN1u*qyfkPA^-i=U)LlfH$wM@44Oa`=2gwZmG}7s2+d+{A;2z&ECZW z`1Q9>Nb=(9@{8AxehL0zKKPh_`q|k>k00X2zY3Y$w>KBx&ENj;H~9ot&#o_j|MHuk F{saDWVXOcE diff --git a/base/all-all/dig109.png b/base/all-all/dig109.png deleted file mode 100644 index e7a05cec6ae689e2a2bd30e60438b5a03341303e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F{|WM6h6;YvTl5)2ofJpF3<@J32dNw;wr-!2GN24xHcX7N4!*vj}p0{${#;Xk<6@Q#8D>b+K1F#Ho{jKY@wzDv;N;f8| zp37=1$$>aU?;v6xyI1ZeM@x> z#nI&|4~oReLo4z1p`&=FWNV_K@M#uAu{#WHFEAZfGi^mTB~>3F#>dXxuZ)+ayhw%8 zV@C!ROF*>7uEW&|%M#NReIIol1pxt00IvY{02_c7paG}>N`Nsy1`q=b0XzUA8PV%- z!1WsEb1VvsV{{x;RpKH7LneVC7zBV+=KvvqbJO?O;eLhd5}Oof9u^vA{Og!IMod3s z_CCFFsh2h^O;{MWJaLcMAQp%rqKPOXLajrk!bFCVNX$7fWL_0nnWssMTPtY*GJpuc z0gy|;%D{t#DJjJ*Y%3@u2cm_mlb8m-k63 OTt2+I`1QfpKl}%*gk^02 diff --git a/base/all-all/dig110.png b/base/all-all/dig110.png deleted file mode 100644 index dfa03748e8b308ee63a4ea68e9092b94250f54f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1161 zcmd^7F{|5F6h0vYrBNRq1XZaZDu~n&4JuVZ6b)*l7nE0(r$-bJMS}_&JZMlr1+{1p zRD%f~1aZN%DyY;@4ThSc!Gi}uGYH~RQ#^Q3!9!X+c<_+nZ9Tp3{f%DkxtDu5=Q|(w z`<`8#8z*<(xdQ+vXOB)FllvA4>h?`?UVa__1#lBCK6~snnoF&I;v@e3)*x!!ab!M+pt4Yi{GG?JZ4Ya~nb59vMa%xMlB?d;{(*;}O zO@-4WRu&mi=pB#8{eHjO?YgepY&NUas%_h*X%>q`UDvbOtg5QAEGLu6csw4BMp>4n zX&T3I7=}R*_`dJDuH!hCWf_K{>$<9{ilRu8)bIBNL5ML7kAuO^^VW{rSoYj7OHCgu zS|%xxDEUI)=6IcD{*W|-#~MQGcoD8xkshHL^uFbDwY&Hw@c`)cl?!|f8=0_y~)F6Jtx-0O%vguUIM zxAo|iL%pzIVZdC!=80Rx8Zk!<5Di2D5h@Kz1;!E#1!B&=E^&&$NE}T@Tw6&6kN^Y# z7JwuHOC9$nCZrYDur8qpA*h1jkH1eo1-JoUK0d$ZcE#_1y1>4q?vby0zfg~b*Y1DU`OhA@FCHZa8$Q*80lo!s~SMlSc<%RQX)osau{ zKR&xLFP?n(1OP6suP&dH`&|;$qX*=?{XY2{-~l}Q`o&Z76gZk=D9f@Ck>`1qWoeqG zC`wiZQDQiOVmPoh$y7vL;&HLKZJM{U*>O5O6vcit+NJ3xj#pvW2SMj~OV@2}dv2Pw zuFo{BRFtVK7m_p<#as|Fo=-R~X4#NohBWO{lt)nxMcDu*fB}HVJ-*rCuE)(1*Ddxn zb|o$+*yguQdYZ+DGTcvs?buuA&MLFJ)M{h1iHupOmw{IJ>c~|xM^0=hGzY#RI=Wz~ zye@N!#7ZJ_I-L%O!+yWt?RJ~ZX0=-NecyH6VzFr3wrQHWuB)n=PN$Q}WIP_{d7foi zk|a?Sg<%*3f#-Ry>)N($nxgr-qjpoy=E|O{#m037RgK_NTp_>MF;#-kx3?1FKRM$`( zU9R$=NSr*h5?>!Wif2l;CK?K#W~gh}O8<;c|&(iD`rbffyp1h$14?I#eo5WEhFWoC8DVRgsl>nvA%&k_I3HhyWY_ zNdi^|9xO~rE3RQ(K^Z|*M+8Z?MhFX+80JcTGAiUt)lc+jAL3ZiJx zqbitUf(8$!RY8LXK?L=n!Gi}688jH`!37U4cu2v6DIPMsLWk4)-rwluo_o26bH4L& zzwf7K7v{LEXJW&a3Z}KLPH*v!^efkf*@W979=_g@`=Qvn)%~ zG(}OeDu@!p2^7PDtx2XL>JpE$*;UiLn@kSl@xCZ_gTXdU*KxcI!!8IGo;P>h*0!gn zS?l^l(@I4d%W@$}Ls85HA>;Xk<6@Q#8KzIuK1F#H`b=)R@8 zhT`aQl?O%Q)EDHd?!7$whNw)l z*KrGe`SoLx{Pg_v@r%1Z2mdg)AMlrO_T}XV?_YlM;Ij`u|5rG@4S)Rj(W6&SU;j-i O;rz+P>2F_s`@?_UWMX>& diff --git a/base/all-all/dig113.png b/base/all-all/dig113.png deleted file mode 100644 index 79edd96eff57551033722107e8767d188373d42b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F{|5F82w&CpVBA~m1m7I;6Z~53W%aX zp&Cr^AczO2RY8LX4Td_P!4wY~GH7tA3m!bU;2{MM9z0}t?ez7&_cwaE-@V)q&iM}a zoR?3o%(MHS-UooQ%Zu};=~0#^-o zHMS)#M%d)n)ATrr_hq;n1)HI_%AI9qx2e^{<}@-Upzppw)6SCX`1PDTGw?|Rpaq^G#U+u!#vNk zEK8CkilQ(KgCOuc&vjkfwoTJC3`5g2RaIqK?)7@2C?*(1$9{k3`zzOLZD(d$m2Qkw zJ(ty3k^`~l@Pff{3d4#t%~5S#%&Wm{oYh5A4Wcp&M`@B{nHeJS;TK`1dh)h?rfU z+4%I*rQX^wH(_Sn>ckCVgIFMjh$fTahYas z>I8oND)b^To&izIgrW1`d~x Mug-t{>boER1OB;VQ2+n{ diff --git a/base/all-all/dig114.png b/base/all-all/dig114.png deleted file mode 100644 index 35a8e18aeaab414af70e9dec16fd31c0b573f4c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmd^7F^l6y6n>W_XmiRUhyn^xp@0Z3RHzU{g$i9xd+0U_tL1c{1Ql8k#DxM1=s+YY zbVP*-E<|u)5(PvsM1>(PRJd@V;tCgrxNzY@0T-9x!i6DMINi(a{*4UtW|+r&-}{*F z`{Cx=ymIP zijq}9lo(E+7!GVrG8Ivmc%08q)9IVZjsxK zwk0k`*yN{adYr`jGTe=V?a*82&MLFp)M{dL8X1#NF9WUc)q$&Ij-1$1X!d+VbacT| zd0pldiIqg=cs%a+``vEWb=_vOS*=#f<+5$t`F!3q&2&1g>$<9{@pwEMjfTTvp66MX zB}o!RQ5c3n5O|*Fx~^^8rfC|6p=p|`sLRHIQJICKG#JKS9=d5@C%zTAM&HqWOLYy! z(d8-+ip0r7EAjQdqj;udYoej>X%LH}}xtc7e+hn-nJ=78+*!o0vO9%&yOD zeR}0muWXo`Ff;CX;uf(%ED%FP6H!EjT8B!7kqiTon6qcdyehIXPm>Y%R?+}u01oEM|uZzzB9>9xd*Z17+`29~8I4A03@>TDA^YlxiGR@w_ z1Nixu4@mN(tIJQHpZ^s6%e?h2|H;?zJhqTAb-zv82R^s}4y;3U2O_ZQ!t|3+%z N>dE!x?~iZ4{}1Q(WfuSd diff --git a/base/all-all/dig115.png b/base/all-all/dig115.png deleted file mode 100644 index 41446d25185055a2a8198c3a94c60a1cf3e627c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F{`9j6h1FYaCgl^f&@1aVj*D)3rQ?2EM((bd@qLQvMxxlFkmr-g#iN+EL`}fFs^G)&>z&&{S`ST~_DR4B$P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{OD?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR@}g*f--`z4#PkHKK~5h48DGLeaG#V-~V)hb3=VZzUskOmtPQ-Y4$eG z;K!dHk>rP07muIce;NGCy!8(M0xmy!0pI`e>p#`mZ{M}=KZ4&se)r`s#(USK60V+H LU;O;(m*4&eFfnAs diff --git a/base/all-all/dig116.png b/base/all-all/dig116.png deleted file mode 100644 index 4911d08dfa95e995665711b531040844777ddc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F{|5F6h6tLD2@8iph0Z~6+{#df{LO+gP-gYQ9*+T4Tid)!Gi}48C)>bg9i^PxR8Pe4<0hSY^V3VztPJ*_i_*CeCOkS z->=Uu%+vdy-v@xx^T%hGq4vGC7RL`=Zzl23?wN;&>H?%OGeyZ{fO)ZO=@z z*7b>|m5MT!Rp#`6is#Vi{#OrNHGit;GRp(q=`1TX;bu)}v7?3TD$;JU$O zjctjG5jOetG(Aq@eHrdX!FK4ab7z&=ZE7{KIgN}-sF#6O`0Bt_GDl8qDKvY&Av(HX zsk|<8io{AHb37jR`~7aW>$+~U*{oKp<#O4!?R-9Onr1qk)^%M~)p$G}jYh-aFwgTW z%aSCCq9_c*AP79qb6wZAZPPRj!_YKMRaIG*d%d10iU~&1vESeM{@V3g+nJeGr5htv z&t)~1ykKyg!muJub5vUw^J*{~XLXTOgQ(2HQ5p*sOB_LX3*WqG;Wr=BuzK^<&f`9-=fOh~}fE7Rs&;Zl`CBP6M1Be0o03HC5jOexB z<8q19DHa9BF***aDsd5kA)CMu3<5y9bAS-QxtV+DaJ#@|iA{Y$SAYKT4XK3l MM;B+me|z=vKQ*0XwEzGB diff --git a/base/all-all/dig117.png b/base/all-all/dig117.png deleted file mode 100644 index 8494216a9545abe102354bcced9d4c58066c27ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F^l6y6n@KcXmiTqLIE8SoC*$dr2r3j%;X;K13W%V9 z;8d94LWK*HC?Gf&DhzQzg$oyg+kgtgxo}~E0xmYeg$oC+SV)nV+5HctQ3DB&f4fvfh3d{{e6c&%b#2lpJ}MW_y%rnuy489K$d) zO;Z#lDZC)|Sf1*!V5y=Z3!2E`VsSg0y_-%ClgU2Mcf(8jKTv6uDX8B)%1UX6WbxTk}lC z(Pdkc%FNGWI}6O%(+0Ne8lt5Ny38f1A4bj~uw37;9o4X8%@7r>j~E>~XS>v|3u&J4 zh06?eDiVQcja`S!B^CuH33?uC8uB~>906_swg4-D2A~G001AK+Knf563;qX=yq6@|Enz>rB`2nGQl)fqqlVBhsUbhuq&TVS2w)WuxIlzSJkhp@LB z^tK+oa;R$y76#1qd!D#OtPyj>0MS4c5TVkbRA4N@P$1^)>k_93jKtBT#l4kO00}?< zU;)S_V5#HY#DtXM8rCHgAp}(ry#4e1bAS{0_Qlmbw>y6S(*gD^^$~fh_r7`d6;YXH z?&1V~`uWk_Cvkc4+JFC-yi*Z`pJW{=7UfF{{BWG Psc`x9>f)ErzJB!|(dlPC diff --git a/base/all-all/dig118.png b/base/all-all/dig118.png deleted file mode 100644 index 572b48cc47ca6675e1298dd556f03f5c4a0c1948..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmd^7F{|WM6h6yC@_gYLBx1xA0fSBvB}IxLDWc{r*=O`+*(?M}5!n<|q=*n9E-3<= zVw5RT3^=S2QjD4+;2k~~Y6=f{Tg(M9{F&Bi4=M#>LSvF*tK27@+hE zb|ub7*yh(wdYr`jGTe=V&Cpxr&N8#R)M{h1iHu38mw{IJ>cCYpM^0=hG<&`wI=Wz~ zye@N!#7ZJ_JRbM^{cgA0Znx|8dbwOK7K^UyX0ut_woTL2bzN1}csw4BM#JGS&+{zH zk|c?uC=A0O2t3boUDvj4(=-jk&@@d|RausMy`CtF2}aSe-{1NE%Jn+inVMFm8zWWE zWi^)MKKn&0a@BoNpM6dlG z7Yl3}EDDTcbR1Mw;vxb=Hi01+1b}qs03m>LGxxB?%^Vjcwkb|LEHupcmoayUm|dUQ z`1I1Hp4l)nVQSp+#0_GLSRjUoCZdQ4wGNdEBN+xFF=x+^c~xX(o+cx1t)v0S03rYf zK$3u!fqM&6(uylsRZvC{)?xU^U+13!+<~tjT-|cJ;rBmX;9OJhlCOI8t9xG%m1*`S z?!XT}zD1JnTwZ+q@bu{izyJ0+z-j)`Kh=BuqrZRp_w4z%zdZWp^ACSMdF_qw-~3Z7 S-+xM~;qva)#jl@y`Q$(Jy=QL# diff --git a/base/all-all/dig119.png b/base/all-all/dig119.png deleted file mode 100644 index b8f2c9473275313a84a1d47d7ffd8ebb02685241..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmd^7F{|5F6h5y>Q5xl;K?NlhR20#A&>)JS8Z;=4UQk|Cogy{DR4B$P?lvOBG2j4ief(+?b37;$Ez^xgJ9`-3)k&zduE!A zu1__sQj}7b3rQM_VlD_7&nFxgvuwyPLz?y}%A+WUqHF*YzyQGG9zSew*W+e^>kj({ zmlZB1*yY!4dYZ)N($nx?MnvMeW)$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD<$T%uK7+jftw~ zvKmWrAPyW}FgQ+OSdpeVYS|R?dNeDurby~hRAu2L4aTvThi)3!iEl-&F?4j_Qe8uF zbh*xhB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2ap!Iq#`{X1r9$Pg zBZG=1AX?*Yhl>SP6{acrKI%FO0s@=>J^*Y1Rsc(Y4xj<30LB0rKnySh@BoNpM6bgE z`ySgCivr^q9S2pFxQM`zO<)KH0U+HuKnUR6%suXKyTHD}F2$*bg@zgbG3JgDvmY{B zpI*7tdmH8^%#2%}xJB#`3&ar7L=+LB(VXzFLzyIk1=bHMOeAQ>KpZ!QwrrDb~ zgWumhB*`x?FTQ_u@3-I|=935fzqp659zFaH&feXf;)BNk-;|&K`uN*XNh;y;>D9#_ IPkwsy9}!byT>t<8 diff --git a/base/all-all/dig120.png b/base/all-all/dig120.png deleted file mode 100644 index 87a7a5a4c489529b2a2d181f6691bec1c705e8f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmd^7F{|5F6h3JvN~1p1qJly-s6`DPGzh9eg9g#+1?5%cDMSHLG^n7#g9a585JiKM zYH*7O4ThLh1q~iF2x_PX4<0mR@L;G14<1x7B?T8ecu3%N>gj#&Z}f7{x!eQiJ0Iu! zetL9ip56WUE&!ZeJUo9)-gik*cW#q>^?mXOz-@T+^^*tWD{wT&P?lvOBG21h@p%5Xmkc4KdoJL}BuQmc*4CNgHBUItp>t0Py*967P2&>Z-N=;(r_ z^193^5-W+!>2x|A4*UJS@B8g`yI!wXt5w%^i^ZaC+ooyix~{5fI-O1?lks?*=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~Tc!9Wzn1f%FQ9PWL8<9eO#%uTD(jftw~ zvKmWrAPyW}FgQ+OSdpeVs;i4dHJVSex=5-~RA%8M4aTvThi)3!iEl-&F?4j_Qe8uF zbh*ldB60H2N_>6jD4r?VnrJ9|ngvnp4nx}uOvlwsThUEP)dz_2v3GY%<5eloQ=#yR7p<%|qiMeCM?1#+G zr`Im^%7%prbK{05?hsqV0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPYB@I9Z5CJ#< zQUt6FJXn~LR@}g*f--`z4#VI7I{OOX7Ce1?dBg3R-~aT0b4A@Jt9tLdhu;vDY4$p9 z!Oy?kBgIcH&cAqa=VkB@^UnMHzqp6bosB)&&U`KCqa=!hit@7Lr&D zVG4^WhQxry6cz(Jg~b$8OtFQt7BKm967P2&>Z@P=;(r_ z^193^5-W+!`F!sC{&+lgUAN!wx7%&owwujnwOTbzvsf(Zx~{5fHk(bS)5&C#=XsW8 zNs>fS6oz3C1fJ))u4~)2X_|&%Xqu*~sw~UH;ZPLC1f%FY8XbLq=Xx94S(;X*8&g%! zWi^)MKpZ-}U~rtmup&)!)TS<0)p$9}>LRJeQJIC)G?>I*9=d5@C%zTA#>mlqOLYy! z(d8-+ip0r7EAjP_qj;udYoej>X%@7@5EAC)dK^Z|gK2a0OPx782|tP diff --git a/base/all-all/dig122.png b/base/all-all/dig122.png deleted file mode 100644 index e6d12d5cd98d6a3dcf1ee15fe6a80237d980cd92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd^7F{`9j6h50raI@y&5*J(|!4L^k7_hJ~U?GWbabFD2WnGY9;ewDUEDRWsVBr#r zNtnW7AVXrnVhRf(Q&>!33X3hK7|0Y;OkrRG8<=8>DYke^2%Oya{zfkM+{-jbYr6G zxva*L9Ebyl7YvS57*?cdj_T@SQH|!)tS*vj6qQ*xNrQ3h<)NDfcH&!+YYZLTw^Y|q z99^#Rph%oNv=Uz*I*MmXwk8@1pJqW6yTj1-0@HCd(^hm-QuP61eC*xb(s)_Q^HeB3 zc4Sbo1Vn4>dt5HDEHO>d_fgkT5D?%5@CslDum*;yCtqlY*UuVd~QG5aC2 z^Xauqy|iIr!rZv!i95s=u|NzFO+*n9Y8@&SCNhjfV$Ojf^Qy?oJWWR2T1f+t0Ym@} zfFuDc0}mFaq!l-?si2G?ti$k+zt6t_xC7rly}IRg!|#8(z`3SACSUc=H;=y}D%0#u z+<{+yeMpiYTwZ+k?C#IO8|JNd`4@lbXFq)X{0;NbhoAiZ>3x8I|9SA!dk^m~NFiK4 My1Mx7^XK3H2eVLPX#fBK diff --git a/base/all-all/dig123.png b/base/all-all/dig123.png deleted file mode 100644 index 0adeb517063a18ea16a9b061ae64f666897a4f9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmd^9F{|5F6h3Kal|=8ML4%rTP(c(A8Z-!^f}o<+3(Bj?Q-}g;5mW^Y9#l|31yMAJ zR)Z-X1odDN6;$w`K~N7G4E3NPg9k%Bc<`WthZH<`@Q~qUJH7Ayjb84#mwP$qJ0JJ^ zxW7KTGS448dH?|DmrpOAll?;y)V;f8z5Xfr2jDI|`})Nbauhh4V<^kA5RvD3mSt(0 zrYK5Q1yN!+fnqqYHOW*&UE*=ExNe$vv)OSvJru=$H0slI8^`M~Tm?brc}v%AZF_E- zwXV-JtyGk$EEkeA7R6i;GM-O3E@s(~VTLsAQtJSLOy2WDAwr$fibzN6gHJwf;lgW5I&htFW zvLs2OCh5RaKVd!C)YYVuDe08V>iqzj3|JcIKv4>BdCW zb6JfgIS>a9FBlxBFsw+^9M#puq8iPoSzRR6C@QmXk_O}0%R@H}?8LVs*BCmwZ>g@K zIJ#WrL6JClXeGWrbQI5&Y)v#2KFxwCc88(u1*YR_rmg6vr0N62_}II9c6L*L$Vu2VUnusDI)H+luOk@~|#GC^|=2elEd78AiwUP!P1Bd_| z0J#LL3_Mtvl2Y8jrh+npunxn&|2_W-;12xw{OXq54Zr{C0Oy+elswh_mruVXD%0#u z+=17>e|+;vTwZ+f;@+#^J@dgCsz1Qw>5cQsMH+ L)y1D*e*epVdDvs@ diff --git a/base/all-all/dig124.png b/base/all-all/dig124.png deleted file mode 100644 index acb1e946ed5a68ddd5ddf34ebe8d8200420eca38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1148 zcmd^7F{`9j6h50J@nzkIg%HCUFd$(H3kw4l7LxdOeJ_URvM!ilVZdSv3j;2ZVBxYB zLzu$A6hqbpizzIGOkpv_6c$@p3}lKaCNP01HZa8$Q*7~4<>bEiH*&e>Uhd(X?|j_v z`{n7idH&$h0{}R`y1aNs?hi>&XZOi@^K`Gitu+49p^fZePWw@UN+p)LKomFOcsny126B)BmF9WUc)sd@Yj-1$1XbyZsbacT| zd0pldiIqg=bUGalhy8xP+wC@+&1$vk`@ZYC#bVL6ZPPS$T~}2#olYl{$#^`@^E}J4 zBuSzu3d1l60?+eY*R^fiG)==WG)+@gRhH$!U?7TOf>CrD4)?ylcD>Ga=B8EY#zfU~ zS&bz*5C;w~7#ycCtVq)w)z!tK8qKF!T_n{gDzk8s2IJVvLpKfV#J3{X7&^Ldsji_o zx?JT!kvMs1CB8m%6wj1wO*9lf&4MU)hoS8SrsHa+t>~tt>I201xO2Bl<83L=Q=#yR7p<%|qkGW&S?1#+O zr&liZ)`o=%bK{ODZV_9=0x?815k*9(b*NOB$S@L#IR}Q!t0F7&G#PPcB@I9Z5CJ#< zk_4;_JXn~LR$Rlnf--`z4#PkGKK};b9=v#VeaG#V-~V)hb3=VWzUt#2FTW=$)9h{B zgV%39CCN{&F1~tx_FM1|^T9*J=;f~u|GfJABlzj^v+urqa`rE&fUC#X7r%e~!>j)Q D7A9fS diff --git a/base/all-all/dig125.png b/base/all-all/dig125.png deleted file mode 100644 index 5473c24c83347d3b9d63604617a930088f37b6fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmd^7F{|5F6h0vorBUDWpn^(75JeOZ8br~cL4#=Yg7TvB6rzA=G^n7#gD5H}AW{v2 zXmEoE4IWIQf(AoXFw}zvLk(3Sg9ej&@L-Ax9#Zh&!7UjcbUD56{f%DExtDw3eCOkQ z-^)iA#>wqFw*lbf{K45{@_s;)x^m(Sxr0dB&hFQ42eU!JAe9%Y&)B61wZFbqx8 z6h%o2FNi&sr+O?{s%Xf9CUUq~T+U|ir_;k^vd{C~aM&fuCW=-;(E5Jkx=Y8YEo*KV zm8MNqwUFhBB;}$w5`>KBQ;v&SHe#5d*Bj8ZM^P?C*%V~~7yvo|9(MR{gI$Z8C9Z31 zD{Kl}jo|^OS%zWgx~{6Kq9~Fi_4|E65Mm6&<6yA!ytU&tmOVGjQq#wZ zmPtw^O1{vyIbLU3xyJ}J%~DO3FUsM3l2&F%nj1HZ%UFvTNX`b+f z%M5iY5`k!qU5Cph76m2=dLC*T@;m|@0p0;@0agGFKn+j<6aXWD6d(c^0Js1|GNRXh zk8O*y8Rj`g5!yB?3ULvEAwggW1_2=589)GFU(G#qxLsmfV4dL9#azXddmpifu(uoZ zwjRB5s5cfY44CWJJaLOyBj$(!qJbzNLZv~ez*vHzK+M_KB~B3-iKEGgYb&V$5`X}} z0+1qLspH`Ym@Chk?dVcoBlUuLue*gIiz(?8N^B+(DczSy8w-@K%{Pgzezwxi9-~Ge=^6cZc QL~Vfc`xj?F-~0N-f0Gz!cmMzZ diff --git a/base/all-all/dig126.png b/base/all-all/dig126.png deleted file mode 100644 index 7490a70cabafdd62f2eb2aa734dcadfe12d24943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmd^7F{|5F6h7&rRT{mA3K|ru6cyCsL4%+gG-wd1UQk|Co*q#^1Pv-Ya(_&Mx_d&->z|Xq0Z!oRyJwHcQ{ZThp)AWnM4snamZfQ$ zq9|DvM2X=9is8W4BvTP}iO2c;dOH0unH-t2~N<|sVav@1WQOpG)Sdr6zB+J~%#jmY3eBExh>k8; zDzD3&BC(Rl9FNESe!tu8w%hG`yh5RaKVdUau#LVuDe0?Du!RzjD3Sc4nqk>BdOa zb6JfgIS_jeFBlxBFsw+^9M#svyc*2LSzRR6AS$zPlm^4t%R@H}?8LVs*XTRCZ>g@K zIJ#WrL6JClXeGYhcNEW*Y)v#2KFxwCcKf021*YR_rmg6vr0PAy_^@?13*%iW&r+fE z*nvUC5)iF%yT!!<%M#NReIIol1pxt$0Pg`d084-tpaG}>N`N6i1`q@E0XzUA8PRLM z$F9Ta6pI4m7##;ymAHt&kWF9+1_2=5IY0>D+{`^}akId##3sdwhlPe2{~_iM5wq(v z8=qdf)H@sICd`amp14755DUZ*(L@vxq1K^NVI;#qBstem, i + 33); + M_snprintf(lump, sizeof(lump), "%s%03d", out->stem, i + HU_FONTSTART); found = W_CheckNumForName(lump); if (found < 0) { From 692c436a252ca74ad669ffb0f5fd27e13e222711 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 26 Sep 2024 16:18:05 +0700 Subject: [PATCH 23/55] return if `maxammo == 0` --- src/st_stuff.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/st_stuff.c b/src/st_stuff.c index c9b7a1ddd..80dbccbba 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -837,6 +837,11 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) } int maxammo = player->maxammo[type]; + if (maxammo == 0) + { + return; + } + int ammo = player->ammo[type]; // backpack changes thresholds From ed8f3df3ffefe6b72bd6027069ed07f1965ce578 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 26 Sep 2024 16:21:13 +0700 Subject: [PATCH 24/55] implement widescreen layout mode * Add widescreen alignment flag. * Remove compact HUD from stbardef.lmp for now. * Cosmetic changes. --- base/all-all/sbardef.lmp | 608 ++------------------------------------- src/mn_internal.h | 1 - src/mn_menu.c | 8 +- src/mn_setup.c | 19 +- src/st_sbardef.h | 14 +- src/st_stuff.c | 17 +- src/st_widgets.c | 26 +- 7 files changed, 71 insertions(+), 622 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 202555496..23cb90e83 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -844,7 +844,7 @@ { "x": 0, "y": 160, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "type": 0, @@ -858,7 +858,7 @@ { "x": 0, "y": 153, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "type": 1, @@ -897,7 +897,7 @@ { "x": 19, "y": 162, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "conditions": @@ -915,7 +915,7 @@ { "x": 20, "y": 161, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "conditions": null, @@ -927,7 +927,7 @@ { "x": 53, "y": 175, - "alignment": 0, + "alignment": 16, "font": "BigRed", "tranmap": null, "translation": null, @@ -943,7 +943,7 @@ { "x": 292, "y": 189, - "alignment": 0, + "alignment": 16, "patch": "CLIPA0", "tranmap": null, "translation": null, @@ -962,7 +962,7 @@ { "x": 295, "y": 186, - "alignment": 0, + "alignment": 16, "patch": "SHELA0", "tranmap": null, "translation": null, @@ -981,7 +981,7 @@ { "x": 297, "y": 192, - "alignment": 0, + "alignment": 16, "patch": "FTNKA0", "tranmap": null, "translation": null, @@ -1000,7 +1000,7 @@ { "x": 295, "y": 195, - "alignment": 0, + "alignment": 16, "patch": "ROCKA0", "tranmap": null, "translation": null, @@ -1019,7 +1019,7 @@ { "x": 285, "y": 175, - "alignment": 2, + "alignment": 18, "font": "BigRed", "tranmap": null, "translation": null, @@ -1041,7 +1041,7 @@ { "x": 125, "y": 192, - "alignment": 0, + "alignment": 16, "patch": "ARM1A0", "tranmap": null, "translation": null, @@ -1060,7 +1060,7 @@ { "x": 125, "y": 192, - "alignment": 0, + "alignment": 16, "patch": "ARM2A0", "tranmap": null, "translation": null, @@ -1079,7 +1079,7 @@ { "x": 145, "y": 175, - "alignment": 0, + "alignment": 16, "font": "BigRed", "tranmap": null, "translation": null, @@ -1095,7 +1095,7 @@ { "x": 300, "y": 5, - "alignment": 2, + "alignment": 18, "font": "BigRed", "tranmap": null, "translation": null, @@ -1151,7 +1151,7 @@ { "x": 0, "y": 0, - "alignment": 0, + "alignment": 16, "patch": "STKEYS3", "tranmap": null, "translation": null, @@ -1174,7 +1174,7 @@ { "x": 0, "y": 0, - "alignment": 0, + "alignment": 16, "patch": "STKEYS3", "tranmap": null, "translation": null, @@ -1201,7 +1201,7 @@ { "x": 0, "y": 0, - "alignment": 0, + "alignment": 16, "patch": "STKEYS6", "tranmap": null, "translation": null, @@ -1228,7 +1228,7 @@ { "x": 0, "y": 10, - "alignment": 0, + "alignment": 16, "patch": "STKEYS1", "tranmap": null, "translation": null, @@ -1251,7 +1251,7 @@ { "x": 0, "y": 10, - "alignment": 0, + "alignment": 16, "patch": "STKEYS4", "tranmap": null, "translation": null, @@ -1274,7 +1274,7 @@ { "x": 0, "y": 10, - "alignment": 0, + "alignment": 16, "patch": "STKEYS4", "tranmap": null, "translation": null, @@ -1301,7 +1301,7 @@ { "x": 0, "y": 10, - "alignment": 0, + "alignment": 16, "patch": "STKEYS7", "tranmap": null, "translation": null, @@ -1328,7 +1328,7 @@ { "x": 0, "y": 20, - "alignment": 0, + "alignment": 16, "patch": "STKEYS2", "tranmap": null, "translation": null, @@ -1351,7 +1351,7 @@ { "x": 0, "y": 20, - "alignment": 0, + "alignment": 16, "patch": "STKEYS5", "tranmap": null, "translation": null, @@ -1374,7 +1374,7 @@ { "x": 0, "y": 20, - "alignment": 0, + "alignment": 16, "patch": "STKEYS5", "tranmap": null, "translation": null, @@ -1401,7 +1401,7 @@ { "x": 0, "y": 20, - "alignment": 0, + "alignment": 16, "patch": "STKEYS8", "tranmap": null, "translation": null, @@ -1431,7 +1431,7 @@ { "x": 20, "y": 154, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "type": 0, @@ -1445,7 +1445,7 @@ { "x": 20, "y": 147, - "alignment": 0, + "alignment": 16, "tranmap": null, "translation": null, "type": 1, @@ -1456,560 +1456,6 @@ } ] } - }, - { - "canvas": - { - "x": 0, - "y": 0, - "alignment": 0, - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 18, - "param": 1 - } - ], - "children": - [ - { - "facebackground": - { - "x": 79, - "y": 162, - "alignment": 0, - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 15, - "param": 0 - } - ], - "children": null - } - }, - { - "face": - { - "x": 80, - "y": 161, - "alignment": 0, - "tranmap": null, - "translation": null, - "conditions": null, - "children": null - } - }, - { - "number": - { - "x": 114, - "y": 170, - "alignment": 0, - "font": "BigRed", - "tranmap": null, - "translation": null, - "type": 0, - "param": 0, - "maxlength": 3, - "conditions": null, - "children": null - } - }, - { - "graphic": - { - "x": 178, - "y": 163, - "alignment": 0, - "patch": "CLIPA0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 5, - "param": 0 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 178, - "y": 160, - "alignment": 0, - "patch": "SHELA0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 5, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 180, - "y": 165, - "alignment": 0, - "patch": "FTNKA0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 5, - "param": 2 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 180, - "y": 166, - "alignment": 0, - "patch": "ROCKA0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 5, - "param": 3 - } - ], - "children": null - } - }, - { - "number": - { - "x": 198, - "y": 150, - "alignment": 0, - "font": "BigRed", - "tranmap": null, - "translation": null, - "type": 4, - "param": 0, - "maxlength": 3, - "conditions": - [ - { - "condition": 4, - "param": 0 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 180, - "y": 187, - "alignment": 0, - "patch": "ARM1A0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 11, - "param": 15 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 180, - "y": 187, - "alignment": 0, - "patch": "ARM2A0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 15 - } - ], - "children": null - } - }, - { - "number": - { - "x": 198, - "y": 170, - "alignment": 0, - "font": "BigRed", - "tranmap": null, - "translation": null, - "type": 1, - "param": 0, - "maxlength": 3, - "conditions": null, - "children": null - } - }, - { - "number": - { - "x": 114, - "y": 150, - "alignment": 0, - "font": "BigRed", - "tranmap": null, - "translation": null, - "type": 2, - "param": 0, - "maxlength": 2, - "conditions": - [ - { - "condition": 14, - "param": 2 - } - ], - "children": null - } - }, - { - "canvas": - { - "x": 160, - "y": 191, - "alignment": 0, - "tranmap": null, - "translation": null, - "conditions": null, - "children": - [ - { - "graphic": - { - "x": -15, - "y": 0, - "alignment": 0, - "patch": "STKEYS0", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 1 - }, - { - "condition": 11, - "param": 4 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -15, - "y": 0, - "alignment": 0, - "patch": "STKEYS3", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 11, - "param": 1 - }, - { - "condition": 10, - "param": 4 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -15, - "y": 0, - "alignment": 0, - "patch": "STKEYS3", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 1 - }, - { - "condition": 10, - "param": 4 - }, - { - "condition": 13, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -15, - "y": 0, - "alignment": 0, - "patch": "STKEYS6", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 1 - }, - { - "condition": 10, - "param": 4 - }, - { - "condition": 12, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -5, - "y": 0, - "alignment": 0, - "patch": "STKEYS1", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 2 - }, - { - "condition": 11, - "param": 5 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -5, - "y": 0, - "alignment": 0, - "patch": "STKEYS4", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 11, - "param": 2 - }, - { - "condition": 10, - "param": 5 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -5, - "y": 0, - "alignment": 0, - "patch": "STKEYS4", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 2 - }, - { - "condition": 10, - "param": 5 - }, - { - "condition": 13, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": -5, - "y": 0, - "alignment": 0, - "patch": "STKEYS7", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 2 - }, - { - "condition": 10, - "param": 5 - }, - { - "condition": 12, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 5, - "y": 0, - "alignment": 0, - "patch": "STKEYS2", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 3 - }, - { - "condition": 11, - "param": 6 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 5, - "y": 0, - "alignment": 0, - "patch": "STKEYS5", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 11, - "param": 3 - }, - { - "condition": 10, - "param": 6 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 5, - "y": 0, - "alignment": 0, - "patch": "STKEYS5", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 3 - }, - { - "condition": 10, - "param": 6 - }, - { - "condition": 13, - "param": 1 - } - ], - "children": null - } - }, - { - "graphic": - { - "x": 5, - "y": 0, - "alignment": 0, - "patch": "STKEYS8", - "tranmap": null, - "translation": null, - "conditions": - [ - { - "condition": 10, - "param": 3 - }, - { - "condition": 10, - "param": 6 - }, - { - "condition": 12, - "param": 1 - } - ], - "children": null - } - } - ] - } - } - ] - } } ] }, diff --git a/src/mn_internal.h b/src/mn_internal.h index 028a7c3a1..cafa597ce 100644 --- a/src/mn_internal.h +++ b/src/mn_internal.h @@ -60,7 +60,6 @@ void MN_InitDefaults(void); extern const char *gamma_strings[]; void MN_ResetGamma(void); void MN_DrawDelVerify(void); -void MN_SizeDisplay(int choice); boolean MN_SetupCursorPostion(int x, int y); boolean MN_SetupMouseResponder(int x, int y); diff --git a/src/mn_menu.c b/src/mn_menu.c index 778afc7c0..bbd71c328 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -1539,7 +1539,7 @@ static void M_ChangeMessages(int choice) // hud_displayed is toggled by + or = in fullscreen // hud_displayed is cleared by - -void MN_SizeDisplay(int choice) +static void M_SizeDisplay(int choice) { switch (choice) { @@ -2224,7 +2224,7 @@ boolean M_ShortcutResponder(const event_t *ev) { return false; } - MN_SizeDisplay(0); + M_SizeDisplay(0); M_StartSound(sfx_stnmov); return true; } @@ -2235,7 +2235,7 @@ boolean M_ShortcutResponder(const event_t *ev) { // key_hud==key_zoomin return false; } - MN_SizeDisplay(1); + M_SizeDisplay(1); M_StartSound(sfx_stnmov); return true; } @@ -2255,7 +2255,7 @@ boolean M_ShortcutResponder(const event_t *ev) { screenblocks = 10; } - MN_SizeDisplay(-1); + R_SetViewSize(screenblocks); return true; } diff --git a/src/mn_setup.c b/src/mn_setup.c index fb193bb0c..9f2ca1e09 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -316,6 +316,7 @@ enum str_curve, str_center_weapon, str_screensize, + str_stlayout, str_show_widgets, str_show_adv_widgets, str_crosshair, @@ -1776,7 +1777,7 @@ static setup_tab_t stat_tabs[] = { static void SizeDisplayAlt(void) { - MN_SizeDisplay(-1); + R_SetViewSize(screenblocks); } static const char *screensize_strings[] = { @@ -1785,6 +1786,10 @@ static const char *screensize_strings[] = { "Status Bar", "Status Bar", "Status Bar", "Fullscreen" }; +static const char *st_layout_strings[] = { + "Original", "Wide" +}; + #define H_X_THRM8 (M_X_THRM8 - 14) #define H_X (M_X - 14) @@ -1795,6 +1800,11 @@ static setup_menu_t stat_settings1[] = { MI_GAP, + {"Layout", S_CHOICE, H_X, M_SPC, {"st_layout"}, + .strings_id = str_stlayout}, + + MI_GAP, + {"Status Bar", S_SKIP | S_TITLE, H_X, M_SPC}, {"Colored Numbers", S_ONOFF | S_COSMETIC, H_X, M_SPC, {"sts_colored_numbers"}}, @@ -1803,12 +1813,6 @@ static setup_menu_t stat_settings1[] = { {"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"}}, - MI_GAP, - - {"Widescreen Mode", S_ONOFF, H_X, M_SPC, {"st_widescreen_mode"}}, - - MI_GAP, - {"Backpack Shifts Ammo Color", S_ONOFF, H_X, M_SPC, {"hud_backpack_thresholds"}}, {"Armor Color Matches Type", S_ONOFF, H_X, M_SPC, {"hud_armor_type"}}, @@ -4591,6 +4595,7 @@ static const char **selectstrings[] = { curve_strings, center_weapon_strings, screensize_strings, + st_layout_strings, show_widgets_strings, show_adv_widgets_strings, crosshair_strings, diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 4d623dd51..4ff126fb1 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -26,13 +26,6 @@ typedef enum sbf_proportional, } fonttype_t; -typedef enum -{ - sbm_none, - sbm_compact, - sbm_wide, -} sbarmode_t; - typedef enum { sbc_none = -1, @@ -89,6 +82,8 @@ typedef enum sbe_facebackground, sbe_number, sbe_percent, + + // Woof! sbe_widget, sbe_max, @@ -118,6 +113,9 @@ typedef enum sbe_v_bottom = 0x08, sbe_v_mask = 0x0C, + + // Woof! + sbe_wide = 0x10, } sbaralignment_t; typedef struct @@ -169,6 +167,8 @@ struct sbarelem_s int facecount; int oldhealth; + // Woof! + // widget sbarwidgettype_t widgettype; hudfont_t *hudfont; diff --git a/src/st_stuff.c b/src/st_stuff.c index 80dbccbba..7429ddc3d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -129,9 +129,13 @@ int st_keyorskull[3]; static sbardef_t *sbardef; -static boolean st_widescreen_mode; +typedef enum +{ + st_original, + st_wide +} st_layout_t; -static sbarmode_t sbarmode; +static st_layout_t st_layout; static patch_t **facepatches = NULL; @@ -1021,7 +1025,7 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, y -= height; } - if (sbarmode == sbm_wide && !(alignment & sbe_h_middle)) + if (st_layout == st_wide && (alignment & sbe_wide)) { if (x < SCREENWIDTH / 2) { @@ -1268,9 +1272,6 @@ static void DrawStatusBar(void) DrawBackground(statusbar->fillflat); } - sbarmode = - statusbar->fullscreenrender && st_widescreen_mode ? sbm_wide : sbm_none; - sbarelem_t *child; array_foreach(child, statusbar->children) { @@ -1605,8 +1606,8 @@ void ST_ResetPalette(void) void ST_BindSTSVariables(void) { - M_BindBool("st_widescreen_mode", &st_widescreen_mode, NULL, - false, ss_stat, wad_no, "Widescreen HUD"); + M_BindNum("st_layout", &st_layout, NULL, st_wide, st_original, st_wide, + ss_stat, wad_no, "HUD layout"); M_BindBool("sts_colored_numbers", &sts_colored_numbers, NULL, false, ss_stat, wad_yes, "Colored numbers on the status bar"); M_BindBool("sts_pct_always_gray", &sts_pct_always_gray, NULL, diff --git a/src/st_widgets.c b/src/st_widgets.c index 7cbcb22aa..beba8ba5e 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -60,11 +60,11 @@ void UpdateMonSec(sbarelem_t *elem) int itemcolor = (fullitemcount >= totalitems) ? '0' + CR_BLUE1 : '0' + CR_GRAY; - M_snprintf(string, sizeof(string), - RED_S"K \x1b%c%d/%d "RED_S"I \x1b%c%d/%d "RED_S"S \x1b%c%d/%d", - killcolor, fullkillcount, max_kill_requirement, - itemcolor, fullitemcount, totalitems, - secretcolor, fullsecretcount, totalsecret); + M_snprintf( + string, sizeof(string), + RED_S "K \x1b%c%d/%d " RED_S "I \x1b%c%d/%d " RED_S "S \x1b%c%d/%d", + killcolor, fullkillcount, max_kill_requirement, itemcolor, + fullitemcount, totalitems, secretcolor, fullsecretcount, totalsecret); elem->string = string; } @@ -79,31 +79,29 @@ void UpdateStTime(sbarelem_t *elem, player_t *player) if (time_scale != 100) { - offset += M_snprintf(string, sizeof(string), BLUE_S"%d%% ", time_scale); + offset += + M_snprintf(string, sizeof(string), BLUE_S "%d%% ", time_scale); } if (totalleveltimes) { const int time = (totalleveltimes + leveltime) / TICRATE; - offset += M_snprintf( - string + offset, sizeof(string) - offset, - GREEN_S"%d:%02d ", time / 60, time % 60); + offset += M_snprintf(string + offset, sizeof(string) - offset, + GREEN_S "%d:%02d ", time / 60, time % 60); } if (!player->btuse_tics) { - M_snprintf(string + offset, - sizeof(string) - offset, GRAY_S"%d:%05.2f\t", - leveltime / TICRATE / 60, + M_snprintf(string + offset, sizeof(string) - offset, + GRAY_S "%d:%05.2f\t", leveltime / TICRATE / 60, (float)(leveltime % (60 * TICRATE)) / TICRATE); } if (player->btuse_tics) { M_snprintf(string + offset, sizeof(string) - offset, - GOLD_S"U %d:%05.2f\t", - player->btuse / TICRATE / 60, + GOLD_S "U %d:%05.2f\t", player->btuse / TICRATE / 60, (float)(player->btuse % (60 * TICRATE)) / TICRATE); } From ae60e8e8666543396685c160e31234c04b5bc74a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 26 Sep 2024 23:13:49 +0700 Subject: [PATCH 25/55] message widget, various fixes --- base/all-all/sbardef.lmp | 66 +++++++++++++++++++++++++++++----------- src/hu_stuff.c | 4 +-- src/m_json.c | 10 ++++++ src/m_json.h | 1 + src/st_sbardef.c | 5 +++ src/st_sbardef.h | 8 ++++- src/st_stuff.c | 26 ++++++++-------- src/st_widgets.c | 39 ++++++++++++++++++++++++ src/st_widgets.h | 1 + 9 files changed, 126 insertions(+), 34 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 23cb90e83..149620ceb 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -866,6 +866,21 @@ "conditions": null, "children": null } + }, + { + "widget": + { + "x": 0, + "y": 0, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 7, + "font": "ConFont", + "duration": 4, + "conditions": null, + "children": null + } } ] }, @@ -943,7 +958,7 @@ { "x": 292, "y": 189, - "alignment": 16, + "alignment": 32, "patch": "CLIPA0", "tranmap": null, "translation": null, @@ -962,7 +977,7 @@ { "x": 295, "y": 186, - "alignment": 16, + "alignment": 32, "patch": "SHELA0", "tranmap": null, "translation": null, @@ -981,7 +996,7 @@ { "x": 297, "y": 192, - "alignment": 16, + "alignment": 32, "patch": "FTNKA0", "tranmap": null, "translation": null, @@ -1000,7 +1015,7 @@ { "x": 295, "y": 195, - "alignment": 16, + "alignment": 32, "patch": "ROCKA0", "tranmap": null, "translation": null, @@ -1019,7 +1034,7 @@ { "x": 285, "y": 175, - "alignment": 18, + "alignment": 34, "font": "BigRed", "tranmap": null, "translation": null, @@ -1095,7 +1110,7 @@ { "x": 300, "y": 5, - "alignment": 18, + "alignment": 34, "font": "BigRed", "tranmap": null, "translation": null, @@ -1128,7 +1143,7 @@ { "x": 0, "y": 0, - "alignment": 0, + "alignment": 32, "patch": "STKEYS0", "tranmap": null, "translation": null, @@ -1151,7 +1166,7 @@ { "x": 0, "y": 0, - "alignment": 16, + "alignment": 32, "patch": "STKEYS3", "tranmap": null, "translation": null, @@ -1174,7 +1189,7 @@ { "x": 0, "y": 0, - "alignment": 16, + "alignment": 32, "patch": "STKEYS3", "tranmap": null, "translation": null, @@ -1201,7 +1216,7 @@ { "x": 0, "y": 0, - "alignment": 16, + "alignment": 32, "patch": "STKEYS6", "tranmap": null, "translation": null, @@ -1228,7 +1243,7 @@ { "x": 0, "y": 10, - "alignment": 16, + "alignment": 32, "patch": "STKEYS1", "tranmap": null, "translation": null, @@ -1251,7 +1266,7 @@ { "x": 0, "y": 10, - "alignment": 16, + "alignment": 32, "patch": "STKEYS4", "tranmap": null, "translation": null, @@ -1274,7 +1289,7 @@ { "x": 0, "y": 10, - "alignment": 16, + "alignment": 32, "patch": "STKEYS4", "tranmap": null, "translation": null, @@ -1301,7 +1316,7 @@ { "x": 0, "y": 10, - "alignment": 16, + "alignment": 32, "patch": "STKEYS7", "tranmap": null, "translation": null, @@ -1328,7 +1343,7 @@ { "x": 0, "y": 20, - "alignment": 16, + "alignment": 32, "patch": "STKEYS2", "tranmap": null, "translation": null, @@ -1351,7 +1366,7 @@ { "x": 0, "y": 20, - "alignment": 16, + "alignment": 32, "patch": "STKEYS5", "tranmap": null, "translation": null, @@ -1374,7 +1389,7 @@ { "x": 0, "y": 20, - "alignment": 16, + "alignment": 32, "patch": "STKEYS5", "tranmap": null, "translation": null, @@ -1401,7 +1416,7 @@ { "x": 0, "y": 20, - "alignment": 16, + "alignment": 32, "patch": "STKEYS8", "tranmap": null, "translation": null, @@ -1453,6 +1468,21 @@ "conditions": null, "children": null } + }, + { + "widget": + { + "x": 0, + "y": 0, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 7, + "font": "ConFont", + "duration": 4, + "conditions": null, + "children": null + } } ] } diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 564875682..0c467f9b1 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1545,7 +1545,7 @@ void HU_Ticker(void) HUlib_add_key_to_cur_line(&w_chat, KEY_BACKSPACE); bscounter = 8; } - +/* // tick down message counter if message is up if (message_counter && !--message_counter) message_on = message_nottobefuckedwith = false; @@ -1591,7 +1591,7 @@ void HU_Ticker(void) // clear the flag that "Messages Off" is being posted message_dontfuckwithme = 0; } - +*/ // check for incoming chat characters if (netgame) { diff --git a/src/m_json.c b/src/m_json.c index 7480b17db..d7db9503f 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -138,6 +138,16 @@ double JS_GetNumber(json_t *json) return json->valuedouble; } +double JS_GetNumberValue(json_t *json, const char *string) +{ + json_t *obj = JS_GetObject(json, string); + if (JS_IsNumber(obj)) + { + return obj->valuedouble; + } + return 0; +} + int JS_GetInteger(json_t *json) { return json->valueint; diff --git a/src/m_json.h b/src/m_json.h index 160644f65..92eb9a18b 100644 --- a/src/m_json.h +++ b/src/m_json.h @@ -39,6 +39,7 @@ boolean JS_IsArray(json_t *json); boolean JS_GetBoolean(json_t *json); double JS_GetNumber(json_t *json); +double JS_GetNumberValue(json_t *json, const char *string); int JS_GetInteger(json_t *json); const char *JS_GetString(json_t *json); const char *JS_GetStringValue(json_t *json, const char *string); diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 9b01b73cb..21d049d0a 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -173,6 +173,11 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, return false; } out->widgettype = JS_GetInteger(type); + + if (out->widgettype == sbw_message) + { + out->duration = JS_GetNumberValue(json, "duration") * TICRATE; + } } break; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 4ff126fb1..f95b45ee0 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -98,6 +98,8 @@ typedef enum sbw_rate, sbw_cmd, sbw_speed, + + sbw_message, } sbarwidgettype_t; typedef enum @@ -115,7 +117,8 @@ typedef enum sbe_v_mask = 0x0C, // Woof! - sbe_wide = 0x10, + sbe_wide_left = 0x10, + sbe_wide_right = 0x20, } sbaralignment_t; typedef struct @@ -174,6 +177,9 @@ struct sbarelem_s hudfont_t *hudfont; const char *string; int totalwidth; + + // message + int duration; }; typedef struct diff --git a/src/st_stuff.c b/src/st_stuff.c index 7429ddc3d..a7b0109d3 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -876,6 +876,10 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) { switch (elem->widgettype) { + case sbw_message: + UpdateMessage(elem, player); + UpdateString(elem); + break; case sbw_monsec: UpdateMonSec(elem); UpdateString(elem); @@ -1025,13 +1029,13 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, y -= height; } - if (st_layout == st_wide && (alignment & sbe_wide)) + if (st_layout == st_wide) { - if (x < SCREENWIDTH / 2) + if (alignment & sbe_wide_left) { x -= video.deltaw; } - else + if (alignment & sbe_wide_right) { x += video.deltaw; } @@ -1248,27 +1252,23 @@ static void DrawBackground(const char *name) st_refresh_background = false; } -static int currbar; +static int current_barindex; static void DrawStatusBar(void) { player_t *player = &players[displayplayer]; - int bar = MAX(screenblocks - 10, 0); + int barindex = MAX(screenblocks - 10, 0); if (automapactive && automapoverlay == AM_OVERLAY_OFF) { - bar = 0; + barindex = 0; } - statusbar_t *statusbar = &sbardef->statusbars[bar]; + statusbar_t *statusbar = &sbardef->statusbars[barindex]; if (!statusbar->fullscreenrender) { - if (currbar != bar) - { - st_refresh_background = true; - } DrawBackground(statusbar->fillflat); } @@ -1278,7 +1278,7 @@ static void DrawStatusBar(void) DrawElem(0, SCREENHEIGHT - statusbar->height, child, player); } - currbar = bar; + current_barindex = barindex; } static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) @@ -1320,7 +1320,7 @@ void ST_Erase(void) } player_t *player = &players[displayplayer]; - statusbar_t *statusbar = &sbardef->statusbars[currbar]; + statusbar_t *statusbar = &sbardef->statusbars[current_barindex]; sbarelem_t *child; array_foreach(child, statusbar->children) diff --git a/src/st_widgets.c b/src/st_widgets.c index beba8ba5e..47c18a2e2 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -25,6 +25,45 @@ #define RED_S "\x1b\x36" #define BLUE_S "\x1b\x37" +void UpdateMessage(sbarelem_t *elem, player_t *player) +{ + if (!player->message) + { + elem->string = ""; + return; + } + + static char string[80]; + static int duration_left; + + if (duration_left > 0 && player->message[0]) + { + duration_left = elem->duration; + M_StringCopy(string, player->message, sizeof(string)); + player->message[0] = '\0'; + } + + if (duration_left == 0) + { + if (player->message[0]) + { + duration_left = elem->duration; + M_StringCopy(string, player->message, sizeof(string)); + player->message[0] = '\0'; + } + else + { + string[0] = '\0'; + } + } + else + { + --duration_left; + } + + elem->string = string; +} + void UpdateMonSec(sbarelem_t *elem) { static char string[80]; diff --git a/src/st_widgets.h b/src/st_widgets.h index 1f98dfd49..6cc40600c 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -17,6 +17,7 @@ struct sbarelem_s; struct player_s; +void UpdateMessage(struct sbarelem_s *elem, struct player_s *player); void UpdateMonSec(struct sbarelem_s *elem); void UpdateStTime(struct sbarelem_s *elem, struct player_s *player); From ede3bc063a52e3cfec31ddc99f19ba205092bfbf Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 27 Sep 2024 11:40:15 +0700 Subject: [PATCH 26/55] increase version of inner SBARDEF, load defaults for previous versions --- base/all-all/sbardef.lmp | 2 +- src/hu_stuff.c | 2 +- src/m_json.c | 25 +++++++-- src/m_json.h | 2 + src/st_sbardef.c | 117 ++++++++++++++++++++++++++++++++------- src/st_widgets.c | 2 +- 6 files changed, 122 insertions(+), 28 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 149620ceb..cdbdf292e 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -1,6 +1,6 @@ { "type": "statusbar", - "version": "1.0.0", + "version": "1.1.0", "metadata": null, "data": { diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 0c467f9b1..39163f971 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -161,7 +161,7 @@ static int message_counter; static int message_count; // killough 11/98 static int chat_count; // killough 11/98 static boolean secret_on; -static int secret_counter; +//static int secret_counter; static boolean message_centered; static boolean message_colorized; diff --git a/src/m_json.c b/src/m_json.c index d7db9503f..64aafdc1b 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -22,6 +22,24 @@ #include "cjson/cJSON.h" +boolean JS_GetVersion(json_t *json, version_t *version) +{ + json_t *js_version = JS_GetObject(json, "version"); + if (!JS_IsString(js_version)) + { + return false; + } + + const char *string = JS_GetString(js_version); + if (sscanf(string, "%d.%d.%d", &version->major, &version->minor, + &version->revision) == 3) + { + return true; + } + + return false; +} + json_t *JS_Open(const char *lump, const char *type, version_t maxversion) { int lumpnum = W_CheckNumForName(lump); @@ -55,16 +73,13 @@ json_t *JS_Open(const char *lump, const char *type, version_t maxversion) return NULL; } - json_t *js_version = JS_GetObject(json, "version"); - if (!JS_IsString(js_version)) + version_t v = {0}; + if (!JS_GetVersion(json, &v)) { I_Printf(VB_ERROR, "%s: no version string", lump); return NULL; } - s = JS_GetString(js_version); - version_t v = {0}; - sscanf(s, "%d.%d.%d", &v.major, &v.minor, &v.revision); if ((maxversion.major < v.major || (maxversion.major <= v.major && maxversion.minor < v.minor) || (maxversion.major <= v.major && maxversion.minor <= v.minor diff --git a/src/m_json.h b/src/m_json.h index 92eb9a18b..fffe31b45 100644 --- a/src/m_json.h +++ b/src/m_json.h @@ -25,6 +25,8 @@ typedef struct int revision; } version_t; +boolean JS_GetVersion(json_t *json, version_t *version); + json_t *JS_Open(const char *lump, const char *type, version_t maxversion); void JS_Close(json_t *json); diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 21d049d0a..d75e532a8 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -279,24 +279,8 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) return true; } -static boolean ParseHUDFont(json_t *json, hudfont_t *out) +static void LoadHUDFont(hudfont_t *out) { - json_t *name = JS_GetObject(json, "name"); - json_t *stem = JS_GetObject(json, "stem"); - if (!JS_IsString(name) || !JS_IsString(stem)) - { - return false; - } - out->name = JS_GetString(name); - out->stem = JS_GetString(stem); - - json_t *type = JS_GetObject(json, "type"); - if (!JS_IsNumber(type)) - { - return false; - } - out->type = JS_GetInteger(type); - char lump[9] = {0}; int found; int maxwidth = 0; @@ -329,11 +313,59 @@ static boolean ParseHUDFont(json_t *json, hudfont_t *out) default: break; } +} + +static boolean ParseHUDFont(json_t *json, hudfont_t *out) +{ + json_t *name = JS_GetObject(json, "name"); + json_t *stem = JS_GetObject(json, "stem"); + if (!JS_IsString(name) || !JS_IsString(stem)) + { + return false; + } + out->name = JS_GetString(name); + out->stem = JS_GetString(stem); + + json_t *type = JS_GetObject(json, "type"); + if (!JS_IsNumber(type)) + { + return false; + } + out->type = JS_GetInteger(type); return true; } -static boolean ParseStatusBar(json_t *json, statusbar_t *out) +static sbarelem_t default_widgets[] = { + { + .elemtype = sbe_widget, + .x_pos = 0, + .y_pos = 0, + .alignment = sbe_wide_left, + .widgettype = sbw_message, + .font_name = "ConFont", + .duration = 4 * TICRATE + }, + { + .elemtype = sbe_widget, + .x_pos = 0, + .y_pos = 160, + .alignment = sbe_wide_left, + .widgettype = sbw_monsec, + .font_name = "SmallFont", + }, + { + .elemtype = sbe_widget, + .x_pos = 0, + .y_pos = 153, + .alignment = sbe_wide_left, + .widgettype = sbw_time, + .font_name = "SmallFont", + } +}; + +static boolean ParseStatusBar(json_t *json, statusbar_t *out, + boolean load_defaults) { json_t *height = JS_GetObject(json, "height"); json_t *fullscreenrender = JS_GetObject(json, "fullscreenrender"); @@ -357,17 +389,52 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out) } } + if (load_defaults) + { + for (int i = 0; i < arrlen(default_widgets); ++i) + { + sbarelem_t elem = default_widgets[i]; + if (!out->fullscreenrender) + { + elem.y_pos += (out->height - 200); + } + elem.cr = elem.crboom = CR_NONE; + array_push(out->children, elem); + } + } + return true; } +static hudfont_t default_hudfonts[] = { + { + .name = "ConFont", + .type = sbf_proportional, + .stem = "STCFN" + }, + { + .name = "SmallFont", + .type = sbf_mono0, + .stem = "DIG" + } +}; + sbardef_t *ST_ParseSbarDef(void) { - json_t *json = JS_Open("SBARDEF", "statusbar", (version_t){1, 0, 0}); + json_t *json = JS_Open("SBARDEF", "statusbar", (version_t){1, 1, 0}); if (json == NULL) { return NULL; } + boolean load_defaults = false; + version_t v = {0}; + JS_GetVersion(json, &v); + if (v.major == 1 && v.minor < 1) + { + load_defaults = true; + } + json_t *data = JS_GetObject(json, "data"); if (JS_IsNull(data) || !JS_IsObject(data)) { @@ -398,17 +465,27 @@ sbardef_t *ST_ParseSbarDef(void) hudfont_t hudfont = {0}; if (ParseHUDFont(js_hudfont, &hudfont)) { + LoadHUDFont(&hudfont); array_push(out->hudfonts, hudfont); } } + if (load_defaults) + { + for (int i = 0; i < arrlen(default_hudfonts); ++i) + { + LoadHUDFont(&default_hudfonts[i]); + array_push(out->hudfonts, default_hudfonts[i]); + } + } + json_t *js_statusbars = JS_GetObject(data, "statusbars"); json_t *js_statusbar = NULL; JS_ArrayForEach(js_statusbar, js_statusbars) { statusbar_t statusbar = {0}; - if (ParseStatusBar(js_statusbar, &statusbar)) + if (ParseStatusBar(js_statusbar, &statusbar, load_defaults)) { array_push(out->statusbars, statusbar); } diff --git a/src/st_widgets.c b/src/st_widgets.c index 47c18a2e2..e73bd1538 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -33,7 +33,7 @@ void UpdateMessage(sbarelem_t *elem, player_t *player) return; } - static char string[80]; + static char string[128]; static int duration_left; if (duration_left > 0 && player->message[0]) From 88fd76b9a81eeaf8557a4033edad88044b096c12 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 27 Sep 2024 17:39:58 +0700 Subject: [PATCH 27/55] refactor sbarelem_t --- src/st_sbardef.c | 70 +++++++++----- src/st_sbardef.h | 75 +++++++++------ src/st_stuff.c | 238 ++++++++++++++++++++++++++--------------------- src/st_widgets.c | 18 ++-- src/st_widgets.h | 8 +- 5 files changed, 243 insertions(+), 166 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index d75e532a8..39e766c01 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -65,7 +65,7 @@ static boolean ParseSbarElem(json_t *json, sbarelem_t *out); static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, sbarelem_t *out) { - out->elemtype = type; + out->type = type; json_t *x_pos = JS_GetObject(json, "x"); json_t *y_pos = JS_GetObject(json, "y"); @@ -110,17 +110,20 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { case sbe_graphic: { + sbe_graphic_t *graphic = calloc(1, sizeof(*graphic)); json_t *patch = JS_GetObject(json, "patch"); if (!JS_IsString(patch)) { return false; } - out->patch_name = JS_GetString(patch); + graphic->patch_name = JS_GetString(patch); + out->pointer.graphic = graphic; } break; case sbe_animation: { + sbe_animation_t *animation = calloc(1, sizeof(*animation)); json_t *js_frames = JS_GetObject(json, "frames"); json_t *js_frame = NULL; JS_ArrayForEach(js_frame, js_frames) @@ -128,21 +131,23 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, sbarframe_t frame = {0}; if (ParseSbarFrame(js_frame, &frame)) { - array_push(out->frames, frame); + array_push(animation->frames, frame); } } + out->pointer.animation = animation; } break; case sbe_number: case sbe_percent: { + sbe_number_t *number = calloc(1, sizeof(*number)); json_t *font = JS_GetObject(json, "font"); if (!JS_IsString(font)) { return false; } - out->font_name = JS_GetString(font); + number->font_name = JS_GetString(font); json_t *type = JS_GetObject(json, "type"); json_t *param = JS_GetObject(json, "param"); @@ -152,32 +157,43 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - out->numtype = JS_GetInteger(type); - out->numparam = JS_GetInteger(param); - out->maxlength = JS_GetInteger(maxlength); + number->type = JS_GetInteger(type); + number->param = JS_GetInteger(param); + number->maxlength = JS_GetInteger(maxlength); + out->pointer.number = number; } break; case sbe_widget: { + sbe_widget_t *widget = calloc(1, sizeof(*widget)); + json_t *font = JS_GetObject(json, "font"); if (!JS_IsString(font)) { return false; } - out->font_name = JS_GetString(font); + widget->font_name = JS_GetString(font); json_t *type = JS_GetObject(json, "type"); if (!JS_IsNumber(type)) { return false; } - out->widgettype = JS_GetInteger(type); + widget->type = JS_GetInteger(type); - if (out->widgettype == sbw_message) + if (widget->type == sbw_message) { - out->duration = JS_GetNumberValue(json, "duration") * TICRATE; + widget->duration = JS_GetNumberValue(json, "duration") * TICRATE; } + out->pointer.widget = widget; + } + break; + + case sbe_face: + { + sbe_face_t *face = calloc(1, sizeof(*face)); + out->pointer.face = face; } break; @@ -336,31 +352,43 @@ static boolean ParseHUDFont(json_t *json, hudfont_t *out) return true; } +static sbe_widget_t message = { + .type = sbw_message, + .font_name = "ConFont", + .duration = 4 * TICRATE +}; + +static sbe_widget_t monsec = { + .type = sbw_monsec, + .font_name = "SmallFont" +}; + +static sbe_widget_t time = { + .type = sbw_time, + .font_name = "SmallFont" +}; + static sbarelem_t default_widgets[] = { { - .elemtype = sbe_widget, + .type = sbe_widget, .x_pos = 0, .y_pos = 0, .alignment = sbe_wide_left, - .widgettype = sbw_message, - .font_name = "ConFont", - .duration = 4 * TICRATE + .pointer.widget = &message }, { - .elemtype = sbe_widget, + .type = sbe_widget, .x_pos = 0, .y_pos = 160, .alignment = sbe_wide_left, - .widgettype = sbw_monsec, - .font_name = "SmallFont", + .pointer.widget = &monsec }, { - .elemtype = sbe_widget, + .type = sbe_widget, .x_pos = 0, .y_pos = 153, .alignment = sbe_wide_left, - .widgettype = sbw_time, - .font_name = "SmallFont", + .pointer.widget = &time } }; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index f95b45ee0..8a8ce6d23 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -132,54 +132,75 @@ typedef struct sbarelem_s sbarelem_t; typedef struct numberfont_s numberfont_t; typedef struct hudfont_s hudfont_t; -struct sbarelem_s +typedef struct { - sbarelementtype_t elemtype; - int x_pos; - int y_pos; - sbaralignment_t alignment; - const char *tranmap; - const char *translation; - crange_idx_e cr; - crange_idx_e crboom; - sbarcondition_t *conditions; - sbarelem_t *children; - - // graphic const char *patch_name; patch_t *patch; +} sbe_graphic_t; - // animation +typedef struct +{ sbarframe_t *frames; int frame_index; int duration_left; +} sbe_animation_t; - // number, percent +typedef struct +{ const char *font_name; - numberfont_t *numfont; - sbarnumbertype_t numtype; - int numparam; + numberfont_t *font; + sbarnumbertype_t type; + int param; int maxlength; - int number; - int xoffset; - int numnumbers; + int value; + int numvalues; int oldvalue; +} sbe_number_t; - // face +typedef struct +{ int faceindex; int facecount; int oldhealth; +} sbe_face_t; - // Woof! - - // widget - sbarwidgettype_t widgettype; - hudfont_t *hudfont; +typedef struct sbe_widget_s +{ + sbarwidgettype_t type; + const char *font_name; + hudfont_t *font; const char *string; int totalwidth; // message int duration; +} sbe_widget_t; + +struct sbarelem_s +{ + sbarelementtype_t type; + int x_pos; + int y_pos; + sbaralignment_t alignment; + const char *tranmap; + const char *translation; + sbarcondition_t *conditions; + sbarelem_t *children; + + crange_idx_e cr; + crange_idx_e crboom; + int xoffset; + + union + { + sbe_graphic_t *graphic; + sbe_animation_t *animation; + sbe_number_t *number; + sbe_face_t *face; + + // Woof! + sbe_widget_t *widget; + } pointer; }; typedef struct diff --git a/src/st_stuff.c b/src/st_stuff.c index a7b0109d3..b4c243796 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -370,29 +370,29 @@ static int SmoothCount(int shownval, int realval) } } -static int ResolveNumber(sbarelem_t *elem, player_t *player) +static int ResolveNumber(sbe_number_t *number, player_t *player) { int result = 0; - int param = elem->numparam; + int param = number->param; - switch (elem->numtype) + switch (number->type) { case sbn_health: - if (elem->oldvalue == -1) + if (number->oldvalue == -1) { - elem->oldvalue = player->health; + number->oldvalue = player->health; } - result = SmoothCount(elem->oldvalue, player->health); - elem->oldvalue = result; + result = SmoothCount(number->oldvalue, player->health); + number->oldvalue = result; break; case sbn_armor: - if (elem->oldvalue == -1) + if (number->oldvalue == -1) { - elem->oldvalue = player->armorpoints; + number->oldvalue = player->armorpoints; } - result = SmoothCount(elem->oldvalue, player->armorpoints); - elem->oldvalue = result; + result = SmoothCount(number->oldvalue, player->armorpoints); + number->oldvalue = result; break; case sbn_frags: @@ -442,12 +442,12 @@ static int ResolveNumber(sbarelem_t *elem, player_t *player) return result; } -static int CalcPainOffset(sbarelem_t *elem, player_t *player) +static int CalcPainOffset(sbe_face_t *face, player_t *player) { int health = player->health > 100 ? 100 : player->health; int lasthealthcalc = ST_FACESTRIDE * (((100 - health) * ST_NUMPAINFACES) / 101); - elem->oldhealth = health; + face->oldhealth = health; return lasthealthcalc; } @@ -465,7 +465,7 @@ static int DeadFace(player_t *player) return ST_DEADFACE; } -static void UpdateFace(sbarelem_t *elem, player_t *player) +static void UpdateFace(sbe_face_t *face, player_t *player) { static int priority; static int lastattackdown = -1; @@ -476,8 +476,8 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) if (!player->health) { priority = 9; - elem->faceindex = DeadFace(player); - elem->facecount = 1; + face->faceindex = DeadFace(player); + face->facecount = 1; } } @@ -501,8 +501,8 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) { // evil grin if just picked up weapon priority = 8; - elem->facecount = ST_EVILGRINCOUNT; - elem->faceindex = CalcPainOffset(elem, player) + ST_EVILGRINOFFSET; + face->facecount = ST_EVILGRINCOUNT; + face->faceindex = CalcPainOffset(face, player) + ST_EVILGRINOFFSET; } } } @@ -519,12 +519,12 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) boolean right = false; // [FG] show "Ouch Face" as intended - if (player->health - elem->oldhealth > ST_MUCHPAIN) + if (player->health - face->oldhealth > ST_MUCHPAIN) { // [FG] raise "Ouch Face" priority priority = 8; - elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem, player) + ST_OUCHOFFSET; + face->facecount = ST_TURNCOUNT; + face->faceindex = CalcPainOffset(face, player) + ST_OUCHOFFSET; } else { @@ -545,23 +545,23 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) right = diffangle <= ANG180; } // confusing, aint it? - elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem, player); + face->facecount = ST_TURNCOUNT; + face->faceindex = CalcPainOffset(face, player); if (diffangle < ANG45) { // head-on - elem->faceindex += ST_RAMPAGEOFFSET; + face->faceindex += ST_RAMPAGEOFFSET; } else if (right) { // turn face right - elem->faceindex += ST_TURNOFFSET; + face->faceindex += ST_TURNOFFSET; } else { // turn face left - elem->faceindex += ST_TURNOFFSET + 1; + face->faceindex += ST_TURNOFFSET + 1; } } } @@ -572,17 +572,17 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) // getting hurt because of your own damn stupidity if (player->damagecount) { - if (player->health - elem->oldhealth > ST_MUCHPAIN) + if (player->health - face->oldhealth > ST_MUCHPAIN) { priority = 7; - elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem, player) + ST_OUCHOFFSET; + face->facecount = ST_TURNCOUNT; + face->faceindex = CalcPainOffset(face, player) + ST_OUCHOFFSET; } else { priority = 6; - elem->facecount = ST_TURNCOUNT; - elem->faceindex = CalcPainOffset(elem, player) + ST_RAMPAGEOFFSET; + face->facecount = ST_TURNCOUNT; + face->faceindex = CalcPainOffset(face, player) + ST_RAMPAGEOFFSET; } } } @@ -599,8 +599,8 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) else if (!--lastattackdown) { priority = 5; - elem->faceindex = CalcPainOffset(elem, player) + ST_RAMPAGEOFFSET; - elem->facecount = 1; + face->faceindex = CalcPainOffset(face, player) + ST_RAMPAGEOFFSET; + face->facecount = 1; lastattackdown = 1; } } @@ -616,75 +616,77 @@ static void UpdateFace(sbarelem_t *elem, player_t *player) if ((player->cheats & CF_GODMODE) || player->powers[pw_invulnerability]) { priority = 4; - elem->faceindex = ST_GODFACE; - elem->facecount = 1; + face->faceindex = ST_GODFACE; + face->facecount = 1; } } // look left or look right if the facecount has timed out - if (!elem->facecount) + if (!face->facecount) { - elem->faceindex = CalcPainOffset(elem, player) + (M_Random() % 3); - elem->facecount = ST_STRAIGHTFACECOUNT; + face->faceindex = CalcPainOffset(face, player) + (M_Random() % 3); + face->facecount = ST_STRAIGHTFACECOUNT; priority = 0; } - --elem->facecount; + --face->facecount; } static void UpdateNumber(sbarelem_t *elem, player_t *player) { - int number = ResolveNumber(elem, player); - int power = (number < 0 ? elem->maxlength - 1 : elem->maxlength); + sbe_number_t *number = elem->pointer.number; + + int value = ResolveNumber(number, player); + int power = (value < 0 ? number->maxlength - 1 : number->maxlength); int max = (int)pow(10.0, power) - 1; - int numglyphs = 0; - int numnumbers = 0; + int valglyphs = 0; + int numvalues = 0; - numberfont_t *font = elem->numfont; + numberfont_t *font = number->font; if (font == NULL) { array_foreach(font, sbardef->numberfonts) { - if (!strcmp(font->name, elem->font_name)) + if (!strcmp(font->name, number->font_name)) { break; } } } - if (number < 0 && font->minus != NULL) + if (value < 0 && font->minus != NULL) { - number = MAX(-max, number); - numnumbers = (int)log10(-number) + 1; - numglyphs = numnumbers + 1; + value = MAX(-max, value); + numvalues = (int)log10(-value) + 1; + valglyphs = numvalues + 1; } else { - number = BETWEEN(0, max, number); - numnumbers = numglyphs = number != 0 ? ((int)log10(number) + 1) : 1; + value = BETWEEN(0, max, value); + numvalues = valglyphs = value != 0 ? ((int)log10(value) + 1) : 1; } - if (elem->elemtype == sbe_percent && font->percent != NULL) + if (elem->type == sbe_percent && font->percent != NULL) { - ++numglyphs; + ++valglyphs; } - int totalwidth = font->monowidth * numglyphs; + int totalwidth = font->monowidth * valglyphs; if (font->type == sbf_proportional) { totalwidth = 0; - if (number < 0 && font->minus != NULL) + if (value < 0 && font->minus != NULL) { totalwidth += SHORT(font->minus->width); } - int tempnum = number; + int tempnum = value; while (tempnum > 0) { int workingnum = tempnum % 10; totalwidth = SHORT(font->numbers[workingnum]->width); tempnum /= 10; } - if (elem->elemtype == sbe_percent && font->percent != NULL) + if (elem->type == sbe_percent && font->percent != NULL) { totalwidth += SHORT(font->percent->width); } @@ -700,28 +702,30 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) elem->xoffset -= totalwidth; } - elem->numfont = font; - elem->number = number; - elem->numnumbers = numnumbers; + number->font = font; + number->value = value; + number->numvalues = numvalues; } static void UpdateString(sbarelem_t *elem) { + sbe_widget_t *widget = elem->pointer.widget; + int numglyphs = 0; - hudfont_t *font = elem->hudfont; + hudfont_t *font = widget->font; if (font == NULL) { array_foreach(font, sbardef->hudfonts) { - if (!strcmp(font->name, elem->font_name)) + if (!strcmp(font->name, widget->font_name)) { break; } } } - numglyphs = strlen(elem->string); + numglyphs = strlen(widget->string); int totalwidth = font->monowidth * numglyphs; if (font->type == sbf_proportional) @@ -729,7 +733,7 @@ static void UpdateString(sbarelem_t *elem) totalwidth = 0; for (int i = 0; i < numglyphs; ++i) { - int ch = elem->string[i]; + int ch = widget->string[i]; ch = M_ToUpper(ch) - HU_FONTSTART; if (ch < 0 || ch > HU_FONTSIZE) { @@ -756,23 +760,25 @@ static void UpdateString(sbarelem_t *elem) elem->xoffset -= totalwidth; } - elem->hudfont = font; - elem->totalwidth = totalwidth; + widget->font = font; + widget->totalwidth = totalwidth; } static void UpdateAnimation(sbarelem_t *elem) { - if (elem->duration_left == 0) + sbe_animation_t *animation = elem->pointer.animation; + + if (animation->duration_left == 0) { - ++elem->frame_index; - if (elem->frame_index == array_size(elem->frames)) + ++animation->frame_index; + if (animation->frame_index == array_size(animation->frames)) { - elem->frame_index = 0; + animation->frame_index = 0; } - elem->duration_left = elem->frames[elem->frame_index].duration; + animation->duration_left = animation->frames[animation->frame_index].duration; } - --elem->duration_left; + --animation->duration_left; } static void UpdateBoomColors(sbarelem_t *elem, player_t *player) @@ -783,12 +789,14 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) return; } + sbe_number_t *number = elem->pointer.number; + boolean invul = (player->powers[pw_invulnerability] || player->cheats & CF_GODMODE); crange_idx_e cr; - switch (elem->numtype) + switch (number->type) { case sbn_health: { @@ -874,18 +882,20 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) static void UpdateWidget(sbarelem_t *elem, player_t *player) { - switch (elem->widgettype) + sbe_widget_t *widget = elem->pointer.widget; + + switch (widget->type) { case sbw_message: - UpdateMessage(elem, player); + UpdateMessage(widget, player); UpdateString(elem); break; case sbw_monsec: - UpdateMonSec(elem); + UpdateMonSec(widget); UpdateString(elem); break; case sbw_time: - UpdateStTime(elem, player); + UpdateStTime(widget, player); UpdateString(elem); break; case sbw_coord: @@ -901,10 +911,10 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) static void UpdateElem(sbarelem_t *elem, player_t *player) { - switch (elem->elemtype) + switch (elem->type) { case sbe_face: - UpdateFace(elem, player); + UpdateFace(elem->pointer.face, player); break; case sbe_animation: @@ -947,33 +957,40 @@ static void UpdateStatusBar(player_t *player) static void ResetElem(sbarelem_t *elem) { - switch (elem->elemtype) + switch (elem->type) { case sbe_graphic: - elem->patch = CachePatchName(elem->patch_name); + { + sbe_graphic_t *graphic = elem->pointer.graphic; + graphic->patch = CachePatchName(graphic->patch_name); + } break; case sbe_face: - elem->faceindex = 0; - elem->facecount = 0; - elem->oldhealth = -1; + { + sbe_face_t *face = elem->pointer.face; + face->faceindex = 0; + face->facecount = 0; + face->oldhealth = -1; + } break; case sbe_animation: { + sbe_animation_t *animation = elem->pointer.animation; sbarframe_t *frame; - array_foreach(frame, elem->frames) + array_foreach(frame, animation->frames) { frame->patch = CachePatchName(frame->patch_name); } - elem->frame_index = 0; - elem->duration_left = 0; + animation->frame_index = 0; + animation->duration_left = 0; } break; case sbe_number: case sbe_percent: - elem->oldvalue = -1; + elem->pointer.number->oldvalue = -1; break; default: @@ -1091,26 +1108,28 @@ static void DrawGlyph(int x, int y, sbarelem_t *elem, fonttype_t fonttype, static void DrawNumber(int x, int y, sbarelem_t *elem) { - int number = elem->number; + sbe_number_t *number = elem->pointer.number; + + int value = number->value; int base_xoffset = elem->xoffset; - numberfont_t *font = elem->numfont; + numberfont_t *font = number->font; - if (number < 0 && font->minus != NULL) + if (value < 0 && font->minus != NULL) { DrawGlyph(x, y, elem, font->type, font->monowidth, font->minus); - number = -number; + value = -value; } - int glyphindex = elem->numnumbers; + int glyphindex = number->numvalues; while (glyphindex > 0) { int glyphbase = (int)pow(10.0, --glyphindex); - int workingnum = number / glyphbase; + int workingnum = value / glyphbase; DrawGlyph(x, y, elem, font->type, font->monowidth, font->numbers[workingnum]); - number -= (workingnum * glyphbase); + value -= (workingnum * glyphbase); } - if (elem->elemtype == sbe_percent && font->percent != NULL) + if (elem->type == sbe_percent && font->percent != NULL) { crange_idx_e oldcr = elem->crboom; if (sts_pct_always_gray) @@ -1126,10 +1145,12 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) static void DrawString(int x, int y, sbarelem_t *elem) { + sbe_widget_t *widget = elem->pointer.widget; + int base_xoffset = elem->xoffset; - hudfont_t *font = elem->hudfont; + hudfont_t *font = widget->font; - const char *str = elem->string; + const char *str = widget->string; while (*str) { int ch = *str++; @@ -1174,22 +1195,27 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) x += elem->x_pos; y += elem->y_pos; - switch (elem->elemtype) + switch (elem->type) { case sbe_graphic: - DrawPatch(x, y, elem->alignment, elem->patch, elem->cr); + { + sbe_graphic_t *graphic = elem->pointer.graphic; + DrawPatch(x, y, elem->alignment, graphic->patch, elem->cr); + } break; case sbe_face: { - patch_t *patch = facepatches[elem->faceindex]; - DrawPatch(x, y, elem->alignment, patch, elem->cr); + sbe_face_t *face = elem->pointer.face; + DrawPatch(x, y, elem->alignment, facepatches[face->faceindex], + elem->cr); } break; case sbe_animation: { - patch_t *patch = elem->frames[elem->frame_index].patch; + sbe_animation_t *animation = elem->pointer.animation; + patch_t *patch = animation->frames[animation->frame_index].patch; DrawPatch(x, y, elem->alignment, patch, elem->cr); } break; @@ -1291,9 +1317,11 @@ static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) x += elem->x_pos; y += elem->y_pos; - if (elem->elemtype == sbe_widget) + if (elem->type == sbe_widget) { - int height = elem->hudfont->maxheight; + hudfont_t *font = elem->pointer.widget->font; + int height = font->maxheight; + if (y > scaledviewy && y < scaledviewy + scaledviewheight - height) { R_VideoErase(0, y, scaledviewx, height); diff --git a/src/st_widgets.c b/src/st_widgets.c index e73bd1538..da5a98e8b 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -25,11 +25,11 @@ #define RED_S "\x1b\x36" #define BLUE_S "\x1b\x37" -void UpdateMessage(sbarelem_t *elem, player_t *player) +void UpdateMessage(sbe_widget_t *widget, player_t *player) { if (!player->message) { - elem->string = ""; + widget->string = ""; return; } @@ -38,7 +38,7 @@ void UpdateMessage(sbarelem_t *elem, player_t *player) if (duration_left > 0 && player->message[0]) { - duration_left = elem->duration; + duration_left = widget->duration; M_StringCopy(string, player->message, sizeof(string)); player->message[0] = '\0'; } @@ -47,7 +47,7 @@ void UpdateMessage(sbarelem_t *elem, player_t *player) { if (player->message[0]) { - duration_left = elem->duration; + duration_left = widget->duration; M_StringCopy(string, player->message, sizeof(string)); player->message[0] = '\0'; } @@ -61,10 +61,10 @@ void UpdateMessage(sbarelem_t *elem, player_t *player) --duration_left; } - elem->string = string; + widget->string = string; } -void UpdateMonSec(sbarelem_t *elem) +void UpdateMonSec(sbe_widget_t *widget) { static char string[80]; @@ -105,10 +105,10 @@ void UpdateMonSec(sbarelem_t *elem) killcolor, fullkillcount, max_kill_requirement, itemcolor, fullitemcount, totalitems, secretcolor, fullsecretcount, totalsecret); - elem->string = string; + widget->string = string; } -void UpdateStTime(sbarelem_t *elem, player_t *player) +void UpdateStTime(sbe_widget_t *widget, player_t *player) { static char string[80]; @@ -144,5 +144,5 @@ void UpdateStTime(sbarelem_t *elem, player_t *player) (float)(player->btuse % (60 * TICRATE)) / TICRATE); } - elem->string = string; + widget->string = string; } diff --git a/src/st_widgets.h b/src/st_widgets.h index 6cc40600c..50bd6024d 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -14,11 +14,11 @@ #ifndef ST_WIDGETS_H #define ST_WIDGETS_H -struct sbarelem_s; +struct sbe_widget_s; struct player_s; -void UpdateMessage(struct sbarelem_s *elem, struct player_s *player); -void UpdateMonSec(struct sbarelem_s *elem); -void UpdateStTime(struct sbarelem_s *elem, struct player_s *player); +void UpdateMessage(struct sbe_widget_s *widget, struct player_s *player); +void UpdateMonSec(struct sbe_widget_s *widget); +void UpdateStTime(struct sbe_widget_s *widget, struct player_s *player); #endif \ No newline at end of file From 6c366e2524c310c74bc74a85a6a05368ba91f2a1 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 27 Sep 2024 21:07:50 +0700 Subject: [PATCH 28/55] secret message --- base/all-all/sbardef.lmp | 30 +++++++++++++++++ src/st_sbardef.c | 72 +++++++++++++++++++++++++--------------- src/st_sbardef.h | 1 + src/st_stuff.c | 8 +++-- src/st_widgets.c | 52 ++++++++++++++++++----------- src/st_widgets.h | 1 + 6 files changed, 116 insertions(+), 48 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index cdbdf292e..8b28659f1 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -881,6 +881,21 @@ "conditions": null, "children": null } + }, + { + "widget": + { + "x": 160, + "y": 52, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 8, + "font": "ConFont", + "duration": 2.5, + "conditions": null, + "children": null + } } ] }, @@ -1483,6 +1498,21 @@ "conditions": null, "children": null } + }, + { + "widget": + { + "x": 160, + "y": 68, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 8, + "font": "ConFont", + "duration": 2.5, + "conditions": null, + "children": null + } } ] } diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 39e766c01..28440aaca 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -182,10 +182,17 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, } widget->type = JS_GetInteger(type); - if (widget->type == sbw_message) + switch (widget->type) { - widget->duration = JS_GetNumberValue(json, "duration") * TICRATE; + case sbw_message: + case sbw_secret: + widget->duration = + JS_GetNumberValue(json, "duration") * TICRATE; + break; + default: + break; } + out->pointer.widget = widget; } break; @@ -352,43 +359,60 @@ static boolean ParseHUDFont(json_t *json, hudfont_t *out) return true; } -static sbe_widget_t message = { - .type = sbw_message, - .font_name = "ConFont", - .duration = 4 * TICRATE -}; - -static sbe_widget_t monsec = { - .type = sbw_monsec, - .font_name = "SmallFont" -}; - -static sbe_widget_t time = { - .type = sbw_time, - .font_name = "SmallFont" -}; - static sbarelem_t default_widgets[] = { { .type = sbe_widget, .x_pos = 0, .y_pos = 0, .alignment = sbe_wide_left, - .pointer.widget = &message + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_message, + .font_name = "ConFont", + .duration = 4 * TICRATE + }, + .cr = CR_NONE, + .crboom = CR_NONE + }, + { + .type = sbe_widget, + .x_pos = 160, + .y_pos = 52, + .alignment = sbe_h_middle, + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_secret, + .font_name = "ConFont", + .duration = 2.5 * TICRATE + }, + .cr = CR_GOLD, + .crboom = CR_NONE }, { .type = sbe_widget, .x_pos = 0, .y_pos = 160, .alignment = sbe_wide_left, - .pointer.widget = &monsec + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_monsec, + .font_name = "SmallFont" + }, + .cr = CR_NONE, + .crboom = CR_NONE }, { .type = sbe_widget, .x_pos = 0, .y_pos = 153, .alignment = sbe_wide_left, - .pointer.widget = &time + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_time, + .font_name = "SmallFont" + }, + .cr = CR_NONE, + .crboom = CR_NONE } }; @@ -422,11 +446,7 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out, for (int i = 0; i < arrlen(default_widgets); ++i) { sbarelem_t elem = default_widgets[i]; - if (!out->fullscreenrender) - { - elem.y_pos += (out->height - 200); - } - elem.cr = elem.crboom = CR_NONE; + elem.y_pos += (out->height - 200); array_push(out->children, elem); } } diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 8a8ce6d23..0ff09570b 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -100,6 +100,7 @@ typedef enum sbw_speed, sbw_message, + sbw_secret, } sbarwidgettype_t; typedef enum diff --git a/src/st_stuff.c b/src/st_stuff.c index b4c243796..5cee1f37b 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -888,15 +888,15 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) { case sbw_message: UpdateMessage(widget, player); - UpdateString(elem); + break; + case sbw_secret: + UpdateSecretMessage(widget, player); break; case sbw_monsec: UpdateMonSec(widget); - UpdateString(elem); break; case sbw_time: UpdateStTime(widget, player); - UpdateString(elem); break; case sbw_coord: case sbw_fps: @@ -907,6 +907,8 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) default: break; } + + UpdateString(elem); } static void UpdateElem(sbarelem_t *elem, player_t *player) diff --git a/src/st_widgets.c b/src/st_widgets.c index da5a98e8b..6bd33d0bb 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -33,10 +33,10 @@ void UpdateMessage(sbe_widget_t *widget, player_t *player) return; } - static char string[128]; + static char string[120]; static int duration_left; - if (duration_left > 0 && player->message[0]) + if (player->message[0]) { duration_left = widget->duration; M_StringCopy(string, player->message, sizeof(string)); @@ -45,16 +45,7 @@ void UpdateMessage(sbe_widget_t *widget, player_t *player) if (duration_left == 0) { - if (player->message[0]) - { - duration_left = widget->duration; - M_StringCopy(string, player->message, sizeof(string)); - player->message[0] = '\0'; - } - else - { - string[0] = '\0'; - } + string[0] = '\0'; } else { @@ -64,9 +55,33 @@ void UpdateMessage(sbe_widget_t *widget, player_t *player) widget->string = string; } -void UpdateMonSec(sbe_widget_t *widget) +void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) { static char string[80]; + static int duration_left; + + if (player->secretmessage) + { + duration_left = widget->duration; + M_StringCopy(string, player->secretmessage, sizeof(string)); + player->secretmessage = NULL; + } + + if (duration_left == 0) + { + string[0] = '\0'; + } + else + { + --duration_left; + } + + widget->string = string; +} + +void UpdateMonSec(sbe_widget_t *widget) +{ + static char string[120]; string[0] = '\0'; @@ -99,11 +114,11 @@ void UpdateMonSec(sbe_widget_t *widget) int itemcolor = (fullitemcount >= totalitems) ? '0' + CR_BLUE1 : '0' + CR_GRAY; - M_snprintf( - string, sizeof(string), + M_snprintf(string, sizeof(string), RED_S "K \x1b%c%d/%d " RED_S "I \x1b%c%d/%d " RED_S "S \x1b%c%d/%d", - killcolor, fullkillcount, max_kill_requirement, itemcolor, - fullitemcount, totalitems, secretcolor, fullsecretcount, totalsecret); + killcolor, fullkillcount, max_kill_requirement, + itemcolor, fullitemcount, totalitems, + secretcolor, fullsecretcount, totalsecret); widget->string = string; } @@ -136,8 +151,7 @@ void UpdateStTime(sbe_widget_t *widget, player_t *player) GRAY_S "%d:%05.2f\t", leveltime / TICRATE / 60, (float)(leveltime % (60 * TICRATE)) / TICRATE); } - - if (player->btuse_tics) + else { M_snprintf(string + offset, sizeof(string) - offset, GOLD_S "U %d:%05.2f\t", player->btuse / TICRATE / 60, diff --git a/src/st_widgets.h b/src/st_widgets.h index 50bd6024d..06ef1872a 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -18,6 +18,7 @@ struct sbe_widget_s; struct player_s; void UpdateMessage(struct sbe_widget_s *widget, struct player_s *player); +void UpdateSecretMessage(struct sbe_widget_s *widget, struct player_s *player); void UpdateMonSec(struct sbe_widget_s *widget); void UpdateStTime(struct sbe_widget_s *widget, struct player_s *player); From 21b3cd5340f7e228f555db274c89f55e9a0ae3e3 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Mon, 30 Sep 2024 17:01:40 +0700 Subject: [PATCH 29/55] chat widget --- base/all-all/sbardef.lmp | 28 +++ src/g_game.c | 3 +- src/hu_stuff.c | 61 +++--- src/hu_stuff.h | 2 - src/mn_menu.c | 2 - src/st_sbardef.c | 13 ++ src/st_sbardef.h | 1 + src/st_stuff.c | 15 +- src/st_widgets.c | 420 +++++++++++++++++++++++++++++++++++++-- src/st_widgets.h | 9 + 10 files changed, 506 insertions(+), 48 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 8b28659f1..c8738ce57 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -882,6 +882,20 @@ "children": null } }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 9, + "font": "ConFont", + "conditions": null, + "children": null + } + }, { "widget": { @@ -1499,6 +1513,20 @@ "children": null } }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 9, + "font": "ConFont", + "conditions": null, + "children": null + } + }, { "widget": { diff --git a/src/g_game.c b/src/g_game.c index 8332fb387..07cb432d9 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -83,6 +83,7 @@ #include "s_sound.h" #include "sounds.h" #include "st_stuff.h" +#include "st_widgets.h" #include "statdump.h" // [FG] StatCopy() #include "tables.h" #include "u_mapinfo.h" @@ -818,7 +819,7 @@ void G_BuildTiccmd(ticcmd_t* cmd) // Buttons - cmd->chatchar = HU_dequeueChatChar(); + cmd->chatchar = ST_DequeueChatChar(); if (M_InputGameActive(input_fire)) cmd->buttons |= BT_ATTACK; diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 39163f971..600178baf 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -152,7 +152,7 @@ static hu_widget_t widgets[MAX_HUDS][MAX_WIDGETS]; static void HU_ParseHUD (void); static char chat_dest[MAXPLAYERS]; -boolean chat_on; +//boolean chat_on; static boolean message_on; static boolean has_message; // killough 12/98 boolean message_dontfuckwithme; @@ -200,7 +200,7 @@ static int chat_msg_timer = HU_MSGTIMEOUT * (1000/TICRATE); // killough 11/9 // jff 5/10/98 french support removed, // as it was not being used and couldn't be easily tested // -const char shiftxform[] = +static const char shiftxform[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, @@ -1433,21 +1433,21 @@ boolean hud_time_use; // void HU_Drawer(void) { - hu_widget_t *w = widgets[hud_active]; + // hu_widget_t *w = widgets[hud_active]; - if (hud_pending) - return; + // if (hud_pending) + // return; - HUlib_reset_align_offsets(); + // HUlib_reset_align_offsets(); - while (w->multiline) - { - if ((w->multiline->on && *w->multiline->on) || w->multiline->built) - { - HUlib_draw_widget(w); - } - w++; - } + // while (w->multiline) + // { + // if ((w->multiline->on && *w->multiline->on) || w->multiline->built) + // { + // HUlib_draw_widget(w); + // } + // w++; + // } } // [FG] draw Time widget on intermission screen @@ -1538,14 +1538,14 @@ void HU_Ticker(void) boom_font = &sml_font; CR_BLUE = CR_BLUE1; } - +/* // wait a few tics before sending a backspace character if (bsdown && bscounter++ > 9) { HUlib_add_key_to_cur_line(&w_chat, KEY_BACKSPACE); bscounter = 8; } -/* + // tick down message counter if message is up if (message_counter && !--message_counter) message_on = message_nottobefuckedwith = false; @@ -1592,6 +1592,7 @@ void HU_Ticker(void) message_dontfuckwithme = 0; } */ +/* // check for incoming chat characters if (netgame) { @@ -1638,6 +1639,7 @@ void HU_Ticker(void) } } } +*/ // draw the automap widgets if automap is displayed @@ -1729,19 +1731,19 @@ void HU_queueChatChar(char c) // // Passed nothing, returns the character dequeued // -char HU_dequeueChatChar(void) -{ - char c; +// char ST_DequeueChatChar(void) +// { +// char c; - if (head != tail) - { - c = chatchars[tail++]; - tail &= QUEUESIZE-1; - } - else - c = 0; - return c; -} +// if (head != tail) +// { +// c = chatchars[tail++]; +// tail &= QUEUESIZE-1; +// } +// else +// c = 0; +// return c; +// } // // HU_Responder() @@ -1753,6 +1755,7 @@ char HU_dequeueChatChar(void) boolean HU_Responder(event_t *ev) { +/* static char lastmessage[HU_MAXLINELENGTH+1]; const char *macromessage; boolean eatkey = false; @@ -1895,6 +1898,8 @@ boolean HU_Responder(event_t *ev) } } return eatkey; +*/ + return false; } // [FG] dynamic HUD alignment diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 6588ad95c..47238b0db 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -43,7 +43,6 @@ boolean HU_Responder(struct event_s *ev); void HU_Ticker(void); void HU_Drawer(void); -char HU_dequeueChatChar(void); void HU_Erase(void); boolean HU_DemoProgressBar(boolean force); @@ -70,7 +69,6 @@ extern boolean show_toggle_messages; extern boolean show_pickup_messages; extern boolean chat_on; -extern boolean message_dontfuckwithme; extern int playback_tic, playback_totaltics; diff --git a/src/mn_menu.c b/src/mn_menu.c index bbd71c328..dc346ab0d 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -1526,8 +1526,6 @@ static void M_ChangeMessages(int choice) { displaymsg("%s", s_MSGON); // Ty 03/27/98 - externalized } - - message_dontfuckwithme = true; } ///////////////////////////// diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 28440aaca..91a9d7a05 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -374,6 +374,19 @@ static sbarelem_t default_widgets[] = { .cr = CR_NONE, .crboom = CR_NONE }, + { + .type = sbe_widget, + .x_pos = 0, + .y_pos = 12, + .alignment = sbe_wide_left, + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_chat, + .font_name = "ConFont" + }, + .cr = CR_GOLD, + .crboom = CR_NONE + }, { .type = sbe_widget, .x_pos = 160, diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 0ff09570b..8285376f4 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -101,6 +101,7 @@ typedef enum sbw_message, sbw_secret, + sbw_chat, } sbarwidgettype_t; typedef enum diff --git a/src/st_stuff.c b/src/st_stuff.c index 5cee1f37b..505fe6fdd 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -889,6 +889,9 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) case sbw_message: UpdateMessage(widget, player); break; + case sbw_chat: + UpdateChat(widget); + break; case sbw_secret: UpdateSecretMessage(widget, player); break; @@ -900,8 +903,6 @@ static void UpdateWidget(sbarelem_t *elem, player_t *player) break; case sbw_coord: case sbw_fps: - case sbw_rate: - case sbw_cmd: case sbw_speed: break; default: @@ -1424,6 +1425,10 @@ boolean ST_Responder(event_t *ev) { return false; } + else if (MessagesResponder(ev)) + { + return true; + } else // if a user keypress... { return M_CheatResponder(ev); // Try cheat responder in m_cheat.c @@ -1584,6 +1589,12 @@ void ST_Ticker(void) return; } + // check for incoming chat characters + if (netgame) + { + UpdateChatMessage(); + } + player_t *player = &players[displayplayer]; UpdateStatusBar(player); diff --git a/src/st_widgets.c b/src/st_widgets.c index 6bd33d0bb..1fccdd734 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -11,9 +11,18 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +#include "dstrings.h" +#include "d_event.h" #include "d_player.h" +#include "doomdef.h" +#include "doomkeys.h" #include "doomstat.h" +#include "doomtype.h" +#include "hu_stuff.h" +#include "m_input.h" #include "m_misc.h" +#include "s_sound.h" +#include "sounds.h" #include "st_sbardef.h" #include "i_timer.h" #include "v_video.h" @@ -25,34 +34,58 @@ #define RED_S "\x1b\x36" #define BLUE_S "\x1b\x37" +#define HU_MAXLINELENGTH 120 + +boolean chat_on; + +static char message_string[HU_MAXLINELENGTH]; + +static boolean message_review; + void UpdateMessage(sbe_widget_t *widget, player_t *player) { - if (!player->message) - { - widget->string = ""; - return; - } - static char string[120]; static int duration_left; + static boolean overwritable = true; + static boolean messages_enabled = true; - if (player->message[0]) + if (messages_enabled) { - duration_left = widget->duration; - M_StringCopy(string, player->message, sizeof(string)); - player->message[0] = '\0'; + if (message_string[0]) + { + duration_left = widget->duration; + M_StringCopy(string, message_string, sizeof(string)); + message_string[0] = '\0'; + overwritable = false; + } + else if (player->message && player->message[0] && overwritable) + { + duration_left = widget->duration; + M_StringCopy(string, player->message, sizeof(string)); + player->message[0] = '\0'; + } + else if (message_review) + { + message_review = false; + duration_left = widget->duration; + } + } + + if (messages_enabled != show_messages) + { + messages_enabled = show_messages; } if (duration_left == 0) { - string[0] = '\0'; + widget->string = ""; + overwritable = true; } else { + widget->string = string; --duration_left; } - - widget->string = string; } void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) @@ -79,6 +112,367 @@ void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) widget->string = string; } +// key tables +// jff 5/10/98 french support removed, +// as it was not being used and couldn't be easily tested +// + +static const char shiftxform[] = +{ + 0, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, + ' ', '!', '"', '#', '$', '%', '&', + '"', // shift-' + '(', ')', '*', '+', + '<', // shift-, + '_', // shift-- + '>', // shift-. + '?', // shift-/ + ')', // shift-0 + '!', // shift-1 + '@', // shift-2 + '#', // shift-3 + '$', // shift-4 + '%', // shift-5 + '^', // shift-6 + '&', // shift-7 + '*', // shift-8 + '(', // shift-9 + ':', + ':', // shift-; + '<', + '+', // shift-= + '>', '?', '@', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + '[', // shift-[ + '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK + ']', // shift-] + '"', '_', + '\'', // shift-` + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + '{', '|', '}', '~', 127 +}; + +typedef struct +{ + char string[HU_MAXLINELENGTH]; + int pos; +} chatline_t; + +static chatline_t lines[MAXPLAYERS]; + +static void ClearChatLine(chatline_t *line) +{ + line->pos = 0; + line->string[0] = '\0'; +} + +static boolean AddKeyToLine(chatline_t *line, char ch) +{ + if (ch >= ' ' && ch <= '_') + { + if (line->pos == HU_MAXLINELENGTH - 1) + { + return false; + } + line->string[line->pos++] = ch; + line->string[line->pos] = '\0'; + } + else if (ch == KEY_BACKSPACE) // phares + { + if (line->pos == 0) + { + return false; + } + else + { + line->string[--line->pos] = '\0'; + } + } + else if (ch != KEY_ENTER) // phares + { + return false; // did not eat key + } + + return true; // ate the key +} + +void UpdateChatMessage(void) +{ + static char chat_dest[MAXPLAYERS]; + + for (int p = 0; p < MAXPLAYERS; p++) + { + if (!playeringame[p]) + { + continue; + } + + char ch = players[p].cmd.chatchar; + if (p != consoleplayer && ch) + { + if (ch <= HU_BROADCAST) + { + chat_dest[p] = ch; + } + else + { + if (ch >= 'a' && ch <= 'z') + { + ch = (char)shiftxform[(unsigned char)ch]; + } + + if (AddKeyToLine(&lines[p], ch) && ch == KEY_ENTER) + { + if (lines[p].pos && (chat_dest[p] == consoleplayer + 1 + || chat_dest[p] == HU_BROADCAST)) + { + M_snprintf(message_string, sizeof(message_string), + "%s%s", *player_names[p], lines[p].string); + + S_StartSoundPitch(0, + gamemode == commercial ? sfx_radio + : sfx_tink, + PITCH_NONE); + } + ClearChatLine(&lines[p]); + } + } + players[p].cmd.chatchar = 0; + } + } +} + +static const char *chat_macros[] = { + HUSTR_CHATMACRO0, HUSTR_CHATMACRO1, HUSTR_CHATMACRO2, HUSTR_CHATMACRO3, + HUSTR_CHATMACRO4, HUSTR_CHATMACRO5, HUSTR_CHATMACRO6, HUSTR_CHATMACRO7, + HUSTR_CHATMACRO8, HUSTR_CHATMACRO9 +}; + +#define QUEUESIZE 128 + +static char chatchars[QUEUESIZE]; +static int head = 0; +static int tail = 0; + +// +// QueueChatChar() +// +// Add an incoming character to the circular chat queue +// +// Passed the character to queue, returns nothing +// + +static void QueueChatChar(char c) +{ + if (((head + 1) & (QUEUESIZE - 1)) == tail) + { + displaymsg("%s", HUSTR_MSGU); + } + else + { + chatchars[head++] = c; + head &= QUEUESIZE - 1; + } +} + +// +// ST_DequeueChatChar() +// +// Remove the earliest added character from the circular chat queue +// +// Passed nothing, returns the character dequeued +// + +char ST_DequeueChatChar(void) +{ + char ch; + + if (head != tail) + { + ch = chatchars[tail++]; + tail &= QUEUESIZE - 1; + } + else + { + ch = 0; + } + + return ch; +} + +static chatline_t chatline; + +boolean MessagesResponder(event_t *ev) +{ + static char lastmessage[HU_MAXLINELENGTH + 1]; + + boolean eatkey = false; + static boolean shiftdown = false; + static boolean altdown = false; + int ch; + int numplayers; + + static int num_nobrainers = 0; + + ch = (ev->type == ev_keydown) ? ev->data1.i : 0; + + numplayers = 0; + for (int p = 0; p < MAXPLAYERS; p++) + { + numplayers += playeringame[p]; + } + + if (ev->data1.i == KEY_RSHIFT) + { + shiftdown = ev->type == ev_keydown; + return false; + } + + if (ev->data1.i == KEY_RALT) + { + altdown = ev->type == ev_keydown; + return false; + } + + if (M_InputActivated(input_chat_backspace)) + { + ch = KEY_BACKSPACE; + } + + if (!chat_on) + { + if (M_InputActivated(input_chat_enter)) // phares + { + //jff 2/26/98 toggle list of messages + message_review = true; + eatkey = true; + } + else if (demoplayback) // killough 10/02/98: no chat if demo playback + { + eatkey = false; + } + else if (netgame && M_InputActivated(input_chat)) + { + eatkey = chat_on = true; + ClearChatLine(&chatline); + QueueChatChar(HU_BROADCAST); + } + else if (netgame && numplayers > 2) // killough 11/98: simplify + { + for (int p = 0; p < MAXPLAYERS; p++) + { + if (M_InputActivated(input_chat_dest0 + p)) + { + if (p == consoleplayer) + { + displaymsg("%s", + ++num_nobrainers < 3 ? HUSTR_TALKTOSELF1 + : num_nobrainers < 6 ? HUSTR_TALKTOSELF2 + : num_nobrainers < 9 ? HUSTR_TALKTOSELF3 + : num_nobrainers < 32 + ? HUSTR_TALKTOSELF4 + : HUSTR_TALKTOSELF5); + } + else if (playeringame[p]) + { + eatkey = chat_on = true; + ClearChatLine(&chatline); + QueueChatChar((char)(p + 1)); + break; + } + } + } + } + } // jff 2/26/98 no chat functions if message review is displayed + else + { + if (M_InputActivated(input_chat_enter)) + { + ch = KEY_ENTER; + } + + // send a macro + if (altdown) + { + ch = ch - '0'; + if (ch < 0 || ch > 9) + { + return false; + } + const char *macromessage = chat_macros[ch]; + + // kill last message with a '\n' + QueueChatChar(KEY_ENTER); // DEBUG!!! // phares + + // send the macro message + while (*macromessage) + { + QueueChatChar(*macromessage++); + } + QueueChatChar(KEY_ENTER); // phares + + // leave chat mode and notify that it was sent + chat_on = false; + M_StringCopy(lastmessage, chat_macros[ch], sizeof(lastmessage)); + displaymsg("%s", lastmessage); + eatkey = true; + } + else + { + if (shiftdown || (ch >= 'a' && ch <= 'z')) + { + ch = shiftxform[ch]; + } + eatkey = AddKeyToLine(&chatline, ch); + if (eatkey) + { + QueueChatChar(ch); + } + + if (ch == KEY_ENTER) // phares + { + chat_on = false; + if (chatline.pos) + { + M_StringCopy(lastmessage, chatline.string, + sizeof(lastmessage)); + displaymsg("%s", lastmessage); + } + } + else if (ch == KEY_ESCAPE) // phares + { + chat_on = false; + } + } + } + return eatkey; +} + +void UpdateChat(sbe_widget_t *widget) +{ + static char string[HU_MAXLINELENGTH + 1]; + + string[0] = '\0'; + + if (chat_on) + { + M_StringCopy(string, chatline.string, sizeof(string)); + + if (leveltime & 16) + { + M_StringConcat(string, "_", sizeof(string)); + } + } + + widget->string = string; +} + void UpdateMonSec(sbe_widget_t *widget) { static char string[120]; diff --git a/src/st_widgets.h b/src/st_widgets.h index 06ef1872a..96b885459 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -14,12 +14,21 @@ #ifndef ST_WIDGETS_H #define ST_WIDGETS_H +#include "doomtype.h" + struct sbe_widget_s; struct player_s; +struct event_s; void UpdateMessage(struct sbe_widget_s *widget, struct player_s *player); void UpdateSecretMessage(struct sbe_widget_s *widget, struct player_s *player); void UpdateMonSec(struct sbe_widget_s *widget); void UpdateStTime(struct sbe_widget_s *widget, struct player_s *player); +void UpdateChatMessage(void); +void UpdateChat(struct sbe_widget_s *widget); +boolean MessagesResponder(struct event_s *ev); + +char ST_DequeueChatChar(void); + #endif \ No newline at end of file From 43617835bbfb53c4b0aec51363f6c2b17cd275de Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 03:52:21 +0700 Subject: [PATCH 30/55] implement the rest of the widgets * Implement multiline widgets. * Move defaults to base/all-all/sbhuddef.lmp * Remove hu_stuff.* and hu_lib.* * Cleanup. --- base/all-all/sbardef.lmp | 308 ++++- base/all-all/sbhuddef.lmp | 277 +++++ base/all-all/woofhud.lmp | 37 - src/CMakeLists.txt | 2 - src/am_map.c | 9 +- src/d_main.c | 19 +- src/doomstat.c | 2 +- src/doomstat.h | 2 +- src/f_finale.c | 3 +- src/g_game.c | 26 +- src/hu_command.c | 8 +- src/hu_command.h | 5 +- src/hu_coordinates.c | 76 +- src/hu_coordinates.h | 8 +- src/hu_crosshair.c | 34 +- src/hu_lib.c | 603 ---------- src/hu_lib.h | 183 --- src/hu_stuff.c | 2368 ------------------------------------- src/hu_stuff.h | 127 -- src/m_cheat.c | 8 +- src/m_config.c | 4 +- src/m_json.c | 3 +- src/mn_menu.c | 7 +- src/mn_setup.c | 28 +- src/p_mobj.c | 2 - src/p_setup.c | 2 +- src/p_spec.c | 2 +- src/p_user.c | 3 +- src/st_sbardef.c | 169 +-- src/st_sbardef.h | 25 +- src/st_stuff.c | 375 ++++-- src/st_stuff.h | 5 + src/st_widgets.c | 565 ++++++++- src/st_widgets.h | 52 +- src/u_mapinfo.c | 2 +- src/v_video.h | 8 + src/wi_stuff.c | 6 +- 37 files changed, 1633 insertions(+), 3730 deletions(-) create mode 100644 base/all-all/sbhuddef.lmp delete mode 100644 base/all-all/woofhud.lmp delete mode 100644 src/hu_lib.c delete mode 100644 src/hu_lib.h delete mode 100644 src/hu_stuff.c delete mode 100644 src/hu_stuff.h diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index c8738ce57..2fde0e153 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -25,12 +25,12 @@ "hudfonts": [ { - "name": "ConFont", + "name": "Console", "type": 2, "stem": "STCFN" }, { - "name": "SmallFont", + "name": "Digits", "type": 0, "stem": "DIG" } @@ -848,8 +848,14 @@ "tranmap": null, "translation": null, "type": 0, - "font": "SmallFont", - "conditions": null, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 6 + } + ], "children": null } }, @@ -862,7 +868,109 @@ "tranmap": null, "translation": null, "type": 1, - "font": "SmallFont", + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 6 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 152, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 0, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 146, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 1, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 8, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 2, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 0, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 3, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 4, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 167, + "alignment": 42, + "tranmap": null, + "translation": null, + "type": 5, + "font": "Digits", "conditions": null, "children": null } @@ -876,7 +984,7 @@ "tranmap": null, "translation": null, "type": 7, - "font": "ConFont", + "font": "Console", "duration": 4, "conditions": null, "children": null @@ -891,7 +999,7 @@ "tranmap": null, "translation": "CRGOLD", "type": 9, - "font": "ConFont", + "font": "Console", "conditions": null, "children": null } @@ -905,11 +1013,85 @@ "tranmap": null, "translation": "CRGOLD", "type": 8, - "font": "ConFont", + "font": "Console", "duration": 2.5, "conditions": null, "children": null } + }, + { + "widget": + { + "x": 160, + "y": 167, + "alignment": 9, + "tranmap": null, + "translation": null, + "type": 6, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 160, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 2 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } } ] }, @@ -1479,7 +1661,7 @@ "tranmap": null, "translation": null, "type": 0, - "font": "SmallFont", + "font": "Digits", "conditions": null, "children": null } @@ -1493,7 +1675,77 @@ "tranmap": null, "translation": null, "type": 1, - "font": "SmallFont", + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 8, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 2, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 0, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 3, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 4, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 167, + "alignment": 42, + "tranmap": null, + "translation": null, + "type": 5, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 167, + "alignment": 9, + "tranmap": null, + "translation": null, + "type": 6, + "font": "Digits", "conditions": null, "children": null } @@ -1507,12 +1759,27 @@ "tranmap": null, "translation": null, "type": 7, - "font": "ConFont", + "font": "Console", "duration": 4, "conditions": null, "children": null } }, + { + "widget": + { + "x": 160, + "y": 68, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 8, + "font": "Console", + "duration": 2.5, + "conditions": null, + "children": null + } + }, { "widget": { @@ -1522,7 +1789,7 @@ "tranmap": null, "translation": "CRGOLD", "type": 9, - "font": "ConFont", + "font": "Console", "conditions": null, "children": null } @@ -1531,14 +1798,19 @@ "widget": { "x": 160, - "y": 68, - "alignment": 1, + "y": 200, + "alignment": 9, "tranmap": null, "translation": "CRGOLD", - "type": 8, - "font": "ConFont", - "duration": 2.5, - "conditions": null, + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 2 + } + ], "children": null } } diff --git a/base/all-all/sbhuddef.lmp b/base/all-all/sbhuddef.lmp new file mode 100644 index 000000000..d26fe971c --- /dev/null +++ b/base/all-all/sbhuddef.lmp @@ -0,0 +1,277 @@ +{ + "type": "hud", + "version": "1.0.0", + "data": + { + "hudfonts": + [ + { + "name": "Console", + "type": 2, + "stem": "STCFN" + }, + { + "name": "Digits", + "type": 0, + "stem": "DIG" + } + ], + "widgets": + [ + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 0, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 6 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 153, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 1, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 6 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 152, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 0, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 146, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 1, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 8, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 2, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 0, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 3, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 4, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 167, + "alignment": 42, + "tranmap": null, + "translation": null, + "type": 5, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 167, + "alignment": 9, + "tranmap": null, + "translation": null, + "type": 6, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 0, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 7, + "font": "Console", + "duration": 4, + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 52, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 8, + "font": "Console", + "duration": 2.5, + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 9, + "font": "Console", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 160, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 2 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 1 + } + ], + "children": null + } + } + ] + } +} diff --git a/base/all-all/woofhud.lmp b/base/all-all/woofhud.lmp deleted file mode 100644 index d661da369..000000000 --- a/base/all-all/woofhud.lmp +++ /dev/null @@ -1,37 +0,0 @@ -hud 0 -rate topleft -compact bottomleft -monsec topleft -sttime topleft -coord topright -fps topright -cmd bottomright -speed bottomcenter - -hud 1 -rate topleft -armor bottomleft -health bottomleft -ammo bottomleft -weapon bottomleft -keys bottomleft -monsec bottomleft -sttime bottomleft -coord topright -fps topright -cmd bottomright -speed bottomcenter - -hud 2 -rate topleft -health topright -armor topright -ammo bottomright -weapon bottomright -keys bottomleft -monsec bottomleft -sttime bottomleft -coord topright -fps topright -cmd bottomright -speed bottomcenter diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8d51d03f2..a01565cdb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,9 +28,7 @@ set(WOOF_SOURCES hu_command.c hu_command.h hu_coordinates.c hu_coordinates.h hu_crosshair.c hu_crosshair.h - hu_lib.c hu_lib.h hu_obituary.c hu_obituary.h - hu_stuff.c hu_stuff.h i_3dsound.c i_endoom.c i_endoom.h i_flickstick.c i_flickstick.h diff --git a/src/am_map.c b/src/am_map.c index 51bd00722..9bd8afdbb 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -28,7 +28,6 @@ #include "doomdef.h" #include "doomstat.h" #include "doomtype.h" -#include "hu_stuff.h" #include "i_video.h" #include "m_config.h" #include "m_input.h" @@ -39,11 +38,11 @@ #include "p_setup.h" #include "p_spec.h" #include "r_defs.h" -#include "r_draw.h" #include "r_main.h" #include "r_state.h" #include "r_things.h" #include "st_stuff.h" +#include "st_widgets.h" #include "tables.h" #include "v_flextran.h" #include "v_fmt.h" @@ -2381,12 +2380,6 @@ void AM_ColorPreset(void) *mapcolors[i].var = mapcolors[i].color[mapcolor_preset]; } - // [FG] immediately apply changes if the automap is visible through the menu - if (automapactive && menu_backdrop != MENU_BG_TEXTURE) - { - HU_Start(); - } - // [crispy] Make secret wall colors independent from PLAYPAL color indexes if (mapcolor_preset == AM_PRESET_CRISPY) { diff --git a/src/d_main.c b/src/d_main.c index e1c338147..c0ad1a4b8 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -43,9 +43,7 @@ #include "f_finale.h" #include "f_wipe.h" #include "g_game.h" -#include "hu_stuff.h" #include "i_endoom.h" -#include "i_gamepad.h" #include "i_glob.h" #include "i_input.h" #include "i_printf.h" @@ -78,6 +76,7 @@ #include "s_sound.h" #include "sounds.h" #include "st_stuff.h" +#include "st_widgets.h" #include "statdump.h" #include "u_mapinfo.h" #include "v_fmt.h" @@ -262,7 +261,7 @@ void D_Display (void) if (demobar && PLAYBACK_SKIP) { - if (HU_DemoProgressBar(false)) + if (ST_DemoProgressBar(false)) { I_FinishUpdate(); return; @@ -326,6 +325,7 @@ void D_Display (void) R_RenderPlayerView(&players[displayplayer]); AM_Drawer(); } + ST_Drawer(); } break; case GS_INTERMISSION: @@ -348,9 +348,6 @@ void D_Display (void) ST_Drawer(); } - if (gamestate == GS_LEVEL && gametic) - HU_Drawer (); - // clean up border stuff if (gamestate != oldgamestate && gamestate != GS_LEVEL) I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE)); @@ -383,7 +380,6 @@ void D_Display (void) { AM_Drawer(); ST_Drawer(); - HU_Drawer(); // [crispy] force redraw of border viewactivestate = false; @@ -409,7 +405,7 @@ void D_Display (void) NetUpdate(); // send out any new accumulation if (demobar && demoplayback) - HU_DemoProgressBar(true); + ST_DemoProgressBar(true); // normal update if (!wipe) @@ -847,7 +843,7 @@ static boolean FileContainsMaps(const char *filename) { for (int m = 1; m < 35; ++m) { - if (CheckMapLump(MAPNAME(1, m), filename)) + if (CheckMapLump(MapName(1, m), filename)) { return true; } @@ -859,7 +855,7 @@ static boolean FileContainsMaps(const char *filename) { for (int m = 1; m < 10; ++m) { - if (CheckMapLump(MAPNAME(e, m), filename)) + if (CheckMapLump(MapName(e, m), filename)) { return true; } @@ -2434,11 +2430,10 @@ void D_DoomMain(void) S_Init(snd_SfxVolume /* *8 */, snd_MusicVolume /* *8*/ ); I_Printf(VB_INFO, "HU_Init: Setting up heads up display."); - HU_Init(); - MN_SetHUFontKerning(); I_Printf(VB_INFO, "ST_Init: Init status bar."); ST_Init(); + MN_SetHUFontKerning(); // andrewj: voxel support I_Printf(VB_INFO, "VX_Init: "); diff --git a/src/doomstat.c b/src/doomstat.c index 0ff988b0f..dea3dd6aa 100644 --- a/src/doomstat.c +++ b/src/doomstat.c @@ -119,7 +119,7 @@ int center_weapon; int view_bobbing_pct; int weapon_bobbing_pct; -char *MAPNAME(int e, int m) +char *MapName(int e, int m) { static char name[9]; diff --git a/src/doomstat.h b/src/doomstat.h index 51211d1be..cb5ebdf16 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -63,7 +63,7 @@ typedef struct extern GameVersions_t gameversions[]; -extern char *MAPNAME(int e, int m); +extern char *MapName(int e, int m); // Set if homebrew PWAD stuff has been added. extern boolean modifiedgame; diff --git a/src/f_finale.c b/src/f_finale.c index 788febe3c..1bb1ae621 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -27,7 +27,6 @@ #include "doomstat.h" #include "doomtype.h" #include "g_game.h" -#include "hu_lib.h" #include "info.h" #include "m_misc.h" // [FG] M_StringDuplicate() #include "m_swap.h" @@ -35,6 +34,8 @@ #include "r_state.h" #include "s_sound.h" #include "sounds.h" +#include "st_sbardef.h" +#include "st_stuff.h" #include "u_mapinfo.h" #include "v_fmt.h" #include "v_video.h" diff --git a/src/g_game.c b/src/g_game.c index 07cb432d9..67bced9c0 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -40,8 +40,8 @@ #include "doomtype.h" #include "f_finale.h" #include "g_game.h" +#include "hu_command.h" #include "hu_obituary.h" -#include "hu_stuff.h" #include "i_gamepad.h" #include "i_gyro.h" #include "i_input.h" @@ -1073,7 +1073,6 @@ static void G_DoLoadLevel(void) //jff 4/26/98 wake up the status bar in case were coming out of a DM demo // killough 5/13/98: in case netdemo has consoleplayer other than green ST_Start(); - HU_Start(); // killough: make -timedemo work on multilevel demos // Move to end of function to minimize noise -- killough 2/22/98: @@ -1203,7 +1202,7 @@ int G_GotoNextLevel(int *pEpi, int *pMap) !demorecording && !demoplayback && !menuactive) { - char *name = MAPNAME(epsd, map); + char *name = MapName(epsd, map); if (W_CheckNumForName(name) == -1) displaymsg("Next level not found: %s", name); @@ -1324,8 +1323,7 @@ boolean G_Responder(event_t* ev) // killough 9/29/98: reformatted if (gamestate == GS_LEVEL - && (HU_Responder(ev) || // chat ate the event - ST_Responder(ev) || // status window ate it + && (ST_Responder(ev) || // status window ate it AM_Responder(ev) || // automap ate it WS_Responder(ev))) // weapon slots ate it { @@ -1351,7 +1349,6 @@ boolean G_Responder(event_t* ev) while (!playeringame[displayplayer] && displayplayer!=consoleplayer); ST_Start(); // killough 3/7/98: switch status bar views too - HU_Start(); S_UpdateSounds(players[displayplayer].mo); // [crispy] re-init automap variables for correct player arrow angle if (automapactive) @@ -1700,7 +1697,7 @@ static void G_WriteLevelStat(void) } } - strcpy(levelString, MAPNAME(gameepisode, gamemap)); + strcpy(levelString, MapName(gameepisode, gamemap)); G_FormatLevelStatTime(levelTimeString, leveltime, false); G_FormatLevelStatTime(totalTimeString, totalleveltimes + leveltime, true); @@ -1752,9 +1749,6 @@ static void G_DoCompleted(void) if (automapactive) AM_Stop(); - // Rebuild the Time widget to get rid of the Use-button timer - HU_widget_rebuild_sttime(); - wminfo.nextep = wminfo.epsd = gameepisode -1; wminfo.last = gamemap -1; @@ -2380,7 +2374,7 @@ static uint64_t G_Signature(int sig_epi, int sig_map) int lump, i; char name[9]; - strcpy(name, MAPNAME(sig_epi, sig_map)); + strcpy(name, MapName(sig_epi, sig_map)); lump = W_CheckNumForName(name); @@ -2934,7 +2928,7 @@ void G_Ticker(void) // killough 9/29/98: split up switch statement // into pauseable and unpauseable parts. - gamestate == GS_LEVEL ? P_Ticker(), ST_Ticker(), AM_Ticker(), HU_Ticker() : + gamestate == GS_LEVEL ? P_Ticker(), ST_Ticker(), AM_Ticker() : paused & 2 ? (void) 0 : gamestate == GS_INTERMISSION ? WI_Ticker() : gamestate == GS_FINALE ? F_Ticker() : @@ -3783,7 +3777,7 @@ mapentry_t *G_LookupMapinfo(int episode, int map) int i; char lumpname[9]; - strcpy(lumpname, MAPNAME(episode, map)); + strcpy(lumpname, MapName(episode, map)); for (i = 0; i < U_mapinfo.mapcount; i++) { @@ -3817,13 +3811,13 @@ int G_ValidateMapName(const char *mapname, int *pEpi, int *pMap) { if (sscanf(mapuname, "E%dM%d", &epi, &map) != 2) return 0; - strcpy(lumpname, MAPNAME(epi, map)); + strcpy(lumpname, MapName(epi, map)); } else { if (sscanf(mapuname, "MAP%d", &map) != 1) return 0; - strcpy(lumpname, MAPNAME(epi = 1, map)); + strcpy(lumpname, MapName(epi = 1, map)); } if (epi > 4) @@ -3859,7 +3853,7 @@ void G_InitNew(skill_t skill, int episode, int map) episode = 1; // Disable all sanity checks if there are custom episode definitions. They do not make sense in this case. - if (!EpiCustom && W_CheckNumForName(MAPNAME(episode, map)) == -1) + if (!EpiCustom && W_CheckNumForName(MapName(episode, map)) == -1) { if (gamemode == retail) diff --git a/src/hu_command.c b/src/hu_command.c index 0e995da2c..cb3bfc3b7 100644 --- a/src/hu_command.c +++ b/src/hu_command.c @@ -21,8 +21,9 @@ #include "d_event.h" #include "doomstat.h" #include "hu_command.h" -#include "i_printf.h" #include "m_misc.h" +#include "st_sbardef.h" +#include "st_widgets.h" #include "v_video.h" boolean hud_command_history; @@ -267,13 +268,14 @@ void HU_UpdateCommandHistory(const ticcmd_t *cmd) UpdateHudCmdText(current); } -void HU_BuildCommandHistory(hu_multiline_t *const multiline) +void HU_BuildCommandHistory(sbe_widget_t *widget) { hud_cmd_item_t *hud_cmd = current; + ST_ClearLines(widget); for (int i = 0; i < hud_command_history_size; i++) { - HUlib_add_string_keep_space(multiline, hud_cmd->buf); + ST_AddLine(widget, hud_cmd->buf); hud_cmd = hud_cmd->prev; } } diff --git a/src/hu_command.h b/src/hu_command.h index 8ed1a420d..4cefc1fb5 100644 --- a/src/hu_command.h +++ b/src/hu_command.h @@ -20,10 +20,9 @@ #define __HU_COMMAND__ #include "doomtype.h" -#include "hu_lib.h" -struct hu_multiline_s; struct ticcmd_s; +struct sbe_widget_s; extern boolean hud_command_history; extern int hud_command_history_size; @@ -33,6 +32,6 @@ void HU_UpdateTurnFormat(void); void HU_InitCommandHistory(void); void HU_ResetCommandHistory(void); void HU_UpdateCommandHistory(const struct ticcmd_s *cmd); -void HU_BuildCommandHistory(struct hu_multiline_s *const multiline); +void HU_BuildCommandHistory(struct sbe_widget_s *widget); #endif diff --git a/src/hu_coordinates.c b/src/hu_coordinates.c index 092e31893..24bc05ab5 100644 --- a/src/hu_coordinates.c +++ b/src/hu_coordinates.c @@ -21,6 +21,8 @@ #include "hu_coordinates.h" #include "m_misc.h" #include "p_mobj.h" +#include "st_sbardef.h" +#include "st_widgets.h" #include "v_video.h" #define THRESH_M1 15.11 @@ -92,7 +94,7 @@ static split_angle_t SplitAngle(angle_t x) return result; } -static void BuildString(hu_multiline_t *const w_coord, char *buf, int len, +static void BuildString(sbe_widget_t *widget, char *buf, int len, int pos) { if (WIDGET_WIDTH > pos) @@ -100,10 +102,10 @@ static void BuildString(hu_multiline_t *const w_coord, char *buf, int len, M_snprintf(buf + pos, len - pos, "%-*s", WIDGET_WIDTH - pos, ""); } - HUlib_add_string_keep_space(w_coord, buf); + ST_AddLine(widget, buf); } -static void FixedToString(hu_multiline_t *const w_coord, const char *label, +static void FixedToString(sbe_widget_t *widget, const char *label, fixed_t x, char *buf, int len, int pos) { const split_fixed_t value = SplitFixed(x); @@ -120,10 +122,10 @@ static void FixedToString(hu_multiline_t *const w_coord, const char *label, pos += M_snprintf(buf + pos, len - pos, "%s: %d", label, value.base); } - BuildString(w_coord, buf, len, pos); + BuildString(widget, buf, len, pos); } -static void AngleToString(hu_multiline_t *const w_coord, const char *label, +static void AngleToString(sbe_widget_t *widget, const char *label, angle_t x, char *buf, int len, int pos) { const split_angle_t value = SplitAngle(x); @@ -138,10 +140,10 @@ static void AngleToString(hu_multiline_t *const w_coord, const char *label, pos += M_snprintf(buf + pos, len - pos, "%s: %d", label, value.base); } - BuildString(w_coord, buf, len, pos); + BuildString(widget, buf, len, pos); } -static void MagnitudeToString(hu_multiline_t *const w_coord, const char *label, +static void MagnitudeToString(sbe_widget_t *widget, const char *label, double x, char *buf, int len, int pos) { if (x) @@ -153,10 +155,10 @@ static void MagnitudeToString(hu_multiline_t *const w_coord, const char *label, pos += M_snprintf(buf + pos, len - pos, "%s: 0", label); } - BuildString(w_coord, buf, len, pos); + BuildString(widget, buf, len, pos); } -static void ComponentToString(hu_multiline_t *const w_coord, const char *label, +static void ComponentToString(sbe_widget_t *widget, const char *label, fixed_t x, char *buf, int len, int pos) { const split_fixed_t value = SplitFixed(x); @@ -173,41 +175,61 @@ static void ComponentToString(hu_multiline_t *const w_coord, const char *label, pos += M_snprintf(buf + pos, len - pos, "%s: %d", label, value.base); } - BuildString(w_coord, buf, len, pos); + BuildString(widget, buf, len, pos); } -void HU_BuildCoordinatesEx(hu_multiline_t *const w_coord, const mobj_t *mo, - char *buf, int len) +void HU_BuildCoordinatesEx(sbe_widget_t *widget, const mobj_t *mo) { int pos; double magnitude; crange_idx_e color; + ST_ClearLines(widget); + + #define LINE_SIZE 60 + // Coordinates. - pos = M_snprintf(buf, len, "\x1b%c", '0' + CR_GREEN); - FixedToString(w_coord, "X", mo->x, buf, len, pos); - FixedToString(w_coord, "Y", mo->y, buf, len, pos); - FixedToString(w_coord, "Z", mo->z, buf, len, pos); - AngleToString(w_coord, "A", mo->angle, buf, len, pos); - HUlib_add_string_keep_space(w_coord, " "); + static char line1[LINE_SIZE]; + pos = M_snprintf(line1, sizeof(line1), GREEN_S); + FixedToString(widget, "X", mo->x, line1, sizeof(line1), pos); + static char line2[LINE_SIZE]; + pos = M_snprintf(line2, sizeof(line2), GREEN_S); + FixedToString(widget, "Y", mo->y, line2, sizeof(line2), pos); + static char line3[LINE_SIZE]; + pos = M_snprintf(line3, sizeof(line3), GREEN_S); + FixedToString(widget, "Z", mo->z, line3, sizeof(line3), pos); + static char line4[LINE_SIZE]; + pos = M_snprintf(line4, sizeof(line4), GREEN_S); + AngleToString(widget, "A", mo->angle, line4, sizeof(line4), pos); + ST_AddLine(widget, " "); // "Momentum" per tic. magnitude = CalcMomentum(mo); color = BLOCK_COLOR(magnitude, THRESH_M1, THRESH_M2, THRESH_M3); - pos = M_snprintf(buf, len, "\x1b%c", '0' + color); - MagnitudeToString(w_coord, "M", magnitude, buf, len, pos); - ComponentToString(w_coord, "X", mo->momx, buf, len, pos); - ComponentToString(w_coord, "Y", mo->momy, buf, len, pos); - HUlib_add_string_keep_space(w_coord, " "); + static char line5[LINE_SIZE]; + pos = M_snprintf(line5, sizeof(line5), "\x1b%c", '0' + color); + MagnitudeToString(widget, "M", magnitude, line5, sizeof(line5), pos); + static char line6[LINE_SIZE]; + pos = M_snprintf(line6, sizeof(line6), "\x1b%c", '0' + color); + ComponentToString(widget, "X", mo->momx, line6, sizeof(line6), pos); + static char line7[LINE_SIZE]; + pos = M_snprintf(line7, sizeof(line7), "\x1b%c", '0' + color); + ComponentToString(widget, "Y", mo->momy, line7, sizeof(line7), pos); + ST_AddLine(widget, " "); // Distance per tic. magnitude = CalcDistance(mo); color = BLOCK_COLOR(magnitude, THRESH_D1, THRESH_D2, THRESH_D3); - pos = M_snprintf(buf, len, "\x1b%c", '0' + color); - MagnitudeToString(w_coord, "D", magnitude, buf, len, pos); - ComponentToString(w_coord, "X", mo->x - mo->oldx, buf, len, pos); - ComponentToString(w_coord, "Y", mo->y - mo->oldy, buf, len, pos); + static char line8[LINE_SIZE]; + pos = M_snprintf(line8, sizeof(line8), "\x1b%c", '0' + color); + MagnitudeToString(widget, "D", magnitude, line8, sizeof(line8), pos); + static char line9[LINE_SIZE]; + pos = M_snprintf(line9, sizeof(line9), "\x1b%c", '0' + color); + ComponentToString(widget, "X", mo->x - mo->oldx, line9, sizeof(line9), pos); + static char line10[LINE_SIZE]; + pos = M_snprintf(line10, sizeof(line10), "\x1b%c", '0' + color); + ComponentToString(widget, "Y", mo->y - mo->oldy, line10, sizeof(line10), pos); } diff --git a/src/hu_coordinates.h b/src/hu_coordinates.h index 80a88d9ec..822f7694e 100644 --- a/src/hu_coordinates.h +++ b/src/hu_coordinates.h @@ -19,13 +19,9 @@ #ifndef __HU_COORDINATES__ #define __HU_COORDINATES__ -#include "doomtype.h" -#include "hu_lib.h" - -struct hu_multiline_s; +struct sbe_widget_s; struct mobj_s; -void HU_BuildCoordinatesEx(struct hu_multiline_s *const w_coord, - const struct mobj_s *mo, char *buf, int len); +void HU_BuildCoordinatesEx(struct sbe_widget_s *widget, const struct mobj_s *mo); #endif diff --git a/src/hu_crosshair.c b/src/hu_crosshair.c index 50e8804be..720ef087a 100644 --- a/src/hu_crosshair.c +++ b/src/hu_crosshair.c @@ -20,7 +20,6 @@ #include "hu_crosshair.h" #include "d_items.h" #include "doomstat.h" -#include "hu_stuff.h" #include "m_swap.h" #include "p_map.h" #include "p_mobj.h" @@ -101,6 +100,33 @@ void HU_StartCrosshair(void) mobj_t *crosshair_target; // [Alaux] Lock crosshair on target +static crange_idx_e CRByHealth(int health, int maxhealth, boolean invul) +{ + if (invul) + { + return CR_GRAY; + } + + health = 100 * health / maxhealth; + + if (health < health_red) + { + return CR_RED; + } + else if (health < health_yellow) + { + return CR_GOLD; + } + else if (health <= health_green) + { + return CR_GREEN; + } + else + { + return CR_BLUE1; + } +} + void HU_UpdateCrosshair(void) { plr = &players[displayplayer]; @@ -113,7 +139,7 @@ void HU_UpdateCrosshair(void) if (hud_crosshair_health) { - crosshair.cr = HU_ColorByHealth(plr->health, 100, invul); + crosshair.cr = colrngs[CRByHealth(plr->health, 100, invul)]; } else { @@ -154,9 +180,9 @@ void HU_UpdateCrosshair(void) // [Alaux] Color crosshair by target health if (hud_crosshair_target == crosstarget_health) { - crosshair.cr = HU_ColorByHealth( + crosshair.cr = colrngs[CRByHealth( crosshair_target->health, - crosshair_target->info->spawnhealth, false); + crosshair_target->info->spawnhealth, false)]; } else { diff --git a/src/hu_lib.c b/src/hu_lib.c deleted file mode 100644 index 818786ac3..000000000 --- a/src/hu_lib.c +++ /dev/null @@ -1,603 +0,0 @@ -// -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// Copyright (C) 2023 Fabian Greffrath -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: heads-up text and input code -// -//----------------------------------------------------------------------------- - -#include -#include - -#include "doomdef.h" -#include "doomkeys.h" -#include "doomstat.h" -#include "hu_lib.h" -#include "hu_stuff.h" -#include "m_misc.h" -#include "m_swap.h" -#include "r_defs.h" -#include "r_draw.h" -#include "r_state.h" -#include "v_video.h" - -// [FG] horizontal alignment - -#define HU_GAPX 2 -static int left_margin, right_margin; -boolean hud_widescreen_widgets; - -void HUlib_set_margins (void) -{ - left_margin = HU_GAPX; - - if (hud_widescreen_widgets) - { - left_margin -= video.deltaw; - } - - right_margin = SCREENWIDTH - left_margin; -} - -// [FG] vertical alignment - -typedef enum { - offset_topleft, - offset_topright, - - offset_bottomleft, - offset_bottomright, - - num_offsets, -} offset_t; - -static int align_offset[num_offsets]; - -void HUlib_reset_align_offsets (void) -{ - int bottom = SCREENHEIGHT; - - if (scaledviewheight < SCREENHEIGHT || - automap_on) - { - bottom -= 32; // ST_HEIGHT - } - - align_offset[offset_topleft] = 0; - align_offset[offset_topright] = 0; - align_offset[offset_bottomleft] = bottom; - align_offset[offset_bottomright] = bottom; -} - -// [FG] clear line - -void HUlib_clear_line (hu_line_t *const l) -{ - l->line[0] = '\0'; - l->len = 0; - l->width = 0; -} - -void HUlib_clear_cur_line (hu_multiline_t *const m) -{ - HUlib_clear_line(m->lines[m->curline]); -} - -void HUlib_clear_all_lines (hu_multiline_t *const m) -{ - int i; - - for (i = 0; i < m->numlines; i++) - { - HUlib_clear_line(m->lines[i]); - } -} - -// [FG] add single char to line, increasing its length but not its width - -static boolean add_char_to_line(hu_line_t *const t, const char ch) -{ - if (t->len == HU_MAXLINELENGTH - 1) - return false; - else - { - t->line[t->len++] = ch; - t->line[t->len] = '\0'; - return true; - } -} - -static boolean del_char_from_line(hu_line_t* l) -{ - return l->len ? l->line[--l->len] = '\0', true : false; -} - -// [FG] add printable char to line, handle Backspace and Enter (for w_chat) - -boolean HUlib_add_key_to_line(hu_line_t *const l, unsigned char ch) -{ - if (ch >= ' ' && ch <= '_') - add_char_to_line(l, (char) ch); - else if (ch == KEY_BACKSPACE) // phares - del_char_from_line(l); - else if (ch != KEY_ENTER) // phares - return false; // did not eat key - - return true; // ate the key -} - -boolean HUlib_add_key_to_cur_line(hu_multiline_t *const m, unsigned char ch) -{ - hu_line_t *const l = m->lines[m->curline]; - - return HUlib_add_key_to_line(l, ch); -} - -// [FG] point curline to the next line in a multiline if available - -static inline void inc_cur_line (hu_multiline_t *const m) -{ - if (m->numlines > 1) - { - if (++m->curline >= m->numlines) - { - m->curline = 0; - } - } -} - -// [FG] add string to line, increasing its (length and) width - -static void add_string_to_line(hu_line_t *const l, const hu_font_t *const f, - const char *s, boolean keep_space) -{ - int w = 0; - unsigned char c; - patch_t *const *const p = f->patches; - - if (!*s) - return; - - while (*s) - { - c = M_ToUpper(*s++); - - if (c == '\x1b') - { - add_char_to_line(l, c); - add_char_to_line(l, *s++); - continue; - } - else if (c == '\t') - w = (w + f->tab_width) & f->tab_mask; - else if (c >= HU_FONTSTART && c <= HU_FONTEND + 6) - w += SHORT(p[c - HU_FONTSTART]->width); - else - w += f->space_width; - - add_char_to_line(l, c); - } - - if (!keep_space) - { - while (*--s == ' ') - w -= f->space_width; - } - - l->width += w; -} - -// [FG] add string to current line, point to next line if available - -void HUlib_add_strings_to_cur_line (hu_multiline_t *const m, const char *prefix, const char *s) -{ - hu_line_t *const l = m->lines[m->curline]; - - HUlib_clear_line(l); - - if (prefix) - { - add_string_to_line(l, *m->font, prefix, false); - } - - add_string_to_line(l, *m->font, s, false); - - inc_cur_line(m); -} - -void HUlib_add_string_to_cur_line (hu_multiline_t *const m, const char *s) -{ - HUlib_add_strings_to_cur_line(m, NULL, s); -} - -void HUlib_add_string_keep_space(hu_multiline_t *const m, const char *s) -{ - hu_line_t *const l = m->lines[m->curline]; - - HUlib_clear_line(l); - add_string_to_line(l, *m->font, s, true); - inc_cur_line(m); -} - -// [FG] horizontal and vertical alignment - -static int horz_align_widget(const hu_widget_t *const w, const hu_line_t *const l, const align_t h_align) -{ - if (h_align == align_left) - { - return left_margin; - } - else if (h_align == align_right) - { - return right_margin - l->width; - } - else if (h_align == align_center) - { - return SCREENWIDTH/2 - l->width/2; - } - - // [FG] align_direct - if (hud_widescreen_widgets) - { - if (w->x < SCREENWIDTH/2) - { - return w->x - video.deltaw; - } - else - { - return w->x + video.deltaw; - } - } - - return w->x; -} - -static int vert_align_widget(const hu_widget_t *const w, const hu_multiline_t *const m, const hu_font_t *const f, const align_t h_align, const align_t v_align) -{ - const int font_height = f->line_height; - - int y = 0; - - if (v_align == align_direct) - { - return w->y; - } - else if (v_align == align_secret) - { - return MAX(SCREENHEIGHT - 32, scaledviewheight) / 2 - 32; - } - // [FG] centered and Vanilla widgets are always exclusive, - // i.e. they don't allow any other widget on the same line - else if (h_align == align_center || m->exclusive) - { - if (v_align == align_top) - { - y = MAX(align_offset[offset_topleft], - align_offset[offset_topright]); - - align_offset[offset_topleft] = - align_offset[offset_topright] = y + font_height; - } - else if (v_align == align_bottom) - { - y = MIN(align_offset[offset_bottomleft], - align_offset[offset_bottomright]) - font_height; - - align_offset[offset_bottomleft] = - align_offset[offset_bottomright] = y; - } - } - else if (v_align == align_top) - { - if (h_align == align_left) - { - y = align_offset[offset_topleft]; - align_offset[offset_topleft] += font_height; - } - else if (h_align == align_right) - { - y = align_offset[offset_topright]; - align_offset[offset_topright] += font_height; - } - } - else if (v_align == align_bottom) - { - if (h_align == align_left) - { - align_offset[offset_bottomleft] -= font_height; - y = align_offset[offset_bottomleft]; - } - else if (h_align == align_right) - { - align_offset[offset_bottomright] -= font_height; - y = align_offset[offset_bottomright]; - } - } - - return y; -} - -// [FG] draw a line to a given screen coordinates using the given font - -static void draw_line_aligned (const hu_multiline_t *m, const hu_line_t *l, const hu_font_t *const f, int x, int y) -{ - const int x0 = x; - int i; - unsigned char c; - byte *cr = m->cr; - patch_t *const *const p = f->patches; - - // draw the new stuff - for (i = 0; i < l->len; i++) - { - c = M_ToUpper(l->line[i]); - -#if 0 - if (c == '\n') - { - // [FG] TODO line breaks! - } - else -#endif - if (c == '\t') // killough 1/23/98 -- support tab stops - { - x = x0 + (((x - x0) + f->tab_width) & f->tab_mask); - } - else if (c == '\x1b') //jff 2/17/98 escape code for color change - { //jff 3/26/98 changed to actual escape char - if (++i < l->len) - { - if (l->line[i] >= '0' && l->line[i] <= '0'+CR_NONE) - cr = colrngs[l->line[i]-'0']; - else if (l->line[i] == '0'+CR_ORIG) // [FG] reset to original color - cr = m->cr; - } - } - else if (c >= HU_FONTSTART && c <= HU_FONTEND + 6) - { - int w = SHORT(p[c-HU_FONTSTART]->width); - - if (x+w > right_margin + HU_GAPX) - break; - - // killough 1/18/98 -- support multiple lines: - V_DrawPatchTranslated(x, y, p[c-HU_FONTSTART], cr); - x += w; - } - else if ((x += f->space_width) >= right_margin + HU_GAPX) - break; - } - - // draw the cursor if requested - // killough 1/18/98 -- support multiple lines - if (m->drawcursor && - x + SHORT(p['_'-HU_FONTSTART]->width) <= right_margin + HU_GAPX && - leveltime & 16) - { - cr = m->cr; //jff 2/17/98 restore original color - V_DrawPatchTranslated(x, y, p['_' - HU_FONTSTART], cr); - } -} - -// [FG] shortcut for single-lined wigets - -static void draw_widget_single (const hu_widget_t *const w, const hu_font_t *const f) -{ - const hu_multiline_t *const m = w->multiline; - const int h_align = w->h_align, v_align = w->v_align; - - const int cl = m->curline; - const hu_line_t *const l = m->lines[cl]; - - if (l->width || m->drawcursor) - { - int x, y; - - x = horz_align_widget(w, l, h_align); - y = vert_align_widget(w, m, f, h_align, v_align); - draw_line_aligned(m, l, f, x, y); - } -} - -// [FG] the w_messages widget is drawn bottom-up if v_align == align_top, -// i.e. the last message is drawn first, same for all other widgets -// if v_align == align_bottom - -static void draw_widget_bottomup (const hu_widget_t *const w, const hu_font_t *const f) -{ - const hu_multiline_t *const m = w->multiline; - const int h_align = w->h_align, v_align = w->v_align; - - const int nl = m->numlines; - int cl = m->curline - 1; - - int i, x, y; - - for (i = 0; i < nl; i++, cl--) - { - const hu_line_t *l; - - if (cl < 0) - cl = nl - 1; - - l = m->lines[cl]; - - if (l->width) - { - x = horz_align_widget(w, l, h_align); - y = vert_align_widget(w, m, f, h_align, v_align); - draw_line_aligned(m, l, f, x, y); - } - } -} - -// [FG] standard behavior, the first line is drawn first - -static void draw_widget_topdown (const hu_widget_t *const w, const hu_font_t *const f) -{ - const hu_multiline_t *const m = w->multiline; - const int h_align = w->h_align, v_align = w->v_align; - - const int nl = m->numlines; - int cl = m->curline; - - int i, x, y; - - for (i = 0; i < nl; i++, cl++) - { - const hu_line_t *l; - - if (cl >= nl) - cl = 0; - - l = m->lines[cl]; - - if (l->width) - { - x = horz_align_widget(w, l, h_align); - y = vert_align_widget(w, m, f, h_align, v_align); - draw_line_aligned(m, l, f, x, y); - } - } -} - -void HUlib_draw_widget (const hu_widget_t *const w) -{ - const hu_multiline_t *const m = w->multiline; - const hu_font_t *const f = *m->font; - - if (m->numlines == 1) - draw_widget_single(w, f); - // [FG] Vanilla widget with top alignment, - // or Boom widget with bottom alignment - else if (m->bottomup ^ (w->v_align == align_bottom)) - draw_widget_bottomup(w, f); - else - draw_widget_topdown(w, f); -} - -void HUlib_init_multiline(hu_multiline_t *m, - int nl, - hu_font_t **f, - byte *cr, - boolean *on, - void (*builder)(void)) -{ - int i; - - // [FG] dynamically allocate lines array - if (m->numlines != nl) - { - for (i = 0; i < m->numlines; i++) - { - free(m->lines[i]); - m->lines[i] = NULL; - } - } - - m->numlines = nl; - m->curline = 0; - - for (i = 0; i < m->numlines; i++) - { - if (m->lines[i] == NULL) - { - m->lines[i] = malloc(sizeof(hu_line_t)); - } - HUlib_clear_line(m->lines[i]); - } - - m->font = f; - m->cr = cr; - m->drawcursor = false; - - m->on = on; - - m->builder = builder; - m->built = false; - - m->exclusive = (on != NULL); - m->bottomup = (on != NULL); -} - -void HUlib_erase_widget (const hu_widget_t *const w) -{ - const hu_multiline_t *const m = w->multiline; - const hu_font_t *const f = *m->font; - - const int height = m->numlines * f->line_height; - - int y = 0; - for (int i = 0; i < m->numlines; ++i) - { - y = vert_align_widget(w, m, f, w->h_align, w->v_align); - } - - if (w->v_align == align_top) - y += f->line_height - height; - - if (y > scaledviewy && y < scaledviewy + scaledviewheight - height) - { - R_VideoErase(0, y, scaledviewx, height); - R_VideoErase(scaledviewx + scaledviewwidth, y, scaledviewx, height); - } - else - { - R_VideoErase(0, y, video.unscaledw, height); - } -} - -//---------------------------------------------------------------------------- -// -// $Log: hu_lib.c,v $ -// Revision 1.13 1998/05/11 10:13:26 jim -// formatted/documented hu_lib -// -// Revision 1.12 1998/05/03 22:24:13 killough -// Provide minimal headers at top; nothing else -// -// Revision 1.11 1998/04/29 09:24:33 jim -// Fix compiler warning -// -// Revision 1.10 1998/04/28 15:53:46 jim -// Fix message list bug in small screen mode -// -// Revision 1.9 1998/03/27 21:25:41 jim -// Commented change of \ to ESC -// -// Revision 1.8 1998/03/26 20:06:24 jim -// Fixed escape confusion in HU text drawer -// -// Revision 1.7 1998/02/26 22:58:33 jim -// Added message review display to HUD -// -// Revision 1.6 1998/02/19 16:55:15 jim -// Optimized HUD and made more configurable -// -// Revision 1.5 1998/02/18 00:59:01 jim -// Addition of HUD -// -// Revision 1.4 1998/02/15 02:47:44 phares -// User-defined keys -// -// Revision 1.3 1998/01/26 19:23:20 phares -// First rev with no ^Ms -// -// Revision 1.2 1998/01/26 05:50:22 killough -// Support more lines, and tab stops, in messages -// -// Revision 1.1.1.1 1998/01/19 14:02:55 rand -// Lee's Jan 19 sources -// -//---------------------------------------------------------------------------- diff --git a/src/hu_lib.h b/src/hu_lib.h deleted file mode 100644 index bd24e9142..000000000 --- a/src/hu_lib.h +++ /dev/null @@ -1,183 +0,0 @@ -// -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// Copyright (C) 2023 Fabian Greffrath -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: none -// -//----------------------------------------------------------------------------- - -#ifndef __HULIB__ -#define __HULIB__ - -#include "doomtype.h" - -struct patch_s; - -// [FG] font stuff - -#define HU_FONTSTART '!' /* the first font characters */ -#define HU_FONTEND (0x7f) /*jff 2/16/98 '_' the last font characters */ - -// Calculate # of glyphs in font. -#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1) - -typedef struct -{ - struct patch_s *patches[HU_FONTSIZE+6]; - - int line_height; - - const int space_width; - - const int tab_width; - const int tab_mask; -} hu_font_t; - -extern struct patch_s **hu_font; - -// [FG] widget stuff - -#define CR_ORIG (-1) // [FG] reset to original color - -#define HU_MAXLINELENGTH 120 - -//jff 2/26/98 maximum number of messages allowed in refresh list -#define HU_MAXMESSAGES 20 - -typedef enum -{ - // [FG] h_align / v_align - align_direct, - - // [FG] h_align - align_left, - align_right, - align_center, - - // [FG] v_align - align_top, - align_bottom, - align_secret, - - num_aligns, -} align_t; - -// [FG] a single line of information - -typedef struct -{ - char line[HU_MAXLINELENGTH]; - - // [FG] length in chars - int len; - - // [FG] width in pixels - int width; - -} hu_line_t; - -// [FG] an array of lines with common properties - -typedef struct hu_multiline_s -{ - hu_line_t *lines[HU_MAXMESSAGES]; // text lines to draw - int numlines; // number of lines - int curline; // current line number - - hu_font_t **font; // font - byte *cr; //jff 2/16/52 output color range - boolean drawcursor; - - // pointer to boolean stating whether to update window - boolean *on; - - void (*builder)(void); - boolean built; - - boolean exclusive; - boolean bottomup; - -} hu_multiline_t; - -// [FG] configured alignment and coordinates for multilines - -typedef struct hu_widget_s -{ - hu_multiline_t *multiline; - - align_t h_align, v_align; - - // [FG] align_direct - int x, y; - - // [FG] back up for centered messages - align_t h_align_orig; - -} hu_widget_t; - -void HUlib_set_margins (void); -void HUlib_reset_align_offsets (void); - -void HUlib_clear_line (hu_line_t *const l); -void HUlib_clear_cur_line (hu_multiline_t *const m); -void HUlib_clear_all_lines (hu_multiline_t *const m); - -void HUlib_add_string_to_cur_line (hu_multiline_t *const m, const char *s); -void HUlib_add_strings_to_cur_line (hu_multiline_t *const m, const char *prefix, const char *s); -void HUlib_add_string_keep_space(hu_multiline_t *const m, const char *s); - -void HUlib_draw_widget (const hu_widget_t *const w); - -void HUlib_init_multiline (hu_multiline_t *const m, int nl, hu_font_t **f, byte *cr, boolean *on, void (*builder)(void)); - -boolean HUlib_add_key_to_line (hu_line_t *const l, unsigned char ch); -boolean HUlib_add_key_to_cur_line (hu_multiline_t *const m, unsigned char ch); - -void HUlib_erase_widget (const hu_widget_t *const w); - -#endif - -//---------------------------------------------------------------------------- -// -// $Log: hu_lib.h,v $ -// Revision 1.9 1998/05/11 10:13:31 jim -// formatted/documented hu_lib -// -// Revision 1.8 1998/04/28 15:53:53 jim -// Fix message list bug in small screen mode -// -// Revision 1.7 1998/02/26 22:58:44 jim -// Added message review display to HUD -// -// Revision 1.6 1998/02/19 16:55:19 jim -// Optimized HUD and made more configurable -// -// Revision 1.5 1998/02/18 00:58:58 jim -// Addition of HUD -// -// Revision 1.4 1998/02/15 02:48:09 phares -// User-defined keys -// -// Revision 1.3 1998/01/26 19:26:52 phares -// First rev with no ^Ms -// -// Revision 1.2 1998/01/26 05:50:24 killough -// Support more lines, and tab stops, in messages -// -// Revision 1.1.1.1 1998/01/19 14:02:55 rand -// Lee's Jan 19 sources -// -// -//---------------------------------------------------------------------------- - diff --git a/src/hu_stuff.c b/src/hu_stuff.c deleted file mode 100644 index 600178baf..000000000 --- a/src/hu_stuff.c +++ /dev/null @@ -1,2368 +0,0 @@ -// -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// Copyright (C) 2023 Fabian Greffrath -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: Heads-up displays -// -//----------------------------------------------------------------------------- - -// killough 5/3/98: remove unnecessary headers - -#include -#include - -#include "d_deh.h" /* Ty 03/27/98 - externalization of mapnamesx arrays */ -#include "d_event.h" -#include "d_items.h" -#include "doomkeys.h" -#include "doomstat.h" -#include "dstrings.h" -#include "hu_coordinates.h" -#include "hu_crosshair.h" -#include "hu_lib.h" -#include "hu_obituary.h" -#include "hu_stuff.h" -#include "i_timer.h" // time_scale -#include "i_video.h" // fps -#include "m_config.h" -#include "m_input.h" -#include "m_misc.h" -#include "m_swap.h" -#include "p_mobj.h" -#include "r_main.h" -#include "r_state.h" -#include "r_voxel.h" -#include "s_sound.h" -#include "sounds.h" -#include "st_stuff.h" /* jff 2/16/98 need loc of status bar */ -#include "u_mapinfo.h" -#include "u_scanner.h" -#include "v_fmt.h" -#include "v_video.h" - -// global heads up display controls - -int hud_active; //jff 2/17/98 controls heads-up display mode -boolean hud_displayed; //jff 2/23/98 turns heads-up display on/off -boolean hud_secret_message; // "A secret is revealed!" message -static int hud_widget_font; -static boolean hud_widget_layout; - -int hud_type; // Crispy HUD or Boom variants - -// -// Locally used constants, shortcuts. -// -// Ty 03/28/98 - -// These four shortcuts modifed to reflect char ** of mapnamesx[] -#define HU_TITLE (*mapnames[(gameepisode-1)*9+gamemap-1]) -#define HU_TITLE2 (*mapnames2[gamemap-1]) -#define HU_TITLEP (*mapnamesp[gamemap-1]) -#define HU_TITLET (*mapnamest[gamemap-1]) - -static const char *chat_macros[] = // Ty 03/27/98 - *not* externalized -{ - HUSTR_CHATMACRO0, - HUSTR_CHATMACRO1, - HUSTR_CHATMACRO2, - HUSTR_CHATMACRO3, - HUSTR_CHATMACRO4, - HUSTR_CHATMACRO5, - HUSTR_CHATMACRO6, - HUSTR_CHATMACRO7, - HUSTR_CHATMACRO8, - HUSTR_CHATMACRO9 -}; - -char **player_names[] = -{ - &s_HUSTR_PLRGREEN, - &s_HUSTR_PLRINDIGO, - &s_HUSTR_PLRBROWN, - &s_HUSTR_PLRRED -}; - -//jff 3/17/98 translate player colmap to text color ranges -int plyrcoltran[MAXPLAYERS]={CR_GREEN,CR_GRAY,CR_BROWN,CR_RED}; - -static player_t *plr; - -// font sets -static hu_font_t big_font = {.space_width = 4, .tab_width = 15, .tab_mask = ~15}, - sml_font = {.space_width = 5, .tab_width = 7, .tab_mask = ~7}; -static hu_font_t *doom_font = &big_font, *boom_font = &sml_font; -static hu_font_t *monospaced_font = &sml_font; -patch_t **hu_font = big_font.patches; - -static int CR_BLUE = CR_BLUE1; - -// widgets - -static char hud_stringbuffer[HU_MAXLINELENGTH]; - -static inline void InitStringBuffer(const char *const s) -{ - strncpy(hud_stringbuffer, s, sizeof(hud_stringbuffer)); -} - -// [FG] Vanilla widgets point to a boolean variable (*on) to determine -// if they are enabled, always big_font, mostly left-aligned -static hu_multiline_t w_title; -static hu_multiline_t w_message; -static hu_multiline_t w_chat; -static hu_multiline_t w_secret; // [crispy] secret message widget - -// [FG] special pony, per-player chat input buffer -static hu_line_t w_inputbuffer[MAXPLAYERS]; - -// [FG] Boom widgets are built using builder() functions -static hu_multiline_t w_ammo; //jff 2/16/98 new ammo widget for hud -static hu_multiline_t w_armor; //jff 2/16/98 new armor widget for hud -static hu_multiline_t w_health; //jff 2/16/98 new health widget for hud -static hu_multiline_t w_keys; //jff 2/16/98 new keys widget for hud -static hu_multiline_t w_weapon; //jff 2/16/98 new weapon widget for hud - -static hu_multiline_t w_compact; - -// [FG] extra Boom widgets, that need to be explicitly enabled -static hu_multiline_t w_monsec; //jff 2/16/98 new kill/secret widget for hud -static hu_multiline_t w_sttime; // time above status bar -static hu_multiline_t w_coord; -static hu_multiline_t w_fps; -static hu_multiline_t w_rate; -static hu_multiline_t w_cmd; -static hu_multiline_t w_speed; - -#define MAX_HUDS 3 -#define MAX_WIDGETS 20 - -static hu_widget_t widgets[MAX_HUDS][MAX_WIDGETS]; - -static void HU_ParseHUD (void); - -static char chat_dest[MAXPLAYERS]; -//boolean chat_on; -static boolean message_on; -static boolean has_message; // killough 12/98 -boolean message_dontfuckwithme; -static boolean message_nottobefuckedwith; -static int message_counter; -static int message_count; // killough 11/98 -static int chat_count; // killough 11/98 -static boolean secret_on; -//static int secret_counter; - -static boolean message_centered; -static boolean message_colorized; - -boolean show_messages; -boolean show_toggle_messages; -boolean show_pickup_messages; - -static boolean hud_map_announce; -static boolean title_on; -static int title_counter; - -static boolean headsupactive = false; - -//jff 2/16/98 hud supported automap colors added -int hudcolor_titl; // color range of automap level title -int hudcolor_xyco; // color range of new coords on automap -//jff 2/16/98 hud text colors, controls added -static int hudcolor_mesg; // color range of scrolling messages -static int hudcolor_chat; // color range of chat lines -static int hud_msg_lines; // number of message lines in window -static boolean message_list; // killough 11/98: made global - -static int message_timer = HU_MSGTIMEOUT * (1000/TICRATE); // killough 11/98 -static int chat_msg_timer = HU_MSGTIMEOUT * (1000/TICRATE); // killough 11/98 - -// -// Builtin map names. -// The actual names can be found in DStrings.h. -// -// Ty 03/27/98 - externalized map name arrays - now in d_deh.c -// and converted to arrays of pointers to char * -// See modified HUTITLEx macros - -// key tables -// jff 5/10/98 french support removed, -// as it was not being used and couldn't be easily tested -// -static const char shiftxform[] = -{ - 0, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, - ' ', '!', '"', '#', '$', '%', '&', - '"', // shift-' - '(', ')', '*', '+', - '<', // shift-, - '_', // shift-- - '>', // shift-. - '?', // shift-/ - ')', // shift-0 - '!', // shift-1 - '@', // shift-2 - '#', // shift-3 - '$', // shift-4 - '%', // shift-5 - '^', // shift-6 - '&', // shift-7 - '*', // shift-8 - '(', // shift-9 - ':', - ':', // shift-; - '<', - '+', // shift-= - '>', '?', '@', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', - 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - '[', // shift-[ - '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK - ']', // shift-] - '"', '_', - '\'', // shift-` - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', - 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - '{', '|', '}', '~', 127 -}; - -static boolean VANILLAMAP(int e, int m) -{ - if (gamemode == commercial) - return (e == 1 && m > 0 && m <=32); - else - return (e > 0 && e <= 4 && m > 0 && m <= 9); -} - -struct { - char **str; - const int cr; - const char *col; -} static const colorize_strings[] = { - // [Woof!] colorize keycard and skull key messages - {&s_GOTBLUECARD, CR_BLUE2, " blue "}, - {&s_GOTBLUESKUL, CR_BLUE2, " blue "}, - {&s_GOTREDCARD, CR_RED, " red "}, - {&s_GOTREDSKULL, CR_RED, " red "}, - {&s_GOTYELWCARD, CR_GOLD, " yellow "}, - {&s_GOTYELWSKUL, CR_GOLD, " yellow "}, - {&s_PD_BLUEC, CR_BLUE2, " blue "}, - {&s_PD_BLUEK, CR_BLUE2, " blue "}, - {&s_PD_BLUEO, CR_BLUE2, " blue "}, - {&s_PD_BLUES, CR_BLUE2, " blue "}, - {&s_PD_REDC, CR_RED, " red "}, - {&s_PD_REDK, CR_RED, " red "}, - {&s_PD_REDO, CR_RED, " red "}, - {&s_PD_REDS, CR_RED, " red "}, - {&s_PD_YELLOWC, CR_GOLD, " yellow "}, - {&s_PD_YELLOWK, CR_GOLD, " yellow "}, - {&s_PD_YELLOWO, CR_GOLD, " yellow "}, - {&s_PD_YELLOWS, CR_GOLD, " yellow "}, - - // [Woof!] colorize multi-player messages - {&s_HUSTR_PLRGREEN, CR_GREEN, "Green: "}, - {&s_HUSTR_PLRINDIGO, CR_GRAY, "Indigo: "}, - {&s_HUSTR_PLRBROWN, CR_BROWN, "Brown: "}, - {&s_HUSTR_PLRRED, CR_RED, "Red: "}, -}; - -static char* PrepareColor(const char *str, const char *col) -{ - char *str_replace, col_replace[16]; - - M_snprintf(col_replace, sizeof(col_replace), - "\x1b%c%s\x1b%c", '0'+CR_ORIG, col, '0'+CR_ORIG); - str_replace = M_StringReplace(str, col, col_replace); - - return str_replace; -} - -static void UpdateColor(char *str, int cr) -{ - int i; - int len = strlen(str); - - if (!message_colorized) - { - cr = CR_ORIG; - } - - for (i = 0; i < len; ++i) - { - if (str[i] == '\x1b' && i + 1 < len) - { - str[i + 1] = '0'+cr; - break; - } - } -} - -void HU_ResetMessageColors(void) -{ - int i; - - for (i = 0; i < arrlen(colorize_strings); i++) - { - UpdateColor(*colorize_strings[i].str, colorize_strings[i].cr); - } -} - -static crange_idx_e CRByHealth(int health, int maxhealth, boolean invul) -{ - if (invul) - return CR_GRAY; - - health = 100 * health / maxhealth; - - if (health < health_red) - return CR_RED; - else if (health < health_yellow) - return CR_GOLD; - else if (health <= health_green) - return CR_GREEN; - else - return CR_BLUE; -} - -byte* HU_ColorByHealth(int health, int maxhealth, boolean invul) -{ - const crange_idx_e cr = CRByHealth(health, maxhealth, invul); - - return colrngs[cr]; -} - -// [FG] support centered player messages - -static void HU_set_centered_message(void) -{ - int i, j; - - for (i = 0; i < MAX_HUDS; i++) - { - hu_widget_t *const w = widgets[i]; - - for (j = 0; w[j].multiline; j++) - { - if (w[j].multiline == &w_message) - { - w[j].h_align = message_centered ? align_center : w[j].h_align_orig; - } - } - } -} - -// -// HU_Init() -// -// Initialize the heads-up display, text that overwrites the primary display -// -// Passed nothing, returns nothing -// -void HU_Init(void) -{ - int i, j; - char buffer[9]; - - // load the heads-up font - for (i = 0, j = HU_FONTSTART; i < HU_FONTSIZE; i++, j++) - { - M_snprintf(buffer, sizeof(buffer), "STCFN%.3d", j); - if (W_CheckNumForName(buffer) != -1) - big_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); -/* - if ('0' <= j && j <= '9') - { - M_snprintf(buffer, sizeof(buffer), "DIG%.1d", j - 48); - sml_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - } - else if ('A' <= j && j <= 'Z') - { - M_snprintf(buffer, sizeof(buffer), "DIG%c", j); - sml_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - } - else if (j > 122) - { - M_snprintf(buffer, sizeof(buffer), "STBR%.3d", j); - sml_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - } - else - { - M_snprintf(buffer, sizeof(buffer), "DIG%.2d", j); - if (W_CheckNumForName(buffer) != -1) - sml_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - } -*/ - // [FG] small font available, big font unavailable - if (big_font.patches[i] == NULL && sml_font.patches[i] != NULL) - { - big_font.patches[i] = sml_font.patches[i]; - } - // [FG] big font available, small font unavailable - else if (big_font.patches[i] != NULL && sml_font.patches[i] == NULL) - { - sml_font.patches[i] = big_font.patches[i]; - } - // [FG] both fonts unavailable, fall back to '!' - else if (big_font.patches[i] == NULL && sml_font.patches[i] == NULL) - { - sml_font.patches[i] = - big_font.patches[i] = big_font.patches[0]; - } - } - - //jff 2/26/98 load patches for keys and double keys - for (i = HU_FONTSIZE, j = 0; j < 6; i++, j++) - { - M_snprintf(buffer, sizeof(buffer), "STKEYS%.1d", j); - sml_font.patches[i] = - big_font.patches[i] = V_CachePatchName(buffer, PU_STATIC); - } - - // [FG] calculate font height once right here - sml_font.line_height = SHORT(sml_font.patches['A'-HU_FONTSTART]->height) + 1; - big_font.line_height = SHORT(big_font.patches['A'-HU_FONTSTART]->height) + 1; - - // [FG] support crosshair patches from extras.wad - HU_InitCrosshair(); - - HU_InitCommandHistory(); - - HU_InitObituaries(); - - HU_ParseHUD(); - HU_set_centered_message(); - - // [Woof!] prepare player messages for colorization - for (i = 0; i < arrlen(colorize_strings); i++) - { - *colorize_strings[i].str = PrepareColor(*colorize_strings[i].str, colorize_strings[i].col); - } - - HU_ResetMessageColors(); -} - -static inline void HU_cond_build_widget (hu_multiline_t *const multiline, boolean cond) -{ - if (cond && multiline->built == false) - { - multiline->builder(); - multiline->built = true; - } -} - -static boolean hud_pending; - -void HU_disable_all_widgets (void) -{ - hu_widget_t *w = widgets[hud_active]; - - while (w->multiline) - { - w->multiline->built = false; - w++; - } - - hud_pending = true; -} - -// -// HU_Stop() -// -// Make the heads-up displays inactive -// -// Passed nothing, returns nothing -// -void HU_Stop(void) -{ - headsupactive = false; -} - -// -// HU_Start(void) -// -// Create and initialize the heads-up widgets, software machines to -// maintain, update, and display information over the primary display -// -// This routine must be called after any change to the heads up configuration -// in order for the changes to take effect in the actual displays -// -// Passed nothing, returns nothing -// - -static void HU_widget_build_ammo (void); -static void HU_widget_build_armor (void); -static void HU_widget_build_coord (void); -static void HU_widget_build_fps (void); -static void HU_widget_build_rate (void); -static void HU_widget_build_cmd(void); -static void HU_widget_build_health (void); -static void HU_widget_build_keys (void); -static void HU_widget_build_frag (void); -static void HU_widget_build_monsec(void); -static void HU_widget_build_sttime(void); -static void HU_widget_build_title (void); -static void HU_widget_build_weapon (void); -static void HU_widget_build_compact (void); -static void HU_widget_build_speed(void); - -static hu_multiline_t *w_stats; - -void HU_Start(void) -{ - int i; - - if (headsupactive) // stop before starting - HU_Stop(); - - plr = &players[displayplayer]; // killough 3/7/98 - message_on = false; - message_dontfuckwithme = false; - message_nottobefuckedwith = false; - chat_on = false; - secret_on = false; - - // killough 11/98: - message_counter = 0; - message_count = (message_timer * TICRATE) / 1000 + 1; - chat_count = (chat_msg_timer * TICRATE) / 1000 + 1; - - // create the message widget - HUlib_init_multiline(&w_message, message_list ? hud_msg_lines : 1, - &doom_font, colrngs[hudcolor_mesg], - &message_on, NULL); - - // create the secret message widget - HUlib_init_multiline(&w_secret, 1, - &doom_font, colrngs[CR_GOLD], - &secret_on, NULL); - - // create the chat widget - HUlib_init_multiline(&w_chat, 1, - &doom_font, colrngs[hudcolor_chat], - &chat_on, NULL); - // [FG] only the chat widget draws a cursor - w_chat.drawcursor = true; - - // create the inputbuffer widgets, one per player - for (i = 0; i < MAXPLAYERS; i++) - { - HUlib_clear_line(&w_inputbuffer[i]); - } - - //jff 2/16/98 added some HUD widgets - // create the map title widget - HUlib_init_multiline(&w_title, 1, - &doom_font, colrngs[hudcolor_titl], - &title_on, HU_widget_build_title); - // [FG] built only once right here - w_title.builder(); - - // create the hud health widget - HUlib_init_multiline(&w_health, 1, - &boom_font, colrngs[CR_GREEN], - NULL, HU_widget_build_health); - - // create the hud armor widget - HUlib_init_multiline(&w_armor, 1, - &boom_font, colrngs[CR_GREEN], - NULL, HU_widget_build_armor); - - // create the hud ammo widget - HUlib_init_multiline(&w_ammo, 1, - &boom_font, colrngs[CR_GOLD], - NULL, HU_widget_build_ammo); - - // create the hud weapons widget - HUlib_init_multiline(&w_weapon, 1, - &boom_font, colrngs[CR_GRAY], - NULL, HU_widget_build_weapon); - - // create the hud keys widget - HUlib_init_multiline(&w_keys, 1, - &boom_font, colrngs[CR_GRAY], - NULL, deathmatch ? HU_widget_build_frag : HU_widget_build_keys); - - HUlib_init_multiline(&w_compact, hud_widget_layout ? 3 : 1, - &boom_font, colrngs[CR_GRAY], - NULL, HU_widget_build_compact); - - // create the hud monster/secret widget - HUlib_init_multiline(&w_monsec, hud_widget_layout ? 3 : 1, - &boom_font, colrngs[CR_GRAY], - NULL, HU_widget_build_monsec); - // [FG] in deathmatch: w_keys.builder = HU_widget_build_frag() - w_stats = deathmatch ? &w_keys : &w_monsec; - - HUlib_init_multiline(&w_sttime, 1, - &boom_font, colrngs[CR_GRAY], - NULL, HU_widget_build_sttime); - - // create the automaps coordinate widget - if (hud_player_coords == HUD_WIDGET_ADVANCED) - { - HUlib_init_multiline(&w_coord, 12, - &monospaced_font, colrngs[CR_GRAY], - NULL, HU_widget_build_coord); - } - else - { - HUlib_init_multiline(&w_coord, hud_widget_layout ? 3 : 1, - &boom_font, colrngs[hudcolor_xyco], - NULL, HU_widget_build_coord); - } - - HUlib_init_multiline(&w_fps, 1, - &boom_font, colrngs[hudcolor_xyco], - NULL, HU_widget_build_fps); - - HUlib_init_multiline(&w_rate, (voxels_rendering ? 2 : 1), - &boom_font, colrngs[hudcolor_xyco], - NULL, HU_widget_build_rate); - // [FG] draw the IDRATE widget exclusively - w_rate.exclusive = true; - - HUlib_init_multiline(&w_cmd, hud_command_history_size, - &monospaced_font, colrngs[hudcolor_xyco], - NULL, HU_widget_build_cmd); - // Draw command history bottom up. - w_cmd.bottomup = true; - - HUlib_init_multiline(&w_speed, 1, - &boom_font, colrngs[hudcolor_xyco], - NULL, HU_widget_build_speed); - - HU_set_centered_message(); - - HU_disable_all_widgets(); - HUlib_set_margins(); - - // init crosshair - if (hud_crosshair) - HU_StartCrosshair(); - - // now allow the heads-up display to run - headsupactive = true; -} - -static void HU_widget_build_title (void) -{ - InitStringBuffer(""); - - char *s, *n; - - if (gamemapinfo && gamemapinfo->levelname) - { - if (gamemapinfo->label) - s = gamemapinfo->label; - else - s = gamemapinfo->mapname; - - if (s == gamemapinfo->mapname || U_CheckField(s)) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "%s: ", s); - } - s = gamemapinfo->levelname; - } - else if (gamestate == GS_LEVEL) - { - if (VANILLAMAP(gameepisode, gamemap)) - { - s = (gamemode != commercial) ? HU_TITLE : - (gamemission == pack_tnt) ? HU_TITLET : - (gamemission == pack_plut) ? HU_TITLEP : - HU_TITLE2; - } - // WADs like pl2.wad have a MAP33, and rely on the layout in the - // Vanilla executable, where it is possible to overflow the end of one - // array into the next. - else if (gamemode == commercial && gamemap >= 33 && gamemap <= 35) - { - s = (gamemission == doom2) ? (*mapnamesp[gamemap-33]) : - (gamemission == pack_plut) ? (*mapnamest[gamemap-33]) : ""; - } - else - { - // initialize the map title widget with the generic map lump name - s = MAPNAME(gameepisode, gamemap); - } - } - else - { - s = ""; - } - - // [FG] cap at line break - if ((n = strchr(s, '\n'))) - { - *n = '\0'; - } - - if (hud_map_announce && leveltime == 0) - { - title_counter = HU_MSGTIMEOUT2; - } - - M_StringConcat(hud_stringbuffer, s, sizeof(hud_stringbuffer)); - - HUlib_add_string_to_cur_line(&w_title, hud_stringbuffer); -} - -// do the hud ammo display -static crange_idx_e CRByAmmo(const int ammo, const int fullammo, int ammopct) -{ - // backpack changes thresholds (ammo widget) - if (plr->backpack && !hud_backpack_thresholds && fullammo) - ammopct = (100 * ammo) / (fullammo / 2); - - // set the display color from the percentage of total ammo held - if (ammopct < ammo_red) - return CR_RED; - else if (ammopct < ammo_yellow) - return CR_GOLD; - else if (ammopct > 100) // more than max threshold w/o backpack - return CR_BLUE; - else - return CR_GREEN; -} - -static void HU_widget_build_ammo (void) -{ - InitStringBuffer("AMM "); - - int fullammo = plr->maxammo[weaponinfo[plr->readyweapon].ammo]; - int i = 4; - - // special case for weapon with no ammo selected - blank bargraph + N/A - if (weaponinfo[plr->readyweapon].ammo == am_noammo || fullammo == 0) - { - if (hud_type == HUD_TYPE_BOOM) - { - strcat(hud_stringbuffer, "\x7f\x7f\x7f\x7f\x7f\x7f\x7f"); - } - strcat(hud_stringbuffer, "N/A"); - w_ammo.cr = colrngs[CR_GRAY]; - } - else - { - int ammo = plr->ammo[weaponinfo[plr->readyweapon].ammo]; - int ammopct = (100 * ammo) / fullammo; - int ammobars = ammopct / 4; - - // build the bargraph string - if (hud_type == HUD_TYPE_BOOM) - { - // full bargraph chars - for (i = 4; i < 4 + ammobars / 4;) - hud_stringbuffer[i++] = 123; - - // plus one last character with 0, 1, 2, 3 bars - switch (ammobars % 4) - { - case 0: - break; - case 1: - hud_stringbuffer[i++] = 126; - break; - case 2: - hud_stringbuffer[i++] = 125; - break; - case 3: - hud_stringbuffer[i++] = 124; - break; - } - - // pad string with blank bar characters - while (i < 4 + 7) - hud_stringbuffer[i++] = 127; - hud_stringbuffer[i] = '\0'; - } - - // build the numeric amount init string - M_snprintf(hud_stringbuffer + i, sizeof(hud_stringbuffer) - i, - "%3d/%3d", ammo, fullammo); - - const crange_idx_e cr = CRByAmmo(ammo, fullammo, ammopct); - w_ammo.cr = colrngs[cr]; - } - - // transfer the init string to the widget - HUlib_add_string_to_cur_line(&w_ammo, hud_stringbuffer); -} - -// do the hud health display -static void HU_widget_build_health (void) -{ -/* - InitStringBuffer("HEL "); - - int i = 4; - int healthbars = (st_health > 100) ? 25 : (st_health / 4); - - // build the bargraph string - if (hud_type == HUD_TYPE_BOOM) - { - // full bargraph chars - for (i = 4; i < 4 + healthbars / 4;) - hud_stringbuffer[i++] = 123; - - // plus one last character with 0, 1, 2, 3 bars - switch (healthbars % 4) - { - case 0: - break; - case 1: - hud_stringbuffer[i++] = 126; - break; - case 2: - hud_stringbuffer[i++] = 125; - break; - case 3: - hud_stringbuffer[i++] = 124; - break; - } - - // pad string with blank bar characters - while (i < 4 + 7) - hud_stringbuffer[i++] = 127; - hud_stringbuffer[i] = '\0'; - } - - // build the numeric amount init string - M_snprintf(hud_stringbuffer + i, sizeof(hud_stringbuffer) - i, - "%3d", st_health); - - // set the display color from the amount of health posessed - w_health.cr = HU_ColorByHealth(plr->health, 100, st_invul); - - // transfer the init string to the widget - HUlib_add_string_to_cur_line(&w_health, hud_stringbuffer); -*/ -} - -// do the hud armor display -/* -static crange_idx_e CRByArmor(void) -{ - // color of armor depends on type - if (hud_armor_type) - { - return - st_invul ? CR_GRAY : - (plr->armortype == 0) ? CR_RED : - (plr->armortype == 1) ? CR_GREEN : - CR_BLUE; - } - else - { - const int armor = plr->armorpoints; - - // set the display color from the amount of armor posessed - return - st_invul ? CR_GRAY : - (armor < armor_red) ? CR_RED : - (armor < armor_yellow) ? CR_GOLD : - (armor <= armor_green) ? CR_GREEN : - CR_BLUE; - } -} -*/ - -static void HU_widget_build_armor (void) -{ -/* - InitStringBuffer("ARM "); - - int i = 4; - int armorbars = (st_armor > 100) ? 25 : (st_armor / 4); - - // build the bargraph string - if (hud_type == HUD_TYPE_BOOM) - { - // full bargraph chars - for (i = 4; i < 4 + armorbars / 4;) - hud_stringbuffer[i++] = 123; - - // plus one last character with 0, 1, 2, 3 bars - switch (armorbars % 4) - { - case 0: - break; - case 1: - hud_stringbuffer[i++] = 126; - break; - case 2: - hud_stringbuffer[i++] = 125; - break; - case 3: - hud_stringbuffer[i++] = 124; - break; - } - - // pad string with blank bar characters - while (i < 4 + 7) - hud_stringbuffer[i++] = 127; - hud_stringbuffer[i] = '\0'; - } - - // build the numeric amount init string - M_snprintf(hud_stringbuffer + i, sizeof(hud_stringbuffer) - i, "%3d", st_armor); - - const crange_idx_e cr = CRByArmor(); - w_armor.cr = colrngs[cr]; - - // transfer the init string to the widget - HUlib_add_string_to_cur_line(&w_armor, hud_stringbuffer); -*/ -} - -static void HU_widget_build_compact (void) -{ -/* - const crange_idx_e cr_health = CRByHealth(plr->health, 100, st_invul); - const crange_idx_e cr_armor = CRByArmor(); - - const ammotype_t ammotype = weaponinfo[plr->readyweapon].ammo; - const int ammo = plr->ammo[ammotype]; - const int fullammo = plr->maxammo[ammotype]; - const boolean noammo = (ammotype == am_noammo || fullammo == 0); - - if (hud_widget_layout) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cHEL \x1b%c%3d", '0'+CR_GRAY, '0'+cr_health, st_health); - HUlib_add_string_to_cur_line(&w_compact, hud_stringbuffer); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cARM \x1b%c%3d", '0'+CR_GRAY, '0'+cr_armor, st_armor); - HUlib_add_string_to_cur_line(&w_compact, hud_stringbuffer); - - if (noammo) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cAMM N/A", '0'+CR_GRAY); - } - else - { - const int ammopct = (100 * ammo) / fullammo; - const crange_idx_e cr_ammo = CRByAmmo(ammo, fullammo, ammopct); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cAMM \x1b%c%3d/%3d", '0'+CR_GRAY, '0'+cr_ammo, ammo, fullammo); - } - HUlib_add_string_to_cur_line(&w_compact, hud_stringbuffer); - } - else - { - if (noammo) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cHEL \x1b%c%3d \x1b%cARM \x1b%c%3d \x1b%cAMM N/A", - '0'+CR_GRAY, '0'+cr_health, st_health, - '0'+CR_GRAY, '0'+cr_armor, st_armor, - '0'+CR_GRAY); - } - else - { - const int ammopct = (100 * ammo) / fullammo; - const crange_idx_e cr_ammo = CRByAmmo(ammo, fullammo, ammopct); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cHEL \x1b%c%3d \x1b%cARM \x1b%c%3d \x1b%cAMM \x1b%c%3d/%3d", - '0'+CR_GRAY, '0'+cr_health, st_health, - '0'+CR_GRAY, '0'+cr_armor, st_armor, - '0'+CR_GRAY, '0'+cr_ammo, ammo, fullammo); - } - HUlib_add_string_to_cur_line(&w_compact, hud_stringbuffer); - } -*/ -} - -// do the hud weapon display -static void HU_widget_build_weapon (void) -{ - InitStringBuffer("WEA "); - - int i = 4, w, ammo, fullammo, ammopct; - - // do each weapon that exists in current gamemode - for (w = 0; w <= wp_supershotgun; w++) //jff 3/4/98 show fists too, why not? - { - int ok = 1; - - //jff avoid executing for weapons that do not exist - switch (gamemode) - { - case shareware: - if (w >= wp_plasma && w != wp_chainsaw) - ok = 0; - break; - case retail: - case registered: - if (w >= wp_supershotgun && !ALLOW_SSG) - ok = 0; - break; - default: - case commercial: - break; - } - if (!ok) - continue; - - ammo = plr->ammo[weaponinfo[w].ammo]; - fullammo = plr->maxammo[weaponinfo[w].ammo]; - - // skip weapons not currently posessed - if (!plr->weaponowned[w]) - continue; - - // backpack changes thresholds (weapon widget) - if (plr->backpack && !hud_backpack_thresholds) - fullammo /= 2; - - ammopct = fullammo ? (100 * ammo) / fullammo : 100; - - // display each weapon number in a color related to the ammo for it - hud_stringbuffer[i++] = '\x1b'; //jff 3/26/98 use ESC not '\' for paths - if (weaponinfo[w].ammo == am_noammo) //jff 3/14/98 show berserk on HUD - hud_stringbuffer[i++] = (w == wp_fist && !plr->powers[pw_strength]) ? '0'+CR_GRAY : '0'+CR_GREEN; - else if (ammopct < ammo_red) - hud_stringbuffer[i++] = '0'+CR_RED; - else if (ammopct < ammo_yellow) - hud_stringbuffer[i++] = '0'+CR_GOLD; - else if (ammopct > 100) // more than max threshold w/o backpack - hud_stringbuffer[i++] = '0'+CR_BLUE; - else - hud_stringbuffer[i++] = '0'+CR_GREEN; - - hud_stringbuffer[i++] = '0'+w+1; - hud_stringbuffer[i++] = ' '; - hud_stringbuffer[i] = '\0'; - } - - // transfer the init string to the widget - HUlib_add_string_to_cur_line(&w_weapon, hud_stringbuffer); -} - -static void HU_widget_build_keys (void) -{ - const char hud_keysstr[] = { 'K', 'E', 'Y', '\x1b', '0'+CR_NONE, ' ', '\0' }; - InitStringBuffer(hud_keysstr); - - int i = 6, k; - - // build text string whose characters call out graphic keys - for (k = 0; k < 6; k++) - { - // skip keys not possessed - if (!plr->cards[k]) - continue; - - hud_stringbuffer[i++] = HU_FONTEND + k + 1; // key number plus HU_FONTEND is char for key - hud_stringbuffer[i++] = ' '; // spacing - hud_stringbuffer[i++] = ' '; - } - - // [Alaux] Blink missing keys *after* possessed keys - for (k = 0; k < 6; k++) - { - if (plr->cards[k]) - continue; - - switch (ST_BlinkKey(plr, k % 3)) - { - case KEYBLINK_CARD: - if (k >= 3) - continue; - break; - - case KEYBLINK_SKULL: - if (k < 3) - continue; - break; - - case KEYBLINK_BOTH: - break; - - default: - continue; - } - - hud_stringbuffer[i++] = HU_FONTEND + k + 1; - hud_stringbuffer[i++] = ' '; - hud_stringbuffer[i++] = ' '; - } - - hud_stringbuffer[i] = '\0'; - - // transfer the built string (frags or key title) to the widget - HUlib_add_string_to_cur_line(&w_keys, hud_stringbuffer); -} - -static inline int HU_top (int i, const int idx1, const int top1) -{ - if (idx1 > -1) - { - char numbuf[32], *s; - - M_snprintf(numbuf, sizeof(numbuf), "%5d", top1); - // make frag count in player's color via escape code - - hud_stringbuffer[i++] = '\x1b'; //jff 3/26/98 use ESC not '\' for paths - hud_stringbuffer[i++] = '0' + plyrcoltran[idx1 & 3]; - s = numbuf; - while (*s) - hud_stringbuffer[i++] = *s++; - } - return i; -} - -static void HU_widget_build_frag (void) -{ - const char hud_fragstr[] = { 'F', 'R', 'G', '\x1b', '0'+CR_ORIG, ' ', '\0' }; - InitStringBuffer(hud_fragstr); - - int i = 6, k; - - int top1 = -999, top2 = -999, top3 = -999, top4 = -999; - int idx1 = -1, idx2 = -1, idx3 = -1, idx4 = -1; - int fragcount, m; - - // scan thru players - for (k = 0; k < MAXPLAYERS; k++) - { - // skip players not in game - if (!playeringame[k]) - continue; - - fragcount = 0; - - // compute number of times they've fragged each player - // minus number of times they've been fragged by them - for (m = 0; m < MAXPLAYERS; m++) - { - if (!playeringame[m]) - continue; - fragcount += (m != k) ? players[k].frags[m] : -players[k].frags[m]; - } - - // very primitive sort of frags to find top four - if (fragcount > top1) - { - top4 = top3; top3 = top2; top2 = top1; top1 = fragcount; - idx4 = idx3; idx3 = idx2; idx2 = idx1; idx1 = k; - } - else if (fragcount > top2) - { - top4 = top3; top3 = top2; top2 = fragcount; - idx4 = idx3; idx3 = idx2; idx2 = k; - } - else if (fragcount > top3) - { - top4 = top3; top3 = fragcount; - idx4 = idx3; idx3 = k; - } - else if (fragcount > top4) - { - top4 = fragcount; - idx4 = k; - } - } - - // killough 11/98: replaced cut-and-pasted code with function - - // if the biggest number exists, - // put it in the init string - i = HU_top(i, idx1, top1); - - // if the second biggest number exists, - // put it in the init string - i = HU_top(i, idx2, top2); - - // if the third biggest number exists, - // put it in the init string - i = HU_top(i, idx3, top3); - - // if the fourth biggest number exists, - // put it in the init string - i = HU_top(i, idx4, top4); - - hud_stringbuffer[i] = '\0'; - - // transfer the built string (frags or key title) to the widget - HUlib_add_string_to_cur_line(&w_keys, hud_stringbuffer); -} - -static void HU_widget_build_monsec(void) -{ - int i; - int fullkillcount, fullitemcount, fullsecretcount; - int killcolor, itemcolor, secretcolor; - int kill_percent_count; - - fullkillcount = 0; - fullitemcount = 0; - fullsecretcount = 0; - kill_percent_count = 0; - - for (i = 0; i < MAXPLAYERS; ++i) - { - if (playeringame[i]) - { - fullkillcount += players[i].killcount - players[i].maxkilldiscount; - fullitemcount += players[i].itemcount; - fullsecretcount += players[i].secretcount; - kill_percent_count += players[i].killcount; - } - } - - if (respawnmonsters) - { - fullkillcount = kill_percent_count; - max_kill_requirement = totalkills; - } - - killcolor = (fullkillcount >= max_kill_requirement) ? '0'+CR_BLUE : '0'+CR_GRAY; - secretcolor = (fullsecretcount >= totalsecret) ? '0'+CR_BLUE : '0'+CR_GRAY; - itemcolor = (fullitemcount >= totalitems) ? '0'+CR_BLUE : '0'+CR_GRAY; - - if (hud_widget_layout) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cK\t\x1b%c%d/%d", ('0'+CR_RED), killcolor, fullkillcount, max_kill_requirement); - HUlib_add_string_to_cur_line(&w_monsec, hud_stringbuffer); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cI\t\x1b%c%d/%d", ('0'+CR_RED), itemcolor, fullitemcount, totalitems); - HUlib_add_string_to_cur_line(&w_monsec, hud_stringbuffer); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cS\t\x1b%c%d/%d", ('0'+CR_RED), secretcolor, fullsecretcount, totalsecret); - HUlib_add_string_to_cur_line(&w_monsec, hud_stringbuffer); - } - else - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "\x1b%cK \x1b%c%d/%d \x1b%cI \x1b%c%d/%d \x1b%cS \x1b%c%d/%d", - '0'+CR_RED, killcolor, fullkillcount, max_kill_requirement, - '0'+CR_RED, itemcolor, fullitemcount, totalitems, - '0'+CR_RED, secretcolor, fullsecretcount, totalsecret); - - HUlib_add_string_to_cur_line(&w_monsec, hud_stringbuffer); - } -} - -static void HU_widget_build_sttime(void) -{ - InitStringBuffer(""); - - int offset = 0; - - if ((hud_level_time & HUD_WIDGET_HUD && !automapactive) || - (hud_level_time & HUD_WIDGET_AUTOMAP && automapactive)) - { - if (time_scale != 100) - { - offset += M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "\x1b%c%d%% ", - '0'+CR_BLUE, time_scale); - } - - if (totalleveltimes) - { - const int time = (totalleveltimes + leveltime) / TICRATE; - - offset += M_snprintf(hud_stringbuffer + offset, sizeof(hud_stringbuffer) - offset, - "\x1b%c%d:%02d ", - '0'+CR_GREEN, time/60, time%60); - } - - if (!plr->btuse_tics) - { - M_snprintf(hud_stringbuffer + offset, sizeof(hud_stringbuffer) - offset, - "\x1b%c%d:%05.2f\t", - '0'+CR_GRAY, leveltime / TICRATE / 60, - (float)(leveltime % (60 * TICRATE)) / TICRATE); - } - } - - if (plr->btuse_tics) - { - M_snprintf(hud_stringbuffer + offset, sizeof(hud_stringbuffer) - offset, - "\x1b%cU %d:%05.2f\t", - '0'+CR_GOLD, plr->btuse / TICRATE / 60, - (float)(plr->btuse % (60 * TICRATE)) / TICRATE); - } - - HUlib_add_string_to_cur_line(&w_sttime, hud_stringbuffer); -} - -void HU_widget_rebuild_sttime(void) -{ - HU_widget_build_sttime(); -} - -static void HU_widget_build_coord (void) -{ - fixed_t x,y,z; // killough 10/98: - void AM_Coordinates(const mobj_t *, fixed_t *, fixed_t *, fixed_t *); - - if (hud_player_coords == HUD_WIDGET_ADVANCED) - { - HU_BuildCoordinatesEx(&w_coord, plr->mo, hud_stringbuffer, - sizeof(hud_stringbuffer)); - return; - } - - // killough 10/98: allow coordinates to display non-following pointer - AM_Coordinates(plr->mo, &x, &y, &z); - - //jff 2/16/98 output new coord display - if (hud_widget_layout) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "X\t\x1b%c%d", '0'+CR_GRAY, x >> FRACBITS); - HUlib_add_string_to_cur_line(&w_coord, hud_stringbuffer); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "Y\t\x1b%c%d", '0'+CR_GRAY, y >> FRACBITS); - HUlib_add_string_to_cur_line(&w_coord, hud_stringbuffer); - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "Z\t\x1b%c%d", '0'+CR_GRAY, z >> FRACBITS); - HUlib_add_string_to_cur_line(&w_coord, hud_stringbuffer); - } - else - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "X \x1b%c%d \x1b%cY \x1b%c%d \x1b%cZ \x1b%c%d", - '0'+CR_GRAY, x >> FRACBITS, '0'+hudcolor_xyco, - '0'+CR_GRAY, y >> FRACBITS, '0'+hudcolor_xyco, - '0'+CR_GRAY, z >> FRACBITS); - - HUlib_add_string_to_cur_line(&w_coord, hud_stringbuffer); - } -} - -static void HU_widget_build_fps (void) -{ - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "\x1b%c%d \x1b%cFPS", - '0'+CR_GRAY, fps, '0'+CR_ORIG); - HUlib_add_string_to_cur_line(&w_fps, hud_stringbuffer); -} - -static void HU_widget_build_rate (void) -{ - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), - "Sprites %4d Segs %4d Visplanes %4d \x1b%cFPS %3d %dx%d\x1b%c", - rendered_vissprites, rendered_segs, rendered_visplanes, - '0'+CR_GRAY, fps, video.width, video.height, '0'+CR_ORIG); - HUlib_add_string_to_cur_line(&w_rate, hud_stringbuffer); - - if (voxels_rendering) - { - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), " Voxels %4d", rendered_voxels); - HUlib_add_string_to_cur_line(&w_rate, hud_stringbuffer); - } -} - -static void HU_widget_build_cmd(void) -{ - HU_BuildCommandHistory(&w_cmd); -} - -int speedometer; - -static void HU_widget_build_speed(void) -{ - static const double factor[] = {TICRATE, 2.4003, 525.0 / 352.0}; - static const char *units[] = {"ups", "km/h", "mph"}; - const int type = speedometer - 1; - const double dx = FIXED2DOUBLE(plr->mo->x - plr->mo->oldx); - const double dy = FIXED2DOUBLE(plr->mo->y - plr->mo->oldy); - const double dz = FIXED2DOUBLE(plr->mo->z - plr->mo->oldz); - const double speed = sqrt(dx*dx + dy*dy + dz*dz) * factor[type]; - - M_snprintf(hud_stringbuffer, sizeof(hud_stringbuffer), "\x1b%c%.*f \x1b%c%s", - '0' + CR_GRAY, type && speed ? 1 : 0, speed, - '0' + CR_ORIG, units[type]); - HUlib_add_string_to_cur_line(&w_speed, hud_stringbuffer); -} - -// [crispy] print a bar indicating demo progress at the bottom of the screen -boolean HU_DemoProgressBar(boolean force) -{ - const int progress = video.unscaledw * playback_tic / playback_totaltics; - static int old_progress = 0; - - if (old_progress < progress) - { - old_progress = progress; - } - else if (!force) - { - return false; - } - - V_FillRect(0, SCREENHEIGHT - 2, progress, 1, v_darkest_color); - V_FillRect(0, SCREENHEIGHT - 1, progress, 1, v_lightest_color); - - return true; -} - -// [FG] level stats and level time widgets -int hud_player_coords, hud_level_stats, hud_level_time; - -boolean hud_time_use; - -// -// HU_Drawer() -// -// Draw all the pieces of the heads-up display -// -// Passed nothing, returns nothing -// -void HU_Drawer(void) -{ - // hu_widget_t *w = widgets[hud_active]; - - // if (hud_pending) - // return; - - // HUlib_reset_align_offsets(); - - // while (w->multiline) - // { - // if ((w->multiline->on && *w->multiline->on) || w->multiline->built) - // { - // HUlib_draw_widget(w); - // } - // w++; - // } -} - -// [FG] draw Time widget on intermission screen -void WI_DrawWidgets(void) -{ - HUlib_reset_align_offsets(); - - if (hud_level_time & HUD_WIDGET_HUD) - { - const hu_widget_t w = {&w_sttime, align_left, align_top}; - // leveltime is already added to totalleveltimes before WI_Start() - //HU_widget_build_sttime(); - HUlib_draw_widget(&w); - } - - if (STRICTMODE(hud_command_history)) - { - hu_widget_t *w = widgets[hud_active]; - - while (w->multiline) - { - if (w->multiline == &w_cmd - && ((w->multiline->on && *w->multiline->on) || w->multiline->built)) - { - w_cmd.built = false; - HU_cond_build_widget(&w_cmd, true); - HUlib_draw_widget(w); - break; - } - w++; - } - } -} - -// -// HU_Erase() -// -// Erase hud display lines that can be trashed by small screen display -// -// Passed nothing, returns nothing -// - -void HU_Erase(void) -{ - hu_widget_t *w = widgets[hud_active]; - - if (automapactive || !scaledviewx) - return; - - HUlib_reset_align_offsets(); - - while (w->multiline) - { - if (w->multiline->on || w->multiline->built) - { - HUlib_erase_widget(w); - } - w++; - } -} - -// -// HU_Ticker() -// -// Update the hud displays once per frame -// -// Passed nothing, returns nothing -// - -static boolean bsdown; // Is backspace down? -static int bscounter; - -void HU_Ticker(void) -{ - plr = &players[displayplayer]; // killough 3/7/98 - - HU_disable_all_widgets(); - - if ((automapactive && hud_widget_font == 1) || - (!automapactive && hud_widget_font == 2) || - hud_widget_font == 3) - { - boom_font = &big_font; - CR_BLUE = CR_BLUE2; - } - else - { - boom_font = &sml_font; - CR_BLUE = CR_BLUE1; - } -/* - // wait a few tics before sending a backspace character - if (bsdown && bscounter++ > 9) - { - HUlib_add_key_to_cur_line(&w_chat, KEY_BACKSPACE); - bscounter = 8; - } - - // tick down message counter if message is up - if (message_counter && !--message_counter) - message_on = message_nottobefuckedwith = false; - - if (secret_counter && !--secret_counter) - secret_on = false; - - // [Woof!] "A secret is revealed!" message - if (plr->secretmessage) - { - HUlib_add_string_to_cur_line(&w_secret, plr->secretmessage); - plr->secretmessage = NULL; - secret_on = true; - secret_counter = HU_MSGTIMEOUT2; - } - - // if messages on, or "Messages Off" is being displayed - // this allows the notification of turning messages off to be seen - // display message if necessary - - if ((show_messages || message_dontfuckwithme) && plr->message && - (!message_nottobefuckedwith || message_dontfuckwithme)) - { - //post the message to the message widget - HUlib_add_string_to_cur_line(&w_message, plr->message); - - // [FG] empty messages clear the whole widget - if (plr->message[0] == '\0') - HUlib_clear_all_lines(&w_message); - - // clear the message to avoid posting multiple times - plr->message = 0; - - message_on = true; // note a message is displayed - // start the message persistence counter - message_counter = message_count; - - has_message = true; // killough 12/98 - - // transfer "Messages Off" exception to the "being displayed" variable - message_nottobefuckedwith = message_dontfuckwithme; - - // clear the flag that "Messages Off" is being posted - message_dontfuckwithme = 0; - } -*/ -/* - // check for incoming chat characters - if (netgame) - { - int i, rc; - char c; - - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i]) - continue; - - if (i != consoleplayer && - (c = players[i].cmd.chatchar)) - { - if (c <= HU_BROADCAST) - chat_dest[i] = c; - else - { - if (c >= 'a' && c <= 'z') - c = (char) shiftxform[(unsigned char) c]; - - rc = HUlib_add_key_to_line(&w_inputbuffer[i], c); - if (rc && c == KEY_ENTER) - { - if (w_inputbuffer[i].len && - (chat_dest[i] == consoleplayer + 1 || - chat_dest[i] == HU_BROADCAST)) - { - HUlib_add_strings_to_cur_line(&w_message, - *player_names[i], - w_inputbuffer[i].line); - - has_message = true; // killough 12/98 - message_nottobefuckedwith = true; - message_on = true; - message_counter = chat_count; // killough 11/98 - S_StartSoundPitch(0, gamemode == commercial ? - sfx_radio : sfx_tink, PITCH_NONE); - } - HUlib_clear_line(&w_inputbuffer[i]); - } - } - players[i].cmd.chatchar = 0; - } - } - } -*/ - - // draw the automap widgets if automap is displayed - - if (title_counter) - { - title_counter--; - } - - if (automapactive) - { - HU_cond_build_widget(w_stats, hud_level_stats & HUD_WIDGET_AUTOMAP); - HU_cond_build_widget(&w_sttime, hud_level_time & HUD_WIDGET_AUTOMAP || plr->btuse_tics); - HU_cond_build_widget(&w_coord, STRICTMODE(hud_player_coords == HUD_WIDGET_AUTOMAP - || hud_player_coords >= HUD_WIDGET_ALWAYS)); - - title_on = true; - } - else - { - HU_cond_build_widget(w_stats, hud_level_stats & HUD_WIDGET_HUD); - HU_cond_build_widget(&w_sttime, hud_level_time & HUD_WIDGET_HUD || plr->btuse_tics); - HU_cond_build_widget(&w_coord, STRICTMODE(hud_player_coords >= HUD_WIDGET_HUD)); - - title_on = (title_counter > 0); - } - - HU_cond_build_widget(&w_fps, plr->cheats & CF_SHOWFPS); - HU_cond_build_widget(&w_rate, plr->cheats & CF_RENDERSTATS); - HU_cond_build_widget(&w_cmd, STRICTMODE(hud_command_history)); - HU_cond_build_widget(&w_speed, speedometer > 0); - - if (hud_displayed && - scaledviewheight == SCREENHEIGHT && - automap_off) - { - if (hud_type == HUD_TYPE_CRISPY) - { - } - else - { - HU_cond_build_widget(&w_weapon, true); - HU_cond_build_widget(&w_armor, true); - HU_cond_build_widget(&w_health, true); - HU_cond_build_widget(&w_ammo, true); - HU_cond_build_widget(&w_keys, true); - - HU_cond_build_widget(&w_compact, true); - } - } - - if (plr->btuse_tics) - plr->btuse_tics--; - - // update crosshair properties - if (hud_crosshair) - HU_UpdateCrosshair(); - - hud_pending = false; -} - -#define QUEUESIZE 128 - -static char chatchars[QUEUESIZE]; -static int head = 0; -static int tail = 0; - -// -// HU_queueChatChar() -// -// Add an incoming character to the circular chat queue -// -// Passed the character to queue, returns nothing -// -void HU_queueChatChar(char c) -{ - if (((head + 1) & (QUEUESIZE-1)) == tail) - displaymsg("%s", HUSTR_MSGU); - else - { - chatchars[head++] = c; - head &= QUEUESIZE-1; - } -} - -// -// HU_dequeueChatChar() -// -// Remove the earliest added character from the circular chat queue -// -// Passed nothing, returns the character dequeued -// -// char ST_DequeueChatChar(void) -// { -// char c; - -// if (head != tail) -// { -// c = chatchars[tail++]; -// tail &= QUEUESIZE-1; -// } -// else -// c = 0; -// return c; -// } - -// -// HU_Responder() -// -// Responds to input events that affect the heads up displays -// -// Passed the event to respond to, returns true if the event was handled -// - -boolean HU_Responder(event_t *ev) -{ -/* - static char lastmessage[HU_MAXLINELENGTH+1]; - const char *macromessage; - boolean eatkey = false; - static boolean shiftdown = false; - static boolean altdown = false; - int c; - int i; - int numplayers; - - static int num_nobrainers = 0; - - c = (ev->type == ev_keydown) ? ev->data1.i : 0; - - numplayers = 0; - for (i=0 ; idata1.i == KEY_RSHIFT) - { - shiftdown = ev->type == ev_keydown; - return false; - } - - if (ev->data1.i == KEY_RALT) - { - altdown = ev->type == ev_keydown; - return false; - } - - if (M_InputActivated(input_chat_backspace)) - { - bsdown = true; - bscounter = 0; - c = KEY_BACKSPACE; - } - else if (M_InputDeactivated(input_chat_backspace)) - { - bsdown = false; - bscounter = 0; - } - - if (ev->type == ev_keyup) - return false; - - if (!chat_on) - { - if (M_InputActivated(input_chat_enter)) // phares - { - //jff 2/26/98 toggle list of messages - - if (has_message) - { - message_counter = message_count; - message_on = true; - } - eatkey = true; - } //jff 2/26/98 no chat if message review is displayed - else // killough 10/02/98: no chat if demo playback - if (!demoplayback) - { - if (netgame && M_InputActivated(input_chat)) - { - eatkey = chat_on = true; - HUlib_clear_cur_line(&w_chat); - HU_queueChatChar(HU_BROADCAST); - }//jff 2/26/98 - else // killough 11/98: simplify - if (netgame && numplayers > 2) - for (i=0; i 9) - return false; - // fprintf(stderr, "got here\n"); - macromessage = chat_macros[c]; - - // kill last message with a '\n' - HU_queueChatChar(KEY_ENTER); // DEBUG!!! // phares - - // send the macro message - while (*macromessage) - HU_queueChatChar(*macromessage++); - HU_queueChatChar(KEY_ENTER); // phares - - // leave chat mode and notify that it was sent - chat_on = false; - strcpy(lastmessage, chat_macros[c]); - displaymsg("%s", lastmessage); - eatkey = true; - } - else - { - if (shiftdown || (c >= 'a' && c <= 'z')) - c = shiftxform[c]; - eatkey = HUlib_add_key_to_cur_line(&w_chat, c); - if (eatkey) - HU_queueChatChar(c); - - if (c == KEY_ENTER) // phares - { - chat_on = false; - if (w_chat.lines[0]->len) - { - strcpy(lastmessage, w_chat.lines[0]->line); - displaymsg("%s", lastmessage); - } - } - else - if (c == KEY_ESCAPE) // phares - chat_on = false; - } - } - return eatkey; -*/ - return false; -} - -// [FG] dynamic HUD alignment - -static const struct { - const char *name, *altname; - hu_multiline_t *const multiline; -} multiline_names[] = { - {"title", NULL, &w_title}, - {"message", NULL, &w_message}, -// [FG] TODO due to its variable width and the trailing cursor, -// the w_chat widget *must* currently remain left-aligned -// {"chat", NULL, &w_chat}, - {"secret", NULL, &w_secret}, - - {"ammo", NULL, &w_ammo}, - {"armor", NULL, &w_armor}, - {"health", NULL, &w_health}, - {"keys", NULL, &w_keys}, - {"weapon", "weapons", &w_weapon}, - - {"compact", NULL, &w_compact}, - - {"monsec", "stats", &w_monsec}, - {"sttime", "time", &w_sttime}, - {"coord", "coords", &w_coord}, - {"fps", NULL, &w_fps}, - {"rate", NULL, &w_rate}, - {"cmd", "commands", &w_cmd}, - {"speed", NULL, &w_speed}, - {NULL}, -}; - -static boolean HU_ReplaceInWidgets (hu_multiline_t *multiline, int hud, align_t h_align, align_t v_align, int x, int y) -{ - int i; - - if (hud < 0 || hud >= MAX_HUDS) - { - return false; - } - - for (i = 0; i < MAX_WIDGETS - 1; i++) - { - if (widgets[hud][i].multiline == NULL) - { - break; - } - - if (widgets[hud][i].multiline == multiline) - { - widgets[hud][i].h_align = h_align; - widgets[hud][i].v_align = v_align; - widgets[hud][i].x = x; - widgets[hud][i].y = y; - - // [FG] save original alignment - widgets[hud][i].h_align_orig = widgets[hud][i].h_align; - - return true; - } - } - - return false; -} - -static boolean HU_AppendToWidgets (hu_multiline_t *multiline, int hud, align_t h_align, align_t v_align, int x, int y) -{ - int i; - - if (hud < 0 || hud >= MAX_HUDS) - { - return false; - } - - for (i = 0; i < MAX_WIDGETS - 1; i++) - { - if (widgets[hud][i].multiline == NULL) - { - break; - } - } - - if (i + 1 >= MAX_WIDGETS) - { - return false; - } - - widgets[hud][i].multiline = multiline; - widgets[hud][i].h_align = h_align; - widgets[hud][i].v_align = v_align; - widgets[hud][i].x = x; - widgets[hud][i].y = y; - - // [FG] save original alignment - widgets[hud][i].h_align_orig = widgets[hud][i].h_align; - - widgets[hud][i + 1].multiline = NULL; - - return true; -} - -static boolean HU_AddToWidgets (hu_multiline_t *multiline, int hud, align_t h_align, align_t v_align, int x, int y) -{ - if (HU_ReplaceInWidgets(multiline, hud, h_align, v_align, x, y)) - { - return true; - } - else if (HU_AppendToWidgets(multiline, hud, h_align, v_align, x, y)) - { - return true; - } - - return false; -} - -static hu_multiline_t *HU_MultilineByName (const char *name) -{ - int i; - - for (i = 0; multiline_names[i].name; i++) - { - if (strcasecmp(name, multiline_names[i].name) == 0 || - (multiline_names[i].altname && strcasecmp(name, multiline_names[i].altname) == 0)) - { - return multiline_names[i].multiline; - } - } - - return NULL; -} - -static boolean HU_AddHUDCoords (char *name, int hud, int x, int y) -{ - hu_multiline_t *multiline = HU_MultilineByName(name); - - if (multiline == NULL) - { - return false; - } - - // [FG] relative alignment to the edges - if (x < 0) - { - x += SCREENWIDTH; - } - if (y < 0) - { - y += SCREENHEIGHT; - } - - if (x < 0 || x >= SCREENWIDTH || y < 0 || y >= SCREENHEIGHT) - { - return false; - } - - return HU_AddToWidgets(multiline, hud, align_direct, align_direct, x, y); -} - -static boolean HU_AddHUDAlignment (char *name, int hud, char *alignstr) -{ - hu_multiline_t *multiline = HU_MultilineByName(name); - - if (multiline == NULL) - { - return false; - } - - if (!strcasecmp(alignstr, "topleft") || !strcasecmp(alignstr, "upperleft")) - { - return HU_AddToWidgets(multiline, hud, align_left, align_top, 0, 0); - } - else if (!strcasecmp(alignstr, "topright") || !strcasecmp(alignstr, "upperright")) - { - return HU_AddToWidgets(multiline, hud, align_right, align_top, 0, 0); - } - else if (!strcasecmp(alignstr, "topcenter") || !strcasecmp(alignstr, "uppercenter")) - { - return HU_AddToWidgets(multiline, hud, align_center, align_top, 0, 0); - } - else if (!strcasecmp(alignstr, "bottomleft") || !strcasecmp(alignstr, "lowerleft")) - { - return HU_AddToWidgets(multiline, hud, align_left, align_bottom, 0, 0); - } - else if (!strcasecmp(alignstr, "bottomright") || !strcasecmp(alignstr, "lowerright")) - { - return HU_AddToWidgets(multiline, hud, align_right, align_bottom, 0, 0); - } - else if (!strcasecmp(alignstr, "bottomcenter")|| !strcasecmp(alignstr, "lowercenter")) - { - return HU_AddToWidgets(multiline, hud, align_center, align_bottom, 0, 0); - } - - return false; -} - -static void HU_ParseHUD (void) -{ - u_scanner_t *s; - int hud; - int lumpnum; - const char *data; - int length; - - // [FG] initialize HUDs with Vanilla Doom widgets - for (hud = 0; hud < MAX_HUDS; hud++) - { - HU_AddToWidgets(&w_title, hud, align_direct, align_bottom, 0, 0); - HU_AddToWidgets(&w_message, hud, align_direct, align_top, 0, 0); - HU_AddToWidgets(&w_chat, hud, align_direct, align_top, 0, 0); - HU_AddToWidgets(&w_secret , hud, align_center, align_secret, 0, 0); - } - - if ((lumpnum = W_CheckNumForName("WOOFHUD")) == -1) - { - return; - } - - data = W_CacheLumpNum(lumpnum, PU_CACHE); - length = W_LumpLength(lumpnum); - - s = U_ScanOpen(data, length, "WOOFHUD"); - - while (U_HasTokensLeft(s)) - { - char *name; - - if (!U_CheckToken(s, TK_Identifier)) - { - U_GetNextToken(s, true); - continue; - } - - if (!strcasecmp("HUD", s->string)) - { - U_MustGetInteger(s); - hud = s->number; - - if (hud < 0 || hud >= MAX_HUDS) - { - U_Error(s, "HUD (%d) must be between 0 and %d", hud, MAX_HUDS - 1); - } - - continue; - } - - name = M_StringDuplicate(s->string); - - if (U_CheckToken(s, TK_IntConst)) - { - int x, y; - - x = s->number; - U_MustGetInteger(s); - y = s->number; - - if (!HU_AddHUDCoords(name, hud, x, y)) - { - U_Error(s, "Cannot set coordinates for widget (%s)", name); - } - } - else - { - char *align; - - U_MustGetToken(s, TK_Identifier); - align = M_StringDuplicate(s->string); - - if (!HU_AddHUDAlignment(name, hud, align)) - { - U_Error(s, "Cannot set alignment for widget (%s)", name); - } - - free(align); - } - - free(name); - } - - U_ScanClose(s); -} - -void HU_BindHUDVariables(void) -{ - M_BindBool("hud_displayed", &hud_displayed, NULL, false, ss_none, wad_yes, - "Display HUD"); - M_BindNum("hud_active", &hud_active, NULL, 2, 0, 2, ss_stat, wad_yes, - "HUD layout (by default: 0 = Minimal; 1 = Compact; 2 = Distributed)"); - M_BindNum("hud_level_stats", &hud_level_stats, NULL, - HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, - ss_stat, wad_no, - "Show level stats (kills, items, and secrets) widget (1 = On automap; " - "2 = On HUD; 3 = Always)"); - M_BindNum("hud_level_time", &hud_level_time, NULL, - HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, - ss_stat, wad_no, - "Show level time widget (1 = On automap; 2 = On HUD; 3 = Always)"); - M_BindNum("hud_player_coords", &hud_player_coords, NULL, - HUD_WIDGET_AUTOMAP, HUD_WIDGET_OFF, HUD_WIDGET_ADVANCED, - ss_stat, wad_no, - "Show player coordinates widget (1 = On automap; 2 = On HUD; 3 = Always; 4 = Advanced)"); - M_BindBool("hud_command_history", &hud_command_history, NULL, false, ss_stat, - wad_no, "Show command history widget"); - BIND_NUM(hud_command_history_size, 10, 1, HU_MAXMESSAGES, - "Number of commands to display for command history widget"); - BIND_BOOL(hud_hide_empty_commands, true, - "Hide empty commands from command history widget"); - M_BindBool("hud_time_use", &hud_time_use, NULL, false, ss_stat, wad_no, - "Show split time when pressing the use-button"); - M_BindNum("hud_type", &hud_type, NULL, - HUD_TYPE_BOOM, HUD_TYPE_CRISPY, NUM_HUD_TYPES - 1, - ss_stat, wad_no, - "Fullscreen HUD type (0 = Crispy; 1 = Boom (No Bars); 2 = Boom)"); - M_BindBool("hud_backpack_thresholds", &hud_backpack_thresholds, NULL, - true, ss_stat, wad_no, "Backpack changes thresholds"); - M_BindBool("hud_armor_type", &hud_armor_type, NULL, false, ss_stat, wad_no, - "Armor count is colored based on armor type"); - M_BindBool("hud_widescreen_widgets", &hud_widescreen_widgets, NULL, - true, ss_stat, wad_no, "Arrange widgets on widescreen edges"); - M_BindNum("hud_widget_font", &hud_widget_font, NULL, - HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, - ss_stat, wad_no, - "Use standard Doom font for widgets (1 = On automap; 2 = On HUD; 3 " - "= Always)"); - M_BindBool("hud_widget_layout", &hud_widget_layout, NULL, - false, ss_stat, wad_no, "Widget layout (0 = Horizontal; 1 = Vertical)"); - M_BindNum("hud_crosshair", &hud_crosshair, NULL, 0, 0, 10 - 1, ss_stat, wad_no, - "Crosshair"); - M_BindBool("hud_crosshair_health", &hud_crosshair_health, NULL, - false, ss_stat, wad_no, "Change crosshair color based on player health"); - M_BindNum("hud_crosshair_target", &hud_crosshair_target, NULL, - 0, 0, 2, ss_stat, wad_no, - "Change crosshair color when locking on target (1 = Highlight; 2 = Health)"); - M_BindBool("hud_crosshair_lockon", &hud_crosshair_lockon, NULL, - false, ss_stat, wad_no, "Lock crosshair on target"); - M_BindNum("hud_crosshair_color", &hud_crosshair_color, NULL, - CR_GRAY, CR_BRICK, CR_NONE, ss_stat, wad_no, - "Default crosshair color"); - M_BindNum("hud_crosshair_target_color", &hud_crosshair_target_color, NULL, - CR_YELLOW, CR_BRICK, CR_NONE, ss_stat, wad_no, - "Crosshair color when aiming at target"); - - M_BindNum("hudcolor_titl", &hudcolor_titl, NULL, - CR_GOLD, CR_BRICK, CR_NONE, ss_none, wad_yes, - "Color range used for automap level title"); - M_BindNum("hudcolor_xyco", &hudcolor_xyco, NULL, - CR_GREEN, CR_BRICK, CR_NONE, ss_none, wad_yes, - "Color range used for automap coordinates"); - - BIND_BOOL(show_messages, true, "Show messages"); - M_BindBool("hud_secret_message", &hud_secret_message, NULL, - true, ss_stat, wad_no, "Announce revealed secrets"); - M_BindBool("hud_map_announce", &hud_map_announce, NULL, - false, ss_stat, wad_no, "Announce map titles"); - M_BindBool("show_toggle_messages", &show_toggle_messages, NULL, - true, ss_stat, wad_no, "Show toggle messages"); - M_BindBool("show_pickup_messages", &show_pickup_messages, NULL, - true, ss_stat, wad_no, "Show pickup messages"); - M_BindBool("show_obituary_messages", &show_obituary_messages, NULL, - true, ss_stat, wad_no, "Show obituaries"); - - M_BindNum("hudcolor_mesg", &hudcolor_mesg, NULL, CR_NONE, CR_BRICK, CR_NONE, - ss_none, wad_yes, "Color range used for messages during play"); - M_BindNum("hudcolor_chat", &hudcolor_chat, NULL, CR_GOLD, CR_BRICK, CR_NONE, - ss_none, wad_yes, "Color range used for chat messages and entry"); - BIND_NUM(hudcolor_obituary, CR_GRAY, CR_BRICK, CR_NONE, - "Color range used for obituaries"); - - BIND_NUM(message_timer, 4000, 0, UL, "Duration of normal Doom messages (ms)"); - BIND_NUM(chat_msg_timer, 4000, 0, UL, "Duration of chat messages (ms)"); - BIND_NUM(hud_msg_lines, 4, 1, HU_MAXMESSAGES, "Number of message lines for message list"); - M_BindBool("message_colorized", &message_colorized, NULL, - false, ss_stat, wad_no, "Colorize player messages"); - M_BindBool("message_centered", &message_centered, NULL, - false, ss_stat, wad_no, "Center messages horizontally"); - BIND_BOOL(message_list, false, "Use message list"); - -#define BIND_CHAT(num) \ - M_BindStr("chatmacro" #num, &chat_macros[(num)], HUSTR_CHATMACRO##num, \ - wad_yes, "Chat string associated with " #num " key") - - BIND_CHAT(0); - BIND_CHAT(1); - BIND_CHAT(2); - BIND_CHAT(3); - BIND_CHAT(4); - BIND_CHAT(5); - BIND_CHAT(6); - BIND_CHAT(7); - BIND_CHAT(8); - BIND_CHAT(9); -} - -//---------------------------------------------------------------------------- -// -// $Log: hu_stuff.c,v $ -// Revision 1.27 1998/05/10 19:03:41 jim -// formatted/documented hu_stuff -// -// Revision 1.26 1998/05/03 22:25:24 killough -// Provide minimal headers at top; nothing else -// -// Revision 1.25 1998/04/28 15:53:58 jim -// Fix message list bug in small screen mode -// -// Revision 1.24 1998/04/22 12:50:14 jim -// Fix lockout from dynamic message change -// -// Revision 1.23 1998/04/05 10:09:51 jim -// added STCFN096 lump -// -// Revision 1.22 1998/03/28 05:32:12 jim -// Text enabling changes for DEH -// -// Revision 1.19 1998/03/17 20:45:23 jim -// added frags to HUD -// -// Revision 1.18 1998/03/15 14:42:16 jim -// added green fist/chainsaw in HUD when berserk -// -// Revision 1.17 1998/03/10 07:07:15 jim -// Fixed display glitch in HUD cycle -// -// Revision 1.16 1998/03/09 11:01:48 jim -// fixed string overflow for DEH, added graphic keys -// -// Revision 1.15 1998/03/09 07:10:09 killough -// Use displayplayer instead of consoleplayer -// -// Revision 1.14 1998/03/05 00:57:37 jim -// Scattered HUD -// -// Revision 1.13 1998/03/04 11:50:48 jim -// Change automap coord display -// -// Revision 1.12 1998/02/26 22:58:26 jim -// Added message review display to HUD -// -// Revision 1.11 1998/02/23 14:20:51 jim -// Merged HUD stuff, fixed p_plats.c to support elevators again -// -// Revision 1.10 1998/02/23 04:26:07 killough -// really allow new hud stuff to be turned off COMPLETELY -// -// Revision 1.9 1998/02/22 12:51:26 jim -// HUD control on F5, z coord, spacing change -// -// Revision 1.7 1998/02/20 18:46:51 jim -// cleanup of HUD control -// -// Revision 1.6 1998/02/19 16:54:53 jim -// Optimized HUD and made more configurable -// -// Revision 1.5 1998/02/18 11:55:55 jim -// Fixed issues with HUD and reduced screen size -// -// Revision 1.3 1998/02/15 02:47:47 phares -// User-defined keys -// -// Revision 1.2 1998/01/26 19:23:22 phares -// First rev with no ^Ms -// -// Revision 1.1.1.1 1998/01/19 14:02:55 rand -// Lee's Jan 19 sources -// -//---------------------------------------------------------------------------- diff --git a/src/hu_stuff.h b/src/hu_stuff.h deleted file mode 100644 index 47238b0db..000000000 --- a/src/hu_stuff.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (C) 1999 by -// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman -// Copyright (C) 2023 Fabian Greffrath -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: Head up display -// -//----------------------------------------------------------------------------- - -#ifndef __HU_STUFF_H__ -#define __HU_STUFF_H__ - -#include "doomdef.h" -#include "doomtype.h" -#include "hu_command.h" - -struct event_s; -struct mobj_s; - -#define HU_BROADCAST 5 - -#define HU_MSGTIMEOUT (4*TICRATE) -#define HU_MSGTIMEOUT2 (5*TICRATE/2) // [crispy] 2.5 seconds - -// -// Heads up text -// -void HU_Init(void); -void HU_Start(void); -void HU_disable_all_widgets (void); -void HU_widget_rebuild_sttime(void); - -boolean HU_Responder(struct event_s *ev); - -void HU_Ticker(void); -void HU_Drawer(void); -void HU_Erase(void); - -boolean HU_DemoProgressBar(boolean force); - -void HU_ResetMessageColors(void); - -void WI_DrawWidgets(void); - -// killough 5/2/98: moved from m_misc.c: - -//jff 2/16/98 hud supported automap colors added -extern int hudcolor_titl; // color range of automap level title -extern int hudcolor_xyco; // color range of new coords on automap -//jff 2/23/98 hud is currently displayed -extern boolean hud_displayed; // hud is displayed -//jff 2/18/98 hud/status control -extern int hud_active; // hud mode 0=off, 1=small, 2=full -extern boolean hud_secret_message; // "A secret is revealed!" message -extern int hud_player_coords, hud_level_stats, hud_level_time; -extern boolean hud_widescreen_widgets; -extern boolean hud_time_use; -extern boolean show_messages; -extern boolean show_toggle_messages; -extern boolean show_pickup_messages; - -extern boolean chat_on; - -extern int playback_tic, playback_totaltics; - -extern char **player_names[]; - -enum -{ - HUD_TYPE_CRISPY, - HUD_TYPE_BOOM_NO_BARS, - HUD_TYPE_BOOM, - - NUM_HUD_TYPES -}; - -extern int hud_type; - -enum -{ - HUD_WIDGET_OFF, - HUD_WIDGET_AUTOMAP, - HUD_WIDGET_HUD, - HUD_WIDGET_ALWAYS, - HUD_WIDGET_ADVANCED, -}; - -void HU_BindHUDVariables(void); - -byte* HU_ColorByHealth(int health, int maxhealth, boolean invul); - -extern int speedometer; - -#endif - -//---------------------------------------------------------------------------- -// -// $Log: hu_stuff.h,v $ -// Revision 1.6 1998/05/10 19:03:50 jim -// formatted/documented hu_stuff -// -// Revision 1.5 1998/05/03 22:25:03 killough -// add external declarations for hud options -// -// Revision 1.4 1998/02/18 00:59:04 jim -// Addition of HUD -// -// Revision 1.3 1998/02/15 02:48:12 phares -// User-defined keys -// -// Revision 1.2 1998/01/26 19:26:54 phares -// First rev with no ^Ms -// -// Revision 1.1.1.1 1998/01/19 14:02:56 rand -// Lee's Jan 19 sources -// -// -//---------------------------------------------------------------------------- diff --git a/src/m_cheat.c b/src/m_cheat.c index 66f95a78f..5a6da64d6 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -30,7 +30,6 @@ #include "doomdef.h" #include "doomstat.h" #include "g_game.h" -#include "hu_stuff.h" #include "info.h" #include "m_cheat.h" #include "m_fixed.h" @@ -49,6 +48,7 @@ #include "r_state.h" #include "s_sound.h" #include "sounds.h" +#include "st_widgets.h" #include "tables.h" #include "u_mapinfo.h" #include "w_wad.h" @@ -611,10 +611,10 @@ static void cheat_clev0() int epsd, map; char *cur, *next; - cur = M_StringDuplicate(MAPNAME(gameepisode, gamemap)); + cur = M_StringDuplicate(MapName(gameepisode, gamemap)); G_GotoNextLevel(&epsd, &map); - next = MAPNAME(epsd, map); + next = MapName(epsd, map); if (W_CheckNumForName(next) != -1) displaymsg("Current: %s, Next: %s", cur, next); @@ -657,7 +657,7 @@ static void cheat_clev(char *buf) epsd = 1; } - next = MAPNAME(epsd, map); + next = MapName(epsd, map); if (W_CheckNumForName(next) == -1) { diff --git a/src/m_config.c b/src/m_config.c index a37866e77..d847cb4cb 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -34,7 +34,6 @@ #include "doomstat.h" #include "doomtype.h" #include "g_game.h" -#include "hu_stuff.h" #include "i_flickstick.h" #include "i_gamepad.h" #include "i_gyro.h" @@ -54,6 +53,7 @@ #include "mn_internal.h" #include "r_main.h" #include "st_stuff.h" +#include "st_widgets.h" #include "w_wad.h" #include "ws_stuff.h" #include "z_zone.h" @@ -136,7 +136,7 @@ void M_InitConfig(void) G_BindWeapVariables(); WS_BindVariables(); - HU_BindHUDVariables(); + ST_BindHUDVariables(); ST_BindSTSVariables(); AM_BindAutomapVariables(); diff --git a/src/m_json.c b/src/m_json.c index 64aafdc1b..eb1f33fa4 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -17,6 +17,7 @@ #include #include "doomtype.h" #include "i_printf.h" +#include "m_misc.h" #include "w_wad.h" #include "z_zone.h" @@ -178,7 +179,7 @@ const char *JS_GetStringValue(json_t *json, const char *string) json_t *obj = JS_GetObject(json, string); if (JS_IsString(obj)) { - return obj->valuestring; + return M_StringDuplicate(obj->valuestring); } return NULL; } diff --git a/src/mn_menu.c b/src/mn_menu.c index dc346ab0d..8864589f1 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -36,8 +36,6 @@ #include "doomtype.h" #include "dstrings.h" #include "g_game.h" -#include "hu_lib.h" -#include "hu_stuff.h" #include "i_input.h" #include "i_printf.h" #include "i_system.h" @@ -57,6 +55,9 @@ #include "r_main.h" #include "s_sound.h" #include "sounds.h" +#include "st_sbardef.h" +#include "st_stuff.h" +#include "st_widgets.h" #include "u_mapinfo.h" #include "v_fmt.h" #include "v_video.h" @@ -1111,7 +1112,7 @@ void MN_SetQuickSaveSlot(int slot) // [FG] generate a default save slot name when the user saves to an empty slot static void SetDefaultSaveName(int slot) { - char *maplump = MAPNAME(gameepisode, gamemap); + char *maplump = MapName(gameepisode, gamemap); int maplumpnum = W_CheckNumForName(maplump); if (gamemapinfo && U_CheckField(gamemapinfo->label)) diff --git a/src/mn_setup.c b/src/mn_setup.c index 9f2ca1e09..fe87a722c 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -13,6 +13,7 @@ // GNU General Public License for more details. // +#include "hu_command.h" #include "mn_internal.h" #include "am_map.h" @@ -23,8 +24,6 @@ #include "doomtype.h" #include "g_game.h" #include "hu_crosshair.h" -#include "hu_lib.h" -#include "hu_stuff.h" #include "i_gamepad.h" #include "i_gyro.h" #include "i_input.h" @@ -53,7 +52,10 @@ #include "r_sky.h" // [FG] R_InitSkyMap() #include "r_voxel.h" #include "s_sound.h" +#include "st_sbardef.h" +#include "st_stuff.h" #include "sounds.h" +#include "st_widgets.h" #include "v_fmt.h" #include "v_video.h" #include "w_wad.h" @@ -1813,8 +1815,6 @@ static setup_menu_t stat_settings1[] = { {"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"}}, - {"Backpack Shifts Ammo Color", S_ONOFF, H_X, M_SPC, {"hud_backpack_thresholds"}}, - {"Armor Color Matches Type", S_ONOFF, H_X, M_SPC, {"hud_armor_type"}}, {"Animated Health/Armor Count", S_ONOFF, H_X, M_SPC, {"hud_animated_counts"}}, @@ -1841,27 +1841,13 @@ static setup_menu_t stat_settings2[] = { .strings_id = str_show_widgets}, {"Show Player Coords", S_CHOICE | S_STRICT, H_X, M_SPC, - {"hud_player_coords"}, .strings_id = str_show_adv_widgets, - .action = HU_Start}, + {"hud_player_coords"}, .strings_id = str_show_adv_widgets}, {"Show Command History", S_ONOFF | S_STRICT, H_X, M_SPC, {"hud_command_history"}, .action = HU_ResetCommandHistory}, {"Use-Button Timer", S_ONOFF, H_X, M_SPC, {"hud_time_use"}}, - MI_GAP, - - {"Widget Appearance", S_SKIP | S_TITLE, H_X, M_SPC}, - - {"Use Doom Font", S_CHOICE, H_X, M_SPC, {"hud_widget_font"}, - .strings_id = str_show_widgets}, - - {"Widescreen Alignment", S_ONOFF, H_X, M_SPC, {"hud_widescreen_widgets"}, - .action = HU_Start}, - - {"Vertical Layout", S_ONOFF, H_X, M_SPC, {"hud_widget_layout"}, - .action = HU_Start}, - MI_END }; @@ -1903,9 +1889,8 @@ static setup_menu_t stat_settings4[] = { {"Show Toggle Messages", S_ONOFF, H_X, M_SPC, {"show_toggle_messages"}}, {"Show Pickup Messages", S_ONOFF, H_X, M_SPC, {"show_pickup_messages"}}, {"Show Obituaries", S_ONOFF, H_X, M_SPC, {"show_obituary_messages"}}, - {"Center Messages", S_ONOFF, H_X, M_SPC, {"message_centered"}}, {"Colorize Messages", S_ONOFF, H_X, M_SPC, {"message_colorized"}, - .action = HU_ResetMessageColors}, + .action = ST_ResetMessageColors}, MI_END }; @@ -4285,7 +4270,6 @@ boolean MN_SetupResponder(menu_action_t action, int ch) set_weapon_active = false; default_verify = false; // phares 4/19/98 print_warning_about_changes = false; // [FG] reset - HU_Start(); // catch any message changes // phares 4/19/98 M_StartSound(sfx_swtchx); return true; } diff --git a/src/p_mobj.c b/src/p_mobj.c index 345295d9f..b3b7b6514 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -25,7 +25,6 @@ #include "doomstat.h" #include "dsdhacked.h" #include "g_game.h" -#include "hu_stuff.h" #include "i_printf.h" #include "info.h" #include "m_random.h" @@ -1143,7 +1142,6 @@ void P_SpawnPlayer (mapthing_t* mthing) if (mthing->type-1 == consoleplayer) { ST_Start(); // wake up the status bar - HU_Start(); // wake up the heads up text } } diff --git a/src/p_setup.c b/src/p_setup.c index 32210116b..1ad3873db 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1604,7 +1604,7 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill) // W_Reload (); killough 1/31/98: W_Reload obsolete // find map name - strcpy(lumpname, MAPNAME(episode, map)); + strcpy(lumpname, MapName(episode, map)); lumpnum = W_GetNumForName(lumpname); diff --git a/src/p_spec.c b/src/p_spec.c index 70f6317ec..4254b1ac4 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -35,7 +35,6 @@ #include "doomstat.h" #include "g_game.h" #include "hu_obituary.h" -#include "hu_stuff.h" #include "i_system.h" #include "info.h" #include "m_argv.h" @@ -61,6 +60,7 @@ #include "s_sound.h" #include "sounds.h" #include "st_stuff.h" +#include "st_widgets.h" #include "tables.h" #include "w_wad.h" #include "z_zone.h" diff --git a/src/p_user.c b/src/p_user.c index 9f871e953..ad99a6d41 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -22,14 +22,12 @@ #include #include "d_event.h" -#include "d_items.h" #include "d_player.h" #include "d_ticcmd.h" #include "doomdef.h" #include "doomstat.h" #include "doomtype.h" #include "g_game.h" -#include "hu_stuff.h" #include "info.h" #include "m_cheat.h" #include "p_map.h" @@ -40,6 +38,7 @@ #include "r_defs.h" #include "r_main.h" #include "st_stuff.h" +#include "st_widgets.h" static fixed_t PlayerSlope(player_t *player) { diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 91a9d7a05..777199b64 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -49,7 +49,7 @@ static boolean ParseSbarFrame(json_t *json, sbarframe_t *out) { return false; } - out->patch_name = JS_GetString(lump); + out->patch_name = M_StringDuplicate(JS_GetString(lump)); json_t *duration = JS_GetObject(json, "duration"); if (!JS_IsNumber(duration)) @@ -116,7 +116,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - graphic->patch_name = JS_GetString(patch); + graphic->patch_name = M_StringDuplicate(JS_GetString(patch)); out->pointer.graphic = graphic; } break; @@ -147,7 +147,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - number->font_name = JS_GetString(font); + number->font_name = M_StringDuplicate(JS_GetString(font)); json_t *type = JS_GetObject(json, "type"); json_t *param = JS_GetObject(json, "param"); @@ -173,7 +173,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, { return false; } - widget->font_name = JS_GetString(font); + widget->font_name = M_StringDuplicate(JS_GetString(font)); json_t *type = JS_GetObject(json, "type"); if (!JS_IsNumber(type)) @@ -244,8 +244,8 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) { return false; } - out->name = JS_GetString(name); - out->stem = JS_GetString(stem); + out->name = M_StringDuplicate(JS_GetString(name)); + out->stem = M_StringDuplicate(JS_GetString(stem)); json_t *type = JS_GetObject(json, "type"); if (!JS_IsNumber(type)) @@ -346,8 +346,8 @@ static boolean ParseHUDFont(json_t *json, hudfont_t *out) { return false; } - out->name = JS_GetString(name); - out->stem = JS_GetString(stem); + out->name = M_StringDuplicate(JS_GetString(name)); + out->stem = M_StringDuplicate(JS_GetString(stem)); json_t *type = JS_GetObject(json, "type"); if (!JS_IsNumber(type)) @@ -359,78 +359,7 @@ static boolean ParseHUDFont(json_t *json, hudfont_t *out) return true; } -static sbarelem_t default_widgets[] = { - { - .type = sbe_widget, - .x_pos = 0, - .y_pos = 0, - .alignment = sbe_wide_left, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_message, - .font_name = "ConFont", - .duration = 4 * TICRATE - }, - .cr = CR_NONE, - .crboom = CR_NONE - }, - { - .type = sbe_widget, - .x_pos = 0, - .y_pos = 12, - .alignment = sbe_wide_left, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_chat, - .font_name = "ConFont" - }, - .cr = CR_GOLD, - .crboom = CR_NONE - }, - { - .type = sbe_widget, - .x_pos = 160, - .y_pos = 52, - .alignment = sbe_h_middle, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_secret, - .font_name = "ConFont", - .duration = 2.5 * TICRATE - }, - .cr = CR_GOLD, - .crboom = CR_NONE - }, - { - .type = sbe_widget, - .x_pos = 0, - .y_pos = 160, - .alignment = sbe_wide_left, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_monsec, - .font_name = "SmallFont" - }, - .cr = CR_NONE, - .crboom = CR_NONE - }, - { - .type = sbe_widget, - .x_pos = 0, - .y_pos = 153, - .alignment = sbe_wide_left, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_time, - .font_name = "SmallFont" - }, - .cr = CR_NONE, - .crboom = CR_NONE - } -}; - -static boolean ParseStatusBar(json_t *json, statusbar_t *out, - boolean load_defaults) +static boolean ParseStatusBar(json_t *json, statusbar_t *out) { json_t *height = JS_GetObject(json, "height"); json_t *fullscreenrender = JS_GetObject(json, "fullscreenrender"); @@ -454,32 +383,9 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out, } } - if (load_defaults) - { - for (int i = 0; i < arrlen(default_widgets); ++i) - { - sbarelem_t elem = default_widgets[i]; - elem.y_pos += (out->height - 200); - array_push(out->children, elem); - } - } - return true; } -static hudfont_t default_hudfonts[] = { - { - .name = "ConFont", - .type = sbf_proportional, - .stem = "STCFN" - }, - { - .name = "SmallFont", - .type = sbf_mono0, - .stem = "DIG" - } -}; - sbardef_t *ST_ParseSbarDef(void) { json_t *json = JS_Open("SBARDEF", "statusbar", (version_t){1, 1, 0}); @@ -531,26 +437,63 @@ sbardef_t *ST_ParseSbarDef(void) } } - if (load_defaults) - { - for (int i = 0; i < arrlen(default_hudfonts); ++i) - { - LoadHUDFont(&default_hudfonts[i]); - array_push(out->hudfonts, default_hudfonts[i]); - } - } - json_t *js_statusbars = JS_GetObject(data, "statusbars"); json_t *js_statusbar = NULL; JS_ArrayForEach(js_statusbar, js_statusbars) { statusbar_t statusbar = {0}; - if (ParseStatusBar(js_statusbar, &statusbar, load_defaults)) + if (ParseStatusBar(js_statusbar, &statusbar)) { array_push(out->statusbars, statusbar); } } + JS_Close(json); + + if (!load_defaults) + { + return out; + } + + json = JS_Open("SBHUDDEF", "hud", (version_t){1, 0, 0}); + if (json == NULL) + { + return NULL; + } + + data = JS_GetObject(json, "data"); + + js_hudfonts = JS_GetObject(data, "hudfonts"); + js_hudfont = NULL; + JS_ArrayForEach(js_hudfont, js_hudfonts) + { + hudfont_t hudfont = {0}; + if (ParseHUDFont(js_hudfont, &hudfont)) + { + LoadHUDFont(&hudfont); + array_push(out->hudfonts, hudfont); + } + } + + statusbar_t *statusbar; + array_foreach(statusbar, out->statusbars) + { + json_t *js_widgets = JS_GetObject(data, "widgets"); + json_t *js_widget = NULL; + + JS_ArrayForEach(js_widget, js_widgets) + { + sbarelem_t elem = {0}; + if (ParseSbarElem(js_widget, &elem)) + { + elem.y_pos += (statusbar->height - 200); + array_push(statusbar->children, elem); + } + } + } + + JS_Close(json); + return out; } diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 8285376f4..082733a1f 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -48,6 +48,10 @@ typedef enum sbc_modeeequal, sbc_modenotequal, sbc_hudmodeequal, + + // Woof! + sbc_mode, + sbc_max, } sbarconditiontype_t; @@ -57,6 +61,14 @@ typedef struct int param; } sbarcondition_t; +typedef enum +{ + sbc_mode_none, + sbc_mode_automap = 0x01, + sbc_mode_overlay = 0x02, + sbc_mode_hud = 0x04, +} sbc_mode_t; + typedef enum { sbn_none = -1, @@ -102,6 +114,7 @@ typedef enum sbw_message, sbw_secret, sbw_chat, + sbw_title, } sbarwidgettype_t; typedef enum @@ -157,6 +170,7 @@ typedef struct int value; int numvalues; int oldvalue; + int xoffset; } sbe_number_t; typedef struct @@ -166,13 +180,19 @@ typedef struct int oldhealth; } sbe_face_t; +typedef struct +{ + const char *string; + int totalwidth; + int xoffset; +} widgetline_t; + typedef struct sbe_widget_s { sbarwidgettype_t type; const char *font_name; hudfont_t *font; - const char *string; - int totalwidth; + widgetline_t *lines; // message int duration; @@ -191,7 +211,6 @@ struct sbarelem_s crange_idx_e cr; crange_idx_e crboom; - int xoffset; union { diff --git a/src/st_stuff.c b/src/st_stuff.c index 505fe6fdd..2131bc572 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -29,6 +29,8 @@ #include "doomdef.h" #include "doomstat.h" #include "doomtype.h" +#include "hu_command.h" +#include "hu_obituary.h" #include "i_video.h" #include "info.h" #include "m_array.h" @@ -39,6 +41,7 @@ #include "m_swap.h" #include "p_mobj.h" #include "p_user.h" +#include "hu_crosshair.h" #include "r_data.h" #include "r_defs.h" #include "r_draw.h" @@ -335,6 +338,25 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) result &= (!!cond->param == false); break; + case sbc_mode: + { + int enabled = 0; + if (cond->param & sbc_mode_overlay) + { + enabled |= (automapactive && automapoverlay); + } + else if (cond->param & sbc_mode_automap) + { + enabled |= (automapactive && !automapoverlay); + } + if (cond->param & sbc_mode_hud) + { + enabled |= !automapactive; + } + result &= (enabled > 0); + } + break; + case sbc_none: default: result = false; @@ -692,14 +714,14 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) } } - elem->xoffset = 0; + number->xoffset = 0; if (elem->alignment & sbe_h_middle) { - elem->xoffset -= (totalwidth >> 1); + number->xoffset -= (totalwidth >> 1); } else if (elem->alignment & sbe_h_right) { - elem->xoffset -= totalwidth; + number->xoffset -= totalwidth; } number->font = font; @@ -707,12 +729,10 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) number->numvalues = numvalues; } -static void UpdateString(sbarelem_t *elem) +static void UpdateLines(sbarelem_t *elem) { sbe_widget_t *widget = elem->pointer.widget; - int numglyphs = 0; - hudfont_t *font = widget->font; if (font == NULL) { @@ -725,43 +745,56 @@ static void UpdateString(sbarelem_t *elem) } } - numglyphs = strlen(widget->string); - - int totalwidth = font->monowidth * numglyphs; - if (font->type == sbf_proportional) + widgetline_t *line; + array_foreach(line, widget->lines) { - totalwidth = 0; - for (int i = 0; i < numglyphs; ++i) + int totalwidth = 0; + + const char *str = line->string; + while (*str) { - int ch = widget->string[i]; - ch = M_ToUpper(ch) - HU_FONTSTART; - if (ch < 0 || ch > HU_FONTSIZE) + int ch = *str++; + if (ch == '\x1b' && str) { - totalwidth += SPACEWIDTH; + ++str; continue; } - patch_t *patch = font->characters[ch]; - if (patch == NULL) + + if (font->type == sbf_proportional) { - totalwidth += SPACEWIDTH; - continue; + ch = M_ToUpper(ch) - HU_FONTSTART; + if (ch < 0 || ch > HU_FONTSIZE) + { + totalwidth += SPACEWIDTH; + continue; + } + patch_t *patch = font->characters[ch]; + if (patch == NULL) + { + totalwidth += SPACEWIDTH; + continue; + } + totalwidth += SHORT(patch->width); + } + else + { + totalwidth += font->monowidth; } - totalwidth += SHORT(patch->width); } - } - elem->xoffset = 0; - if (elem->alignment & sbe_h_middle) - { - elem->xoffset -= (totalwidth >> 1); - } - else if (elem->alignment & sbe_h_right) - { - elem->xoffset -= totalwidth; + line->xoffset = 0; + if (elem->alignment & sbe_h_middle) + { + line->xoffset -= (totalwidth >> 1); + } + else if (elem->alignment & sbe_h_right) + { + line->xoffset -= totalwidth; + } + line->totalwidth = totalwidth; } widget->font = font; - widget->totalwidth = totalwidth; } static void UpdateAnimation(sbarelem_t *elem) @@ -857,7 +890,7 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) int ammo = player->ammo[type]; // backpack changes thresholds - if (player->backpack && !hud_backpack_thresholds) + if (player->backpack) { maxammo /= 2; } @@ -880,38 +913,6 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) elem->crboom = cr; } -static void UpdateWidget(sbarelem_t *elem, player_t *player) -{ - sbe_widget_t *widget = elem->pointer.widget; - - switch (widget->type) - { - case sbw_message: - UpdateMessage(widget, player); - break; - case sbw_chat: - UpdateChat(widget); - break; - case sbw_secret: - UpdateSecretMessage(widget, player); - break; - case sbw_monsec: - UpdateMonSec(widget); - break; - case sbw_time: - UpdateStTime(widget, player); - break; - case sbw_coord: - case sbw_fps: - case sbw_speed: - break; - default: - break; - } - - UpdateString(elem); -} - static void UpdateElem(sbarelem_t *elem, player_t *player) { switch (elem->type) @@ -931,7 +932,8 @@ static void UpdateElem(sbarelem_t *elem, player_t *player) break; case sbe_widget: - UpdateWidget(elem, player); + ST_UpdateWidget(elem, player); + UpdateLines(elem); break; default: @@ -1018,6 +1020,8 @@ static void ResetStatusBar(void) ResetElem(child); } } + + ST_ResetTitle(); } static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, @@ -1064,48 +1068,98 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, V_DrawPatchTranslated(x, y, patch, colrngs[cr]); } -static void DrawGlyph(int x, int y, sbarelem_t *elem, fonttype_t fonttype, - int monowidth, patch_t *glyph) +static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) { + sbe_number_t *number = elem->pointer.number; + numberfont_t *font = number->font; + int width, widthdiff; - if (fonttype == sbf_proportional) + if (font->type == sbf_proportional) { width = glyph ? SHORT(glyph->width) : SPACEWIDTH; widthdiff = 0; } else { - width = monowidth; + width = font->monowidth; widthdiff = glyph ? SHORT(glyph->width) - width : SPACEWIDTH - width; } if (elem->alignment & sbe_h_middle) { - elem->xoffset += ((width + widthdiff) >> 1); + number->xoffset += ((width + widthdiff) >> 1); } else if (elem->alignment & sbe_h_right) { - elem->xoffset += (width + widthdiff); + number->xoffset += (width + widthdiff); } if (glyph) { - DrawPatch(x + elem->xoffset, y, elem->alignment, glyph, + DrawPatch(x + number->xoffset, y, elem->alignment, glyph, elem->crboom == CR_NONE ? elem->cr : elem->crboom); } if (elem->alignment & sbe_h_middle) { - elem->xoffset += (width - ((width - widthdiff) >> 1)); + number->xoffset += (width - ((width - widthdiff) >> 1)); } else if (elem->alignment & sbe_h_right) { - elem->xoffset += -widthdiff; + number->xoffset += -widthdiff; } else { - elem->xoffset += width; + number->xoffset += width; + } +} + +static void DrawGlyphLine(int x, int y, sbarelem_t *elem, widgetline_t *line, + patch_t *glyph) +{ + sbe_widget_t *widget = elem->pointer.widget; + hudfont_t *font = widget->font; + + int width, widthdiff; + + if (font->type == sbf_proportional) + { + width = glyph ? SHORT(glyph->width) : SPACEWIDTH; + widthdiff = 0; + } + else + { + width = font->monowidth; + widthdiff = glyph ? SHORT(glyph->width) - width : 0; + } + + if (elem->alignment & sbe_h_middle) + { + line->xoffset += ((width + widthdiff) >> 1); + } + else if (elem->alignment & sbe_h_right) + { + line->xoffset += (width + widthdiff); + } + + if (glyph) + { + DrawPatch(x + line->xoffset, y, elem->alignment, glyph, + elem->crboom == CR_NONE ? elem->cr : elem->crboom); + } + + if (elem->alignment & sbe_h_middle) + { + line->xoffset += (width - ((width - widthdiff) >> 1)); + } + else if (elem->alignment & sbe_h_right) + { + line->xoffset += -widthdiff; + } + else + { + line->xoffset += width; } } @@ -1114,12 +1168,12 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) sbe_number_t *number = elem->pointer.number; int value = number->value; - int base_xoffset = elem->xoffset; + int base_xoffset = number->xoffset; numberfont_t *font = number->font; if (value < 0 && font->minus != NULL) { - DrawGlyph(x, y, elem, font->type, font->monowidth, font->minus); + DrawGlyphNumber(x, y, elem, font->minus); value = -value; } @@ -1128,7 +1182,7 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) { int glyphbase = (int)pow(10.0, --glyphindex); int workingnum = value / glyphbase; - DrawGlyph(x, y, elem, font->type, font->monowidth, font->numbers[workingnum]); + DrawGlyphNumber(x, y, elem, font->numbers[workingnum]); value -= (workingnum * glyphbase); } @@ -1139,53 +1193,70 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) { elem->crboom = CR_GRAY; } - DrawGlyph(x, y, elem, font->type, font->monowidth, font->percent); + DrawGlyphNumber(x, y, elem, font->percent); elem->crboom = oldcr; } - elem->xoffset = base_xoffset; + number->xoffset = base_xoffset; } -static void DrawString(int x, int y, sbarelem_t *elem) +static void DrawLines(int x, int y, sbarelem_t *elem) { sbe_widget_t *widget = elem->pointer.widget; - int base_xoffset = elem->xoffset; - hudfont_t *font = widget->font; + int cr = elem->cr; - const char *str = widget->string; - while (*str) + widgetline_t *line; + array_foreach(line, widget->lines) { - int ch = *str++; - if (ch == '\x1b') + int base_xoffset = line->xoffset; + hudfont_t *font = widget->font; + + const char *str = line->string; + while (*str) { - if (str) + int ch = *str++; + + if (ch == '\x1b' && str) { ch = *str++; if (ch >= '0' && ch <= '0' + CR_NONE) { elem->cr = ch - '0'; } + else if (ch == '0' + CR_ORIG) + { + elem->cr = cr; + } continue; } - } - ch = M_ToUpper(ch) - HU_FONTSTART; + ch = M_ToUpper(ch) - HU_FONTSTART; - patch_t *glyph; - if (ch < 0 || ch > HU_FONTSIZE) + patch_t *glyph; + if (ch < 0 || ch > HU_FONTSIZE) + { + glyph = NULL; + } + else + { + glyph = font->characters[ch]; + } + DrawGlyphLine(x, y, elem, line, glyph); + } + + if (elem->alignment & sbe_v_bottom) { - glyph = NULL; + y -= font->maxheight; } else { - glyph = font->characters[ch]; + y += font->maxheight; } - DrawGlyph(x, y, elem, font->type, font->monowidth, glyph); - } - elem->xoffset = base_xoffset; + line->xoffset = base_xoffset; + } } static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) @@ -1229,7 +1300,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) break; case sbe_widget: - DrawString(x, y, elem); + DrawLines(x, y, elem); break; default: @@ -1322,8 +1393,19 @@ static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) if (elem->type == sbe_widget) { - hudfont_t *font = elem->pointer.widget->font; - int height = font->maxheight; + sbe_widget_t *widget = elem->pointer.widget; + hudfont_t *font = widget->font; + + int height = 0; + widgetline_t *line; + array_foreach(line, widget->lines) + { + if (elem->alignment & sbe_v_bottom) + { + y -= font->maxheight; + } + height += font->maxheight; + } if (y > scaledviewy && y < scaledviewy + scaledviewheight - height) { @@ -1425,7 +1507,7 @@ boolean ST_Responder(event_t *ev) { return false; } - else if (MessagesResponder(ev)) + else if (ST_MessagesResponder(ev)) { return true; } @@ -1592,13 +1674,18 @@ void ST_Ticker(void) // check for incoming chat characters if (netgame) { - UpdateChatMessage(); + ST_UpdateChatMessage(); } player_t *player = &players[displayplayer]; UpdateStatusBar(player); + if (hud_crosshair) + { + HU_UpdateCrosshair(); + } + if (!nodrawers) { DoPaletteStuff(player); // Do red-/gold-shifts from damage/items @@ -1611,7 +1698,13 @@ void ST_Drawer(void) { return; } + DrawStatusBar(); + + if (hud_crosshair) + { + HU_DrawCrosshair(); + } } void ST_Start(void) @@ -1620,16 +1713,41 @@ void ST_Start(void) { return; } + ResetStatusBar(); + + if (hud_crosshair) + { + HU_StartCrosshair(); + } } +patch_t **hu_font; + void ST_Init(void) { sbardef = ST_ParseSbarDef(); + if (sbardef) { LoadFacePatches(); } + + hudfont_t *hudfont; + array_foreach(hudfont, sbardef->hudfonts) + { + if (!strcmp(hudfont->name, "Console")) + { + hu_font = hudfont->characters; + break; + } + } + + HU_InitCrosshair(); + HU_InitCommandHistory(); + HU_InitObituaries(); + + ST_InitWidgets(); } void ST_InitRes(void) @@ -1645,6 +1763,38 @@ void ST_ResetPalette(void) I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE)); } +static sbarelem_t st_time_elem = +{ + .type = sbe_widget, + .alignment = sbe_wide_left, + .pointer.widget = &(sbe_widget_t) + { + .type = sbw_time, + .font_name = "Digits" + }, + .cr = CR_NONE, + .crboom = CR_NONE +}; + +// [FG] draw Time widget on intermission screen +void WI_DrawWidgets(void) +{ + if (!sbardef) + { + return; + } + + player_t *player = &players[displayplayer]; + + if (hud_level_time & HUD_WIDGET_HUD) + { + // leveltime is already added to totalleveltimes before WI_Start() + ST_UpdateWidget(&st_time_elem, player); + UpdateLines(&st_time_elem); + DrawLines(0, 0, &st_time_elem); + } +} + void ST_BindSTSVariables(void) { M_BindNum("st_layout", &st_layout, NULL, st_wide, st_original, st_wide, @@ -1654,9 +1804,6 @@ void ST_BindSTSVariables(void) M_BindBool("sts_pct_always_gray", &sts_pct_always_gray, NULL, false, ss_stat, wad_yes, "Percent signs on the status bar are always gray"); - M_BindBool("sts_traditional_keys", &sts_traditional_keys, NULL, - false, ss_stat, wad_yes, - "Show last picked-up key on each key slot on the status bar"); M_BindBool("hud_blink_keys", &hud_blink_keys, NULL, false, ss_stat, wad_no, "Make missing keys blink when trying to trigger linedef actions"); @@ -1665,6 +1812,8 @@ void ST_BindSTSVariables(void) "Use solid-color borders for the status bar in widescreen mode"); M_BindBool("hud_animated_counts", &hud_animated_counts, NULL, false, ss_stat, wad_no, "Animated health/armor counts"); + M_BindBool("hud_armor_type", &hud_armor_type, NULL, false, ss_stat, wad_no, + "Armor count is colored based on armor type"); M_BindNum("health_red", &health_red, NULL, 25, 0, 200, ss_none, wad_yes, "Amount of health for red-to-yellow transition"); M_BindNum("health_yellow", &health_yellow, NULL, 50, 0, 200, ss_none, wad_yes, @@ -1681,6 +1830,22 @@ void ST_BindSTSVariables(void) "Percent of ammo for red-to-yellow transition"); M_BindNum("ammo_yellow", &ammo_yellow, NULL, 50, 0, 100, ss_none, wad_yes, "Percent of ammo for yellow-to-green transition"); + + M_BindNum("hud_crosshair", &hud_crosshair, NULL, 0, 0, 10 - 1, ss_stat, wad_no, + "Crosshair"); + M_BindBool("hud_crosshair_health", &hud_crosshair_health, NULL, + false, ss_stat, wad_no, "Change crosshair color based on player health"); + M_BindNum("hud_crosshair_target", &hud_crosshair_target, NULL, + 0, 0, 2, ss_stat, wad_no, + "Change crosshair color when locking on target (1 = Highlight; 2 = Health)"); + M_BindBool("hud_crosshair_lockon", &hud_crosshair_lockon, NULL, + false, ss_stat, wad_no, "Lock crosshair on target"); + M_BindNum("hud_crosshair_color", &hud_crosshair_color, NULL, + CR_GRAY, CR_BRICK, CR_NONE, ss_stat, wad_no, + "Default crosshair color"); + M_BindNum("hud_crosshair_target_color", &hud_crosshair_target_color, NULL, + CR_YELLOW, CR_BRICK, CR_NONE, ss_stat, wad_no, + "Crosshair color when aiming at target"); } //---------------------------------------------------------------------------- diff --git a/src/st_stuff.h b/src/st_stuff.h index 3cd9ef862..d42712fcd 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -27,6 +27,7 @@ struct event_s; struct player_s; +struct patch_s; // Size of statusbar. // Now sensitive for scaling. @@ -84,6 +85,10 @@ extern boolean hud_armor_type; // color of armor depends on type extern boolean palette_changes; +extern struct patch_s **hu_font; + +void WI_DrawWidgets(void); + void ST_BindSTSVariables(void); #endif diff --git a/src/st_widgets.c b/src/st_widgets.c index 1fccdd734..5cd9ddec2 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -11,42 +11,82 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +#include "st_widgets.h" + +#include + #include "dstrings.h" #include "d_event.h" +#include "d_deh.h" #include "d_player.h" #include "doomdef.h" #include "doomkeys.h" #include "doomstat.h" #include "doomtype.h" -#include "hu_stuff.h" +#include "hu_command.h" +#include "hu_coordinates.h" +#include "hu_obituary.h" +#include "i_video.h" +#include "m_array.h" +#include "m_config.h" #include "m_input.h" #include "m_misc.h" +#include "p_mobj.h" +#include "r_main.h" +#include "r_voxel.h" #include "s_sound.h" #include "sounds.h" #include "st_sbardef.h" #include "i_timer.h" #include "v_video.h" +#include "u_mapinfo.h" + +boolean show_messages; +boolean show_toggle_messages; +boolean show_pickup_messages; -#define GRAY_S "\x1b\x32" -#define GREEN_S "\x1b\x33" -#define BROWN_S "\x1b\x34" -#define GOLD_S "\x1b\x35" -#define RED_S "\x1b\x36" -#define BLUE_S "\x1b\x37" +boolean hud_secret_message; // "A secret is revealed!" message +widgetstate_t hud_level_stats; +widgetstate_t hud_level_time; +boolean hud_time_use; -#define HU_MAXLINELENGTH 120 +static widgetstate_t hud_player_coords; +static boolean hud_map_announce; +static boolean message_colorized; + +//jff 2/16/98 hud supported automap colors added +int hudcolor_titl; // color range of automap level title +int hudcolor_xyco; // color range of new coords on automap boolean chat_on; +void ST_ClearLines(sbe_widget_t *widget) +{ + array_clear(widget->lines); +} + +void ST_AddLine(sbe_widget_t *widget, const char *string) +{ + widgetline_t line = { .string = string }; + array_push(widget->lines, line); +} + +static void SetLine(sbe_widget_t *widget, const char *string) +{ + array_clear(widget->lines); + widgetline_t line = { .string = string }; + array_push(widget->lines, line); +} + static char message_string[HU_MAXLINELENGTH]; static boolean message_review; -void UpdateMessage(sbe_widget_t *widget, player_t *player) +static void UpdateMessage(sbe_widget_t *widget, player_t *player) { static char string[120]; static int duration_left; - static boolean overwritable = true; + static boolean overwrite = true; static boolean messages_enabled = true; if (messages_enabled) @@ -56,9 +96,9 @@ void UpdateMessage(sbe_widget_t *widget, player_t *player) duration_left = widget->duration; M_StringCopy(string, message_string, sizeof(string)); message_string[0] = '\0'; - overwritable = false; + overwrite = false; } - else if (player->message && player->message[0] && overwritable) + else if (player->message && player->message[0] && overwrite) { duration_left = widget->duration; M_StringCopy(string, player->message, sizeof(string)); @@ -78,18 +118,25 @@ void UpdateMessage(sbe_widget_t *widget, player_t *player) if (duration_left == 0) { - widget->string = ""; - overwritable = true; + ST_ClearLines(widget); + overwrite = true; } else { - widget->string = string; + SetLine(widget, string); --duration_left; } } -void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) +static void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) { + ST_ClearLines(widget); + + if (!hud_secret_message) + { + return; + } + static char string[80]; static int duration_left; @@ -100,16 +147,11 @@ void UpdateSecretMessage(sbe_widget_t *widget, player_t *player) player->secretmessage = NULL; } - if (duration_left == 0) - { - string[0] = '\0'; - } - else + if (duration_left > 0) { + ST_AddLine(widget, string); --duration_left; } - - widget->string = string; } // key tables @@ -172,7 +214,7 @@ static void ClearChatLine(chatline_t *line) line->string[0] = '\0'; } -static boolean AddKeyToLine(chatline_t *line, char ch) +static boolean AddKeyToChatLine(chatline_t *line, char ch) { if (ch >= ' ' && ch <= '_') { @@ -202,7 +244,17 @@ static boolean AddKeyToLine(chatline_t *line, char ch) return true; // ate the key } -void UpdateChatMessage(void) +#define HU_BROADCAST 5 + +char **player_names[] = +{ + &s_HUSTR_PLRGREEN, + &s_HUSTR_PLRINDIGO, + &s_HUSTR_PLRBROWN, + &s_HUSTR_PLRRED +}; + +void ST_UpdateChatMessage(void) { static char chat_dest[MAXPLAYERS]; @@ -227,7 +279,7 @@ void UpdateChatMessage(void) ch = (char)shiftxform[(unsigned char)ch]; } - if (AddKeyToLine(&lines[p], ch) && ch == KEY_ENTER) + if (AddKeyToChatLine(&lines[p], ch) && ch == KEY_ENTER) { if (lines[p].pos && (chat_dest[p] == consoleplayer + 1 || chat_dest[p] == HU_BROADCAST)) @@ -268,7 +320,7 @@ static int tail = 0; // Passed the character to queue, returns nothing // -static void QueueChatChar(char c) +static void QueueChatChar(char ch) { if (((head + 1) & (QUEUESIZE - 1)) == tail) { @@ -276,7 +328,7 @@ static void QueueChatChar(char c) } else { - chatchars[head++] = c; + chatchars[head++] = ch; head &= QUEUESIZE - 1; } } @@ -308,7 +360,7 @@ char ST_DequeueChatChar(void) static chatline_t chatline; -boolean MessagesResponder(event_t *ev) +boolean ST_MessagesResponder(event_t *ev) { static char lastmessage[HU_MAXLINELENGTH + 1]; @@ -429,7 +481,7 @@ boolean MessagesResponder(event_t *ev) { ch = shiftxform[ch]; } - eatkey = AddKeyToLine(&chatline, ch); + eatkey = AddKeyToChatLine(&chatline, ch); if (eatkey) { QueueChatChar(ch); @@ -454,7 +506,7 @@ boolean MessagesResponder(event_t *ev) return eatkey; } -void UpdateChat(sbe_widget_t *widget) +static void UpdateChat(sbe_widget_t *widget) { static char string[HU_MAXLINELENGTH + 1]; @@ -470,14 +522,154 @@ void UpdateChat(sbe_widget_t *widget) } } - widget->string = string; + SetLine(widget, string); } -void UpdateMonSec(sbe_widget_t *widget) +static boolean IsVanillaMap(int e, int m) { - static char string[120]; + if (gamemode == commercial) + { + return (e == 1 && m > 0 && m <= 32); + } + else + { + return (e > 0 && e <= 4 && m > 0 && m <= 9); + } +} - string[0] = '\0'; +#define HU_TITLE (*mapnames[(gameepisode - 1) * 9 + gamemap - 1]) +#define HU_TITLE2 (*mapnames2[gamemap - 1]) +#define HU_TITLEP (*mapnamesp[gamemap - 1]) +#define HU_TITLET (*mapnamest[gamemap - 1]) + +static char title_string[HU_MAXLINELENGTH]; + +void ST_ResetTitle(void) +{ + char *s; + + if (gamemapinfo && gamemapinfo->levelname) + { + if (gamemapinfo->label) + { + s = gamemapinfo->label; + } + else + { + s = gamemapinfo->mapname; + } + + if (s == gamemapinfo->mapname || U_CheckField(s)) + { + M_snprintf(title_string, sizeof(title_string), "%s: ", s); + } + s = gamemapinfo->levelname; + } + else if (gamestate == GS_LEVEL) + { + if (IsVanillaMap(gameepisode, gamemap)) + { + s = (gamemode != commercial) ? HU_TITLE + : (gamemission == pack_tnt) ? HU_TITLET + : (gamemission == pack_plut) ? HU_TITLEP + : HU_TITLE2; + } + // WADs like pl2.wad have a MAP33, and rely on the layout in the + // Vanilla executable, where it is possible to overflow the end of one + // array into the next. + else if (gamemode == commercial && gamemap >= 33 && gamemap <= 35) + { + s = (gamemission == doom2) ? (*mapnamesp[gamemap - 33]) + : (gamemission == pack_plut) ? (*mapnamest[gamemap - 33]) + : ""; + } + else + { + // initialize the map title widget with the generic map lump name + s = MapName(gameepisode, gamemap); + } + } + else + { + s = ""; + } + + char *n; + + // [FG] cap at line break + if ((n = strchr(s, '\n'))) + { + *n = '\0'; + } + + M_StringCopy(title_string, s, sizeof(title_string)); + + if (hud_map_announce && leveltime == 0) + { + displaymsg("%s", title_string); + } +} + +static void UpdateTitle(sbe_widget_t *widget) +{ + SetLine(widget, title_string); +} + +static boolean WidgetEnabled(widgetstate_t state) +{ + if (automapactive && !(state & HUD_WIDGET_AUTOMAP)) + { + return false; + } + else if (!automapactive && !(state & HUD_WIDGET_HUD)) + { + return false; + } + return true; +} + +static void UpdateCoord(sbe_widget_t *widget, player_t *player) +{ + if (hud_player_coords == HUD_WIDGET_ADVANCED) + { + HU_BuildCoordinatesEx(widget, player->mo); + return; + } + + ST_ClearLines(widget); + + if (!WidgetEnabled(hud_player_coords)) + { + return; + } + + fixed_t x, y, z; // killough 10/98: + void AM_Coordinates(const mobj_t *, fixed_t *, fixed_t *, fixed_t *); + + // killough 10/98: allow coordinates to display non-following pointer + AM_Coordinates(player->mo, &x, &y, &z); + + static char string[80]; + + // jff 2/16/98 output new coord display + M_snprintf(string, sizeof(string), + "\x1b%cX " GRAY_S "%d \x1b%cY " GRAY_S "%d \x1b%cZ " GRAY_S "%d", + '0' + hudcolor_xyco, x >> FRACBITS, '0' + hudcolor_xyco, + y >> FRACBITS, '0' + hudcolor_xyco, z >> FRACBITS); + + ST_AddLine(widget, string); +} + +static void UpdateMonSec(sbe_widget_t *widget) +{ + ST_ClearLines(widget); + + if (!WidgetEnabled(hud_level_stats)) + { + return; + } + + static char string[120]; int fullkillcount = 0; int fullitemcount = 0; @@ -514,14 +706,19 @@ void UpdateMonSec(sbe_widget_t *widget) itemcolor, fullitemcount, totalitems, secretcolor, fullsecretcount, totalsecret); - widget->string = string; + ST_AddLine(widget, string); } -void UpdateStTime(sbe_widget_t *widget, player_t *player) +static void UpdateStTime(sbe_widget_t *widget, player_t *player) { - static char string[80]; + ST_ClearLines(widget); - string[0] = '\0'; + if (!WidgetEnabled(hud_level_time)) + { + return; + } + + static char string[80]; int offset = 0; @@ -552,5 +749,293 @@ void UpdateStTime(sbe_widget_t *widget, player_t *player) (float)(player->btuse % (60 * TICRATE)) / TICRATE); } - widget->string = string; + ST_AddLine(widget, string); +} + +static void UpdateFPS(sbe_widget_t *widget, player_t *player) +{ + ST_ClearLines(widget); + + if (!(player->cheats & CF_SHOWFPS)) + { + return; + } + + static char string[20]; + M_snprintf(string, sizeof(string), GRAY_S "%d " GREEN_S "FPS", fps); + ST_AddLine(widget, string); +} + +static void UpdateRate(sbe_widget_t *widget, player_t *player) +{ + ST_ClearLines(widget); + + if (!(player->cheats & CF_RENDERSTATS)) + { + return; + } + + static char line1[80]; + M_snprintf(line1, sizeof(line1), + GRAY_S "Sprites %4d Segs %4d Visplanes %4d " GREEN_S + "FPS %3d %dx%d", + rendered_vissprites, rendered_segs, rendered_visplanes, + fps, video.width, video.height); + ST_AddLine(widget, line1); + + if (voxels_rendering) + { + static char line2[60]; + M_snprintf(line2, sizeof(line2), GRAY_S " Voxels %4d", + rendered_voxels); + ST_AddLine(widget, line2); + } +} + +int speedometer; + +static void UpdateSpeed(sbe_widget_t *widget, player_t *player) +{ + if (speedometer <= 0) + { + SetLine(widget, ""); + return; + } + + static const double factor[] = {TICRATE, 2.4003, 525.0 / 352.0}; + static const char *units[] = {"ups", "km/h", "mph"}; + const int type = speedometer - 1; + const mobj_t *mo = player->mo; + const double dx = FIXED2DOUBLE(mo->x - mo->oldx); + const double dy = FIXED2DOUBLE(mo->y - mo->oldy); + const double dz = FIXED2DOUBLE(mo->z - mo->oldz); + const double speed = sqrt(dx * dx + dy * dy + dz * dz) * factor[type]; + + static char string[60]; + M_snprintf(string, sizeof(string), GRAY_S "%.*f " GREEN_S "%s", + type && speed ? 1 : 0, speed, units[type]); + SetLine(widget, string); +} + +static void UpdateCmd(sbe_widget_t *widget) +{ + HU_BuildCommandHistory(widget); +} + +// [crispy] print a bar indicating demo progress at the bottom of the screen +boolean ST_DemoProgressBar(boolean force) +{ + const int progress = video.unscaledw * playback_tic / playback_totaltics; + static int old_progress = 0; + + if (old_progress < progress) + { + old_progress = progress; + } + else if (!force) + { + return false; + } + + V_FillRect(0, SCREENHEIGHT - 2, progress, 1, v_darkest_color); + V_FillRect(0, SCREENHEIGHT - 1, progress, 1, v_lightest_color); + + return true; +} + +struct +{ + char **str; + const int cr; + const char *col; +} static const colorize_strings[] = { + // [Woof!] colorize keycard and skull key messages + {&s_GOTBLUECARD, CR_BLUE2, " blue " }, + {&s_GOTBLUESKUL, CR_BLUE2, " blue " }, + {&s_GOTREDCARD, CR_RED, " red " }, + {&s_GOTREDSKULL, CR_RED, " red " }, + {&s_GOTYELWCARD, CR_GOLD, " yellow "}, + {&s_GOTYELWSKUL, CR_GOLD, " yellow "}, + {&s_PD_BLUEC, CR_BLUE2, " blue " }, + {&s_PD_BLUEK, CR_BLUE2, " blue " }, + {&s_PD_BLUEO, CR_BLUE2, " blue " }, + {&s_PD_BLUES, CR_BLUE2, " blue " }, + {&s_PD_REDC, CR_RED, " red " }, + {&s_PD_REDK, CR_RED, " red " }, + {&s_PD_REDO, CR_RED, " red " }, + {&s_PD_REDS, CR_RED, " red " }, + {&s_PD_YELLOWC, CR_GOLD, " yellow "}, + {&s_PD_YELLOWK, CR_GOLD, " yellow "}, + {&s_PD_YELLOWO, CR_GOLD, " yellow "}, + {&s_PD_YELLOWS, CR_GOLD, " yellow "}, + + // [Woof!] colorize multi-player messages + {&s_HUSTR_PLRGREEN, CR_GREEN, "Green: " }, + {&s_HUSTR_PLRINDIGO, CR_GRAY, "Indigo: "}, + {&s_HUSTR_PLRBROWN, CR_BROWN, "Brown: " }, + {&s_HUSTR_PLRRED, CR_RED, "Red: " }, +}; + +static char* PrepareColor(const char *str, const char *col) +{ + char *str_replace, col_replace[16]; + + M_snprintf(col_replace, sizeof(col_replace), + "\x1b%c%s\x1b%c", '0'+CR_ORIG, col, '0'+CR_ORIG); + str_replace = M_StringReplace(str, col, col_replace); + + return str_replace; +} + +static void UpdateColor(char *str, int cr) +{ + int i; + int len = strlen(str); + + if (!message_colorized) + { + cr = CR_ORIG; + } + + for (i = 0; i < len; ++i) + { + if (str[i] == '\x1b' && i + 1 < len) + { + str[i + 1] = '0'+cr; + break; + } + } +} + +void ST_InitWidgets(void) +{ + // [Woof!] prepare player messages for colorization + for (int i = 0; i < arrlen(colorize_strings); i++) + { + *colorize_strings[i].str = + PrepareColor(*colorize_strings[i].str, colorize_strings[i].col); + } +} + +void ST_ResetMessageColors(void) +{ + int i; + + for (i = 0; i < arrlen(colorize_strings); i++) + { + UpdateColor(*colorize_strings[i].str, colorize_strings[i].cr); + } +} + +void ST_UpdateWidget(sbarelem_t *elem, player_t *player) +{ + sbe_widget_t *widget = elem->pointer.widget; + + switch (widget->type) + { + case sbw_message: + UpdateMessage(widget, player); + break; + case sbw_chat: + UpdateChat(widget); + break; + case sbw_secret: + UpdateSecretMessage(widget, player); + break; + case sbw_title: + UpdateTitle(widget); + break; + + case sbw_monsec: + UpdateMonSec(widget); + break; + case sbw_time: + UpdateStTime(widget, player); + break; + case sbw_coord: + UpdateCoord(widget, player); + break; + case sbw_fps: + UpdateFPS(widget, player); + break; + case sbw_rate: + UpdateRate(widget, player); + break; + case sbw_cmd: + UpdateCmd(widget); + break; + case sbw_speed: + UpdateSpeed(widget, player); + break; + default: + break; + } +} + +void ST_BindHUDVariables(void) +{ + M_BindNum("hud_level_stats", &hud_level_stats, NULL, + HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, + ss_stat, wad_no, + "Show level stats (kills, items, and secrets) widget (1 = On automap; " + "2 = On HUD; 3 = Always)"); + M_BindNum("hud_level_time", &hud_level_time, NULL, + HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, + ss_stat, wad_no, + "Show level time widget (1 = On automap; 2 = On HUD; 3 = Always)"); + M_BindNum("hud_player_coords", &hud_player_coords, NULL, + HUD_WIDGET_AUTOMAP, HUD_WIDGET_OFF, HUD_WIDGET_ADVANCED, + ss_stat, wad_no, + "Show player coordinates widget (1 = On automap; 2 = On HUD; 3 = Always; 4 = Advanced)"); + M_BindBool("hud_command_history", &hud_command_history, NULL, false, ss_stat, + wad_no, "Show command history widget"); + BIND_NUM(hud_command_history_size, 10, 1, HU_MAXMESSAGES, + "Number of commands to display for command history widget"); + BIND_BOOL(hud_hide_empty_commands, true, + "Hide empty commands from command history widget"); + M_BindBool("hud_time_use", &hud_time_use, NULL, false, ss_stat, wad_no, + "Show split time when pressing the use-button"); + // M_BindNum("hud_widget_font", &hud_widget_font, NULL, + // HUD_WIDGET_OFF, HUD_WIDGET_OFF, HUD_WIDGET_ALWAYS, + // ss_stat, wad_no, + // "Use standard Doom font for widgets (1 = On automap; 2 = On HUD; 3 " + // "= Always)"); + + M_BindNum("hudcolor_titl", &hudcolor_titl, NULL, + CR_GOLD, CR_BRICK, CR_NONE, ss_none, wad_yes, + "Color range used for automap level title"); + M_BindNum("hudcolor_xyco", &hudcolor_xyco, NULL, + CR_GREEN, CR_BRICK, CR_NONE, ss_none, wad_yes, + "Color range used for automap coordinates"); + + BIND_BOOL(show_messages, true, "Show messages"); + M_BindBool("hud_secret_message", &hud_secret_message, NULL, + true, ss_stat, wad_no, "Announce revealed secrets"); + M_BindBool("hud_map_announce", &hud_map_announce, NULL, + false, ss_stat, wad_no, "Announce map titles"); + M_BindBool("show_toggle_messages", &show_toggle_messages, NULL, + true, ss_stat, wad_no, "Show toggle messages"); + M_BindBool("show_pickup_messages", &show_pickup_messages, NULL, + true, ss_stat, wad_no, "Show pickup messages"); + M_BindBool("show_obituary_messages", &show_obituary_messages, NULL, + true, ss_stat, wad_no, "Show obituaries"); + BIND_NUM(hudcolor_obituary, CR_GRAY, CR_BRICK, CR_NONE, + "Color range used for obituaries"); + M_BindBool("message_colorized", &message_colorized, NULL, + false, ss_stat, wad_no, "Colorize player messages"); + +#define BIND_CHAT(num) \ + M_BindStr("chatmacro" #num, &chat_macros[(num)], HUSTR_CHATMACRO##num, \ + wad_yes, "Chat string associated with " #num " key") + + BIND_CHAT(0); + BIND_CHAT(1); + BIND_CHAT(2); + BIND_CHAT(3); + BIND_CHAT(4); + BIND_CHAT(5); + BIND_CHAT(6); + BIND_CHAT(7); + BIND_CHAT(8); + BIND_CHAT(9); } diff --git a/src/st_widgets.h b/src/st_widgets.h index 96b885459..c5f09e81b 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -16,19 +16,57 @@ #include "doomtype.h" +struct sbarelem_s; struct sbe_widget_s; struct player_s; struct event_s; -void UpdateMessage(struct sbe_widget_s *widget, struct player_s *player); -void UpdateSecretMessage(struct sbe_widget_s *widget, struct player_s *player); -void UpdateMonSec(struct sbe_widget_s *widget); -void UpdateStTime(struct sbe_widget_s *widget, struct player_s *player); +#define HU_MAXMESSAGES 20 +#define HU_MAXLINELENGTH 120 -void UpdateChatMessage(void); -void UpdateChat(struct sbe_widget_s *widget); -boolean MessagesResponder(struct event_s *ev); +typedef enum +{ + HUD_WIDGET_OFF, + HUD_WIDGET_AUTOMAP, + HUD_WIDGET_HUD, + HUD_WIDGET_ALWAYS, + HUD_WIDGET_ADVANCED, +} widgetstate_t; + +extern boolean show_messages; +extern boolean show_toggle_messages; +extern boolean show_pickup_messages; +extern boolean hud_secret_message; // "A secret is revealed!" message + +extern boolean chat_on; + +extern widgetstate_t hud_level_stats; +extern widgetstate_t hud_level_time; +extern int hudcolor_titl; +extern int hudcolor_xyco; + +extern boolean hud_time_use; + +void ST_ResetTitle(void); + +void ST_ClearLines(struct sbe_widget_s *widget); +void ST_AddLine(struct sbe_widget_s *widget, const char *string); +void ST_UpdateWidget(struct sbarelem_s *elem, struct player_s *player); + +void ST_UpdateChatMessage(void); +boolean ST_MessagesResponder(struct event_s *ev); char ST_DequeueChatChar(void); +extern char **player_names[]; +extern int speedometer; + +extern int playback_tic, playback_totaltics; +boolean ST_DemoProgressBar(boolean force); + +void ST_InitWidgets(void); +void ST_ResetMessageColors(void); + +void ST_BindHUDVariables(void); + #endif \ No newline at end of file diff --git a/src/u_mapinfo.c b/src/u_mapinfo.c index c78a5c5b7..e672eda53 100644 --- a/src/u_mapinfo.c +++ b/src/u_mapinfo.c @@ -835,7 +835,7 @@ void U_ParseMapInfo(int lumpnum) G_ValidateMapName(parsed.mapname, &ep, &map); - strcpy(parsed.nextmap, MAPNAME(ep, map + 1)); + strcpy(parsed.nextmap, MapName(ep, map + 1)); } } diff --git a/src/v_video.h b/src/v_video.h index f2bd5b1a2..1cfccf36f 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -65,6 +65,7 @@ extern byte *red2col[]; // symbolic indices into color translation table pointer array typedef enum { + CR_ORIG = -1, CR_BRICK, // 0 CR_TAN, // 1 CR_GRAY, // 2 @@ -84,6 +85,13 @@ typedef enum CR_LIMIT // 16 //jff 2/27/98 added for range check } crange_idx_e; +#define GRAY_S "\x1b\x32" +#define GREEN_S "\x1b\x33" +#define BROWN_S "\x1b\x34" +#define GOLD_S "\x1b\x35" +#define RED_S "\x1b\x36" +#define BLUE_S "\x1b\x37" + // jff 1/16/98 end palette color range additions crange_idx_e V_CRByName(const char *name); diff --git a/src/wi_stuff.c b/src/wi_stuff.c index b247ea1cb..ebb6f902f 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -27,8 +27,6 @@ #include "doomstat.h" #include "doomtype.h" #include "g_game.h" -#include "hu_lib.h" -#include "hu_stuff.h" #include "i_printf.h" #include "m_misc.h" #include "m_random.h" @@ -36,6 +34,8 @@ #include "mn_menu.h" #include "r_defs.h" #include "s_sound.h" +#include "st_sbardef.h" +#include "st_stuff.h" #include "sounds.h" #include "u_mapinfo.h" #include "v_fmt.h" @@ -2122,7 +2122,7 @@ static void WI_drawStats(void) { // line height int lh; - int maplump = W_CheckNumForName(MAPNAME(wbs->epsd + 1, wbs->last + 1)); + int maplump = W_CheckNumForName(MapName(wbs->epsd + 1, wbs->last + 1)); lh = (3*SHORT(num[0]->height))/2; From 4b18e62a1785abb0202b50dd11f30f6d7bd92ecd Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 11:55:51 +0700 Subject: [PATCH 31/55] restore solid color background --- src/st_stuff.c | 202 +++++++++++++++++++++---------------------------- 1 file changed, 85 insertions(+), 117 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 2131bc572..d8e04629c 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1314,6 +1314,59 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) } } +static boolean st_solidbackground; + +static void DrawSolidBackground(void) +{ + // [FG] calculate average color of the 16px left and right of the status bar + const int vstep[][2] = { {0, 1}, {1, 2}, {2, ST_HEIGHT} }; + + patch_t *sbar = V_CachePatchName("STBAR", PU_CACHE); + // [FG] temporarily draw status bar to background buffer + V_DrawPatch(0, 0, sbar); + + byte *pal = W_CacheLumpName("PLAYPAL", PU_CACHE); + + const int width = MIN(SHORT(sbar->width), video.unscaledw); + const int depth = 16; + int v; + + // [FG] separate colors for the top rows + for (v = 0; v < arrlen(vstep); v++) + { + int x, y; + const int v0 = vstep[v][0], v1 = vstep[v][1]; + unsigned r = 0, g = 0, b = 0; + byte col; + + for (y = v0; y < v1; y++) + { + for (x = 0; x < depth; x++) + { + byte *c = st_backing_screen + V_ScaleY(y) * video.pitch + + V_ScaleX(x); + r += pal[3 * c[0] + 0]; + g += pal[3 * c[0] + 1]; + b += pal[3 * c[0] + 2]; + + c += V_ScaleX(width - 2 * x - 1); + r += pal[3 * c[0] + 0]; + g += pal[3 * c[0] + 1]; + b += pal[3 * c[0] + 2]; + } + } + + r /= 2 * depth * (v1 - v0); + g /= 2 * depth * (v1 - v0); + b /= 2 * depth * (v1 - v0); + + // [FG] tune down to half saturation (for empiric reasons) + col = I_GetNearestColor(pal, r / 2, g / 2, b / 2); + + V_FillRect(0, v0, video.unscaledw, v1 - v0, col); + } +} + boolean st_refresh_background = true; static void DrawBackground(const char *name) @@ -1327,21 +1380,28 @@ static void DrawBackground(const char *name) V_UseBuffer(st_backing_screen); - if (!name) + if (st_solidbackground) { - name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; + DrawSolidBackground(); } + else + { + if (!name) + { + name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; + } - byte *flat = V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); + byte *flat = V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); - V_TileBlock64(ST_Y, video.unscaledw, ST_HEIGHT, flat); + V_TileBlock64(ST_Y, video.unscaledw, ST_HEIGHT, flat); - if (screenblocks == 10) - { - patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); - for (int x = 0; x < video.unscaledw; x += 8) + if (screenblocks == 10) { - V_DrawPatch(x - video.deltaw, 0, patch); + patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); + for (int x = 0; x < video.unscaledw; x += 8) + { + V_DrawPatch(x - video.deltaw, 0, patch); + } } } @@ -1442,62 +1502,6 @@ void ST_Erase(void) } } -static boolean st_solidbackground; - -/* -static void ST_DrawSolidBackground(int st_x) -{ - // [FG] calculate average color of the 16px left and right of the status bar - const int vstep[][2] = {{0, 1}, {1, 2}, {2, ST_HEIGHT}}; - - byte *pal = W_CacheLumpName("PLAYPAL", PU_STATIC); - - // [FG] temporarily draw status bar to background buffer - V_DrawPatch(st_x, 0, sbar); - - const int offset = MAX(st_x + video.deltaw - SHORT(sbar->leftoffset), 0); - const int width = MIN(SHORT(sbar->width), video.unscaledw); - const int depth = 16; - int v; - - // [FG] separate colors for the top rows - for (v = 0; v < arrlen(vstep); v++) - { - int x, y; - const int v0 = vstep[v][0], v1 = vstep[v][1]; - unsigned r = 0, g = 0, b = 0; - byte col; - - for (y = v0; y < v1; y++) - { - for (x = 0; x < depth; x++) - { - byte *c = st_backing_screen + V_ScaleY(y) * video.pitch + V_ScaleX(x + offset); - r += pal[3 * c[0] + 0]; - g += pal[3 * c[0] + 1]; - b += pal[3 * c[0] + 2]; - - c += V_ScaleX(width - 2 * x - 1); - r += pal[3 * c[0] + 0]; - g += pal[3 * c[0] + 1]; - b += pal[3 * c[0] + 2]; - } - } - - r /= 2 * depth * (v1 - v0); - g /= 2 * depth * (v1 - v0); - b /= 2 * depth * (v1 - v0); - - // [FG] tune down to half saturation (for empiric reasons) - col = I_GetNearestColor(pal, r/2, g/2, b/2); - - V_FillRect(0, v0, video.unscaledw, v1 - v0, col); - } - - Z_ChangeTag (pal, PU_CACHE); -} -*/ - // Respond to keyboard input events, // intercept cheats. boolean ST_Responder(event_t *ev) @@ -1517,65 +1521,29 @@ boolean ST_Responder(event_t *ev) } } -static boolean sts_traditional_keys; // killough 2/28/98: traditional status bar keys static boolean hud_blink_keys; // [crispy] blinking key or skull in the status bar -void ST_SetKeyBlink(player_t* player, int blue, int yellow, int red) +void ST_SetKeyBlink(player_t *player, int blue, int yellow, int red) { - int i; - // Init array with args to iterate through - const int keys[3] = { blue, yellow, red }; + // Init array with args to iterate through + const int keys[3] = {blue, yellow, red}; - player->keyblinktics = KEYBLINKTICS; + player->keyblinktics = KEYBLINKTICS; - for (i = 0; i < 3; i++) - { - if ( ((keys[i] == KEYBLINK_EITHER) && !(player->cards[i] || player->cards[i+3])) - || ((keys[i] == KEYBLINK_CARD) && !(player->cards[i])) - || ((keys[i] == KEYBLINK_SKULL) && !(player->cards[i+3])) - || ((keys[i] == KEYBLINK_BOTH) && !(player->cards[i] && player->cards[i+3]))) + for (int i = 0; i < 3; i++) { - player->keyblinkkeys[i] = keys[i]; - } - else - { - player->keyblinkkeys[i] = KEYBLINK_NONE; - } - } -} - -int ST_BlinkKey(player_t* player, int index) -{ - const keyblink_t keyblink = player->keyblinkkeys[index]; - - if (!keyblink) - return KEYBLINK_NONE; - - if (player->keyblinktics & KEYBLINKMASK) - { - if (keyblink == KEYBLINK_EITHER) - { - if (st_keyorskull[index] && st_keyorskull[index] != KEYBLINK_BOTH) - { - return st_keyorskull[index]; - } - else if ( (player->keyblinktics & (2*KEYBLINKMASK)) && - !(player->keyblinktics & (4*KEYBLINKMASK))) - { - return KEYBLINK_SKULL; - } - else - { - return KEYBLINK_CARD; - } - } - else - { - return keyblink; + if (((keys[i] == KEYBLINK_EITHER) && !(player->cards[i] || player->cards[i + 3])) + || ((keys[i] == KEYBLINK_CARD) && !(player->cards[i])) + || ((keys[i] == KEYBLINK_SKULL) && !(player->cards[i + 3])) + || ((keys[i] == KEYBLINK_BOTH) && !(player->cards[i] && player->cards[i + 3]))) + { + player->keyblinkkeys[i] = keys[i]; + } + else + { + player->keyblinkkeys[i] = KEYBLINK_NONE; + } } - } - - return -1; } boolean palette_changes = true; From abc5e0d9b8b1372e31aee33d811f57556df0e863 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 12:11:35 +0700 Subject: [PATCH 32/55] fix build --- src/mn_setup.c | 3 +-- src/st_widgets.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mn_setup.c b/src/mn_setup.c index d3d215a13..94348bd1a 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -2566,10 +2566,9 @@ static void MN_Midi(void) current_tabs = midi_tabs; SetupMenuSecondary(); } + void MN_DrawMidi(void) { - inhelpscreens = true; - DrawBackground("FLOOR4_6"); MN_DrawTitle(M_X_CENTER, M_Y_TITLE, "M_GENERL", "General"); DrawTabs(); diff --git a/src/st_widgets.c b/src/st_widgets.c index 5cd9ddec2..48601f31b 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -14,6 +14,7 @@ #include "st_widgets.h" #include +#include #include "dstrings.h" #include "d_event.h" From e979aa3187e244d51e471ebdc59a04f54ec45d6c Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 13:33:53 +0700 Subject: [PATCH 33/55] remove WOOFHUD documentation, cosmetic changes --- README.md | 1 - base/all-all/sbardef.lmp | 50 +++++----------- base/all-all/sbhuddef.lmp | 20 ------- docs/CMakeLists.txt | 4 +- docs/woofhud.lmp | 33 ----------- docs/woofhud.md | 121 -------------------------------------- 6 files changed, 16 insertions(+), 213 deletions(-) delete mode 100644 docs/woofhud.lmp delete mode 100644 docs/woofhud.md diff --git a/README.md b/README.md index 1fad8a5b3..b4f4543e9 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ If you turn the [Doom logo upside down](https://www.reddit.com/r/Doom/comments/8 * UMAPINFO support, compliant to Rev 2.2 of the [spec](https://github.com/kraflab/umapinfo). * MBF21 compatibility level, compliant to Rev 1.4 of the [spec](https://github.com/kraflab/mbf21). * SMMU-style swirling animated flats. - * Customization of the extended Boom HUD using the [WOOFHUD](https://github.com/fabiangreffrath/woof/blob/master/docs/woofhud.md) lump. ## Usage diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 2fde0e153..13593adeb 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -978,14 +978,13 @@ { "widget": { - "x": 0, - "y": 0, - "alignment": 16, + "x": 160, + "y": 167, + "alignment": 9, "tranmap": null, "translation": null, - "type": 7, - "font": "Console", - "duration": 4, + "type": 6, + "font": "Digits", "conditions": null, "children": null } @@ -994,12 +993,13 @@ "widget": { "x": 0, - "y": 8, + "y": 0, "alignment": 16, "tranmap": null, - "translation": "CRGOLD", - "type": 9, + "translation": null, + "type": 7, "font": "Console", + "duration": 4, "conditions": null, "children": null } @@ -1022,13 +1022,13 @@ { "widget": { - "x": 160, - "y": 167, - "alignment": 9, + "x": 0, + "y": 8, + "alignment": 16, "tranmap": null, - "translation": null, - "type": 6, - "font": "Digits", + "translation": "CRGOLD", + "type": 9, + "font": "Console", "conditions": null, "children": null } @@ -1072,26 +1072,6 @@ ], "children": null } - }, - { - "widget": - { - "x": 0, - "y": 160, - "alignment": 16, - "tranmap": null, - "translation": "CRGOLD", - "type": 10, - "font": "Console", - "conditions": - [ - { - "condition": 19, - "param": 1 - } - ], - "children": null - } } ] }, diff --git a/base/all-all/sbhuddef.lmp b/base/all-all/sbhuddef.lmp index d26fe971c..2175647ba 100644 --- a/base/all-all/sbhuddef.lmp +++ b/base/all-all/sbhuddef.lmp @@ -251,26 +251,6 @@ ], "children": null } - }, - { - "widget": - { - "x": 0, - "y": 160, - "alignment": 16, - "tranmap": null, - "translation": "CRGOLD", - "type": 10, - "font": "Console", - "conditions": - [ - { - "condition": 19, - "param": 1 - } - ], - "children": null - } } ] } diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 7d8c03f3d..32889ff74 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -5,9 +5,7 @@ set(WOOF_DOCS mbf.txt mbfedit.txt mbffaq.txt - options.txt - woofhud.lmp - woofhud.md) + options.txt) if(WIN32) install(FILES ${WOOF_DOCS} DESTINATION docs) diff --git a/docs/woofhud.lmp b/docs/woofhud.lmp deleted file mode 100644 index 9187e0e77..000000000 --- a/docs/woofhud.lmp +++ /dev/null @@ -1,33 +0,0 @@ -// Copy this to autoload/doom-all for alternative HUD arrangements. -// Thanks @liPillON . - -hud 0 -title topleft -coords topright -fps topright -stats bottomright -time bottomright - -hud 1 -title topleft -coords topright -fps topright -armor bottomleft -health bottomleft -ammo bottomleft -weapons bottomleft -keys bottomleft -stats bottomright -time bottomright - -hud 2 -title topleft -stats topright -time topright -coords topright -fps topright -keys bottomleft -health bottomleft -armor bottomleft -weapons bottomright -ammo bottomright diff --git a/docs/woofhud.md b/docs/woofhud.md deleted file mode 100644 index 0a9b0ee78..000000000 --- a/docs/woofhud.md +++ /dev/null @@ -1,121 +0,0 @@ -# WOOFHUD - -Woof! supports the WOOFHUD lump to customize the appearance of the extended Boom HUD. - -## Description - -The Boom HUD shows information about the player's health, armor, weapons, ammo and keys using different widgets, i.e. lines of text and symbols. It is usually made visible by hitting the F5 key, and repeatedly hitting the F5 key toggles through three different modes: the "minimal" mode which shows only the most basic information, the "compact" mode which shows all information in the lower left corner of the screen and the "distributed" mode which shows information spread across the corners of the screen. - -The WOOFHUD lump can be used to modify the positions of these widgets for each mode. -This lump may either get embedded into a PWAD, or provided by the user on the command line or through the autoload feature. - -## Format - -The WOOFHUD lump is in text format and consists of paragraphs, which are separated by blank lines. Each paragraph begins with a line starting with the keyword `hud` and a number for the HUD mode which is to be modified: `0` for minimal, `1` for compact and `2` for distributed. -The following lines start with the name of the HUD widget which is to be positioned followed by either a keyword giving the position relative to the screen or two numbers giving the absolute X and Y screen coordinates. - -Possible values for the HUD widget names: - - * "title" or "levelname" - * "message" - * "secret" - * "armor" - * "health" - * "ammo" - * "weapon" or "weapons" - * "keys" - * "monsec" or "stats" - * "sttime" or "time" - * "coord" or "coords" - * "fps" or "rate" - * "cmd" or "commands" - * "compact" - * "speed" - -Possible values for the widget position keywords: - - * "topleft" or "upperleft" - * "topright" or "upperright" - * "topcenter" or "uppercenter" - * "bottomleft" or "lowerleft" - * "bottomright" or "lowerright" - * "bottomcenter" or "lowercenter" - -When using relative screen positioning, the widgets are aligned "first come, first serve". For example, the first widget in a paragraph that is aligned with the "bottomleft" keyword will end up in the very bottom-left area of the screen and each following widget that is aligned with the same keyword will get stacked one line above. - -Absolute X and Y screen coordinates are limited to the low-resolution non-widescreen visible area of the screen, i.e. `0 <= X < 320` and `0 <= Y < 200`. Negative values will get interpreted relative to the right or lower edges of the screen, respectively. If the "Widescreen Widget Arrangement" feature is enabled, widgets will get aligned with respect to the widescreen area of the screen (new in Woof! 14.0.0). - -## Examples - -The following example represents the current default alignments of the Boom HUD widgets: - -``` -hud 0 -rate topleft -compact bottomleft -monsec topleft -sttime topleft -coord topright -fps topright -cmd bottomright -speed bottomcenter - -hud 1 -rate topleft -armor bottomleft -health bottomleft -ammo bottomleft -weapon bottomleft -keys bottomleft -monsec bottomleft -sttime bottomleft -coord topright -fps topright -cmd bottomright -speed bottomcenter - -hud 2 -rate topleft -health topright -armor topright -ammo bottomright -weapon bottomright -keys bottomleft -monsec bottomleft -sttime bottomleft -coord topright -fps topright -cmd bottomright -speed bottomcenter -``` - -An alternative approach to the distributed HUD, using absolute screen coordinates, could look like this: - -``` -hud 2 -health 224 0 -armor 224 8 -ammo 200 -8 -weapon 200 -16 -keys 2 -8 -monsec 2 8 -sttime 2 16 -coord 200 8 -fps 224 16 -``` - -## Remarks - -The "title" widget is only visible if the Automap is enabled. The "monsec", "sttime" and "coord" widgets are only visible if they are explicitly enabled in the Options menu (separately for Automap and HUD). The "fps" widget is only visible if the SHOWFPS cheat is enabled. - -The "speed" widget is only visible if the SPEED cheat is enabled. Repeating the cheat cycles through different units. - -The "compact" widget is a minimal widget showing only health, armor and ammo information. It is enabled by default in the minimal Boom HUD mode. - -A centered widget does not allow for any other left or right aligned widget on the same line. - -HUD modes without a paragraph remain unchanged. Widgets which are not mentioned in a paragraph will *never* be visible in the respective HUD mode. So, it is a good idea to *always* include the five widgets which make up the `hud 0` paragraph in the example above in *any* other paragraph. -The Vanilla Doom widgets (i.e. "title", "message", "secret"), however, will *always* be visible, whether they are explicitly mentioned in a paragraph or not (new in Woof! 12.0.0). - -It is currently impossible to use the WOOFHUD lump to modify the appearance of the Status Bar or the Crispy HUD. However, when using the Crispy HUD or the Automap, the visible widgets will align corresponding to the last active HUD mode. - From c940284a53a0370cf3b65dd33314340ecd6135d6 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 14:09:08 +0700 Subject: [PATCH 34/55] fix solid background, error message if hu_font not found --- src/st_stuff.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index d8e04629c..beeabff32 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -31,6 +31,7 @@ #include "doomtype.h" #include "hu_command.h" #include "hu_obituary.h" +#include "i_system.h" #include "i_video.h" #include "info.h" #include "m_array.h" @@ -1323,7 +1324,7 @@ static void DrawSolidBackground(void) patch_t *sbar = V_CachePatchName("STBAR", PU_CACHE); // [FG] temporarily draw status bar to background buffer - V_DrawPatch(0, 0, sbar); + V_DrawPatch(-video.deltaw, 0, sbar); byte *pal = W_CacheLumpName("PLAYPAL", PU_CACHE); @@ -1690,17 +1691,19 @@ void ST_Start(void) } } -patch_t **hu_font; +patch_t **hu_font = NULL; void ST_Init(void) { sbardef = ST_ParseSbarDef(); - if (sbardef) + if (!sbardef) { - LoadFacePatches(); + return; } + LoadFacePatches(); + hudfont_t *hudfont; array_foreach(hudfont, sbardef->hudfonts) { @@ -1711,6 +1714,11 @@ void ST_Init(void) } } + if (!hu_font) + { + I_Error("ST_Init: \"Console\" font not found"); + } + HU_InitCrosshair(); HU_InitCommandHistory(); HU_InitObituaries(); From 530002824cf128d0b5b97cd30869479786cb0f3a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 15:14:08 +0700 Subject: [PATCH 35/55] add copyright to README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b4f4543e9..b960a593d 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,11 @@ Copyright: © TobiasKosmos. License: [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) and [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/) +Files: `base/all-all/sbardef.lmp` +Copyright: + © 2024 Ethan Watson. +License: [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/) + Files: `cmake/FindSDL2.cmake, cmake/FindSDL2_net.cmake` Copyright: © 2018 Alex Mayfield. License: [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) From 1f9cb2675110a6b021ee88bc780d0cf4bfdbc241 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 18:44:04 +0700 Subject: [PATCH 36/55] fix message color after obituary --- src/hu_obituary.c | 3 ++- src/st_widgets.c | 6 ++++++ src/v_video.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hu_obituary.c b/src/hu_obituary.c index 46bc6482c..e94d864a7 100644 --- a/src/hu_obituary.c +++ b/src/hu_obituary.c @@ -28,6 +28,7 @@ #include "m_misc.h" #include "net_client.h" #include "p_mobj.h" +#include "v_video.h" boolean show_obituary_messages; int hudcolor_obituary; @@ -215,7 +216,7 @@ void HU_Obituary(mobj_t *target, mobj_t *source, method_t mod) break; } - doomprintf(&players[i], MESSAGES_OBITUARY, "\x1b%c%s", + doomprintf(&players[i], MESSAGES_OBITUARY, "\x1b%c%s" ORIG_S, '0' + hudcolor_obituary, str); } diff --git a/src/st_widgets.c b/src/st_widgets.c index 48601f31b..0666c4b03 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -85,6 +85,12 @@ static boolean message_review; static void UpdateMessage(sbe_widget_t *widget, player_t *player) { + if (!player->message) + { + ST_ClearLines(widget); + return; + } + static char string[120]; static int duration_left; static boolean overwrite = true; diff --git a/src/v_video.h b/src/v_video.h index 1cfccf36f..842cb1ffd 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -85,6 +85,9 @@ typedef enum CR_LIMIT // 16 //jff 2/27/98 added for range check } crange_idx_e; +#define ORIG_S "\x1b\x2f" +#define BRICK_S "\x1b\x30" +#define TAN_S "\x1b\x31" #define GRAY_S "\x1b\x32" #define GREEN_S "\x1b\x33" #define BROWN_S "\x1b\x34" From bc646627682b82310d4a6d4f77bcfbc8eae4d819 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 19:04:24 +0700 Subject: [PATCH 37/55] add `screenblocks == 12`, F5 also works --- base/all-all/sbardef.lmp | 166 ++++++++++++++++++++++++++++++++++++++- src/mn_menu.c | 21 ++++- src/mn_setup.c | 6 +- src/r_main.c | 4 +- 4 files changed, 187 insertions(+), 10 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 13593adeb..2c2a964eb 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -1803,7 +1803,171 @@ "height": 200, "fullscreenrender": true, "fillflat": null, - "children": null + "children": + [ + { + "widget": + { + "x": 0, + "y": 192, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 0, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 184, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 1, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 8, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 2, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 0, + "alignment": 34, + "tranmap": null, + "translation": null, + "type": 3, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 0, + "tranmap": null, + "translation": null, + "type": 4, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 320, + "y": 200, + "alignment": 42, + "tranmap": null, + "translation": null, + "type": 5, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 200, + "alignment": 9, + "tranmap": null, + "translation": null, + "type": 6, + "font": "Digits", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 0, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 7, + "font": "Console", + "duration": 4, + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 68, + "alignment": 1, + "tranmap": null, + "translation": "CRGOLD", + "type": 8, + "font": "Console", + "duration": 2.5, + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 8, + "alignment": 16, + "tranmap": null, + "translation": "CRGOLD", + "type": 9, + "font": "Console", + "conditions": null, + "children": null + } + }, + { + "widget": + { + "x": 160, + "y": 200, + "alignment": 9, + "tranmap": null, + "translation": "CRGOLD", + "type": 10, + "font": "Console", + "conditions": + [ + { + "condition": 19, + "param": 2 + } + ], + "children": null + } + } + ] } ] } diff --git a/src/mn_menu.c b/src/mn_menu.c index bf6135e4a..6721d07b0 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -1551,7 +1551,7 @@ static void M_SizeDisplay(int choice) default: break; } - screenblocks = BETWEEN(3, 11, screenblocks); + screenblocks = BETWEEN(3, 12, screenblocks); R_SetViewSize(screenblocks /*, detailLevel obsolete -- killough */); } @@ -2255,14 +2255,27 @@ boolean M_ShortcutResponder(const event_t *ev) return false; // HUD mode control } - if (screenblocks < 11) + if (screenblocks < 10) { - screenblocks = 11; + screenblocks = 10; } else { - screenblocks = 10; + ++screenblocks; + if (screenblocks > 12) + { + screenblocks = 10; + } } + + // if (screenblocks < 11) + // { + // screenblocks = 11; + // } + // else + // { + // screenblocks = 10; + // } R_SetViewSize(screenblocks); return true; } diff --git a/src/mn_setup.c b/src/mn_setup.c index 94348bd1a..00c9e60c6 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -1790,9 +1790,9 @@ static void SizeDisplayAlt(void) } static const char *screensize_strings[] = { - "", "", "", "Status Bar", - "Status Bar", "Status Bar", "Status Bar", "Status Bar", - "Status Bar", "Status Bar", "Status Bar", "Fullscreen" + "", "", "", "Status Bar", "Status Bar", + "Status Bar", "Status Bar", "Status Bar", "Status Bar", "Status Bar", + "Status Bar", "Fullscreen", "Fullscreen" }; static const char *st_layout_strings[] = { diff --git a/src/r_main.c b/src/r_main.c index ed6292c92..8b664c853 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -549,7 +549,7 @@ int setblocks; void R_SetViewSize(int blocks) { setsizeneeded = true; - setblocks = blocks; + setblocks = MIN(blocks, 11); } // @@ -1031,7 +1031,7 @@ void R_BindRenderVariables(void) BIND_NUM_GENERAL(invul_mode, INVUL_MBF, INVUL_VANILLA, INVUL_GRAY, "Invulnerability effect (0 = Vanilla; 1 = MBF; 2 = Gray)"); BIND_BOOL(flashing_hom, true, "Enable flashing of the HOM indicator"); - BIND_NUM(screenblocks, 10, 3, 11, "Size of game-world screen"); + BIND_NUM(screenblocks, 10, 3, 12, "Size of game-world screen"); M_BindBool("translucency", &translucency, NULL, true, ss_gen, wad_yes, "Translucency for some things"); From a2ca21e4b8f737d2c85c4dab1943f23c34cf9562 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 1 Oct 2024 21:44:06 +0700 Subject: [PATCH 38/55] cosmetic changes --- src/m_json.c | 12 ++++++++- src/m_json.h | 3 ++- src/mn_menu.c | 8 ------ src/st_sbardef.c | 64 +++++++++++++++++++++++++----------------------- src/st_sbardef.h | 2 -- src/st_stuff.c | 24 +++++++++--------- src/st_stuff.h | 13 +--------- src/st_widgets.c | 2 +- 8 files changed, 60 insertions(+), 68 deletions(-) diff --git a/src/m_json.c b/src/m_json.c index eb1f33fa4..4850a03ce 100644 --- a/src/m_json.c +++ b/src/m_json.c @@ -174,7 +174,17 @@ const char *JS_GetString(json_t *json) return json->valuestring; } -const char *JS_GetStringValue(json_t *json, const char *string) +const char *JS_GetStringRef(json_t *json, const char *string) +{ + json_t *obj = JS_GetObject(json, string); + if (JS_IsString(obj)) + { + return obj->valuestring; + } + return NULL; +} + +const char *JS_GetStringCopy(json_t *json, const char *string) { json_t *obj = JS_GetObject(json, string); if (JS_IsString(obj)) diff --git a/src/m_json.h b/src/m_json.h index fffe31b45..446182fd7 100644 --- a/src/m_json.h +++ b/src/m_json.h @@ -44,7 +44,8 @@ double JS_GetNumber(json_t *json); double JS_GetNumberValue(json_t *json, const char *string); int JS_GetInteger(json_t *json); const char *JS_GetString(json_t *json); -const char *JS_GetStringValue(json_t *json, const char *string); +const char *JS_GetStringRef(json_t *json, const char *string); +const char *JS_GetStringCopy(json_t *json, const char *string); int JS_GetArraySize(json_t *json); json_t *JS_GetArrayItem(json_t *json, int index); diff --git a/src/mn_menu.c b/src/mn_menu.c index 6721d07b0..6dead45fd 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -2268,14 +2268,6 @@ boolean M_ShortcutResponder(const event_t *ev) } } - // if (screenblocks < 11) - // { - // screenblocks = 11; - // } - // else - // { - // screenblocks = 10; - // } R_SetViewSize(screenblocks); return true; } diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 777199b64..3d7cc3ae7 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -239,13 +239,17 @@ static boolean ParseSbarElem(json_t *json, sbarelem_t *out) static boolean ParseNumberFont(json_t *json, numberfont_t *out) { json_t *name = JS_GetObject(json, "name"); - json_t *stem = JS_GetObject(json, "stem"); - if (!JS_IsString(name) || !JS_IsString(stem)) + if (!JS_IsString(name)) { return false; } out->name = M_StringDuplicate(JS_GetString(name)); - out->stem = M_StringDuplicate(JS_GetString(stem)); + + const char *stem = JS_GetStringRef(json, "stem"); + if (!stem) + { + return false; + } json_t *type = JS_GetObject(json, "type"); if (!JS_IsNumber(type)) @@ -260,7 +264,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) for (int num = 0; num < 10; ++num) { - M_snprintf(lump, sizeof(lump), "%sNUM%d", out->stem, num); + M_snprintf(lump, sizeof(lump), "%sNUM%d", stem, num); found = W_CheckNumForName(lump); if (found < 0) { @@ -271,7 +275,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) maxwidth = MAX(maxwidth, SHORT(out->numbers[num]->width)); } - M_snprintf(lump, sizeof(lump), "%sMINUS", out->stem); + M_snprintf(lump, sizeof(lump), "%sMINUS", stem); found = W_CheckNumForName(lump); if (found >= 0) { @@ -279,7 +283,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) maxwidth = MAX(maxwidth, SHORT(out->minus->width)); } - M_snprintf(lump, sizeof(lump), "%sPRCNT", out->stem); + M_snprintf(lump, sizeof(lump), "%sPRCNT", stem); found = W_CheckNumForName(lump); if (found >= 0) { @@ -302,8 +306,28 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) return true; } -static void LoadHUDFont(hudfont_t *out) +static boolean ParseHUDFont(json_t *json, hudfont_t *out) { + json_t *name = JS_GetObject(json, "name"); + if (!JS_IsString(name)) + { + return false; + } + out->name = M_StringDuplicate(JS_GetString(name)); + + const char *stem = JS_GetStringRef(json, "stem"); + if (!stem) + { + return false; + } + + json_t *type = JS_GetObject(json, "type"); + if (!JS_IsNumber(type)) + { + return false; + } + out->type = JS_GetInteger(type); + char lump[9] = {0}; int found; int maxwidth = 0; @@ -311,7 +335,7 @@ static void LoadHUDFont(hudfont_t *out) for (int i = 0; i < HU_FONTSIZE; ++i) { - M_snprintf(lump, sizeof(lump), "%s%03d", out->stem, i + HU_FONTSTART); + M_snprintf(lump, sizeof(lump), "%s%03d", stem, i + HU_FONTSTART); found = W_CheckNumForName(lump); if (found < 0) { @@ -336,25 +360,6 @@ static void LoadHUDFont(hudfont_t *out) default: break; } -} - -static boolean ParseHUDFont(json_t *json, hudfont_t *out) -{ - json_t *name = JS_GetObject(json, "name"); - json_t *stem = JS_GetObject(json, "stem"); - if (!JS_IsString(name) || !JS_IsString(stem)) - { - return false; - } - out->name = M_StringDuplicate(JS_GetString(name)); - out->stem = M_StringDuplicate(JS_GetString(stem)); - - json_t *type = JS_GetObject(json, "type"); - if (!JS_IsNumber(type)) - { - return false; - } - out->type = JS_GetInteger(type); return true; } @@ -370,7 +375,7 @@ static boolean ParseStatusBar(json_t *json, statusbar_t *out) out->height = JS_GetInteger(height); out->fullscreenrender = JS_GetBoolean(fullscreenrender); - out->fillflat = JS_GetStringValue(json, "fillflat"); + out->fillflat = JS_GetStringCopy(json, "fillflat"); json_t *js_children = JS_GetObject(json, "children"); json_t *js_child = NULL; @@ -432,7 +437,6 @@ sbardef_t *ST_ParseSbarDef(void) hudfont_t hudfont = {0}; if (ParseHUDFont(js_hudfont, &hudfont)) { - LoadHUDFont(&hudfont); array_push(out->hudfonts, hudfont); } } @@ -466,12 +470,12 @@ sbardef_t *ST_ParseSbarDef(void) js_hudfonts = JS_GetObject(data, "hudfonts"); js_hudfont = NULL; + JS_ArrayForEach(js_hudfont, js_hudfonts) { hudfont_t hudfont = {0}; if (ParseHUDFont(js_hudfont, &hudfont)) { - LoadHUDFont(&hudfont); array_push(out->hudfonts, hudfont); } } diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 082733a1f..18660fac6 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -236,7 +236,6 @@ struct numberfont_s { const char *name; fonttype_t type; - const char *stem; int monowidth; patch_t *numbers[10]; patch_t *percent; @@ -254,7 +253,6 @@ struct hudfont_s { const char *name; fonttype_t type; - const char *stem; int monowidth; int maxheight; patch_t *characters[HU_FONTSIZE]; diff --git a/src/st_stuff.c b/src/st_stuff.c index beeabff32..0ef9c3137 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -113,17 +113,16 @@ static boolean sts_colored_numbers; static boolean sts_pct_always_gray; //jff 2/16/98 status color change levels -int ammo_red; // ammo percent less than which status is red -int ammo_yellow; // ammo percent less is yellow more green -int health_red; // health amount less than which status is red -int health_yellow; // health amount less than which status is yellow -int health_green; // health amount above is blue, below is green -int armor_red; // armor amount less than which status is red -int armor_yellow; // armor amount less than which status is yellow -int armor_green; // armor amount above is blue, below is green - -boolean hud_backpack_thresholds; // backpack changes thresholds -boolean hud_armor_type; // color of armor depends on type +static int ammo_red; // ammo percent less than which status is red +static int ammo_yellow; // ammo percent less is yellow more green +int health_red; // health amount less than which status is red +int health_yellow; // health amount less than which status is yellow +int health_green; // health amount above is blue, below is green +static int armor_red; // armor amount less than which status is red +static int armor_yellow; // armor amount less than which status is yellow +static int armor_green; // armor amount above is blue, below is green + +static boolean hud_armor_type; // color of armor depends on type // used for evil grin static boolean oldweaponsowned[NUMWEAPONS]; @@ -149,7 +148,7 @@ static int have_xdthfaces; // STATUS BAR CODE // -patch_t *CachePatchName(const char *name) +static patch_t *CachePatchName(const char *name) { int lumpnum = W_CheckNumForName(name); if (lumpnum < 0) @@ -1210,7 +1209,6 @@ static void DrawLines(int x, int y, sbarelem_t *elem) widgetline_t *line; array_foreach(line, widget->lines) { - int base_xoffset = line->xoffset; hudfont_t *font = widget->font; diff --git a/src/st_stuff.h b/src/st_stuff.h index d42712fcd..1c7db6ae0 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -63,26 +63,15 @@ extern boolean st_refresh_background; void ST_InitRes(void); -// killough 5/2/98: moved from m_misc.c: - extern int health_red; // health amount less than which status is red extern int health_yellow; // health amount less than which status is yellow extern int health_green; // health amount above is blue, below is green -extern int armor_red; // armor amount less than which status is red -extern int armor_yellow; // armor amount less than which status is yellow -extern int armor_green; // armor amount above is blue, below is green -extern int ammo_red; // ammo percent less than which status is red -extern int ammo_yellow; // ammo percent less is yellow more green #define KEYBLINKMASK 0x8 -#define KEYBLINKTICS (7*KEYBLINKMASK) +#define KEYBLINKTICS (7 * KEYBLINKMASK) extern void ST_SetKeyBlink(struct player_s *player, int blue, int yellow, int red); -extern int ST_BlinkKey(struct player_s *player, int index); extern int st_keyorskull[3]; -extern boolean hud_backpack_thresholds; // backpack changes thresholds -extern boolean hud_armor_type; // color of armor depends on type - extern boolean palette_changes; extern struct patch_s **hu_font; diff --git a/src/st_widgets.c b/src/st_widgets.c index 0666c4b03..bbc8f0cfb 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -888,7 +888,7 @@ static char* PrepareColor(const char *str, const char *col) char *str_replace, col_replace[16]; M_snprintf(col_replace, sizeof(col_replace), - "\x1b%c%s\x1b%c", '0'+CR_ORIG, col, '0'+CR_ORIG); + ORIG_S "%s" ORIG_S, col); str_replace = M_StringReplace(str, col, col_replace); return str_replace; From fcd2826061ddcd65a00ed86c8a56b4f4134f71f2 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 2 Oct 2024 08:08:21 +0700 Subject: [PATCH 39/55] add support for translucency, introduce -dumptranmap --- src/params.h | 1 + src/r_data.c | 19 +++++++++++++++++++ src/st_sbardef.c | 10 +++++++--- src/st_sbardef.h | 3 +-- src/st_stuff.c | 25 +++++++++++++++++-------- src/v_video.c | 11 +++++++++++ src/v_video.h | 2 ++ 7 files changed, 58 insertions(+), 13 deletions(-) diff --git a/src/params.h b/src/params.h index 4831e2851..004c49c84 100644 --- a/src/params.h +++ b/src/params.h @@ -58,6 +58,7 @@ static const char *params[] = { static const char *params_with_args[] = { "-config", +"-dumptranmap", "-file", "-iwad", "-save", diff --git a/src/r_data.c b/src/r_data.c index f8dd72821..432baa573 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -1044,6 +1044,25 @@ void R_InitTranMap(int progress) Z_ChangeTag(playpal, PU_CACHE); free(fname); } + + //! + // @category mod + // @arg + // + // Dump tranmap lump. + // + + int p = M_CheckParmWithArgs("-dumptranmap", 1); + if (p > 0) + { + char *path = malloc(strlen(myargv[p + 1]) + 5); + strcpy(path, myargv[p + 1]); + AddDefaultExtension(path, ".lmp"); + + M_WriteFile(path, main_tranmap, 256 * 256); + + free(path); + } } // diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 3d7cc3ae7..b37fb8969 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -78,10 +78,14 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, out->y_pos = JS_GetInteger(y_pos); out->alignment = JS_GetInteger(alignment); - out->tranmap = JS_GetStringValue(json, "tranmap"); - out->translation = JS_GetStringValue(json, "translation"); + const char *tranmap = JS_GetStringRef(json, "tranmap"); + if (tranmap) + { + out->tranmap = W_CacheLumpName(tranmap, PU_STATIC); + } - out->cr = out->translation ? V_CRByName(out->translation) : CR_NONE; + const char *translation = JS_GetStringRef(json, "translation"); + out->cr = translation ? V_CRByName(translation) : CR_NONE; out->crboom = CR_NONE; json_t *js_conditions = JS_GetObject(json, "conditions"); diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 18660fac6..c0a05f981 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -204,11 +204,10 @@ struct sbarelem_s int x_pos; int y_pos; sbaralignment_t alignment; - const char *tranmap; - const char *translation; sbarcondition_t *conditions; sbarelem_t *children; + byte *tranmap; crange_idx_e cr; crange_idx_e crboom; diff --git a/src/st_stuff.c b/src/st_stuff.c index 0ef9c3137..25c6fdb84 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1025,7 +1025,7 @@ static void ResetStatusBar(void) } static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, - crange_idx_e cr) + crange_idx_e cr, byte *tl) { if (!patch) { @@ -1065,7 +1065,14 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, } } - V_DrawPatchTranslated(x, y, patch, colrngs[cr]); + if (tl) + { + V_DrawPatchTL(x, y, patch, tl); + } + else + { + V_DrawPatchTranslated(x, y, patch, colrngs[cr]); + } } static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) @@ -1098,7 +1105,8 @@ static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) if (glyph) { DrawPatch(x + number->xoffset, y, elem->alignment, glyph, - elem->crboom == CR_NONE ? elem->cr : elem->crboom); + elem->crboom == CR_NONE ? elem->cr : elem->crboom, + elem->tranmap); } if (elem->alignment & sbe_h_middle) @@ -1145,8 +1153,8 @@ static void DrawGlyphLine(int x, int y, sbarelem_t *elem, widgetline_t *line, if (glyph) { - DrawPatch(x + line->xoffset, y, elem->alignment, glyph, - elem->crboom == CR_NONE ? elem->cr : elem->crboom); + DrawPatch(x + line->xoffset, y, elem->alignment, glyph, elem->cr, + elem->tranmap); } if (elem->alignment & sbe_h_middle) @@ -1273,7 +1281,8 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) case sbe_graphic: { sbe_graphic_t *graphic = elem->pointer.graphic; - DrawPatch(x, y, elem->alignment, graphic->patch, elem->cr); + DrawPatch(x, y, elem->alignment, graphic->patch, elem->cr, + elem->tranmap); } break; @@ -1281,7 +1290,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) { sbe_face_t *face = elem->pointer.face; DrawPatch(x, y, elem->alignment, facepatches[face->faceindex], - elem->cr); + elem->cr, elem->tranmap); } break; @@ -1289,7 +1298,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) { sbe_animation_t *animation = elem->pointer.animation; patch_t *patch = animation->frames[animation->frame_index].patch; - DrawPatch(x, y, elem->alignment, patch, elem->cr); + DrawPatch(x, y, elem->alignment, patch, elem->cr, elem->tranmap); } break; diff --git a/src/v_video.c b/src/v_video.c index c53181055..0eda259ce 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -299,6 +299,7 @@ static void (*drawcolfunc)(const patch_column_t *patchcol); DRAW_COLUMN(, source[frac >> FRACBITS]) DRAW_COLUMN(TR, translation[source[frac >> FRACBITS]]) DRAW_COLUMN(TRTR, translation2[translation1[source[frac >> FRACBITS]]]) +DRAW_COLUMN(TL, tranmap[(*dest << 8) + source[frac >> FRACBITS]]) static void DrawMaskedColumn(patch_column_t *patchcol, const int ytop, column_t *column) @@ -513,6 +514,16 @@ void V_DrawPatchTranslated(int x, int y, patch_t *patch, byte *outr) DrawPatchInternal(x, y, patch, false); } +void V_DrawPatchTL(int x, int y, struct patch_s *patch, byte *tl) +{ + x += video.deltaw; + + tranmap = tl; + drawcolfunc = DrawPatchColumnTL; + + DrawPatchInternal(x, y, patch, false); +} + void V_DrawPatchTRTR(int x, int y, patch_t *patch, byte *outr1, byte *outr2) { x += video.deltaw; diff --git a/src/v_video.h b/src/v_video.h index 842cb1ffd..934589e49 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -167,6 +167,8 @@ void V_DrawPatchTranslated(int x, int y, struct patch_s *patch, byte *outr); void V_DrawPatchTRTR(int x, int y, struct patch_s *patch, byte *outr1, byte *outr2); +void V_DrawPatchTL(int x, int y, struct patch_s *patch, byte *tl); + void V_DrawPatchFullScreen(struct patch_s *patch); // Draw a linear block of pixels into the view buffer. From 115f028c30899c28755f2c7b6c71b27efc59a0f4 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 2 Oct 2024 14:06:38 +0700 Subject: [PATCH 40/55] fix crosshair --- src/st_stuff.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 25c6fdb84..7a81fe7eb 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1692,10 +1692,7 @@ void ST_Start(void) ResetStatusBar(); - if (hud_crosshair) - { - HU_StartCrosshair(); - } + HU_StartCrosshair(); } patch_t **hu_font = NULL; From c48a0002ce8c7d3b292a45cbce7afa5dd05acb9a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 2 Oct 2024 14:57:04 +0700 Subject: [PATCH 41/55] support for both translation and tranmap at the same time --- src/st_stuff.c | 10 ++++++++-- src/v_video.c | 13 ++++++++++++- src/v_video.h | 2 ++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 7a81fe7eb..af695f476 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1065,13 +1065,19 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, } } - if (tl) + byte *outr = colrngs[cr]; + + if (outr && tl) + { + V_DrawPatchTRTL(x, y, patch, outr, tl); + } + else if (tl) { V_DrawPatchTL(x, y, patch, tl); } else { - V_DrawPatchTranslated(x, y, patch, colrngs[cr]); + V_DrawPatchTranslated(x, y, patch, outr); } } diff --git a/src/v_video.c b/src/v_video.c index 0eda259ce..29e3f0ce1 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -37,7 +37,6 @@ #include "m_swap.h" #include "r_data.h" #include "r_defs.h" -#include "r_draw.h" #include "r_state.h" #include "s_sound.h" #include "sounds.h" @@ -300,6 +299,7 @@ DRAW_COLUMN(, source[frac >> FRACBITS]) DRAW_COLUMN(TR, translation[source[frac >> FRACBITS]]) DRAW_COLUMN(TRTR, translation2[translation1[source[frac >> FRACBITS]]]) DRAW_COLUMN(TL, tranmap[(*dest << 8) + source[frac >> FRACBITS]]) +DRAW_COLUMN(TRTL, tranmap[(*dest << 8) + translation[source[frac >> FRACBITS]]]) static void DrawMaskedColumn(patch_column_t *patchcol, const int ytop, column_t *column) @@ -524,6 +524,17 @@ void V_DrawPatchTL(int x, int y, struct patch_s *patch, byte *tl) DrawPatchInternal(x, y, patch, false); } +void V_DrawPatchTRTL(int x, int y, struct patch_s *patch, byte *outr, byte *tl) +{ + x += video.deltaw; + + translation = outr; + tranmap = tl; + drawcolfunc = DrawPatchColumnTRTL; + + DrawPatchInternal(x, y, patch, false); +} + void V_DrawPatchTRTR(int x, int y, patch_t *patch, byte *outr1, byte *outr2) { x += video.deltaw; diff --git a/src/v_video.h b/src/v_video.h index 934589e49..be1e851cf 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -169,6 +169,8 @@ void V_DrawPatchTRTR(int x, int y, struct patch_s *patch, byte *outr1, void V_DrawPatchTL(int x, int y, struct patch_s *patch, byte *tl); +void V_DrawPatchTRTL(int x, int y, struct patch_s *patch, byte *outr, byte *tl); + void V_DrawPatchFullScreen(struct patch_s *patch); // Draw a linear block of pixels into the view buffer. From 6f49928acaec7ad5661e729e557502b2977f0d82 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 2 Oct 2024 22:56:20 +0700 Subject: [PATCH 42/55] fix colorized messages, cosmetic changes --- src/st_sbardef.c | 4 ++-- src/st_stuff.c | 5 +++-- src/st_widgets.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index b37fb8969..07e1dc09e 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -273,7 +273,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) if (found < 0) { I_Printf(VB_ERROR, "SBARDEF: patch \"%s\" not found", lump); - return false; + continue; } out->numbers[num] = V_CachePatchNum(found, PU_STATIC); maxwidth = MAX(maxwidth, SHORT(out->numbers[num]->width)); @@ -495,7 +495,7 @@ sbardef_t *ST_ParseSbarDef(void) sbarelem_t elem = {0}; if (ParseSbarElem(js_widget, &elem)) { - elem.y_pos += (statusbar->height - 200); + elem.y_pos += (statusbar->height - SCREENHEIGHT); array_push(statusbar->children, elem); } } diff --git a/src/st_stuff.c b/src/st_stuff.c index af695f476..4b1c1e831 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -166,7 +166,9 @@ static void LoadFacePatches(void) { char lump[9] = {0}; - for (int painface = 0; painface < ST_NUMPAINFACES; ++painface) + int painface; + + for (painface = 0; painface < ST_NUMPAINFACES; ++painface) { for (int straightface = 0; straightface < ST_NUMSTRAIGHTFACES; ++straightface) @@ -198,7 +200,6 @@ static void LoadFacePatches(void) array_push(facepatches, V_CachePatchName(lump, PU_STATIC)); // [FG] support face gib animations as in the 3DO/Jaguar/PSX ports - int painface; for (painface = 0; painface < ST_NUMXDTHFACES; ++painface) { M_snprintf(lump, sizeof(lump), "STFXDTH%d", painface); diff --git a/src/st_widgets.c b/src/st_widgets.c index bbc8f0cfb..2de1b48c2 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -922,6 +922,8 @@ void ST_InitWidgets(void) *colorize_strings[i].str = PrepareColor(*colorize_strings[i].str, colorize_strings[i].col); } + + ST_ResetMessageColors(); } void ST_ResetMessageColors(void) From deb884d89cfc874bfb4bd09bdad259575cf06a14 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 2 Oct 2024 22:57:01 +0700 Subject: [PATCH 43/55] fix check in draw string functions --- src/mn_setup.c | 21 +++++++++------------ src/st_stuff.c | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/mn_setup.c b/src/mn_setup.c index 00c9e60c6..e3ea68fe7 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -3565,21 +3565,18 @@ void MN_DrawStringCR(int cx, int cy, byte *cr1, byte *cr2, const char *ch) { c = *ch++; // get next char - if (c == '\x1b') + if (c == '\x1b' && *ch) { - if (ch) + c = *ch++; + if (c >= '0' && c <= '0' + CR_NONE) { - c = *ch++; - if (c >= '0' && c <= '0' + CR_NONE) - { - cr = colrngs[c - '0']; - } - else if (c == '0' + CR_ORIG) - { - cr = cr1; - } - continue; + cr = colrngs[c - '0']; } + else if (c == '0' + CR_ORIG) + { + cr = cr1; + } + continue; } c = M_ToUpper(c) - HU_FONTSTART; diff --git a/src/st_stuff.c b/src/st_stuff.c index 4b1c1e831..091882169 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1232,7 +1232,7 @@ static void DrawLines(int x, int y, sbarelem_t *elem) { int ch = *str++; - if (ch == '\x1b' && str) + if (ch == '\x1b' && *str) { ch = *str++; if (ch >= '0' && ch <= '0' + CR_NONE) From 78488d25687334499b960158b92d416e495cb204 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 00:39:23 +0700 Subject: [PATCH 44/55] fix string check, cosmetic changes --- src/st_stuff.c | 51 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 091882169..60dddaab7 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -755,7 +755,7 @@ static void UpdateLines(sbarelem_t *elem) while (*str) { int ch = *str++; - if (ch == '\x1b' && str) + if (ch == '\x1b' && *str) { ++str; continue; @@ -1386,45 +1386,42 @@ boolean st_refresh_background = true; static void DrawBackground(const char *name) { - if (!st_refresh_background) + if (st_refresh_background) { - V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, - ST_Y); - return; - } + V_UseBuffer(st_backing_screen); - V_UseBuffer(st_backing_screen); - - if (st_solidbackground) - { - DrawSolidBackground(); - } - else - { - if (!name) + if (st_solidbackground) { - name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; + DrawSolidBackground(); } + else + { + if (!name) + { + name = (gamemode == commercial) ? "GRNROCK" : "FLOOR7_2"; + } - byte *flat = V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); + byte *flat = + V_CacheFlatNum(firstflat + R_FlatNumForName(name), PU_CACHE); - V_TileBlock64(ST_Y, video.unscaledw, ST_HEIGHT, flat); + V_TileBlock64(ST_Y, video.unscaledw, ST_HEIGHT, flat); - if (screenblocks == 10) - { - patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); - for (int x = 0; x < video.unscaledw; x += 8) + if (screenblocks == 10) { - V_DrawPatch(x - video.deltaw, 0, patch); + patch_t *patch = V_CachePatchName("brdr_b", PU_CACHE); + for (int x = 0; x < video.unscaledw; x += 8) + { + V_DrawPatch(x - video.deltaw, 0, patch); + } } } - } - V_RestoreBuffer(); + V_RestoreBuffer(); - V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, ST_Y); + st_refresh_background = false; + } - st_refresh_background = false; + V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, ST_Y); } static int current_barindex; From b0398157d9b97dea8bb1e8c882b7db022f1a73dc Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 00:40:05 +0700 Subject: [PATCH 45/55] add "widget enabled" and "widget disabled" conditions --- base/all-all/sbardef.lmp | 28 ++++++++++++++++++++++ src/st_sbardef.h | 2 ++ src/st_stuff.c | 50 ++++++++++++++++++++++++++++++++++++++++ src/st_widgets.c | 2 +- src/st_widgets.h | 1 + 5 files changed, 82 insertions(+), 1 deletion(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index 2c2a964eb..d20c39dcc 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -874,6 +874,34 @@ { "condition": 19, "param": 6 + }, + { + "condition": 20, + "param": 0 + } + ], + "children": null + } + }, + { + "widget": + { + "x": 0, + "y": 160, + "alignment": 16, + "tranmap": null, + "translation": null, + "type": 1, + "font": "Digits", + "conditions": + [ + { + "condition": 19, + "param": 6 + }, + { + "condition": 21, + "param": 0 } ], "children": null diff --git a/src/st_sbardef.h b/src/st_sbardef.h index c0a05f981..160ab92a7 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -51,6 +51,8 @@ typedef enum // Woof! sbc_mode, + sbc_widgetenabled, + sbc_widgetdisabled, sbc_max, } sbarconditiontype_t; diff --git a/src/st_stuff.c b/src/st_stuff.c index 60dddaab7..4ed63c00c 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -358,6 +358,56 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) } break; + case sbc_widgetenabled: + { + switch ((sbarwidgettype_t)cond->param) + { + case sbw_monsec: + result &= !!hud_level_stats; + break; + case sbw_time: + result &= !!hud_level_time; + break; + case sbw_coord: + result &= !!hud_player_coords; + break; + case sbw_fps: + case sbw_rate: + break; + case sbw_cmd: + result &= !!hud_command_history; + break; + default: + break; + } + } + break; + + case sbc_widgetdisabled: + { + switch ((sbarwidgettype_t)cond->param) + { + case sbw_monsec: + result &= !hud_level_stats; + break; + case sbw_time: + result &= !hud_level_time; + break; + case sbw_coord: + result &= !hud_player_coords; + break; + case sbw_fps: + case sbw_rate: + break; + case sbw_cmd: + result &= !hud_command_history; + break; + default: + break; + } + } + break; + case sbc_none: default: result = false; diff --git a/src/st_widgets.c b/src/st_widgets.c index 2de1b48c2..cd27a2456 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -50,8 +50,8 @@ boolean hud_secret_message; // "A secret is revealed!" message widgetstate_t hud_level_stats; widgetstate_t hud_level_time; boolean hud_time_use; +widgetstate_t hud_player_coords; -static widgetstate_t hud_player_coords; static boolean hud_map_announce; static boolean message_colorized; diff --git a/src/st_widgets.h b/src/st_widgets.h index c5f09e81b..bce9bf1bd 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -42,6 +42,7 @@ extern boolean chat_on; extern widgetstate_t hud_level_stats; extern widgetstate_t hud_level_time; +extern widgetstate_t hud_player_coords; extern int hudcolor_titl; extern int hudcolor_xyco; From 34c497f8fdb2a2771fde318c210511c7ba6b1a61 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 00:53:55 +0700 Subject: [PATCH 46/55] fix time widget on intermission screen --- src/st_stuff.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 4ed63c00c..93d0c89c7 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1797,19 +1797,6 @@ void ST_ResetPalette(void) I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE)); } -static sbarelem_t st_time_elem = -{ - .type = sbe_widget, - .alignment = sbe_wide_left, - .pointer.widget = &(sbe_widget_t) - { - .type = sbw_time, - .font_name = "Digits" - }, - .cr = CR_NONE, - .crboom = CR_NONE -}; - // [FG] draw Time widget on intermission screen void WI_DrawWidgets(void) { @@ -1818,14 +1805,31 @@ void WI_DrawWidgets(void) return; } - player_t *player = &players[displayplayer]; - if (hud_level_time & HUD_WIDGET_HUD) { // leveltime is already added to totalleveltimes before WI_Start() - ST_UpdateWidget(&st_time_elem, player); - UpdateLines(&st_time_elem); - DrawLines(0, 0, &st_time_elem); + statusbar_t *statusbar; + array_foreach(statusbar, sbardef->statusbars) + { + sbarelem_t *elem; + array_foreach(elem, statusbar->children) + { + if (elem->type == sbe_widget) + { + sbe_widget_t *widget = elem->pointer.widget; + if (widget->type == sbw_time) + { + sbarelem_t time = *elem; + time.x_pos = 0; + time.y_pos = 0; + time.alignment = sbe_wide_left; + UpdateLines(&time); + DrawLines(0, 0, &time); + return; + } + } + } + } } } From f5d5cd1bdf7f7a6ed71d7dec734ab08a07e10fd7 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 01:21:52 +0700 Subject: [PATCH 47/55] fix inconsistency, simplify --- src/st_stuff.c | 58 ++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 93d0c89c7..af37b3623 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -216,6 +216,18 @@ static void LoadFacePatches(void) have_xdthfaces = painface; } +static boolean CheckWidgetState(widgetstate_t state) +{ + if ((state == HUD_WIDGET_AUTOMAP && automapactive) + || (state == HUD_WIDGET_HUD && !automapactive) + || (state == HUD_WIDGET_ALWAYS)) + { + return true; + } + + return false; +} + static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) { boolean result = true; @@ -360,51 +372,43 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) case sbc_widgetenabled: { + widgetstate_t state = HUD_WIDGET_OFF; switch ((sbarwidgettype_t)cond->param) { case sbw_monsec: - result &= !!hud_level_stats; + state = hud_level_stats; break; case sbw_time: - result &= !!hud_level_time; + state = hud_level_time; break; case sbw_coord: - result &= !!hud_player_coords; - break; - case sbw_fps: - case sbw_rate: - break; - case sbw_cmd: - result &= !!hud_command_history; + state = hud_player_coords; break; default: break; } + result &= CheckWidgetState(state); } break; case sbc_widgetdisabled: { + widgetstate_t state = HUD_WIDGET_OFF; switch ((sbarwidgettype_t)cond->param) { case sbw_monsec: - result &= !hud_level_stats; + state = hud_level_stats; break; case sbw_time: - result &= !hud_level_time; + state = hud_level_time; break; case sbw_coord: - result &= !hud_player_coords; - break; - case sbw_fps: - case sbw_rate: - break; - case sbw_cmd: - result &= !hud_command_history; + state = hud_player_coords; break; default: break; } + result &= !CheckWidgetState(state); } break; @@ -1814,19 +1818,13 @@ void WI_DrawWidgets(void) sbarelem_t *elem; array_foreach(elem, statusbar->children) { - if (elem->type == sbe_widget) + if (elem->type == sbe_widget + && elem->pointer.widget->type == sbw_time) { - sbe_widget_t *widget = elem->pointer.widget; - if (widget->type == sbw_time) - { - sbarelem_t time = *elem; - time.x_pos = 0; - time.y_pos = 0; - time.alignment = sbe_wide_left; - UpdateLines(&time); - DrawLines(0, 0, &time); - return; - } + sbarelem_t time = *elem; + time.alignment = sbe_wide_left; + DrawLines(0, 0, &time); + return; } } } From 3f4d588c17bd561e85cfc6f8c084d668762f8d65 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 10:24:29 +0700 Subject: [PATCH 48/55] don't update disabled statusbars --- src/st_stuff.c | 75 +++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index af37b3623..f47994120 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -132,6 +132,8 @@ int st_keyorskull[3]; static sbardef_t *sbardef; +static statusbar_t *statusbar; + typedef enum { st_original, @@ -970,6 +972,11 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) static void UpdateElem(sbarelem_t *elem, player_t *player) { + if (!CheckConditions(elem->conditions, player)) + { + return; + } + switch (elem->type) { case sbe_face: @@ -1004,14 +1011,19 @@ static void UpdateElem(sbarelem_t *elem, player_t *player) static void UpdateStatusBar(player_t *player) { - statusbar_t *statusbar; - array_foreach(statusbar, sbardef->statusbars) + int barindex = MAX(screenblocks - 10, 0); + + if (automapactive && automapoverlay == AM_OVERLAY_OFF) { - sbarelem_t *child; - array_foreach(child, statusbar->children) - { - UpdateElem(child, player); - } + barindex = 0; + } + + statusbar = &sbardef->statusbars[barindex]; + + sbarelem_t *child; + array_foreach(child, statusbar->children) + { + UpdateElem(child, player); } } @@ -1066,11 +1078,11 @@ static void ResetElem(sbarelem_t *elem) static void ResetStatusBar(void) { - statusbar_t *statusbar; - array_foreach(statusbar, sbardef->statusbars) + statusbar_t *local_statusbar; + array_foreach(local_statusbar, sbardef->statusbars) { sbarelem_t *child; - array_foreach(child, statusbar->children) + array_foreach(child, local_statusbar->children) { ResetElem(child); } @@ -1478,21 +1490,10 @@ static void DrawBackground(const char *name) V_CopyRect(0, 0, st_backing_screen, video.unscaledw, ST_HEIGHT, 0, ST_Y); } -static int current_barindex; - static void DrawStatusBar(void) { player_t *player = &players[displayplayer]; - int barindex = MAX(screenblocks - 10, 0); - - if (automapactive && automapoverlay == AM_OVERLAY_OFF) - { - barindex = 0; - } - - statusbar_t *statusbar = &sbardef->statusbars[barindex]; - if (!statusbar->fullscreenrender) { DrawBackground(statusbar->fillflat); @@ -1503,8 +1504,6 @@ static void DrawStatusBar(void) { DrawElem(0, SCREENHEIGHT - statusbar->height, child, player); } - - current_barindex = barindex; } static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) @@ -1559,7 +1558,6 @@ void ST_Erase(void) } player_t *player = &players[displayplayer]; - statusbar_t *statusbar = &sbardef->statusbars[current_barindex]; sbarelem_t *child; array_foreach(child, statusbar->children) @@ -1804,29 +1802,24 @@ void ST_ResetPalette(void) // [FG] draw Time widget on intermission screen void WI_DrawWidgets(void) { - if (!sbardef) + if (!statusbar || !(hud_level_time & HUD_WIDGET_HUD)) { return; } - if (hud_level_time & HUD_WIDGET_HUD) + player_t *player = &players[displayplayer]; + + sbarelem_t *elem; + array_foreach(elem, statusbar->children) { - // leveltime is already added to totalleveltimes before WI_Start() - statusbar_t *statusbar; - array_foreach(statusbar, sbardef->statusbars) + if (elem->type == sbe_widget + && elem->pointer.widget->type == sbw_time + && CheckConditions(elem->conditions, player)) { - sbarelem_t *elem; - array_foreach(elem, statusbar->children) - { - if (elem->type == sbe_widget - && elem->pointer.widget->type == sbw_time) - { - sbarelem_t time = *elem; - time.alignment = sbe_wide_left; - DrawLines(0, 0, &time); - return; - } - } + sbarelem_t time = *elem; + time.alignment = sbe_wide_left; + DrawLines(0, 0, &time); + return; } } } From 45ef6caca39b6eadbccf0fa4a23e4a51190e77a3 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 12:09:56 +0700 Subject: [PATCH 49/55] simplify WI_DrawWidgets --- src/st_stuff.c | 21 +++++---------------- src/st_widgets.c | 3 +++ src/st_widgets.h | 2 ++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index f47994120..2dba49a70 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1802,26 +1802,15 @@ void ST_ResetPalette(void) // [FG] draw Time widget on intermission screen void WI_DrawWidgets(void) { - if (!statusbar || !(hud_level_time & HUD_WIDGET_HUD)) + if (!st_time_elem || !(hud_level_time & HUD_WIDGET_HUD)) { return; } - player_t *player = &players[displayplayer]; - - sbarelem_t *elem; - array_foreach(elem, statusbar->children) - { - if (elem->type == sbe_widget - && elem->pointer.widget->type == sbw_time - && CheckConditions(elem->conditions, player)) - { - sbarelem_t time = *elem; - time.alignment = sbe_wide_left; - DrawLines(0, 0, &time); - return; - } - } + sbarelem_t time = *st_time_elem; + time.alignment = sbe_wide_left; + // leveltime is already added to totalleveltimes before WI_Start() + DrawLines(0, 0, &time); } void ST_BindSTSVariables(void) diff --git a/src/st_widgets.c b/src/st_widgets.c index cd27a2456..3886ec7a5 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -936,6 +936,8 @@ void ST_ResetMessageColors(void) } } +sbarelem_t *st_time_elem = NULL; + void ST_UpdateWidget(sbarelem_t *elem, player_t *player) { sbe_widget_t *widget = elem->pointer.widget; @@ -959,6 +961,7 @@ void ST_UpdateWidget(sbarelem_t *elem, player_t *player) UpdateMonSec(widget); break; case sbw_time: + st_time_elem = elem; UpdateStTime(widget, player); break; case sbw_coord: diff --git a/src/st_widgets.h b/src/st_widgets.h index bce9bf1bd..c76985294 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -48,6 +48,8 @@ extern int hudcolor_xyco; extern boolean hud_time_use; +extern struct sbarelem_s *st_time_elem; + void ST_ResetTitle(void); void ST_ClearLines(struct sbe_widget_s *widget); From 51f416e5529b46800b3e135e0cfb06305de4091b Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 3 Oct 2024 16:29:17 +0700 Subject: [PATCH 50/55] refresh solid background and crosshair --- src/mn_setup.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mn_setup.c b/src/mn_setup.c index d3f73cdec..3b7c7a815 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -1799,6 +1799,11 @@ static void SizeDisplayAlt(void) R_SetViewSize(screenblocks); } +static void RefreshSolidBackground(void) +{ + st_refresh_background = true; +} + static const char *screensize_strings[] = { "", "", "", "Status Bar", "Status Bar", "Status Bar", "Status Bar", "Status Bar", "Status Bar", "Status Bar", @@ -1830,7 +1835,8 @@ static setup_menu_t stat_settings1[] = { {"Gray Percent Sign", S_ONOFF | S_COSMETIC, H_X, M_SPC, {"sts_pct_always_gray"}}, - {"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"}}, + {"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"}, + .action = RefreshSolidBackground}, {"Armor Color Matches Type", S_ONOFF, H_X, M_SPC, {"hud_armor_type"}}, @@ -1923,6 +1929,8 @@ static void UpdateCrosshairItems(void) DisableItem( !(hud_crosshair && hud_crosshair_target == crosstarget_highlight), stat_settings3, "hud_crosshair_target_color"); + + HU_StartCrosshair(); } // Setting up for the Status Bar / HUD screen. Turn on flags, set pointers, From 9122d6a3691358ae2ecedb4e1350be2ecaa4523c Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 4 Oct 2024 22:26:04 +0700 Subject: [PATCH 51/55] use maximum font height for alignment Fix apostrophe in "Console" font. --- src/st_sbardef.c | 4 ++++ src/st_sbardef.h | 1 + src/st_stuff.c | 27 +++++++++++++++------------ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index 07e1dc09e..d857c530b 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -265,6 +265,7 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) char lump[9] = {0}; int found; int maxwidth = 0; + int maxheight = 0; for (int num = 0; num < 10; ++num) { @@ -277,8 +278,11 @@ static boolean ParseNumberFont(json_t *json, numberfont_t *out) } out->numbers[num] = V_CachePatchNum(found, PU_STATIC); maxwidth = MAX(maxwidth, SHORT(out->numbers[num]->width)); + maxheight = MAX(maxheight, SHORT(out->numbers[num]->height)); } + out->maxheight = maxheight; + M_snprintf(lump, sizeof(lump), "%sMINUS", stem); found = W_CheckNumForName(lump); if (found >= 0) diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 160ab92a7..bb165651d 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -238,6 +238,7 @@ struct numberfont_s const char *name; fonttype_t type; int monowidth; + int maxheight; patch_t *numbers[10]; patch_t *percent; patch_t *minus; diff --git a/src/st_stuff.c b/src/st_stuff.c index 2dba49a70..030e12c16 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1091,8 +1091,8 @@ static void ResetStatusBar(void) ST_ResetTitle(); } -static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, - crange_idx_e cr, byte *tl) +static void DrawPatch(int x, int y, int maxheight, sbaralignment_t alignment, + patch_t *patch, crange_idx_e cr, byte *tl) { if (!patch) { @@ -1100,7 +1100,7 @@ static void DrawPatch(int x, int y, sbaralignment_t alignment, patch_t *patch, } int width = SHORT(patch->width); - int height = SHORT(patch->height); + int height = maxheight ? maxheight : SHORT(patch->height); if (alignment & sbe_h_middle) { @@ -1177,8 +1177,8 @@ static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) if (glyph) { - DrawPatch(x + number->xoffset, y, elem->alignment, glyph, - elem->crboom == CR_NONE ? elem->cr : elem->crboom, + DrawPatch(x + number->xoffset, y, font->maxheight, elem->alignment, + glyph, elem->crboom == CR_NONE ? elem->cr : elem->crboom, elem->tranmap); } @@ -1226,8 +1226,8 @@ static void DrawGlyphLine(int x, int y, sbarelem_t *elem, widgetline_t *line, if (glyph) { - DrawPatch(x + line->xoffset, y, elem->alignment, glyph, elem->cr, - elem->tranmap); + DrawPatch(x + line->xoffset, y, font->maxheight, elem->alignment, glyph, + elem->cr, elem->tranmap); } if (elem->alignment & sbe_h_middle) @@ -1354,7 +1354,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) case sbe_graphic: { sbe_graphic_t *graphic = elem->pointer.graphic; - DrawPatch(x, y, elem->alignment, graphic->patch, elem->cr, + DrawPatch(x, y, 0, elem->alignment, graphic->patch, elem->cr, elem->tranmap); } break; @@ -1362,16 +1362,19 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) case sbe_face: { sbe_face_t *face = elem->pointer.face; - DrawPatch(x, y, elem->alignment, facepatches[face->faceindex], - elem->cr, elem->tranmap); + DrawPatch(x, y, 0, elem->alignment, + facepatches[face->faceindex], elem->cr, + elem->tranmap); } break; case sbe_animation: { sbe_animation_t *animation = elem->pointer.animation; - patch_t *patch = animation->frames[animation->frame_index].patch; - DrawPatch(x, y, elem->alignment, patch, elem->cr, elem->tranmap); + patch_t *patch = + animation->frames[animation->frame_index].patch; + DrawPatch(x, y, 0, elem->alignment, patch, elem->cr, + elem->tranmap); } break; From 4efef70e7d4ea6d3ac1347efadbc6b5b069072ca Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 4 Oct 2024 22:29:27 +0700 Subject: [PATCH 52/55] rename pointer->subtype --- src/st_sbardef.c | 10 +++++----- src/st_sbardef.h | 2 +- src/st_stuff.c | 34 +++++++++++++++++----------------- src/st_widgets.c | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/st_sbardef.c b/src/st_sbardef.c index d857c530b..0dfa5b057 100644 --- a/src/st_sbardef.c +++ b/src/st_sbardef.c @@ -121,7 +121,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, return false; } graphic->patch_name = M_StringDuplicate(JS_GetString(patch)); - out->pointer.graphic = graphic; + out->subtype.graphic = graphic; } break; @@ -138,7 +138,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, array_push(animation->frames, frame); } } - out->pointer.animation = animation; + out->subtype.animation = animation; } break; @@ -164,7 +164,7 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, number->type = JS_GetInteger(type); number->param = JS_GetInteger(param); number->maxlength = JS_GetInteger(maxlength); - out->pointer.number = number; + out->subtype.number = number; } break; @@ -197,14 +197,14 @@ static boolean ParseSbarElemType(json_t *json, sbarelementtype_t type, break; } - out->pointer.widget = widget; + out->subtype.widget = widget; } break; case sbe_face: { sbe_face_t *face = calloc(1, sizeof(*face)); - out->pointer.face = face; + out->subtype.face = face; } break; diff --git a/src/st_sbardef.h b/src/st_sbardef.h index bb165651d..35e7cee72 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -222,7 +222,7 @@ struct sbarelem_s // Woof! sbe_widget_t *widget; - } pointer; + } subtype; }; typedef struct diff --git a/src/st_stuff.c b/src/st_stuff.c index 030e12c16..baf32b890 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -713,7 +713,7 @@ static void UpdateFace(sbe_face_t *face, player_t *player) static void UpdateNumber(sbarelem_t *elem, player_t *player) { - sbe_number_t *number = elem->pointer.number; + sbe_number_t *number = elem->subtype.number; int value = ResolveNumber(number, player); int power = (value < 0 ? number->maxlength - 1 : number->maxlength); @@ -788,7 +788,7 @@ static void UpdateNumber(sbarelem_t *elem, player_t *player) static void UpdateLines(sbarelem_t *elem) { - sbe_widget_t *widget = elem->pointer.widget; + sbe_widget_t *widget = elem->subtype.widget; hudfont_t *font = widget->font; if (font == NULL) @@ -856,7 +856,7 @@ static void UpdateLines(sbarelem_t *elem) static void UpdateAnimation(sbarelem_t *elem) { - sbe_animation_t *animation = elem->pointer.animation; + sbe_animation_t *animation = elem->subtype.animation; if (animation->duration_left == 0) { @@ -879,7 +879,7 @@ static void UpdateBoomColors(sbarelem_t *elem, player_t *player) return; } - sbe_number_t *number = elem->pointer.number; + sbe_number_t *number = elem->subtype.number; boolean invul = (player->powers[pw_invulnerability] || player->cheats & CF_GODMODE); @@ -980,7 +980,7 @@ static void UpdateElem(sbarelem_t *elem, player_t *player) switch (elem->type) { case sbe_face: - UpdateFace(elem->pointer.face, player); + UpdateFace(elem->subtype.face, player); break; case sbe_animation: @@ -1033,14 +1033,14 @@ static void ResetElem(sbarelem_t *elem) { case sbe_graphic: { - sbe_graphic_t *graphic = elem->pointer.graphic; + sbe_graphic_t *graphic = elem->subtype.graphic; graphic->patch = CachePatchName(graphic->patch_name); } break; case sbe_face: { - sbe_face_t *face = elem->pointer.face; + sbe_face_t *face = elem->subtype.face; face->faceindex = 0; face->facecount = 0; face->oldhealth = -1; @@ -1049,7 +1049,7 @@ static void ResetElem(sbarelem_t *elem) case sbe_animation: { - sbe_animation_t *animation = elem->pointer.animation; + sbe_animation_t *animation = elem->subtype.animation; sbarframe_t *frame; array_foreach(frame, animation->frames) { @@ -1062,7 +1062,7 @@ static void ResetElem(sbarelem_t *elem) case sbe_number: case sbe_percent: - elem->pointer.number->oldvalue = -1; + elem->subtype.number->oldvalue = -1; break; default: @@ -1150,7 +1150,7 @@ static void DrawPatch(int x, int y, int maxheight, sbaralignment_t alignment, static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) { - sbe_number_t *number = elem->pointer.number; + sbe_number_t *number = elem->subtype.number; numberfont_t *font = number->font; int width, widthdiff; @@ -1199,7 +1199,7 @@ static void DrawGlyphNumber(int x, int y, sbarelem_t *elem, patch_t *glyph) static void DrawGlyphLine(int x, int y, sbarelem_t *elem, widgetline_t *line, patch_t *glyph) { - sbe_widget_t *widget = elem->pointer.widget; + sbe_widget_t *widget = elem->subtype.widget; hudfont_t *font = widget->font; int width, widthdiff; @@ -1246,7 +1246,7 @@ static void DrawGlyphLine(int x, int y, sbarelem_t *elem, widgetline_t *line, static void DrawNumber(int x, int y, sbarelem_t *elem) { - sbe_number_t *number = elem->pointer.number; + sbe_number_t *number = elem->subtype.number; int value = number->value; int base_xoffset = number->xoffset; @@ -1283,7 +1283,7 @@ static void DrawNumber(int x, int y, sbarelem_t *elem) static void DrawLines(int x, int y, sbarelem_t *elem) { - sbe_widget_t *widget = elem->pointer.widget; + sbe_widget_t *widget = elem->subtype.widget; int cr = elem->cr; @@ -1353,7 +1353,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) { case sbe_graphic: { - sbe_graphic_t *graphic = elem->pointer.graphic; + sbe_graphic_t *graphic = elem->subtype.graphic; DrawPatch(x, y, 0, elem->alignment, graphic->patch, elem->cr, elem->tranmap); } @@ -1361,7 +1361,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) case sbe_face: { - sbe_face_t *face = elem->pointer.face; + sbe_face_t *face = elem->subtype.face; DrawPatch(x, y, 0, elem->alignment, facepatches[face->faceindex], elem->cr, elem->tranmap); @@ -1370,7 +1370,7 @@ static void DrawElem(int x, int y, sbarelem_t *elem, player_t *player) case sbe_animation: { - sbe_animation_t *animation = elem->pointer.animation; + sbe_animation_t *animation = elem->subtype.animation; patch_t *patch = animation->frames[animation->frame_index].patch; DrawPatch(x, y, 0, elem->alignment, patch, elem->cr, @@ -1521,7 +1521,7 @@ static void EraseElem(int x, int y, sbarelem_t *elem, player_t *player) if (elem->type == sbe_widget) { - sbe_widget_t *widget = elem->pointer.widget; + sbe_widget_t *widget = elem->subtype.widget; hudfont_t *font = widget->font; int height = 0; diff --git a/src/st_widgets.c b/src/st_widgets.c index 3886ec7a5..09e339b70 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -940,7 +940,7 @@ sbarelem_t *st_time_elem = NULL; void ST_UpdateWidget(sbarelem_t *elem, player_t *player) { - sbe_widget_t *widget = elem->pointer.widget; + sbe_widget_t *widget = elem->subtype.widget; switch (widget->type) { From e9af358ff994c25843e05c0791994ec11c538ae3 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sun, 6 Oct 2024 18:22:49 +0700 Subject: [PATCH 53/55] fix labels --- src/st_sbardef.h | 2 +- src/st_stuff.c | 2 +- src/st_widgets.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/st_sbardef.h b/src/st_sbardef.h index 35e7cee72..353b98770 100644 --- a/src/st_sbardef.h +++ b/src/st_sbardef.h @@ -50,7 +50,7 @@ typedef enum sbc_hudmodeequal, // Woof! - sbc_mode, + sbc_widgetmode, sbc_widgetenabled, sbc_widgetdisabled, diff --git a/src/st_stuff.c b/src/st_stuff.c index baf32b890..ff89f317e 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -353,7 +353,7 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player) result &= (!!cond->param == false); break; - case sbc_mode: + case sbc_widgetmode: { int enabled = 0; if (cond->param & sbc_mode_overlay) diff --git a/src/st_widgets.c b/src/st_widgets.c index 09e339b70..212c028b9 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -609,7 +609,7 @@ void ST_ResetTitle(void) *n = '\0'; } - M_StringCopy(title_string, s, sizeof(title_string)); + M_StringConcat(title_string, s, sizeof(title_string)); if (hud_map_announce && leveltime == 0) { From 70e9a52a59268cdda9a254d9d7276bc5553b00a3 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sun, 6 Oct 2024 20:12:14 +0700 Subject: [PATCH 54/55] another fix of map title --- src/st_widgets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/st_widgets.c b/src/st_widgets.c index 212c028b9..83bbe4cf0 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -553,6 +553,8 @@ static char title_string[HU_MAXLINELENGTH]; void ST_ResetTitle(void) { + title_string[0] = '\0'; + char *s; if (gamemapinfo && gamemapinfo->levelname) From 28b1fbf5b9601cc3725191eaf51b39f2613148a7 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 10 Oct 2024 08:12:13 +0700 Subject: [PATCH 55/55] add 2px gap for monsec and time widgets --- base/all-all/sbardef.lmp | 10 +++++----- base/all-all/sbhuddef.lmp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/all-all/sbardef.lmp b/base/all-all/sbardef.lmp index d20c39dcc..65adc53ae 100644 --- a/base/all-all/sbardef.lmp +++ b/base/all-all/sbardef.lmp @@ -842,7 +842,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 160, "alignment": 16, "tranmap": null, @@ -862,7 +862,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 153, "alignment": 16, "tranmap": null, @@ -886,7 +886,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 160, "alignment": 16, "tranmap": null, @@ -910,7 +910,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 152, "alignment": 16, "tranmap": null, @@ -930,7 +930,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 146, "alignment": 16, "tranmap": null, diff --git a/base/all-all/sbhuddef.lmp b/base/all-all/sbhuddef.lmp index 2175647ba..678e58cb4 100644 --- a/base/all-all/sbhuddef.lmp +++ b/base/all-all/sbhuddef.lmp @@ -21,7 +21,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 160, "alignment": 16, "tranmap": null, @@ -41,7 +41,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 153, "alignment": 16, "tranmap": null, @@ -61,7 +61,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 152, "alignment": 16, "tranmap": null, @@ -81,7 +81,7 @@ { "widget": { - "x": 0, + "x": 2, "y": 146, "alignment": 16, "tranmap": null,