Amiga: drop redundant 'either windowtype' guards

Six if(WINVERS_AMIV || WINVERS_AMII) sites are always true with
amitty.c gone.
This commit is contained in:
Ingo Paschke
2026-05-11 20:51:06 +02:00
parent 5d86dfccb5
commit c85a8cf607
3 changed files with 48 additions and 61 deletions
+14 -18
View File
@@ -360,10 +360,8 @@ DoMenuScroll(int win, int blocking, int how, menu_item **retmip)
}
nw->Height = min(ysize, amiIDisplay->ypix - nw->TopEdge);
if (WINVERS_AMIV || WINVERS_AMII) {
/* Make sure we are using the correct hook structure */
nw->Extension = cw->wintags;
}
/* Make sure we are using the correct hook structure */
nw->Extension = cw->wintags;
/* Now, open the window */
w = cw->win = OpenShWindow((void *) nw);
@@ -535,21 +533,19 @@ DoMenuScroll(int win, int blocking, int how, menu_item **retmip)
* amii_cl_end if window shrinks and columns decrease.
*/
if (WINVERS_AMII || WINVERS_AMIV) {
amii_setfillpens(w, cw->type);
SetDrMd(w->RPort, JAM2);
x2 = w->Width - w->BorderRight;
y2 = w->Height - w->BorderBottom;
x1 = x2 - w->IFont->tf_XSize - w->IFont->tf_XSize;
y1 = w->BorderTop;
if (x1 < w->BorderLeft)
x1 = w->BorderLeft;
RectFill(w->RPort, x1, y1, x2, y2);
amii_setfillpens(w, cw->type);
SetDrMd(w->RPort, JAM2);
x2 = w->Width - w->BorderRight;
y2 = w->Height - w->BorderBottom;
x1 = x2 - w->IFont->tf_XSize - w->IFont->tf_XSize;
y1 = w->BorderTop;
if (x1 < w->BorderLeft)
x1 = w->BorderLeft;
y1 = y1 - w->IFont->tf_YSize;
RectFill(w->RPort, x1, y1, x2, y2);
RefreshWindowFrame(w);
}
RectFill(w->RPort, x1, y1, x2, y2);
x1 = w->BorderLeft;
y1 = y1 - w->IFont->tf_YSize;
RectFill(w->RPort, x1, y1, x2, y2);
RefreshWindowFrame(w);
/* Make the prop gadget the right size and place */
+19 -22
View File
@@ -538,29 +538,26 @@ amii_create_nhwindow(int type)
wd = (struct amii_WinDesc *) alloc(sizeof(struct amii_WinDesc));
memset(wd, 0, sizeof(struct amii_WinDesc));
/* Both, since user may have changed the pen settings so respect those */
if (WINVERS_AMII || WINVERS_AMIV) {
/* Special backfill for these types of layers */
switch (type) {
case NHW_MESSAGE:
case NHW_STATUS:
case NHW_TEXT:
case NHW_MENU:
case NHW_BASE:
case NHW_OVER:
case NHW_MAP:
if (wd) {
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) type;
fillhook.h_SubEntry = 0;
wd->hook = alloc(sizeof(fillhook));
memcpy(wd->hook, &fillhook, sizeof(fillhook));
memcpy(wd->wintags, wintags, sizeof(wd->wintags));
wd->wintags[0].ti_Data = (long) wd->hook;
nw->Extension = (void *) wd->wintags;
}
break;
/* Special backfill for these types of layers */
switch (type) {
case NHW_MESSAGE:
case NHW_STATUS:
case NHW_TEXT:
case NHW_MENU:
case NHW_BASE:
case NHW_OVER:
case NHW_MAP:
if (wd) {
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) type;
fillhook.h_SubEntry = 0;
wd->hook = alloc(sizeof(fillhook));
memcpy(wd->hook, &fillhook, sizeof(fillhook));
memcpy(wd->wintags, wintags, sizeof(wd->wintags));
wd->wintags[0].ti_Data = (long) wd->hook;
nw->Extension = (void *) wd->wintags;
}
break;
}
/* Don't open MENU or TEXT windows yet */
+15 -21
View File
@@ -108,13 +108,11 @@ EditColor(void)
((struct PropInfo *) Col_RedPen.SpecialInfo)->Flags |= PROPNEWLOOK;
((struct PropInfo *) Col_GreenPen.SpecialInfo)->Flags |= PROPNEWLOOK;
}
if (WINVERS_AMIV || WINVERS_AMII) {
Col_NewWindowStructure1.Extension = wintags;
Col_NewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
}
Col_NewWindowStructure1.Extension = wintags;
Col_NewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
nw = OpenWindow((void *) &Col_NewWindowStructure1);
@@ -360,13 +358,11 @@ EditClipping(void)
((struct PropInfo *) ClipXCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
((struct PropInfo *) ClipYCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
}
if (WINVERS_AMIV || WINVERS_AMII) {
ClipNewWindowStructure1.Extension = wintags;
ClipNewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
}
ClipNewWindowStructure1.Extension = wintags;
ClipNewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
nw = OpenWindow((void *) &ClipNewWindowStructure1);
@@ -807,13 +803,11 @@ getlind(const char *prompt, char *bufp, const char *dflt)
once = 1;
}
if (WINVERS_AMIV || WINVERS_AMII) {
StrWindow.Extension = wintags;
StrWindow.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
}
StrWindow.Extension = wintags;
StrWindow.Flags |= WFLG_NW_EXTENDED;
fillhook.h_Entry = (void *) &LayerFillHook;
fillhook.h_Data = (void *) -2;
fillhook.h_SubEntry = 0;
if ((cwin = OpenWindow((void *) &StrWindow)) == NULL) {
return;