📄 gstest.c
字号:
/* Include necessary Nucleus PLUS files. */
#include "nucleus.h"
extern int InitGraphics(int argDEVICE);
extern void EventQueue(int argTF);
extern void mwstart1(void);
extern int mwfont(void);
extern int mappoly(void);
extern int dashtest(void);
extern int blittest(void);
extern int bezier(void);
extern int offscreen(void);
extern int animpoly(void);
extern int clockP(void);
extern int hilbert(void);
extern int pattern(void);
extern int demoport(void);
void Waiting(int a);
void quit(void);
NU_MEMORY_POOL System_Memory;
typedef struct _palData /* Palette data structure */
{unsigned short palRed; /* red intensity */
unsigned short palGreen; /* green intensity */
unsigned short palBlue; /* blue intensity */
} palData;
palData RGBdata[256];
#include "palette.h"
/* Define the Application_Initialize routine that determines the initial
Nucleus PLUS application environment. */
void Application_Initialize(void *first_available_memory)
{
/*VOID *pointer;*/
void Gstest(void);
/* Create a system memory pool that will be used to allocate task stacks,
queue areas, etc. */
NU_Create_Memory_Pool(&System_Memory, "SYSMEM",
first_available_memory, 1600000, 50, NU_FIFO);
Gstest();
}
/* Define the system timer task. More complicated systems might use a
routine like this to perform periodic message sending and other time
oriented functions. */
void* mcMalloc( unsigned int size )
{
void *address;
int status;
status = NU_Allocate_Memory( &System_Memory, &address, size, 0 );
return(address);
}
void mcFree( void *address )
{
NU_Deallocate_Memory( address );
}
void Gstest()
{
int grafixCard;
grafixCard = InitGraphics(0x103);
EventQueue(1);
while(1)
{
mwstart1();
mwfont();
mappoly();
dashtest();
offscreen();
blittest();
bezier();
animpoly();
hilbert();
clockP();
demoport();
pattern();
}
}
void Waiting(int a)
{
short x,y;
for(x = 0; x < a; x++)
for(y = 0; y < 30000; y++);
}
void quit(void)
{
int StopGraphics(void);
#ifdef _MNT_
void WindowsQuitMsg(void);
#endif
EventQueue(0);
#ifdef _MNT_
WindowsQuitMsg();
#else
StopGraphics();
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -