Author Topic: Dutch Colourz Source  (Read 5872 times)

0 Members and 1 Guest are viewing this topic.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Dutch Colourz Source
« 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...
Shockwave ^ Codigos
Challenge Trophies Won:

Offline .:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Posts: 563
  • Karma: 47
    • View Profile
    • Intro-Inferno
Re: Dutch Colourz Source
« Reply #1 on: January 17, 2007 »
Excellent idea Shock!  Karma boost! :)

I'll have a look soon and I thank you in advance for what i'll learn from those!
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: Dutch Colourz Source
« Reply #2 on: January 17, 2007 »
Thanks! That will be instructive.

Offline MrP

  • Atari ST
  • ***
  • Posts: 176
  • Karma: 18
    • View Profile
Re: Dutch Colourz Source
« Reply #3 on: January 18, 2007 »
very nice gesture..... karma++

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Dutch Colourz Source
« Reply #4 on: January 18, 2007 »
Shock rulez x 2  :goodpost:
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Dutch Colourz Source
« Reply #5 on: January 18, 2007 »
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 :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: Dutch Colourz Source
« Reply #6 on: January 19, 2007 »
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
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Dutch Colourz Source
« Reply #7 on: January 19, 2007 »
Looking forward to your next one mate, the last was cool!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: Dutch Colourz Source
« Reply #8 on: January 29, 2007 »
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 ;)
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Dutch Colourz Source
« Reply #9 on: January 29, 2007 »
It really is an astonishing production, and those effects are awesome.
Little lost when it comes to asm.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: Dutch Colourz Source
« Reply #10 on: January 29, 2007 »
if this is the peice of asm clyde

Code: [Select]
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!   
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Dutch Colourz Source
« Reply #11 on: January 29, 2007 »
Cool & thanks.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Dutch Colourz Source
« Reply #12 on: January 30, 2007 »
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..

Code: [Select]
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
Shockwave ^ Codigos
Challenge Trophies Won: