MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / TelcomRenderDrawHiLites

Function TelcomRenderDrawHiLites

Descent3/TelCom.cpp:1922–1958  ·  view source on GitHub ↗

Renders the screen hilights

Source from the content-addressed store, hash-verified

1920
1921// Renders the screen hilights
1922void TelcomRenderDrawHiLites(void) {
1923 float alphas[4];
1924
1925 rend_SetAlphaType(AT_SATURATE_TEXTURE_VERTEX);
1926 rend_SetAlphaValue(120);
1927 rend_SetLighting(LS_NONE);
1928 rend_SetColorModel(CM_MONO);
1929 rend_SetOverlayType(OT_NONE);
1930 rend_SetFiltering(0);
1931 rend_SetWrapType(WT_CLAMP);
1932
1933 alphas[0] = 0.3f;
1934 alphas[1] = 0.3f;
1935 alphas[2] = 0;
1936 alphas[3] = 0;
1937
1938 for (int monitor = 0; monitor < MAX_MONITOR; monitor++) {
1939 if ((!TelcomHiLiteCount[monitor]) || (!TelcomHiLites[monitor]))
1940 continue;
1941
1942 int curr_x, curr_y, i, w, h;
1943 int *HiLites;
1944
1945 curr_x = TelcomHiLiteOffset[monitor].x + Telcom_system.Monitor_coords[monitor].left;
1946 curr_y = TelcomHiLiteOffset[monitor].y + Telcom_system.Monitor_coords[monitor].top;
1947 HiLites = TelcomHiLites[monitor];
1948
1949 for (i = 0; i < TelcomHiLiteCount[monitor]; i++) {
1950 w = bm_w(HiLites[i], 0);
1951 h = bm_h(HiLites[i], 0);
1952 rend_DrawScaledBitmap(curr_x, curr_y, curr_x + w, curr_y + h, HiLites[i], 0, 0, 1, 1, -1, alphas);
1953 curr_x += w;
1954 }
1955 }
1956
1957 rend_SetFiltering(1);
1958}
1959
1960// Loads the Hilites for a monitor
1961void TelcomLoadHiLites(const char *filelist[], int monitor, int xoff, int yoff) {

Callers 1

TelcomRenderOverlaysFunction · 0.85

Calls 10

bm_wFunction · 0.85
bm_hFunction · 0.85
rend_SetAlphaTypeFunction · 0.50
rend_SetAlphaValueFunction · 0.50
rend_SetLightingFunction · 0.50
rend_SetColorModelFunction · 0.50
rend_SetOverlayTypeFunction · 0.50
rend_SetFilteringFunction · 0.50
rend_SetWrapTypeFunction · 0.50
rend_DrawScaledBitmapFunction · 0.50

Tested by

no test coverage detected