Japanese
Graphic Tools GuideSEGA CONVERTER User's Manual
BackForward
SEGA CONVERTER User's Manual

4. How to create a plugin


■Resource file

The following resources are reserved in the SSSDK plugin module. When using resources in a module program, be careful not to overlap their uses.

STRING resource
(Sample example)
STRINGTABLE DISCARDABLE 
BEGIN

1 "READ WRITE"
2 "dg2"
3 "DGT2 Files"
4 "4 8 16 24"

END

ID 1: Specifies the plugin function.
"File I/O"
  • "READ" for input only
  • "WRITE" for output only
  • For input/output "READ WRITE"
"EFFECT"

ID 2: Specify the file extension (3 characters).
Alphanumeric characters and lowercase letters are preferable.
For "effect", specify "eff".

ID 3: Specify the plugin name to be displayed.
For "File I/O"
This will be the pop-up menu of the dialog.

For "effect"
This will be a submenu of the effect menu.

ID 4: Specifies the color depth (in bits) that this module supports.
1・4・8・16・24
Specify one of them, separated by a half-width space (" ").

■“File I/O” module

[1: Input module]
Follow the steps below to load the file and display it in the window.
  1. Select a file in the open dialog.
  2. scvCheckFileFormat
  3. scvGetFileImageSize
  4. scvGetFileImageDepth
  5. scvGetFileImageBits
  6. Show window.
Users who create input modules must prepare functions that correspond to steps 2) to 5) above.

[2: Output module]
Save the file using the following steps.
  1. Specify the file name in the save dialog.
  2. scvPutFileImageBits
  3. The file is saved.

If you use the catalog save function, save the file by following the steps below.
  1. Specify the save directory in the save dialog.
  2. scvBeginCatalogSave
  3. scvPutFileImageBits
  4. The file is saved. (Repeat 3) to 4) for the number of catalog registrations)
  5. scvEndCatalogSave
Users who create output modules must prepare functions that correspond to steps 2), 3, and 5) above.

■“Effect” module

Apply the effect to the window using the following steps.
  1. Select the Effect menu item.
  2. scvBeginEffect
  3. scvEffectImageBits
  4. scvEndEffect
  5. Refresh window.
Users who create effect modules must prepare functions that correspond to steps 2) to 4) above.

■About bitmap memory

Color depth: 1
Arrange the bitmap at 1 bit/pixel.
However, in the horizontal direction, there is a 1-bite boundary.
1 is displayed in black and 0 is displayed in white.

Color depth: 4
16 color index format.
Arrange RGBQUAD structures for 16 colors.
After that, place the bitmap at 4 bits/pixel.
However, in the horizontal direction, there is a 1-bite boundary.

Color depth: 8
256 color index format.
Arrange RGBQUAD structures for 256 colors.
After that, place the bitmap at 8 bits/pixel.

Color depth: 16
Direct color format.
Arrange the bitmap at 16 bits/pixel.
Each color intensity is formatted as 0b|R5|G5|B5.

Color depth: 24 (32)
Direct color format.
Arrange the bitmap at 32 bits/pixel.
Each color intensity is formatted as 8b|R8|G8|B8.


BackForward
Graphic Tools GuideSEGA CONVERTER User's Manual
Copyright SEGA ENTERPRISES, LTD. 1997