Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Kaiser

Deth/source code-How to implent line drawing?

Recommended Posts

I would like to make a modifed version of Deth but I want to add line drawing and line/sector spitting (by drawing a line then right click to split or make a sidedef)

I know I won't get no response but I would still appriciate if anyone can help me with it.

Thanks.

Share this post


Link to post

I would like to make a modifed version of Deth but I want to add line drawing and line/sector spitting (by drawing a line then right click to split or make a sidedef)

It already does line spitting if you put a vertex on a line. It also has sector splitting.

So what you do it add code to drive those routines.

Now the linedrawing will be a whole new set of code. You use the graphics instructions for drawing lines - exactly the same ones used already to draw the map!

When a person makes a vertex (when starting out) - you use the above mentioned code above to split the line. Don't prompt - just do it!

I think DMAPEDIT source will also show you how to do this? Don't recall for sure, but I think that line draws. However, the basics are pretty simple. The hard part is how to assign correct sector values to the sidedefs - or you could just assign the next new sector - as now - and the user comes back and changes it.

P.S. Didn't explain something: One way you can erase the "drawn" lines is XOR draw as the user moves the cursor.

So after initiating whatever is the "linedraw" command;

1. get the position of the cursor to "start" drawing (with the 1st click or whatever),
2. as the cursor moves that becomes a "temporary" new draw location
3. and as the user moves, you erase the old line and then draw a new line.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×