Author Topic: Cracktro Sources  (Read 5305 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 361
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Cracktro Sources
« on: April 11, 2018 »
Here's the first of the PureBasic sources for my latest cracktros.  I thought it would be good to share some of them more readable ones once I had commented them.  Keep checking here for more if you're a PureBasic user.
All of the sources have been written using PureBasic 5.62 x86 as the OSME library is only x86 compatible.
Copy the OSME into your UserLibraries folder before you do anything else.

First off is The Replicants Dark Fusion cracktro with the fixed path rastered scrolltext and the moving logo.
The scrolltext is simply done by having a white font then drawing it transparently on top of a clipped raster block on a fixed path read from an array.
The moving logo uses a simple sine calculation to move it up and down.

Links to older sources:

http://www.dbfinteractive.com/forum/index.php?topic=6515.msg83094#msg83094

http://www.dbfinteractive.com/forum/index.php?topic=6521.msg83116#msg83116

http://www.dbfinteractive.com/forum/index.php?topic=6316.msg82018#msg82018

http://www.dbfinteractive.com/forum/index.php?topic=5296.msg81525#msg81525

http://www.dbfinteractive.com/forum/index.php?topic=6171.msg81038#msg81038

http://www.dbfinteractive.com/forum/index.php?topic=6149.msg80731#msg80731

http://www.dbfinteractive.com/forum/index.php?topic=6152.msg80756#msg80756


More sources to come  ;)


Code: [Select]
;-Replicants Dark Fusion Cracktro
;-Remake: KrazyK 2018

;-Purebasic 5.62 source
;-set tabs to 8 for readability

;-This is a very simple cracktro remake from the Atari ST by The Replicants.
;-Copy the OSME library into you userlibraries folder (x86 only though).
;-This source is provided as is so feel free to use any of it as you wish. 
;-A credit is always nice though if you use any of it though ;-)

;-screen dimensions
#xres=640
#yres=480

#yoffset=40 ;-keep the screen accuurate on 640x480.  Atari ST would be 320x200 doubled to 640x400 so there are 80 pixels extra which are then divided by to to make a 40 pixel border top and bottom
#scroll_len=380 ;-pixel width of the scrolltext

InitSprite()

fs=0 ;-windowed=0, fullscreen=1

If fs=0
OpenWindow(0,0,0,#xres,#yres,"",#PB_Window_ScreenCentered|#PB_Window_WindowCentered|#PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0),0,0,#xres,#yres)
StickyWindow(0,1)       ;-keep window on top
ShowCursor_(0)          ;-hide the mouse
ElseIf fs=1
OpenScreen(#xres,#yres,32,"")
Else
End
EndIf

Procedure InitGraphics()
       
CatchSprite(0,?logo)    ;-moving logo
CatchSprite(2,?main)    ;-main screen
Global angle.f          ;-variable for the logo movement

;- Scroller stuff
Global scroll$="               THE REPLICANTS OF THE UNION PRESENT DARK FUSION CRACKED AND TRAINED BY R.AL WITH A LITTLE INTRO CODED BY FURY (IN ONE NIGHT), GRAPHICS BY COBRA, MUSAK BY GREAT MAX WE CAME BACK FROM PARIS SATURDAY IN THE EVENING AFTER A THREE DAYS REPLICANTS MEETING WHERE WE DIDN'T SLEEP A LOT 'COSE THERE WAS A LOT OF GAMES TO CRACK AND A LOT OF X-MOVIES TO SEE... ONE DAY AFTER COBRA(ME) AND SNAKE DECIDED TO GO IN FURY HQ TO CODE THE INTRO YOU'RE NOW WATCHING.. HE WAS VERY ANGRY 'COSE HE WAS CODING SOME SCREENS FOR OUR FRENCHY DEMO, BUT AFTER SOME DISCUSSIONS HE FINALLY ACCEPT TO CODE AN INTRO. AFTER THIS LITTLE STORY NOW SOME GREETINGS TO OUR BEST FRIENDS AND CONTACTS : FIRST OF ALL GOLDEN REGARDS TO ALL MEMBERS OF THE UNION (ESPECIALLY TCB AND TEX).NORMAL GREETINGS TO : MCA, A-HA, THE MEDWAYS BOYS, BIG FOUR, AUTOMATION, REVOLUTION, FLEXIBLE FRONT, THE BROD, TSB, OMEGA, BLACK FLAME, CST, STM, SEWER SOFTWARE, SYNC, PHALANX, LOSTBOYS, DMA AND ALPHA FLIGHT OH, I FORGOT THERE HAVE BEEN SOME CHANGES IN THE REPLICANTS, HERE'S THE NEW MEMBERS LIST : R.AL, FURY, SNAKE, COBRA, ELWOOD, DOM, EXCALIBUR. AS YOU CAN SEE THERE'S A MISSING ON THE LIST : RATBOY . WE HAVE LOST A GREAT CODER AND CRACKER BUT NOT JUST US, THE ATARI ST HAS LOST HIM... GOOD LUCK ON ARCHIMEDES... I THINK IT'S NOW TIME TO WRAP.....                  "
Global speed=4 ;-scroll text speed
Global xmove=512 ;-start the scroller in the mouth !
Global xmin=130         ;-end of scroller here
Global Letter=1         ;-scroll text start
CreateSprite(3,(#scroll_len),14) ;-draw scrolltext on here in a straight line first
TransparentSpriteColor(3,#White) ;-white is transparent as we need to draw the font on top of the raster for the raster to show though


Global Dim position.b(#scroll_len) ;-create an array for the scroll y positions
CopyMemory(?ypos,@position(0),#scroll_len) ;-copy it into the array, don't bother using restore and read!
CatchImage(1,?font) ;-ripped font 16x14
CatchSprite(4,?raster) ;-ripped raster

EndProcedure

Procedure Scroller()
StartDrawing(SpriteOutput(3))                                   ;-draw the scrolltext on this sprite first in a straight line
For l=0 To 25                                                   ;-draw 26 characters
ascii_val = Asc(UCase(Mid(scroll$, l+Letter, 1)))-32    ;-get the ascii value
GrabImage(1,2,ascii_val*16,0,16,14)                     ;-grab a letter
DrawImage(ImageID(2),xmove+(l*16),0)                    ;-draw it on our sprite
Next l
StopDrawing()

xmove-speed:If xmove=-(16*2):xmove=-16:Letter+1:EndIf ;-scroll left
If Letter=Len(scroll$):Letter=1:xmove=512:EndIf ;-check for text end

;-the raster and scrolltext are then cut up into 1x14 slices
;-the white text being displayed transparently on top of the raster so that the raster shows through.
For c=0 To #scroll_len-1
ClipSprite(4,0,position(c),1,14) ;-grab a raster slice
DisplayTransparentSprite(4,xmin+c,position(c)+216+#yoffset) ;-draw it
ClipSprite(3,c,0,1,14) ;-grab a scroll slice
DisplayTransparentSprite(3,xmin+c,position(c)+216+#yoffset) ;-draw it
Next c

EndProcedure

Procedure MoveLogo()

DisplayTransparentSprite(2,0,#yoffset) ;-main screen
logo_offset.f = 40 * Sin(angle.f) ;-use a simple sine calculation to move the logo
angle.f + 0.0525 ;-this is the movement speed
DisplayTransparentSprite(0,320-(SpriteWidth(0)/2),logo_offset+86) ;-draw the logo

EndProcedure


InitGraphics()

OSMEPlayMusic(?music,?musend-?music,1)

;-main loop start
Repeat
If fs=0:event=WindowEvent():EndIf       ;only use for windowed screens
ClearScreen(0)


Scroller()              ;-draw the scroller first
MoveLogo()              ;-then draw the main screen and moving logo
 

FlipBuffers()
Until GetAsyncKeyState_(#VK_ESCAPE)
OSMEStopMusic()
End



DataSection

ypos: :IncludeBinary"posdat.bin" ;-y position data for the text scroller.  The scroll length is 380 pixels wide between the mouths, so there are 380 bytes to read from the posdat.bin file.
font: :IncludeBinary"gfx\font16.bmp"
raster: :IncludeBinary"gfx\raster.bmp"
main: :IncludeBinary"gfx\main.bmp"
logo: :IncludeBinary"gfx\replogo.bmp"
music: :IncludeBinary"sfx\syntax_terror_loader.sndh"
musend:

EndDataSection
« Last Edit: April 12, 2018 by KrazyK »
Challenge Trophies Won:

Offline aNdy

  • C= 64
  • **
  • Posts: 92
  • Karma: 30
    • View Profile
Re: Cracktro Sources
« Reply #1 on: April 13, 2018 »
Good stuff. Keep 'em coming! :D

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 361
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Cracktro Sources
« Reply #2 on: April 13, 2018 »
Here's another one. 
Cracktro remake from the Atari ST by Adrenalin UK.
A nice 128x64 rastered main font along with a simple horizontal scrolling starfeld.
Also 9 slow reverse bouncing, rastered letters.
Code: [Select]

;-Adrenalin CD #33
;-Code: Spaceman Spiff
;-Gfx: BioFeedback
;-Music: Excellence in Art
;-Year: 1992
;-Remake: KrazyK

;-Purebasic 5.62 source
;-set tabs to 8 for readability

;-Cracktro remake from the Atari ST by Adrenalin UK.
;-A nice 128x64 rastered main font along with a simple horizontal scrolling starfeld.
;-Also 9 slow reverse bouncing, rastered letters.
;-This source is provided as is so feel free to use any of it as you wish. 
;-A credit is always nice if you use any of it though ;-)


#xres=640
#yres=480
#yoff=40


InitSprite()

fs=0 ;windowed=0, fullscreen=1

If fs=0
OpenWindow(0,0,0,#xres,#yres,"",#PB_Window_ScreenCentered|#PB_Window_WindowCentered|#PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0),0,0,#xres,#yres)
StickyWindow(0,1)        ;-keep window on top
ShowCursor_(0)          ;-hide the mouse
ElseIf fs=1
OpenScreen(#xres,#yres,32,"")
Else
End
EndIf

Global DLEN=(?admovend-?admove) ;-length of the movement data
Global MAX=(DLEN/4)-1 ;-number of steps in the movement
Global Dim AdrMove(DLEN/4) ;-init our array to store the movement
CopyMemory(?admove,@AdrMove(0),DLEN) ;-and copy it into our array

Structure ADREN
index.L ;-array position
Spr.i ;-sprite id
EndStructure

Global Dim SPRITES.ADREN(DLEN)


For a=0 To 8
SPRITES(a)\index=MAX-(12*a) ;-initial starting positions in the movement array
Next a
Global ay


Global scroll$="                              ADRENALIN U.K. OF T.B.A. PROUDLY PRESENT COMPACT DISK THIRTY THREE.    RELEASE DATE  31\3\93    TO GET INTOUCH WITH ADRENALIN KEEP READING....   THIS IS   D I V I N E  ON THE KEYBOARD PRESENTING HIS FIRST MENU OF THE YEAR    WELL WE HAVE ACTUALLY MADE IT    NUMBER  THIRTY THREE............AMAZING          WELL I HAD TO TRY AND MAKE IT INTERESTING   THERES NOTHING REALLY WORTH CELEBRATING FOR QUITE A WHILE   OUR BIRTHDAYS BEEN AND GONE   I SUPPOSE THE NEXT BIG DATE IN THE ADRENALIN CALANDER IS DISK 50.  WELL I THINK THIS DISK IS WORTH CELEBRATING.....     ON THIS DISK YOU WILL FIND CAMPAIGN. THIS GAME IS NOT A NEW RELEASE BUT MOOKIE DID SUCH A GREAT JOB ON IT WE DECIDED TO RELEASE IT. IT WAS CRACKED BY SECTION 1 AND TESTED  PACKED  AND LINK FILED BY MOOKIE OF ADRENALIN.......  ALSO ON THIS DISK YOU WILL FIND A START UP DOC AND KID KONG WHICH IS A PERFECT REPRESENTATION OF ATARIS CLASSIC DONKEY KONG IT WILL ONLY RUN HOWEVER ON 1 MEG MACHINES.  DONKEY KONG WAS REPACKED BY MYSELF DIVINE AND IT WAS SUPPLIED TO ME BY GRAPHITE.   THIS EXCELLENT MENU WAS CODED BY SPACEMAN SPIFF OF ADRENALIN.  THE MUSIC IS BY EXCELLENCE IN ART AND THE ART WORK IS BY BIOFEEDBACK OF ADRENALIN      NOW I AM DEDICATING THIS MENU TO PUBLIC RELATIONS SO IF YOU LIKE THE SOUND OF THIS PROJECT KEEP READING.  ADRENALIN 33 IS NOW THE OFFICIAL PR MENU TO BE A PART OF    THE BIG 33   GET INTOUCH WITH ADRENALIN.  THIS THING WORKS 2 WAYS YOU KNOW.  WE NOW HAVE A DECENT SECURE CONTACT ADDRESS FOR ANY MEMBER OF THE PUBLIC TO WRITE TO.  ALREADY WE HAVE HAD LETTERS FROM ALL OVER BRITTAIN AND NORTHEN EUROPE. IF YOU WANT TO GET MORE OF OUR COMPACTS OR IF YOU HAVE A TALENT LIKE KNOWING HUNDREDS OF ST PEOPLE OR YOU CAN PRODUCE GOOD ARTWORK OR YOU CAN WRITE MUSIC OR CODE MENUS WRITE TO THIS ADDRESS           ADRENALIN UK 33.     6 LIVINGSTONE AVENUE      CLAY LANE ESTATE     DONCASTER     SOUTH YORKSHIRE     ENGLAND.     THAT WAS.....     ADRENALIN UK 33.     6 LIVINGSTONE AVENUE      CLAY LANE ESTATE     DONCASTER     SOUTH YORKSHIRE     ENGLAND.      REPLYS ARE NOW 1000 PERCENT RELIABLE.  IF YOU TRIED WRITTING TO OUR OLD ADDRESS AND GOT NO REPLY TRY THIS ONE I YOU WILL DEFINATLEY RECEIVE A REPLY.  WRITE THAT ADDRESS ON PAPER... WRITE IT ON YOUR DISK LABELS.  GIVE IT YA MATES ALONG WITH THIS DISK           WE HOPE TO HERE FROM YOU SOON   WHO EVER YOU ARE........         NOW FOR THE GREETZ...... GREETINGS TO THE REST OF THE BRITISH ALLIANCE WHO ARE...     C.I.D.,     INSANITY,     OUT OF ORDER (ESP. SONIC),     SYNCRO SYSTEMS (ESP. RAZOR),     THE LEMMINGS (ESP. XENONCIDE)     AND   WILD! (ESP. SNAZ).     GREETINGS ALSO TO THE FOLLOWING...     ADMIRABLES,     ANIMAL MINE,     ANTHRAX      APOLLO,     BREAKPOINT SOFTWARE,     CHAOS (ESP. BEN),     CHRIS H (YORK),     CHRIS H (MID GLAM),     CHRIS H (STAFFS),     CONCEPTORS (ESP. DEMON),      CRACKDOWN (ESP. INSPIRAL),     CYNIX (ESP. SUPERNOVA AND QUATTRO),     D-BUG,     DEVIANT DESIGNERS,     DIGI TALLIS (ESP. ORMOLU),     ELITE,     (E) TRIPPER,     FREESOFT,     FUZION,     I.C.S.,     INDIE HEAD,     KGB,      MAD VISION,     MICRO MANIAC,     MUG U.K.,     NEON LIGHTS (ESP. THE CAFFEINE KID),     PERSISTENCE OF VISION (ESP. MAC SYS DATA AND BORIS),     POMPEY PIRATES (R.I.P.),     POWA,     PURE ENERGY (ESP. FALCON AND ZAK),      PULSION,     RIPPED OFF (ESP. STICK AND BILBO),     SAFARI (ESP. PANTHER AND RHINO),     SCANZ,     SECTION ONE (ESP. RED LICHTIE),     SPECIAL FX (ESP. JAM),     SUPERIOR,     SUPREMACY (GET IN TOUCH!!).     SYNDICATE,     THE EDGE,     THE JOKER THE REPLICANTS,     TIM,     UNTOUCHABLES (ESP. MAT)   AND     X-STATIC (ESP. SIGNET).       THATS ABOUT IF FOR ADRENALIN 33   THE BIG MOTHER 33  THE VERY IMPORTANT 33   REMEMBER TO USE THE CONTACT ADDRESS   DONT JUST DREAM ABOUT IT      DO IT.       STAY SAFE   BE LUCKY            DIVINE OUT          WRAP                                             HARDFLOOR TECHNO 93                  "
Global Tlen=Len(scroll$)
Global Letter=0
Global Xmove.f=#xres
Global SWidth=128,SHeight=64
Global ScrollSpeed.f=16
CatchSprite(0,?font)

CatchSprite(1,?logo)
CreateSprite(2,#xres,SpriteHeight(1))
CopySprite(2,3):CopySprite(2,4)
Global Sx1,Sx2,Sx3

CatchSprite(6,?tba) ;-tba text
Global rwidth=68,rheight=36
CatchSprite(40,?raster)

Procedure MoveAdrenalin()

Protected i,ay,Clipy
xoff=24
For i=0 To 8
ay=AdrMove(SPRITES(i)\index): Clipy=(ay-276) ;-the difference between the minumum and the current array value
SPRITES(i)\index+1:If SPRITES(i)\index>MAX:SPRITES(i)\index=0:EndIf
ClipSprite(40,0,Clipy,rwidth,rheight) ;-clip part of the raster
DisplayTransparentSprite(40,xoff+rwidth*i,ay+#yoff-36) ;-show raster box
DisplayTransparentSprite(60+i,xoff+rwidth*i,ay+#yoff-36)
;-raster sprite is 160 high, max bounce y=402,min bounce =276,diff=126
;- if ay=300 then the y clipping = (300-276) the difference between the minumum and the current array value
Next i


EndProcedure


Procedure Adrenalin()
CatchSprite(60,?a) ;a
CatchSprite(61,?d) ;d
CatchSprite(62,?r) ;r
CatchSprite(63,?e) ;e
CatchSprite(64,?n) ;n
CopySprite(60,65) ;a
CatchSprite(66,?l) ;l
CatchSprite(67,?i) ;i
CopySprite(64,68) ;n

For S=60 To 68:TransparentSpriteColor(S,#White):Next S


EndProcedure

Procedure DoStars()
DisplayTransparentSprite(2,Sx1,#yoff): DisplayTransparentSprite(2,-#xres+Sx1,#yoff)
Sx1+2:If Sx1=>#xres:Sx1=0:EndIf

DisplayTransparentSprite(3,Sx2,#yoff): DisplayTransparentSprite(3,-#xres+Sx2,#yoff)
Sx2+4:If Sx2=>#xres:Sx2=0:EndIf

DisplayTransparentSprite(4,Sx3,#yoff): DisplayTransparentSprite(4,-#xres+Sx3,#yoff)
Sx3+8:If Sx3=>#xres:Sx3=0:EndIf

EndProcedure

Procedure MakeStarfield()
;-very simple starfield creation by drawing the 'stars' on 3 separate sprites and moving them at different speeds
For S=2 To 4
StartDrawing(SpriteOutput(S))
Star=0
Repeat
sx=Random(#xres,1)
sy=Random(SpriteHeight(1),1)
Box(sx,sy,2,2,RGB(0,128,160))
Star+1
Until Star=48
StopDrawing()
Next S

EndProcedure

Procedure Scroller()
;because of the nature of the ripped font not being in a standard format we have to adjust it here.  Feel free to fix it you want to!
For L=0 To 6
T$=Mid(scroll$,Letter+L,1)
Tval=Asc(T$)-65
Select Tval
Case -19:Tval=41 ;.
Case 27:Tval=42 ;\
Case -21:Tval=39 ;,
Case -2:Tval=43 ;?
Case -25:Tval=44 ;(
Case -24:Tval=45 ;?
Case -23:Tval=46 ;*

Case -17:Tval=27 ;0
Case -16:Tval=28 ;1
Case -15:Tval=29 ;2
Case -14:Tval=30 ;3
Case -13:Tval=31 ;4
Case -12:Tval=32 ;5
Case -11:Tval=33 ;6
Case -10:Tval=34 ;7
Case -9:Tval=35 ;8
Case -8:Tval=36 ;9

EndSelect

If Tval<0:Tval=48:EndIf

ClipSprite(0,(Tval*SWidth),0,SWidth,SHeight)
DisplayTransparentSprite(0,Xmove+(L*SWidth),168+#yoff)
Next L

Xmove-ScrollSpeed
If Xmove<=-(SWidth*2):Xmove=-SWidth:Letter+1:EndIf
If Letter>Tlen:Letter=0:Xmove=#xres:EndIf

EndProcedure

MakeStarfield()
Adrenalin()

OSMEPlayMusic(?music,?musend-?music,1) ;x86 OSME replay library

Repeat
If fs=0:event=WindowEvent():EndIf

ClearScreen(0)

DoStars() ;-cheater starfield
DisplayTransparentSprite(1,320-(SpriteWidth(1)/2),#yoff) ;-main logo

Scroller() ;-scrolltext
MoveAdrenalin() ;-bouncing letter

DisplayTransparentSprite(6,320-(SpriteWidth(6)/2),246+#yoff) ;-tba text


FlipBuffers()
Until GetAsyncKeyState_(#VK_ESCAPE)
OSMEStopMusic()
End



DataSection
music: :IncludeBinary"sfx\Bellis_Boot.sndh"
musend:

font: :IncludeBinary"gfx\scrollfont.bmp"
logo: :IncludeBinary"gfx\adrenalin.bmp"
tba: :IncludeBinary"gfx\tba.bmp"
raster: :IncludeBinary"gfx\raster.bmp"

a: :IncludeBinary"gfx\a.bmp"
d: :IncludeBinary"gfx\d.bmp"
r: :IncludeBinary"gfx\r.bmp"
e: :IncludeBinary"gfx\e.bmp"
n: :IncludeBinary"gfx\n.bmp"
l: :IncludeBinary"gfx\l.bmp"
i: :IncludeBinary"gfx\i.bmp"

;-y position data for the ADRENALIN movement
admove:
Data.L     402, 402, 402, 402, 401, 401, 401, 400, 400, 399, 399, 398, 398, 397, 397, 396, 396, 395, 395, 394, 393, 393, 392, 391, 391, 390, 389, 388, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 367, 366, 365, 364, 362, 361, 360, 358, 357, 356, 354, 353, 351, 350, 348, 347, 345, 344, 342, 341, 339, 338, 336, 334, 333, 331, 329, 327, 326, 324, 322, 320, 318, 317, 315, 313, 311, 309, 307, 305, 303, 301, 299, 297, 295, 293, 291, 288, 286, 284, 282, 280, 277, 276, 278, 280, 283, 285, 287, 289, 291, 293, 295, 298, 300, 302, 304, 306, 308, 309, 311, 313, 315, 317, 319, 321, 322, 324, 326, 328, 329, 331, 333, 335, 336, 338, 339, 341, 343, 344, 346, 347, 349, 350, 351, 353, 354, 356, 357, 358, 360, 361, 362, 364, 365, 366, 367, 368, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 385, 386, 387, 388, 389, 389, 390, 391, 391, 392, 393, 393, 394, 394, 395, 396, 396, 397, 397, 398, 398, 398, 399, 399, 400, 400, 400, 400, 401, 401, 401, 401, 402, 402, 402, 402, 402, 402, 402, 403, 403, 403, 403, 403, 403, 402, 402, 402, 402, 402, 402, 402, 401, 401, 401, 401, 400, 400, 400, 400, 399, 399, 398, 398, 398, 397, 397, 396, 396, 395, 394, 394, 393, 393, 392, 391, 391, 390, 389, 389, 388, 387, 386, 385, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 368, 367, 366, 365, 364, 362, 361, 360, 358, 357, 356, 354, 353, 351, 350, 349, 347, 346, 344, 343, 341, 339, 338, 336, 335, 333, 331, 329, 328, 326, 324, 322, 321, 319, 317, 315, 313, 311, 309, 308, 306, 304, 302, 300, 298, 295, 293, 291, 289, 287, 285, 283, 280, 278, 276, 276, 278, 280, 283, 285, 287, 289, 291, 293, 295, 297, 300, 302, 304, 306, 307, 309, 311, 313, 315, 317, 319, 321, 322, 324, 326, 328, 329, 331, 333, 334, 336, 338, 339, 341, 342, 344, 346, 347, 349, 350, 351, 353, 354, 356, 357, 358, 360, 361, 362, 363, 365, 366, 367, 368, 369, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 384, 385, 386, 387, 388, 388, 389, 390, 391, 391, 392, 393, 393, 394, 394, 395, 396, 396, 397, 397, 397, 398, 398, 399, 399, 399, 400, 400, 400, 401, 401, 401, 401, 402, 402, 402, 402, 402, 402, 402, 402, 403, 403, 403, 403, 402, 402, 402, 402, 402, 402, 402, 402
admovend:


EndDataSection

Challenge Trophies Won:

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 361
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Cracktro Sources
« Reply #3 on: April 27, 2018 »
Cracktro source for Awesome CD 7



Code: [Select]

;Awesome CD 7
;Code & Graphics: Ruthless & Magnum
;Music: Lap
;Year: 1991
;Remake: KrazyK 2015

;Purebasic 5.62 Source (x86)


DataSection
allfont:
IncludeBinary"gfx\allfont.bmp" ;my ripped font. This too a long time to put together!
awe:
IncludeBinary"gfx\awesomegold.bmp" ;cool gold logo !
copper:
IncludeBinary"gfx\copper.bmp" ;copper strip, cheating slightly ! :-)
typefont:
IncludeBinary"gfx\font2.bmp" ;text typing font
music:
IncludeBinary"sfx\lap_33.sndh":musend: ;ripped LAP music
ydata:
IncludeBinary"ydata.bin":ydataend: ;ripped sine table for logo bounce


EndDataSection


fs=0
#xres=640
#yres=480
#offset=0

InitSprite()

fs=0 ;-windowed=0, fullscreen=1

If fs=0
OpenWindow(0,0,0,#xres,#yres,"",#PB_Window_ScreenCentered|#PB_Window_WindowCentered|#PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0),0,0,#xres,#yres)
StickyWindow(0,1)       ;-keep window on top
ShowCursor_(0)          ;-hide the mouse
ElseIf fs=1
OpenScreen(#xres,#yres,32,"")
Else
End
EndIf


;-==================== Scroller variables ==============================
Global Scroll$=Space(10)
Scroll$+"HELLO AND WELCOME TO ANOTHER SELECTION OF BRAND NEW GAMES...    THIS TIME RUTHLESS BRINGS YOU COMPACT MENU NUMBER SEVEN.      THE RELEASE DATE OF THIS MENU IS SATURDAY THE THIRD OF AUGUST AND YOU SHOULD HOPEFULLY RECIEVE THIS MENU ALONG WITH AWESOME MENUS EIGHT AND NINE......     GAME ONE WAS CRACKED FILED AND PACKED BY CAMEO OF THE REPLICANTS  THE DOCS WERE SUPPLIED BY THE SCORPION AND WRECKERS WAS CRACKED FILED AND PACKED BY ZELDA.....     I AM PLEASED TO SEE THAT THE SOFTWARE SCENE IS PICKING UP AGAIN, WHICH MEANS MORE MENUS AND LESS TIME IN BETWEEN MENUS....     CREDITS FOR THIS MENU GOTO......  CODING BY RUTHLESS AND MAGNUM..... AND MUSIC BY LAP.....      WHAT DO YOU THINK OF THIS GREAT FONT....   IT IS NICE TO LOOK AT BUT THERE ARE NO PUNCTUATION MARKS OR NUMBERS.....    ANYWAY I WILL DO THE GREETINGS AND LET YOU GET ON WITH PLAYING ONE OF THE GREAT GAMES...      AWESOME GREETS GOTO.... THE REST OF AWESOME WHO ARE.... ZELDA.... THE SCORPION.... ....THE EDITMAN.... ....PHOENIX.... ....DEMON X....   OTHER GREETS GOTO    ...THE SYNDICATE ESP. ONIXUS... ...THE MEDWAY BOYS ESP. GINO AND ZIPPY... ...THE POMPEY PIRATES ESP. GENIE AND THE ALIEN... ...THE SOURCE ESP. FROSTY AND KALAMAZOO... ...INNER CIRCLE ESP. GRIFF AND MASTER... ...MUG UK... ...NOW FIVE ESP. STORMLORD AND FALCON... ...THE RADICAL BANDITS ESP. THE RUDE DUDE AND DEREK MD... ...THE REPLICANTS ESP. CAMEO... ...MAD VISION ESP. THE HIGHLANDER... ...ELECTRONIC... ...THUNDERFORCE ESP. MATRIX AND VORTEX... ...THE QUARTET ESP. BLOODANGEL AND NICK... ...FOFT ESP. THE AVENGER... ...BENNY... ...SPECIAL FX ESP. JAM... ...THE BBC ESP. ANDY... ...IMPACT ESP. TOXIC... ...NEW POWER GENERATION... ...EVIL FORCE ESP. JASON ELITE... ...FUZION ESP. DOCNO... ...TSB... BAD BOYS IN BELGUIM ESP. PETER... ...ALAN B... ...THE ELITE... CLOCKWORK ORANGE ESP. QUATRO.......   NORMAL GREETINGS GOTO   ...AUTOMATION ESP. MOB AND TBE... ...X-RATED ESP. PEDRO AND MYSTIC... THE UNTOUCHABLES ESP. MATT... ...LOTUS... ...GENESIS INC ESP. REMEREZ AND LAWZ... ...EGOTRIPPERS ESP. KEGGS... ...MAGNUM... ...TIMEWARP ESP. DR BAD VIBES... ...TITANIC TARZAN ON ICELAND... ...IENX ESP. IVO... ...RAEGUN... ...TERMINATORS ESP. VAMPIRE... ...CARL... ...PRESIDENT... ...MARK ANTHONY... ...TATTOO... ...SUPERIOR... ...NEXT... ...ULM... AND THE OVERLANDERS...   OK I AM OFF NOW TO DO ANOTHER MENU       SO UNTIL AWESOME MENU EIGHT I WILL LEAVE YOU TO READ MY BORING DRIVEL AGAIN AND AGAIN AND AGAIN AND AGAIN AND AGAIN.....   ...LETS WRAP...    BYEEEEEEEEEE                 "
Global TLen=Len(Scroll$)
Global Xmove=#xres
Global Letter=0
Global TVal
#FontWidth=128
#FontHeight=128
#ScrollSpeed=16
CreateSprite(1,640,128) ;draw font images on this sprite then display it on screen
CopySprite(1,3) ;make a copy to copy back !
CatchImage(1,?allfont) ;our ripped 128x128 font strip
CreateImage(100,128,128) ;space
;-======================================================================


Declare FlipSprite(SNUM)

Global MenuText$=""
MenuText$+ "COMPACT MENU #7     "
MenuText$+ "                    "
MenuText$+ "1. F-15 STRIKE      "
MenuText$+ "   EAGLE II         "
MenuText$+ "2. F-15 STRIKE      "
MenuText$+ "   EAGLE II DOCS    "

;CLEAR THE SCREEN
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "

MenuText$+ "3. WRECKERS         "
MenuText$+ "0. 50/60 HERTZ      "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "NOW LOOK BELOW AND  "
MenuText$+ "READ THE SCROLLER..."

;CLEAR THE SCREEN
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "
MenuText$+ "                    "



Global tm=ElapsedMilliseconds()

Global Awesome=CatchSprite(#PB_Any,?awe) ;Gold Awesome logo sprite
Global AwesomeFlipped=CopySprite(Awesome,#PB_Any):FlipSprite(AwesomeFlipped) ;Gold Awesome logo sprite flipped
Global AwesomeYPos.f=0
Global DataPos=1206-450
Global Counter=0

;disable backface culling for flipping sprites
Define d3d.IDirect3DDevice9
EnableASM
!extrn _PB_Screen_Direct3DDevice
!MOV dword EAX, [_PB_Screen_Direct3DDevice]
!MOV dword [v_d3d],EAX
DisableASM
#D3DRS_CULLMODE=22
#D3DCULL_CCW=1
;disable culling
d3d\SetRenderState(#D3DRS_CULLMODE,#D3DCULL_CCW)


Procedure FlipSprite(SNUM)
   SW= SpriteWidth(SNUM) 
   SH= SpriteHeight(SNUM)
; 1) 0,0 - 2) SW,0 - 3) SW,SH - 4) 0,SH   
; flipped  1 2 3 4 to 4 3 2 1
   TransformSprite(SNUM,0,SH,SW,SH,SW,0,0,0)
EndProcedure

Procedure MirrorSprite(SNUM)
   SW= SpriteWidth(SNUM) 
   SH= SpriteHeight(SNUM)
; 1) 0,0 - 2) SW,0 - 3) SW,SH - 4) 0,SH   
; mirrored 1 2 3 4 to 2 1 4 3
   TransformSprite(SNUM,SW,0,0,0,0,SH,SW,SH)
EndProcedure

Procedure MakeCopper() ;fake copper colours for ST !
CatchImage(1000,?copper) ;copper strip
ResizeImage(1000,640,(32*6)+20) ;6 rows of menu text + gaps
CreateImage(1001,640,(32*6)+20) ;blank image for drawing the copper effect on

CreateSprite(1001,640,(32*6)+20) ;also create a sprite to draw onto to show
TransparentSpriteColor(1001,#White)
CopySprite(1001,1002) ;make a copy

CreateSprite(2000,640,(32*6)+20)
TransparentSpriteColor(2000,#White)
CopySprite(2000,2001)

CatchImage(2000,?typefont) ;our ripped text typing font

Global CopperY=0
Global TypeX=0
Global TypeY=0
Global TypeLines=1 ;6=max
Global TypeLetter=1 ;20-max
Global TypeScreens=1 ;5=max
EndProcedure

Procedure DrawCopperOnImage() ;draw on copper image buffer 1001, the type text buffer image.  Draw it on sprite 1001

StartDrawing(SpriteOutput(1001))
DrawImage(ImageID(1000),0,CopperY)
DrawImage(ImageID(1000),0,CopperY+((32*6)+20))
StopDrawing()
CopperY-2
If CopperY=<-((32*6)+20):CopperY=0:EndIf ;move the copper screen up the image until it is reaches it's minumum position
DisplaySprite(1001,0,0)

EndProcedure

Procedure MakeBorders()
ClearScreen(RGB(0,0,160)) ;blue
Global BlueBorder=GrabSprite(#PB_Any,0,0,640,160) ;
EndProcedure

Procedure Scroller()
DisplaySprite(BlueBorder,0,362) ;display blue border
DisplayTransparentSprite(AwesomeFlipped,0,850-AwesomeYPos);display the gold awesome flipped logo
StartDrawing(SpriteOutput(1)) ;draw on the scroll sprite
For L=1 To 7 ;7 letters
TVal=Asc(Mid(Scroll$,Letter+L)) ;calculate hte correct character number
Select TVal
Case 65 To 90 ;A to Z
TVal-65
Default ;every other letter = space
TVal=100
EndSelect
GrabImage(1,2,TVal*128,0,128,128) ;grab our font character as an image from the ripped font strip
DrawImage(ImageID(2),Xmove+(L*#FontWidth),0)
Next L
StopDrawing()

DisplayTransparentSprite(1,0,222) ;display the sprite scroll
CopySprite(1,2) ;make a copy of it to flip
FlipSprite(2)
DisplayTransparentSprite(2,0,373) ;display it lower down
DisplaySprite(BlueBorder,0,470) ;display blue border at bottom of screen like the original


Xmove-#ScrollSpeed:If Xmove=-(#FontWidth*2):Xmove=-#FontWidth:Letter+1:EndIf
If Letter=TLen:Letter=0:Xmove=#xres:EndIf


EndProcedure

Procedure AwesomeBounce()
AwesomeYPos=PeekW(?ydata+DataPos)*1.5
DisplayTransparentSprite(Awesome,0,AwesomeYPos-225)
DataPos-4
If DataPos<=0:DataPos=1206-450: EndIf
EndProcedure

Procedure TypeText() ;draw the copper effect of a buffer, then draw the type text on another buffer and display it on the copper buffer

DrawCopperOnImage() ;draw the copper effect on the copper image buffer 1001

If ElapsedMilliseconds()-tm>60 ;only draw every other frame

StartDrawing(SpriteOutput(2000)) ;text typing sprite buffer
TypeletterVal=Asc(Mid(MenuText$,TypeLetter))-32 ;calculate the ascii value of out menu text letter
GrabImage(2000,3000,32*TypeletterVal,0,32,32) ;grab the correct font image from the strip
If IsImage(3000)
DrawImage(ImageID(3000),TypeX,TypeY,32,32) ;ok to draw it on our sprite buffer
EndIf
StopDrawing()
TypeLetter+1
TypeX+32
If TypeX=640
TypeX=0
TypeY+32+4
TypeLines+1
EndIf

If TypeLines=7
TypeLines=1
TypeScreens+1
TypeY=0
TypeX=0
EndIf

If TypeScreens=5
TypeX=0
TypeY=0
TypeLines=1
TypeScreens=1
TypeLetter=1
CopySprite(2001,2000)
EndIf

tm=ElapsedMilliseconds()
EndIf

DisplayTransparentSprite(2000,0,0)

EndProcedure



MakeBorders()
MakeCopper()

OSMEPlayMusic(?music,?musend-?music,1)

Repeat
If fs=0:event=WindowEvent():EndIf

ClearScreen(0)
TypeText() ;behind Awesome logo
AwesomeBounce() ;behind scroll text
Scroller() ;128 x 128 scroll text

FlipBuffers()
Until GetAsyncKeyState_(#VK_ESCAPE)
OSMEStopMusic()
End

Challenge Trophies Won:

Offline aNdy

  • C= 64
  • **
  • Posts: 92
  • Karma: 30
    • View Profile
Re: Cracktro Sources
« Reply #4 on: April 27, 2018 »
Thanks for source share (again!).

BTW, have sent you a couple of PM's.  Received?

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 361
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Cracktro Sources
« Reply #5 on: April 27, 2018 »
Thanks for source share (again!).

BTW, have sent you a couple of PM's.  Received?

Received.  ☺
Challenge Trophies Won:

Offline dr.zeissler

  • C= 64
  • **
  • Posts: 71
  • Karma: 0
    • View Profile
Re: Cracktro Sources
« Reply #6 on: April 28, 2018 »
hopefully I can setup a "compiling environment" in order to get these things to work on my machine.
thanks.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 361
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Cracktro Sources Atari Legend /Elite. Jeux De Dada
« Reply #7 on: April 28, 2018 »
hopefully I can setup a "compiling environment" in order to get these things to work on my machine.
thanks.

@Dr.Zeissler
Here's another one for you to test then to see if it works on your retro setups.
Challenge Trophies Won:

Offline dr.zeissler

  • C= 64
  • **
  • Posts: 71
  • Karma: 0
    • View Profile
Re: Cracktro Sources
« Reply #8 on: May 14, 2018 »
Thx! compiling environment is set. I purchased PureBasic and installed Version 4.61 on my PPC G4 MacMini OSX Panther 10.3.9.
That will be my machine for making/compiling 68k intros/cracktros to OSX/PPC. A platform which has none of this stuff.
Should be powerful enough for most of these things (G4-1.4Ghz, R9200/32MB)

Doc
« Last Edit: May 14, 2018 by dr.zeissler »

Offline dr.zeissler

  • C= 64
  • **
  • Posts: 71
  • Karma: 0
    • View Profile
Re: Cracktro Sources
« Reply #9 on: May 15, 2018 »
"OSME library" not available for OSX/PPC 
https://github.com/slippyex/OSME/tree/master/OSMEngine.v.0.92.source

Any "alternatives" known?
« Last Edit: March 11, 2019 by dr.zeissler »