📄 se_main.c
字号:
#include <windows.h>
#include <stdlib.h>
#include <time.h>
#define WIN_X 400
#define WIN_Y 300
#define BKS_NUM 50
#define BKS_C RGB(160,160,160)
#define BKS_SMN 0.1
#define BKS_SMX 0.3
#define STAR_C RGB(255,255,0)
#define PLANE_C RGB(0,255,255)
#define RND_MAX 32767.0
int PLANE_L=30;
float PLANE_SP=2.5;
int STAR_NUM=50;
float STAR_SMN=1.0;
float STAR_SMX=2.0;
int SLEEP=16;
float x,y,xa,ya;
float gx[999],gy[999],gxa[999],gya[999];
float bx[BKS_NUM],by[BKS_NUM],bxa[BKS_NUM],bya[BKS_NUM];
long timeold;
char mk[12]="Pdnhu=#Gzlqj";
int playgame,hit,show,type;
char ccc;
RECT rect;
HWND hwnd;
HDC hdc,hdcm;
HBITMAP hbm;
HBRUSH hb;
HFONT hfp,hfc,hft,hfs;
#include "se_game.h"
#include "se_proc.h"
#include "se_init.h"
int WINAPI WinMain(HINSTANCE hinst,HINSTANCE hprinst,LPSTR lpszcmd,int ncmdshow)
{
MSG msg;
hwnd=initwin(hinst,ncmdshow,"",WIN_X,WIN_Y);
if (!hwnd) return 0;
initgame();
while(1)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message==WM_QUIT) break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
if(playgame) drawgame();
}
exitgame();
return msg.wParam;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -