MCPcopy Create free account
hub / github.com/NetHack/NetHack / ReDisplayData

Function ReDisplayData

sys/amiga/winamenu.c:1085–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1083}
1084
1085void
1086ReDisplayData(winid win)
1087{
1088 int totalvis;
1089 struct amii_WinDesc *cw;
1090 struct Window *w;
1091 struct Gadget *gd;
1092 unsigned long hidden, aidx, wheight;
1093 struct PropInfo *pip;
1094
1095 if (win == WIN_ERR || !(cw = amii_wins[win]) || !(w = cw->win))
1096 return;
1097
1098 for (gd = w->FirstGadget; gd && gd->GadgetID != 1;)
1099 gd = gd->NextGadget;
1100
1101 if (!gd)
1102 return;
1103
1104 wheight =
1105 (w->Height - w->BorderTop - w->BorderBottom - 2) / w->RPort->TxHeight;
1106
1107 pip = (struct PropInfo *) gd->SpecialInfo;
1108 totalvis = CountLines(win);
1109 hidden = max(totalvis - wheight, 0);
1110 aidx = (((ULONG) hidden * pip->VertPot) + (MAXPOT / 2)) >> 16;
1111 clear_nhwindow(win);
1112 DisplayData(win, aidx);
1113}
1114
1115long
1116FindLine(winid win, int line)

Callers 1

ProcessMessageFunction · 0.85

Calls 2

CountLinesFunction · 0.85
DisplayDataFunction · 0.85

Tested by

no test coverage detected