This site is no longer active and is available for archival purposes only. Registration and login is disabled.

EasyCE 1.6 Sample


EasyCE 1.6 Sample

Postby Magnum » Mar 2, 2002 @ 6:25am

This is probably a question that has already been answered but I didn't see it so here goes....

The 1.6 sample draws a diagonal line and particle effect. I modified the line command to say:

line( IFP( 10 ), IFP( 10 ), IFP( 230 ), IFP( 310 ), 0xFFFF );

but it doesn't draw to those coords, it stops around 240 vertical. I pasted in the old 1.5 line code and it draws correctly using the non-fixed point math.

So, my question is this something that has been/needs to be fixed or did I goober it?

Thanks in advance!
User avatar
Magnum
pm Member
 
Posts: 7
Joined: Mar 2, 2002 @ 6:19am
Location: Cedar Rapids, IA


Postby Dan East » Mar 2, 2002 @ 6:44am

I'm not very familiar with EasyCE, but does the line function accept fixed point values? If not then the results would certainly not be what you desire.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Magnum » Mar 2, 2002 @ 1:44pm

User avatar
Magnum
pm Member
 
Posts: 7
Joined: Mar 2, 2002 @ 6:19am
Location: Cedar Rapids, IA


Postby Magnum » Mar 2, 2002 @ 2:07pm

I think I've got it now ... did some more research in the forum and found a post for the "new fast line" algorithm:


It is tailored for 320x240 and as the post says, "...As-is it works in 320x240 mode so you will have to make slight changes to make it work with 240x320/whatever you use mode. ..."

I suspect the code in EasyCE is using this without "adjustments". There is code in the line routine that is hard-coded for 240 and 320 -- probably will need to make those vars and flip them depending on the LANDSCAPE value. I suspect the line_x and line_a may have the same issue?
User avatar
Magnum
pm Member
 
Posts: 7
Joined: Mar 2, 2002 @ 6:19am
Location: Cedar Rapids, IA


Postby MirekCz » Mar 2, 2002 @ 2:20pm

hmm, it's build on my line code, just check where x ends (240 or 320) in landscape/non-landscape mode. This will tell you if it's ok or not for your needs. If it's not you will just have to exchange the 240 and 320 values and it should work fine then.
Also check if the pixel is saved to correct position.
With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Postby Dan East » Mar 2, 2002 @ 3:10pm

Okay, maybe I'm just really confused here. In the sample code you give, line ends up being called as follows:
line( 10240, 10240, 235520, 317440, 0xFFFF );

That is with FPP defined as 10, and not 0x10. Again, I am not familiar with EasyCE, but the line routine should be taking standard X, Y coordinates as plain old integers, and not fixed point. Are those coordinates above really what you want? Is your bitmap really 235520 pixels wide by 317440 pixels tall?

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby billcow » Mar 2, 2002 @ 7:52pm

Most people don't know that "A highly technical term" is actually a highly technical term used to describe something that doesn't mean anything
User avatar
billcow
pm Member
 
Posts: 81
Joined: Jan 6, 2002 @ 12:22am
Location: Dryden, NY


Postby Magnum » Mar 2, 2002 @ 9:56pm

User avatar
Magnum
pm Member
 
Posts: 7
Joined: Mar 2, 2002 @ 6:19am
Location: Cedar Rapids, IA


Postby Magnum » Mar 2, 2002 @ 10:02pm

User avatar
Magnum
pm Member
 
Posts: 7
Joined: Mar 2, 2002 @ 6:19am
Location: Cedar Rapids, IA


Postby Dan East » Mar 3, 2002 @ 2:18am

There is a maximum width a source block can achieve. At this time the height is not restricted, although that will probably change in the near future.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Guest » Mar 3, 2002 @ 2:37am

I think there is an error in the in the function for the line. The limit checking is reversed so x can go to 320 and y to 240. Hope this helps.
Guest
 


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum