Picture Drawing Malfunction
Author |
Message |
Monduman11

|
Posted: Sun Jun 06, 2010 2:00 pm Post subject: Picture Drawing Malfunction |
|
|
What is it you are trying to achieve?
add a new level to my game
What is the problem you are having?
the colours of the map are inverted. example , instead of being green its blue
Describe what you have tried to solve this problem
everything i can think of
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing: |
<Add your code here>
|
Please specify what version of Turing you are using
4.1.1 |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Cezna

|
Posted: Sun Jun 06, 2010 2:53 pm Post subject: RE:Picture Drawing Malfunction |
|
|
If you want meaningful advice instead of just shots in the dark, you have to post your code. The only thing I can think of without seeing you code is that you have your colour values wrong, or are trying to use colour not supported by Turing. |
|
|
|
|
 |
Monduman11

|
Posted: Sun Jun 06, 2010 3:07 pm Post subject: Re: RE:Picture Drawing Malfunction |
|
|
Cezna @ Sun Jun 06, 2010 2:53 pm wrote: If you want meaningful advice instead of just shots in the dark, you have to post your code. The only thing I can think of without seeing you code is that you have your colour values wrong, or are trying to use colour not supported by Turing.
ah srry heres the code.
Turing: |
if whatdotcolour (posx, posy + 24) = brightblue and chars (' ') then
map1 := false % this part is that if the character touches the colour blue and i press the space button then it makes map1 equal to false which draws the other map
z := 0
end if
%heres the drawing bit
proc MAIN
if map1 = true then % map1 start out true therefore drawing the below items, and when it is set to false it drawn the other map.
cls
Pic.Draw (map (2), z, 0, picCopy)
MOVEMENT
Pic.Draw (map (1), z, 0, picCopy)
Timer
Pic.Draw (sprite, posx - 10, posy - 7, picMerge)
Pic.Draw (map (3), z div 2, 0, picUnderMerge)
drawfillbox (1, maxy - 8, HP, maxy - 1, 10) %inside healthbox
if HP < 70 then
drawfillbox (1, maxy - 6, HP, maxy - 1, 43)
end if
if HP < 40 then
drawfillbox (1, maxy - 6, HP, maxy - 1, red)
end if
drawbox (1, maxy - 8, HL, maxy - 1, black) %health box outline
View.Update
elsif map1 = false then
cls
Pic.Draw (map (5), z, 0, picXor)
MOVEMENT
Pic.Draw (map (4), z, 0, picXor)
Timer
Pic.Draw (sprite, posx - 10, posy - 7, picMerge)
Pic.Draw (map (6), z div 2, 0, picUnderMerge)
drawfillbox (1, maxy - 8, HP, maxy - 1, 10) %inside healthbox
if HP < 70 then
drawfillbox (1, maxy - 6, HP, maxy - 1, 43)
end if
if HP < 40 then
drawfillbox (1, maxy - 6, HP, maxy - 1, red)
end if
drawbox (1, maxy - 8, HL, maxy - 1, black) %health box outline
View.Update
end if
end MAIN
|
|
|
|
|
|
 |
Monduman11

|
Posted: Sun Jun 06, 2010 5:05 pm Post subject: Re: Picture Drawing Malfunction |
|
|
no one? |
|
|
|
|
 |
TheGuardian001
|
Posted: Sun Jun 06, 2010 5:35 pm Post subject: Re: Picture Drawing Malfunction |
|
|
If the level you're drawing is a picture, we'll need that too.
If I had to guess, I'd say it probably has something to do with you using the picXor image mode, which draws inverted colours if you don't draw it directly on top of itself (which you aren't, since you also used cls.)
If it's not that, I'd advise posting the full code so we can test it for ourselves. |
|
|
|
|
 |
Monduman11

|
Posted: Sun Jun 06, 2010 5:49 pm Post subject: Re: Picture Drawing Malfunction |
|
|
TheGuardian001 @ Sun Jun 06, 2010 5:35 pm wrote: If the level you're drawing is a picture, we'll need that too.
If I had to guess, I'd say it probably has something to do with you using the picXor image mode, which draws inverted colours if you don't draw it directly on top of itself (which you aren't, since you also used cls.)
If it's not that, I'd advise posting the full code so we can test it for ourselves.
ah thank you soo much it was the picXor thing. i had completely forgoten that i had tried it with PicXor sometimes earlier. but yea it is working now thanks for all your help you guys greatly appreciate it... a few more weeks and ill be submiting the game on the site... just not yet cause i dont want my teacher to accuse me of copying it from this site if she were to see it . thanks again for all your help |
|
|
|
|
 |
|
|