-
Notifications
You must be signed in to change notification settings - Fork 1
/
SPLASH.C
executable file
·70 lines (47 loc) · 1.1 KB
/
SPLASH.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <math.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <graphics.h>
#include <string.h>
#define MAX 256
void splash() {
FILE *fp=NULL;
long int n[MAX]={0};
int x,y,i,j,c,t, type;
int r,g,bl;
/*int gd=VGA,gm=VGAHI,x=0,y;*/
long int w,h;
struct palettetype pal;
char s[5];
char INPUTFILE[100], OUTPUTFILE[100];
long int imgoffset=1078;
fp=fopen("logo.bmp","rb");
fseek(fp,18,0);
w=fgetc(fp)+(fgetc(fp)<<8)+(fgetc(fp)<<16)+(fgetc(fp)<<24);
h=fgetc(fp)+(fgetc(fp)<<8)+(fgetc(fp)<<16)+(fgetc(fp)<<24);
fseek(fp,imgoffset,0);
x=0;
y=h;
/*initgraph(&gd,&gm,"c:/turboc/BGI/");*/
getpalette(&pal);
for (i=0; i<16; i++)
setrgbpalette(pal.colors[i],i*5,0,0);
fseek(fp,imgoffset,0);
while(!feof(fp)) {
c=fgetc(fp);
putpixel(x,y,c/32);
x=(x+1)%w;
if(!x){
--y;
}
++n[c%MAX];
}
fclose(fp);
setcolor(8);
settextstyle(SMALL_FONT,HORIZ_DIR,8);
outtextxy(10,10, "HYPERSOFT ILTD");
getch();
closegraph();
init();
}