Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
/* Draw a small landing beacon on a CoCo 3. Link bgraph. */
|
||||
#include <coco.h>
|
||||
#include <Primitive.h>
|
||||
|
||||
/* BGraph's 320x16 routines use 160 bytes per row. We need just 13 rows. */
|
||||
enum { SIDE = 13, MIDDLE = 6, STRIDE = 160, INK = 3 };
|
||||
static byte stamp[SIDE * STRIDE];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
byte x, y;
|
||||
byte *slots = (byte *) 0xFFB0;
|
||||
byte oldPaper = slots[0] & 63, oldInk = slots[INK] & 63;
|
||||
if (!hscreen(2))
|
||||
return 1;
|
||||
paletteRGB(0, 0, 0, 0);
|
||||
paletteRGB(INK, 3, 3, 3);
|
||||
for (x = 0; x < SIDE; ++x)
|
||||
{
|
||||
Primitive_setPixel320x16(x, MIDDLE, INK, stamp);
|
||||
Primitive_setPixel320x16(MIDDLE, x, INK, stamp);
|
||||
}
|
||||
|
||||
/* Let Disk BASIC find the visible page. Magnify each stamp dot 3 by 3. */
|
||||
for (y = 0; y < SIDE; ++y)
|
||||
for (x = 0; x < SIDE; ++x)
|
||||
{
|
||||
byte dx, dy;
|
||||
byte color = Primitive_getPixel320x16(x, y, stamp);
|
||||
for (dy = 0; dy < 3; ++dy)
|
||||
for (dx = 0; dx < 3; ++dx)
|
||||
hset(140 + 3 * x + dx, 76 + 3 * y + dy, color);
|
||||
}
|
||||
waitkey(FALSE);
|
||||
hscreen(0);
|
||||
palette(0, oldPaper);
|
||||
palette(INK, oldInk);
|
||||
printf("BEACON CENTER: %u\n", (unsigned) Primitive_getPixel320x16(MIDDLE, MIDDLE, stamp));
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user