Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Serious problem!! Please HELP!

Author
Message
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 23:30

Hello!

I'm writing a 2D colouring book program for children that I originally wrote on the Amiga using Amos.

I have two problems at the moment which I have found out after writing half of the program allready!!!!!


1st problem: ****************************
I have created an OOPS! button and so I need to memorise the colouring area of the screen before going any further so you can go back to the last point.
For this I have created a bitmap screen (4) that I'm using as the oops screen. I can copy from bitmap 4 to 0 but when I try to copy bitmap from 0 to 4 the program just ends and it wont do it.
Here is what my command is:

bitmap 0 is 800 x 600
bitmap 4 is 640 x 430
areax= area x start
areay= area y start
areaw= area width
areah= area height


copy bitmap 0,areax,areay,areax+areaw,areay+areah,4,0,0,639,429

this ends the program!!!!!!!!

copy bitmap 4,0,0,639,429,0,areax,areay,areax+areaw,areay+areah

this copys a black image obviously because there is nothing on it!!

*********************************************

2nd problem: *****************************
I can not find anywhere a command to fill an area of the screen!!!!
Obviously this is a vital element to my game as without it how can I even do a 2D colouring book program!!!!!

On Amos I used the command Paint x,y
This filled an area of the screen at co-ords x,y using the current ink.

How come DB Pro doesn't have this facility?
or Does it??????
It has basic drawing facilities but no fill?????
or is it Patch 4 error????

I will be sooooooooooo gutted if I can't do this simplest of commands for obvious reasons.
I bought DB Pro because I thought it was very similar lines to Amos Pro by the same programmer, and so far it has been the case but now my kids are going to be soooo dissapointed if I can't finish this program for them!!!!!

Please can anyone help????
Rich?????? Help again???

New to DBPro comin from AMOS on the Amiga!
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 5th May 2003 23:42
I think you can get around the copy bitmap problem by using

make memblock from bitmap 1, 0
and then
make bitmap from memblock 4, 1

Secondly there is no fill command in DBpro, you will have to write the code yourself, or get someone helpfull to do it for you.

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th May 2003 00:44
Hello, helpful person here!

The code for a floodfill is in tghe source box.
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 02:12
Thanks for the help u2, by the way whats "tghe source box" ?

Badly need the flood fill!!!



New to DBPro comin from AMOS on the Amiga!
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 02:28

Oooops sorry m8!

Just realised the source button, I am sooooo panicin!!! lol

Gona check it out now m8

l8rz

p.s. hope it works

New to DBPro comin from AMOS on the Amiga!
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th May 2003 02:28
'tghe source box' translates to english as 'the source box'! You will notice under IanM's post is a button labelled 'source'.

A slightly modified version of his code with demo on how to use it below in code snippet and in source box. All I have done is removed the need for global variables and types to make it easier to understand and implement.



Gronda, Gronda
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 03:48


Thankyou both so much for your help with the flood fill, think I maybe still doin something wrong?
On big areas it seems to take a few seconds and sometimes it quites out of the program, is this something I've done wrong or just the way DB Pro with patch 4 is doin things?

Thanks again though, kids gettin a bit happier now!!
x-d x-d

All I've gota do now is try the screen copy!!!

New to DBPro comin from AMOS on the Amiga!
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 04:09
Nice one!!!

The mem block worked a treat!!!!!!!!!

All I can say guys is that you are a credit to this forum!!
I posted this message as I was really fed up and the same day I an answer to both the problems!! Thankyou all very much!



New to DBPro comin from AMOS on the Amiga!
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 04:13
hmmmmm

One more thing, my kids are asking me if I can get the pictures to print out!!!! They never happy eh! (Good software testers though!! LOL )

Anyone know how to print out from a bitmap?

New to DBPro comin from AMOS on the Amiga!
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 6th May 2003 16:30
there is a print dll about, but I think that just prints text, if you want to print the image from a DB program then hide the toolbars or whatever and press print screen on your keyboard and then exit and paste into a graphics package and print, DB was intended for games realy, so it`s not it`s fault you can`t write a DTP package in it (IMO).

Mentor.

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th May 2003 16:39 Edited at: 6th May 2003 16:40
Yes, my printers plug-in will only print text to a printer...
If enough people want to print graphics, then I might add it in.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th May 2003 17:50
Re: Fill problem

I believe MrTAToad could feasibly write a plugin utilising the GDI32 built-in flood fill routines FloodFill & ExtFloodFill

Program crashes if fill area too complex as it is a recursive program calling itself and crashes if goes too many levels deep. I'll try re-writing it a different way

Gronda, Gronda
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 6th May 2003 20:58
ok nice one m8!

Hey MrTAToad I would love to see the print .dll for bitmaps, for my usage I'm looking for copying part of the main bitmap to an image then printing out the image file!

Would be great if you could do that m8, also you think it possible to do a flood fill .dll?

How do you use the .dll files once done??

Do you load them in then use them as a normal command???

Commands like:

Paint x,y,col

Print ImageNumber or

Print bitmap number,x,y,x1,y1

These would be great commands!!!!!


By the way Mentor, I'm not trying to make a DTP package!!!!!
Just a childrens colouring book program!!!
You can only colour using 16 colours!!!

If I can get the above 2 commands I will credit the person who writes them in the finished code which will be available for a free download of my site!!!

l8rz

New to DBPro comin from AMOS on the Amiga!
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 7th May 2003 02:07
My program is nearing completion, looks like I will have to put on hold until I can get some use of Paint and Print?

Will give me a bit of time to draw the pictures to colour in though!



New to DBPro comin from AMOS on the Amiga!
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 7th May 2003 06:00
It seems your questions have already been answered but I thought i'd clear something up.

Quote: "Amos Pro by the same programmer"


If my memory served me correct AMOS was written by Francois Lionet (no unicode on forum so accents ommitted), who I think was Belgian and released by Europress Software.

Lee and Mike don't come out in public much - but when last heard didn't speak like a scratched 33 1/3 played at 45 with elongated vowels so i'm pretty sure arn't responsible for the blue screen of orangeness or the maker of guru's itself - the cycloptic cyan of Amos Pro.

Pneumatic Dryll
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 7th May 2003 17:32
I know Lee Bamber didn't write the full code for Amos but aparentley he did work on it, correct me if I'm wrong Lee.

Read the review in the Edge magazine where DB Pro is, it says quote

"Amos Pro where Lee Bamber cut his teeth..........."

New to DBPro comin from AMOS on the Amiga!
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 7th May 2003 17:35
That means its the language he first learned to program with (like some of you guys here with DB). He didn't work on AMOS, he worked WITH it.

He did however do lots of the example game code for Click and Play, The Games Factory, etc.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
SpecTre1
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 8th May 2003 00:10
Oh nice one mate!

I guess I'm cutting my teeth as well then!! lol

Did he use Flood Fill and Print a lot in Amos! LOL LOL

Don't take all this seeming to be bitchin to personally by the way, as it's not bitchin just expressin my feelings.

The DB Team are very cool and helpful.

New to DBPro comin from AMOS on the Amiga!

Login to post a reply

Server time is: 2026-07-11 02:13:49
Your offset time is: 2026-07-11 02:13:49