View Full Version: Demoscene Retro Remakes

OldSkool UK > Intro/cracktro/demos > Demoscene Retro Remakes


Title: Demoscene Retro Remakes


zYX! - December 9, 2007 08:00 PM (GMT)
Reading Shockwave's post on remaking cracktro sent me on a bit of a nostalgia trip today.

I see there are still some new ones getting released here and there too:

Crystalmeth Cracktro --> http://www.pouet.net/prod.php?which=33992

Nicely done Comic Bakery remix on that one. (Also the same load of negative assholes on Pouet too... Do these people do anything but slag other people off all day?).

Anyway, I was thinking that at the rate these cracktros are getting remade maybe someone could start remaking full demos? (I don't ask much, do I!)

A couple of relatively simple ones I would love to see Win32 versions of are:

* Retina Burn One by Dimension X (you either love it or hate it I suppose)
* The Drunk Desert Demo by Paradox (ditto!)

Then maybe moving onto trackmos even:
* Technological Death by Mad Elks
* Everything ever made by Anarchy! :)

I know too much remaking will probably cause a massive scene debate about being stuck in the past and not moving forward but I think there is room in the scene for both kinds of production. Historically the scene sub-divides every few years anyway - Crackscene and demoscene. Amiga scene and PC scene. Mod/XM scene and MP3 scene. Etc.

Personally most of the new scene stuff I have to end up watching on demoscene.tv or YouTube because I don't have the rig to run it.

DaZZaBoY - December 9, 2007 10:20 PM (GMT)
I was going to award you your first strike for spamming a POO-et link in here (j/k) but you also get a reward for the additional slamming down. ;) I only use this resource for finding the odd production + bits of group research and that's about it. I certainly don't visit for the overall personality of the place.

I kinda liked the CrystalMeth effort and yes, the chip has been used a million times before but the font, sine, gfx and most importantly FEEL, give it a thumbs up from me.

Nice choice of prods for demo remakes btw and it's obvious you're a sucker for flashing lights and a thumping soundtrack like me, hence why most of the prods you mentioned are included in our file archive. Anarchy prods coming soon btw..

Controversial bit coming up >>

I know some folks don't like too much wallowing in the past but the PC demoscene really does mean nothing! Whizz bang demos that need DX9/10 capable gfx + suitable PC grunt to run? Wtf? Bottomline, it was the amount of work that could be squeezed out of a machines limits (AMIGA!!!) that was what made the scene special and we all remember it fondly, we all love recreating those glimmers of nostalgic vibe and it's the main reason we all do what we do, isn't it?

I'm all for progress the same as the next guy but with scene releases, I'll always be in favour of retro. The more remakes, the better IMO - you listening Shock? ;)

zYX! - December 10, 2007 12:02 AM (GMT)
QUOTE
Controversial bit coming up >> I know some folks don't like too much wallowing in the past but the PC demoscene really does mean nothing!

I don't think it's controversial at all. The old skool and the new skool demoscenes are different scenes altogether.

It's like comparing PS3/Xbox 360 commercial releases with people making Win32 versions of old Spectrum games. They are all games but they are at different ends of the (pun!) spectrum. There is no reason they can't both co-exist though.

QUOTE
Whizz bang demos that need DX9/10 capable gfx + suitable PC grunt to run? Wtf? Bottomline, it was the amount of work that could be squeezed out of a machines limits (AMIGA!!!)

It could be argued that they are trying to squeeze the maximum amount of grunt out of the latest gfx chipsets though. 64KB intros still impose certain limits but I think the core values are different to the Amiga days. It's a bit more arty-farty now too.

Then again, why not just mix and mash it up. Have a look at this XBox360 demo by TRSi if you haven't seen it already: Bloody Memories 2.01.

DaZZaBoY - December 10, 2007 12:00 PM (GMT)
Ok, maybe not controversial but more of a personal opinion. :)

It's as a finer line or as wide apart as you want to make it. Yes, things have moved on quite a lot but they operate along the same guidelines as they always did.. only aimed at better and more varied hardware.

Pushing the boundaries is a good thing but I'm sure I wouldn't spend stupid amounts of money just to play a game, never mind a demo. Take Farbrausch for instance, amazing 3D demo's and eye popping presentation but you may aswell be watching the intro of any top end, GPU intensive game.

The MFX/Kewlers past collaborations on the other hand, are a different story. Oldskool + strobe fx + clever routines based on old style + awesome soundtracks = bloody fantastic! :D

shockwave - December 10, 2007 07:39 PM (GMT)
I've written lots of cracktros for some high profile groups like Postmortem, Rituel etc.
Also I have some tenuous connections with the new group Electric Druggies who make oldschool cracktros.

In addition to this I sponsor Retro-Remakes, although Stormbringer / Alcatraz is the main admin there, I just contribute the odd remake when I have time.

I can shed a little bit of light on the release scene these days.

Most of my contacts in the warez scene really appreciate these old school crack intros and they are highly prized, they are a very rare thing these days, but hopefully groups like crystalmeth, skidrow, unleashed, postmortem, rituel, hatred etc etc using these intros will revive the tradition.

The leaders of the wares groups see cracktros as a part of scene tradition.

They are not made for Pouet users where any lamer can have an opinion, believe me, the coders of these intros really don't give a fuck what the average Pouet user thinks of his intro, the intros are not made for them.

The followers of the wares scene look at places like defacto2.net more readilly than the other scene portals.

In most cases, the modern cracktros do not rely on hardware accelerated graphics and instead use custom bob / polygon / etc code, software rendering in other words (Electric Druggies intros are 100% software rendered).

As for the remakes, it is in many ways really difficult to exactly copy an amiga intro.
In most cases the original will need to be dissasembled into 68000 assembly language so that copperlists etc can be taken.

In fact there were so many custom sound replay routines on the Amiga that people who make perfect remakes often have to rip the complete replay routine (the song is often hardcoded into it) and emulate the Amiga sound chip on the PC.

Stormbringer does not however use software rendering, instead he develops in C++ and with Directx.

Coding oldschool style is an art in it's self and while not as nice to look at as modern stuff, there are a whole heap of people who appreciate this style.

I can tell you a few things for certain.

A remake of Mental Hangover is planned (talking about full sized demos).
A complete remake of Ghouls and Ghosts is in progress.
New cracktros for Rituel, Post Mortem and Crystalmeth are being released over the coming 8 weeks.

I cannot tell you the source of my information as I do not wish to be linked to the warez scene at all.

For some of the nay sayers at some sites it would be nice if they actually tried to program thier own texture mapping routine or own made bsp routine, something that would really push themselves (and not necessarily the hardware), or try and learn assembly language and take some felix schmidt tune and make a perfect remake to see the satisfaction of doing this.

A lot of the people at the popular scene portals (but not all) are not even fit to lace the boots of people like Stormbringer.

To be honest, the only time I ever got truely annoyed at these comments were when it pissed off someone else who I was working with and I had to find a new gfxer or sfxer..

To me, when that happened, the attention whores had won and made it harder for cracktros to survive.

The scene was born from cracktros, a site full of well made cracktro remakes was needed, new cracktros are being coded.. I've seen some of the work in progress and it mostly has just the right feel.. In fact you could even be watching an early PC dos cracktro or Amiag cracktro in a lot of cases.

Bleh!

:)

shockwave - December 10, 2007 07:52 PM (GMT)
Sorry to double post, but here's an example of the work that goes into the code of these oldschool style intros;

This production;

http://www.pouet.net/prod.php?which=32741

(Code posted with permission from Widowmaker/Electric Druggies).
CODE

'
'     SKID ROW NEW CRACKTRO
'     ---------------------
'
'     WIDOWMAKER  - %010101.
'     KENET       - STRAY.
'     IROKOS      - PIXELS.
'     NOISE MAKER - COMPOSER.
'
' (C) ELECTRIC DRUGGIES + TITAN 2007.
'
'-------------------------------------------------------------------------------

   
   #INCLUDE "TINYPTC_EXT.BI"
   #INCLUDE "WINDOWS.BI"
   #INCLUDE "ken24.bas"
   #INCLUDE "babpal.bas"
   #INCLUDE "babraw.bas"
   
   #include "ufmod.bi"
   #include "notes.bas"
   Dim hWave As HWAVEOUT  
   
   #define alphaa(s,d) ((((s and &hff00ff)*(s shr 24)+(d and &hff00ff)*(256-(s shr 24)))and &hff00ff00)or(((s and &hff00)*(s shr 24)+(d and &hff00)*(256-(s shr 24)))and &hff0000))shr 8
       
   OPTION STATIC
   OPTION EXPLICIT

'-------------------------------------------------------------------------------
' INITIALISE LARGE FONT!!
'-------------------------------------------------------------------------------
   '--------------
   '--Image size--
   '--------------
   
   Const LfimgX = 1024
   Const LfimgY = 260
   

   Declare Sub LfDrawImage(byval imxpos as integer,byval imypos as integer,byval SX as integer,byval SY as integer)
   Declare Sub LFLoadDataImage()    
   'Picture buffer
   Dim Shared LFimg_buffer( lfimgx * lfimgy ) as integer    
   'RGB color palette buffer
   Dim Shared LFimg_r(256), LFimg_g(256), LFimg_b(256) as short    
   LFLoadDataImage()

   CONST XRES = 800
   CONST YRES = 600
   
   DIM SHARED AS INTEGER  HALFX = XRES/2
   DIM SHARED AS INTEGER  HALFY = (YRES/2    )+50
   DIM SHARED AS UINTEGER BUFFER ( XRES * YRES )
   dim shared as integer clipy=440
'-------------------------------------------------------------------------------
   DIM SHARED AS DOUBLE SIZ = 1.5
   DIM SHARED AS INTEGER SQUARES = 10
   
   DIM SHARED AS DOUBLE GX ((SQUARES * SQUARES )*4)
   DIM SHARED AS DOUBLE GY ((SQUARES * SQUARES )*4)
   DIM SHARED AS DOUBLE GZ ((SQUARES * SQUARES )*4)

   DIM SHARED AS INTEGER COPPALIST (YRES)
   DIM SHARED AS INTEGER COPPALIST2(YRES)
   
   DECLARE SUB MAKE_GRID()
   DECLARE SUB DRAW_GRID()
   DECLARE SUB FLAT_TRIANGLE(BYVAL X1 AS INTEGER , BYVAL Y1 AS INTEGER, BYVAL X2 AS INTEGER , BYVAL Y2 AS INTEGER , BYVAL X3 AS INTEGER, BYVAL Y3 AS INTEGER , BYVAL TC AS INTEGER)
   DECLARE SUB BERASE()

   DECLARE SUB CONSTRUCT()
   DECLARE SUB ROTATE()      
   
   DECLARE SUB LARGETEXT(BYVAL LTX AS INTEGER , BYVAL LTY AS INTEGER ,BYVAL LTS AS STRING)    
   
   declare SUB FLAT_TRIANGLEB(BYVAL X1 AS INTEGER , BYVAL Y1 AS INTEGER, BYVAL X2 AS INTEGER , BYVAL Y2 AS INTEGER , BYVAL X3 AS INTEGER, BYVAL Y3 AS INTEGER , BYVAL TC AS INTEGER)
   declare SUB FLAT_TRIANGLEC(BYVAL X1 AS INTEGER , BYVAL Y1 AS INTEGER, BYVAL X2 AS INTEGER , BYVAL Y2 AS INTEGER , BYVAL X3 AS INTEGER, BYVAL Y3 AS INTEGER , BYVAL TC AS INTEGER)    
   DECLARE SUB CIRC(BYVAL CX AS INTEGER , BYVAL CY AS INTEGER , BYVAL R AS INTEGER, BYVAL TC AS INTEGER)    
   DECLARE SUB CIRC2(BYVAL CX AS INTEGER , BYVAL CY AS INTEGER , BYVAL R AS INTEGER, BYVAL TC AS INTEGER)
   DIM SHARED AS INTEGER SNOW = 1440

   DIM SHARED AS DOUBLE  SNX ( SNOW )
   DIM SHARED AS DOUBLE  SNY ( SNOW )
   DIM SHARED AS DOUBLE  SNZ ( SNOW )
   DIM SHARED AS DOUBLE  SNF ( SNOW )    
   DIM SHARED AS DOUBLE SNL ( SNOW )    
   DIM SHARED AS INTEGER SNT ( SNOW )    
   
'-------------------------------------------------------------------------------

   DIM SHARED AS INTEGER  IMGX = 192
   DIM SHARED AS INTEGER  IMGY = 600
   
   DIM SHARED AS UINTEGER PICTURE_BUFFER (IMGX * IMGY)

   DECLARE SUB LOADBMP()
   DECLARE SUB DRAWBMP()  
   LOADBMP()


'---------------------------------------------------------
'            Define the necessary variables;
'---------------------------------------------------------
   DIM shared N AS DOUBLE
   dim shared vx1 as double
   dim shared vx2 as double
   dim shared vy1 as double
   dim shared vy2 as double


   DIM SHARED SIZE AS DOUBLE
   DIM SHARED POINTS AS INTEGER
   DIM SHARED FACES AS INTEGER

   DIM SHARED VXR as double
   dim shared VYR as double
   dim shared VZR AS double

   DECLARE SUB MAKE_VECTOR()

   points = 66

   size=43.01
   faces=60



   Dim SHARED Vx(points) AS DOUBLE
   Dim SHARED Vy(points) AS DOUBLE
   Dim SHARED Vz(points) AS DOUBLE
   
   Dim SHARED Vtx(points) AS INTEGER
   Dim SHARED Vty(points) AS INTEGER
   Dim SHARED Vtz(points) AS INTEGER

   Dim SHARED Vf1(faces) AS DOUBLE
   Dim SHARED Vf2(faces) AS DOUBLE
   Dim SHARED Vf3(faces) AS DOUBLE
   Dim SHARED Vr(faces) AS DOUBLE
   Dim SHARED Vg(faces) AS DOUBLE
   Dim SHARED Vb(faces) AS DOUBLE

   DIM SHARED MAXX AS INTEGER
   
   MAXX=35
   DIM SHARED AS STRING TEXTS(MAXX)
   DECLARE SUB TEXTER()
   
   TEXTS (01)="++SKID ROW++"
   TEXTS (02)="--------"
   TEXTS (03)="THE LEADING FORCE"
   TEXTS (04)="--------"
   TEXTS (05)="ARE BACK!"

   TEXTS (06)="this time we give"
   TEXTS (07)="to you:"
   TEXTS (08)="**GAME NAME**"
   TEXTS (09)="**(C) COMPANY**"
   TEXTS (10)="please enjoy it!"

   TEXTS (11)="WE GREET"
   TEXTS (12)="group1 ++ GROUP2"
   TEXTS (13)="GROUP3 group4"
   TEXTS (14)="group5 ++ GROUP6"
   TEXTS (15)="GROUP7 group8"

   TEXTS (16)="CRACKTRO CREDITS"
   TEXTS (17)="---------------"
   TEXTS (18)="Created By:"
   TEXTS (19)="ELECTRIC DRUGGIES"
   TEXTS (20)="& TITAN"

   TEXTS (21)="CODE: WIDOWMAKER"
   TEXTS (22)="+++++"
   TEXTS (23)="MUSIC: NOISEMAKER"
   TEXTS (24)="+++++"
   TEXTS (25)="GFX: KENET/IROKOS"

   TEXTS (26)="we WILL see"
   TEXTS (27)="YOU in OUR next"
   TEXTS (28)="RELEASE!"
   TEXTS (29)="coming SOON for"
   TEXTS (30)="YOUR pleasure!"
   
   TEXTS (31)="++ SKID ROW ++"
   TEXTS (32)=""
   TEXTS (33)="TWICE THE FUN"
   TEXTS (34)="double the"
   TEXTS (35)="TROUBLE"

   DIM SHARED AS INTEGER OFFZET =100
   DIM SHARED AS INTEGER CLICK  =0
   DIM SHARED AS INTEGER FUCK =0
 
   MAKE_VECTOR()

   DIM SHARED BNC AS DOUBLE=0
   DIM SHARED DBY AS DOUBLE=0
   DIM SHARED AS DOUBLE ELAPSER
       PTC_ALLOWCLOSE(0)
       PTC_SETDIALOG(0,"",0,0)    
       
       IF (PTC_OPEN("THE LEADING FORCE",XRES,YRES)=0) THEN
       END-1
       END IF    
       dim shared as double DELTA,LASTTIME
       
'-------------------------------------------------------------------------------

       MAKE_GRID()
       hWave = uFMOD_PlaySong(@notes.xm(0),61226,XM_MEMORY)
       
'-------------------------------------------------------------------------------
   LASTTIME=TIMER
   ELAPSER=TIMER
   WHILE(GETASYNCKEYSTATE(VK_ESCAPE)<>-32767)  

       DRAW_GRID()  
       DRAWBMP()
               
       TEXTER()

       PTC_UPDATE@BUFFER(0)        
       BERASE()
       delta = (timer-lasttime)  * 3
       lasttime=timer

   WEND
   
'-------------------------------------------------------------------------------
   uFMOD_StopSong()
   END
 
'-------------------------------------------------------------------------------
'                                  PROCEDURES
'-------------------------------------------------------------------------------

SUB TEXTER()
   DIM AS INTEGER L,Y,X
   Y=130
   
   IF CLICK<1 THEN CLICK=CLICK+1
   
   IF TIMER-ELAPSER < 4 THEN
   
   IF CLICK>=1 THEN
   IF OFFZET>0 THEN OFFZET=OFFZET-1
   CLICK=0
   END IF

   END IF


   IF TIMER-ELAPSER > 8 THEN
   
   IF CLICK>=1 THEN
   IF OFFZET<100 THEN OFFZET=OFFZET+1
   CLICK=0
   END IF

   END IF


   IF TIMER-ELAPSER>=10 THEN
       FUCK=FUCK+5
       ELAPSER=TIMER
       IF FUCK>MAXX-5 THEN FUCK=0
   END IF

   FOR L=1 TO 5
       X=240-( LEN (TEXTS(L+FUCK)) *9 )
       LARGETEXT (X,Y,TEXTS(L+FUCK))
       Y=Y+45
   NEXT
   
END SUB

SUB MAKE_VECTOR()
DIM L AS INTEGER
DIM ANGLE  AS DOUBLE
DIM ANGLE2 AS DOUBLE
DIM AS DOUBLE TOLLERANCE  = .06
DIM AS DOUBLE TOLLERANCE2 = .02
DIM AS DOUBLE LARGE  = .6
DIM AS DOUBLE LITTLE = .3

DIM AS DOUBLE RRR=5
DIM AS DOUBLE GGG=5
DIM AS DOUBLE BBB=3
'
' FRONT
'

ANGLE =36
ANGLE2=0
FOR L=1 TO 5
   
   VX(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   VY(L  ) = LARGE*COS((ANGLE)*3.14/180)
   VZ(L  ) = 2-TOLLERANCE

   VX(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   VY(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   VZ(L+5) = 2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VX(11) = 0
   VY(11) = 0
   VZ(11) = 2+TOLLERANCE2

FOR L=1 TO 5
   
   VF2(L)=L
   VF1(L)=L+5
   
   IF L<5 THEN
       VF3(L)=L+6    
   ELSE
       VF3(L)=L+1
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB
   
NEXT

FOR L=6 TO 10
   
   VF2(L)=L
   IF L<10 THEN
       VF3(L)=L+1    
   ELSE
       VF3(L)=L-4
   END IF    
   VF1(L)=11    
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5
   
NEXT

'
'BACK;
'

ANGLE =36
ANGLE2=0
FOR L=12 TO 16
   
   VX(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   VY(L  ) = LARGE*COS((ANGLE)*3.14/180)
   VZ(L  ) = -(2-TOLLERANCE)

   VX(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   VY(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   VZ(L+5) = -2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VX(22) =    0
   VY(22) =    0
   VZ(22) = -(2+TOLLERANCE2)

FOR L=11 TO 15
   
   VF2(L)=L+1
   VF3(L)=L+6
   
   IF L<15 THEN
       VF1(L)=L+7    
   ELSE
       VF1(L)=L+2
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB

   
NEXT

FOR L=16 TO 20
'    
   VF3(L)=L+1
   IF L<20 THEN
       VF2(L)=L+2    
   ELSE
       VF2(L)=L-3
   END IF    
   
   VF1(L)=22    
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5
   
NEXT

'
' LEFT SIDE;
'


ANGLE =36
ANGLE2=0

FOR L=23 TO 27
   
   VZ(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   VY(L  ) = LARGE*COS((ANGLE)*3.14/180)
   VX(L  ) = 2-TOLLERANCE

   VZ(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   VY(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   VX(L+5) = 2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VZ(33) = 0
   VY(33) = 0
   VX(33) = 2+TOLLERANCE2

FOR L=21 TO 25
   
   VF1(L)=L+2
   VF2(L)=L+7
   
   IF L<25 THEN
       VF3(L)=L+8    
   ELSE
       VF3(L)=L+3
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB

   
NEXT

FOR L=26 TO 30
   
   VF3(L)=L+2
   IF L<30 THEN
       VF2(L)=L+3    
   ELSE
       VF2(L)=L-2
   END IF    
   
   VF1(L)=33    
   
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5

   
NEXT

'
' RIGHT SIDE;
'


ANGLE =36
ANGLE2=0

FOR L=34 TO 38
   
   VZ(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   VY(L  ) = LARGE*COS((ANGLE)*3.14/180)
   VX(L  ) = -(2-TOLLERANCE)

   VZ(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   VY(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   VX(L+5) = -2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VZ(44) = 0
   VY(44) = 0
   VX(44) = -(2+TOLLERANCE2)
FOR L=31 TO 35
   
   VF2(L)=L+3
   VF1(L)=L+8
   
   IF L<35 THEN
       VF3(L)=L+9    
   ELSE
       VF3(L)=L+4
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB

   
NEXT

FOR L=36 TO 40
   
   VF2(L)=L+3
   IF L<40 THEN
       VF3(L)=L+4    
   ELSE
       VF3(L)=L-1
   END IF    
   
   VF1(L)=44    
   
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5

   
NEXT

'
' TOP SIDE;
'


ANGLE =36
ANGLE2=0

FOR L=45 TO 49
   
   VZ(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   Vx(L  ) = LARGE*COS((ANGLE)*3.14/180)
   Vy(L  ) = -(2-TOLLERANCE)

   VZ(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   Vx(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   Vy(L+5) = -2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VZ(55) = 0
   VX(55) = 0
   VY(55) = -(2+TOLLERANCE2)

FOR L=41 TO 45
   
   VF1(L)=L+4
   VF2(L)=L+9
   
   IF L<45 THEN
       VF3(L)=L+10    
   ELSE
       VF3(L)=L+5
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB

NEXT

FOR L=46 TO 50
   
   VF3(L)=L+4
   IF L<50 THEN
       VF2(L)=L+5    
   ELSE
       VF2(L)=L
   END IF    
   
   VF1(L)=55    
   
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5

   
NEXT

'
' BOTTOM SIDE;
'


ANGLE =36
ANGLE2=0

FOR L=56 TO 60
   
   VZ(L  ) = LARGE*SIN((ANGLE)*3.14/180)
   Vx(L  ) = LARGE*COS((ANGLE)*3.14/180)
   Vy(L  ) = 2-TOLLERANCE

   VZ(L+5) = LITTLE*SIN((ANGLE2)*3.14/180)
   Vx(L+5) = LITTLE*COS((ANGLE2)*3.14/180)
   Vy(L+5) = 2

   ANGLE= ANGLE +72
   ANGLE2=ANGLE2+72
     
NEXT

   VZ(66) = 0
   VX(66) = 0
   VY(66) = 2+TOLLERANCE2

FOR L=51 TO 55
   
   VF2(L)=L+5
   VF1(L)=L+10
   
   IF L<55 THEN
       VF3(L)=L+11    
   ELSE
       VF3(L)=L+6
   END IF
   
   VR(L)=RRR
   VG(L)=GGG
   VB(L)=BBB

   
NEXT

FOR L=56 TO 60
   
   VF2(L)=L+5
   IF L<60 THEN
       VF3(L)=L+6    
   ELSE
       VF3(L)=L+1
   END IF    
   
   VF1(L)=66    
   
   VR(L)=RRR*2.5
   VG(L)=GGG*2.5
   VB(L)=BBB*2.5

   
NEXT

END SUB



SUB BERASE()
DIM AS INTEGER Y,SLICE
DIM AS UINTEGER TC
DIM PP AS UINTEGER PTR
   FOR Y=0 TO YRES-1
   PP = @BUFFER(Y*XRES)  
   TC=COPPALIST2(Y)
   SLICE=XRES
   asm
       mov eax,dword ptr[TC]
       mov ecx, [slice]
       mov edi, [PP]
       rep stosd
   end asm  
   NEXT

END SUB


SUB MAKE_GRID()
   
   DIM AS INTEGER L,M
   DIM AS DOUBLE XLOC,ZLOC
   XLOC=-18
   ZLOC=-18
   
   M=1
   FOR L=1 TO ((SQUARES*SQUARES))
       
       GX ( M   ) = XLOC-SIZ
       GY ( M   ) = 4
       GZ ( M   ) = ZLOC-SIZ

       GX ( M+1 ) = XLOC+SIZ
       GY ( M+1 ) = 4
       GZ ( M+1 ) = ZLOC-SIZ

       GX ( M+2 ) = XLOC+SIZ
       GY ( M+2 ) = 4
       GZ ( M+2 ) = ZLOC+SIZ

       GX ( M+3 ) = XLOC-SIZ
       GY ( M+3 ) = 4
       GZ ( M+3 ) = ZLOC+SIZ

       M=M+4
       
       XLOC=XLOC+4
       IF XLOC>18 THEN
           XLOC=-18
           ZLOC=ZLOC+4
       END IF
   NEXT
   
   FOR L=0 TO SNOW
       
       SNX(L) = -16+( RND(1) *32 )
       SNY(L) = -16
       SNZ(L) = -16+( RND(1) *32 )                
       SNX(L) =2+((3+rnd(1)*7)*sin(L*(3.14/360)))
       SNz(L) =((3+rnd(1)*7)*cos(L*(3.14/360)))-2
'        SNZ(L) =((RND(1)*2) + 14)*SIN(L+TIMER)
'        SNX(L) =((RND(1)*2) + 14)*SIN(L+TIMER)        
       SNF(L) =  RND(1) * .05      
       SNL(L) =  1
       SNT(L) =  RND(1)*400
       
   NEXT
   
   
   
   M=0
   
   FOR L=0 TO YRES
       COPPALIST2(L)=RGBA(26,55,63,1)
       IF L>=CLIPY THEN
           COPPALIST (L) = RGBA(26+(M/9), 55+(M/8), 63+(M/4),1)
           COPPALIST2(L) = RGBA(26+(M/11),55+(M/10),63+(M/6),1)
           M=M+1

       END IF
   NEXT
   
END SUB

SUB DRAW_GRID()
   DIM AS INTEGER L,M
   DIM AS INTEGER TX1,TY1,TX2,TY2,TX3,TY3,TX4,TY4


   DIM AS DOUBLE RGADD
   DIM AS DOUBLE MO1,MO2,MMM,NNN
   RGADD=.01*SIN(TIMER/2)

   
   MO1= COS(RGADD):' GENERATE MATRIX CONSTANT 1
   MO2= SIN(RGADD):' GENERATE MATRIX CONSTANT 2
   
   
   FOR L=1 TO ((SQUARES*SQUARES)*4)

       NNN=GX(L)
       MMM=GZ(L)
       
       GX(L) = MO1 * NNN - MO2 * MMM
       GZ(L) = MO1 * MMM + MO2 * NNN
       
   NEXT
   
   M=1
   FOR L=1 TO ((SQUARES*SQUARES))
       
       TX1 = ((GX(M) / ((GZ(M)/10) + 3 )) * 90)+HALFX
       TY1 = ((GY(M) / ((GZ(M)/10) + 3 )) * 90)+HALFY

       TX2 = ((GX(M+1) / ((GZ(M+1)/10) + 3 )) * 90)+HALFX
       TY2 = ((GY(M+1) / ((GZ(M+1)/10) + 3 )) * 90)+HALFY

       TX3 = ((GX(M+2) / ((GZ(M+2)/10) + 3 )) * 90)+HALFX
       TY3 = ((GY(M+2) / ((GZ(M+2)/10) + 3 )) * 90)+HALFY

       TX4 = ((GX(M+3) / ((GZ(M+3)/10) + 3 )) * 90)+HALFX
       TY4 = ((GY(M+3) / ((GZ(M+3)/10) + 3 )) * 90)+HALFY

       M=M+4

       flat_triangle (TX1,TY1,TX2,TY2,TX3,TY3,rgb(0,0,0))
       flat_triangle (TX1,TY1,TX4,TY4,TX3,TY3,rgb(0,0,0))
       
       
   NEXT
   
   DIM AS INTEGER DPTH,R1,B1,G1,V1,V2
'
'  snow part
'
   FOR L=0 TO SNOW

       
IF SNZ(L) > -4 THEN
       
       IF SNT(L)<=0 THEN
       SNY(L)=SNY(L)+SNF(L)
       SNF(L)=SNF(L)+.01
       IF SNF(L)>.15 THEN SNF(L)=.15
       IF SNY(L)>4 THEN
           
           IF SNF(L)>.04 THEN
               SNF(L)=-(SNF(L)*.15)
               SNY(L)=3.99999999          
           END IF
           
       END IF
           
       IF SNY(L)>4 THEN
           SNY(L)=4
       END IF
       
       IF SNY(L)=4  THEN
           
           SNF(L)=0
           
           SNY(L)=4
           
           NNN=SNX(L)
           MMM=SNZ(L)
       
           SNX(L) = MO1 * NNN - MO2 * MMM
           SNZ(L) = MO1 * MMM + MO2 * NNN                    
       END IF
       
       IF SNY(L)=4 THEN SNL(L)=SNL(L)-.01
       
       IF SNL(L)<=0 THEN
           SNL(L)=1
           SNY(L)=SNY(L)-(32+(RND(1)*4))
           SNF(L)=0
'        SNX(L) =2+(8*sin(L*(3.14/360)))
'        SNz(L) =(12*cos(L*(3.14/360)))-2      
       SNX(L) =2+((3+rnd(1)*7)*sin(L*(3.14/360)))
       SNz(L) =((3+rnd(1)*8)*cos(L*(3.14/360)))-2        
       END IF
       
       TX1 = ((SNX(L) / ((SNZ(L)/10) + 3 )) * 90)+HALFX
       TY1 = ((SNY(L) / ((SNZ(L)/10) + 3 )) * 90)+HALFY

       TX2 = ((( SNX(L)) / ((SNZ(L)/10) + 3 )) * 90)+HALFX
       TY2 = ((-((SNY(L)-8)) / (((SNZ(L))/10) + 3 )) * 90)+(HALFY +2)

       IF TX1>1 AND TX1<XRES-1 AND TY1>1 AND TY1<YRES-1 THEN
           DPTH= INT((24-SNZ(L))*6)
           IF DPTH>250 THEN DPTH=250
           
           R1=22+(DPTH*SNL(L)*2)
           G1=66+(DPTH*SNL(L)*2)
           B1=64+(DPTH*SNL(L)*2)
           
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V1=RGBA(R1,G1,B1,50)
           
           R1=22+(DPTH*SNL(L))
           G1=46+(DPTH*SNL(L))
           B1=64+(DPTH*SNL(L))
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V2=RGBA(R1,G1,B1,50)            


           BUFFER (TX1 + (TY1*XRES) ) = ALPHAA(V1,BUFFER (TX1 + (TY1*XRES) ))
           BUFFER (TX1 + 1+ (TY1*XRES) ) = ALPHAA(V2,BUFFER (TX1 + 1+(TY1*XRES) ))
           BUFFER (TX1 -1 + (TY1*XRES) ) = ALPHAA(V2,BUFFER (TX1 -1 + (TY1*XRES) ))
           BUFFER (TX1 + ((TY1-1)*XRES) ) = ALPHAA(V2,BUFFER (TX1 + ((TY1-1)*XRES) ))
           BUFFER (TX1 + ((TY1+1)*XRES) ) = ALPHAA(V2,BUFFER (TX1 + ((TY1+1)*XRES) ))

       END IF
       
       IF TX2>1 AND TX2<XRES-1 AND TY2>1 AND TY2<YRES-1 THEN
           
           DPTH= INT((24-SNZ(L))*6)
           IF DPTH>250 THEN DPTH=250
           
           R1=22+(DPTH*SNL(L))
           G1=66+(DPTH*SNL(L))
           B1=64+(DPTH*SNL(L))
           
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V1=RGBA(R1,G1,B1,DPTH/2)
           
           R1=22+(DPTH*SNL(L)/2)
           G1=46+(DPTH*SNL(L)/2)
           B1=64+(DPTH*SNL(L)/2)
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V2=RGBA(R1,G1,B1,DPTH/2)            


           BUFFER (TX2 + (TY2*XRES) ) = ALPHAA(V1,BUFFER (TX2 + (TY2*XRES) ))
           BUFFER (TX2 + 1+ (TY2*XRES) ) = ALPHAA(V2,BUFFER (TX2 + 1+(TY2*XRES) ))
           BUFFER (TX2 -1 + (TY2*XRES) ) = ALPHAA(V2,BUFFER (TX2 -1 + (TY2*XRES) ))
           BUFFER (TX2 + ((TY2-1)*XRES) ) = ALPHAA(V2,BUFFER (TX2 + ((TY2-1)*XRES) ))
           BUFFER (TX2 + ((TY2+1)*XRES) ) = ALPHAA(V2,BUFFER (TX2 + ((TY2+1)*XRES) ))
       END IF
       
   ELSE
   SNT(L)=SNT(L)-1
   END IF
END IF

   NEXT


   CIRC(HALFX+61,HALFY+ (DBY+1    )  ,88,RGBA(225,180,50,50))
  CIRC2(HALFX+61,(HALFY -(DBY/2))+175,88,RGBA(175,130,25,25))

   ROTATE()
   CONSTRUCT()




   FOR L=0 TO SNOW

       
IF SNZ(L) <= -4 THEN
       
       IF SNT(L)<=0 THEN
       SNY(L)=SNY(L)+SNF(L)
       SNF(L)=SNF(L)+.01
       IF SNF(L)>.15 THEN SNF(L)=.15
       IF SNY(L)>4 THEN
           
           IF SNF(L)>.04 THEN
               SNF(L)=-(SNF(L)*.15)
               SNY(L)=3.99999999          
           END IF
           
       END IF
           
       IF SNY(L)>4 THEN
           SNY(L)=4
       END IF
       
       IF SNY(L)=4  THEN
           
           SNF(L)=0
           
           SNY(L)=4
           
           NNN=SNX(L)
           MMM=SNZ(L)
       
           SNX(L) = MO1 * NNN - MO2 * MMM
           SNZ(L) = MO1 * MMM + MO2 * NNN                    
       END IF
       
       IF SNY(L)=4 THEN SNL(L)=SNL(L)-.01
       
       IF SNL(L)<=0 THEN
           SNL(L)=1
           SNY(L)=SNY(L)-(32+(RND(1)*4))
           SNF(L)=0
'        SNX(L) =2+(8*sin(L*(3.14/360)))
'        SNz(L) =(12*cos(L*(3.14/360)))-2      
       SNX(L) =2+((6+rnd(1)*4)*sin(L*(3.14/360)))
       SNz(L) =((6+rnd(1)*8)*cos(L*(3.14/360)))-2        
       END IF
       
       TX1 = ((SNX(L) / ((SNZ(L)/10) + 3 )) * 90)+HALFX
       TY1 = ((SNY(L) / ((SNZ(L)/10) + 3 )) * 90)+HALFY

       TX2 = ((( SNX(L)) / ((SNZ(L)/10) + 3 )) * 90)+HALFX
       TY2 = ((-((SNY(L)-8)) / (((SNZ(L))/10) + 3 )) * 90)+(HALFY +2)

       IF TX1>1 AND TX1<XRES-1 AND TY1>1 AND TY1<YRES-1 THEN
           DPTH= INT((24-SNZ(L))*6)
           IF DPTH>250 THEN DPTH=250
           
           R1=22+(DPTH*SNL(L)*3)
           G1=66+(DPTH*SNL(L)*3)
           B1=64+(DPTH*SNL(L)*3)
           
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V1=RGBA(R1,G1,B1,125)
           
           R1=22+(DPTH*SNL(L))
           G1=46+(DPTH*SNL(L))
           B1=64+(DPTH*SNL(L))
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V2=RGBA(R1,G1,B1,125)            


           BUFFER (TX1 + (TY1*XRES) ) = ALPHAA(V1,BUFFER (TX1 + (TY1*XRES) ))
           BUFFER (TX1 + 1+ (TY1*XRES) ) = ALPHAA(V2,BUFFER (TX1 + 1+(TY1*XRES) ))
           BUFFER (TX1 -1 + (TY1*XRES) ) = ALPHAA(V2,BUFFER (TX1 -1 + (TY1*XRES) ))
           BUFFER (TX1 + ((TY1-1)*XRES) ) = ALPHAA(V2,BUFFER (TX1 + ((TY1-1)*XRES) ))
           BUFFER (TX1 + ((TY1+1)*XRES) ) = ALPHAA(V2,BUFFER (TX1 + ((TY1+1)*XRES) ))

       END IF
       
       IF TX2>1 AND TX2<XRES-1 AND TY2>1 AND TY2<YRES-1 THEN
           
           DPTH= INT((24-SNZ(L))*6)
           IF DPTH>250 THEN DPTH=250
           
           R1=26+(DPTH*SNL(L))
           G1=55+(DPTH*SNL(L))
           B1=63+(DPTH*SNL(L))
           
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V1=RGBA(R1,G1,B1,DPTH/2)
           
           R1=26+(DPTH*SNL(L)/2)
           G1=55+(DPTH*SNL(L)/2)
           B1=63+(DPTH*SNL(L)/2)
           IF R1>255 THEN R1=255
           IF G1>255 THEN G1=255
           IF B1>255 THEN B1=255      
           
           V2=RGBA(R1,G1,B1,DPTH/2)            


           BUFFER (TX2 + (TY2*XRES) ) = ALPHAA(V1,BUFFER (TX2 + (TY2*XRES) ))
           BUFFER (TX2 + 1+ (TY2*XRES) ) = ALPHAA(V2,BUFFER (TX2 + 1+(TY2*XRES) ))
           BUFFER (TX2 -1 + (TY2*XRES) ) = ALPHAA(V2,BUFFER (TX2 -1 + (TY2*XRES) ))
           BUFFER (TX2 + ((TY2-1)*XRES) ) = ALPHAA(V2,BUFFER (TX2 + ((TY2-1)*XRES) ))
           BUFFER (TX2 + ((TY2+1)*XRES) ) = ALPHAA(V2,BUFFER (TX2 + ((TY2+1)*XRES) ))
       END IF
       
   ELSE
   SNT(L)=SNT(L)-1
   END IF
END IF

   NEXT


END SUB


SUB FLAT_TRIANGLE(BYVAL X1 AS INTEGER , BYVAL Y1 AS INTEGER, BYVAL X2 AS INTEGER , BYVAL Y2 AS INTEGER , BYVAL X3 AS INTEGER, BYVAL Y3 AS INTEGER , BYVAL TC AS INTEGER)
'-------------------------------------------------------------------------
' FLAT TRIANGLE RENDERER WITH ASSEMBLY LANGUAGE RASTERISING BY SHOCKWAVE ^ DBF ^ S!P 2006.
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
' WE NEED TO SORT THESE POINTS INTO ORDER FROM TOP TO BOTTOM, AN EXCHANGE SORT IS OK.
' AS WE ONLY HAVE GOT 3 POINTS TO ARRANGE.
'-------------------------------------------------------------------------
DIM AS INTEGER TEMPX,TEMPY,LO,LI
               DIM AS INTEGER PX(3)
               DIM AS INTEGER PY(3)
               DIM TFLAG AS INTEGER
               dim pp as uinteger PTR
               DIM AS INTEGER IL1,IL2,SLICE
               TFLAG=0
       PX(1)= X1
       PX(2)= X2
       PX(3)= X3
       
       PY(1)= Y1
       PY(2)= Y2
       PY(3)= Y3

FOR LO = 1 TO 2
   FOR LI =1 TO 2      
       IF PY(LI+1) <= PY(LI) THEN
       TEMPX = PX(LI) : TEMPY = PY(LI)
       PX(LI) = PX(LI+1)
       PY(LI) = PY(LI+1)
       PX(LI+1) = TEMPX
       PY(LI+1) = TEMPY
       END IF    
   NEXT LI
NEXT LO

'   BOOT OUT INVISIBLE TRIANGLES!

   IF PX(1)<0 AND PX(2)<0  AND PX(3)< 0 THEN TFLAG=1
   IF PX(1)>XRES AND PX(2)>XRES  AND PX(3)>XRES THEN TFLAG=1
   IF PY(1)>YRES AND PY(2)>YRES  AND PY(3)>YRES THEN TFLAG=1
   
       DIM AS DOUBLE XP1,XP2:' SCREEN POSITIONS.
       DIM AS DOUBLE XI1,XI2:' INTERPOLATIONS.
       
'***
'*** REGULAR TRIANGLE (Y1<Y2 Y2<Y3)
'***

IF PY(1)<PY(2) AND PY(2)<PY(3) or (PY(2) = PY(3)) THEN
   TFLAG=1
XP1 = PX(1)
XP2 = PX(1)
XI1 = (PX(1)-PX(2)) / (PY(2) - PY(1))
XI2 = (PX(1)-PX(3)) / (PY(3) - PY(1))

FOR LO = PY(1) TO PY(2)-1
   
IF LO>=clipy AND LO<YRES THEN

   IF XP1<=XP2 THEN
       IL1=XP1
       IL2=XP2
   ELSE
       IL1=XP2
       IL2=XP1
   END IF
   
   IF IL2>XRES THEN IL2=XRES
   IF IL1<0 THEN IL1=0

   SLICE = IL2-IL1
   IF SLICE>0 THEN
   PP = @BUFFER(IL1+(LO*XRES))  
   TC=COPPALIST(LO)
   asm
       mov eax,dword ptr[TC]
       mov ecx, [slice]
       mov edi, [PP]
       rep stosd
   end asm  
   END IF
   

END IF

XP1=XP1-XI1
XP2=XP2-XI2
NEXT

XI1 = (PX(2)-PX(3)) / (PY(3) - PY(2))
XP1 = PX(2)

FOR LO = PY(2) TO PY(3)
IF LO>=clipy AND LO<YRES THEN
   IF XP1<=XP2 THEN
       IL1=XP1
       IL2=XP2
   ELSE
       IL1=XP2
       IL2=XP1
   END IF

   IF IL2>XRES THEN IL2=XRES
   IF IL1<0 THEN IL1=0

   SLICE = IL2-IL1
   IF SLICE>0 THEN
           TC=COPPALIST(LO)
   PP = @BUFFER(IL1+(LO*XRES))  
   asm
       mov eax,dword ptr[TC]
       mov ecx, [slice]
       mov edi, [PP]
       rep stosd
   end asm  
   END IF
END IF
XP1=XP1-XI1
XP2=XP2-XI2
NEXT

END IF


'***
'*** FLAT TOPPED TRIANGLE Y1=Y2
'***

IF TFLAG=0 AND PY(1) = PY(2) THEN
   
       TFLAG=1
       XP1 = PX(1)
       XP2 = PX(2)
       XI1 = (PX(1)-PX(3)) / (PY(3) - PY(1))
       XI2 = (PX(2)-PX(3)) / (PY(3) - PY(2))
FOR LO = PY(1) TO PY(3)
IF LO>=clipy AND LO<YRES THEN
   IF XP1<=XP2 THEN
       IL1=XP1
       IL2=XP2
   ELSE
       IL1=XP2
       IL2=XP1
   END IF
   
   IF IL2>XRES THEN IL2=XRES
   IF IL1<0 THEN IL1=0
   
   SLICE = IL2-IL1
   IF SLICE>0 THEN
           TC=COPPALIST(LO)
   PP = @BUFFER(IL1+(LO*XRES))  
   asm
       mov eax,dword ptr[TC]
       mov ecx, [slice]
       mov edi, [PP]
       rep stosd
   end asm  
   END IF
END IF
   XP1=XP1-XI1
   XP2=XP2-XI2

NEXT
END IF
END SUB


SUB ROTATE()
DIM A
DIM XCUNT AS DOUBLE
xcunt=0
   DIM VX1 AS DOUBLE
   dim VY1 AS DOUBLE
   dim VZ1 AS DOUBLE
   
   DIM VZZ AS DOUBLE    
   dim vxx as double
   dim vyy as double
   
   DIM VDV AS DOUBLE

   DBY=DBY+BNC
   BNC=BNC+ (3 * delta)
   IF DBY>30 THEN
       DBY=30
       BNC=-5
   END IF

'###############################################
'## Rotate And Scale Each Point! Store Result ##
'###############################################
For a=1 To points

   VX1=Vx(a)
   VY1=Vy(a)
   
   VZ1=Vz(a)
   
'######################
'## X,Y,Z rotations! ##
'######################
 Vxx=Vx1
 Vyy=Vy1*cos(Vxr)+Vz1*sin(Vxr)
 Vzz=Vz1*cos(Vxr)-Vy1*sin(Vxr)
 
 Vy1=Vyy
 Vx1=Vxx*cos(Vyr)-Vzz*sin(Vyr)
 Vz1=Vxx*sin(Vyr)+Vzz*cos(Vyr)
 
 Vzz=Vz1
 Vxx=Vx1*cos(Vzr)-Vy1*sin(Vzr)
 Vyy=Vx1*sin(Vzr)+Vy1*cos(Vzr)
'########################
'## Apply Perspective! ##
'########################

 Vdv=(Vzz/10)+1

 Vxx=(size*(Vxx/Vdv))+HALFX+60
 
 Vyy=(size*(Vyy/Vdv))+HALFY+DBY
 
 Vtx(a)=Int(Vxx)
 Vty(a)=Int(Vyy)
 Vtz(a)=Int(Vzz)

Next

       Vxr=Vxr+delta
       Vyr=Vyr+delta*.7
       Vzr=Vzr+delta*.4

END SUB


SUB construct()



   DIM A
   DIM  AS DOUBLE N,RD,GR,BL

'---------------------------------------------------------
'              Draw A Face Of The Object;
'---------------------------------------------------------
' UPSIDE DOWN

   DIM FK AS INTEGER
   FK=700

   For a=1 To faces

 vx1= Vtx(Vf1(a))-Vtx(Vf2(a))
 vy1= Vty(Vf1(a))-Vty(Vf2(a))
 vx2= Vtx(Vf3(a))-Vtx(Vf2(a))
 vy2= Vty(Vf3(a))-Vty(Vf2(a))
 n=  vx1*vy2-vx2*vy1
 
If n>0 THEN

   n= (n/200)
                       rd=Vr(a)*n : If rd>20 THEN rd=20
                       gr=Vg(a)*n : If gr>20 THEN gr=20
                       bl=Vb(a)*n : If bl>20 THEN bl=20  
                       FLAT_TRIANGLEC(Vtx(Vf1(a)),-(Vty(Vf1(a))/2)+FK,Vtx(Vf2(a)),-(Vty(Vf2(a))/2)+FK,Vtx(Vf3(a)),-(Vty(Vf3(a))/2)+FK,RGBA(RD,GR,BL,30))
   End If
   NEXT


   For a=1 To faces

 vx1= Vtx(Vf1(a))-Vtx(Vf2(a))
 vy1= Vty(Vf1(a))-Vty(Vf2(a))
 vx2= Vtx(Vf3(a))-Vtx(Vf2(a))
 vy2= Vty(Vf3(a))-Vty(Vf2(a))
 n=  vx1*vy2-vx2*vy1
 
If n<0 THEN

   n=-(n/4)
                       rd=Vr(a)*n : If rd>200 THEN rd=200
                       gr=Vg(a)*n : If gr>200 THEN gr=200
                       bl=Vb(a)*n : If bl>200 THEN bl=200  
                       FLAT_TRIANGLEC(Vtx(Vf1(a)),-(Vty(Vf1(a))/2)+FK,Vtx(Vf2(a)),-(Vty(Vf2(a))/2)+FK,Vtx(Vf3(a)),-(Vty(Vf3(a))/2)+FK,RGBA(RD,GR,BL,30))
   End If
   NEXT

' RIGHT WAY UP

   For a=1 To faces

 vx1= Vtx(Vf1(a))-Vtx(Vf2(a))
 vy1= Vty(Vf1(a))-Vty(Vf2(a))
 vx2= Vtx(Vf3(a))-Vtx(Vf2(a))
 vy2= Vty(Vf3(a))-Vty(Vf2(a))
 n=  vx1*vy2-vx2*vy1
 
If n>0 THEN

   n=(n/50)
                       rd=Vr(a)*n : If rd>40 THEN rd=40
                       gr=Vg(a)*n : If gr>40 THEN gr=40
                       bl=Vb(a)*n : If bl>40 THEN bl=40                          
                       FLAT_TRIANGLEB(Vtx(Vf1(a)),Vty(Vf1(a)),Vtx(Vf2(a)),Vty(Vf2(a)),Vtx(Vf3(a)),Vty(Vf3(a)),RGBA(RD+10,GR+10,BL+10,15))
   End If
   NEXT

   For a=1 To faces

 vx1= Vtx(Vf1(a))-Vtx(Vf2(a))
 vy1= Vty(Vf1(a))-Vty(Vf2(a))
 vx2= Vtx(Vf3(a))-Vtx(Vf2(a))
 vy2= Vty(Vf3(a))-Vty(Vf2(a))
 n=  vx1*vy2-vx2*vy1
 
If n<0 THEN

   n=-(n/3)
                       rd=Vr(a)*n : If rd>250 THEN rd=250
                       gr=Vg(a)*n : If gr>250 THEN gr=250
                       bl=Vb(a)*n : If bl>250 THEN bl=250    
                       FLAT_TRIANGLEB(Vtx(Vf1(a)),Vty(Vf1(a)),Vtx(Vf2(a)),Vty(Vf2(a)),Vtx(Vf3(a)),Vty(Vf3(a)),RGBA(RD,GR,BL,5))
   End If
   NEXT




END SUB


SUB FLAT_TRIANGLEB(BYVAL X1 AS INTEGER , BYVAL Y1 AS INTEGER, BYVAL X2 AS INTEGER , BYVAL Y2 AS INTEGER , BYVAL X3 AS INTEGER, BYVAL Y3 AS INTEGER , BYVAL TC AS INTEGER)
'-------------------------------------------------------------------------
' FLAT TRIANGLE RENDERER WITH ASSEMBLY LANGUAGE RASTERISING BY SHOCKWAVE ^ DBF ^ S!P 2006.
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
' WE NEED TO SORT THESE POINTS INTO ORDER FROM TOP TO BOTTOM, AN EXCHANGE SORT IS OK.
' AS WE ONLY HAVE GOT 3 POINTS TO ARRANGE.
'-------------------------------------------------------------------------
DIM AS INTEGER TEMPX,TEMPY,LO,LI ,GG
               DIM AS INTEGER PX(3)
               DIM AS INTEGER PY(3)
               DIM TFLAG AS INTEGER
               dim pp as uinteger PTR
               DIM AS INTEGER IL1,IL2,SLICE
               TFLAG=0
       PX(1)= X1
       PX(2)= X2
       PX(3)= X3
       
       PY(1)= Y1
       PY(2)= Y2
       PY(3)= Y3

FOR LO = 1 TO 2
   FOR LI =1 TO 2      
       IF PY(LI+1) <= PY(LI) THEN
       TEMPX = PX(LI) : TEMPY = PY(LI)
       PX(LI) = PX(LI+1)
       PY(LI) = PY(LI+1)
       PX(LI+1) = TEMPX
       PY(LI+1) = TEMPY
       END IF    
   NEXT LI
NEXT LO

'   BOOT OUT INVISIBLE TRIANGLES!

   IF PX(1)<0 AND PX(2)<0  AND PX(3)< 0 THEN TFLAG=1
   IF PX(1)>XRES AND PX(2)>XRES  AND PX(3&
DaZZaBoY - December 10, 2007 09:27 PM (GMT)
Wow! Mega postage from Shocky! Good to see I'm not the only one who's exceeded the max character limit in a post today. ;) Just goes to show how much code is needed behind the scenes for an intro.

Just having a bloody good laugh at the comments for the Skidrow prod. Stingray with his seemingly endless logo bashing fest, never fails to disappoint and even DipstickSwitch getting a panning from Dalezy.

Oops, there I go name dropping again. :D

zYX! - December 10, 2007 09:30 PM (GMT)
Heya Shockwave.

Nice to meet a scene guy with a friendly attitude. I have to admit to just getting bored and fed up with the scene in general after the Grapevine remake/tribute fiasco. (Actually, that's not fair, there are a lot of friendly scene guys still around but they tend to be a bit more mature and reserved than the idiots with inflated egos that make the most noise.)

QUOTE
The followers of the wares scene look at places like defacto2.net more readilly than the other scene portals.


Very nice collection of cracktros on defacto2.

QUOTE
Stormbringer does not however use software rendering, instead he develops in C++ and with DirectX.


I been learning to code in C++/Win32/DirectX for a while and I keep meaning to have a bash at a simple intro at some point. It's been a bit of an uphill struggle to learn how to co-operate with Windows and do the whole DirectX thing on top of that but I'm think I'm at the stage now where I can blit stuff around the screen smoothly. Couple of months studying yet but hoping I can knock out something simple eventually.

Regarding software rendering - I'm planning to stick to DirectDraw as much as possible and ignore Direct3D until I'm happy with 2D stuff. It would be nice to be able to code a vector cube in software only before I cheat and use hardware 3D.

QUOTE
A remake of Mental Hangover is planned (talking about full sized demos).


Great news! Looking forward to this one.

shockwave - December 11, 2007 06:12 PM (GMT)
Oops! Sorry Dazza, I didn't realise I had exceeded the post size limit! Anyway, the code would not run without all the resources anyway so it is just out of interest to post it I guess.

Hi zYX, Glad that you find my attitude friendly ( it's not always like that, I go off on a rant sometimes ).

As for software rendering v/s whatever API you choose, just stick with what you feel comfortable with, again if you get stuck during your learning I know lots of people who'd help you.

:)

zYX! - December 13, 2007 06:05 PM (GMT)
We all rant sometimes... Especially Dazza! :P

Thanks for the offer of coding help. Right now I'm cracking on well with it but I may take you up on it sometime in the future if I hit a brick wall.

stormbringer - March 28, 2008 12:03 AM (GMT)
Hi to all,

I came across this thread and saw Shockwave's post. I wish I was half talented as Shockwave thinks I am.. Thanks mate for defending my case with so much conviction! But don't underestimate yourself ;)

BTW, a small correction, I do not use DirectX and probably will never use it. For a couple of reasons:

1) it's Micr$oft only
2) it's Win32 only
3) it is DLL dependent
4) you have to update your DX DLLs way to often
5) coding techniques changes with almost every version!

I stick with OpenGL as it is standard on all platforms, no need to install any extra DLL and it's just as powerful if not even more than DX (when you know how to use it!)


shockwave - March 28, 2008 05:27 PM (GMT)
Sorry Stormbringer :)

I played with DX and Opengl a little as you know and I found Direct X was a pain in thew arse and Opengl was completely instinctive.

nzo - April 24, 2008 10:37 PM (GMT)
Have you checked out my retro-remakes?
All done in pure DHTML.... hell, I even remade hardwired :)

Check my sig

shockwave - April 25, 2008 04:39 PM (GMT)
Your remakes are really good nzo :)

Nice to see someone else doing them.

antimatter - June 8, 2008 06:16 PM (GMT)
QUOTE (DaZZaBoY @ Dec 10 2007, 09:27 PM)
Just having a bloody good laugh at the comments for the Skidrow prod. Stingray with his seemingly endless logo bashing fest, never fails to disappoint



How about posting that in the comments section of pouet so people could actually read what you think of them and reply/react? But yeah, good old Dazzaboy also never fails to disappoint with his constant "ohhhh pouet is sooooo fucked up" whining. Some things apparently never change.
Anyway Dazzaboy, ever heard of "freedom of speech"? If I dislike a logo I say it and if I like a logo I say that as well. And this is anything but bashing! And contrary to you I don't write that in some obscure forum where the involved people will probably never read it.
You whine about how people on Pouet have no respect and stuff but I prefer people who dare to openly say what they think instead of talking behind people's back! In my eyes you are nothing but a hypocrite, you constantly whine about missing respect while you don't show any either. And speaking about hypocrisy, if you hate Pouet so much why the the hell do you visit the site then? Just so you have something to whine about? That's my impression at least.

Anyway, I'm happy that I could at least give you something to laugh about, my pleasure!

shockwave - June 8, 2008 06:30 PM (GMT)
Stingray has made some really excellent productions so I listen to his comments and if he doesnt like something then why shouldn't he say he dislikes it?

My first things really sucked balls and deserved to be heavily criticised, it took the comments of some honest people to put me right. When friends say that something is good, even when the truth is obvious, that's far worse than being open and trying to help a programmer improve his work.

Last thing I released was an intro for defacto2.net which is now about 3rd in the all time top 10 intros at pouet with something like 44 upthumbs.

Respect must be earned by making something worth watching.

Hang around there for a while and you soon see who is worth listening to and who is not... The empty headed trolls can be ignored, when som eone says something useful it's worth listening, even if it is harsh.

DaZZaBoY - June 10, 2008 06:19 PM (GMT)
@Antimatter: Thanks for joining our obscure forum and making your opening post an interesting one, it's just a shame your sooooo late to the party. :huh:

I never actually had a problem with Pouet from the word go and they've always been a damn fine resource for old and new prods, although the BBS continues to be littered with bullshit. My 'pouet bashing' phase was always done with my tongue firmly in my cheek and most others with half a brain have actually understood this and laugh about it now.

The scene threads on here and my comments elsewhere have always been made public, so I can't see how I'm being a hypocrit?

edit: Oh, and I'll show respect to friendly people who posess a good attitude and not how 'talented' they are.



Hosted for free by InvisionFree