No - only when explicitly passed as a parameter to a library call.Basically can dlls see Globals?
This is a property of the object being drawn on, not of the language. I'm not a graphics person and don't know how this works. I also don't know how the forelayer works in B4PPC. The form background is available to a library by the form image property - whether that image also contains the merged forelayer I don't know. I'd draw on a bitmap from the imagelib library displayed in an image control using only setpixel and getpixel. That gives you a chance to later do the same things with the same logic but as low level pixel work in a library.Does the transparency function work in C,
Well, it's made a little easier on the DS. A 128x96 sandbox at 8-bit accuracy takes less than a sixteenth of a frame to clear with a couple of tricks. You could apply some of these tricks, such as addressing the sandbox array twice - once in 8-bit (or whatever you use normally) and once in 32-bit (or as big as possible) and then wipe it clean in 32-bit chunks. That pretty neatly divides the time taken by four, as it's a 32-bit processor, meaning that it's working in its native size and has a shorter list of instructions to work with.
// EXEC ShootProjectile StartX StartY Speed Element Aiming ShootType Radius DrawType ReplaceElement StopType
// EXEC ShootProjectile $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
TRIGGER ShootProjectile {
IF ($0 > -10) {
IF ($4 == 0) <SET tmpX ($0 - X)>
IF ($4 == 0) <SET tmpY ($1 - Y)>
SET tmp (SQRT ((tmpX * tmpX) + (tmpY * tmpY)))
}
EXEC MoveProjectile ($0 * 50) ($1 * 50) ((tmpX * ($2 * -50)) / tmp) ((tmpY * ($2 * -50)) / tmp) $3 $7 $8 $9 $6 $5
SET StopVar 0
}
TRIGGER MoveProjectile {
SET FlyX (($0 + $2) / 50)
SET FlyY (($1 + $3) / 50)
SET StopMoving 0
IF (($0 / 50) > WIDTH) <SET StopMoving 1>
IF (($1 / 50) > HEIGHT) <SET StopMoving 1>
IF (($0 / 50) < 0) <SET StopMoving 1>
IF (($1 / 50) < 0) <SET StopMoving 1>
IF ($9 == 0) {
IF ($5 == 0) <DRAW $4 LINE FlyX FlyY ($2 / 50) ($3 / 50)>
IF ($5 == 1) <DRAW $4 REPLACELINE FlyX FlyY ($2 / 50) ($3 / 50) 0 $6>
IF (($7 == 0) && (StopMoving == 0)) <TIMER 1 FRAMES MoveProjectile ($0 + $2) ($1 + $3) $2 $3 $4 $5 $6 $7 $8 0>
IF (($7 == 1) && (StopMoving == 0) && (StopVar == 0)) <TIMER 1 FRAMES MoveProjectile ($0 + $2) ($1 + $3) $2 $3 $4 $5 $6 $7 $8 0>
}
IF ($9 == 1) {
IF ($5 == 0) <DRAW $4 FILLEDCIRCLE FlyX FlyY $8>
IF ($5 == 1) <DRAW $4 REPLACEFILLEDCIRCLE FlyX FlyY $8 0 $6>
IF (($7 == 0) && (StopMoving == 0)) <TIMER 1 FRAMES MoveProjectile ($0 + $2) ($1 + $3) $2 $3 $4 $5 $6 $7 $8 1>
IF (($7 == 1) && (StopMoving == 0) && (StopVar == 0)) <TIMER 1 FRAMES MoveProjectile ($0 + $2) ($1 + $3) $2 $3 $4 $5 $6 $7 $8 1>
IF (StopMoving == 1) <DRAW ELEMENT:Clear REPLACEFILLEDCIRCLE 0 0 (WIDTH * 2) 0 $4>
}
}
The answer is probably not. That technique only works for single byte per pixel 256 colour bitmaps which you probably won't find on a PPC .NET image or control. I'm pretty sure that pixels are 32bit integers on PPCs to support RGB colour, although the underlying displays usually can't handle the full gamut and the program specified values are often rounded to what the display can support. That kind of code requires pointers which you could only implement in a B4PPC library using "unsafe" C# or unmanaged C++ code.On another forum I go on someone else was having the same sort of problem as we are having and he got the reply of ...
Would that work with a PPC?
BS I dont know the Moding language - can u explain it?
I think if its complicated it defeats the whole object! How hard is it?
Group Stones 100 File stonegroup.bmp // Shows the picture "stonegroup.bmp" from the "Img" folder //
Group Metals 200 Text Metal // This makes it say "Metal" //
// Icon/Text same for all Elements too //
Element Stones Sand 230 180 0 900 1 1 1 0 Clear 400 File sand.BMP
Element Stones Glass 255 255 255 0 1 1 1 0 Clear 300 Text Glass
Interaction Salt Water Clear Saltwater 10000
Interaction Saltwater Fire Salt Fire 30000
Interaction Saltwater Fire Water Fire 30000
Its an interesting idea updating the pixel positions independently of re-plotting them -I can see the logic in that. The only problem is that in the current design the code looks at the colour of the screen pixel where the grains going to move, to determine what interaction to do. Therefore the screen does need to be updated each time.
Thanks for the idea tho.
By the way Random, I was looking at ur SplatMaster game as want to get my head round the transparency fn, curious why does the cathead icon leave a line of pixels when it moves -(did that when I ran it on my machine - dont know if uve noticed?)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?