Bitmap help =)

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Bitmap help =)

Post by Raspberrypicker »

Honestly I've been trying to get this bitmap to work for like four days, and it's the only problem I'm running into...and I can't let myself work on something else until I get this under control. I've tried everything, and I even went back to the turtorial, but still no luck. :cry:

I need to write the word Chemistry on my menu screen. I am using a bitmap. The point of me making this program was so that I could study for my test (good idea, right?) but it's taking longer than expected and the test is tomorrow, lol. Well at least I kno the stuff by now :)

Plz help if you can...and check out the rest of the program, about half of it works so far. When I get this bitmap problem done, I will finish.
Last edited by Raspberrypicker on Wed Sep 05, 2007 5:33 pm, edited 1 time in total.
Fruit Pickin'
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

DECLARE SUB elements (elementa$(), element$(), answer$(), wrong$())
DECLARE SUB flashcards (elementa$(), element$(), answer$(), wrong$(), percentage%, taken%)
DECLARE SUB flashloop (elementa$(), element$(), answer$(), wrong$(), percentage%, taken%)
DECLARE SUB elements2 (elementa2$(), element2$(), answer2$(), wrong2$())
DECLARE SUB flashcards2 (elementa2$(), element2$(), answer2$(), wrong2$(), percentage2%, taken2%)
DECLARE SUB flashloop2 (elementa2$(), element2$(), answer2$(), wrong2$(), percentage2%, taken2%)
DECLARE SUB periodictable ()
DEFINT A-Z
DECLARE SUB mouse (cx, dx, bx)
DECLARE SUB MousePointer (SW)

DIM SHARED a(1000)
DIM elementa$(59), element$(59), answer$(59), wrong$(59)
DIM elementa2$(118), element2$(118), answer2$(118), wrong2$(118)
elements elementa$(), element$(), answer$(), wrong$()
elements2 elementa2$(), element2$(), answer2$(), wrong2$()

DEF SEG = VARSEG(a(0)) 'some messy assembly code i don't really understand

FOR i = 0 TO 17
READ r
POKE VARPTR(a(0)) + i, r
NEXT i

DATA &HB8,&H00,&H00
DATA &H55
DATA &H8B,&HEC
DATA &HCD,&H33
DATA &H92
DATA &H8B,&H5E,&H06
DATA &H89,&H07
DATA &H5D
DATA &HCA,&H02,&H00

SCREEN 13

CALL MousePointer(0)
CALL MousePointer(1)
CALL MousePointer(3)

' ***********************************************************************************************************************

DIM block0(50), block1(50), block2(50)
DIM title1(50, 7)
SCREEN 13
CLS

FOR y = 1 TO 2
FOR x = 1 TO 2
READ clr
PSET (x, y), clr
NEXT
NEXT
GET (1, 1)-(2, 2), block0

FOR y = 1 TO 2
FOR x = 1 TO 2
READ clr
PSET (x, y), clr
NEXT
NEXT
GET (1, 1)-(2, 2), block1

FOR y = 1 TO 2
FOR x = 1 TO 2
READ clr
PSET (x, y), clr
NEXT
NEXT
GET (1, 1)-(2, 2), block2

CLS
FOR y = 1 TO 7
FOR x = 1 TO 50
READ title1
NEXT
NEXT



DO

FOR y = 1 TO 7
FOR x = 1 TO 50 'can't fit the whole word (shud be 72), I'll fix it later
IF title1(x, y) = 1 THEN PUT (x * 2, y * 2), block2 'places blue block
IF title1(x, y) = 4 THEN PUT (x * 2, y * 2), block1 'places red block
IF title1(x, y) = 0 THEN PUT (x * 2, y * 2), block0 'places black box, but seems to overpower everthing else, lol
NEXT
NEXT


'The menu screen
CALL mouse(cx, dx, bx)

LINE (30, 50)-(260, 70), 7, B
LOCATE 8, 8
PRINT "Flashcards (set 1)"
IF bx = 1 THEN
IF dx > 30 AND dx <260> 50 AND cx <70> 40 AND dx <270> 90 AND cx <110> 50 AND dx <280> 130 AND cx <150> 60 AND dx <290> 170 AND cx < 190 THEN
CLS
LOCATE 11, 15
PRINT "Bye Bye"
END
END IF
END IF
END IF

LOOP

DATA 0,0
DATA 0,0

DATA 4,4
DATA 4,4

DATA 1,1
DATA 1,1

'My title which says Chemistry
DATA 4,4,4,4,4,4,4,0,1,1,0,0,0,0,0,0,4,4,4,4,4,4,4,0,0,1,0,1,0,1,0,0,0,0,4,4,0,0,0,0,0,1,1,1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

ok, well my program is much too long to post on the board, so i just posted my where my problem is
Fruit Pickin'
Anonymous

Post by Anonymous »

Code: Select all

CLS
FOR y = 1 TO 7
FOR x = 1 TO 50
READ title1
NEXT
NEXT 
should be

Code: Select all

CLS
FOR y = 1 TO 7
FOR x = 1 TO 72 'must be 72 cause thats how long the data is
READ title1
NEXT
NEXT 
it doesn't jump to the next line when you change y, it just goes to the next piece of data.
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

wow, is that the only problem. :P

the only reason i did that is cuz it didn't all fit, so i was just testing it to see that it actually showed up :oops:

thanx alot m8
Fruit Pickin'
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

:( still not working
Fruit Pickin'
Anonymous

Post by Anonymous »

Well you need to fix a couple of other things

Code: Select all

FOR y = 1 TO 7
FOR x = 1 TO 72
READ title1
NEXT
NEXT
should be, (notice the (x,y) very important)

Code: Select all

FOR y = 1 TO 7
FOR x = 1 TO 72
READ title1(x,y)
NEXT
NEXT
Dim title1(50,7) needs to be Dim title1(72,7)

Also don't forget to change the for x = 1 to 50 to 72 in the part where it draws title1

I think that is all I had to change.
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

should be, (notice the (x,y) very important)

Code: Select all

FOR y = 1 TO 7
FOR x = 1 TO 72
READ title1(x,y)
NEXT
NEXT

You're a genius! thanx a million :D :D :D
Fruit Pickin'
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Re: OMG plz plz plz help me before i go insane

Post by Patz QuickBASIC Creations »

Raspberrypicker wrote:OMG plz plz plz help me before i go insane
It's times like this that I wish we had more moderators, ever since Z!re seems to have left...
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

DOn't judge a post by it's title ;-).

This one was genuine. He/She showed he worked on it, had code, everything. Hence as a mod, I saw no reason to remove it.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations »

I didn't want to remove it, I just find it annoying that the title doesn't really specify what kind of help he needed. The title OMG OMG I R NUBZ HALP !!!!11 isn't really constructive.
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

ummmmmmm....sorry

do you like the new title? :lol:
Fruit Pickin'
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations »

Much better :)
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Re: OMG plz plz plz help me before i go insane

Post by sid6.7 »

Patz QuickBASIC Creations wrote:
Raspberrypicker wrote:OMG plz plz plz help me before i go insane
It's times like this that I wish we had more moderators, ever since Z!re seems to have left...
we have 2, what seems to be the problem?

i thought it was rather funny.... :)

really if you look back through the last 50 topics in each forum
this is really the only one witha non-specifc title....

has there been a plauge of non-specific titles we've mised?
Post Reply