diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 00000000..5a6898af
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,9 @@
+## AppVeyor CI Integration
+version: 0.9.2.{build}-{branch}
+
+image:
+- Visual Studio 2015
+- Visual Studio 2013
+
+build_script:
+- cmd: compile.bat Release x86
diff --git a/.gitignore b/.gitignore
index 8ba803d6..fa5f91d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# Build log
+build.log
+
# Be.Windows.Forms.HexBox documentation
Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.xml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..25038bc5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,6 @@
+## Travis CI Integration
+language: csharp
+solution: Tinke.sln
+
+script:
+ - ./compile.sh Release x64
diff --git a/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.csproj b/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.csproj
index 04e98d32..b206a7a0 100644
--- a/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.csproj
+++ b/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.csproj
@@ -1,14 +1,12 @@
-
+
Local
- 9.0.30729
+ 8.0.30703
2.0
{26C5F25F-B450-4CAF-AD8B-B8D11AE73457}
Debug
AnyCPU
-
-
Be.Windows.Forms.HexBox
@@ -20,16 +18,13 @@
Library
Be.Windows.Forms
OnBuildSuccess
-
-
- 3.5
true
false
- v2.0
+ v4.5
publish\
true
Disk
@@ -44,25 +39,19 @@
1.0.0.%2a
false
true
+ 2.0
bin\Debug\
- false
285212672
- false
DEBUG;TRACE
- Be.Windows.Forms.HexBox.xml
true
4096
- false
-
-
false
false
false
- false
4
full
prompt
@@ -70,23 +59,14 @@
bin\Release\
- false
285212672
- false
TRACE
-
-
- false
4096
- false
-
-
true
false
false
- false
4
none
prompt
@@ -99,9 +79,6 @@
System.Data
-
- False
-
System.Windows.Forms
@@ -109,6 +86,7 @@
System.XML
+
diff --git a/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.xml b/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.xml
deleted file mode 100644
index 05303a14..00000000
--- a/Be.Windows.Forms.HexBox/Be.Windows.Forms.HexBox.xml
+++ /dev/null
@@ -1,1616 +0,0 @@
-
-
-
- Be.Windows.Forms.HexBox
-
-
-
-
- A strongly-typed resource class, for looking up localized strings, etc.
-
-
-
-
- Returns the cached ResourceManager instance used by this class.
-
-
-
-
- Overrides the current thread's CurrentUICulture property for all
- resource lookups using this strongly typed resource class.
-
-
-
-
- The interface for objects that can translate between characters and bytes.
-
-
-
-
- Returns the character to display for the byte passed across.
-
-
-
-
-
-
- Returns the byte to use when the character passed across is entered during editing.
-
-
-
-
-
-
- The default implementation.
-
-
-
-
- Returns the character to display for the byte passed across.
-
-
-
-
-
-
- Returns the byte to use for the character passed across.
-
-
-
-
-
-
- Returns a description of the byte char provider.
-
-
-
-
-
- A byte char provider that can translate bytes encoded in codepage 500 EBCDIC
-
-
-
-
- The IBM EBCDIC code page 500 encoding. Note that this is not always supported by .NET,
- the underlying platform has to provide support for it.
-
-
-
-
- Returns the EBCDIC character corresponding to the byte passed across.
-
-
-
-
-
-
- Returns the byte corresponding to the EBCDIC character passed across.
-
-
-
-
-
-
- Returns a description of the byte char provider.
-
-
-
-
-
- Defines a byte provider for HexBox control
-
-
-
-
- Reads a byte from the provider
-
- the index of the byte to read
- the byte to read
-
-
-
- Writes a byte into the provider
-
- the index of the byte to write
- the byte to write
-
-
-
- Inserts bytes into the provider
-
-
-
- This method must raise the LengthChanged event.
-
-
-
- Deletes bytes from the provider
-
- the start index of the bytes to delete
- the length of the bytes to delete
- This method must raise the LengthChanged event.
-
-
-
- True, when changes are done.
-
-
-
-
- Applies changes.
-
-
-
-
- Returns a value if the WriteByte methods is supported by the provider.
-
- True, when it´s supported.
-
-
-
- Returns a value if the InsertBytes methods is supported by the provider.
-
- True, when it´s supported.
-
-
-
- Returns a value if the DeleteBytes methods is supported by the provider.
-
- True, when it´s supported.
-
-
-
- Returns the total length of bytes the byte provider is providing.
-
-
-
-
- Occurs, when the Length property changed.
-
-
-
-
- Occurs, when bytes are changed.
-
-
-
-
- Byte provider for a small amount of data.
-
-
-
-
- Contains information about changes.
-
-
-
-
- Contains a byte collection.
-
-
-
-
- Initializes a new instance of the DynamicByteProvider class.
-
-
-
-
-
- Initializes a new instance of the DynamicByteProvider class.
-
-
-
-
-
- Raises the Changed event.
-
-
-
-
- Raises the LengthChanged event.
-
-
-
-
- True, when changes are done.
-
-
-
-
- Applies changes.
-
-
-
-
- Reads a byte from the byte collection.
-
- the index of the byte to read
- the byte
-
-
-
- Write a byte into the byte collection.
-
- the index of the byte to write.
- the byte
-
-
-
- Deletes bytes from the byte collection.
-
- the start index of the bytes to delete.
- the length of bytes to delete.
-
-
-
- Inserts byte into the byte collection.
-
- the start index of the bytes in the byte collection
- the byte array to insert
-
-
-
- Returns true
-
-
-
-
- Returns true
-
-
-
-
- Returns true
-
-
-
-
- Gets the byte collection.
-
-
-
-
- Occurs, when the write buffer contains new changes.
-
-
-
-
- Occurs, when InsertBytes or DeleteBytes method is called.
-
-
-
-
- Gets the length of the bytes in the byte collection.
-
-
-
-
- Represents a collection of bytes.
-
-
-
-
- Initializes a new instance of ByteCollection class.
-
-
-
-
- Initializes a new instance of ByteCollection class.
-
- an array of bytes to add to collection
-
-
-
- Adds a byte into the collection.
-
- the byte to add
-
-
-
- Adds a range of bytes to the collection.
-
- the bytes to add
-
-
-
- Removes a byte from the collection.
-
- the byte to remove
-
-
-
- Removes a range of bytes from the collection.
-
- the index of the start byte
- the count of the bytes to remove
-
-
-
- Inserts a range of bytes to the collection.
-
- the index of start byte
- an array of bytes to insert
-
-
-
- Gets all bytes in the array
-
- an array of bytes.
-
-
-
- Inserts a byte to the collection.
-
- the index
- a byte to insert
-
-
-
- Returns the index of the given byte.
-
-
-
-
- Returns true, if the byte exists in the collection.
-
-
-
-
- Copies the content of the collection into the given array.
-
-
-
-
- Copies the content of the collection into an array.
-
- the array containing all bytes.
-
-
-
- Gets or sets the value of a byte
-
-
-
-
- Byte provider for (big) files.
-
-
-
-
- Contains all changes
-
-
-
-
- Contains the file name.
-
-
-
-
- Contains the file stream.
-
-
-
-
- Read-only access.
-
-
-
-
- Initializes a new instance of the FileByteProvider class.
-
-
-
-
-
- Terminates the instance of the FileByteProvider class.
-
-
-
-
- Raises the Changed event.
-
- Never used.
-
-
-
- Returns a value if there are some changes.
-
- true, if there are some changes
-
-
-
- Updates the file with all changes the write buffer contains.
-
-
-
-
- Clears the write buffer and reject all changes made.
-
-
-
-
- Reads a byte from the file.
-
- the index of the byte to read
- the byte
-
-
-
- Writes a byte into write buffer
-
-
-
-
- Not supported
-
-
-
-
- Not supported
-
-
-
-
- Returns true
-
-
-
-
- Returns false
-
-
-
-
- Returns false
-
-
-
-
- Releases the file handle used by the FileByteProvider.
-
-
-
-
- Occurs, when the write buffer contains new changes.
-
-
-
-
- Gets the name of the file the byte provider is using.
-
-
-
-
- Never used.
-
-
-
-
- Gets the length of the file.
-
-
-
-
- Represents the write buffer class
-
-
-
-
- Adds a byte into the collection
-
- the index of the byte
- the value of the byte
-
-
-
- Determines if a byte with the given index exists.
-
- the index of the byte
- true, if the is in the collection
-
-
-
- Gets or sets a byte in the collection
-
-
-
-
- Defines a build-in ContextMenuStrip manager for HexBox control to show Copy, Cut, Paste menu in contextmenu of the control.
-
-
-
-
- Contains the HexBox control.
-
-
-
-
- Contains the ContextMenuStrip control.
-
-
-
-
- Contains the "Cut"-ToolStripMenuItem object.
-
-
-
-
- Contains the "Copy"-ToolStripMenuItem object.
-
-
-
-
- Contains the "Paste"-ToolStripMenuItem object.
-
-
-
-
- Contains the "Select All"-ToolStripMenuItem object.
-
-
-
-
- Initializes a new instance of BuildInContextMenu class.
-
- the HexBox control
-
-
-
- If ByteProvider
-
- the sender object
- the event data
-
-
-
- Assigns the ContextMenuStrip control to the HexBox control.
-
-
-
-
- Before opening the ContextMenuStrip, we manage the availability of the items.
-
- the sender object
- the event data
-
-
-
- The handler for the "Cut"-Click event
-
- the sender object
- the event data
-
-
-
- The handler for the "Copy"-Click event
-
- the sender object
- the event data
-
-
-
- The handler for the "Paste"-Click event
-
- the sender object
- the event data
-
-
-
- The handler for the "Select All"-Click event
-
- the sender object
- the event data
-
-
-
- Gets or sets the custom text of the "Copy" ContextMenuStrip item.
-
-
-
-
- Gets or sets the custom text of the "Cut" ContextMenuStrip item.
-
-
-
-
- Gets or sets the custom text of the "Paste" ContextMenuStrip item.
-
-
-
-
- Gets or sets the custom text of the "Select All" ContextMenuStrip item.
-
-
-
-
- Gets the text of the "Cut" ContextMenuStrip item.
-
-
-
-
- Gets the text of the "Copy" ContextMenuStrip item.
-
-
-
-
- Gets the text of the "Paste" ContextMenuStrip item.
-
-
-
-
- Gets the text of the "Select All" ContextMenuStrip item.
-
-
-
-
- Gets or sets the image of the "Cut" ContextMenuStrip item.
-
-
-
-
- Gets or sets the image of the "Copy" ContextMenuStrip item.
-
-
-
-
- Gets or sets the image of the "Paste" ContextMenuStrip item.
-
-
-
-
- Gets or sets the image of the "Select All" ContextMenuStrip item.
-
-
-
-
- Specifies the case of hex characters in the HexBox control
-
-
-
-
- Converts all characters to uppercase.
-
-
-
-
- Converts all characters to lowercase.
-
-
-
-
- Represents a hex box control.
-
-
-
-
- Contains the thumptrack delay for scrolling in milliseconds.
-
-
-
-
- Contains the hole content bounds of all text
-
-
-
-
- Contains the line info bounds
-
-
-
-
- Contains the hex data bounds
-
-
-
-
- Contains the string view bounds
-
-
-
-
- Contains string format information for text drawing
-
-
-
-
- Contains the width and height of a single char
-
-
-
-
- Contains the maximum of visible horizontal bytes
-
-
-
-
- Contains the maximum of visible vertical bytes
-
-
-
-
- Contains the maximum of visible bytes.
-
-
-
-
- Contains the scroll bars minimum value
-
-
-
-
- Contains the scroll bars maximum value
-
-
-
-
- Contains the scroll bars current position
-
-
-
-
- Contains a vertical scroll
-
-
-
-
- Contains a timer for thumbtrack scrolling
-
-
-
-
- Contains the thumbtrack scrolling position
-
-
-
-
- Contains the Enviroment.TickCount of the last refresh
-
-
-
-
- Contains the border´s left shift
-
-
-
-
- Contains the border´s right shift
-
-
-
-
- Contains the border´s top shift
-
-
-
-
- Contains the border bottom shift
-
-
-
-
- Contains the index of the first visible byte
-
-
-
-
- Contains the index of the last visible byte
-
-
-
-
- Contains the current byte position
-
-
-
-
- Contains the current char position in one byte
-
-
- "1A"
- "1" = char position of 0
- "A" = char position of 1
-
-
-
-
- Contains string format information for hex values
-
-
-
-
- Contains the current key interpreter
-
-
-
-
- Contains an empty key interpreter without functionality
-
-
-
-
- Contains the default key interpreter
-
-
-
-
- Contains the string key interpreter
-
-
-
-
- Contains True if caret is visible
-
-
-
-
- Contains true, if the find (Find method) should be aborted.
-
-
-
-
- Contains a value of the current finding position.
-
-
-
-
- Contains a state value about Insert or Write mode. When this value is true and the ByteProvider SupportsInsert is true bytes are inserted instead of overridden.
-
-
-
-
- Initializes a new instance of a HexBox class.
-
-
-
-
- Performs the thumbtrack scrolling after an delay.
-
-
-
-
- Scrolls the selection start byte into view
-
-
-
-
- Scrolls the specific byte into view
-
- the index of the byte
-
-
-
- Returns true if Select method could be invoked.
-
-
-
-
- Selects all bytes.
-
-
-
-
- Selects the hex box.
-
- the start index of the selection
- the length of the selection
-
-
-
- Preprocesses windows messages.
-
- the message to process.
- true, if the message was processed
-
-
-
- Searches the current ByteProvider
-
- the array of bytes to find
- the start index
- the SelectionStart property value if find was successfull or
- -1 if there is no match
- -2 if Find was aborted.
-
-
-
- Aborts a working Find method.
-
-
-
-
- Copies the current selection in the hex box to the Clipboard.
-
-
-
-
- Return true if Copy method could be invoked.
-
-
-
-
- Moves the current selection in the hex box to the Clipboard.
-
-
-
-
- Return true if Cut method could be invoked.
-
-
-
-
- Replaces the current selection in the hex box with the contents of the Clipboard.
-
-
-
-
- Return true if Paste method could be invoked.
-
-
-
-
- Return true if PasteHex method could be invoked.
-
-
-
-
- Replaces the current selection in the hex box with the hex string data of the Clipboard.
-
-
-
-
- Copies the current selection in the hex box to the Clipboard in hex format.
-
-
-
-
- Paints the background.
-
- A PaintEventArgs that contains the event data.
-
-
-
- Paints the hex box.
-
- A PaintEventArgs that contains the event data.
-
-
-
- Converts a byte array to a hex string. For example: {10,11} = "0A 0B"
-
- the byte array
- the hex string
-
-
-
- Converts the byte to a hex string. For example: "10" = "0A";
-
- the byte to format
- the hex string
-
-
-
- Converts the hex string to an byte array. The hex string must be separated by a space char ' '. If there is any invalid hex information in the string the result will be null.
-
- the hex string separated by ' '. For example: "0A 0B 0C"
- the byte array. null if hex is invalid or empty
-
-
-
- Raises the InsertActiveChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the ReadOnlyChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the ByteProviderChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the SelectionStartChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the SelectionLengthChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the LineInfoVisibleChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the StringViewVisibleChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the BorderStyleChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the UseFixedBytesPerLineChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the BytesPerLineChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the VScrollBarVisibleChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the HexCasingChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the HorizontalByteCountChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the VerticalByteCountChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the CurrentLineChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the CurrentPositionInLineChanged event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the Copied event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the CopiedHex event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the MouseDown event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the MouseWhell event
-
- An EventArgs that contains the event data.
-
-
-
- Raises the Resize event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the GotFocus event.
-
- An EventArgs that contains the event data.
-
-
-
- Raises the LostFocus event.
-
- An EventArgs that contains the event data.
-
-
-
- Occurs, when the value of InsertActive property has changed.
-
-
-
-
- Occurs, when the value of ReadOnly property has changed.
-
-
-
-
- Occurs, when the value of ByteProvider property has changed.
-
-
-
-
- Occurs, when the value of SelectionStart property has changed.
-
-
-
-
- Occurs, when the value of SelectionLength property has changed.
-
-
-
-
- Occurs, when the value of LineInfoVisible property has changed.
-
-
-
-
- Occurs, when the value of StringViewVisible property has changed.
-
-
-
-
- Occurs, when the value of BorderStyle property has changed.
-
-
-
-
- Occurs, when the value of BytesPerLine property has changed.
-
-
-
-
- Occurs, when the value of UseFixedBytesPerLine property has changed.
-
-
-
-
- Occurs, when the value of VScrollBarVisible property has changed.
-
-
-
-
- Occurs, when the value of HexCasing property has changed.
-
-
-
-
- Occurs, when the value of HorizontalByteCount property has changed.
-
-
-
-
- Occurs, when the value of VerticalByteCount property has changed.
-
-
-
-
- Occurs, when the value of CurrentLine property has changed.
-
-
-
-
- Occurs, when the value of CurrentPositionInLine property has changed.
-
-
-
-
- Occurs, when Copy method was invoked and ClipBoardData changed.
-
-
-
-
- Occurs, when CopyHex method was invoked and ClipBoardData changed.
-
-
-
-
- Gets a value that indicates the current position during Find method execution.
-
-
-
-
- Gets or sets the background color for the control.
-
-
-
-
- The font used to display text in the hexbox.
-
-
-
-
- Not used.
-
-
-
-
- Not used.
-
-
-
-
- Gets or sets the background color for the disabled control.
-
-
-
-
- Gets or sets if the count of bytes in one line is fix.
-
-
- When set to True, BytesPerLine property determine the maximum count of bytes in one line.
-
-
-
-
- Gets or sets the maximum count of bytes in one line.
-
-
- UsedFixedBytesPerLine property must set to true
-
-
-
-
- Gets or sets if the count of bytes in one line is fix.
-
-
- When set to True, BytesPerLine property determine the maximum count of bytes in one line.
-
-
-
-
- Gets or sets the visibility of a vertical scroll bar.
-
-
-
-
- Gets or sets the ByteProvider.
-
-
-
-
- Gets or sets the visibility of a line info.
-
-
-
-
- Gets or sets the offset of a line info.
-
-
-
-
- Gets or sets the hex box´s border style.
-
-
-
-
- Gets or sets the visibility of the string view.
-
-
-
-
- Gets or sets whether the HexBox control displays the hex characters in upper or lower case.
-
-
-
-
- Gets and sets the starting point of the bytes selected in the hex box.
-
-
-
-
- Gets and sets the number of bytes selected in the hex box.
-
-
-
-
- Gets or sets the line info color. When this property is null, then ForeColor property is used.
-
-
-
-
- Gets or sets the background color for the selected bytes.
-
-
-
-
- Gets or sets the foreground color for the selected bytes.
-
-
-
-
- Gets or sets the visibility of a shadow selection.
-
-
-
-
- Gets or sets the color of the shadow selection.
-
-
- A alpha component must be given!
- Default alpha = 100
-
-
-
-
- Gets the number bytes drawn horizontally.
-
-
-
-
- Gets the number bytes drawn vertically.
-
-
-
-
- Gets the current line
-
-
-
-
- Gets the current position in the current line
-
-
-
-
- Gets the a value if insertion mode is active or not.
-
-
-
-
- Gets or sets the built-in context menu.
-
-
-
-
- Gets or sets the converter that will translate between byte and character values.
-
-
-
-
- Defines a user input handler such as for mouse and keyboard input
-
-
-
-
- Activates mouse events
-
-
-
-
- Deactivate mouse events
-
-
-
-
- Preprocesses WM_KEYUP window message.
-
- the Message object to process.
- True, if the message was processed.
-
-
-
- Preprocesses WM_CHAR window message.
-
- the Message object to process.
- True, if the message was processed.
-
-
-
- Preprocesses WM_KEYDOWN window message.
-
- the Message object to process.
- True, if the message was processed.
-
-
-
- Gives some information about where to place the caret.
-
- the index of the byte
- the position where the caret is to place.
-
-
-
- Represents an empty input handler without any functionality.
- If is set ByteProvider to null, then this interpreter is used.
-
-
-
-
- Handles user input such as mouse and keyboard input during hex view edit
-
-
-
-
- Contains the parent HexBox control
-
-
-
-
- Contains True, if shift key is down
-
-
-
-
- Contains True, if mouse is down
-
-
-
-
- Contains the selection start position info
-
-
-
-
- Contains the current mouse selection position info
-
-
-
-
- Contains all message handlers of key interpreter key down message
-
-
-
-
- Delegate for key-down processing.
-
- the message object contains key data information
- True, if the message was processed
-
-
-
- Handles user input such as mouse and keyboard input during string view edit
-
-
-
-
- Implements a fully editable byte provider for file data of any size.
-
-
- Only changes to the file are stored in memory with reads from the
- original data occurring as required.
-
-
-
-
- Constructs a new instance.
-
- The name of the file from which bytes should be provided.
-
-
-
- Constructs a new instance.
-
- The name of the file from which bytes should be provided.
- True, opens the file in read-only mode.
-
-
-
- Constructs a new instance.
-
- the stream containing the data.
-
- The stream must supported seek operations.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- See for more information.
-
-
-
-
- Gets a value, if the file is opened in read-only mode.
-
-
-
-
- Contains true, if we are in design mode of Visual Studio
-
-
-
-
- Initializes an instance of Util class
-
-
-
-
- Gets true, if we are in design mode of Visual Studio
-
-
- In Visual Studio 2008 SP1 the designer is crashing sometimes on windows forms.
- The DesignMode property of Control class is buggy and cannot be used, so use our own implementation instead.
-
-
-
-
- Represents a position in the HexBox control
-
-
-
-
diff --git a/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs b/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs
index 5930688c..3d11258a 100644
--- a/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs
+++ b/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
diff --git a/Compile.bat b/Compile.bat
deleted file mode 100644
index 07fd5ff6..00000000
--- a/Compile.bat
+++ /dev/null
@@ -1,86 +0,0 @@
-:start
-ECHO off
-CLS
-
-REM Ask for release or debug configuration
-SET /P conf=Choose the configuration. Press R for Release or D for Debug:
-IF /I "%conf%"=="R" SET conf=Release
-IF /I "%conf%"=="D" ( SET conf=Debug
-) ELSE (IF NOT "%conf%"=="Release" GOTO start)
-
-:secif
-
-REM Ask for platform
-SET /P plat=Choose the platform. Press 1 for x86 or 2 for x64:
-IF "%plat%"=="1" SET plat=x86
-IF "%plat%"=="2" ( SET plat=x64
-) ELSE (IF NOT "%plat%"=="x86" GOTO secif)
-
-:check
-
-REM Make sure you have choosen everything ok
-SET /P ans=You have choosen the configuration %conf% and the platform %plat%, Is this correct? (y/n)
-IF /I "%ans%"=="N" (GOTO start
-) ELSE (IF /I NOT "%ans%"=="Y" GOTO check)
-
-REM Remove previoues build
-RMDIR /S /Q "%cd%\build"
-
-REM Get compiler
-SET netver=v4.0
-SET msbuild=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
-
-REM Compile program in standard directory, to allow plugins find Ekona
-%msbuild% Tinke.sln /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=%plat%"
-
-REM Compiling program
-%msbuild% Tinke.sln /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=%plat%;OutputPath=%CD%\build\"
-
-REM Compiling game plugins
-%msbuild% "Plugins\LAYTON\LAYTON.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\KIRBY DRO\KIRBY DRO.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\AI IGO DS\AI IGO DS.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\LASTWINDOW\LASTWINDOW.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\TETRIS DS\TETRIS DS.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\999HRPERDOOR\999HRPERDOOR.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\EDGEWORTH\EDGEWORTH.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\GYAKUKEN\GYAKUKEN.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\DBK ULTIMATE\DBK ULTIMATE.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\MAPLESTORYDS\MAPLESTORYDS.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\NINOKUNI\NINOKUNI.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\TOKIMEKIGS3S\TOKIMEKIGS3S.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\BLOODBAHAMUT\BLOODBAHAMUT.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\SF FEATHER\SF FEATHER.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\DEATHNOTEDS\DEATHNOTEDS.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\INAZUMA11\INAZUMA11.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\TC UTK\TC UTK.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\PSL\PSL.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\HETALIA\HETALIA.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\TIMEACE\TIMEACE.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\WITCHTALE\WITCHTALE.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Tokimemo1\Tokimemo1.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Teniprimgaku\Teniprimgaku.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-
-REM Compiling format plugins
-%msbuild% "Plugins\Pack\Pack.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\TXT\TXT.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Common\Common.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Images\Images.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\SDAT\SDAT.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Sounds\Sounds.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\Fonts\Fonts.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-%msbuild% "Plugins\3DModels\3DModels.sln" /v:minimal "/p:Configuration=%conf%;TarjetFrameworkVersion=%netver%;Platform=Any CPU;OutputPath=%CD%\build\Plugins\"
-
-REM Copy dependencies
-COPY "%cd%\Plugins\3DModels\OpenTK.dll" "%cd%\build\"
-COPY "%cd%\Plugins\3DModels\OpenTK.GLControl.dll" "%cd%\build\"
-
-REM Copy license and changelog
-COPY "%cd%\changelog.txt" "%cd%\build\"
-COPY "%cd%\Licence.txt" "%cd%\build\"
-
-REM Delete debug files
-DEL /S /Q "%cd%\build\*.pdb"
-
-:end
-PAUSE
diff --git a/Ekona/Ekona.csproj b/Ekona/Ekona.csproj
index 69997f1c..92a705b4 100644
--- a/Ekona/Ekona.csproj
+++ b/Ekona/Ekona.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,12 +10,17 @@
Properties
Ekona
Ekona
- v3.5
+ v4.5
512
False
False
false
+
+
+
+
+ 2.0
true
@@ -25,6 +30,10 @@
DEBUG;TRACE
prompt
4
+ False
+ Auto
+ 4194304
+ AnyCPU
pdbonly
@@ -33,6 +42,10 @@
TRACE
prompt
4
+ False
+ Auto
+ 4194304
+ AnyCPU
False
diff --git a/Ekona/Images/Actions.cs b/Ekona/Images/Actions.cs
index 07ac06d1..6736c584 100644
--- a/Ekona/Images/Actions.cs
+++ b/Ekona/Images/Actions.cs
@@ -19,21 +19,17 @@
*/
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using System.Drawing;
-using System.Runtime.InteropServices;
-using System.Drawing.Imaging;
namespace Ekona.Images
{
-
public enum TileForm
{
Lineal,
Horizontal,
Vertical
}
+
public enum ColorFormat : byte
{
A3I5 = 1, // 8 bits-> 0-4: index; 5-7: alpha
@@ -48,6 +44,7 @@ public enum ColorFormat : byte
A4I4 = 10,
ABGR32 = 11
}
+
public enum ColorEncoding : byte
{
BGR555 = 1,
@@ -662,42 +659,46 @@ public static uint Add_Image(ref byte[] data, byte[] newData, uint partOffset, u
public static int FindNextColor(Color c, Color[] palette, decimal threshold = 0)
{
int id = -1;
+ decimal minDistance = decimal.MaxValue;
- decimal min_distance = (decimal)Math.Sqrt(3) * 255; // Set the max distance
- double module = Math.Sqrt(c.R * c.R + c.G * c.G + c.B * c.B);
+ // Skip the first color since it used to be the transparent color and we
+ // don't want that as the best match if possible.
for (int i = 1; i < palette.Length; i++)
{
- double modulec = Math.Sqrt(palette[i].R * palette[i].R + palette[i].G * palette[i].G + palette[i].B * palette[i].B);
- decimal distance = (decimal)Math.Abs(module - modulec);
+ double x = palette[i].R - c.R;
+ double y = palette[i].G - c.G;
+ double z = palette[i].B - c.B;
+ decimal distance = (decimal)Math.Sqrt(x * x + y * y + z * z);
- if (distance < min_distance)
+ if (distance < minDistance)
{
- min_distance = distance;
+ minDistance = distance;
id = i;
}
}
- if (min_distance > threshold) // If the distance it's bigger than wanted
+ // If the distance it's bigger than wanted, remove the best match
+ if (minDistance > threshold)
id = -1;
- // If still it doesn't found the color try with the first one, usually is transparent so for this reason we leave it to the end
+ // If still it doesn't found the color try with the first one.
if (id == -1)
{
- double modulec = Math.Sqrt(palette[0].R * palette[0].R + palette[0].G * palette[0].G + palette[0].B * palette[0].B);
- decimal distance = (decimal)Math.Abs(module - modulec);
+ double x = palette[0].R - c.R;
+ double y = palette[0].G - c.G;
+ double z = palette[0].B - c.B;
+ decimal distance = (decimal)Math.Sqrt(x * x + y * y + z * z);
if (distance <= threshold)
id = 0;
}
if (id == -1)
- {
- Console.Write("Color not found: ");
- Console.WriteLine(c.ToString() + " (distance: " + min_distance.ToString() + ')');
- }
+ Console.WriteLine("Color not found: {0} (distance: {1})", c, minDistance);
return id;
}
+
public static void Indexed_Image(Bitmap img, ColorFormat cf, out byte[] tiles, out Color[] palette)
{
// It's a slow method but it should work always
diff --git a/Ekona/Images/ImageControl.designer.cs b/Ekona/Images/ImageControl.designer.cs
index b44d71c5..5838794f 100644
--- a/Ekona/Images/ImageControl.designer.cs
+++ b/Ekona/Images/ImageControl.designer.cs
@@ -494,8 +494,6 @@ private void InitializeComponent()
//
// ImageControl
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.checkMapCmp);
this.Controls.Add(this.panel1);
diff --git a/Ekona/Properties/Resources.Designer.cs b/Ekona/Properties/Resources.Designer.cs
index 81d9234d..c140088d 100644
--- a/Ekona/Properties/Resources.Designer.cs
+++ b/Ekona/Properties/Resources.Designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// Este código fue generado por una herramienta.
-// Versión de runtime:4.0.30319.269
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
//
-// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
-// se vuelve a generar el código.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
//
//------------------------------------------------------------------------------
@@ -13,12 +13,12 @@ namespace Ekona.Properties {
///
- /// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
+ /// A strongly-typed resource class, for looking up localized strings, etc.
///
- // StronglyTypedResourceBuilder generó automáticamente esta clase
- // a través de una herramienta como ResGen o Visual Studio.
- // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
- // con la opción /str o vuelva a generar su proyecto de VS.
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
@@ -33,7 +33,7 @@ internal class Resources {
}
///
- /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
+ /// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@@ -47,8 +47,8 @@ internal class Resources {
}
///
- /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
- /// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
diff --git a/Plugins/3DModels/3DModels/3DModels.csproj b/Plugins/3DModels/3DModels/3DModels.csproj
index c754ef4e..89a01d91 100644
--- a/Plugins/3DModels/3DModels/3DModels.csproj
+++ b/Plugins/3DModels/3DModels/3DModels.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
_3DModels
3DModels
- v3.5
+ v4.5
512
diff --git a/Plugins/999HRPERDOOR/999HRPERDOOR/999HRPERDOOR.csproj b/Plugins/999HRPERDOOR/999HRPERDOOR/999HRPERDOOR.csproj
index 5385ab27..383cd6a2 100644
--- a/Plugins/999HRPERDOOR/999HRPERDOOR/999HRPERDOOR.csproj
+++ b/Plugins/999HRPERDOOR/999HRPERDOOR/999HRPERDOOR.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
_999HRPERDOOR
999HRPERDOOR
- v3.5
+ v4.5
512
diff --git a/Plugins/AI IGO DS/AI IGO DS/AI IGO DS.csproj b/Plugins/AI IGO DS/AI IGO DS/AI IGO DS.csproj
index b95499a7..2ed0f599 100644
--- a/Plugins/AI IGO DS/AI IGO DS/AI IGO DS.csproj
+++ b/Plugins/AI IGO DS/AI IGO DS/AI IGO DS.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
AI_IGO_DS
AI IGO DS
- v3.5
+ v4.5
512
diff --git a/Plugins/BLOODBAHAMUT/BLOODBAHAMUT/BLOODBAHAMUT.csproj b/Plugins/BLOODBAHAMUT/BLOODBAHAMUT/BLOODBAHAMUT.csproj
index 881130ac..b4e7eb43 100644
--- a/Plugins/BLOODBAHAMUT/BLOODBAHAMUT/BLOODBAHAMUT.csproj
+++ b/Plugins/BLOODBAHAMUT/BLOODBAHAMUT/BLOODBAHAMUT.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
BLOODBAHAMUT
BLOODBAHAMUT
- v3.5
+ v4.5
512
diff --git a/Plugins/Common/Common/Common.csproj b/Plugins/Common/Common/Common.csproj
index aa9bf815..36bbcc02 100644
--- a/Plugins/Common/Common/Common.csproj
+++ b/Plugins/Common/Common/Common.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Common
Common
- v3.5
+ v4.5
512
False
False
diff --git a/Plugins/DBK ULTIMATE/DBK ULTIMATE/DBK ULTIMATE.csproj b/Plugins/DBK ULTIMATE/DBK ULTIMATE/DBK ULTIMATE.csproj
index 91457755..5367f92d 100644
--- a/Plugins/DBK ULTIMATE/DBK ULTIMATE/DBK ULTIMATE.csproj
+++ b/Plugins/DBK ULTIMATE/DBK ULTIMATE/DBK ULTIMATE.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
DBK_ULTIMATE
DBK ULTIMATE
- v3.5
+ v4.5
512
diff --git a/Plugins/DEATHNOTEDS/DEATHNOTEDS/DEATHNOTEDS.csproj b/Plugins/DEATHNOTEDS/DEATHNOTEDS/DEATHNOTEDS.csproj
index 2ba8f73a..9a01aa2a 100644
--- a/Plugins/DEATHNOTEDS/DEATHNOTEDS/DEATHNOTEDS.csproj
+++ b/Plugins/DEATHNOTEDS/DEATHNOTEDS/DEATHNOTEDS.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
DEATHNOTEDS
DEATHNOTEDS
- v3.5
+ v4.5
512
diff --git a/Plugins/DSDecmp/DSDecmp/DSDecmp.csproj b/Plugins/DSDecmp/DSDecmp/DSDecmp.csproj
index a8fbcd74..9a1d7b7e 100644
--- a/Plugins/DSDecmp/DSDecmp/DSDecmp.csproj
+++ b/Plugins/DSDecmp/DSDecmp/DSDecmp.csproj
@@ -1,9 +1,9 @@
-
+
Debug
AnyCPU
- 9.0.21022
+ 8.0.30703
2.0
{E6F419F9-D6B5-4BE7-99BB-97C48C927FF3}
Library
@@ -14,8 +14,7 @@
- 3.5
- v3.5
+ v4.5
@@ -37,9 +36,6 @@
4
true
-
-
-
@@ -77,18 +73,18 @@
CompressionControl.cs
-
-
- {736010D3-F72F-4C56-B8D2-2EDD1B8F3A87}
- Ekona
-
-
-
-
\ No newline at end of file
+
+
+ {736010D3-F72F-4C56-B8D2-2EDD1B8F3A87}
+ Ekona
+
+
+
diff --git a/Plugins/EDGEWORTH/EDGEWORTH/EDGEWORTH.csproj b/Plugins/EDGEWORTH/EDGEWORTH/EDGEWORTH.csproj
index a1566683..cee50bbb 100644
--- a/Plugins/EDGEWORTH/EDGEWORTH/EDGEWORTH.csproj
+++ b/Plugins/EDGEWORTH/EDGEWORTH/EDGEWORTH.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
EDGEWORTH
EDGEWORTH
- v3.5
+ v4.5
512
diff --git a/Plugins/Fonts/Fonts/Fonts.csproj b/Plugins/Fonts/Fonts/Fonts.csproj
index 62dbc183..238d40ad 100644
--- a/Plugins/Fonts/Fonts/Fonts.csproj
+++ b/Plugins/Fonts/Fonts/Fonts.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Fonts
Fonts
- v3.5
+ v4.5
512
diff --git a/Plugins/GYAKUKEN/GYAKUKEN/GYAKUKEN.csproj b/Plugins/GYAKUKEN/GYAKUKEN/GYAKUKEN.csproj
index ebf4e80c..d6790d52 100644
--- a/Plugins/GYAKUKEN/GYAKUKEN/GYAKUKEN.csproj
+++ b/Plugins/GYAKUKEN/GYAKUKEN/GYAKUKEN.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
GYAKUKEN
GYAKUKEN
- v3.5
+ v4.5
512
diff --git a/Plugins/HETALIA/HETALIA/HETALIA.csproj b/Plugins/HETALIA/HETALIA/HETALIA.csproj
index 93d31428..5fbcef39 100644
--- a/Plugins/HETALIA/HETALIA/HETALIA.csproj
+++ b/Plugins/HETALIA/HETALIA/HETALIA.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
HETALIA
HETALIA
- v3.5
+ v4.5
512
diff --git a/Plugins/INAZUMA11/INAZUMA11/INAZUMA11.csproj b/Plugins/INAZUMA11/INAZUMA11/INAZUMA11.csproj
index 9984e113..8a271f82 100644
--- a/Plugins/INAZUMA11/INAZUMA11/INAZUMA11.csproj
+++ b/Plugins/INAZUMA11/INAZUMA11/INAZUMA11.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
INAZUMA11
INAZUMA11
- v3.5
+ v4.5
512
diff --git a/Plugins/Images/Images/Images.csproj b/Plugins/Images/Images/Images.csproj
index c12de797..df2a17d3 100644
--- a/Plugins/Images/Images/Images.csproj
+++ b/Plugins/Images/Images/Images.csproj
@@ -1,5 +1,5 @@
-
+
{8BB5DA4B-5B71-4993-8941-4F38D4E6C81B}
Debug
@@ -7,7 +7,7 @@
Library
Images
Images
- v3.5
+ v4.5
Properties
diff --git a/Plugins/KIRBY DRO/KIRBY DRO/KIRBY DRO.csproj b/Plugins/KIRBY DRO/KIRBY DRO/KIRBY DRO.csproj
index 1a076b92..4636ce0d 100644
--- a/Plugins/KIRBY DRO/KIRBY DRO/KIRBY DRO.csproj
+++ b/Plugins/KIRBY DRO/KIRBY DRO/KIRBY DRO.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
KIRBY_DRO
KIRBY DRO
- v3.5
+ v4.5
512
diff --git a/Plugins/LASTWINDOW/LASTWINDOW/LASTWINDOW.csproj b/Plugins/LASTWINDOW/LASTWINDOW/LASTWINDOW.csproj
index d6c5649d..230f5d5d 100644
--- a/Plugins/LASTWINDOW/LASTWINDOW/LASTWINDOW.csproj
+++ b/Plugins/LASTWINDOW/LASTWINDOW/LASTWINDOW.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
LASTWINDOW
LASTWINDOW
- v3.5
+ v4.5
512
diff --git a/Plugins/LAYTON/LAYTON/LAYTON.csproj b/Plugins/LAYTON/LAYTON/LAYTON.csproj
index 9950108d..e007a409 100644
--- a/Plugins/LAYTON/LAYTON/LAYTON.csproj
+++ b/Plugins/LAYTON/LAYTON/LAYTON.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
LAYTON
LAYTON
- v3.5
+ v4.5
512
diff --git a/Plugins/LAYTON/LAYTON/Main.cs b/Plugins/LAYTON/LAYTON/Main.cs
index c9f79ace..d983edb0 100644
--- a/Plugins/LAYTON/LAYTON/Main.cs
+++ b/Plugins/LAYTON/LAYTON/Main.cs
@@ -39,11 +39,10 @@ public void Initialize(IPluginHost pluginHost, string gameCode)
public bool IsCompatible()
{
- if (gameCode == "A5FP" || gameCode == "A5FE" || gameCode == "YLTS" || gameCode == "BLFE" ||
- gameCode == "YLTE" || gameCode == "YLTP" || gameCode == "C2AJ")
- return true;
- else
- return false;
+ var testedGames = new[] { "A5FP", "A5FE",
+ "YLTS", "YLTE", "YLTP", "YLTH",
+ "BLFE", "C2AJ"};
+ return testedGames.Contains(gameCode);
}
public Format Get_Format(sFile file, byte[] magic)
{
@@ -73,6 +72,8 @@ public Format Get_Format(sFile file, byte[] magic)
// Professor Layton and the Diabolical Box
case "YLTS":
+ case "YLTP":
+ case "YLTH":
if (file.id >= 0x37 && file.id <= 0x408)
return new Ani(pluginHost, gameCode, "").Get_Formato(file.name);
else if (file.id >= 0x409 & file.id <= 0x808)
@@ -84,12 +85,6 @@ public Format Get_Format(sFile file, byte[] magic)
else if (file.id >= 0x413 && file.id <= 0x818)
return Format.FullImage;
break;
- case "YLTP":
- if (file.id >= 0x37 && file.id <= 0x408)
- return new Ani(pluginHost, gameCode, "").Get_Formato(file.name);
- else if (file.id >= 0x409 && file.id <= 0x808)
- return Format.FullImage;
- break;
// Layton 4 US (London life files)
case "BLFE":
@@ -149,6 +144,8 @@ public Control Show_Info(sFile file)
// Professor Layton and the Diabolical Box
case "YLTS":
+ case "YLTP":
+ case "YLTH":
if (file.id >= 0x37 && file.id <= 0x408)
return new Ani(pluginHost, gameCode, file.path).Show_Info();
else if (file.id >= 0x409 && file.id <= 0x808)
@@ -166,15 +163,6 @@ public Control Show_Info(sFile file)
return bg.Get_Control();
}
break;
- case "YLTP":
- if (file.id >= 0x37 && file.id <= 0x408)
- return new Ani(pluginHost, gameCode, file.path).Show_Info();
- else if (file.id >= 0x409 && file.id <= 0x808)
- {
- Bg bg = new Bg(pluginHost, file.path, file.id, file.name);
- return bg.Get_Control();
- }
- break;
case "C2AJ":
if (file.id >= 0x35 && file.id <= 0xEF)
diff --git a/Plugins/MAPLESTORYDS/MAPLESTORYDS/MAPLESTORYDS.csproj b/Plugins/MAPLESTORYDS/MAPLESTORYDS/MAPLESTORYDS.csproj
index 231fe902..8895edfc 100644
--- a/Plugins/MAPLESTORYDS/MAPLESTORYDS/MAPLESTORYDS.csproj
+++ b/Plugins/MAPLESTORYDS/MAPLESTORYDS/MAPLESTORYDS.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
MAPLESTORYDS
MAPLESTORYDS
- v3.5
+ v4.5
512
diff --git a/Plugins/NINOKUNI/NINOKUNI/NINOKUNI.csproj b/Plugins/NINOKUNI/NINOKUNI/NINOKUNI.csproj
index e7ebecb6..8fb9f138 100644
--- a/Plugins/NINOKUNI/NINOKUNI/NINOKUNI.csproj
+++ b/Plugins/NINOKUNI/NINOKUNI/NINOKUNI.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
NINOKUNI
NINOKUNI
- v3.5
+ v4.5
512
diff --git a/Plugins/NotManagedNetPlugins/NotManagedNetPlugins/NotManagedNetPlugins.csproj b/Plugins/NotManagedNetPlugins/NotManagedNetPlugins/NotManagedNetPlugins.csproj
index e9dc95e1..82a9d1af 100644
--- a/Plugins/NotManagedNetPlugins/NotManagedNetPlugins/NotManagedNetPlugins.csproj
+++ b/Plugins/NotManagedNetPlugins/NotManagedNetPlugins/NotManagedNetPlugins.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
NotManagedNetPlugins
NotManagedNetPlugins
- v3.5
+ v4.5
512
diff --git a/Plugins/PSL/PSL/PSL.csproj b/Plugins/PSL/PSL/PSL.csproj
index 4e82d004..f307e674 100644
--- a/Plugins/PSL/PSL/PSL.csproj
+++ b/Plugins/PSL/PSL/PSL.csproj
@@ -1,5 +1,5 @@
-
+
{E50AD2DD-EA3C-4139-8C0B-F35BFF567D91}
Debug
@@ -7,7 +7,7 @@
Library
PSL
PSL
- v3.5
+ v4.5
Properties
@@ -17,7 +17,6 @@
false
- 3.5
@@ -138,4 +137,4 @@
-
\ No newline at end of file
+
diff --git a/Plugins/Pack/Pack/Games/WARIO7.cs b/Plugins/Pack/Pack/Games/WARIO7.cs
new file mode 100644
index 00000000..46fcb2fe
--- /dev/null
+++ b/Plugins/Pack/Pack/Games/WARIO7.cs
@@ -0,0 +1,112 @@
+//
+// AWAE.cs
+//
+// Author:
+// Benito Palacios Sánchez (aka pleonex)
+//
+// Copyright (c) 2016 Benito Palacios Sánchez
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Windows.Forms;
+using Ekona;
+
+namespace Pack.Games
+{
+ public class WARIO7 : IGamePlugin
+ {
+ private string gameCode;
+ private string[] arcNames = { "wtp_os.arc", "wtp_eu.arc" };
+
+ public void Initialize(IPluginHost pluginHost, string gameCode)
+ {
+ this.gameCode = gameCode;
+ }
+
+ public bool IsCompatible()
+ {
+ return gameCode == "AWAE" || gameCode == "AWAP";
+ }
+
+ public Format Get_Format(sFile file, byte[] magic)
+ {
+ return arcNames.Contains(file.name) ? Format.Pack : Format.Unknown;
+ }
+
+ public Control Show_Info(sFile file)
+ {
+ return new Control();
+ }
+
+ public void Read(sFile file)
+ {
+ }
+
+ public string Pack(ref sFolder unpacked, sFile file)
+ {
+ MessageBox.Show("Not implemented.");
+ return null;
+ }
+
+ public sFolder Unpack(sFile file)
+ {
+ return arcNames.Contains(file.name) ? UnpackArc(file.path) : new sFolder();
+ }
+
+ private static sFolder UnpackArc(string fileIn)
+ {
+ Console.WriteLine("Unpacking ARC file:");
+ var reader = new BinaryReader(File.OpenRead(fileIn));
+ var unpacked = new sFolder();
+
+ uint numFolders = reader.ReadUInt32();
+ unpacked.folders = new List();
+ for (int i = 0; i < numFolders; i++) {
+ Console.WriteLine("Reading folder " + i);
+ reader.BaseStream.Position = 4 + i * 8;
+
+ uint fatOffset = reader.ReadUInt32();
+ uint numFiles = reader.ReadUInt32();
+
+ var subfolder = new sFolder();
+ subfolder.name = "Folder" + i;
+ subfolder.files = new List();
+ for (int j = 0; j < numFiles; j++) {
+ reader.BaseStream.Position = fatOffset + j * 4;
+ uint fileOffset = reader.ReadUInt32();
+
+ var subfile = new sFile();
+ subfile.name = "file" + i + "_" + j;
+ subfile.offset = fileOffset + 8;
+ subfile.path = fileIn;
+
+ reader.BaseStream.Position = fileOffset;
+ subfile.size = reader.ReadUInt32();
+ uint unknown = reader.ReadUInt32();
+ Console.WriteLine("\tunknown for {0} is {1}", subfile.name, unknown);
+ subfolder.files.Add(subfile);
+ }
+
+ unpacked.folders.Add(subfolder);
+ }
+
+ reader.Close();
+ return unpacked;
+ }
+ }
+}
+
diff --git a/Plugins/Pack/Pack/Pack.csproj b/Plugins/Pack/Pack/Pack.csproj
index 22b86915..3a903fb1 100644
--- a/Plugins/Pack/Pack/Pack.csproj
+++ b/Plugins/Pack/Pack/Pack.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Pack
Pack
- v3.5
+ v4.5
512
@@ -32,10 +32,6 @@
4
-
- False
- ..\..\..\Ekona\bin\Debug\Ekona.dll
-
@@ -44,6 +40,9 @@
+
+ ..\..\..\Ekona\bin\Debug\Ekona.dll
+
@@ -63,6 +62,7 @@
+
-
\ No newline at end of file
+
diff --git a/Plugins/SDAT/SDAT/SDAT.csproj b/Plugins/SDAT/SDAT/SDAT.csproj
index b1f12a0f..7e4574c6 100644
--- a/Plugins/SDAT/SDAT/SDAT.csproj
+++ b/Plugins/SDAT/SDAT/SDAT.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
SDAT
SDAT
- v3.5
+ v4.5
512
diff --git a/Plugins/SF FEATHER/SF FEATHER/SF FEATHER.csproj b/Plugins/SF FEATHER/SF FEATHER/SF FEATHER.csproj
index 398c3671..8d8e1e88 100644
--- a/Plugins/SF FEATHER/SF FEATHER/SF FEATHER.csproj
+++ b/Plugins/SF FEATHER/SF FEATHER/SF FEATHER.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
SF_FEATHER
SF FEATHER
- v3.5
+ v4.5
512
diff --git a/Plugins/Sounds/Sounds/Sounds.csproj b/Plugins/Sounds/Sounds/Sounds.csproj
index c7f13536..2f5386e0 100644
--- a/Plugins/Sounds/Sounds/Sounds.csproj
+++ b/Plugins/Sounds/Sounds/Sounds.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Sounds
Sounds
- v3.5
+ v4.5
512
diff --git a/Plugins/TC UTK/TC UTK/TC UTK.csproj b/Plugins/TC UTK/TC UTK/TC UTK.csproj
index 94ca9899..e3f0efba 100644
--- a/Plugins/TC UTK/TC UTK/TC UTK.csproj
+++ b/Plugins/TC UTK/TC UTK/TC UTK.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TC_UTK
TC UTK
- v3.5
+ v4.5
512
diff --git a/Plugins/TETRIS DS/TETRIS DS/TETRIS DS.csproj b/Plugins/TETRIS DS/TETRIS DS/TETRIS DS.csproj
index c5efec4f..4d82c8d8 100644
--- a/Plugins/TETRIS DS/TETRIS DS/TETRIS DS.csproj
+++ b/Plugins/TETRIS DS/TETRIS DS/TETRIS DS.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TETRIS_DS
TETRIS DS
- v3.5
+ v4.5
512
diff --git a/Plugins/TIMEACE/TIMEACE/TIMEACE.csproj b/Plugins/TIMEACE/TIMEACE/TIMEACE.csproj
index e67a9b16..ef45f100 100644
--- a/Plugins/TIMEACE/TIMEACE/TIMEACE.csproj
+++ b/Plugins/TIMEACE/TIMEACE/TIMEACE.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TIMEACE
TIMEACE
- v3.5
+ v4.5
512
diff --git a/Plugins/TOKIMEKIGS3S/TOKIMEKIGS3S/TOKIMEKIGS3S.csproj b/Plugins/TOKIMEKIGS3S/TOKIMEKIGS3S/TOKIMEKIGS3S.csproj
index 97598c59..c475de0a 100644
--- a/Plugins/TOKIMEKIGS3S/TOKIMEKIGS3S/TOKIMEKIGS3S.csproj
+++ b/Plugins/TOKIMEKIGS3S/TOKIMEKIGS3S/TOKIMEKIGS3S.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TOKIMEKIGS3S
TOKIMEKIGS3S
- v3.5
+ v4.5
512
diff --git a/Plugins/TOTTEMPEST/TOTTEMPEST/TOTTEMPEST.csproj b/Plugins/TOTTEMPEST/TOTTEMPEST/TOTTEMPEST.csproj
index da53a98e..40aca3c1 100644
--- a/Plugins/TOTTEMPEST/TOTTEMPEST/TOTTEMPEST.csproj
+++ b/Plugins/TOTTEMPEST/TOTTEMPEST/TOTTEMPEST.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TOTTEMPEST
TOTTEMPEST
- v3.5
+ v4.5
512
diff --git a/Plugins/TXT/TXT/TXT.csproj b/Plugins/TXT/TXT/TXT.csproj
index 7bd596a7..87bfcd12 100644
--- a/Plugins/TXT/TXT/TXT.csproj
+++ b/Plugins/TXT/TXT/TXT.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
TXT
TXT
- v3.5
+ v4.5
512
False
False
diff --git a/Plugins/TXT/TXT/iTXT.Designer.cs b/Plugins/TXT/TXT/iTXT.Designer.cs
index a4e73d33..05d535b0 100644
--- a/Plugins/TXT/TXT/iTXT.Designer.cs
+++ b/Plugins/TXT/TXT/iTXT.Designer.cs
@@ -59,16 +59,9 @@ private void InitializeComponent()
//
// txtBox
//
- this.txtBox.Dock = System.Windows.Forms.DockStyle.Top;
- this.txtBox.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.txtBox.HideSelection = false;
this.txtBox.Location = new System.Drawing.Point(0, 0);
- this.txtBox.Multiline = true;
this.txtBox.Name = "txtBox";
- this.txtBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
- this.txtBox.Size = new System.Drawing.Size(510, 466);
this.txtBox.TabIndex = 0;
- this.txtBox.WordWrap = false;
//
// btnSave
//
@@ -130,7 +123,6 @@ private void InitializeComponent()
// iTXT
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.checkWordWrap);
diff --git a/Plugins/TXT/TXT/iTXT.cs b/Plugins/TXT/TXT/iTXT.cs
index 786186e4..987d56cb 100644
--- a/Plugins/TXT/TXT/iTXT.cs
+++ b/Plugins/TXT/TXT/iTXT.cs
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 pleoNeX
+ * Copyright (C) 2011-2016 pleoNeX
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,50 +18,45 @@
*
*/
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Ekona;
+using System.Xml.Linq;
+using System.Drawing;
namespace TXT
{
public partial class iTXT : UserControl
{
- IPluginHost pluginHost;
- int id;
- byte[] text;
+ private IPluginHost pluginHost;
+ private int id;
+ private byte[] text;
public iTXT(byte[] text, IPluginHost pluginHost, int id)
{
InitializeComponent();
+ // TextBox parameter
+ this.txtBox.Dock = DockStyle.Top;
+ this.txtBox.Font = new Font(FontFamily.GenericMonospace, 11);
+ this.txtBox.HideSelection = false;
+ this.txtBox.Multiline = true;
+ this.txtBox.WordWrap = this.checkWordWrap.Checked;
+ this.txtBox.ScrollBars = ScrollBars.Both;
+ this.txtBox.Size = new Size(510, 466);
+
this.pluginHost = pluginHost;
this.id = id;
this.text = text;
+ // TODO: Compare preamble with supported encodings.
if ((text[0] == 0xFE && text[1] == 0xFF) || (text[0] == 0xFF && text[1] == 0xFE))
- {
- txtBox.Text = Descodificar(Encoding.Unicode);
- comboEncod.SelectedIndex = 1;
- }
+ comboEncod.SelectedIndex = 2;
else if (BitConverter.ToUInt16(text, 0) == 0xBBEF)
- {
- txtBox.Text = Descodificar(Encoding.UTF8);
comboEncod.SelectedIndex = 4;
- }
else
- {
- txtBox.Text = Descodificar(Encoding.UTF7);
- comboEncod.SelectedIndex = 0;
- }
-
- txtBox.Text = txtBox.Text.Replace("\n", "\r\n");
- txtBox.Text = txtBox.Text.Replace("\0", "\\0");
+ comboEncod.SelectedIndex = 1;
ReadLanguage();
}
@@ -71,39 +66,47 @@ private void btnSave_Click(object sender, EventArgs e)
string tempFile = Path.GetTempFileName();
string textSave = txtBox.Text;
- textSave = textSave.Replace("\\0", "\0");
+ textSave = textSave.Replace("\\0", "\0"); // FIXME: This could cause issues.
text = Encoding.GetEncoding(comboEncod.Text).GetBytes(textSave);
+
File.WriteAllBytes(tempFile, text);
pluginHost.ChangeFile(id, tempFile);
}
private void ReadLanguage()
{
- try
- {
- System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + System.IO.Path.DirectorySeparatorChar +
- "Plugins" + System.IO.Path.DirectorySeparatorChar + "TXTLang.xml");
+ try {
+ var pluginPath = Path.Combine(Application.StartupPath, "Plugins");
+ var xml = XElement.Load(Path.Combine(pluginPath, "TXTLang.xml"));
xml = xml.Element(pluginHost.Get_Language());
xml = xml.Element("TXT");
btnSave.Text = xml.Element("S00").Value;
- label1.Text = xml.Element("S01").Value;
+ label1.Text = xml.Element("S01").Value;
checkWordWrap.Text = xml.Element("S02").Value;
- }
- catch { throw new Exception("There was an error reading the XML file of language."); }
+ } catch (Exception ex) {
+ throw new Exception("Exception reading the XML language file.", ex);
+ }
}
- private String Descodificar(Encoding encoding)
+ private string Decode(Encoding encoding)
{
- String texto = new String(encoding.GetChars(text));
- texto = texto.Replace("\n", "\r\n");
- texto = texto.Replace("\0", "\\0");
+ string decodedText = encoding.GetString(text);
+
+ // The textbox component excepts Windows EOL.
+ if (!decodedText.Contains("\r\n"))
+ decodedText = decodedText.Replace("\n", "\r\n");
- return texto;
+ // Replace this to view binary text. This could cause issues.
+ decodedText = decodedText.Replace("\0", "\\0");
+
+ return decodedText;
}
+
private void comboEncod_SelectedIndexChanged(object sender, EventArgs e)
{
- txtBox.Text = Descodificar(Encoding.GetEncoding(comboEncod.Text));
+ txtBox.Text = Decode(Encoding.GetEncoding(comboEncod.Text));
+ this.txtBox.Select(0, 0);
}
private void checkWordWrap_CheckedChanged(object sender, EventArgs e)
diff --git a/Plugins/Teniprimgaku/Teniprimgaku/Teniprimgaku.csproj b/Plugins/Teniprimgaku/Teniprimgaku/Teniprimgaku.csproj
index a4383812..31fc06e6 100644
--- a/Plugins/Teniprimgaku/Teniprimgaku/Teniprimgaku.csproj
+++ b/Plugins/Teniprimgaku/Teniprimgaku/Teniprimgaku.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Teniprimgaku
Teniprimgaku
- v3.5
+ v4.5
512
diff --git a/Plugins/Tokimemo1/Tokimemo1/Tokimemo1.csproj b/Plugins/Tokimemo1/Tokimemo1/Tokimemo1.csproj
index 6db90870..fcaf52f7 100644
--- a/Plugins/Tokimemo1/Tokimemo1/Tokimemo1.csproj
+++ b/Plugins/Tokimemo1/Tokimemo1/Tokimemo1.csproj
@@ -1,5 +1,5 @@
-
+
{72F91032-09EA-4DAF-8592-8BC05FB8F8E8}
Debug
@@ -7,7 +7,7 @@
Library
Tokimemo1
Tokimemo1
- v3.5
+ v4.5
Properties
False
False
diff --git a/Plugins/WITCHTALE/WITCHTALE/WITCHTALE.csproj b/Plugins/WITCHTALE/WITCHTALE/WITCHTALE.csproj
index ac5d582a..e8aae7cb 100644
--- a/Plugins/WITCHTALE/WITCHTALE/WITCHTALE.csproj
+++ b/Plugins/WITCHTALE/WITCHTALE/WITCHTALE.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
WITCHTALE
WITCHTALE
- v3.5
+ v4.5
512
diff --git a/README.md b/README.md
index 5439f32b..1d6bf5dd 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,13 @@
-> Tinke is a program to see, convert, and edit the **files of NDS games**. You can see a lot of format files like images, text, sounds, fonts and textures. Furthermore it works with **plugins** made in NET Framework languages (C# and VB.NET) so it's so easy to support new formats.
+# Tinke
+
+
+
+
+
-To run the program you must have installed **[.NET Framework 4.0](http://www.microsoft.com/en-us/download/details.aspx?id=17718)** or **[mono](http://www.mono-project.com/download)**. In the case of *mono* on *Linux*, make sure you have installed the package **mono-locale-extras** too.
+> Tinke is a program to see, convert, and edit the **files of NDS games**. You can see a lot of format files like images, text, sounds, fonts and textures. Furthermore it works with **plugins** made in NET Framework languages (C# and VB.NET) so it's so easy to support new formats.
-Discussion group / _Foro de discusión_ : https://groups.google.com/forum/#!forum/tinke
+To run the program you must have installed **[.NET Framework 4.5](https://www.microsoft.com/es-es/download/details.aspx?id=30653)** or **[mono](http://www.mono-project.com/download)**. In the case of *mono* on *Linux*, make sure you have installed the package **mono-locale-extras** too.
Thread at GBAtemp.net: http://gbatemp.net/topic/303529-tinke-072/
@@ -88,13 +93,14 @@ Thread at GBAtemp.net: http://gbatemp.net/topic/303529-tinke-072/
Link to web pages with NDS info:
* http://llref.emutalk.net/docs
- * http://nocash.emubase.de/gbatek.htm
+ * http://problemkaputt.de/gbatek.htm
* http://sites.google.com/site/kiwids/sdat.html
----
## Compile instructions
-* Windows: run Compile.bat
+* Windows: run compile.bat
+* Unix: ./compile.sh
## Screenshots
![Tinke 0.8.1](https://lh5.googleusercontent.com/-GRKvfv-TAaI/ToBy1_eFrfI/AAAAAAAAASA/9WDkc_OQPC4/s800/Tinke%2525200.8.1.PNG)
diff --git a/Tinke.mdw b/Tinke.mdw
new file mode 100644
index 00000000..07f0e740
--- /dev/null
+++ b/Tinke.mdw
@@ -0,0 +1,38 @@
+
+
+ - Tinke.sln
+ - Plugins/3DModels/3DModels.sln
+ - Plugins/999HRPERDOOR/999HRPERDOOR.sln
+ - Plugins/AI IGO DS/AI IGO DS.sln
+ - Plugins/BLOODBAHAMUT/BLOODBAHAMUT.sln
+ - Plugins/Common/Common.sln
+ - Plugins/DBK ULTIMATE/DBK ULTIMATE.sln
+ - Plugins/DEATHNOTEDS/DEATHNOTEDS.sln
+ - Plugins/EDGEWORTH/EDGEWORTH.sln
+ - Plugins/Fonts/Fonts.sln
+ - Plugins/GYAKUKEN/GYAKUKEN.sln
+ - Plugins/HETALIA/HETALIA.sln
+ - Plugins/Images/Images.sln
+ - Plugins/INAZUMA11/INAZUMA11.sln
+ - Plugins/KIRBY DRO/KIRBY DRO.sln
+ - Plugins/LASTWINDOW/LASTWINDOW.sln
+ - Plugins/LAYTON/LAYTON.sln
+ - Plugins/MAPLESTORYDS/MAPLESTORYDS.sln
+ - Plugins/NINOKUNI/NINOKUNI.sln
+ - Plugins/NotManagedNetPlugins/NotManagedNetPlugins.sln
+ - Plugins/Pack/Pack.sln
+ - Plugins/PSL/PSL.sln
+ - Plugins/SDAT/SDAT.sln
+ - Plugins/SF FEATHER/SF FEATHER.sln
+ - Plugins/Sounds/Sounds.sln
+ - Plugins/TC UTK/TC UTK.sln
+ - Plugins/Teniprimgaku/Teniprimgaku.sln
+ - Plugins/TETRIS DS/TETRIS DS.sln
+ - Plugins/TIMEACE/TIMEACE.sln
+ - Plugins/TOKIMEKIGS3S/TOKIMEKIGS3S.sln
+ - Plugins/Tokimemo1/Tokimemo1.sln
+ - Plugins/TOTTEMPEST/TOTTEMPEST.sln
+ - Plugins/TXT/TXT.sln
+ - Plugins/WITCHTALE/WITCHTALE.sln
+
+
\ No newline at end of file
diff --git a/Tinke.sln b/Tinke.sln
index c6fa6fc2..722ec683 100644
--- a/Tinke.sln
+++ b/Tinke.sln
@@ -1,6 +1,8 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tinke", "Tinke\Tinke.csproj", "{0C21698B-0FC4-48E8-90FD-0DA70BFE9BB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ekona", "Ekona\Ekona.csproj", "{736010D3-F72F-4C56-B8D2-2EDD1B8F3A87}"
diff --git a/Tinke/Acciones.cs b/Tinke/Acciones.cs
index 1ee165b1..23042083 100644
--- a/Tinke/Acciones.cs
+++ b/Tinke/Acciones.cs
@@ -92,7 +92,11 @@ public void Load_Plugins()
if (!pluginType.IsPublic || pluginType.IsAbstract || pluginType.IsInterface)
continue;
- Type concreteType = pluginType.GetInterface(typeof(IPlugin).FullName, true);
+ Type concreteType = null;
+ // WORKAROUND: for bug in mono.
+ foreach (Type inter in pluginType.GetInterfaces())
+ if (inter.FullName == typeof(IPlugin).FullName)
+ concreteType = inter;
if (concreteType != null)
{
IPlugin plugin = (IPlugin)Activator.CreateInstance(assembly.GetType(pluginType.ToString()));
@@ -101,7 +105,10 @@ public void Load_Plugins()
} // end if
else
{
- concreteType = pluginType.GetInterface(typeof(IGamePlugin).FullName, true);
+ // WORKAROUND: for bug in mono.
+ foreach (Type inter in pluginType.GetInterfaces())
+ if (inter.FullName == typeof(IGamePlugin).FullName)
+ concreteType = inter;
if (concreteType != null)
{
IGamePlugin plugin = (IGamePlugin)Activator.CreateInstance(assembly.GetType(pluginType.ToString()));
diff --git a/Tinke/Autores.Designer.cs b/Tinke/Autores.Designer.cs
index 591cd68d..503756ee 100644
--- a/Tinke/Autores.Designer.cs
+++ b/Tinke/Autores.Designer.cs
@@ -261,7 +261,7 @@ private void InitializeComponent()
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(296, 17);
this.label8.TabIndex = 19;
- this.label8.Text = "ana1is1a rafael1193 go11um CUE";
+ this.label8.Text = "ana1is1a rafael1193 go11um CUE MetLob";
//
// lblTrad
//
diff --git a/Tinke/Dialog/FATExtract.cs b/Tinke/Dialog/FATExtract.cs
index cd2bf47f..bda3febf 100644
--- a/Tinke/Dialog/FATExtract.cs
+++ b/Tinke/Dialog/FATExtract.cs
@@ -364,8 +364,11 @@ private void btnCancel_Click(object sender, EventArgs e)
}
private void btnHex_Click(object sender, EventArgs e)
{
- VisorHex hex = new VisorHex(fat.files[listBoxFiles.SelectedIndex]);
- hex.Show();
+ var selectedFile = fat.files[listBoxFiles.SelectedIndex];
+ if (Type.GetType("Mono.Runtime") == null)
+ new VisorHex(selectedFile).Show();
+ else
+ new VisorHexBasic(selectedFile).Show();
}
public sFolder Files
diff --git a/Tinke/Properties/AssemblyInfo.cs b/Tinke/Properties/AssemblyInfo.cs
index c7918f27..d29bb5be 100644
--- a/Tinke/Properties/AssemblyInfo.cs
+++ b/Tinke/Properties/AssemblyInfo.cs
@@ -2,35 +2,15 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// La información general sobre un ensamblado se controla mediante el siguiente
-// conjunto de atributos. Cambie estos atributos para modificar la información
-// asociada con un ensamblado.
[assembly: AssemblyTitle("Tinke")]
-[assembly: AssemblyDescription("NDScene")]
+[assembly: AssemblyDescription("Viewer and editor for files of NDS games")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("pleoNeX")]
+[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Tinke")]
-[assembly: AssemblyCopyright("Copyright © 2012 pleoNeX")]
+[assembly: AssemblyCopyright("Copyright © 2012-2016 pleoNeX")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-
-// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
-// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
-// COM, establezca el atributo ComVisible como true en este tipo.
[assembly: ComVisible(false)]
-
-// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
[assembly: Guid("1c265b8f-3f75-4fd8-83a6-7b1a2de4dd38")]
-
-// La información de versión de un ensamblado consta de los cuatro valores siguientes:
-//
-// Versión principal
-// Versión secundaria
-// Número de versión de compilación
-// Revisión
-//
-// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
-// mediante el asterisco ('*'), como se muestra a continuación:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.0.0")]
-[assembly: AssemblyFileVersion("0.9.0.0")]
+[assembly: AssemblyVersion("0.9.2")]
+[assembly: AssemblyFileVersion("0.9.2")]
diff --git a/Tinke/Sistema.cs b/Tinke/Sistema.cs
index 34a8fd4d..a7e2c307 100644
--- a/Tinke/Sistema.cs
+++ b/Tinke/Sistema.cs
@@ -874,10 +874,7 @@ private void treeSystem_AfterSelect(object sender, TreeViewEventArgs e)
listFile.Items[6].SubItems.Add(accion.Get_RelativePath(selectFile.id, "", accion.Root));
toolStripOpenAs.Enabled = true;
- if (isMono)
- btnHex.Enabled = false;
- else
- btnHex.Enabled = true;
+ btnHex.Enabled = true;
if (selectFile.format != Format.Unknown)
btnSee.Enabled = true;
@@ -1045,17 +1042,23 @@ private void Recursive_ReadFile(sFolder currFolder)
private void btnHex_Click(object sender, EventArgs e)
{
sFile file = accion.Selected_File();
- VisorHex hex = new VisorHex(accion.Save_File(file), file.id,
- file.name == "rom.nds" ? false : true);
+ string filePath = accion.Save_File(file);
+ Form hex;
+
+ if (!isMono) {
+ hex = new VisorHex(filePath, file.id, file.name != "rom.nds");
+ hex.FormClosed += hex_FormClosed;
+ } else {
+ hex = new VisorHexBasic(filePath, 0, file.size);
+ }
hex.Text += " - " + file.name;
hex.Show();
- hex.FormClosed += new FormClosedEventHandler(hex_FormClosed);
}
void hex_FormClosed(object sender, FormClosedEventArgs e)
{
- VisorHex hex = (VisorHex)sender;
- if (hex.Edited)
+ VisorHex hex = sender as VisorHex;
+ if (sender != null && hex.Edited)
accion.Change_File(hex.FileID, hex.NewFile);
}
diff --git a/Tinke/Tinke.csproj b/Tinke/Tinke.csproj
index db3626f0..9f276808 100644
--- a/Tinke/Tinke.csproj
+++ b/Tinke/Tinke.csproj
@@ -1,23 +1,22 @@
-
+
Debug
AnyCPU
- 9.0.30729
+ 8.0.30703
2.0
{0C21698B-0FC4-48E8-90FD-0DA70BFE9BB8}
WinExe
Properties
Tinke
Tinke
- v3.5
+ v4.5
512
Tinke.Program
- 3.5
publish\
true
Disk
@@ -49,6 +48,11 @@
prompt
false
4
+ Project
+ False
+ Auto
+ 4194304
+ AnyCPU
pdbonly
@@ -57,6 +61,10 @@
prompt
true
4
+ False
+ Auto
+ 4194304
+ AnyCPU
True
@@ -68,6 +76,13 @@
Full
prompt
false
+ Project
+ False
+ Auto
+ 4194304
+ 4
+ false
+ x86
bin\x86\Release\
@@ -76,6 +91,12 @@
prompt
false
false
+ False
+ Auto
+ 4194304
+ 4
+ true
+ x86
true
@@ -84,6 +105,10 @@
full
prompt
false
+ Project
+ 4
+ false
+ x64
bin\x64\Release\
@@ -93,6 +118,9 @@
false
false
false
+ 4
+ true
+ x64
nintendo-ds.ico
@@ -116,26 +144,14 @@
Auto
4194304
-
- true
-
-
- true
-
-
- False
- 4
-
-
-
-
+
@@ -293,42 +309,29 @@
Settings.settings
True
+
+ Form
+
+
+ VisorHexBasic.cs
+
+
+ VisorHexBasic.cs
+
{26C5F25F-B450-4CAF-AD8B-B8D11AE73457}
Be.Windows.Forms.HexBox
-
- {736010D3-F72F-4C56-B8D2-2EDD1B8F3A87}
- Ekona
-
{E6F419F9-D6B5-4BE7-99BB-97C48C927FF3}
DSDecmp
-
-
-
- False
- Microsoft .NET Framework 4 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
- False
- Windows Installer 3.1
- true
-
+
+ {736010D3-F72F-4C56-B8D2-2EDD1B8F3A87}
+ Ekona
+
@@ -374,11 +377,11 @@
-
-
\ No newline at end of file
+
diff --git a/Tinke/VisorHexBasic.Designer.cs b/Tinke/VisorHexBasic.Designer.cs
new file mode 100644
index 00000000..905cdb8b
--- /dev/null
+++ b/Tinke/VisorHexBasic.Designer.cs
@@ -0,0 +1,80 @@
+namespace Tinke
+{
+ partial class VisorHexBasic
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VisorHex));
+ this.txtHex = new System.Windows.Forms.TextBox();
+ this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
+ this.SuspendLayout();
+ //
+ // txtHex
+ //
+ this.txtHex.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.txtHex.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtHex.Font = new System.Drawing.Font("Consolas", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.txtHex.Location = new System.Drawing.Point(0, 0);
+ this.txtHex.Multiline = true;
+ this.txtHex.Name = "txtHex";
+ this.txtHex.Size = new System.Drawing.Size(795, 272);
+ this.txtHex.TabIndex = 2;
+ //
+ // vScrollBar1
+ //
+ this.vScrollBar1.Dock = System.Windows.Forms.DockStyle.Right;
+ this.vScrollBar1.Location = new System.Drawing.Point(790, 0);
+ this.vScrollBar1.Name = "vScrollBar1";
+ this.vScrollBar1.Size = new System.Drawing.Size(19, 272);
+ this.vScrollBar1.TabIndex = 3;
+ this.vScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.vScrollBar1_Scroll);
+ //
+ // VisorHex
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(809, 275);
+ this.Controls.Add(this.vScrollBar1);
+ this.Controls.Add(this.txtHex);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(825, 38);
+ this.Name = "VisorHex";
+ this.Text = "S41";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox txtHex;
+ private System.Windows.Forms.VScrollBar vScrollBar1;
+
+
+ }
+}
\ No newline at end of file
diff --git a/Tinke/VisorHexBasic.cs b/Tinke/VisorHexBasic.cs
new file mode 100644
index 00000000..4f4898f8
--- /dev/null
+++ b/Tinke/VisorHexBasic.cs
@@ -0,0 +1,194 @@
+//
+// VisorHexBasic.cs
+//
+// Author:
+// Benito Palacios Sánchez (aka pleonex)
+//
+// Copyright (c) 2016 Benito Palacios Sánchez
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+using System;
+using System.IO;
+using System.Windows.Forms;
+using Ekona;
+using System.Drawing;
+using System.Text;
+
+namespace Tinke
+{
+ public partial class VisorHexBasic : Form
+ {
+ private const int BytesPerRow = 0x10; // Not tested with different values.
+
+ private int mouseWheelDelta;
+
+ private Stream file;
+ private uint offset;
+ private uint size;
+
+ public VisorHexBasic(string file, UInt32 offset, UInt32 size)
+ {
+ this.file = File.OpenRead(file);
+ this.size = size;
+ this.offset = offset;
+
+ Initialize();
+ }
+
+ public VisorHexBasic(sFile gameFile)
+ {
+ this.file = File.OpenRead(gameFile.path);
+ this.size = gameFile.size;
+ this.offset = gameFile.offset;
+
+ Initialize();
+ }
+
+ private void Initialize()
+ {
+ InitializeComponent();
+ Text = Tools.Helper.GetTranslation("Sistema", "S41");
+ FormClosed += (sender, e) => file.Close();
+
+ txtHex.Font = new Font(FontFamily.GenericMonospace, 11F);
+ txtHex.ReadOnly = true;
+ txtHex.HideSelection = false;
+ txtHex.MouseWheel += TxtHex_MouseWheel;
+ txtHex.KeyDown += TxtHex_KeyDown;
+ Resize += VisorHex_Resize;
+
+ vScrollBar1.Maximum = (int)size / BytesPerRow;
+ ShowHex(0);
+ }
+
+ public void Clear()
+ {
+ txtHex.Text = string.Empty;
+ }
+
+
+ private void TxtHex_KeyDown(object sender, KeyEventArgs e)
+ {
+ // Large scrolling with page down and page up.
+ if (e.KeyCode == Keys.PageDown)
+ UpdateScrollBar(vScrollBar1.Value + vScrollBar1.LargeChange);
+ else if (e.KeyCode == Keys.PageUp)
+ UpdateScrollBar(vScrollBar1.Value - vScrollBar1.LargeChange);
+
+ // Small scrolling with up and down.
+ if (e.KeyCode == Keys.Down) {
+ int lastLineIdx = txtHex.GetCharIndexFromPosition(
+ new Point(0, txtHex.Height));
+
+ if (txtHex.SelectionStart >= lastLineIdx) {
+ int currentPos = txtHex.SelectionStart; // Keep because it will change
+ UpdateScrollBar(vScrollBar1.Value + vScrollBar1.SmallChange);
+ txtHex.SelectionStart = currentPos;
+ }
+ } else if (e.KeyCode == Keys.Up) {
+ int firstLineIdx = txtHex.GetCharIndexFromPosition(
+ new Point(txtHex.Width, 0));
+
+ if (txtHex.SelectionStart <= firstLineIdx) {
+ int currentPos = txtHex.SelectionStart; // Keep because it will change
+ UpdateScrollBar(vScrollBar1.Value - vScrollBar1.SmallChange);
+ txtHex.SelectionStart = currentPos;
+ }
+ }
+ }
+
+ private void TxtHex_MouseWheel(object sender, MouseEventArgs e)
+ {
+ // Because a mouse wheel notch could be less than 120, sum until it reachs
+ // that value and then divide to get the number of notchs.
+ // 120 has been the classic mouse wheel notch value but new mouse could have
+ // more definition.
+ const int WheelDelta = 120;
+ mouseWheelDelta = e.Delta * -1; // Normally we go down when scrolling up
+ if (Math.Abs(mouseWheelDelta) >= WheelDelta) {
+ int notchs = mouseWheelDelta / WheelDelta;
+ UpdateScrollBar(vScrollBar1.Value + vScrollBar1.SmallChange * notchs);
+ mouseWheelDelta %= WheelDelta;
+ }
+ }
+
+ private void UpdateScrollBar(int scrollValue)
+ {
+ // Safety check because we'll get an exception otherwise
+ if (scrollValue < vScrollBar1.Minimum)
+ scrollValue = vScrollBar1.Minimum;
+ else if (scrollValue > vScrollBar1.Maximum)
+ scrollValue = vScrollBar1.Maximum;
+
+ // We can get some speed improvement to avoid reading file again.
+ if (scrollValue != vScrollBar1.Value) {
+ vScrollBar1.Value = scrollValue;
+ ShowHex(vScrollBar1.Value);
+ }
+ }
+
+ private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
+ {
+ ShowHex(e.NewValue);
+ }
+
+ private void ShowHex(int pos)
+ {
+ BinaryReader br = new BinaryReader(file);
+ file.Position = offset + pos * BytesPerRow;
+
+ // Create the header
+ StringBuilder hexBuilder = new StringBuilder();
+ hexBuilder.Append("Offset".PadRight(13));
+ for (int i = 0; i < BytesPerRow; i++)
+ hexBuilder.AppendFormat(" {0:X2}", i);
+ hexBuilder.AppendLine();
+ hexBuilder.AppendLine();
+
+ int numRows = txtHex.Height / txtHex.Font.Height - 2;
+ bool eof = false;
+ for (int r = 0; r < numRows && !eof; r++) {
+ hexBuilder.AppendFormat("0x{0:X8} ", (pos + r) * BytesPerRow);
+
+ var asciiBuilder = new StringBuilder(" ");
+ for (int c = 0; c < BytesPerRow && !eof; c++) {
+ if (file.Position >= offset + size) {
+ eof = true;
+ break;
+ }
+
+ byte value = br.ReadByte();
+ hexBuilder.AppendFormat(" {0:X2}", value);
+ if (value > 0x1F && value < 0x7F)
+ asciiBuilder.Append(" " + (char)value);
+ else
+ asciiBuilder.Append(" .");
+ }
+
+ hexBuilder.Append(asciiBuilder.ToString());
+ if (r != numRows - 1)
+ hexBuilder.AppendLine();
+ }
+
+ txtHex.Text = hexBuilder.ToString();
+ txtHex.Select(0, 0);
+ }
+
+ private void VisorHex_Resize(object sender, EventArgs e)
+ {
+ ShowHex(vScrollBar1.Value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Tinke/VisorHexBasic.resx b/Tinke/VisorHexBasic.resx
new file mode 100644
index 00000000..1605b49e
--- /dev/null
+++ b/Tinke/VisorHexBasic.resx
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA
+ AAD///8A////ALtqNGu6ZTC8u2Yx7bpmMPe6ZjD3umYw97plMPe6ZS/3uWUu97llLve5ZC73uWQu77di
+ LL23Yi5j////AP///wC8aTPe+PHq8vfs3/32697/9ure//bq3P/26tz/+vPr//rz6//68ur//Pfz//z4
+ 9P3+/v3wt2Aq1f///wD///8Av3E49fXr3/79v2j//L1n//u+Zf/8vmT//L5k//y9Yv/7vWP/+7xh//y+
+ YP/8vGL//fv4/blkLfP///8A////AMF4PPf37eP//cJu///YoP//157//9ab///XmP//1pb//9aV///V
+ lP//1JP/+75l//v39P+7ZzH3Qj042UhCPNlLPjH+WFRP/7aGQv89MCD/QTUk/zcrG/87LBX/97NS//ez
+ Uv/3slH/97JP//eyT//8+fX/v28292NbVP+nmo3/cGde/0U/Ov+tnJH/XFVO/5aKf/9mXlb/GxkY//zk
+ 0f/84s7//OLM//vgyf/74cj//fr3/8F2O/dxaF//wbar/3lwZv9iXFb/uqmc/25mXf+9saX/fnRq/zMu
+ K//95dP//OTR//zizf/74cv/++HJ//v38v/FfD/3dWxj+MS5r/+nmo3/gHpz/9bDtP9sY1z/u6+k/6aY
+ i/9TTUb//eXT//vk0P/748z/+t/H//rfxv/68ur/xoBC92ZeVu9pYVj/Vk9I/01JRv+MgHf/QDs3/0ZC
+ PP89ODP/LCgl//zk0f/74cz/+uDH//ndw//43ML/+vTt/8aCRfc+OTSFW1RN/7CgkP9pXVH/hnRl/2NY
+ Tv+qmIj/WlFK/4V5bv/74cz/+t/H//jcwv/22r3/9ti7//r07//Gg0b3lYl9HWZeVvOFeG//SkE7/5WG
+ ev9WSkD/koN0/09HQP/kz7v/+uDI//jcwv/11rv/89S1//HSs//49PD/xIJG93VsYw+YjICPnI+D/1JM
+ R//Lt6f/VE1H/5CFef+ajH//9d3G//ndxP/22bz/9Onf//fy7P/79/P/9e/p/8J+Rfv///8Akod7Endt
+ Yv91bWX/3ci1/29mXv9sYln/++LL//ngyP/43ML/9da6//37+P/85s3/+uXJ/+K2hP+/eUKm////AP//
+ /wDFiEvq+vby/Prgx//74cn/++LJ//vgyP/538X/+NvB//TWuP//+/j/9ti0/+Gwff/bkmT2tGs+B///
+ /wD///8AxIVJw/fy7Oz49O78+PTt//jz7f/48+3/+PPt//jy7P/38uz/8ubX/+Kyff/blGX1s2g7B///
+ /wD///8A////AMF9RGDIi027yIxP7siMT/bIjE/3yIxP98iNT/fJjE/3x4tP98WJS9TEdjuRs2g8Bv//
+ /wD///8AwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAMAA
+ AADAAQAAwAMAAA==
+
+
+
\ No newline at end of file
diff --git a/Tinke/langs/en-us.xml b/Tinke/langs/en-us.xml
index 5a1a43ac..a1d7512a 100644
--- a/Tinke/langs/en-us.xml
+++ b/Tinke/langs/en-us.xml
@@ -126,7 +126,7 @@
File Allocation Table (FAT) offset
File Allocation Table (FAT) length
ARM9 overlay offset
- ARM9 overlay legnth
+ ARM9 overlay length
ARM7 overlay offset
ARM7 overlay length
Normal card control register settings
diff --git a/changelog.txt b/changelog.txt
index e378a4d6..6b413b71 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,68 @@
+0.9.2
+** Improve Hexadecimal Viewer for Mono (Linux and Mac OS)
+* Fix crash opening HexViewer from FAT dialog on Mono.
+* Fix project files and compile script for Windows.
+
+0.9.1
+** Support partition cell sections (#18, #19).
+* Add basic hexadecimal viewer for mono.
+* Add support for WARIO7 ARC pack file.
+* Add support for Layton2 Dutch version.
+* Fix #14: size and format were default values when using CallPlugin.
+* Fix #16: ROM size header value was not updated on ROM generation.
+* Fix #7: Import images was using always the first palette.
+* Fix #8: Not writing last segment of raw images.
+* Fix #20: Wrong math formula for color distance.
+* Fix mono issues.
+* Upgrade to .NET Framework 4.5.
+
+0.9.0 (first GitHub release)
+*** Improve performance.
+*** Alpha 3D model viewer.
+*** OAM Editor and importer.
+** Add support for ADX sound files.
+** Add support for Procyon codec for sound files.
+** Add support for Layton London Life game.
+** Add support for Pokemon Conquest.
+** New options to import images.
+* New window in "Open as->" to force to use a plugin to open the file.
+* Show more info about SDAT files.
+* Add shortcut F3 in hex viewer to search next value.
+* New shortcut search for the first 4 bytes: Header XXXXXXXX.
+* More support for Inazuma Eleven games.
+* Add support for NARUTO_POTN.
+* Add support for TIME HOLLOW.
+* Add support for TIMEACE.
+* Add support for ALAR pack files.
+* Add support for WITCHTALE.
+* Add support for Hetalia game.
+* Add support for Trauma Center game.
+* Add support for GTA CTW.
+* Add support for ROCKMAN.EXE.
+* Add unpackers for 4HEROSLIGHT.
+* Add unpackers for RR3BACE.
+* Add support for files in Layton1 and Layton2.
+* Add support for pack file in Death Note DS.
+* Add support for images in SF Feather.
+* Add support for Summon Night X Tears Crown files.
+* Add support for Tennis no Ouji-sama.
+* Add support for A Witch's Tale.
+* Add support for Super Robot Taisen OG Saga - Endless Frontier.
+* Add support for 100 Classic Book Collection.
+* Add support for NTFT image files.
+* Add support for NAIX text files.
+* Add support for custom tables in hex viewer (only Windows).
+* Fix problems with NARC files.
+* Fix problems with Last Windows game plugin.
+* Fix problems with fonts and add encoding support.
+* Fix problems with NCER files.
+* Fix palette imported.
+* Add support for SPDL file format in Ninokuni.
+* Fix compile script and add support for Linux.
+* Clean a lot of code.
+* Fixed many, many bugs.
+
+
0.8.3
*** 3D Model viewer for BMD0 (nsbmd)
** Improved the perfomance reading roms
@@ -30,7 +95,7 @@
*** Improved Hexadecimal editor -> Now using Be.HexEditor (by Bernhard Elbl)
*** Read BMD0 files and show the textures (if any)
** Game GYAKUKEN (Gyajuten kenji 2) - Unpacker
-** Game DBK ULTIMATE (Dragon Ball Kai Ultimate Butouden) - Unpacker for "archiveDBK.dsa"
+** Game DBK ULTIMATE (Dragon Ball Kai Ultimate Butouden) - Unpacker for "archiveDBK.dsa"
** Game MAPLESTORYDS (Maple Story DS) - Unpacker for "RESOURCE.NXARC"
** Game NINOKUNI (Ninokuni Shikkoku no Madoushi) supported
- Unpacker for NPCK and KPCN files
@@ -107,7 +172,7 @@
- Fixed some bugs
** Improved decompress methods, now it's so much faster.
* Improved plugin TETRIS DS
-* New option in menu "Open as..." -> Compress (you can select the start offset)
+* New option in menu "Open as..." -> Compress (you can select the start offset)
* Command to set a new transparent color in NCGR and NCER files
* Improved Images plugin and TGA support
* Improved "offset" value in files NCGR.
@@ -193,5 +258,3 @@
* Add button to change the bgd color with transparency checked
* UNICODE encoding support for text files
* Minor problems fixed
-
-
diff --git a/compile.bat b/compile.bat
new file mode 100644
index 00000000..20656024
--- /dev/null
+++ b/compile.bat
@@ -0,0 +1,112 @@
+@ECHO off
+setlocal enableDelayedExpansion
+
+REM Clean variables
+SET conf=
+SET plat=
+
+REM Ask for Release or Debug configuration
+IF [%1] == [] (
+ :ask_conf
+ SET /P resp=Choose the configuration. Press R for Release or D for Debug:
+ IF /I "!resp!" EQU "R" SET conf=Release
+ IF /I "!resp!" EQU "D" SET conf=Debug
+
+ REM If other input repeat
+ IF [!conf!] EQU [] GOTO ask_conf
+) ELSE (
+ SET conf=%1
+)
+ECHO Configuration: %conf%
+
+REM Ask for platform
+IF [%2] == [] (
+ :ask_plat
+ SET /P resp=Choose the platform. Press 1 for x86 or 2 for x64:
+ IF "!resp!" EQU "1" SET plat=x86
+ IF "!resp!" EQU "2" SET plat=x64
+
+ REM If other input repease
+ IF [!plat!] EQU [] GOTO ask_plat
+) ELSE (
+ SET plat=%2
+)
+ECHO Platform: %plat%
+
+REM Remove previoues build
+SET build_dir=%CD%\build
+IF EXIST "%build_dir%" RMDIR /S /Q "%build_dir%" || EXIT /B 1
+
+REM Get compiler
+SET netver=v4.5
+SET msbuild_path=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
+SET msbuild=%msbuild_path% /p:Configuration=%conf% /p:TargetFrameworkVersion=%netver%
+SET msbuild_plugin=%msbuild% /p:OutputPath=%build_dir%\Plugins\
+
+REM Compile program in standard directory, to allow plugins find Ekona
+ECHO Compiling base library
+%msbuild_path% /p:TargetFrameworkVersion=%netver% Tinke.sln > error.log || (TYPE error.log & EXIT /B 1)
+
+REM Compiling program
+echo Compiling Tinke
+%msbuild% /p:Platform=%plat% /p:OutputPath=%build_dir%\ Tinke.sln > error.log || (TYPE error.log & EXIT /B 1)
+
+REM Compiling format plugins
+call :compile_plugin "Plugins\Pack\Pack.sln"
+call :compile_plugin "Plugins\TXT\TXT.sln"
+call :compile_plugin "Plugins\Common\Common.sln"
+call :compile_plugin "Plugins\Images\Images.sln"
+call :compile_plugin "Plugins\SDAT\SDAT.sln"
+call :compile_plugin "Plugins\Sounds\Sounds.sln"
+call :compile_plugin "Plugins\Fonts\Fonts.sln"
+call :compile_plugin "Plugins\3DModels\3DModels.sln"
+
+REM Compiling game plugins
+call :compile_plugin "Plugins\LAYTON\LAYTON.sln"
+call :compile_plugin "Plugins\KIRBY DRO\KIRBY DRO.sln"
+call :compile_plugin "Plugins\AI IGO DS\AI IGO DS.sln"
+call :compile_plugin "Plugins\LASTWINDOW\LASTWINDOW.sln"
+call :compile_plugin "Plugins\TETRIS DS\TETRIS DS.sln"
+call :compile_plugin "Plugins\999HRPERDOOR\999HRPERDOOR.sln"
+call :compile_plugin "Plugins\EDGEWORTH\EDGEWORTH.sln"
+call :compile_plugin "Plugins\GYAKUKEN\GYAKUKEN.sln"
+call :compile_plugin "Plugins\DBK ULTIMATE\DBK ULTIMATE.sln"
+call :compile_plugin "Plugins\MAPLESTORYDS\MAPLESTORYDS.sln"
+call :compile_plugin "Plugins\NINOKUNI\NINOKUNI.sln"
+call :compile_plugin "Plugins\TOKIMEKIGS3S\TOKIMEKIGS3S.sln"
+call :compile_plugin "Plugins\BLOODBAHAMUT\BLOODBAHAMUT.sln"
+call :compile_plugin "Plugins\SF FEATHER\SF FEATHER.sln"
+call :compile_plugin "Plugins\DEATHNOTEDS\DEATHNOTEDS.sln"
+call :compile_plugin "Plugins\INAZUMA11\INAZUMA11.sln"
+call :compile_plugin "Plugins\TC UTK\TC UTK.sln"
+call :compile_plugin "Plugins\PSL\PSL.sln"
+call :compile_plugin "Plugins\HETALIA\HETALIA.sln"
+call :compile_plugin "Plugins\TIMEACE\TIMEACE.sln"
+call :compile_plugin "Plugins\WITCHTALE\WITCHTALE.sln"
+call :compile_plugin "Plugins\Tokimemo1\Tokimemo1.sln"
+call :compile_plugin "Plugins\Teniprimgaku\Teniprimgaku.sln"
+
+REM Remove the error log
+DEL error.log
+
+REM Copy dependencies
+ECHO Copying dependencies
+COPY "%cd%\Plugins\3DModels\OpenTK.dll" "%build_dir%\" > nul || (EXIT /B 1)
+COPY "%cd%\Plugins\3DModels\OpenTK.GLControl.dll" "%build_dir%\" > nul || (EXIT /B 1)
+
+REM Copy license and changelog
+ECHO Copying license and changelog
+COPY "%cd%\changelog.txt" "%build_dir%\" > nul || (EXIT /B 1)
+COPY "%cd%\Licence.txt" "%build_dir%\" > nul || (EXIT /B 1)
+
+REM Delete debug files
+ECHO Removing debug files
+DEL /S /Q "%build_dir%\*.pdb" > nul || (EXIT /B 1)
+
+REM The End
+EXIT /B 0
+
+:compile_plugin
+echo Compiling plugin %1
+%msbuild_plugin% %1 > error.log || (TYPE error.log & EXIT 1)
+EXIT /B 0
\ No newline at end of file
diff --git a/compile.sh b/compile.sh
index d7fa8ba7..47c85a9e 100755
--- a/compile.sh
+++ b/compile.sh
@@ -5,24 +5,34 @@ TINKE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
BUILD_DIR="$TINKE_DIR/build"
# Ask for release or debug configuration
-echo "Choose the configuration. Press '1' for Release and '2' for Debug: "
-select rd in "R" "D"; do
- case $rd in
- R) CONF="Release"; break;;
- D) CONF="Debug"; break;;
- esac
-done
+if [[ "$1" != "Release" && "$1" != "Debug" ]] ; then
+ echo "Choose the configuration. Press '1' for Release and '2' for Debug: "
+ select rd in "Release" "Debug"; do
+ case $rd in
+ Release) CONF="Release"; break;;
+ Debug) CONF="Debug"; break;;
+ esac
+ done
+ echo
+else
+ echo "Using $1 configuration."
+ CONF=$1
+fi
# Ask for 64 or 32 bits.
-echo
-echo "Choose the platform. Press '1' for x86 or '2' for x64: "
-select pl in "1" "2"; do
- case $pl in
- 1) PLAT="x86"; break;;
- 2) PLAT="x64"; break;;
- esac
-done
-echo
+if [[ "$2" != "x86" && "$2" != "x64" ]] ; then
+ echo "Choose the platform. Press '1' for x86 or '2' for x64: "
+ select pl in "x86" "x64"; do
+ case $pl in
+ x86) PLAT="x86"; break;;
+ x64) PLAT="x64"; break;;
+ esac
+ done
+ echo
+else
+ echo "Compiling for platform $2."
+ PLAT=$2
+fi
# Remove previous builds
if [ -d $BUILD_DIR ]; then
@@ -31,20 +41,35 @@ if [ -d $BUILD_DIR ]; then
fi
# Get compiler and params
-XBUILD="xbuild /v:minimal /p:Configuration=$CONF;TarjetFrameworkVersion=v4.0"
+XBUILD="xbuild /v:minimal /p:Configuration=$CONF;TargetFrameworkVersion=v4.5"
XBUILD_PLUGINS="$XBUILD;OutputPath=$BUILD_DIR/Plugins/"
-# Compile program in standard (debug) directory, to allow plugins find Ekona
+# Compile program in standard directory, to allow plugins find Ekona
echo "Compiling base library..."
-xbuild /v:minimal /p:TarjetFrameworkVersion=v4.0 Tinke.sln > /dev/null
+xbuild /v:minimal /p:TargetFrameworkVersion=v4.5 Tinke.sln > build.log
+if [ $? -ne 0 ] ; then
+ echo "Error compiling Tinke into the default directory. Aborting."
+ cat build.log
+ exit -1
+fi
# Compile Tinke
echo "Compiling Tinke..."
-$XBUILD "/p:Platform=$PLAT;OutputPath=$BUILD_DIR/" Tinke.sln > /dev/null
+$XBUILD "/p:Platform=$PLAT;OutputPath=$BUILD_DIR/" Tinke.sln > build.log
+if [ $? -ne 0 ] ; then
+ echo "Error compiling Tinke into the build dir. Aborting."
+ cat build.log
+ exit -1
+fi
function compile_plugin {
echo "Compiling plugin $1..."
- $XBUILD_PLUGINS "$1" > /dev/null
+ $XBUILD_PLUGINS "$1" > build.log
+ if [ $? -ne 0 ] ; then
+ echo "Error compiling $1. Aborting."
+ cat build.log
+ exit -1
+ fi
}
# Compile game plugins
@@ -93,5 +118,6 @@ cp "$TINKE_DIR/Licence.txt" "$BUILD_DIR/"
# Delete debug files
rm "$BUILD_DIR"/*.mdb
rm "$BUILD_DIR"/Plugins/*.mdb
+rm build.log
echo "Done!"