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 for the SSSDK plug-in module. When using resources on a module program, be careful not to overlap the uses.

STRING resource (sample example)
STRINGTABLE DISCARDABLE 
BEGIN

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

END

ID 1: Specify the plug-in function.
"File I / O"
  • For input only "READ"
  • For output only "WRITE"
  • For input / output "READ WRITE"
"Effect" "EFFECT"

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

ID 3: Specify the plug-in name to be displayed.
In the case of "File I / O"
It will be a popup menu of the dialog

In the case of "effect"
It becomes a submenu of the effect menu

ID 4: Specifies the color depth (bits) supported by this module.
1, 4, 8, 16, 24
Specify one of the above by separating it with 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. Display a window.
The user who creates the input module must prepare the function corresponding to the steps 2) to 5) above.

[2: Output module]
Follow the steps below to save the file.
  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 according to the following procedure.
  1. Specify the save directory in the save dialog.
  2. scvBeginCatalogSave
  3. scvPutFileImageBits
  4. The file is saved. (Number of catalog registrations 3) -4) Repeat)
  5. scvEndCatalogSave
The user who creates the output module must prepare the function corresponding to the steps 2), 3) and 5) above.

■ "Effect" module

Follow the steps below to apply the effect to the window.
  1. Select an effect menu item.
  2. scvBeginEffect
  3. scvEffectImageBits
  4. scvEndEffect
  5. Redisplay the window.
The user who creates the effect module must prepare the function corresponding to the steps 2) to 4) above.

■ About bitmap memory

Color depth: 1
Place the bitmap at 1 bit / pixel.
However, the horizontal direction is 1 byte boundary.
1 is displayed in black and 0 is displayed in white.

Color depth: 4
16-color index format.
The RGBQUAD structure is arranged for 16 colors.
After that, a bitmap is placed at 4 bits / pixel.
However, the horizontal direction is 1 byte boundary.

Color depth: 8
256-color index format.
The RGBQUAD structure is arranged for 256 colors.
After that, a bitmap is placed at 8 bits / pixel.

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

Color depth: 24 (32)
Direct color format.
Place 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