Zombie
Moderator: Mask of Destiny
A new one, as promished. Done fastly for the december 21. weird as well.
http://www.pouet.net/prod.php?which=60832
See you!
http://www.pouet.net/prod.php?which=60832
See you!
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
This one had some pretty cool parts in it !
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Used a custom SGDK version, but here is the cylindrical effect : http://pastebin.com/2CrA5EgK
Note that it heavily depends of used textures (horizontal tubes are cool).
And here is an old playable version : http://downloads.kstorm.org/tape21_wip.7z (may not work on real hardware, unsure).
Note that it heavily depends of used textures (horizontal tubes are cool).
And here is an old playable version : http://downloads.kstorm.org/tape21_wip.7z (may not work on real hardware, unsure).
Thanks Stef! Was surprised as well, it's basically coming from playing with the axelay effect, and being kind of lucky, but the one I prefer is the "circular effect", I even don't get how it works
edit: and to precise, following months/years I won't be able to make other demos, cause of professional/personal life changes, but if someone needs raw musics or bitmaps, I'll be pleased to help.
edit: and to precise, following months/years I won't be able to make other demos, cause of professional/personal life changes, but if someone needs raw musics or bitmaps, I'll be pleased to help.
-
- Very interested
- Posts: 145
- Joined: Sun Jan 28, 2007 2:01 am
- Location: DCEvolution.net
- Contact:
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
If you mean the source code, here is it:
Code: Select all
#include "effect_cylinder.h"
void EFFECT_cylinder(int sens, int speed, int length)
{
u16 j = 0;
u16* scrollTable;
u16 curY;
int curX;
u16 ttt=0;
int vscroll;
u16 scr = 0;
void initTable()
{
scrollTable = (u16*)MEM_alloc(21*42*sizeof(u16));
vscroll=0x840;
int k, h;
int center = 12;
for (k=0 ; k<42 ; ++k)
{
int count = (k*k)*0.02f;
for (h=0 ; h<21 ; ++h)
{
int xv;
if (k<center) xv = (h-10)*(h-10)*((center-k)*(center-k))*0.004;
else xv = -(h-10)*(h-10)*((k-center)*(k-center))*0.004;
scrollTable[k*21+h] = 0x840-count+xv;
}
}
}
int posY = 0;
u16* scrollData = NULL;
void vblank()
{
++ttt;
curY = 0;
posY += sens*speed;
scrollData = scrollTable;
}
void hblank()
{
vu16 *pw = (u16 *) GFX_DATA_PORT;
vu32 *pl = (u32 *) GFX_CTRL_PORT;
int val = -posY-ttt/4;
int x;
for (x=0 ; x<21 ; ++x)
{
u16 addr = (x&0x1F)*4;
*pl = GFX_WRITE_VSRAM_ADDR(addr);
*pw = val+scrollData[x];
*pl = GFX_WRITE_VSRAM_ADDR(addr+2);
*pw = val/2+scrollData[x];
}
scrollData += 21;
curY++;
}
GSKE_setScrollMode(GSKE_HSCROLL_Plane, GSKE_VSCROLL_Column);
initTable();
u32 start = SND_getTime_PCM();
int xs=0, ys=0;
u16 w = cylinder[0];
u16 h = cylinder[1];
VDP_setPalette(PAL2, &cylinder[2]);
VDP_loadBMPTileData((u32*) &cylinder[18], 1, w / 8, h / 8, w/8 );
for (ys=0 ; ys<VDP_getPlanHeight()/(h/8); ++ys)
for (xs=0 ; xs<VDP_getPlanWidth()/(w/8); ++xs)
VDP_fillTileMapRectInc(APLAN, TILE_ATTR_FULL(PAL2, 0, 0, 0, 1), xs*(w/8), ys*(h/8), w/8, h/8);
w = cylinder_back[0];
h = cylinder_back[1];
VDP_setPalette(PAL1, &cylinder_back[2]);
VDP_loadBMPTileData((u32*) &cylinder_back[18], 257, w / 8, h / 8, w/8 );
for (ys=0 ; ys<VDP_getPlanHeight()/(h/8); ++ys)
for (xs=0 ; xs<VDP_getPlanWidth()/(w/8); ++xs)
VDP_fillTileMapRectInc(BPLAN, TILE_ATTR_FULL(PAL1, 0, 0, 0, 257), xs*(w/8), ys*(h/8), w/8, h/8);
SYS_setVIntCallback(vblank);
SYS_setHIntCallback(hblank);
VDP_setHIntCounter(1);
VDP_setHInterrupt(1);
curY = 0;
u32 t=0;
do
{
u32 ct = SND_getTime_PCM();
if (ct>start) t = ct-start;
VDP_setHorizontalScroll(APLAN, 0, sinFix16(t*speed/20)*2);
VDP_setHorizontalScroll(BPLAN, 0, sinFix16(t*speed/20)*2);
}
while(t<length);
SYS_setVIntCallback(0);
SYS_setHIntCallback(0);
MEM_free(scrollTable);
}
Re: Zombie
translate into the new version syntax pleaseStef wrote:If you mean the source code, here is it:
Re: Zombie
I'm not glad to post ugly code like that, I'll clean it with the new version, add controller support and post it into the sgdk subforum.