Subversion Repositories filter_foundry

Rev

Rev 206 | Rev 255 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 toby 1
/*
151 dmarschall 2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
192 daniel-mar 3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
206 daniel-mar 4
    Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft
2 toby 5
 
151 dmarschall 6
    This program is free software; you can redistribute it and/or modify
7
    it under the terms of the GNU General Public License as published by
8
    the Free Software Foundation; either version 2 of the License, or
9
    (at your option) any later version.
2 toby 10
 
151 dmarschall 11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
2 toby 15
 
151 dmarschall 16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2 toby 19
*/
20
 
151 dmarschall 21
// Reverse-Engineering of Filter Factory for Photoshop by Alex Hunter (7/1999)
22
// Reverse-Engineering of Filter/Transition Factory for Premiere by Daniel Marschall (1/2019)
23
 
152 dmarschall 24
#define PARM_SIZE/*_PHOTOSHOP*/  0x2068 // Photoshop FF and Filter Foundry since 1.7
145 dmarschall 25
#define PARM_SIZE_PREMIERE       0x206C // Premiere FF/TF
152 dmarschall 26
#define PARM_SIG_MAC             0x1C68 // Mac OS Filter Factory and Filter Foundy <1.7 use 0x1C68 instead of 0x2068 as first member
2 toby 27
 
28
#ifdef Rez
29
 
30
type 'PARM' {
106 dmarschall 31
        longint = PARM_SIZE; // cbSize;    //size of this structure
145 dmarschall 32
        longint FilterFactory,standaloneFilter; // standalone;  //0=original FF, 1=standalone filter
2 toby 33
        array[8] { longint; }; // val[8];    //initial values of controls
34
        longint noParameters,parametersDialog; // popDialog; //true if need to pop a parameter dialog
35
        longint; // unknown1;
36
        longint; // unknown2;
37
        longint; // unknown3;
38
        array[4] { longint; }; // map_used[4];   //true if map(n) is used
39
        array[8] { longint; }; // ctl_used[8];   //true if ctl(n) is used
40
        pstring[251];    //Category name
41
        // Michael Johannhanwahr's protect flag...
42
        longint notProtected,isProtected; // iProtected;            // == 1 means protected
206 daniel-mar 43
        pstring[255];   //Filter title
2 toby 44
        pstring[255];   //Copyright info
206 daniel-mar 45
        pstring[255];   //Filter author(s)
46
        array[4] { pstring[255]; };  //4 map labels
47
        array[8] { pstring[255]; };  //8 control labels
2 toby 48
        array[4] { cstring[1024]; }; //4 channel formulas
49
};
50
 
51
#else
52
 
210 daniel-mar 53
// Note: In Windows DLL/8BF files, the strings are C-strings, while in MAC-plugins they are Pascal-strings!
54
// However, internally, we work with Pascal Strings:
55
// readPARM() converts C to Pascal strings, and doresources() converts them back to C strings for saving.
2 toby 56
 
145 dmarschall 57
// Photoshop's Filter Factory has PARM:16
2 toby 58
typedef struct {   //structure of FF PARM resource
145 dmarschall 59
        long cbSize;     //size of this structure = 0x2068 (or 0x1C68 for Filter Foundry <1.7)
60
        long standalone; //0=original FF, 1=standalone filter
61
        long val[8];     //initial values of controls
62
        long popDialog;  //1 if need to pop a parameter dialog
63
        long unknown1;
64
        long unknown2;
65
        long unknown3;
66
        long map_used[4];   //true if map(n) is used
67
        long ctl_used[8];   //true if ctl(n) is used
68
        unsigned char category[252];    //Category name
69
        // Michael Johannhanwahr's protect flag...
70
        long iProtected;            // == 1 means protected
71
        unsigned char title[256];       //Filter title
72
        unsigned char copyright[256];   //Copyright info
73
        unsigned char author[256];      //Filter author(s)
74
        unsigned char map[4][256];      //4 map labels
75
        unsigned char ctl[8][256];      //8 control labels
76
        char formula[4][1024];          //4 channel formulas; in Photoshop: (r,g,b,a)
77
} PARM_T/*_PHOTOSHOP*/;
78
 
79
// Premiere's Transition/Filter Factory has PARM:16000
80
typedef struct {   //structure of Premiere FF/TF PARM resource
147 dmarschall 81
        long cbSize;    //size of this structure = 0x206C
145 dmarschall 82
        long standalone;  //0=original FF, 1=standalone filter
83
        long singleExpression; //1 if "single expression" is checked (member only available in Premiere)
62 toby 84
        long val[8];    //initial values of controls
145 dmarschall 85
        long popDialog; //1 if need to pop a parameter dialog
62 toby 86
        long unknown1;
87
        long unknown2;
88
        long unknown3;
89
        long map_used[4];   //true if map(n) is used
90
        long ctl_used[8];   //true if ctl(n) is used
176 dmarschall 91
        unsigned char title[256]; // in Photoshop Filter Factory: Category
92
        unsigned char author[256]; // in Photoshop Filter Factory: Title
93
        unsigned char modulename[256]; // in Photoshop Filter Factory: Copyright
94
        unsigned char copyright[256]; // in Photoshop Filter Factory: Author
62 toby 95
        unsigned char map[4][256];      //4 map labels
96
        unsigned char ctl[8][256];      //8 control labels
147 dmarschall 97
        char formula[4][1024];          //4 channel formulas; in Premiere: (b,g,r,a) or (-,-,-,r=g=b=a) in single-expression-mode
145 dmarschall 98
} PARM_T_PREMIERE;
2 toby 99
 
100
#endif