home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix Heaven Sunny 2
/
APPARE2.BIN
/
oh_towns
/
install
/
dispoht.cci
< prev
next >
Wrap
Text File
|
1995-06-20
|
2KB
|
137 lines
# 1 "dispoht.c"
# 1 "dispoht.c"
# 6 "install.h"
char *get_inst_main_mnu();
char *get_inst_imag_mnu();
char *get_inst_tool_mnu();
char *get_inst_snd_mnu();
char *get_inst_game_mnu();
char *get_inst_data_mnu();
int disp_desktop();
int syl_clear();
int syl_putf(char *form);
char *add_path_fn(char *path, char *fn);
int tif_load(char *fn);
int tiflist_disp( char **list );
int mveplay(char *fn, int loop);
int exprun(char *fn, char *para);
int inst_help( int evNo, char *evDat, char *fn);
int install_end( char *soft_name, int err );
int install_exec( char *probuf );
int item_setApl( int drv, int icon, char *ttl, char *path, char *para, int att );
# 14 "dispoht.c"
int init();
int term();
int main(int argc, char **argv)
{
int x, y;
init();
tif_load("/OH_TOWNS/ohtowns.tif");
_apl_wait(100 * 5);
while ( PD_getp(&x,&y) )
;
term();
return (0);
}
int init()
{
APL_init((0x0C),1,1);
SCN_wrtPage(0);
return ((0));
}
int term()
{
APL_term();
}
# 47 "dispoht.c"
int tif_load( char *fn )
{
int i, x, y, ret, pixel, md, x0, y0;
char *img;
short fr[4];
SCN_wrtPage(0);
SCN_boxf(0,0,639,479,0,0);
if ( (img = IMG_open()) != (0) )
{
IMG_setAtt(img,(0x00010000));
if ( IMG_load(img,fn) == (0) )
{
IMG_getFr(img,fr);
pixel = IMG_getPixel(img);
switch ( pixel )
{
case 1:
case 4:
x0 = (640 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 3;
break;
case 8:
x0 = (640 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 12;
break;
case 16:
if ( fr[2] - fr[0] + 1 <= 320 )
{
x0 = (320 - (fr[2] - fr[0] + 1)) / 2;
y0 = (240 - (fr[3] - fr[1] + 1)) / 2;
md = 10;
} else
{
x0 = (512 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 17;
}
break;
default:
goto _TIF_ERR;
}
IMG_setPos(img,x0,y0);
PD_curOff();
EGB_displayPage(EgbPtr,0,0);
EGB_writePage(EgbPtr,0);
EGB_clearScreen(EgbPtr);
EGB_resolution(EgbPtr,0,md);
if ( md == 3 || md == 10 )
{
EGB_resolution(EgbPtr,1,3);
EGB_writePage(EgbPtr,1);
EGB_clearScreen(EgbPtr);
}
EGB_writePage(EgbPtr,0);
if ( md == 10 )
{
EGB_displayStart(EgbPtr,2,2,2);
EGB_displayStart(EgbPtr,3,320,240);
}
EGB_color(EgbPtr,1,0);
EGB_clearScreen(EgbPtr);
IMG_dsp(img);
if ( md == 3 || md == 10 )
EGB_displayPage(EgbPtr,1,3);
else
EGB_displayPage(EgbPtr,0,1);
}
IMG_close(img);
}
# 128 "dispoht.c"
return ((0));
}