This commit is contained in:
parent
402a9c5406
commit
8dc99eae4d
7 changed files with 28 additions and 68 deletions
BIN
Graphics/UI/+bamboobotleft.bmp
Normal file
BIN
Graphics/UI/+bamboobotleft.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
BIN
Graphics/UI/+bamboobotright.bmp
Normal file
BIN
Graphics/UI/+bamboobotright.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
Binary file not shown.
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
BIN
Graphics/UI/+bambootopleft.bmp
Normal file
BIN
Graphics/UI/+bambootopleft.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
BIN
Graphics/UI/+bambootopright.bmp
Normal file
BIN
Graphics/UI/+bambootopright.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
|
@ -259,8 +259,8 @@ UI_GFX_NONTRANS := faces\mr_krabs.bmp faces\patrick.bmp faces\plankton.bmp \
|
||||||
faces\mermaidman.bmp faces\barnacleboy.bmp faces\jack_custard.bmp
|
faces\mermaidman.bmp faces\barnacleboy.bmp faces\jack_custard.bmp
|
||||||
UI_GFX_NONTRANS_IN := $(foreach FILE,$(UI_GFX_NONTRANS),$(UI_GFX_DIR)/$(FILE))
|
UI_GFX_NONTRANS_IN := $(foreach FILE,$(UI_GFX_NONTRANS),$(UI_GFX_DIR)/$(FILE))
|
||||||
|
|
||||||
UI_GFX_TRANS := +vbamboo.bmp +vbambootl.bmp +vbambootr.bmp +vbamboobl.bmp +vbamboobr.bmp \
|
UI_GFX_TRANS := +bambootopleft.bmp +bamboobotleft.bmp +bambootopright.bmp +bamboobotright.bmp \
|
||||||
+hbamboo.bmp +hbambootl.bmp +hbambootr.bmp +hbamboobl.bmp +hbamboobr.bmp \
|
+bamboohorizontal.bmp +bamboovertical.bmp \
|
||||||
+butU.bmp +butD.bmp +butL.bmp +butR.bmp \
|
+butU.bmp +butD.bmp +butL.bmp +butR.bmp \
|
||||||
+butC.bmp +butS.bmp +butX.bmp +butT.bmp
|
+butC.bmp +butS.bmp +butX.bmp +butT.bmp
|
||||||
UI_GFX_TRANS_IN := $(foreach FILE,$(UI_GFX_TRANS),$(UI_GFX_DIR)/$(FILE))
|
UI_GFX_TRANS_IN := $(foreach FILE,$(UI_GFX_TRANS),$(UI_GFX_DIR)/$(FILE))
|
||||||
|
|
|
@ -432,102 +432,62 @@ void initGUIStuff()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int abcd=3;
|
|
||||||
void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot)
|
void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot)
|
||||||
{
|
{
|
||||||
sFrameHdr *vbam,*hbam,*spr1,*spr2;
|
sFrameHdr *vbam,*hbam,*corner;
|
||||||
int totalSize,numSprites,step;
|
int totalSize,numSprites,step;
|
||||||
int x1,y1,x2,y2;
|
int x1,y1,x2,y2;
|
||||||
int i,x,y;
|
int i,x,y;
|
||||||
|
|
||||||
|
vbam=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOVERTICAL);
|
||||||
|
hbam=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOHORIZONTAL);
|
||||||
|
corner=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOTOPLEFT); // All corners are the same size
|
||||||
|
|
||||||
vbam=s_uiSpriteBank->getFrameHeader(FRM__VBAMBOO);
|
// Top and bottom
|
||||||
hbam=s_uiSpriteBank->getFrameHeader(FRM__HBAMBOO);
|
totalSize=_w-((corner->W+corner->W)/2)-hbam->W;
|
||||||
spr1=spr2=0; // Just to keep the compiler quiet.. :/
|
|
||||||
|
|
||||||
// Top & bottom
|
|
||||||
totalSize=_w+vbam->W-hbam->W;
|
|
||||||
numSprites=(totalSize/hbam->W)+1;
|
numSprites=(totalSize/hbam->W)+1;
|
||||||
if(abcd&1)
|
|
||||||
if(numSprites>1)
|
if(numSprites>1)
|
||||||
{
|
{
|
||||||
step=(totalSize<<4)/(numSprites-1);
|
step=(totalSize<<4)/(numSprites-1);
|
||||||
x1=(_x-(vbam->W/2)+(hbam->W/2))<<4;
|
x1=1+(_x+(corner->W/2)+(hbam->W/2)-(hbam->W/2)+hbam->W-hbam->W-1)<<4;
|
||||||
y1=_y-(hbam->H/2);
|
y1=_y-(hbam->H/2);
|
||||||
y2=y1+_h;
|
y2=y1+_h;
|
||||||
for(i=0;i<numSprites;i++)
|
for(i=0;i<numSprites;i++)
|
||||||
{
|
{
|
||||||
x=(x1>>4)-(hbam->W/2);
|
x=x1>>4;
|
||||||
if(i==0)
|
s_uiSpriteBank->printFT4(hbam,x,y1,0,0,_ot);
|
||||||
{
|
s_uiSpriteBank->printFT4(hbam,x,y2,0,0,_ot);
|
||||||
spr1=s_uiSpriteBank->getFrameHeader(FRM__HBAMBOOTL);
|
|
||||||
spr2=s_uiSpriteBank->getFrameHeader(FRM__HBAMBOOBL);
|
|
||||||
s_uiSpriteBank->printFT4(spr1,x+hbam->W-spr1->W-1,y1,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(spr2,x+hbam->W-spr2->W-1,y2,0,0,_ot);
|
|
||||||
}
|
|
||||||
else if(i<numSprites-1)
|
|
||||||
{
|
|
||||||
s_uiSpriteBank->printFT4(hbam,x,y1,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(hbam,x,y2,0,0,_ot);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
s_uiSpriteBank->printFT4(FRM__HBAMBOOTR,x,y1,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(FRM__HBAMBOOBR,x,y2,0,0,_ot);
|
|
||||||
}
|
|
||||||
x1+=step;
|
x1+=step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
x1=_x-(_w-hbam->W)/2;
|
|
||||||
y1=_y-(hbam->H/2);
|
|
||||||
y2=y1+_h;
|
|
||||||
s_uiSpriteBank->printFT4(hbam,x1,y1,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(hbam,x1,y2,0,0,_ot);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Left & right
|
// Left and right
|
||||||
totalSize=_h+hbam->H-vbam->H;
|
totalSize=_h-((corner->H+corner->H)/2)-vbam->H;
|
||||||
numSprites=(totalSize/vbam->H)+1;
|
numSprites=(totalSize/vbam->H)+1;
|
||||||
if(abcd&2)
|
|
||||||
if(numSprites>1)
|
if(numSprites>1)
|
||||||
{
|
{
|
||||||
step=(totalSize<<4)/(numSprites-1);
|
step=(totalSize<<4)/(numSprites-1);
|
||||||
y1=(_y-(hbam->H/2)+(vbam->H/2))<<4;
|
|
||||||
x1=_x-(vbam->W/2);
|
x1=_x-(vbam->W/2);
|
||||||
x2=x1+_w;
|
x2=x1+_w;
|
||||||
|
y1=1+(_y+(corner->H/2)+(vbam->H/2)-(vbam->H/2)+vbam->H-vbam->H-1)<<4;
|
||||||
for(i=0;i<numSprites;i++)
|
for(i=0;i<numSprites;i++)
|
||||||
{
|
{
|
||||||
y=(y1>>4)-(vbam->H/2);
|
y=y1>>4;
|
||||||
if(i==0)
|
s_uiSpriteBank->printFT4(vbam,x1,y,0,0,_ot);
|
||||||
{
|
s_uiSpriteBank->printFT4(vbam,x2,y,0,0,_ot);
|
||||||
spr1=s_uiSpriteBank->getFrameHeader(FRM__VBAMBOOTL);
|
|
||||||
spr2=s_uiSpriteBank->getFrameHeader(FRM__VBAMBOOTR);
|
|
||||||
s_uiSpriteBank->printFT4(spr1,x1,y+vbam->H-spr1->H-1,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(spr2,x2,y+vbam->H-spr2->H-1,0,0,_ot);
|
|
||||||
}
|
|
||||||
else if(i<numSprites-1)
|
|
||||||
{
|
|
||||||
s_uiSpriteBank->printFT4(vbam,x1,y,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(vbam,x2,y,0,0,_ot);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
s_uiSpriteBank->printFT4(FRM__VBAMBOOBL,x1,y,0,0,_ot);
|
|
||||||
s_uiSpriteBank->printFT4(FRM__VBAMBOOBR,x2,y,0,0,_ot);
|
|
||||||
}
|
|
||||||
y1+=step;
|
y1+=step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
// Draw Corners
|
||||||
x1=_x-(vbam->W/2);
|
corner=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOTOPLEFT);
|
||||||
x2=x1+_w;
|
s_uiSpriteBank->printFT4(corner,_x-(corner->W/2),_y-(corner->H/2),0,0,_ot);
|
||||||
y1=_y+(_h-vbam->H)/2;
|
corner=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOTOPRIGHT);
|
||||||
s_uiSpriteBank->printFT4(vbam,x1,y1,0,0,_ot);
|
s_uiSpriteBank->printFT4(corner,_x+_w-(corner->W/2),_y-(corner->H/2),0,0,_ot);
|
||||||
s_uiSpriteBank->printFT4(vbam,x2,y1,0,0,_ot);
|
corner=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOBOTRIGHT);
|
||||||
}
|
s_uiSpriteBank->printFT4(corner,_x+_w-(corner->W/2),_y+_h-(corner->H/2),0,0,_ot);
|
||||||
|
corner=s_uiSpriteBank->getFrameHeader(FRM__BAMBOOBOTLEFT);
|
||||||
|
s_uiSpriteBank->printFT4(corner,_x-(corner->W/2),_y+_h-(corner->H/2),0,0,_ot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue