Ambrosia Garden Archive
    • @david-arthur, on Jun 26 2008, 08:47 AM, said in RezEditor Alpha Log:

      Sorry, you are indeed correct - I missed a Length-1 when interpreting my code.

      Ah, okay then. In addition to the odd AWRD behaviour, I had a couple of crashes and other strange behaviour when dealing with DLOGs in MC. I'll post them in the MC topic when I get more details.

      @nonconventionally-creative, on Jun 26 2008, 12:02 PM, said in RezEditor Alpha Log:

      The reason I distributed that one that way was because my IDE won't build the jar unless I do a "Clean and Build", which I can't do because I invalidated my sourcecode by recompiling the abstract superclass and adding new abstract methods.

      What's your IDE?

    • @guy, on Jun 25 2008, 10:59 PM, said in RezEditor Alpha Log:

      In addition to the odd AWRD behaviour, I had a couple of crashes and other strange behaviour when dealing with DLOGs in MC.

      After the discussion earlier, I went through and audited the DLOG editor's behaviour under various odd circumstances. I found and fixed a complicated series of problems - some of them caused or exacerbated by Intel endianness issues, and some going back farther - and so, while they're significantly more intricate than anything you would be able to isolate by reverse-engineering, thanks for drawing my attention in that direction. 🙂 DLOG support will be much more solid in the next alpha.

    • @nonconventionally-creative, on Jun 25 2008, 06:20 PM, said in RezEditor Alpha Log:

      alpha4 will not be up tonight, unfortunately. It's those layouts again.

      OK, I lied. Well, I thought it wouldn't, but I finished it (I cheated and copied code from the GUI builder).

      @david-arthur, on Jun 25 2008, 06:57 PM, said in RezEditor Alpha Log:

      I have a class called Resource which stores the resource's type, ID, name, and data, and has methods for reading and writing data in all the forms (PSTR, DWRD, etc.) needed.

      For each resource type, I have another class, called ShipResource, WeapResource, and so on. It isn't a sub-class of Resource, but rather a wrapper for it, and has Load and Save methods which use the methods in Resource to read the data and copy it into its own properties.

      Hmm.. I initially thought of making the GUI separate from the data, but I never thought of not subclassing Resource.

      @guy, on Jun 25 2008, 07:59 PM, said in RezEditor Alpha Log:

      What's your IDE?

      I'm using NetBeans, and I did manage to get it to build the jar. The reason it wouldn't was because I was doing not a "Build" but a "Run", which only compiles the classes but not the jar.

      I just found out we're going away for a few days, effective sometime tomorrow, so I won't be making any progress. I might still post, though.

      This post has been edited by Nonconventionally Creative : 26 June 2008 - 12:47 AM

    • @david-arthur, on Jun 25 2008, 06:57 PM, said in RezEditor Alpha Log:

      I have a class called Resource which stores the resource's type, ID, name, and data, and has methods for reading and writing data in all the forms (PSTR, DWRD, etc.) needed.

      For each resource type, I have another class, called ShipResource, WeapResource, and so on. It isn't a sub-class of Resource, but rather a wrapper for it, and has Load and Save methods which use the methods in Resource to read the data and copy it into its own properties.

      When you open the shďp editor, it creates a new instance of ShipResource, giving it the desired ID and telling it to load the data. Once this has happened, it copies the data from the ShipResource's properties into its own interface, often re-calculating to represent the different possible values of each field in a human-readable form. When you save a resource, it goes through the same process in reverse. (The editors for most of the other resource types, of course, act likewise).

      I think I'll scrap my old code and implement something like this. I told myself I was not going to consciously mimic someone else's work, but this is too good to pass up. This will even simplify text files and most certainly rez files. Also, it will allow me to release a working version without editors for the graphics - I can have an "open hex" option/default.
      I'm thinking I might implement the editor windows as instances of a single class to simplify the registration thereof, with the constructors taking a Runnable to do the work, this invoke a method (optionally, multiple times) to display the window. Of course, this might be more trouble than it's worth. Perhaps do subclasses, but definitely have the window open by a method
      This will also clarify another concept I had. In my code I had a boolean called "isReference". This will be removed, in favor of each resource being assigned to a ResourceGroup (based on a Collection or specifically, a Sorted Set), multiple of which may be open at once.
      Now I just have to figure out how to make multiple invocations of the jar file act as one, just opening a new ResourceGroup.

      @david-arthur, on Jun 24 2008, 09:24 AM, said in RezEditor Alpha Log:

      Awrd is 'align word', a now-obsolete dodge which mattered back when the DLOG format was designed in 1984. I handle it as follows: if the cursor index is divisible by two, move ahead two bytes; otherwise, move ahead one byte. You may need to adjust this depending on whether your read cursor begins at zero or one.

      Does this mean only the index of the current resource? i.e., to cancel the effect of an odd-length PSTRING? It wouldn't make sense (and would be really hard to implement) to use the cursor index for the whole file.

      I still need to know if MissionComputer allows saving in text format, and if so, which. Regardless, I need to know how the ConText/ResStore format works.
      If MissionComputer does not support text format, I have a proposition for a new, universal format. Basically just a tab-separated textual representation of the data, in the order it appears in the Resource (unlike EVNEW, which sacrifices this for readability with the GunPositionZ's), but with an extra field or two out front for ResourceGroup and/or filename (perhaps just one of the preceding - ResourceGroup would make more sense, but I've often found the filename column I added in my spreadsheets very useful when looking up a resource)
      Some thoughts about the new format:
      For the relative filenames in the picture and sound resources, allow either /'s or 's
      Between lines, allow any combination of \r and \n, even mixed within the same file.
      Support export to a format with an alpha channel instead of exporting masks separately.
      For STR# resources, perhaps write the data with each string on its own line (very convenient for putting in a spreadsheet, and also for Pers's CommQuote and HailQuote fields)

    • @nonconventionally-creative, on Jun 26 2008, 10:49 AM, said in RezEditor Alpha Log:

      I think I'll scrap my old code and implement something like this. I told myself I was not going to consciously mimic someone else's work, but this is too good to pass up.

      I've always found it works quite well; compared to any other scheme I've seen or been able to think up, it reduces the amount of work each bit of the programme is doing to a minimum. It also avoids the sort of problems that EVNEW apparently has when it comes up against resources it can't understand; MissionComputer has no trouble, since it can just file the offending resources away, ignore them, and then save them back to disk exactly as it found them.

      @nonconventionally-creative, on Jun 26 2008, 10:49 AM, said in RezEditor Alpha Log:

      Does this mean only the index of the current resource? i.e., to cancel the effect of an odd-length PSTRING? It wouldn't make sense (and would be really hard to implement) to use the cursor index for the whole file.

      Correct - it's the read cursor for an individual resource.

      Remember, a real Macintosh resource file functions like a random-access database, so you don't even have an I/O stream for the file itself. The operating system takes care of all of the binary disk access, and hands you individual resources in a nice, shrink-wrapped form. If you want to do anything equivalent with .rez files in Java, you'll have to create some sort of Resource Manager clone yourself. Presumably it would be array-based, though I used to use one where each resource was saved to disk as a separate file.

      Also, I've altered the way I read and write AWRDs slightly after doing an audit of the DLOG codec (which turned out to have some troubles with resources that had atypical parameters). 'Cancel the effect of an odd-length PSTRING' is a good way to express the effect, and should produce the correct result.

      @nonconventionally-creative, on Jun 26 2008, 10:49 AM, said in RezEditor Alpha Log:

      I still need to know if MissionComputer allows saving in text format, and if so, which.

      MissionComputer opens and saves standard resources and .rez; it does not import or export any text-based format. If any future version ever does, it would use the same format as ConText and ResStore, since I have no interest in introducing yet another plug-in format.

      @nonconventionally-creative, on Jun 26 2008, 10:49 AM, said in RezEditor Alpha Log:

      Support export to a format with an alpha channel instead of exporting masks separately.

      Is this advisable? Most programmes that edit alpha channels take for granted that they'll be 8-bit, rather than 1-bit as the engine requires.

    • @david-arthur, on Jun 26 2008, 08:18 AM, said in RezEditor Alpha Log:

      I have no interest in introducing yet another plug-in format.
      Is this advisable? Most programmes that edit alpha channels take for granted that they'll be 8-bit, rather than 1-bit as the engine requires.

      Well, this begins to show how we are not aiming the same way. You don't have to. I may or may not. I've always found the text format somewhat lacking - although a good editor would make up for that. I still need the ConText/ResStore format from someone, although it doesn't matter when.
      As for the alpha channels, it's not as if Nova can run a plugin from a text file - whatever importer used could give a nasty warning if the alpha was not 00 or FF and give the option to round. I wasn't really thinking of it for reimporting, but I've sometimes wished I could view the exported file with the alpha.
      Also, there is a 16-bit format that uses a 1-bit alpha.

    • Update: I now have the basic framework up for the new style, including removing all dependencies on knowing types ahead of time and adding all the currently known types to fix a hypothetical bug with the comparators. Note that when sorting resources, they will be sorted by the order in which they were added.
      Warning: RezEditor may encounter strange errors if given more than 32767 different types of resource.

      @david-arthur, on Jun 27 2008, 06:11 AM, said in MissionComputer 4.0a8 now available:

      It seemed to against the model (used by both ResEdit and MissionComputer) which treats DITL and DLOG as if they're 'really' one thing, which happens to be divided into two resources for technical reasons (three if you count dctb). For it to be intuitively obvious, I think greater changes would be required, and I don't know if they would be beneficial.

      dctb? Also, still waiting for that DITL. It can't be that bad, can it?

    • You don't need to worry about dctb, it's not relevant to Nova.
      If you want the quick and dirty format for DITL, here's the 'template' from ResEdit.

      Type Label
      ZCNT Number of items
      LSTC ****
      FLNG Place holder
      RECT Display rect
      HBYT Item type
      OSTR Item info
      LSTE ****
      

      For info on each of these field types you can check out pages 79-81 of this PDF: ResEdit Reference. You'll still need someone to explain what things like "Item type" actually mean.

      This post has been edited by Guy : 30 June 2008 - 02:48 PM

    • OK, maybe it is that bad. It looks like for now the DITL will be using the generic hex editor that I'll use for unknown types. (I have editor windows abstracted from the actual resource - hypothetically, someone else could write their own editors and they could be used with minimal change to source code (one line) - there's actually a way to do it without any change to source code, but I'm not sure about doing that...)

      Edit: also, can someone confirm whether these are the characters used by MacNova?
      I made a desc for them in EVNEW and overwrote each character in a hex editor, then fed that to Nova
      All the ?'s are unknown to Java using the x-MacRoman Charset

      7B is {//invalid
      7C is |
      7D is }//invalid
      7E is ~
      7F is //displays standard "unknown character" box (Edit: removed long comment - note this is an ASCII control character)
      80 is Ä
      81 is Ĺ
      82 is Ç
      83 is É
      84 is Ń
      85 is Ö
      86 is Ü
      87 is á
      88 is ŕ
      89 is â
      8A is ä
      8B is ă
      8C is ĺ
      8D is ç
      8E is é
      8F is č
      90 is ę
      91 is ë
      92 is í
      93 is ě
      94 is î
      95 is ď
      96 is ń
      97 is ó
      98 is ň
      99 is ô
      9A is ö
      9B is ő
      9C is ú
      9D is ů
      9E is ű
      9F is ü
      A0 is †
      A1 is °
      A2 is ˘
      A3 is Ł
      A4 is §
      A5 is •
      A6 is ś
      A7 is ß
      A8 is Ž
      A9 is Š
      AA is ™
      AB is ´
      AC is ¨
      AD is ?//error
      AE is Ć//OK
      AF is Ř//OK
      B0 is ?//error
      B1 is ą//error
      B2 is ?//error
      B3 is ?//error
      B4 is Ľ//OK
      B5 is ľ//OK
      B6 is ?//error
      B7 is ?//error
      B8 is ?//error
      B9 is ?//error
      BA is ?//error
      BB is Ş//OK
      BC is ş//OK
      BD is ?//error
      BE is ć//OK
      BF is ř//OK
      C0 is ż//OK
      C1 is Ą//OK
      C2 is Ź//OK
      C3 is ?//error
      C4 is Ć’//OK
      C5 is ?//error
      C6 is ?//error
      C7 is Ť//OK
      C8 is ť//OK
      C9 is ‌//OK
      CA is  //OK
      CB is Ŕ//OK
      CC is Ă//OK
      CD is Ő//OK
      CE is Ĺ’//OK
      CF is Ĺ“//OK
      D0 is –//OK
      D1 is —//OK
      D2 is “//OK
      D3 is ”//OK
      D4 is ‘//OK
      D5 is ’//OK
      D6 is ÷//OK
      D7 is ?//error
      D8 is ˙//OK
      D9 is Ÿ//OK
      DA is ?//error
      DB is â‚Ź//wrong character, displays a box (smaller than the unknown character box, see 7F)
      DC is ‚//OK
      DD is ›//OK
      DE is ?//error
      DF is ?//error
      E0 is ‥//OK
      E1 is ˇ//OK
      E2 is ‚//OK
      E3 is „//OK
      E4 is ‰//OK
      E5 is Â//OK
      E6 is Ę//OK
      E7 is Á//OK
      E8 is Ë//OK
      E9 is Č//OK
      EA is Í//OK
      EB is Î//OK
      EC is Ď//OK
      ED is Ě//OK
      EE is Ó//OK
      EF is Ô//OK
      F0 is ?//error
      F1 is Ň//OK
      F2 is Ú//OK
      F3 is Ű//OK
      F4 is Ů//OK
      F5 is ?//error
      F6 is ˆ//OK
      F7 is ˜//OK
      F8 is Ż//OK
      F9 is ?//error
      FA is ?//error
      FB is ?//error
      FC is ¸//OK
      FD is ?//error
      FE is ?//error
      FF is ?//error
      

      Some of these characters don't display properly over the web, so:

      Attached File(s)

      This post has been edited by Nonconventionally Creative : 26 September 2008 - 06:38 PM

    • Sorry, what exactly are you asking? Are they 'used' by Mac Nova? Probably not. Would they work if you tried them? Probably.
      What does invalid mean? What are the ones at the start with no comment? Are the characters there what Java's x-MacRoman shows or what WinNova shows?

    • What I'm asking is whether this is the correct Charset for Nova: would these, and only these, extended characters work?
      All the ones at the start worked OK.
      The characters given are what Java gave me based on the x-MacRoman Charset, which I then tested with WinNova to get the OK/errors here.
      I might have an issue because for some reason x-MacNova is not installed in the cefault charset pack with Java - it required the "install support for non-European languages" option to be selected during installation.
      I wrote a tester earlier against the only 6 "known" extended character-to-byte matches (the umlauts) and it returned something like 6 matches - maybe I should pull that out and release it to people for testing to see if they get the same. Charsets are one thing that are supposed to vary widely between implementations.
      Edit: I couldn't find my old tester, so I wrote a quick new one.
      For me, it returned 4 full results, three of which are obviously specialties:

      Charset x-MacIceland matches all 6
      Charset x-MacRoman matches all 6
      Charset x-MacRomania matches all 6
      Charset x-MacTurkish matches all 6
      

      AnotherEdit: found a bug with certain charsets, fixed. Also, confirmed that both the OpenJDK and SunJDK JREs have the necessary Charsets, and obviously the apple one does, so only Windows users need worry about choosing to instal them.

      Attached File(s)

      This post has been edited by Nonconventionally Creative : 18 July 2008 - 06:06 PM

    • Yes, MacRoman should be the correct charset.

      This post has been edited by Guy : 01 July 2008 - 03:02 PM

    • Hmm... most (but not all) of the unsupported characters are mathematical in origin. At least the DB makes sense now.
      Update: I just got a new hard drive, so I'll install Linux on my old one to expand my development environment. Also, this may expedite getting the CVS repository up.
      Edit: curse that bandwidth throttling. A 1-hour download is taking 3 hours.

      This post has been edited by Nonconventionally Creative : 01 July 2008 - 10:36 PM

    • @nonconventionally-creative, on Jun 30 2008, 02:07 PM, said in RezEditor Alpha Log:

      dctb?

      Dialogue colour table. As Guy says, it probably isn't going to matter to anyone developing for Nova. I'll post an explanation of the DITL format tomorrow.

    • A DITL resource begins with an unsigned short telling you how many items (buttons, text boxes, etc.) it contains. Then, the following repeats once for each item:

      Long ignored
      Short topY
      Short leftX
      Short bottomY
      Short rightX
      Byte type
      OString info

      An OString is simply a PString padded to an odd length. Note also that the dimensions are stored by giving the top-left and bottom-right corners rather than storing the height and width as is more common these days.

      Also note that the DITL resource does not specify the dimensions or border type of the window itself; those come from the associated DLOG resource.

      You may be able to figure out the contents of the 'type' and 'info' fields by reverse-engineering the DITLs included in the game. If you have trouble, let me know, and I can give you some more explanations.

    • I've spent the last day trying to get my computer working again after the Windows hard-drive bug killed my machine after I installed Ubuntu, which is immune to said bug. This time, I'm doing the partitioning from the Windows installer, so that Windows won't freak out from the fact that the Linux partition gives its size as larger than Windows thinks the disk is. Hopefully, I'll be working on RezEditor again by tomorrow.
      I probably won't have any difficulties with the DITL anymore, except for getting the GUI editor to accept the flexible number-of-fields thing. Maybe I'll use a table.
      Edit: got hit by the EULA curse again but managed to recover Windows. Of course, that's probably just superstition.

      This post has been edited by Nonconventionally Creative : 03 July 2008 - 05:24 PM

    • When are we going to get alpha 5? The release pace has slowed awesomely- no new release in 9 days! I liked the daily releases! Despite the fact they were always buggy and so poorly featured, I liked that I could quickly get new releases that were always better than the previous- substantially, strangely. Yeah, even if they had so few features they were useless, they were always interesting, because they showed what could (more would) be better than what we currently have. Did I already tell you how much I love your idea? Because rezeditor is so much better than evnew. You know, it was never even finished, and the developer dropped out after 2004 (Summer 2004, to be exact). I wonder what happened with aprosenf? You know, leaving a software to a beta release just doesnt fly. Software are never leaved to beta- abandoned, that is. That is unheard of and would cause any commercial software maker to go bust. If they never release the final version, and decide to disappear randomly, without telling a reason... no, that just doesnt happen. Just proves even more how much EVNEW sucks. 😉 <_< 🙂 :rolleyes:

      The reason I ask is... because Alpha 4 still has bugs. For example. the class opening method still doesnt work:

      C:\Documents and Settings\Tom\Työpöytä\RezEditor\dist>java -ea -jar RezEditor.jar
      Beginning session at 2008/06/26 16:06:21.187
      Main thread exiting at 2008/06/26 16:06:29.203

      C:\Documents and Settings\Tom\Työpöytä\RezEditor\dist>java net.sourceforge.rezed
      itor.Main
      Exception in thread "main" java.lang.NoClassDefFoundError: net/sourceforge/rezed
      itor/Main
      Caused by: java.lang.ClassNotFoundException: net.sourceforge.rezeditor.Main
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)

      C:\Documents and Settings\Tom\Työpöytä\RezEditor\dist>

      If programs would be opened using a Java class, you would get a gold medal for defective software. I thought you released Alpha 4 because of this didnt work? You said you would release a new one because Java didnt work. But surprise, surprise, the class still doesnt work, and the easy-to-use method jar triumphs. See? Ease of use is necessary, because its more quaranteed it will work than with complicated command line utilities. I suggest you axe the command line altogether- no app I have used uses the command line to launch. Oh, and when are we going to get real saving? If I close the app, all changes are lost. Thats what not I call saving, since the whole idea of saving works otherwise. Oh, and heres the last bug. If I have the program open and a resource open, when I press OK to save it, it will just reload the current one. Er, thats not how programs work. It should close the current one and let me select a new one (new ID). This happens with saved resources.

      PS. I heard you began to work on a new graphical interface. How will it be like? Will it be as awful as the current one? Because the current one really isnt even one, really- its so plain and so unuserfriendly its been basically neglected in favor of testing how the program looks at all.

      Yeah, that was the latest batch of bugs- when you released Alpha 4, I pushed it really hard, to its limits to see potential bugs. Because it still warns me (!) when I try to launch it from a jar, I predict its alpha 5 before it will be truly usable.

      And its funny- this post was supposed to be a short post asking when you are going to make Alpha 5, but it grew to my usual mega post because I didnt think it would. On the other hand, I kept from posting several days because I felt my way of posting was demanding to myself, and now I did because I posted in a new way that felt simple. Hmm, reverse psychology?

      PPS. My sourceforge Live Bookmark RSS is crying because of no new releases. I check it every day for a new release (heck, it takes only a second because it sits on my bookmarks toolbar), and yet every day its the same: no release. When are you going to do one? I got used to daily releases.

      Then again, if you wait until you make a better release- and a better GUI, I can wait. The previous releases only amused me for a few minutes (and thats optimistic for 2), and were boring because they almost literally had no features.

      Waiting for a reply and a new release, Cade

    • @general-cade-smart, on Jul 5 2008, 04:08 PM, said in RezEditor Alpha Log:

      You know, it was never even finished, and the developer dropped out after 2004 (Summer 2004, to be exact). I wonder what happened with aprosenf? You know, leaving a software to a beta release just doesnt fly. Software are never leaved to beta- abandoned, that is. That is unheard of and would cause any commercial software maker to go bust. If they never release the final version, and decide to disappear randomly, without telling a reason... no, that just doesnt happen.

      I could go on for a bit about how egocentric it is to expect a developer of software to go at a pace other than the one of their choosing, but I'll leave it at this: software is left in beta all the time. The developer loses interest. Believe me, writing a full program like EVNEW (especially from scratch) is a lot of work, and I can't say I really blame him for leaving it as-is in a working state. He has no obligation to finish it, just as he had none to write it in the first place. Nobody would have ragged on you for not writing a Windows plug-in editor, and yet it is now appropriate to give that treatment to the man who did , simply because it wasn't everything you wanted it to be? Forgive me, but that just doesn't make any sense.

      I can understand your desire for a new editor, but when it comes to free software, count your blessings. People like Aprosenf, NC, DA, and I may not always be around and/or willing to do all the hard work for you, and believe me, getting angry that a beta has not arrived in over a week (most betas have significantly longer periods anyway) is not the way to get someone to keep working. We like to feel like people appreciate the work we've done, not like people are angry at us for having other things to do.

      Chill out, man.

    • I'm rooting for you...now that EVNEW doesn't open PICTs with the latest version of Quicktime, we no longer have a functioning editor on Windows.

    • @orcaloverbri9, on Jul 5 2008, 04:44 PM, said in RezEditor Alpha Log:

      I could go on for a bit about how egocentric it is to expect a developer of software to go at a pace other than the one of their choosing, but I'll leave it at this: software is left in beta all the time. The developer loses interest. Believe me, writing a full program like EVNEW (especially from scratch) is a lot of work, and I can't say I really blame him for leaving it as-is in a working state. He has no obligation to finish it, just as he had none to write it in the first place. Nobody would have ragged on you for not writing a Windows plug-in editor, and yet it is now appropriate to give that treatment to the man who did , simply because it wasn't everything you wanted it to be? Forgive me, but that just doesn't make any sense.

      I can understand your desire for a new editor, but when it comes to free software, count your blessings. People like Aprosenf, NC, DA, and I may not always be around and/or willing to do all the hard work for you, and believe me, getting angry that a beta has not arrived in over a week (most betas have significantly longer periods anyway) is not the way to get someone to keep working. We like to feel like people appreciate the work we've done, not like people are angry at us for having other things to do.

      Chill out, man.

      I second the motion...chill.

      If we get a functional editor from this within a year I'd be thrilled. Count your blessings man. 🙂