Rev 444 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 444 | Rev 536 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
2 | This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
3 | Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au |
3 | Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.net |
4 | Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft |
4 | Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify |
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 |
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 |
8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. |
9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License |
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 |
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 |
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ |
19 | */ |
20 | 20 | ||
21 | #ifndef PARM_H_ |
21 | #ifndef PARM_H_ |
22 | #define PARM_H_ |
22 | #define PARM_H_ |
23 | 23 | ||
24 | // Reverse-Engineering of Filter Factory for Photoshop by Alex Hunter (7/1999) |
24 | // Reverse-Engineering of Filter Factory for Photoshop by Alex Hunter (7/1999) |
25 | // Reverse-Engineering of Filter/Transition Factory for Premiere by Daniel Marschall (1/2019) |
25 | // Reverse-Engineering of Filter/Transition Factory for Premiere by Daniel Marschall (1/2019) |
26 | 26 | ||
27 | #define PARM_SIZE/*_PHOTOSHOP*/ 0x2068 // Photoshop FF and Filter Foundry since 1.7 |
27 | #define PARM_SIZE/*_PHOTOSHOP*/ 0x2068 // Photoshop FF and Filter Foundry since 1.7 |
28 | #define PARM_SIZE_PREMIERE 0x206C // Premiere FF/TF |
28 | #define PARM_SIZE_PREMIERE 0x206C // Premiere FF/TF |
29 | #define PARM_SIG_MAC 0x1C68 // Mac OS Filter Factory and Filter Foundy <1.7 use 0x1C68 instead of 0x2068 as first member |
29 | #define PARM_SIG_MAC 0x1C68 // Mac OS Filter Factory and Filter Foundy <1.7 use 0x1C68 instead of 0x2068 as first member |
30 | 30 | ||
31 | #ifdef MAC_ENV |
31 | #ifdef MAC_ENV |
32 | #define PARM_TYPE 'PARM' |
32 | #define PARM_TYPE 'PARM' |
33 | #define PARM_ID_OLD 16000 |
33 | #define PARM_ID_OLD 16000 |
34 | #define PARM_ID_NEW 16 // Filter Factory compatibility |
34 | #define PARM_ID_NEW 16 // Filter Factory compatibility |
35 | #else |
35 | #else |
36 | #define PARM_TYPE TEXT("PARM") |
36 | #define PARM_TYPE TEXT("PARM") |
37 | #define PARM_ID_OLD MAKEINTRESOURCE(16000) |
37 | #define PARM_ID_OLD MAKEINTRESOURCE(16000) |
38 | #define PARM_ID_NEW MAKEINTRESOURCE(16) // Filter Factory compatibility |
38 | #define PARM_ID_NEW MAKEINTRESOURCE(16) // Filter Factory compatibility |
39 | #endif |
39 | #endif |
40 | 40 | ||
41 | #ifdef MAC_ENV |
41 | #ifdef MAC_ENV |
42 | #define OBFUSCDATA_TYPE_OLD 'DATA' |
42 | #define OBFUSCDATA_TYPE_OLD 'DATA' |
43 | #define OBFUSCDATA_TYPE_NEW 'obFS' |
43 | #define OBFUSCDATA_TYPE_NEW 'obFS' |
44 | #define OBFUSCDATA_ID_OLD 16001 |
44 | #define OBFUSCDATA_ID_OLD 16001 |
45 | #define OBFUSCDATA_ID_NEW 16 |
45 | #define OBFUSCDATA_ID_NEW 16 |
46 | #else |
46 | #else |
47 | #define OBFUSCDATA_TYPE_OLD RT_RCDATA |
47 | #define OBFUSCDATA_TYPE_OLD RT_RCDATA |
48 | #define OBFUSCDATA_TYPE_NEW TEXT("OBFS") |
48 | #define OBFUSCDATA_TYPE_NEW TEXT("OBFS") |
49 | #define OBFUSCDATA_ID_OLD MAKEINTRESOURCE(16001) |
49 | #define OBFUSCDATA_ID_OLD MAKEINTRESOURCE(16001) |
50 | #define OBFUSCDATA_ID_NEW MAKEINTRESOURCE(16) |
50 | #define OBFUSCDATA_ID_NEW MAKEINTRESOURCE(16) |
51 | #endif |
51 | #endif |
52 | 52 | ||
53 | #ifdef Rez |
53 | #ifdef Rez |
54 | 54 | ||
55 | type PARM_TYPE { |
55 | type PARM_TYPE { |
56 | longint = PARM_SIZE; // cbSize; //size of this structure |
56 | longint = PARM_SIZE; // cbSize; //size of this structure |
57 | longint FilterFactory,standaloneFilter; // standalone; //0=original FF, 1=standalone filter |
57 | longint FilterFactory,standaloneFilter; // standalone; //0=original FF, 1=standalone filter |
58 | array[8] { longint; }; // val[8]; //initial values of controls |
58 | array[8] { longint; }; // val[8]; //initial values of controls |
59 | longint noParameters,parametersDialog; // popDialog; //true if need to pop a parameter dialog |
59 | longint noParameters,parametersDialog; // popDialog; //true if need to pop a parameter dialog |
60 | longint; // unknown1; |
60 | longint; // unknown1; |
61 | longint; // unknown2; |
61 | longint; // unknown2; |
62 | longint; // unknown3; |
62 | longint; // unknown3; |
63 | array[4] { longint; }; // map_used[4]; //true if map(n) is used |
63 | array[4] { longint; }; // map_used[4]; //true if map(n) is used |
64 | array[8] { longint; }; // ctl_used[8]; //true if ctl(n) is used |
64 | array[8] { longint; }; // ctl_used[8]; //true if ctl(n) is used |
65 | pstring[251]; //Category name |
65 | pstring[251]; //Category name |
66 | // Michael Johannhanwahr's protect flag... |
66 | // Michael Johannhanwahr's protect flag... |
67 | longint notProtected,isProtected; // iProtected; // == 1 means protected |
67 | longint notProtected,isProtected; // iProtected; // == 1 means protected |
68 | pstring[255]; //Filter title |
68 | pstring[255]; //Filter title |
69 | pstring[255]; //Copyright info |
69 | pstring[255]; //Copyright info |
70 | pstring[255]; //Filter author(s) |
70 | pstring[255]; //Filter author(s) |
71 | array[4] { pstring[255]; }; //4 map labels |
71 | array[4] { pstring[255]; }; //4 map labels |
72 | array[8] { pstring[255]; }; //8 control labels |
72 | array[8] { pstring[255]; }; //8 control labels |
73 | array[4] { cstring[1024]; }; //4 channel formulas |
73 | array[4] { cstring[1024]; }; //4 channel formulas |
74 | }; |
74 | }; |
75 | 75 | ||
76 | #else |
76 | #else |
77 | 77 | ||
78 | // Note: In Windows DLL/8BF files, the strings are C-strings, while in MAC-plugins they are Pascal-strings! |
78 | // Note: In Windows DLL/8BF files, the strings are C-strings, while in MAC-plugins they are Pascal-strings! |
79 | // Formulas are never Pascal strings. |
79 | // Formulas are never Pascal strings. |
80 | // Since 1.7.0.13 we internally work with C-strings. |
80 | // Since 1.7.0.13 we internally work with C-strings. |
81 | 81 | ||
82 | typedef uint32_t bool32_t; |
82 | typedef uint32_t bool32_t; |
83 | 83 | ||
84 | // Photoshop's Filter Factory has PARM:16 |
84 | // Photoshop's Filter Factory has PARM:16 |
85 | // Filter Foundry has PARM:16000 (old) or PARM:16 (new) |
85 | // Filter Foundry has PARM:16000 (old) or PARM:16 (new) |
86 | typedef struct { // structure of FF PARM resource |
86 | typedef struct { // structure of FF PARM resource |
87 | uint32_t cbSize; // size of this structure = 0x2068 (or 0x1C68 for Filter Foundry <1.7 and Mac OS Filter Factory) |
87 | uint32_t cbSize; // size of this structure = 0x2068 (or 0x1C68 for Filter Foundry <1.7 and Mac OS Filter Factory) |
88 | bool32_t standalone; // 0=original FF, 1=standalone filter |
88 | bool32_t standalone; // 0=original FF, 1=standalone filter |
89 | uint32_t val[8]; // initial values of controls |
89 | uint32_t val[8]; // initial values of controls |
90 | bool32_t popDialog; // 1 if need to pop a parameter dialog |
90 | bool32_t popDialog; // 1 if need to pop a parameter dialog |
91 | uint32_t unknown1; // This field is used for the obfuscation (checksum for obfusc v6+) |
91 | uint32_t unknown1; // This field is used for the obfuscation (checksum for obfusc v6+) |
92 | uint32_t unknown2; // This field is used for the obfuscation (obfusc version info for obfusc v2+) |
92 | uint32_t unknown2; // This field is used for the obfuscation (obfusc version info for obfusc v2+) |
93 | uint32_t unknown3; // This field is reserved for future use |
93 | uint32_t unknown3; // This field is reserved for future use |
94 | bool32_t map_used[4]; // true if map(n) is used |
94 | bool32_t map_used[4]; // true if map(n) is used |
95 | bool32_t ctl_used[8]; // true if ctl(n) is used |
95 | bool32_t ctl_used[8]; // true if ctl(n) is used |
96 | char szCategory[252]; // Category name |
96 | char szCategory[252]; // Category name |
97 | bool32_t iProtected; // Michael Johannhanwahr's protect flag... (1 means protected) |
97 | bool32_t iProtected; // Michael Johannhanwahr's protect flag... (1 means protected) |
98 | char szTitle[256]; // Filter title |
98 | char szTitle[256]; // Filter title |
99 | char szCopyright[256]; // Copyright info |
99 | char szCopyright[256]; // Copyright info |
100 | char szAuthor[256]; // Filter author(s) |
100 | char szAuthor[256]; // Filter author(s) |
101 | char szMap[4][256]; // 4 map labels |
101 | char szMap[4][256]; // 4 map labels |
102 | char szCtl[8][256]; // 8 control labels |
102 | char szCtl[8][256]; // 8 control labels |
103 | char szFormula[4][1024]; // 4 channel formulas; in Photoshop: (r,g,b,a) |
103 | char szFormula[4][1024]; // 4 channel formulas; in Photoshop: (r,g,b,a) |
104 | } PARM_T/*_PHOTOSHOP*/; |
104 | } PARM_T/*_PHOTOSHOP*/; |
105 | 105 | ||
106 | // Premiere's Transition/Filter Factory has PARM:16000 |
106 | // Premiere's Transition/Filter Factory has PARM:16000 |
107 | typedef struct { // structure of Premiere FF/TF PARM resource |
107 | typedef struct { // structure of Premiere FF/TF PARM resource |
108 | uint32_t cbSize; // size of this structure = 0x206C |
108 | uint32_t cbSize; // size of this structure = 0x206C |
109 | bool32_t standalone; // 0=original FF, 1=standalone filter |
109 | bool32_t standalone; // 0=original FF, 1=standalone filter |
110 | bool32_t singleExpression; // 1 if "single expression" is checked (member only available in Premiere) |
110 | bool32_t singleExpression; // 1 if "single expression" is checked (member only available in Premiere) |
111 | uint32_t val[8]; // initial values of controls |
111 | uint32_t val[8]; // initial values of controls |
112 | bool32_t popDialog; // 1 if need to pop a parameter dialog |
112 | bool32_t popDialog; // 1 if need to pop a parameter dialog |
113 | uint32_t unknown1; |
113 | uint32_t unknown1; |
114 | uint32_t unknown2; |
114 | uint32_t unknown2; |
115 | uint32_t unknown3; |
115 | uint32_t unknown3; |
116 | bool32_t map_used[4]; // true if map(n) is used |
116 | bool32_t map_used[4]; // true if map(n) is used |
117 | bool32_t ctl_used[8]; // true if ctl(n) is used |
117 | bool32_t ctl_used[8]; // true if ctl(n) is used |
118 | char szTitle[256]; // in Photoshop Filter Factory: Category |
118 | char szTitle[256]; // in Photoshop Filter Factory: Category |
119 | char szAuthor[256]; // in Photoshop Filter Factory: Title |
119 | char szAuthor[256]; // in Photoshop Filter Factory: Title |
120 | char szModulename[256]; // in Photoshop Filter Factory: Copyright |
120 | char szModulename[256]; // in Photoshop Filter Factory: Copyright |
121 | char szCopyright[256]; // in Photoshop Filter Factory: Author |
121 | char szCopyright[256]; // in Photoshop Filter Factory: Author |
122 | char szMap[4][256]; // 4 map labels |
122 | char szMap[4][256]; // 4 map labels |
123 | char szCtl[8][256]; // 8 control labels |
123 | char szCtl[8][256]; // 8 control labels |
124 | char szFormula[4][1024]; // 4 channel formulas; in Premiere: (b,g,r,a) or (-,-,-,r=g=b=a) in single-expression-mode |
124 | char szFormula[4][1024]; // 4 channel formulas; in Premiere: (b,g,r,a) or (-,-,-,r=g=b=a) in single-expression-mode |
125 | } PARM_T_PREMIERE; |
125 | } PARM_T_PREMIERE; |
126 | 126 | ||
127 | #endif |
127 | #endif |
128 | 128 | ||
129 | #endif |
129 | #endif |
130 | 130 |