@_arti, post #1
#include <dos/rdargs.h> #include <clib/dos_protos.h> enum { ARG_LEFT, ARG_TOP, ARG_WIDTH, ARG_HEIGHT, ARG_NOBORDER, ARG_COLOR, ARG_COUNT }; UBYTE template[]="LEFT/N, TOP/N, WIDTH/N, HEIGHT/N, NOBORDER/S, COLOR/N"; ULONG args[ARG_COUNT] = { 0 }; WORD color = 2;
struct RDArgs *rda; if (rda = ReadArgs(template, args, NULL)) { if (args[ARG_LEFT]) { NewWindow.LeftEdge = *(ULONG *)args[ARG_LEFT]; } if (args[ARG_TOP]) { NewWindow.TopEdge = *(ULONG *)args[ARG_TOP]; } if (args[ARG_WIDTH]) { NewWindow.Width = *(ULONG *)args[ARG_WIDTH]; } if (args[ARG_HEIGHT]) { NewWindow.Height = *(ULONG *)args[ARG_HEIGHT]; } if (args[ARG_NOBORDER]) { NewWindow.Flags |= WFLG_BORDERLESS; } if (args[COLOR]) { color = *(ULONG *)args[COLOR]); } FreeArgs(rda); }
#if 0 if (FastMax == 0) /* if no fast memory in system */ NewWindow.Height = 30; /* make window smaller */ #endif
if (refresh) { SetAPen(rp, color); SetBPen(rp, color); SetOPen(rp, color); RectFill(rp, LEFT, TOP, RIGHT, BOTTOM);
@Krashan, post #6
@_arti, post #1
jak zestawić sobie środowisko, żeby to później skompilować?
@_arti, post #17
/* * Main function. Call intution to create a new window for us on the * screen. Go from there. * * We no longer have our main() function called main(); instead we * use _main(). This keeps the standard _main.c function from Lattice * from creating a window for us that's not going to get used, and will * just clutter things. They figure that they are going to help us out, and * create a CON: type window for us. This is ugly, and of no use to * us. Gak! Why don't they worry about their stupid compiler * generating good (or even correct!) code with out this feeping * creaturism. Flame off. */
@Greczkin, post #13
@_arti, post #18
@_arti, post #21
@_arti, post #21
Program jest napisany w dobrym stylu