-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed alphablending, added sample in gif/alpablending
git-svn-id: http://psp.jim.sh/svn/ps2/trunk@1060 bf8e388e-adfb-0310-9433-acdc3088d20d
- Loading branch information
Showing
8 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
EE_BIN = alphablend.elf | ||
EE_OBJS = main.o | ||
|
||
all : $(EE_BIN) | ||
|
||
include $(LIBITO)/Makefile.prefab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include <Ito.h> | ||
|
||
using namespace Ito; | ||
|
||
int main() | ||
{ | ||
GifPipe Gif; | ||
|
||
u32 ScreenWidth = 640; | ||
u32 ScreenHeight = 448; | ||
u32 ScreenX = 155; | ||
u32 ScreenY = 70; | ||
|
||
if(Gs::GetVideoMode() == VMODE_PAL) | ||
{ | ||
ScreenHeight = 512; | ||
ScreenY = 70; | ||
} | ||
|
||
|
||
Gs::Reset(); | ||
|
||
Gif.SetupEnv(RGBA16, ScreenWidth, ScreenHeight, 2, VMODE_AUTO, FIELD, ENABLE, ScreenX, ScreenY); | ||
|
||
Gif.AlphaBlending(0); | ||
|
||
while(1) | ||
{ | ||
Gif.SetNextDrawbuffer(); | ||
|
||
Gif.PrimAlphaBlend(false); | ||
Gif.ClearScreen(); | ||
Gif.PrimAlphaBlend(true); | ||
|
||
|
||
Gif.Sprite(RGBA(0,0,0xFF, 0x80), 64, 64, 128, 128); | ||
|
||
Gif.Sprite(RGBA(0xFF,0,0, 0x40), 96, 96, 160, 160); | ||
|
||
Gif.Send(); | ||
} | ||
|
||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
EE_BIN = sprite.elf | ||
EE_BIN = alphablend.elf | ||
EE_OBJS = main.o | ||
|
||
all : $(EE_BIN) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters