Jump to content
SubSpace Forum Network

Recommended Posts

Posted

You also copied the -1 tiles, when you rotate to the destination, and searchobject tries to look for the left top of the -1 tiles, but there doesn't exist a left top, thats why you got the error. Change this

 

'Retile the new selection with corresponding tiles
For j = newselstarty To newselendy
	For i = newselstartx To newselendx
		'this if is required to not copy the -1 tiles to the destination !
		If tmptile(seltilestartx + (j - newselstarty), seltilestarty + (newselendx - i)) <> -1 Then
			Call parent.setTile(i, j, tmptile(seltilestartx + (j - newselstarty), seltilestarty + (newselendx - i)), undoch)
			Call parent.UpdateLevelTile(i, j, False)
		End If
	Next
Next

 

 

And rotation will work

  • Replies 219
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Bondary Fill Algorithm

 

but how the !@#$%^&* can I do that with the Ellipse??? triggering a bucket fill in its center wouldnt work... and im not sure to understand fully that math equation to calculate where to draw lines in the ellipse

 

well i hope you knew, gonna ask it on visual basic forum again :/

Posted
why make a form for it ? you can add an icon for rotating selections in the toolbar the job's done blum.gif

 

just a small form to select rotate left / right 90 / 180 / 270 degrees... rotating 180 degrees by using rotation twice wipes out alot of tiles... so it could cause a problem... of course rotating 270 degrees right will do the same as rotating 90 degrees left.. blum.gif

Posted

don't wipe the tiles then, only the objects :/

 

This is exactly the reason why it would be much easier if selection has it own layer, rather than using a picclipboard, as the data is editable without changing anything to the map until the selection has been applied :( i should have implemented it that way :(

Posted

and THERE...

 

-options menu, in which you can toggle options... some new options:

- Fill shapes fully , that means when ON, filled shapes will be filled entirely, when OFF, it will NOT fill where there are tiles already... try it out... it's neat smile.gif

- Paste / selection clipping... like.. when dropping a selection (pasted or moved) , it allows you to...... oh wait i'm not even sure what it does... doh its not doing exactly what i want it to... but its still nice:

You can paste stuff UNDER existing tiles, which means existing tiles are not overwritten...

 

I wanted to actually make it paste tiles over existing tiles, but without pasting empty tiles... This could be compared to 'transparency' ... empty tiles would be ignored... hm... i'll fix that later ... both options would be nice as well I guess (only one at a time could be activated of course)

 

 

( If you know of any better name to give to those options.. go ahead)

 

 

All options can now be toggled either by the top toolbar, or by the options menu (that gave me quite a lot of trouble... bleh)

 

FILLED ELLIPSE WORKS >=D

 

however, filled rectangle / ellipse scripts arent that efficient... I made it 'DrawLine' for EACH separate pixel, individually, so the 'fill shapes fully' feature could work... that made things much easier, but its kinda slow... nothing I cant handle tho.

 

 

 

Things to do:

- Check for > 64 wormholes / > 128 flags ... SSME does it, I think those 2 conditions might crash the game... or maybe that was just with Subspace client... need to test

- some bug when moving selection under special objects... sometimes they still get tiles over them... bleh too tired to fix now

Posted
I improved the tiles switch/replace interface... you can now change tiles from the replace form... it's neat... also made it impossible to replace special tiles... which could create lots of bugs I guess. Will post new version soon
Posted

something's wrong with 'Cut' ... it crashes every time... and I don't think I have changed anything related to it... I don't know if previous versions did it as well...

 

Normal / Transparent / Under selection moving/pasting is now fully functionnal...

 

I have no idea how to fix the 'cut' tho...

Posted

OK... Releasing what I have tweaked so far, including redone Switch / Replace interface, some fun options, bug issues fixed here and there... no walltiles yet though blum.gif . I've fixed all I wanted to fix for now, so walltiles will be next...

 

[edit: fixed attachment... default.bmp was missing]

Posted

no, unless sam implemented that. I didn't do that because i haven't got a clue what ASSS regions and ELVL are blum.gif

 

And about the cut thing, did you select a large area, cutting or copying a large area is so ineffective it could take hours to copy the full map to the clipboard.

 

Try creating a string

dim str as string

str = String(1000000, chr(0))

 

and then replace the parts in the string, like the first 10 chars instead of adding a parts of the string,

 

i know what the problem is, i don't know how to solve it properly.

 

The problem is this:

keep in mind that everytime you do

 

s = s + "blahblah" copies the entire string s added with "blahblah" to a new string. So if s becomes very very veerrrrrrrry large, which it will, the copy overhead is so large that the entire program seems to hang. Thats why i'm suggesting allocating the size of the entire string, then replacing parts in it, so it won't have to copy to a new string. I don't know if this is possible at all.

 

I wonder how ssme or any non text or picture related program copies a huge array of stuff in the clipboard.

Posted

nah... the cut is fixed... for some reason the keyword 'set' was missing in front of some line related to the undo/redo stack...

if it worked before, i might have deleted by mistake (no idea how tho)

Posted

you also need to do a check when you have pasted something, you may not zoom (and i think not any other tool too) until the selection is applied. (For zoom you can use if parent.clipB.pasting then)

See for yourself what happens if you zoom after you pasted something, but didn't apply it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...