Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - KrazyK

Pages: [1] 2 3 4 5 6 7 8 ... 15
1
Here's the transparent image drawing code from a previous post.
Code: [Select]
Import "msimg32.lib"
TransparentBlt( hdcDest, nXOriginDest, nYOriginDest, nWidthDest, hHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, crTransparent )
EndImport

ProcedureDLL KK_DrawTransparentImage(DestImage,SourceImage,xdest,ydest,transcol)
hdcSrc2 = CreateCompatibleDC_(DestImage)
SelectObject_(hdcSrc2, ImageID(SourceImage))
TransparentBlt(DestImage,xdest,ydest,ImageWidth(SourceImage),ImageHeight(SourceImage),hdcSrc2,0,0,ImageWidth(SourceImage),ImageHeight(SourceImage),transcol)
DeleteDC_(hdcSrc2)
EndProcedure

It is kind native as 'Import' is  a native command. ;D  I suppose what I mean is that it doesn't use other libraries like MP3D, SDL etc.  I use the above code as I can never get the DrawAlphaImage command to work correctly no matter what I do.  Need more practice with it I guess.

2
Purebasic / Aggression / D-Bug remake
« on: November 09, 2019 »
A long time ago, in a living room far, far away...

Actually back in August 2015 I downloaded this really cool fullscreen ST cracktro and thought I would have a go at remaking it but I never quite managed to pull it off as it had a big scroller that bounced in sync with a beat on one of the music channels.  Try as I might I couldn't work it out. It always started ok but soon got out of sync.  Lots of mathematical calculations were deployed and lots of hair pulled out.  So last year I got in touch with the author, !Cube, who sent me his original 68000 code to look at and explained that the tune had a control code (zync code) that controlled the y position of the bounce!  Dammit!!
I had already ripped the fonts and bounce data and coded the cool text writer before I got my hands on the 68k code but looking at it really helped but I still couldn't get it right.  >:(
I've actually lost count at the number of times i've dug this remake out and put it back down again - but one day at work last week, when I was supposed to be working, I had a brainwave, and the second I got in from work I tested it out and  - Hoo-Fookin-Rah!  It worked!!
Tested it on 2 completely different PCs and it's working ok - let me know if it works on yours.

Once i've made sense of my very old PB code, as it's been a while since I started it, i'll comment it and post it.  There's lots of crap in there that doesn't need to be there, i'm sure.





3
As promised, here's the PB source for the Spotlight Demo for you to tinker with and hopefully improve a bit.
I've already speeded up the prefetching of the sprites spotlight on the logo by 50% by moving a few lines around and creating a mask.
But if someone has a better way of drawing the spotlight sprite over the logo but not showing on the black background then i'm all ears as I couldn't think of another way of doing it.
I've commented it as much as possible and all spelling mistakes are obvoiusly intentional.  ;D


4
Does it have dependencies (dll's)
Would be cool if I can check this on my g4-ppc 10.3.9 osx purebasic environment.
The only dll it uses is the sndh replay which also reads the 3 sound channels which is windows only I'm afraid.



5
It's all written in purebasic using only the native commands. No opengl or sdl. Nothing like that. Just the standard Purebasic 2d sprite commands.
I'll be posting the code once I've had a further tinker with it to speed up the sprite prefetching.

6
Purebasic / The Spotlight Demo remake (ST Connexion)
« on: October 19, 2019 »
Another demo remake.  This time one from ST Connexion from the Dream Demo called the Spotlight Demo.
This was one of the early fullscreen/overscan demos for 1989 and very nice it is too on a real ST.
Contains a 3 plane starfield, vu bars, a pourdown/up logo (finally managed to convert that part !), a bendy/disted rastered scrolltext with reflection in the bottom border, and a moving spotlight that shines on the big central  logo.
Learned a few new trick in PureBasic converting this one that I will share once I comment the code.  ;)
In the meantime though here's the 'finished' demo in the zip.

7
Purebasic / Need help with an effect
« on: October 18, 2019 »
Hi all,
I've started work on another demo remake and my brain has stopped functioning. ;D
I need to code what looks like a simple effect but can't for the life of me figure out how to do it.  I'm sure I did the same effect when i used Stos years ago but converting it to PureBasic has got me stumped.
I've tried a few different methods and failed!

It's a simple pour down effect where a logo drops down in increments to a position below and then pours back up again.
Here's a quick n dirty animation from the demo in question.
It's the last thing I have to do for this remake and will of course credit anyone who can help !

[edit]
I think i've finally worked it out during a Eureka moment!  ::)
I've even preshifted the sprites now so it's easier to use.

8
Purebasic / Re: one from C.I.D
« on: October 16, 2019 »
First ever remake of a Criminals In Disguise menu after I stumbled across them recently.
A simple 2D stafield, faded bouncing raster bars, a 64x32 sine scroller and a big VU meter and of course excellent music by Mad Max from Rings of Medusa.
All ripped and coded in about 8 hours in total.  All Purebasic code etc here for you in the zip file.

[edit]
Changed the order of the scrolelr so it is now on top of the vu bars and behind the logo.

9
Projects / Re: Small Remake
« on: October 09, 2019 »
Nice. I remember that one.

10
Purebasic / one more from TCB
« on: September 23, 2019 »
Here's another quick one from TCB.  I adapted this code for PureBasic from the excellent codef remake by NewCore.
This is a screen from the SoWatt Demo by The CareBears way, way back in 1989. :o
Full source code available here for you to play with too.  ;)

[edit]
If anyone doesn't have my transparent image drawing library then add the following somewhere at the top of the code:

Code: [Select]
Import "msimg32.lib"
TransparentBlt( hdcDest, nXOriginDest, nYOriginDest, nWidthDest, hHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, crTransparent )
EndImport

ProcedureDLL KK_DrawTransparentImage(DestImage,SourceImage,xdest,ydest,transcol)
hdcSrc2 = CreateCompatibleDC_(DestImage)
SelectObject_(hdcSrc2, ImageID(SourceImage))
TransparentBlt(DestImage,xdest,ydest,ImageWidth(SourceImage),ImageHeight(SourceImage),hdcSrc2,0,0,ImageWidth(SourceImage),ImageHeight(SourceImage),transcol)
DeleteDC_(hdcSrc2)
EndProcedure


11
Purebasic / Re: more ST remakes
« on: September 20, 2019 »
Many thanks for the no lib version Bobo220673  :cheers:
I'll be using this in future.
I'm slowly getting back into it with this quick screen. It took a couple of days to do from ripping to compiling.
I have a few more already in the pipeline.

12
Purebasic / Re: more ST remakes
« on: September 18, 2019 »
Here's the final version (so far!) along withe commented PB code.
You will need the OSME x86 library installed for this to work, never fear though, i've included it here too. ;)

13
Purebasic / more ST remakes
« on: September 17, 2019 »
So I finally decided to dig out the laptop and rip another intro from the ST for the first time in about 7 months. So i've nearly finished this one by Scum Of The Earth. It just needs a bit of tidying up with the moving backgrounds and it will be done.
I'll post the code once it's done too.  ;)

14
Purebasic / Re: 3D Starballs Library
« on: July 02, 2019 »
Hi.
There are no other commands in the library and there can be only one instance using one sprite.
I may have to re-write it if I get time, and can remember how I did it.
Were you thinking of having multiple starfields moving in different directions with one sprite or one starfield with multiple sprites?

15
Purebasic / Re: 3D Starballs Library
« on: April 24, 2019 »
Thanks for testing the library.  The KK_StarballsInfo() is just a messagebox with version info like below.  I no longer have the original code so it looks like I didn't include that function for x64.  It's only on x86 it appears.
I'll try to re-code it again when I have a bit more time.

[edit]
It appears I added an 's' to the KK_StarBallInfo() comamnd, so for x64 it's KK_StarBallsInfo(),  Problem solved - my mistake when writing it.



16
Thanks aNdy. I have something a bit special lined up for my next project once I work out if it's possible.  :-X

17
Just finished this conversion and tested it on 3 machines for the Star Wars scrolltext.  it appears to work ok now, but only you out there will be able to verify it.  ;)
The previous problems with the star wars scrolltext were that the the sprite was too large to transform.  it worked 100% on my laptop but failed on two PCs.  It just need to be clipped to a smaller size before transforming and it now works fine.  Hopefully.  :-X

This demo has been converted into Purebasic from a CODEF screen by NewCore.  It took a fair bit of head scratching to convert the CODEF syntax into something i'm familiar with but I think i've succeeded.
Please test and let me know if it works.



18
Purebasic / 3D Starballs Library
« on: March 18, 2019 »
Here's my 3D sprite starfield library for PureBasic.   I wrote it last year before my hard drive died and lost everything and meant to post it ages ago but forgot all about it.
The example shows how to use a random set of values on how to control the movement.  But it can easily be changed to have preset values in an array or a DataSection.
I'll post an example if anyone needs it.
Just add the appropriate library into your PureBasic folders, load the example and run.

19
Projects / MegaBalls (Finished?)
« on: March 18, 2019 »
I've spent enough time on this demo now so here it is.  It's more of a tribute demo than a 1:1 and i've added a few more objects and waves.
I've also added new balls if you read the scrolltext.  ;)





20
Purebasic / Re: Cracktro code
« on: March 16, 2019 »
Thx for that beautiful stuff. Any chance of getting that KK_OSMELibraryX86 to Mac/G4-PPC
so that I can compile this beautiful stuff on my G4-Mini/PPC 10.1 Xcode 2.5 PureBasic 4.61 environment?

That would be cool.
Thx

Afraid not, it's windows only.  The original dll was written by Zippy ages ago.  He may still have the c++ code for it if you ask him nicely.

Pages: [1] 2 3 4 5 6 7 8 ... 15