Page 1 of 1

Bitmap help =)

Posted: Tue Sep 04, 2007 4:36 pm
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.

Posted: Tue Sep 04, 2007 4:38 pm
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,1,1,1,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,4,4,0,0,4,4,0,0
DATA 4,4,4,4,4,4,4,0,1,1,0,0,0,0,0,0,4,4,0,0,0,4,4,0,1,1,1,1,1,1,1,0,0,0,4,4,0,0,0,0,1,1,1,1,1,1,1,0,0,0,4,4,0,0,0,0,1,1,1,1,1,0,0,0,0,4,0,0,4,0,0,0
DATA 4,4,0,0,0,0,0,0,1,1,1,1,1,1,1,0,4,4,0,0,0,4,4,0,1,0,1,1,1,0,1,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,4,4,4,4,4,4,0,0,1,1,1,0,0,1,0,0,0,0,4,4,0,0,0,0
DATA 4,4,0,0,0,0,0,0,1,1,1,1,1,1,1,0,4,4,4,4,4,4,4,0,1,0,0,1,0,0,1,0,0,0,4,4,0,0,0,0,0,1,1,1,1,1,1,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,0,0,4,4,0,0,0,0
DATA 4,4,0,0,0,0,0,0,1,1,0,0,0,1,1,0,4,4,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,0,0,4,4,0,0,0,0
DATA 4,4,4,4,4,4,4,0,1,1,0,0,0,1,1,0,4,4,4,4,4,4,4,0,1,0,0,0,0,0,1,0,0,0,4,4,0,0,0,0,1,1,1,1,1,1,1,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,0,0,4,4,0,0,0,0
DATA 4,4,4,4,4,4,4,0,1,1,0,0,0,1,1,0,4,4,4,4,4,4,4,0,1,0,0,0,0,0,1,0,0,0,4,4,0,0,0,0,1,1,1,1,1,1,0,0,0,0,4,4,0,0,0,0,1,1,0,0,0,0,0,0,0,0,4,4,0,0,0,0

Posted: Tue Sep 04, 2007 4:42 pm
by Raspberrypicker
ok, well my program is much too long to post on the board, so i just posted my where my problem is

Posted: Tue Sep 04, 2007 4:59 pm
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.

Posted: Tue Sep 04, 2007 5:03 pm
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

Posted: Tue Sep 04, 2007 5:15 pm
by Raspberrypicker
:( still not working

Posted: Wed Sep 05, 2007 3:45 am
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.

Posted: Wed Sep 05, 2007 1:55 pm
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

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

Posted: Wed Sep 05, 2007 3:19 pm
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...

Posted: Wed Sep 05, 2007 3:49 pm
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.

Posted: Wed Sep 05, 2007 4:12 pm
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.

Posted: Wed Sep 05, 2007 5:35 pm
by Raspberrypicker
ummmmmmm....sorry

do you like the new title? :lol:

Posted: Thu Sep 06, 2007 1:07 pm
by Patz QuickBASIC Creations
Much better :)

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

Posted: Sat Sep 08, 2007 9:39 am
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?