Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: Shockwave on January 17, 2007
-
I have decided to release the source code for the Surprise Productions intro "Dutch Colourz" I've converted it to work with standard tinyptc, graphics files included, music removed it will run in the editor, source code is in the attached rar file :)
Sorry about the messy code...
-
Excellent idea Shock! Karma boost! :)
I'll have a look soon and I thank you in advance for what i'll learn from those!
-
Thanks! That will be instructive.
-
very nice gesture..... karma++
-
Shock rulez x 2 :goodpost:
-
Thanks :) I had been meaning to release this source for ages, hope that someone gets something out of it. The most interesting bit of it is the logo drawing code (modified from rbraz's example source in bmp2raw), it detects the edges of the logo at start up, saved a bag of processor time :)
-
Nice code shockwave. Thanks for sharing, again!
Im busy with everyday life things at the mo but I am working on something new?!?!?
Hopefully will release something sooner rather than later.
Drew
-
Looking forward to your next one mate, the last was cool!
-
very cool stuff in there shockwave just had a chance to look through :goodpost:
btw our resizer routines are basically the same appart from yours does the cool sine wave ;)
-
It really is an astonishing production, and those effects are awesome.
Little lost when it comes to asm.
-
if this is the peice of asm clyde
asm
mov eax,dword ptr[TC]
mov ecx, [slice]
mov edi, [PP]
rep stosd
end asm
basically it puts a color in eax(TC) puts a counter in ecx[slice] and a pointer in edi(PP) .
edi is then a pointer to the screen and all that happens is it counts up to slice sort of like a for or while loop adding TC to PP and moving along one in PP till the value in slice is reached i think!
-
Cool & thanks.
-
I've used that little asm loop in a lot of things indeed. It speeds things up a fair bit. I think it was Fryer who put me onto it.
I just looked through that zoom routine again... It could be done faster using pointer arithmetic. This is a piece of code taken from something I'm working on at the moment, basically it takes an image and scales it's height. It would be very simple to include width as well.
This uses pointers and is very fast..
SUB DRAWSPLASH()
DIM P1 AS UINTEGER PTR
DIM P2 AS UINTEGER PTR
ERASE SCREEN_BUFFER
DIM AS INTEGER LY , LX , SLICE , HCI
DIM AS DOUBLE HEIGHT , HEIGHTI, HSTRT
IF TIMR<150 THEN SPLSH=SPLSH + 4
IF TIMR>570 THEN SPLSH=SPLSH - 4
HEIGHT = SPLSH
HEIGHTI = WYRES/HEIGHT
HSTRT = 0
FOR LY=((WYRES SHR 1)-(HEIGHT SHR 1)) TO ((WYRES SHR 1)+(HEIGHT SHR 1))-1
HCI = INT(HSTRT)
P1=@SPLASH (HCI * WXRES)
P2=@SCREEN_BUFFER (LY * WXRES)
FOR LX = 0 TO WXRES
*P2 = *P1
P1 +=1
P2 +=1
NEXT
HSTRT = HSTRT + HEIGHTI
NEXT
END SUB