BBC BASIC for Windows
« BMPTOCODE :A sky full of rating stars (ART) »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:06pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BMPTOCODE :A sky full of rating stars (ART)  (Read 231 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
xx BMPTOCODE :A sky full of rating stars (ART)
« Thread started on: Mar 22nd, 2016, 10:21am »

By now you probably notice I have a interest in making graphics with just code..

This is a product of an old program I made named BMPTOCODE..
1) It first loads a BMP image and then converts the image into compressed file code (3 levels of compression)
2) it then GENERATES a fully functional program.. (its this easy)

BMPTOCODE was a hard project and it has its place in history as the first BMP image to code converter (I could be wrong)

As BMPTOCODE used windows APIs, this is only a converted showcase
Code:
     
 REM VDU 22,8
      REM VDU 23,23,2|
      MODE 8
      OFF
      GCOL 1

      FOR loop= 1 TO 100
        h= 200
        v= 200
        x=0:r=0:g=0:b=0
        y=0
        u=0
        c=0
        t=0
        nst$=""
        ost$=""
        c=0
        a=0
        col=0
  
        h= RND(1500)
        v= RND(1000)
        PROC_star(h,v)
        RESTORE
      NEXT loop
      WAIT 0
      (quit)

      END

      DEF PROC_star(h,v)
      READ x,y

      (beg)
      READ nst$,t
      IF nst$="100000" THEN GOTO (jump)
      IF nst$="0" THEN  col=0   REM black
      IF nst$="3" THEN  col=8   REM gray
      IF nst$="b" THEN  col=9   REM red
      IF nst$="h" THEN  col=15  REM white
      IF nst$="i" THEN  col=3   REM yellow

      GCOL col
      FOR u=0 TO t
        a=a+1: MOVE h+c,v-a:DRAW h+c,v-a:IF a>x  THEN c=c+1:a=0
      NEXT u
      GOTO (beg)
      (jump)
      DATA 16,16
      DATA 0,5,b,0,0,15,b,1,0,14,b,0,h,0,b,0,0,13,b,0,i,0,b,0,0,4,b,1,0,6,b,0,i,1,b,0,0,0,b,3,0
      DATA 7,b,0,i,2,b,0,h,0,i,1,b,0,0,7,b,0,i,5,b,0,0,5,b,2,i,5,h,0,b,0,0,3,b,1,h,1,i,6,b,0
      DATA 0,6,b,2,h,0,i,5,b,0,0,8,b,0,i,2,h,1,i,0,b,0,0,8,b,0,i,1,h,0,b,0,h,2,b,0,0,7,b,0,i
      DATA 0,h,0,b,0,0,0,b,3,0,7,b,0,h,0,b,0,0,4,b,1,0,6,b,0,h,0,b,0,0,13,b,1,100000,0
      ENDPROC
 
« Last Edit: Apr 21st, 2016, 10:37pm by michael » User IP Logged

I like making program generators and like reinventing the wheel
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls