Change rendering so shadowing is turned off, and what you see runs through present
This commit is contained in:
parent
f8fca3627c
commit
70e3d25f1b
958
asm/blit.s
958
asm/blit.s
File diff suppressed because it is too large
Load Diff
|
@ -43,9 +43,12 @@ TILEBANK2 entry
|
|||
lda >$880005,x
|
||||
sta >TILEBANK+1
|
||||
|
||||
cpy #$9D00-(7*160)
|
||||
bge skip
|
||||
|
||||
TILEBANK entry
|
||||
jsl >$880000
|
||||
|
||||
skip anop
|
||||
plb
|
||||
|
||||
rtl
|
||||
|
@ -70,3 +73,27 @@ iBank equ 4
|
|||
|
||||
*-------------------------------------------------------------------------------
|
||||
end
|
||||
|
||||
|
||||
*-------------------------------------------------------------------------------
|
||||
wait_vsync start BLITCODE
|
||||
|
||||
php
|
||||
sep #$30
|
||||
|
||||
* while VBLANK, wait here
|
||||
invbl anop
|
||||
lda >$00c019
|
||||
bpl invbl
|
||||
|
||||
* while !VBLANK, loop here
|
||||
vbl anop
|
||||
lda >$00c019
|
||||
bmi vbl
|
||||
|
||||
plp
|
||||
rtl
|
||||
*-------------------------------------------------------------------------------
|
||||
end
|
||||
*-------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -99,6 +99,9 @@ extern void sysvid_init(void);
|
|||
extern void sysvid_shutdown(void);
|
||||
extern void sysvid_update(rect_t *);
|
||||
extern void sysvid_clear(void);
|
||||
extern void sysvid_clearPalette(void);
|
||||
extern void sysvid_FadeIn(void);
|
||||
extern void sysvid_FadeOut(void);
|
||||
extern void sysvid_zoom(S8);
|
||||
extern void sysvid_toggleFullscreen(void);
|
||||
extern void sysvid_setGamePalette(void);
|
||||
|
@ -191,7 +194,8 @@ extern void DrawSprite(int offset, int SpriteNo);
|
|||
extern void PresentPalette(void);
|
||||
extern void PresentSCB(void);
|
||||
extern void PresentFrameBuffer(void);
|
||||
extern void BlitRect(short x, short y, short width, short height);
|
||||
extern int BlitRect(U16 x, U16 y, U16 width, U16 height);
|
||||
extern void wait_vsync(void);
|
||||
|
||||
// ADB Support Code
|
||||
extern char KeyArray[128];
|
||||
|
|
|
@ -94,7 +94,7 @@ rect_t draw_STATUSRECT = {
|
|||
DRAW_STATUS_LIVES_X + 6 * 8 - DRAW_STATUS_SCORE_X, 8,
|
||||
NULL
|
||||
};
|
||||
rect_t draw_SCREENRECT = { 0, 0, SYSVID_WIDTH, SYSVID_HEIGHT, NULL };
|
||||
rect_t draw_SCREENRECT = { 0, 0, 320, SYSVID_HEIGHT, NULL };
|
||||
|
||||
|
||||
/*
|
||||
|
@ -373,7 +373,7 @@ draw_sprite2(U8 number, U16 x, U16 y, U8 front)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (y >= (200 - 24))
|
||||
if (y >= (200 - 8))
|
||||
return;
|
||||
|
||||
draw_setfb(x, y);
|
||||
|
|
|
@ -58,7 +58,7 @@ screen_introMain(void)
|
|||
}
|
||||
|
||||
switch (seq) {
|
||||
case 1: /* dispay hall of fame */
|
||||
case 1: /* display hall of fame */
|
||||
sysvid_clear();
|
||||
tm = sys_gettime();
|
||||
|
||||
|
@ -81,7 +81,11 @@ screen_introMain(void)
|
|||
#endif
|
||||
|
||||
#ifdef GFXGS
|
||||
sysvid_FadeOut();
|
||||
draw_img(&splash_lz4);
|
||||
PresentFrameBuffer();
|
||||
PresentPalette();
|
||||
sysvid_FadeIn();
|
||||
#endif
|
||||
|
||||
seq = 2;
|
||||
|
@ -120,6 +124,8 @@ screen_introMain(void)
|
|||
draw_pic(0, 0, 0x140, 0x20, pic_haf);
|
||||
#endif
|
||||
#ifdef GFXGS
|
||||
sysvid_FadeOut();
|
||||
PresentFrameBuffer();
|
||||
draw_img(&pic_haf_lz4);
|
||||
#endif
|
||||
|
||||
|
@ -141,6 +147,10 @@ screen_introMain(void)
|
|||
draw_tllst = s;
|
||||
draw_tilesList();
|
||||
}
|
||||
#ifdef GFXGS
|
||||
PresentFrameBuffer();
|
||||
sysvid_FadeIn();
|
||||
#endif
|
||||
|
||||
seq = 5;
|
||||
break;
|
||||
|
@ -169,6 +179,11 @@ screen_introMain(void)
|
|||
|
||||
if (seq == 7) { /* we're done */
|
||||
sysvid_clear();
|
||||
#ifdef GFXGS
|
||||
sysvid_FadeOut();
|
||||
PresentFrameBuffer();
|
||||
sysvid_FadeIn();
|
||||
#endif
|
||||
seq = 0;
|
||||
seen = 0;
|
||||
first = FALSE;
|
||||
|
|
|
@ -39,9 +39,21 @@ screen_xrick(void)
|
|||
static U8 wait = 0;
|
||||
|
||||
if (seq == 0) {
|
||||
#ifdef GFXGS
|
||||
sysvid_clearPalette();
|
||||
wait_vsync();
|
||||
PresentPalette();
|
||||
PresentSCB();
|
||||
draw_img(IMG_SPLASH);
|
||||
PresentFrameBuffer();
|
||||
wait_vsync();
|
||||
PresentPalette();
|
||||
PresentSCB();
|
||||
#else
|
||||
sysvid_clear();
|
||||
draw_img(IMG_SPLASH);
|
||||
game_rects = &draw_SCREENRECT;
|
||||
#endif
|
||||
seq = 1;
|
||||
}
|
||||
|
||||
|
@ -69,6 +81,13 @@ screen_xrick(void)
|
|||
if (seq == 99) { /* we're done */
|
||||
sysvid_clear();
|
||||
sysvid_setGamePalette();
|
||||
#ifdef GFXGS
|
||||
sysvid_clearPalette();
|
||||
wait_vsync();
|
||||
PresentPalette();
|
||||
PresentSCB();
|
||||
PresentFrameBuffer();
|
||||
#endif
|
||||
seq = 0;
|
||||
return SCREEN_DONE;
|
||||
}
|
||||
|
|
70
src/sysvid.c
70
src/sysvid.c
|
@ -41,7 +41,8 @@ segment "system";
|
|||
#endif
|
||||
|
||||
U8 *sysvid_fb; /* frame buffer */
|
||||
rect_t SCREENRECT = {0, 0, SYSVID_WIDTH, SYSVID_HEIGHT, NULL}; /* whole fb */
|
||||
|
||||
rect_t SCREENRECT = {0, 0, 320, SYSVID_HEIGHT, NULL}; /* whole fb */
|
||||
|
||||
#ifndef IIGS
|
||||
static SDL_Color palette[256];
|
||||
|
@ -390,6 +391,9 @@ sysvid_init(void)
|
|||
|
||||
// ENABLE Shadowing of SHR
|
||||
*SHADOW_REGISTER&=~0x08; // Shadow Enable
|
||||
// DISABLE Shadowing of SHR
|
||||
*SHADOW_REGISTER|=0x08; // Shadow Disable
|
||||
|
||||
#endif
|
||||
#ifndef IIGS
|
||||
SDL_Surface *s;
|
||||
|
@ -486,6 +490,23 @@ sysvid_shutdown(void)
|
|||
void
|
||||
sysvid_update(rect_t *rects)
|
||||
{
|
||||
#ifdef IIGS
|
||||
int result;
|
||||
//PresentFrameBuffer();
|
||||
while (rects)
|
||||
{
|
||||
#if 0
|
||||
printf("%d,%d,%d,%d\n",
|
||||
rects->x,
|
||||
rects->y,
|
||||
rects->width,
|
||||
rects->height
|
||||
);
|
||||
#endif
|
||||
result = BlitRect(rects->x, rects->y, rects->width, rects->height);
|
||||
rects = rects->next;
|
||||
}
|
||||
#endif
|
||||
#ifndef IIGS
|
||||
static SDL_Rect area;
|
||||
U16 x, y, xz, yz;
|
||||
|
@ -560,13 +581,54 @@ sysvid_clear(void)
|
|||
memset(sysvid_fb, 0, SYSVID_WIDTH * SYSVID_HEIGHT);
|
||||
#else
|
||||
size_t length = SYSVID_WIDTH * SYSVID_HEIGHT;
|
||||
//printf("sysvid_clear: target = %08p\n", sysvid_fb);
|
||||
//printf("sysvid_clear: length = %08p\n", length);
|
||||
//sys_sleep(10000);
|
||||
memset(sysvid_fb, 0, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sysvid_clearPalette(void)
|
||||
{
|
||||
#ifdef IIGS
|
||||
size_t offset = SYSVID_WIDTH * SYSVID_HEIGHT;
|
||||
size_t length = 768;
|
||||
U8* ptr = sysvid_fb + offset;
|
||||
memset(ptr, 0, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sysvid_FadeIn()
|
||||
{
|
||||
#ifdef IIGS
|
||||
size_t offset = SYSVID_WIDTH * SYSVID_HEIGHT;
|
||||
size_t length = 200;
|
||||
U8* ptr = sysvid_fb + offset;
|
||||
int idx;
|
||||
|
||||
for (idx = 0;idx<16; ++idx)
|
||||
{
|
||||
memset(ptr, idx, length);
|
||||
wait_vsync();
|
||||
PresentSCB();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void sysvid_FadeOut()
|
||||
{
|
||||
#ifdef IIGS
|
||||
size_t offset = SYSVID_WIDTH * SYSVID_HEIGHT;
|
||||
size_t length = 200;
|
||||
U8* ptr = sysvid_fb + offset;
|
||||
int idx;
|
||||
|
||||
for (idx = 15;idx>=0; --idx)
|
||||
{
|
||||
memset(ptr, idx, length);
|
||||
wait_vsync();
|
||||
PresentSCB();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Zoom
|
||||
|
|
Loading…
Reference in New Issue