This commit is contained in:
Paul 2000-11-15 23:41:47 +00:00
parent 4814b1ff13
commit 7bcf305c41
8 changed files with 54 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -85,7 +85,7 @@ GFX_DATA_OUT += $(TRANS_OUT_DAT)
UI_GFX_DIR := $(GRAF_DIR)/ui
UI_GFX_OUT_DIR := $(DATA_OUT)/ui
UI_GFX_FONT := font sbfontan
UI_GFX_FONT := font
UI_GFX_FONT_IN := $(foreach FILE,$(UI_GFX_FONT),$(UI_GFX_DIR)/$(FILE).anm)
UI_GFX_NONTRANS :=
@ -105,7 +105,7 @@ cleanui :
ui: $(UI_GFX_TEX_IN)
$(UI_GFX_TEX_OUT) : $(UI_GFX_TEX_IN)
@parkgrab -c+ -z+ $(UI_GFX_FONT_IN) ${UI_GFX_TRANS_IN} -c+ -z- ${UI_GFX_NONTRANS_IN} -b+ -t:30,2,1 -l:$(REPORT_DIR)/ui.lbm -o:$(UI_GFX_TEX_OUT) -k:$(UI_GFX_REP_FILE)
@parkgrab -c+ -z+ $(UI_GFX_FONT_IN) ${UI_GFX_TRANS_IN} +c- -z- ${UI_GFX_NONTRANS_IN} -b+ -t:31,1,1 -l:$(REPORT_DIR)/ui.lbm -o:$(UI_GFX_TEX_OUT) -k:$(UI_GFX_REP_FILE)
@$(MV) -f $(UI_GFX_OUT_DIR)/uigfx.h $(UI_GFX_HDR_FILE)
GFX_DATA_OUT += $(UI_GFX_TEX_OUT)
@ -134,7 +134,7 @@ cleaningamefx :
ingamefx: $(INGAMEFX_GFX_TEX_IN)
$(INGAMEFX_GFX_TEX_OUT) : $(INGAMEFX_GFX_TEX_IN)
@parkgrab -c+ -z+ ${INGAMEFX_GFX_TRANS_IN} -c+ -z- ${INGAMEFX_GFX_NONTRANS_IN} -b+ -t:28,1,1 -l:$(REPORT_DIR)/ingamefx.lbm -o:$(INGAMEFX_GFX_TEX_OUT) -k:$(INGAMEFX_GFX_REP_FILE)
@parkgrab -z+ ${INGAMEFX_GFX_TRANS_IN} -z- ${INGAMEFX_GFX_NONTRANS_IN} -b+ -t:29,1,1 -l:$(REPORT_DIR)/ingamefx.lbm -o:$(INGAMEFX_GFX_TEX_OUT) -k:$(INGAMEFX_GFX_REP_FILE)
@$(MV) -f $(INGAMEFX_GFX_OUT_DIR)/ingamefx.h $(INGAMEFX_GFX_HDR_FILE)
GRAF_DIRS_TO_MAKE += $(INGAMEFX_GFX_OUT_DIR)
@ -150,10 +150,13 @@ FRONTEND_GFX_OUT_DIR := $(DATA_OUT)/frontend
FRONTEND_GFX_NONTRANS := sky.bmp
FRONTEND_GFX_NONTRANS_IN := $(foreach FILE,$(FRONTEND_GFX_NONTRANS),$(FRONTEND_GFX_DIR)/$(FILE))
FRONTEND_GFX_TRANS := +bg1.bmp +island.bmp +sblogo.bmp
FRONTEND_GFX_TRANS := +bg1.bmp
FRONTEND_GFX_TRANS_IN := $(foreach FILE,$(FRONTEND_GFX_TRANS),$(FRONTEND_GFX_DIR)/$(FILE))
FRONTEND_GFX_TEX_IN := ${FRONTEND_GFX_NONTRANS_IN} ${FRONTEND_GFX_TRANS_IN}
FRONTEND_GFX_TRANS_NO_ROT := +island.bmp +sblogo.bmp
FRONTEND_GFX_TRANS_NO_ROT_IN := $(foreach FILE,$(FRONTEND_GFX_TRANS_NO_ROT),$(FRONTEND_GFX_DIR)/$(FILE))
FRONTEND_GFX_TEX_IN := ${FRONTEND_GFX_NONTRANS_IN} ${FRONTEND_GFX_TRANS_IN} ${FRONTEND_GFX_TRANS_NO_ROT_IN}
FRONTEND_GFX_TEX_OUT := $(FRONTEND_GFX_OUT_DIR)/frontend.Spr
FRONTEND_GFX_REP_FILE := $(REPORT_DIR)/frontend.rep
FRONTEND_GFX_HDR_FILE := $(INC_DIR)/frontend.h
@ -164,7 +167,7 @@ cleanfrontend :
frontend: $(FRONTEND_GFX_TEX_IN)
$(FRONTEND_GFX_TEX_OUT) : $(FRONTEND_GFX_TEX_IN)
@parkgrab -c+ -z+ ${FRONTEND_GFX_TRANS_IN} -c+ -z- ${FRONTEND_GFX_NONTRANS_IN} -b+ -t:29,1,1 -l:$(REPORT_DIR)/frontend.lbm -o:$(FRONTEND_GFX_TEX_OUT) -k:$(FRONTEND_GFX_REP_FILE)
@parkgrab -r- -z+ ${FRONTEND_GFX_TRANS_NO_ROT_IN} -r+ -z+ ${FRONTEND_GFX_TRANS_IN} -z- ${FRONTEND_GFX_NONTRANS_IN} -b+ -t:30,1,1 -l:$(REPORT_DIR)/frontend.lbm -o:$(FRONTEND_GFX_TEX_OUT) -k:$(FRONTEND_GFX_REP_FILE)
@$(MV) -f $(FRONTEND_GFX_OUT_DIR)/frontend.h $(FRONTEND_GFX_HDR_FILE)
GRAF_DIRS_TO_MAKE += $(FRONTEND_GFX_OUT_DIR)

View File

@ -75,12 +75,15 @@
---- */
///////////////
int seaw=10;
int seah=70;
int seaw=1;
int seah=50;
int seaspeed=20;
int seagap=120;
int seascale=4000;
int seascale=4200;
int seascalegrow=-50;
int colourbase=64;
int colourscale=4000;
int colourpostscale=10;
int sval=0;
///////////////
@ -102,7 +105,7 @@ void CFrontEndMainTitles::init()
m_smallFont->setJustification(FontBank::JUST_CENTRE);
m_bigFont=new ("MainTitle BigFont") FontBank();
m_bigFont->initialise(&largeFont);
m_bigFont->initialise(&standardFont);
m_bigFont->setJustification(FontBank::JUST_CENTRE);
m_bigFont->setColour(PRESS_START_TEXT_R,PRESS_START_TEXT_G,PRESS_START_TEXT_B);
@ -139,6 +142,10 @@ int posnum=5;
Params:
Returns:
---------------------------------------------------------------------- */
int isx=39;
int isy=3;
int isw=100;
int ish=56;
void CFrontEndMainTitles::render()
{
sFrameHdr *fh;
@ -166,7 +173,8 @@ void CFrontEndMainTitles::render()
setSemiTrans(ft4,true);
}
renderSea();
renderSeaSection(m_sprites->getFrameHeader(FRM__ISLAND),isx,HORIZON_LEVEL+isy,isw,ish);
renderSeaSection(m_sprites->getFrameHeader(FRM_SKY),0,HORIZON_LEVEL,512,256-HORIZON_LEVEL+SEA_OVERLAP);
switch(m_mode)
{
@ -210,7 +218,7 @@ CFader::setFadingOut();
Params:
Returns:
---------------------------------------------------------------------- */
POLY_FT4 *CFrontEndMainTitles::prepareSeaPortionFT4(sFrameHdr *_fh,int _x,int _y,int _w,int _h)
POLY_FT4 *CFrontEndMainTitles::prepareSeaPortionFT4(sFrameHdr *_fh,int _x,int _y,int _w,int _h,int _rgb)
{
int u,v,w,h;
POLY_FT4 *ft4;
@ -224,7 +232,7 @@ POLY_FT4 *CFrontEndMainTitles::prepareSeaPortionFT4(sFrameHdr *_fh,int _x,int _y
ft4=GetPrimFT4();
setShadeTexPolyFT4(ft4);
setShadeTex(ft4,0);
setRGB0(ft4,64,64,64);
setRGB0(ft4,_rgb,_rgb,_rgb);
ft4->u0=u;
ft4->u1=u+w;
@ -247,31 +255,36 @@ POLY_FT4 *CFrontEndMainTitles::prepareSeaPortionFT4(sFrameHdr *_fh,int _x,int _y
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndMainTitles::renderSea()
typedef struct
{
int x,y;
int colour;
} SeaGrid;
void CFrontEndMainTitles::renderSeaSection(sFrameHdr *_fh,int _x,int _y,int _w,int _h)
{
sFrameHdr *fh;
int xloop,yloop;
int xstep,ystep;
int x,y;
int scale;
POLY_FT4 *ft4;
int grid[seaw+1][seah+1][2];
SeaGrid grid[seaw+1][seah+1];
int waveval;
// Grow the grid
xstep=(512<<8)/seaw;
ystep=((256-HORIZON_LEVEL+(2048/(seascale+(seascalegrow*seah))))<<8)/seah;
y=HORIZON_LEVEL<<8;
xstep=(_w<<8)/seaw;
ystep=(_h<<8)/seah;
y=_y<<8;
waveval=sval;
scale=seascale;
for(yloop=0;yloop<seah+1;yloop++)
{
x=0;
x=_x<<8;
for(xloop=0;xloop<seaw+1;xloop++)
{
grid[xloop][yloop][0]=(x>>8)+0;
grid[xloop][yloop][1]=(y>>8)+(msin(waveval)/scale);
grid[xloop][yloop].x=(x>>8)+0;
grid[xloop][yloop].y=(y>>8)+(msin(waveval)/scale);
grid[xloop][yloop].colour=colourbase+((msin(waveval)/colourscale)*colourpostscale);
x+=xstep;
}
y+=ystep;
@ -279,15 +292,7 @@ void CFrontEndMainTitles::renderSea()
waveval=(waveval+seagap)&4095;
}
// Hmm.. let's stick the top line to the horizon shall we?
for(xloop=0;xloop<seaw+1;xloop++)
{
grid[xloop][yloop][1]=HORIZON_LEVEL;
}
// Draw it
fh=m_sprites->getFrameHeader(FRM_SKY);
//fh=m_sprites->getFrameHeader(FRM__SBLOGO);
xstep=(256<<8)/seaw;
ystep=(256<<8)/seah;
y=0;
@ -296,15 +301,15 @@ void CFrontEndMainTitles::renderSea()
x=0;
for(xloop=0;xloop<seaw;xloop++)
{
ft4=prepareSeaPortionFT4(fh,x>>8,y>>8,xstep>>8,ystep>>8);
ft4->x0=grid[xloop ][yloop ][0];
ft4->y0=grid[xloop ][yloop ][1];
ft4->x1=grid[xloop+1][yloop ][0];
ft4->y1=grid[xloop+1][yloop ][1];
ft4->x3=grid[xloop+1][yloop+1][0];
ft4->y3=grid[xloop+1][yloop+1][1];
ft4->x2=grid[xloop ][yloop+1][0];
ft4->y2=grid[xloop ][yloop+1][1];
ft4=prepareSeaPortionFT4(_fh,x>>8,y>>8,xstep>>8,ystep>>8,64);//grid[xloop][yloop].colour);
ft4->x0=grid[xloop ][yloop ].x;
ft4->y0=grid[xloop ][yloop ].y;
ft4->x1=grid[xloop+1][yloop ].x;
ft4->y1=grid[xloop+1][yloop ].y;
ft4->x3=grid[xloop+1][yloop+1].x;
ft4->y3=grid[xloop+1][yloop+1].y;
ft4->x2=grid[xloop ][yloop+1].x;
ft4->y2=grid[xloop ][yloop+1].y;
AddPrimToList(ft4,1000);
x+=xstep;
}

View File

@ -46,7 +46,7 @@ private:
enum
{
LOGO_CENTRE_Y=74,
GAME_TITLE_TEXT_CENTRE_Y=120,
GAME_TITLE_TEXT_CENTRE_Y=100,
GAME_TITLE_TEXT_R=128,
GAME_TITLE_TEXT_G=128,
GAME_TITLE_TEXT_B=128,
@ -57,8 +57,9 @@ private:
PRESS_START_TEXT_B=100,
HORIZON_LEVEL=160,
SEA_OVERLAP=50, // Sea is drawn to this many pixels below screen bottom
ISLAND_LEFT_X=40,
ISLAND_LEFT_X=40, // Island position
ISLAND_BOTTOM_Y=HORIZON_LEVEL+10,
};
@ -68,8 +69,8 @@ private:
MODE__SELECT_OPTION,
};
POLY_FT4 *prepareSeaPortionFT4(struct sFrameHdr *_fh,int _x,int _y,int _w,int _h);
void renderSea();
POLY_FT4 *prepareSeaPortionFT4(struct sFrameHdr *_fh,int _x,int _y,int _w,int _h,int _rgb);
void renderSeaSection(struct sFrameHdr *fh,int _x,int _y,int _w,int _h);
void renderPressStart();

View File

@ -86,43 +86,6 @@ s16 standardFontTab[]=
};
FontData standardFont( UI_UIGFX_SPR, standardFontTab, 9, 1,1, 4 );
s16 largeFontTab[]=
{
-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, -1,
/* ! " # $ % & ' */ -1,FRM_SBFONTAN_0037,FRM_SBFONTAN_0038, -1,FRM_SBFONTAN_0052,FRM_SBFONTAN_0039,FRM_SBFONTAN_0040,FRM_SBFONTAN_0036,
/* ( ) * + , - . / */ FRM_SBFONTAN_0042,FRM_SBFONTAN_0043,FRM_SBFONTAN_0041, -1,FRM_SBFONTAN_0047,FRM_SBFONTAN_0044,FRM_SBFONTAN_0053,FRM_SBFONTAN_0050,
/* 0 1 2 3 4 5 6 7 */ FRM_SBFONTAN_0026,FRM_SBFONTAN_0027,FRM_SBFONTAN_0028,FRM_SBFONTAN_0029,FRM_SBFONTAN_0030,FRM_SBFONTAN_0031,FRM_SBFONTAN_0032,FRM_SBFONTAN_0033,
/* 8 9 : ; < = > ? */ FRM_SBFONTAN_0034,FRM_SBFONTAN_0035,FRM_SBFONTAN_0045,FRM_SBFONTAN_0046, -1, -1, -1,FRM_SBFONTAN_0048,
/* @ A B C D E F G */ -1,FRM_SBFONTAN_0000,FRM_SBFONTAN_0001,FRM_SBFONTAN_0002,FRM_SBFONTAN_0003,FRM_SBFONTAN_0004,FRM_SBFONTAN_0005,FRM_SBFONTAN_0006,
/* H I J K L M N O */ FRM_SBFONTAN_0007,FRM_SBFONTAN_0008,FRM_SBFONTAN_0009,FRM_SBFONTAN_0010,FRM_SBFONTAN_0011,FRM_SBFONTAN_0012,FRM_SBFONTAN_0013,FRM_SBFONTAN_0014,
/* P Q R S T U V W */ FRM_SBFONTAN_0015,FRM_SBFONTAN_0016,FRM_SBFONTAN_0017,FRM_SBFONTAN_0018,FRM_SBFONTAN_0019,FRM_SBFONTAN_0020,FRM_SBFONTAN_0021,FRM_SBFONTAN_0022,
/* X Y Z [ \ ] ^ _ */ FRM_SBFONTAN_0023,FRM_SBFONTAN_0024,FRM_SBFONTAN_0025,FRM_SBFONTAN_0054,FRM_SBFONTAN_0049,FRM_SBFONTAN_0055, -1, -1,
/* ` a b c d e f g */ -1,FRM_SBFONTAN_0056,FRM_SBFONTAN_0057,FRM_SBFONTAN_0058,FRM_SBFONTAN_0059,FRM_SBFONTAN_0060,FRM_SBFONTAN_0061,FRM_SBFONTAN_0062,
/* h i j k l m n o */ FRM_SBFONTAN_0063,FRM_SBFONTAN_0064,FRM_SBFONTAN_0065,FRM_SBFONTAN_0066,FRM_SBFONTAN_0067,FRM_SBFONTAN_0068,FRM_SBFONTAN_0069,FRM_SBFONTAN_0070,
/* p q r s t u v w */ FRM_SBFONTAN_0071,FRM_SBFONTAN_0072,FRM_SBFONTAN_0073,FRM_SBFONTAN_0074,FRM_SBFONTAN_0075,FRM_SBFONTAN_0076,FRM_SBFONTAN_0077,FRM_SBFONTAN_0078,
/* x y z { | } ~ . */ FRM_SBFONTAN_0079,FRM_SBFONTAN_0080,FRM_SBFONTAN_0081, -1, -1, -1, -1, -1,
/* € <20> ƒ „ … † ‡ */ -1, -1, -1, -1, -1, -1, -1, -1,
/* ˆ ‰ Š Œ <20> Ž <20> */ -1, -1, -1, -1, -1, -1, -1, -1,
/* <20> “ ” • — */ -1, -1, -1, -1, -1, -1, -1, -1,
/* ˜ ™ š œ <20> ž Ÿ */ -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, -1,
/* ¸ ¹ º » ¼ ½ ¾ ¿ */ -1, -1, -1, -1, -1, -1, -1, -1,
-1,-1,
/* À Á Â Ã Ä Å Æ Ç */ FRM_SBFONTAN_0084,FRM_SBFONTAN_0085,FRM_SBFONTAN_0086,FRM_SBFONTAN_0087,FRM_SBFONTAN_0088,FRM_SBFONTAN_0089,FRM_SBFONTAN_0090,FRM_SBFONTAN_0091,
/* È É Ê Ë Ì Í Î Ï */ FRM_SBFONTAN_0092,FRM_SBFONTAN_0093,FRM_SBFONTAN_0094,FRM_SBFONTAN_0095,FRM_SBFONTAN_0096,FRM_SBFONTAN_0097,FRM_SBFONTAN_0098,FRM_SBFONTAN_0099,
/* Ð Ñ Ò Ó Ô Õ Ö × */ FRM_SBFONTAN_0100,FRM_SBFONTAN_0101,FRM_SBFONTAN_0102,FRM_SBFONTAN_0103,FRM_SBFONTAN_0104,FRM_SBFONTAN_0105,FRM_SBFONTAN_0106,FRM_SBFONTAN_0107,
/* Ø Ù Ú Û Ü Ý Þ ß */ FRM_SBFONTAN_0108,FRM_SBFONTAN_0109,FRM_SBFONTAN_0110,FRM_SBFONTAN_0111,FRM_SBFONTAN_0112,FRM_SBFONTAN_0113,FRM_SBFONTAN_0114,FRM_SBFONTAN_0115,
/* à á â ã ä å æ ç */ FRM_SBFONTAN_0116,FRM_SBFONTAN_0117,FRM_SBFONTAN_0118,FRM_SBFONTAN_0119,FRM_SBFONTAN_0120,FRM_SBFONTAN_0121,FRM_SBFONTAN_0122,FRM_SBFONTAN_0123,
/* è é ê ë ì í î ï */ FRM_SBFONTAN_0124,FRM_SBFONTAN_0125,FRM_SBFONTAN_0126,FRM_SBFONTAN_0127,FRM_SBFONTAN_0128,FRM_SBFONTAN_0129,FRM_SBFONTAN_0130,FRM_SBFONTAN_0131,
/* ð ñ ò ó ô õ ö ÷ */ FRM_SBFONTAN_0132,FRM_SBFONTAN_0133, -1, -1, -1, -1, -1, -1,
/* ø ù ú û ü ý þ ÿ */ -1, -1, -1, -1, -1, -1, -1, -1,
};
FontData largeFont( UI_UIGFX_SPR, largeFontTab, 19, 1,1, 6 );
/*----------------------------------------------------------------------

View File

@ -59,7 +59,7 @@ public:
// Available fonts
extern FontData standardFont; // Crappy old PR font
extern FontData largeFont; // Large SB font
/* Data
---- */

View File

@ -278,7 +278,7 @@ void CGUIObjectWithFont::init(CGUIObject *_parent,GUIId _id)
{
CGUIObject::init(_parent,_id);
m_fontBank=new ("GUIObjectWithFont:fontBank") FontBank();
m_fontBank->initialise(&largeFont);
m_fontBank->initialise(&standardFont);
m_fontBank->setJustification(FontBank::JUST_CENTRE);
m_fontBank->setOt(getOt());
m_fontBank->setColour(DEFAULT_FONT_R,DEFAULT_FONT_G,DEFAULT_FONT_B);