Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5265 → Rev 5266

/programs/games/nsider/include/DRAW2D.H
0,0 → 1,234
void draw_window() {
_ksys_window_redraw(1);
_ksys_draw_window(0, 0, ScreenX, ScreenY, 0, 0, 0, 0, 0);
_ksys_window_redraw(2);
}
 
void DrawLine(int x0, int y0, int x1, int y1, int color) {
int Temp = 0;
int x=0;
int y=0;
 
//cases when line is out of screen
if (y0 < 0 && y1 < 0) return;
if (y0 >Height - 1 && y1>Height - 1) return;
if (x0 < 0 && x1 < 0) return;
if (x0>Width - 1 && x1>Width - 1) return;
 
if ((x1 - x0) == 0) {
if (y1 == min(y0, y1)) {
Temp = y1;
y1 = y0;
y0 = Temp;
}
//correcting borders
if (y0 < 0) y0 = 0;
if (y1>Height - 1) y1 = Height - 1;
for (y = y0; y <= y1; y++) {
BufferDraw[x0][y] = color;
if (x0+1<=Width-1) BufferDraw[x0+1][y] = color;
}
}
else if ((y1 - y0) == 0) {
if (x1 == min(x0, x1)) {
Temp = x1;
x1 = x0;
x0 = Temp;
}
if (x0 < 0) x0 = 0;
if (x1>Width - 1) x1 = Width - 1;
for (x = x0; x < x1; x++) {
BufferDraw[x][y0] = color;
if (y0+1<=Height-1) BufferDraw[x][y0+1] = color;
}
}
else {
int PartX=0;
int PartY=0;
 
int LeftX=min(x0,x1);
if (LeftX<0) LeftX=0;
if (LeftX>Width-1) LeftX=Width-1;
 
int RightX=max(x0,x1);
if (RightX<0) RightX=0;
if (RightX>Width-1) RightX=Width-1;
 
int LeftY=min(y0,y1);
if (LeftY<0) LeftY=0;
if (LeftY>Height-1) LeftY=Height-1;
 
int RightY=max(y0,y1);
if (RightY<0) RightY=0;
if (RightY>Height-1) RightY=Height-1;
 
if (RightX-LeftX>=RightY-LeftY) {
for (x=LeftX; x<=RightX; x++) {
y=(y1-y0)*(x-x0)/(x1-x0)+y0;
if (y<0) continue;
BufferDraw[x][y]=color;
if (y+1<=Height-1) BufferDraw[x][y+1]=color;
}
} else {
for (y=LeftY; y<=RightY; y++) {
x=(x1-x0)*(y-y0)/(y1-y0)+x0;
if (x<0) continue;
BufferDraw[x][y]=color;
if (x+1<=Width-1) BufferDraw[x+1][y]=color;
}
}
 
}
}
 
void DrawText(int x, int y, char Text[] , int color) {
int i=0;
for (i=0; Text[i]!='\0'; i++) {
int j=0;
unsigned char isMatch=0;
for (j=0; Alphabet[j]!='\0'; j++) {
if (Text[i]==Alphabet[j]) {
isMatch=1;
break;
}
}
if (isMatch==0) {
x+=17;
continue;
}
int bitLen=15;
int bitX=0;
int bitY=0;
for (bitX=0; bitX<bitLen; bitX++) {
for (bitY=0; bitY<bitLen; bitY++) {
if (*(AlphaGraphic[j]+bitY*bitLen+bitX)==1) {
if (x+bitX>=0 && x+bitX<=(Width-1) && y+bitY>=0 && y+bitY<=(Height-1)) BufferDraw[x+bitX][y+bitY]=color;
}
}
}
x+=bitLen+2;
}
}
 
void DrawPit (int x, int y, int color) {
DrawLine (0+x,43+y,15+x,10+y,color);
DrawLine (15+x,10+y,30+x,43+y,color);
DrawLine (0+x,43+y,30+x,43+y,color);
}
 
void DrawBlock (int x, int y, int color) {
DrawLine (0+x,0+y,40+x,0+y,color);
DrawLine (40+x,0+y,40+x,40+y,color);
DrawLine (40+x,40+y,0+x,40+y,color);
DrawLine (0+x,40+y,0+x,0+y,color);
}
 
void DrawHero (int x, int y, int Verts, int InitAngle, int color) {
int R=25;
int PointX1=x+FloatToInt(R*sin(InitAngle));
int PointY1=y-FloatToInt(R*cos(InitAngle));
int PointX2=0;
int PointY2=0;
int i=0;
for (i=0; i<Verts; i++) {
InitAngle=(InitAngle+360/Verts)%360;
PointX2=x+FloatToInt(R*sin(InitAngle));
PointY2=y-FloatToInt(R*cos(InitAngle));
DrawLine(PointX1,PointY1,PointX2,PointY2,color);
PointX1=PointX2;
PointY1=PointY2;
CollideVerts[i][0]=PointX1;
CollideVerts[i][1]=PointY1;
 
}
}
 
void DrawBatut (int x, int y, int color) {
DrawLine (x,y+20,x+43,y+20,color);
DrawLine (x+43,y+20,x+43,y+43,color);
DrawLine (x+43,y+43,x,y+43,color);
DrawLine (x,y+43,x,y+20,color);
DrawLine (x+10+2,y+35,x+30+2,y+35,color);
DrawLine (x+10+2,y+35,x+20+2,y+27,color);
DrawLine (x+20+2,y+27,x+30+2,y+35,color);
 
}
void DrawFlag (int x,int y, int color) {
DrawLine (x,y,x,y+43,color);
DrawLine (x,y+43,x+10,y+43,color);
DrawLine (x,y,x+30,y,color);
DrawLine (x+30,y,x+30,y+20,color);
DrawLine (x,y+20,x+30,y+20,color);
DrawText (x+10,y+4,"c",color);
}
 
void DrawScreen (int x,int y,int xsize, int ysize, void* image) {
asm volatile("int $0x40"::"a"(7),"b"(image),"c"((xsize<<16)+ysize),"d"((x<<16)+y):"memory");
}
 
void DrawTitle (int x, int y, int color) {
int i=0;
//n
for (i=0; i<=10; i++) {
DrawLine (x,y+i,x+70,y+i,color);
DrawLine (x+i,y,x+i,y+80, color);
DrawLine (x+i+70,y+10,x+i+70,y+80,color);
}
//-
for (i=0; i<=10; i++) {
DrawLine (x+100,y+30+i,x+130,y+30+i,color);
}
//S
for (i=0; i<=10; i++) {
DrawLine (x+160,y+i,x+220, y+i, color);
DrawLine (x+150+i,y+10,x+150+i,y+30,color);
DrawLine (x+150,y+30+i,x+210,y+30+i,color);
DrawLine (x+210+i,y+40,x+210+i,y+70,color);
DrawLine (x+150,y+70+i,x+210,y+70+i,color);
 
}
//i
for (i=0; i<=10; i++) {
DrawLine (x+240,y+i,x+255,y+i,color);
DrawLine (x+242+i,y+20,x+242+i,y+80,color);
}
//D
for (i=0; i<=10; i++) {
DrawLine (x+270,y+i,x+320,y+i,color);
DrawLine (x+270+i,y,x+270+i,y+80,color);
DrawLine (x+270,y+i+70,x+320,y+70+i,color);
DrawLine (x+320+i,y+10,x+320+i,y+70,color);
}
//E
for (i=0; i<=10; i++) {
DrawLine (x+350,y+i,x+410,y+i, color);
DrawLine (x+350,y+35+i,x+410,y+35+i,color);
DrawLine (x+350,y+70+i,x+410,y+70+i,color);
}
//R
for (i=0; i<=10; i++) {
DrawLine (x+430,y+i,x+480,y+i,color);
DrawLine (x+430+i,y,x+430+i,y+80,color);
DrawLine (x+480+i,y+10,x+480+i,y+40,color);
DrawLine (x+430,y+40+i,x+480,y+40+i,color);
DrawLine (x+480+i,y+52,x+480+i,y+80,color);
}
}
 
void DrawPew (int x,int y,int frame,int color) {
frame-=15;
DrawLine (x,y-25-frame,x,y-30-frame,color);
DrawLine (x,y+25+frame,x,y+30+frame,color);
DrawLine (x+25+frame,y,x+30+frame,y,color);
DrawLine (x-25-frame,y,x-30-frame,y,color);
DrawLine (x+15+frame,y+15+frame,x+20+frame,y+20+frame,color);
DrawLine (x-15-frame,y-15-frame,x-20-frame,y-20-frame,color);
DrawLine (x-15-frame,y+15+frame,x-20-frame,y+20+frame,color);
DrawLine (x+15+frame,y-15-frame,x+20+frame,y-20-frame,color);
}
 
 
 
 
 
 
/programs/games/nsider/include/GameAlphabet.h
0,0 → 1,749
char Alphabet[]="0123456789abcdefghijklmnopqrstuvwxyz/()<>_";
 
 
unsigned char _emty[15][15]=
{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0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space[15][15]=
{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}};
 
 
 
 
 
 
//1-9,a-z and A-Z are left. Yahoo! for 0-9,a-z - 15x15 format, for A-Z - 30x30 format
 
 
 
 
 
unsigned char *AlphaGraphic[62]={&_0[0][0],&_1[0][0],&_2[0][0],&_3[0][0],&_4[0][0],&_5[0][0],&_6[0][0],&_7[0][0],&_8[0][0],&_9[0][0],&_a[0][0],&_b[0][0],&_c[0][0],&_d[0][0],&_e[0][0],&_f[0][0],&_g[0][0],&_h[0][0],&_i[0][0],&_j[0][0],&_k[0][0],&_l[0][0],&_m[0][0],&_n[0][0],&_o[0][0],&_p[0][0],&_q[0][0],&_r[0][0],&_s[0][0],&_t[0][0],&_u[0][0],&_v[0][0],&_w[0][0],&_x[0][0],&_y[0][0],&_z[0][0], &_div[0][0],&_open[0][0],&_close[0][0],&_left[0][0],&_right[0][0],&_downspace[0][0]};
/programs/games/nsider/include/GameFunctions.h
0,0 → 1,158
void Update() {
int x=0;
int y=0;
int X0=0;
int X1=0;
int CurColor=0;
 
//LINE DRAW
if (DRAW_TECH==1) {
//Buffer to Buffer
for (x = 0; x < Width; x++) {
for (y = 0; y < Height; y++) {
BufferCarry2[x][y] = BufferDraw[x][y];
}
}
//Convert Analyx to Drawmask Matrix
for (x=0; x<Width; x++) {
for (y=0; y<Height; y++) {
if (Analyx[x][y]==BufferCarry2[x][y]) {
Analyx[x][y]=1;
} else {
Analyx[x][y]=0;
}
}
}
 
for (x=0; x<Width; x++) {
for (y=0; y<Height; y++) {
if (Analyx[x][y]==1) continue;
CurColor=BufferCarry2[x][y];
//try vertical line
int LineY=y;
while (LineY<Height && BufferCarry2[x][LineY]==CurColor) LineY++;
LineY--;
 
//try horizontal line
int LineX=x;
while (LineX<Width && BufferCarry2[LineX][y]==CurColor) LineX++;
LineX--;
 
//chosing the greatest area and draw
int LineYLen=LineY-y+1;
int LineXLen=LineX-x+1;
 
if (LineXLen>=LineYLen) {
_ksys_line(x+OffsetX,y+OffsetY,LineX+OffsetX,y+OffsetY,CurColor);
int i=0;
for (i=x; i<=LineX; i++) Analyx[i][y]=1;
continue;
}
_ksys_line(x+OffsetX,y+OffsetY,x+OffsetX,LineY+OffsetY,CurColor);
int i=0;
for (i=y; i<=LineY; i++) Analyx[x][i]=1;
}
}
 
//From Buffer to Analyx and Reset Buffer
for (x = 0; x < Width; x++) {
for (y = 0; y < Height; y++) {
Analyx[x][y]=BufferCarry2[x][y];
BufferDraw[x][y]=GLOBAL_BACKGROUNDCOLOR;
}
}
}
//FULL FRAME DRAW
if (DRAW_TECH==0) {
for (x = 0; x < Width; x++) {
for (y = 0; y < Height; y++) {
BufferCarry[y][x][0] = BufferDraw[x][y]%256;
BufferDraw[x][y]/=256;
BufferCarry[y][x][1]=BufferDraw[x][y]%256;
BufferDraw[x][y]/=256;
BufferCarry[y][x][2]=BufferDraw[x][y]%256;
BufferDraw[x][y]=GLOBAL_BACKGROUNDCOLOR;
}
}
DrawScreen (OffsetX,OffsetY,Width,Height,BufferCarry);
}
//Drawing Level
int i=0;
for (i=0; i<Objects; i++) {
if (DataBase[i][0]==1) {
DrawBlock (DataBase[i][1],DataBase[i][2],GLOBAL_BLOCKCOLOR);
}
if (DataBase[i][0]==2) {
DrawPit (DataBase[i][1],DataBase[i][2],GLOBAL_PITCOLOR);
}
if (DataBase[i][0]==3) {
DrawBatut (DataBase[i][1],DataBase[i][2],GLOBAL_BATUTCOLOR);
}
if (DataBase[i][0]==4) {
DrawFlag (DataBase[i][1],DataBase[i][2],GLOBAL_FLAGCOLOR);
}
DataBase[i][1]-=GLOBAL_SPEED;
if (Objects>0 && DataBase[0][1]<120) isRestart=1;
}
CleanDataBase();
 
}
 
void Jump () {
if (Key==' ') HeroFly=-13;
}
 
 
char CheckCollision() {
int i=0;
for (i=0; i<Objects; i++) {
if (Abs(DataBase[i][1]-HeroX)>60) continue;
int j=0;
for (j=0;j<HeroSides; j++) {
int PointX=CollideVerts[j][0];
int PointY=CollideVerts[j][1];
if (DataBase[i][0]==2 && PointX>=DataBase[i][1]+6 && PointX<=DataBase[i][1]+30-6 && PointY>=DataBase[i][2]+10 && PointY<=DataBase[i][2]+48) {
return 1;
}
if (DataBase[i][0]==3 && PointX>=DataBase[i][1] && PointX<=DataBase[i][1]+43 && PointY>=DataBase[i][2]+25 && PointY<=DataBase[i][2]+48) {
HeroFly=-25;
return 0;
}
if (DataBase[i][0]==4 && PointX>=DataBase[i][1] && PointX<=DataBase[i][1]+43 && PointY>=DataBase[i][2] && PointY<=DataBase[i][2]+48) {
DrawText (10,510,"checkpoint",GLOBAL_FLAGCOLOR);
GLOBAL_CHECKPOINT=CurrentCheck;
SPAWN_Y=DataBase[i][2];
}
 
if (DataBase[i][0]==1 && PointX>=DataBase[i][1] && PointX<=DataBase[i][1]+43) {
if (PointY>=DataBase[i][2] && PointY<=DataBase[i][2]+43) {
if (HeroY>=DataBase[i][2] && HeroX<=DataBase[i][1]+6) {
return 1;
}
if (HeroFly<0) {
return 1;
}
//correcting edges
HeroAngle=0;
if (HeroSides%2==0) HeroAngle=360/HeroSides/2;
HeroY=DataBase[i][2]-DeltaH[HeroSides-3];
HeroFly=0;
Jump();
return 0;
} else {
if (DataBase[i][2]-HeroY<HeroFly && HeroFly>0 && DataBase[i][2]-HeroY>0) HeroFly=DataBase[i][2]-HeroY;
}
}
}
}
if (HeroY<500-DeltaH[HeroSides-3]) {
HeroFly++;
} else {
HeroFly=0;
HeroAngle=0;
if (HeroSides%2==0) HeroAngle=360/HeroSides/2;
HeroY=500-DeltaH[HeroSides-3];
Jump();
}
return 0;
}
/programs/games/nsider/include/LEVELS.H
0,0 → 1,236
#define LEVEL_MAXLEN 400
#define CONST_SPEED 5
 
 
int DataBase[100][3];
int Objects=0;
 
 
unsigned char USER_LEVEL0[9][LEVEL_MAXLEN]={{}};
unsigned char USER_LEVEL1[9][LEVEL_MAXLEN]={{}};
unsigned char USER_LEVEL2[9][LEVEL_MAXLEN]={{}};
//note: [0][0] holds Length high part, [0][1] length lo part, [0][2] holds column to read
unsigned char Lvl03[9][LEVEL_MAXLEN]=
{
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}
};
 
 
 
 
//current column, level speed, HeroSides
int LevelProps[11][3]= {{0,5,3},
{0,5,3},
{0,5,3},
{0,5,3},
{0,5,4},
{0,5,5},
{0,5,6},
{0,5,7},
{0,5,8},
{0,5,9},
{0,5,10}};
 
unsigned char *Levels[11]={&USER_LEVEL0[0][0],&USER_LEVEL1[0][0],&USER_LEVEL2[0][0],&Lvl03[0][0],&Lvl04[0][0],&Lvl05[0][0],&Lvl06[0][0],&Lvl07[0][0],&Lvl08[0][0],&Lvl09[0][0],&Lvl10[0][0]};
 
void Update();
void CleanDataBase();
void ResetLevel (int level);
 
void ReadLevel (int level) {
int CurColumn=LevelProps[level][0];
if (CurColumn>=LEVEL_MAXLEN || *(Levels[level]+CurColumn)==5) {
if (CURRENT_LEVEL==10) {
DrawText (40,300,"congratulations you are winner",GLOBAL_FRONTCOLOR);
GLOBAL_CHECKPOINT=0;
ResetLevel (CURRENT_LEVEL);
MAX_LEVEL=10;
HeroY=100;
Update();
_ksys_delay(200);
GAME_TYPE=4;
return;
}
if (CURRENT_LEVEL<3) {
DrawText (200,300,"level completed",GLOBAL_FRONTCOLOR);
GLOBAL_CHECKPOINT=0;
ResetLevel (CURRENT_LEVEL);
HeroY=100;
Update();
_ksys_delay(200);
GAME_TYPE=3;
Panel=1;
return;
} else {
if (TO_NEXT_LEVEL==0) TO_NEXT_LEVEL=1;
return;
}
}
int Cell=0;
 
GLOBAL_SPEED=LevelProps[level][1];
int CurType=0;
//init
DataBase[Objects][0]=0;
DataBase[Objects][1]=Width;
DataBase[Objects][2]=0;
Objects++;
 
for (Cell=0; Cell<9; Cell++) {
CurType=*(Levels[level]+Cell*LEVEL_MAXLEN+CurColumn);
if (CurType>0) {
DataBase[Objects][0]=CurType;
DataBase[Objects][1]=Width;
DataBase[Objects][2]=43*(Cell+1)+70;
if (CurType==4) CurrentCheck=CurColumn;
Objects++;
}
}
LevelProps[level][0]++;
}
 
void ResetLevel (int level) {
Objects=0;
LevelProps[level][0]=GLOBAL_CHECKPOINT;
}
 
 
void CleanDataBase () {
int i=0;
for (i=0; i<Objects; i++) {
if (DataBase[i][1]<-50) {
int j=0;
for (j=i+1; j<Objects; j++) {
DataBase[j-1][0]=DataBase[j][0];
DataBase[j-1][1]=DataBase[j][1];
DataBase[j-1][2]=DataBase[j][2];
}
Objects--;
i--;
}
}
}
 
 
 
 
/programs/games/nsider/include/SHIMATH.H
0,0 → 1,83
const float sctable[91]={0.000,0.017,0.035,0.052,0.069,0.087,0.104,0.121,0.139,0.156,0.173,
0.190,0.207,0.225,0.242,0.259,0.275,0.292,0.309,0.325,0.342,
0.358,0.374,0.390,0.406,0.422,0.438,0.454,0.469,0.485,0.500,
0.515,0.530,0.545,0.560,0.573,0.588,0.602,0.616,0.629,0.643,
0.656,0.669,0.682,0.695,0.707,0.719,0.731,0.743,0.754,0.766,
0.777,0.788,0.798,0.809,0.819,0.829,0.838,0.848,0.857,0.866,
0.875,0.883,0.891,0.899,0.906,0.913,0.920,0.927,0.934,0.939,
0.945,0.951,0.956,0.961,0.965,0.970,0.974,0.978,0.982,0.985,
0.987,0.990,0.992,0.994,0.996,0.997,0.998,0.999,0.999,1.000};
 
float sin (int angle) {
float res=1;
angle%=360;
if (angle>180) res=-1;
if (angle>=0 && angle<=90) return (res*sctable[angle]);
if (angle>90 && angle<=180) return (res*sctable[180-angle]);
if (angle>180 && angle<=270) return (res*sctable[angle-180]);
if (angle>270) return (res*sctable[360-angle]);
return res;
}
 
float cos (int angle) {
float res=1;
angle%=360;
if (angle>90 && angle<270) res=-1;
if (angle>=0 && angle<=90) return (res*sctable[90-angle]);
if (angle>90 && angle<=180) return (res*sctable[angle-90]);
if (angle>180 && angle<=270) return (res*sctable[90-(angle-180)]);
if (angle>270) return (res*sctable[90-(360-angle)]);
return res;
}
 
int FloatToInt (float a) {
int sign=1;
int result=0;
if (a<1 && a>(-1)) return 0;
if (a<0) {
sign=-1;
a*=(-1);
}
while (a>=1) {
a--;
result++;
}
return (result*sign);
}
 
int min (int a, int b) {
if (a<=b) return a;
return b;
}
 
int max (int a, int b) {
if (a>=b) return a;
return b;
}
 
void IntToStr (int Value, char Str[]) {
char Stack[100]="";
int StackLen=0;
if (Value==0) {
Str[0]='0';
Str[1]='\0';
return;
}
while (Value!=0) {
Stack[StackLen]=Value%10+48;
Value/=10;
StackLen++;
}
int i=0;
for (i=0; i<StackLen; i++) {
Str[i]=Stack[StackLen-i-1];
}
Str[i]='\0';
}
 
int Abs (int a) {
if (a<0) return (-1)*a;
return a;
}
 
 
/programs/games/nsider/include/ctype.h
0,0 → 1,35
/*
** All character classification functions except isascii().
** Integer argument (c) must be in ASCII range (0-127) for
** dependable answers.
*/
 
#define ALNUM 1
#define ALPHA 2
#define CNTRL 4
#define DIGIT 8
#define GRAPH 16
#define LOWER 32
#define PRINT 64
#define PUNCT 128
#define BLANK 256
#define UPPER 512
#define XDIGIT 1024
 
extern char _is[128];
 
#define isalnum(c)(_is[c] & ALNUM ) /* 'a'-'z', 'A'-'Z', '0'-'9' */
#define isalpha(c)(_is[c] & ALPHA ) /* 'a'-'z', 'A'-'Z' */
#define iscntrl(c)(_is[c] & CNTRL ) /* 0-31, 127 */
#define isdigit(c)(_is[c] & DIGIT ) /* '0'-'9' */
#define isgraph(c)(_is[c] & GRAPH ) /* '!'-'~' */
#define islower(c)(_is[c] & LOWER ) /* 'a'-'z' */
#define isprint(c)(_is[c] & PRINT ) /* ' '-'~' */
#define ispunct(c)(_is[c] & PUNCT ) /* !alnum && !cntrl && !space */
#define isspace(c)(_is[c] & BLANK ) /* HT, LF, VT, FF, CR, ' ' */
#define isupper(c)(_is[c] & UPPER ) /* 'A'-'Z' */
#define isxdigit(c)(_is[c] & XDIGIT) /* '0'-'9', 'a'-'f', 'A'-'F' */
 
#define isascii(c) (!((c)&(~0x7f)))
#define toascii(c) ((c)&0x7f)
 
/programs/games/nsider/include/kolibrisys.h
0,0 → 1,195
#ifndef kolibrisys_h
#define kolibrisys_h
/*
#ifdef GNUC
#define stdcall __stdcall
#define cdecl __cdecl
#else
#define stdcall ((__stdcall))
#define cdecl ((__cdecl))
#endif
*/
//#ifdef GNUC
//#define stdcall __stdcall
//#else
#define cdecl __attribute__ ((cdecl))
#define stdcall __attribute__ ((stdcall))
//#endif
 
typedef unsigned int dword;
typedef unsigned char byte;
typedef unsigned short word;
 
typedef unsigned int fpos_t;
typedef unsigned int size_t;
 
typedef struct process_table_entry{
int cpu_usage; //+0
int window_pos_info; //+4
short int reserved1; //+8
char name[12]; //+10
int memstart; //+22
int memused; //+26
int pid; //+30
int winx_start; //+34
int winy_start; //+38
int winx_size; //+42
int winy_size; //+46
short int slot_info; //+50
short int reserved2; //+52
int clientx; //+54
int clienty; //+58
int clientwidth; //+62
int clientheight; //+66
unsigned char window_state;//+70
char reserved3[1024-71]; //+71
}__attribute__((packed));
 
//-----------------------------------------------------------------------------------
//------------------------KolibriOS system acces to files----------------------------
//-----------------------------------------------------------------------------------
extern dword stdcall _ksys_get_filesize(char *filename);
extern dword stdcall _ksys_readfile(char *filename,dword pos,dword blocksize,void *data);
extern dword stdcall _ksys_rewritefile(char *filename,dword blocksize,void *data);
extern dword stdcall _ksys_appendtofile(char *filename,dword pos,dword blocksize,void *data);
//-----------------------------------------------------------------------------------
 
//----------------------Run program---------------------------------------------------
extern void stdcall _ksys_run_program(char* filename,char* parameters);
//------------------------------------------------------------------------------------
 
//--------------------Debug output---------------------------------------------------
extern void stdcall _ksys_debug_out(int c);
extern void stdcall debug_out_str(char* str);
//-----------------------------------------------------------------------------------
 
//--------------------------Mouse state----------------------------------------------
extern int stdcall _ksys_GetMouseXY(void);
extern int stdcall _ksys_GetMouseButtonsState(void);
//-----------------------------------------------------------------------------------
 
//--------------------------get skin height------------------------------------------
extern int stdcall _ksys_get_skin_height(void);
//-----------------------------------------------------------------------------------
 
//----------------------------background---------------------------------------------
extern void stdcall _ksys_set_background_size(int xsize,int ysize);
extern void stdcall _ksys_write_background_mem(int pos,int color);
extern void stdcall _ksys_draw_background(void);
extern void stdcall _ksys_set_background_draw_type(int type);
extern void stdcall _ksys_background_blockmove(void* src,int bgr_pos, int count);
//-----------------------------------------------------------------------------------
 
//----------------------------functionf for draw window,lines.bar,etc.---------------
extern void stdcall _ksys_draw_window(int xcoord,int ycoord, int xsize,
int ysize,int workcolor,int type,
int captioncolor,int windowtype,int bordercolor);
extern void stdcall _ksys_window_redraw(int status);
extern int stdcall _ksys_putpixel(int x,int y,int color);
extern void stdcall _ksys_draw_bar(int x, int y, int xsize, int ysize, int color);
extern void stdcall _ksys_line(int x1,int y1,int x2,int y2,int color);
extern void stdcall _ksys_putimage(int x, int y, int xsize, int ysize, void* image);
//-----------------------------------------------------------------------------------
 
//--------------------------write text(system fonts 6x9)-----------------------------
extern void stdcall _ksys_write_text(int x,int y,int color,char* text,int len);
//-----------------------------------------------------------------------------------
 
//------------------ get screen size and bytes per pixel---------------------------
extern int stdcall _ksys_get_screen_size(int* x,int* y);
extern void stdcall _ksys_dga_get_resolution(int* xres, int* yres, int* bpp, int* bpscan);
//-----------------------------------------------------------------------------------
 
//-------------------------------craete thread---------------------------------------
extern void* stdcall _ksys_start_thread(void (* func_ptr)(void),int stack_size,int* pid);
//-----------------------------------------------------------------------------------
 
//------------------system button(Old function. Better use libGUI functions.)--------
extern void stdcall _ksys_make_button(int x, int y, int xsize, int ysize, int id, int color);
extern int stdcall _ksys_get_button_id(void); //get state of system button
//------------------------------------------------------------------------------------
 
//----------------------system clock(in 1/100 sec.) and date--------------------------
extern int stdcall _ksys_get_system_clock(void);
extern int stdcall _ksys_get_date(void);
//------------------------------------------------------------------------------------
 
//-------------------------system delay(in 1/100 sec.)-------------------------------
extern void stdcall _ksys_delay(int m);
//-----------------------------------------------------------------------------------
 
//------------------------system events----------------------------------------------
extern int stdcall _ksys_wait_for_event_infinite(void);
extern int stdcall _ksys_check_for_event(void);
extern int stdcall _ksys_wait_for_event(int time);
extern void stdcall _ksys_set_wanted_events(int ev);
//-----------------------------------------------------------------------------------
 
//----------------------------system exit program------------------------------------
extern void stdcall _ksys_exit(void);
//-----------------------------------------------------------------------------------
 
//-----------------------------system IPC send message-------------------------------
extern void stdcall _ksys_send_message(int pid, void* msg, int size);
//-----------------------------------------------------------------------------------
 
//---------------------------system work with IRQ from user mode---------------------
extern void stdcall _ksys_define_receive_area(void* area, int size);
extern int stdcall _ksys_get_irq_owner(int irq);
extern int stdcall _ksys_get_data_read_by_irq(int irq, int* size, void* data);
extern int stdcall _ksys_send_data_to_device(int port, unsigned char val);
extern int stdcall _ksys_receive_data_from_device(int port,unsigned char* data);
extern void stdcall _ksys_program_irq(void* intrtable, int irq);
extern void stdcall _ksys_reserve_irq(int irq);
extern void stdcall _ksys_free_irq(int irq);
//----------------------------------------------------------------------------------
 
//----------------------------system reserve diapason of ports----------------------
extern int stdcall _ksys_reserve_port_area(int start,int end);
extern int stdcall _ksys_free_port_area(int start,int end);
//----------------------------------------------------------------------------------
 
//-------------functions get key and set keyboard mode------------------------------
extern int stdcall _ksys_get_key(void);
extern void stdcall _ksys_set_keyboard_mode(int mode);
//----------------------------------------------------------------------------------
 
//--------------simple work with MPU401 sound device---------------------------------
extern void stdcall _ksys_midi_reset(void);
extern void stdcall _ksys_midi_send(int data);
//-----------------------------------------------------------------------------------
 
//--------------------------acces to PCI BUS from user mode---------------------------
extern int stdcall _ksys_get_pci_version(void);
extern int stdcall _ksys_get_last_pci_bus(void);
extern int stdcall _ksys_get_pci_access_mechanism(void);
extern int stdcall _ksys_pci_read_config_byte(int bus,int dev,int fn,int reg);
extern int stdcall _ksys_pci_read_config_word(int bus,int dev,int fn,int reg);
extern int stdcall _ksys_pci_read_config_dword(int bus,int dev,int fn,int reg);
extern int stdcall _ksys_pci_write_config_byte(int bus,int dev,int fn,int reg,int value);
extern int stdcall _ksys_pci_write_config_word(int bus,int dev,int fn,int reg,int value);
extern int stdcall _ksys_pci_write_config_value(int bus,int dev,int fn,int reg,int value);
//--------------------------------------------------------------------------------------
 
//------------------------Process information--------------------------------------
extern int stdcall _ksys_get_process_table(struct process_table_entry *proctab,int pid); //if pid=-1 than get info about him.
//---------------------------------------------------------------------------------
 
//-----------------Old functions for work with sound(Sound Blaster only).---------
extern void stdcall _ksys_sound_load_block(void* blockptr);
extern void stdcall _ksys_sound_play_block(void);
extern void stdcall _ksys_sound_set_channels(int channels);
extern void stdcall _ksys_sound_set_data_size(int size);
extern void stdcall _ksys_sound_set_frequency(int frequency);
//--------------------------------------------------------------------------------
 
//------------------------------system speaker(integrated speaker)----------------
extern void stdcall _ksys_sound_speaker_play(void* data);
//--------------------------------------------------------------------------------
 
//------------------function for work with Dinamic Link Librarys(DLL)--------------
extern dword* stdcall _ksys_cofflib_load(char* name);
extern char* stdcall _ksys_cofflib_getproc(void* exp,char* sz_name);
//---------------------------------------------------------------------------------
 
#endif
/programs/games/nsider/include/math.h
0,0 → 1,179
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 
extern int stdcall integer(float number);
 
extern double acos(double _x);
extern double asin(double _x);
extern double atan(double _x);
extern double atan2(double _y, double _x);
extern double ceil(double _x);
extern double cos(double _x);
extern double cosh(double _x);
extern double exp(double _x);
extern double fabs(double _x);
extern double floor(double _x);
extern double fmod(double _x, double _y);
extern double frexp(double _x, int *_pexp);
extern double ldexp(double _x, int _exp);
extern double log(double _y);
extern double log10(double _x);
extern double modf(double _x, double *_pint);
extern double pow(double _x, double _y);
extern double sin(double _x);
extern double sinh(double _x);
extern double sqrt(double _x);
extern double tan(double _x);
extern double tanh(double _x);
 
//#ifndef __STRICT_ANSI__
 
//#ifndef _POSIX_SOURCE
 
#define M_E 2.7182818284590452354
#define M_LOG2E 1.4426950408889634074
#define M_LOG10E 0.43429448190325182765
#define M_LN2 0.69314718055994530942
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.70710678118654752440
#define PI M_PI
#define PI2 M_PI_2
 
extern double acosh(double);
extern double asinh(double);
extern double atanh(double);
extern double cbrt(double);
extern double exp10(double _x);
extern double exp2(double _x);
extern double expm1(double);
extern double hypot(double, double);
extern double log1p(double);
extern double log2(double _x);
extern long double modfl(long double _x, long double *_pint);
extern double pow10(double _x);
extern double pow2(double _x);
extern double powi(double, int);
extern void sincos(double *, double *, double);
 
/* These are in libm.a (Cygnus). You must link -lm to get these */
/* See libm/math.h for comments */
/*
#ifndef __cplusplus
struct exception {
int type;
const char *name;
double arg1;
double arg2;
double retval;
int err;
};
#endif
*/
 
extern double erf(double);
extern double erfc(double);
extern double gamma(double);
extern int isinf(double);
extern int isnan(double);
extern int finite(double);
extern double j0(double);
extern double j1(double);
extern double jn(int, double);
extern double lgamma(double);
extern double nan(void);
extern double y0(double);
extern double y1(double);
extern double yn(int, double);
extern double logb(double);
extern double nextafter(double, double);
extern double remainder(double, double);
extern double scalb(double, double);
//#ifndef __cplusplus
//extern int matherr(struct exception *);
//#endif
extern double significand(double);
extern double copysign(double, double);
extern int ilogb(double);
extern double rint(double);
extern double scalbn(double, int);
extern double drem(double, double);
extern double gamma_r(double, int *);
extern double lgamma_r(double, int *);
extern float acosf(float);
extern float asinf(float);
extern float atanf(float);
extern float atan2f(float, float);
extern float cosf(float);
extern float sinf(float);
extern float tanf(float);
extern float coshf(float);
extern float sinhf(float);
extern float tanhf(float);
extern float expf(float);
extern float frexpf(float, int *);
extern float ldexpf(float, int);
extern float logf(float);
extern float log10f(float);
extern float modff(float, float *);
extern float powf(float, float);
extern float sqrtf(float);
extern float ceilf(float);
extern float fabsf(float);
extern float floorf(float);
extern float fmodf(float, float);
extern float erff(float);
extern float erfcf(float);
extern float gammaf(float);
extern float hypotf(float, float);
extern int isinff(float);
extern int isnanf(float);
extern int finitef(float);
extern float j0f(float);
extern float j1f(float);
extern float jnf(int, float);
extern float lgammaf(float);
extern float nanf(void);
extern float y0f(float);
extern float y1f(float);
extern float ynf(int, float);
extern float acoshf(float);
extern float asinhf(float);
extern float atanhf(float);
extern float cbrtf(float);
extern float logbf(float);
extern float nextafterf(float, float);
extern float remainderf(float, float);
extern float scalbf(float, float);
extern float significandf(float);
extern float copysignf(float, float);
extern int ilogbf(float);
extern float rintf(float);
extern float scalbnf(float, int);
extern float dremf(float, float);
extern float expm1f(float);
extern float log1pf(float);
extern float gammaf_r(float, int *);
extern float lgammaf_r(float, int *);
 
//#endif /* !_POSIX_SOURCE */
//#endif /* !__STRICT_ANSI__ */
//#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
 
//#ifndef __dj_ENFORCE_FUNCTION_CALLS
//#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
 
//#ifdef __cplusplus
//}
//#endif
 
//#endif /* _USE_LIBM_MATH_H */
 
//#endif /* !__dj_include_math_h_ */
/programs/games/nsider/include/stdio.h
0,0 → 1,57
#ifndef stdio_h
#define stdio_h
 
#include "kolibrisys.h"
 
typedef char *va_list;
#define _roundsize(n) ( (sizeof(n) + 3) & ~3 )
#define va_start(ap,v) (ap = (va_list)&v+_roundsize(v))
#define va_arg(ap,t) ( *(t *)((ap += _roundsize(t)) - _roundsize(t)) )
#define va_end(ap) (ap = (va_list)0)
 
#define NULL ((void*)0)
//extern int stdcall format_print(char *dest, size_t maxlen, const char *fmt0, va_list argp);
 
typedef struct {
char* buffer;
dword buffersize;
dword filesize;
dword filepos;
char* filename;
int mode;
} FILE;
 
#define FILE_OPEN_READ 0
#define FILE_OPEN_WRITE 1
#define FILE_OPEN_APPEND 2
#define FILE_OPEN_TEXT 4
#define FILE_OPEN_PLUS 8
#define EOF -1
 
extern FILE* fopen(const char* filename, const char *mode);
extern void fclose(FILE* file);
extern int feof(FILE* file);
extern int fflush(FILE* file);
extern int fgetc(FILE* file);
extern int fgetpos(FILE* file,fpos_t* pos);
extern int fsetpos(FILE* file,const fpos_t* pos);
extern int fputc(int c,FILE* file);
extern int fread(void* buffer,int size,int count,FILE* file);
extern int fwrite(void *buffer,int size,int count,FILE* file);
extern long ftell(FILE* file);
#define SEEK_CUR 0
#define SEEK_END 1
#define SEEK_SET 2
extern int fseek(FILE* file,long offset,int origin);
extern void rewind(FILE* file);
extern int cdecl fprintf(FILE* file, const char* format,...);
extern int fscanf(FILE* file,const char* format,...);
extern int ungetc(int c,FILE* file);
 
extern int cdecl printf(const char *format,...);
 
extern int vsnprintf(char *dest, size_t size,const char *format,va_list ap);
extern int cdecl snprintf(char *dest, size_t size, const char *format,...);
extern int cdecl sprintf(char *dest,const char *format,...);
 
#endif
/programs/games/nsider/include/stdlib.h
0,0 → 1,24
#ifndef stdlib_h
#define stdlib_h
#include "kolibrisys.h"
 
#define RAND_MAX 65535
 
//#define isspace(c) ((c)==' ')
#define abs(i) (((i)<0)?(-(i)):(i))
 
extern int atoib(char *s,int b);
extern int atoi(char *s);
extern unsigned char tolower(unsigned char c);
extern unsigned char toupper(unsigned char c);
extern void itoab(int n,char* s,int b);
extern void itoa(int n,char* s);
 
extern void* stdcall malloc(dword size);
extern void stdcall free(void *pointer);
extern void* stdcall realloc(void* pointer,dword size);
 
extern int rand (void);
extern void srand (unsigned int seed);
 
#endif
/programs/games/nsider/include/string.h
0,0 → 1,25
#ifndef string_h
#define string_h
extern void* memchr(const void*,int,int);
extern int memcmp(const void*,const void*,int);
extern void* memcpy(void*,const void*,int);
extern void* memmove(void*,const void*,int);
extern void* memset(void*,int,int);
extern char* strcat(char*,const char*);
extern char* strchr(const char*,int);
extern int strcmp(const char*,const char*);
extern int strcoll(const char*,const char*);
extern char* strcpy(char*,const char*);
extern int strcspn(const char*,const char*);
extern int strlen(const char*);
extern char* strncat(char*,const char*,int);
extern int strncmp(const char*,const char*,int);
extern char* strncpy(char*,const char*,int);
extern char* strpbrk(const char*,const char*);
extern char* strrchr(const char*,int);
extern int strspn(const char*,const char*);
extern char* strstr(const char*,const char*);
extern char* strtok(char*,const char*);
extern int strxfrm(char*,const char*,int);
extern char* strdup(const char*);
#endif