Jump to content
SSForum.net is back!

Drake7707

⛊ Project Moderator
  • Posts

    1309
  • Joined

  • Last visited

Everything posted by Drake7707

  1. Ok i made some changes and added a thingy to play with I'll only release the source code, as this is just a reference for Samapico to change in his version of the source I'll quickly list my changes done: - There is a problem in the replace window: when you press X the frmgeneral won't be enabled again, and you'll be stuck Add this in the form : Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) cmdCancel_Click End Sub - I've added Text To Map, which allows you to type in your text, and it will convert it to a selection on the map with the left tile selected as tile used This is too much to add, so look into the source code for it, i'll quickly list all methods i made - the entire frmTextToMap form - the ExecuteTextToMap in the frmgeneral form - the TexTToMap in the ClipB class module DCME will handle the array given by the frmTextToMap as input from the clipboard, as this was the easiest way to implement. (instead of gettting text from the clipboard, the texttomap has as parameter the generated array, which is then copied to the clip array in ClipB, when that is done, everything happens identical as if it were pasted) As a side note, i used DCME_sam1_with_soure.zip as the source code where i made these changes in. (i also changed the count tiles already). And as another side note, you might want to add the TextToMap in the menu, rather than having a button floating there (but like i said, it's not really for public release, just as reference) Edit: !@#$%^&*it it took longer to type this than for you to reply Edit2: you need to put the style of the toolbar buttons to "2- ButtonGroup" Edit 3: it was stupid to not treat the selection as a layer for the map, and it starts to get back at me now, e.g paste or generate something with text to map, then zoom out or in, poof, gone or misplaced. With a selection layer it was much easier to change the actual data of the selection, or create a new selection, now you have to play with pieces of the tile array, keep the references clean, and it's still less flexible than with a selection layer. However, to change the entire selection is quite some work, and although it's not impossible, mayor changes would be necessary to keep the program working as many things rely on the current implementation of the selection (this was just as a side note too ) Edit4: fixed some ... erhm ... errors in the code that i wrote, no big deal DCME_sam1_with_source_Drake7707edit2.zip
  2. i know about the offset, it's the problem of the icons. When you click with your mouse pointer, it will give you the left top of the icon of the mouse, the problem is that, when you use the cross for rectangles, the cross points in the middle, having a minor offset compared to the left top of that icon. I tried fixing that by adding that offset, but then it screws up another tool with another icon, and after i while i thought i had it good, but it seems the right bottom is still messed up. And as i was tired of trying it to be correct, i forgot what kind of changes i made, and didn't want to start all over again. I kinda forgot it afterwards as it is correctly in the middle :s As for the selection rectangle, you don't know what i've been through to get it correctly working .. *sigh*, at least it uses an int() on the offset of the selection rectangle to fix the added offset when you release your mouse, so it's not really a problem btw, you should update the copy/paste of the selection, as generating that string takes too much time when you select large areas. I don't know how to put an array on the clipboard so i asked it here Keep up the good work with the tweaks
  3. This is the correct code for count tiles Sub CountTiles() Dim i As Integer Dim j As Integer Dim n As Long Dim m As Long Dim general As Long Dim special As Long n = 0 m = 0 frmGeneral.Label6.Caption = tilesetleft & " " & tilesetright For j = 0 To 1023 For i = 0 To 1023 If tile(i, j) = 0 Then ' do nothing to prevent overhead of istilespecial ElseIf tile(i, j) = tilesetleft Then n = n + 1 ElseIf tile(i, j) = tilesetright Then m = m + 1 ElseIf Not isTileSpecial(Me, i, j) Then general = general + 1 ElseIf tile(i, j) = 216 Or tile(i, j) = 217 Or tile(i, j) = 219 Or _ tile(i, j) = 220 Then special = special + 1 End If Next Next MsgBox n & " Left tiles (red)" & vbCrLf & _ m & " Right tiles (yellow)" & vbNewLine & _ general & " Tiles used in map" & vbNewLine & _ special & " Special tiles (such as wormhole)", vbOKOnly, "Tiles counted" End Sub Private Sub cmdCountTiles_Click() If Not loadedmaps(activemap) Then Exit Sub If Maps(activemap).sel.selalreadymoved Then MsgBox "You can't replace a selection that has already been moved" Exit Sub End If Call Maps(activemap).CountTiles End Sub Also you might want to add filled rectangle and filled ellipse drawing, as i didn't do that
  4. you probably are overwriting your next source tiles of the previous rotation to the destination tile. the easiest way is to create a new selection, thus a new array (with the size of the source selection), then use that one as the destination like this pseudo code: dim j as integer dim i as integer dim destselect() as integer redim destselect(selection width, selection height) for j = 0 to selection height for i = 0 to selection width 'example for rotating 90° right ' the function for rotating 90° is defined as: f: (x,y) ---> (max - y,-x) destselect(max j, i) = sel(i,j) next next but this will only work for when width = height on second thought: forget what i said, 90° rotation is easy to implement: just flip & mirror it correctly, as these functions are already implemented, you can use those, (but to speed up a bit, combine the 2 in the source code instead of calling the functions, as they will generate an overhead they both share Another problem you have with tile counting is that you have overflows, integers aren't big enoug, use longs Also that count will never work as you used If Not loadedmaps(activemap) Then Exit Sub If Maps(activemap).sel.selalreadymoved Then MsgBox "You can't replace a selection that has already been moved" Exit Sub End If frmMain.tilesetleft = Maps(activemap).tilesetleft frmMain.tilesetright = Maps(activemap).tilesetright Call frmMain.CountTiles frmMain is not a map that is open, it is just the form. you have to use maps(activemap) instead of frmMain !
  5. lol maybe i'll try to change some things too
  6. DCME isn't that good as a map editor as it often seems not responding because of the large calculations it has to do, example select a huge portion of the map and move it, or copy it to the clipboard, and wham, your waiting for 5 minutes or longer. the copy-paste thing is because i create a string of the data and concatenating everytime, which vb translates as: create a new string, copy the oldstring + the new part. This generates a large overhead of copying to new memory. A better solution is to put the data as bytes on the clipboard, and reading it back from it. That will solve that slowdown, but as i had little time to work on (or did something else) i didn't change it anymore. If i would recreate DCME from scratch the structure would be quite different from as it is now, as it is little OOP and well.... cluttered and non-do!@#$%^&*entated :/ (always screwing up that last point there in all my written programs ) Besides bajan, didn't know you were the only webmaster so i couldn't tell you
  7. the new version folder is my workspace, its a little different from the latest version (as it was attached in this thread) because i wanted to change the selection and copy-paste and add walltiles, but that wasn't finished, so if you really want the source code of the latest version i posted here, you'll have to use the srcbackup_beforeselectiononarray.rar as it is a backup of the source code before tinkering with the selection and stuff (in case i screw up ^^, which btw happened a few times before >.>) And balan, the latest version is DCMEv106.zip ... well i believe it is (its been 3 months already you know )
  8. as those links doesn't work either, i decided to put the whole folder of all files from dcme onto my webspace of my college. you can find everything here: http://www.student.kuleuven.ac.be/~s0158884/DCME/ i believe the srcbackup_beforeselectiononarray.rar is the last backup that i made before screwing things around the oldversion folder was the version before i made the multiple maps at once. All versions are on there if someone still needs them
  9. As it seems that the attachments are deleted, i've uploaded the files to: DCME v106 DCME v106 source code
  10. Because i know i prolly won't update it much.. i decided to release the source code. It's not fully commented, and can be complicated to understand at some parts but i hope some other programmers take over from what i've done and improve it. Here's the source code (Galactica.lvl is included, that was the map of the zone i designed, and i've been testing DCME on that) If you have any questions, pm them to me or post them here. Ill try to check often newVersion.zip
  11. DCME is currently stalled because i have little time to work on it, i have loooooooots of stuff to do for school, and because i had to redo my year i need to prepare well for the upcoming exams. Once i get more free time i'll stick to dcme for some updates again Sorry for the delay.
  12. yes exactly, what facts does i want to do to, but facts requires a whole new map to be made, and the bitmap has to be 1024x1024, what i plan to do is have a bitmap, monochromo or whatever, only pure white will count as transparent anyway, any size smaller than 1024x1024, and throw that generated stuff into a selection, so you can move it and place it where you like
  13. uhh ok, it requires some adaptations so i'll do that in the next build, meanwhile i just finished another build (i was bored ) - Fixed flip, mirroring with objects (screwed up the objects) - Added 3 sizes, 1px ,2px and 4px wide. Any higher will cause slow down (who needs higher than 4px width anyway) Known issues: - when trying to copy the whole map, it is as slow as !@#$%^&*, i know what the problem is, i think i know how to fix it, but im not in the mood to do it right now - sometimes the pencil is a tile off, like you click on a tile, and it fills the next one instead of the one you were hovering on. This has to do with the mouse pointer being at the top left of the icon, while the pencil is around in the middle of the icon, which causes some error on the place you click, i've tried fixing it before, but i only made it worse, i'll try again once i make the icons sort of equal on click position Ideas that i've come up with: - Paste monochrome bitmap as tiles, like you make text in any paint program, then copy it, and paste it in dcme, then dcme will make a selection with tiles that are extracted from any non-white pixel from the bitmap, and empty pixels with white pixels from the bitmap. I know i need to work on the walltiles someday, but for now, unless it stops pissing me off its a bit delayed Edit: this is the first update that is actually smaller in size than the previous updates (with 0.77kb , must be because i threw some duplicate code out and made the original code compatible with the rest :/) DCMEv106.zip
  14. seems my host has some problems, i already had to use ftp instead of the default frontpage plugins to upload :/ The most recent DCME version is in this thread, its easier to attach here, than to update my site with it btw: would an option to have small medium or large tool (for pencil, line, ellipse and so ) be useful ? like the width of a line ?
  15. fixed
  16. i'll see what fits best. Did you know you can press shortcuts like E = eraser, P = pencil, hold CTRL for dropper, and so on to hotswap between tools, propably not because i need to write a help file i'll add it to subspace once i didn't find any bug in a week or so, when i find a bug every that often i need to fix it immediatly and reupload it when i put it on subspacedownloads, now when i find a bug, i fix it, and when i implement something new or found more bugs, i make a new build, and upload it here, and here you guys can test it
  17. new build: - added recent opened maps - you can open lvl files with DCME now in explorer (open with... dcme) although once you have opened one, if you start another lvl , it will open another DCME window (working on that) - fixed deleting the selection (by pressing Del) - fixed cutting - fixed some minor problems now hopefully this won't introduce new bugs Btw still waiting on your 32-bit tileset Edit: btw i'm thinking of reimplementing the selection more as a seperate layer than just an area of the tiles. That way you will be able to do all operations on the selection, rather than to deselect and reselect it, because now, DCME lets you think you are moving the tiles, but it only shows so. It only moves the tiles once you apply the selection. If i store those tiles from the selection in a seperate array i can manipulate them easier, but i don't know how much slower this will go, so i'll test it, and see if it's worth it DCMEv105.zip
  18. hmmm... o_O" it should support 8bit, and 24bit, but 24bit is the highest i can in psp9 i'll attach a lvl i tested with also i just implemented the bucket limited to the screen option ( i forgot to add that ) Edit: can you attach a map with the 32-bit tileset, i'll try to adapt DCME for it, because i have no idea why it didn't refuse it in the first place (only 8-bit and 24-bit should be able to be opened) DCMEv104_withbucketlimitation.zip test2.lvl
  19. just a quick build now - now you can use the arrow keys to move the map - you can now toggle the right panel to hide it or show it, which is useful when you want to have a good overview of your map. (you still have a mini tileset picture, where you can see which tiles you've !@#$%^&*igned to draw left or right with DCME_v104.zip
  20. here's a new version - fixed the save button acting like save as all the time - fixed undo support for replacing (seemed to be missing) - added flip and mirror selection functionality - now you can drag and drop (multiple) lvl file(s) on the main window, and it will open them all - also added some shortcuts to the menu , such as ctrl+s, ctrl+o and such Thats about it, i've tried implementing the walltiles, but due to some unexpected difficulties it has some delay... (pc doesn't want me to implement it, it always crashes, or doesnt work, or messes it up >.>) Btw i don't want to have a default path for now, because a default path would make me do an option window, where you can put it and all, and i'm lazy to do that >.>, besides just going to the folder once isn't that bad is it ?) DCME_v103.zip
  21. i've been thinking to restrict it to the screen only, so only the part of what you see gets filled, nothing more, altough, i should make an option to turn that off if you want to fill the whole map for some reason :/ but yeah it's kinda slow atm, i need to upgrade the algorithm to QuickFill >.>
  22. Hi, and heeeere's version V1.01 finally the point where i can say its not really beta anymore Yes most start from 1.00 but i've never put 1.0 here, i've added a new tool since 1.0 so :roll eyes: changes since last attachement: - you can replace or switch tiles, wheter in or not in a selection - you have a new tool, create a chain of lines, then right click to quit - last but not least, UNDO AND REDO FUNCTIONALITY ... up to 10 undo/redos Now upcoming big stuff to implement: - WallTiles support, every tool will auto draw according to a walltile - LVZ Support, place images on the map, then DCME will generate the lvz files for you - Flip/Mirror selections Edit: due to some bugs its already v102 >.> Edit2: fixed slow drawing on pixel level with pencil. DCME_v102.zip
  23. i dont know c#, i know the very basics of c++ , and java, and i know pretty much anything of vb6 (i've been programming in visual basic for 8 years now)
  24. yup, here's another build Now you can load more maps at once. (in order to implement that i had to rewrite the whole structure of dcme, so i copied the project, and deleted everything in the new project, then started back from scratch implementing everything using the old code, took me a whole day though). Even window switching, cascading, and such is possible You can extract the tileset from a map Fixed some bugs I still need to make an undo - redo thing however :/ enjoy DCME_build8.zip
  25. thanks, fixed! sigh, thats what you get for copying too much code . I really need to clean and sort the code a bit, its getting way too messy now Edit: i've also fixed that sometimes the shortcuts don't work, and you can now use ctrl to use dropper when using ellipse ive compiled a small bugfix release DCME_build7_bugsfixed.zip
×
×
  • Create New...