|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 778 (0x30a)
Types: TextFile
Names: »contained.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Empire/contained.c«
#include <curses.h>
/*
* returns true (1) if sector "inside" is all inside of sector "outside"
*/
contained_(inside, outside)
int *inside, *outside;
{
int minX, minY, maxX, maxY;
int lowX, lowY, highX, highY;
minY = kline_(&minX, outside);
minY /= 100;
maxX = minX + (COLS - 10) - 1;
maxY = minY + (LINES - 4) - 1;
lowY = old_kline_(&lowX, inside);
lowY /= 100;
highX = lowX + 70 - 1;
highY = lowY + 20 - 1;
if (minX <= lowX && minY <= lowY && maxX >= highX && maxY >= highY)
return (1);
else
return (0);
}
/*
* Changes jector (0->9) to ki (x offset) and line (returned) * 100
*/
old_kline_(ki, jector)
int *ki, *jector;
{
int ject;
*ki = 0;
ject = *jector;
if ( *jector > 4) {
*ki = 30;
ject = ject - 5;
}
return ((ject * 10) * 100);
}