| 1 | /* |
| 2 | Delay Grab video effect |
| 3 | |
| 4 | blockwise, controllable image delay |
| 5 | |
| 6 | Copyright (C) 1999/2000 A. Schiffler <[email protected]> |
| 7 | Copyright (C) 2001/2002 Denis Roio <[email protected]> |
| 8 | |
| 9 | original sourcecode is from libbgrab 2.1f |
| 10 | ported to FreeJ, successively modified |
| 11 | then ported to frei0r |
| 12 | |
| 13 | This program is free software; you can redistribute it and/or modify |
| 14 | it under the terms of the GNU General Public License as published by |
| 15 | the Free Software Foundation; either version 3 of the License, or |
| 16 | (at your option) any later version. |
| 17 | |
| 18 | This program is distributed in the hope that it will be useful, but |
| 19 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | General Public License for more details. |
| 22 | |
| 23 | You should have received a copy of the GNU General Public License |
| 24 | along with this program; if not, write to the Free Software |
| 25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | |
| 27 | */ |
| 28 | |
| 29 | |
| 30 | #include <stdio.h> |
| 31 | #include <stdlib.h> |
| 32 | #include <string.h> |
| 33 | #include <math.h> |
| 34 | #include <time.h> |
| 35 | #include <inttypes.h> |
| 36 | |
| 37 | #include <frei0r.hpp>cxx . . $ `<file>/include/frei0r.hpp`/ |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | #define QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`! 71 /* was 76 */ |
| 43 | #define MODEScxx . . $ `src/filter/delaygrab/delaygrab.cpp:43:9`! 4 |
| 44 | |
| 45 | // freej compat facilitator |
| 46 | typedef structcxx . . $ $anonymous_type_53655a9471c18d85_0# { |
| 47 | int16_t xcxx . . $ $anonymous_type_53655a9471c18d85_0#x.; ///< x axis position coordinate |
| 48 | int16_t ycxx . . $ $anonymous_type_53655a9471c18d85_0#y.; ///< y axis position coordinate |
| 49 | uint16_tcxx . . $ uint16_t# wcxx . . $ $anonymous_type_53655a9471c18d85_0#w.; ///< width of frame in pixels |
| 50 | uint16_tcxx . . $ uint16_t# hcxx . . $ $anonymous_type_53655a9471c18d85_0#h.; ///< height of frame in pixels |
| 51 | uint8_tcxx . . $ uint8_t# bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp.; ///< bits per pixel |
| 52 | uint16_tcxx . . $ uint16_t# pitchcxx . . $ $anonymous_type_53655a9471c18d85_0#pitch.; ///< width of frame in bytes |
| 53 | uint32_tcxx . . $ uint32_t# sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.; ///< size of the whole frame in bytes |
| 54 | } ScreenGeometrycxx . . $ ScreenGeometry#; |
| 55 | |
| 56 | class DelayGrabcxx . . $ DelayGrab#: public frei0rcxx . . $ frei0r/::filtercxx . . $ frei0r/filter# { |
| 57 | |
| 58 | public: |
| 59 | DelayGrabcxx . . $ DelayGrab#DelayGrab(3e454b8ccf442868).(int wdt, int hgt); |
| 60 | ~cxx . . $ DelayGrab#`~DelayGrab`(49f6e7a06ebc5aa8).DelayGrabcxx . . $ DelayGrab#(); |
| 61 | |
| 62 | virtual void updatecxx . . $ DelayGrab#update(da7b4a17ceb4e697).(double time, |
| 63 | uint32_tcxx . . $ uint32_t#* out, |
| 64 | const uint32_tcxx . . $ uint32_t#* in); |
| 65 | |
| 66 | |
| 67 | private: |
| 68 | |
| 69 | ScreenGeometrycxx . . $ ScreenGeometry# geocxx . . $ DelayGrab#geo.; |
| 70 | |
| 71 | void _initcxx . . $ DelayGrab#_init(3e454b8ccf442868).(int wdt, int hgt); |
| 72 | |
| 73 | void createDelaymapcxx . . $ DelayGrab#createDelaymap(d4f767463ce0a6b3).(int mode); |
| 74 | void set_blocksizecxx . . $ DelayGrab#set_blocksize(d4f767463ce0a6b3).(int bs); |
| 75 | int isqrtcxx . . $ DelayGrab#isqrt(4c679297bf94b9eb).(unsigned int x); |
| 76 | |
| 77 | /* cheap & fast randomizer (by Fukuchi Kentarou) */ |
| 78 | uint32_tcxx . . $ uint32_t# randvalcxx . . $ DelayGrab#randval.; |
| 79 | uint32_tcxx . . $ uint32_t# fastrandcxx . . $ DelayGrab#fastrand(db52760e79bf9054).() { return (randvalcxx . . $ DelayGrab#randval.=randvalcxx . . $ DelayGrab#randval.*1103515245+12345); }; |
| 80 | void fastsrandcxx . . $ DelayGrab#fastsrand(cb2f890c2fdad230).(uint32_tcxx . . $ uint32_t# seed) { randvalcxx . . $ DelayGrab#randval. = seed; }; |
| 81 | |
| 82 | int xcxx . . $ DelayGrab#x.,ycxx . . $ DelayGrab#y.,icxx . . $ DelayGrab#i.,xyoffcxx . . $ DelayGrab#xyoff.,vcxx . . $ DelayGrab#v.; |
| 83 | uint8_tcxx . . $ uint8_t# *imagequeuecxx . . $ DelayGrab#imagequeue.,*curqueuecxx . . $ DelayGrab#curqueue.; |
| 84 | int curqueuenumcxx . . $ DelayGrab#curqueuenum.; |
| 85 | uint32_tcxx . . $ uint32_t# *curdelaymapcxx . . $ DelayGrab#curdelaymap.; |
| 86 | uint8_tcxx . . $ uint8_t# *curposcxx . . $ DelayGrab#curpos.,*curimagecxx . . $ DelayGrab#curimage.; |
| 87 | int curposnumcxx . . $ DelayGrab#curposnum.; |
| 88 | void *delaymapcxx . . $ DelayGrab#delaymap.; |
| 89 | |
| 90 | /* initialized from the init */ |
| 91 | int delaymapwidthcxx . . $ DelayGrab#delaymapwidth.; /* width/blocksize */ |
| 92 | int delaymapheightcxx . . $ DelayGrab#delaymapheight.; /* height/blocksize */ |
| 93 | int delaymapsizecxx . . $ DelayGrab#delaymapsize.; /* delaymapheight*delaymapwidth */ |
| 94 | |
| 95 | int blocksizecxx . . $ DelayGrab#blocksize.; |
| 96 | int block_per_pitchcxx . . $ DelayGrab#block_per_pitch.; |
| 97 | int block_per_bytesppcxx . . $ DelayGrab#block_per_bytespp.; |
| 98 | int block_per_rescxx . . $ DelayGrab#block_per_res.; |
| 99 | |
| 100 | int current_modecxx . . $ DelayGrab#current_mode.; |
| 101 | |
| 102 | }; |
| 103 | |
| 104 | void DelayGrabcxx . . $ DelayGrab#::_initcxx . . $ DelayGrab#_init(3e454b8ccf442868).(int wdt, int hgt) { |
| 105 | geocxx . . $ DelayGrab#geo..wcxx . . $ $anonymous_type_53655a9471c18d85_0#w. = wdt; |
| 106 | geocxx . . $ DelayGrab#geo..hcxx . . $ $anonymous_type_53655a9471c18d85_0#h. = hgt; |
| 107 | geocxx . . $ DelayGrab#geo..bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp. = 32; |
| 108 | geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size. = geocxx . . $ DelayGrab#geo..wcxx . . $ $anonymous_type_53655a9471c18d85_0#w.*geocxx . . $ DelayGrab#geo..hcxx . . $ $anonymous_type_53655a9471c18d85_0#h.*(geocxx . . $ DelayGrab#geo..bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp./8); |
| 109 | geocxx . . $ DelayGrab#geo..pitchcxx . . $ $anonymous_type_53655a9471c18d85_0#pitch. = geocxx . . $ DelayGrab#geo..wcxx . . $ $anonymous_type_53655a9471c18d85_0#w.*(geocxx . . $ DelayGrab#geo..bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp./8); |
| 110 | } |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | DelayGrabcxx . . $ DelayGrab#::DelayGrabcxx . . $ DelayGrab#DelayGrab(3e454b8ccf442868).(int wdt, int hgt) { |
| 116 | |
| 117 | delaymapcxx . . $ DelayGrab#delaymap. = NULLcxx . . $ `<external>/16391990256953433862/stddef.h:416:9`!; |
| 118 | _initcxx . . $ DelayGrab#_init(3e454b8ccf442868).(wdt, hgt); |
| 119 | |
| 120 | imagequeuecxx . . $ DelayGrab#imagequeue. = (uint8_tcxx . . $ uint8_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!*(geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.)); |
| 121 | |
| 122 | /* starting mode */ |
| 123 | current_modecxx . . $ DelayGrab#current_mode. = 4; |
| 124 | /* starting blocksize */ |
| 125 | set_blocksizecxx . . $ DelayGrab#set_blocksize(d4f767463ce0a6b3).(2); |
| 126 | |
| 127 | curqueuecxx . . $ DelayGrab#curqueue.=imagequeuecxx . . $ DelayGrab#imagequeue.; |
| 128 | curqueuenumcxx . . $ DelayGrab#curqueuenum.=0; |
| 129 | |
| 130 | fastsrandcxx . . $ DelayGrab#fastsrand(cb2f890c2fdad230).(::time(NULLcxx . . $ `<external>/16391990256953433862/stddef.h:416:9`!)); |
| 131 | } |
| 132 | |
| 133 | DelayGrabcxx . . $ DelayGrab#::~cxx . . $ DelayGrab#`~DelayGrab`(49f6e7a06ebc5aa8).DelayGrabcxx . . $ DelayGrab#() { |
| 134 | freecxx . . $ free(5d22bdacc48458e8).(delaymapcxx . . $ DelayGrab#delaymap.); |
| 135 | freecxx . . $ free(5d22bdacc48458e8).(imagequeuecxx . . $ DelayGrab#imagequeue.); |
| 136 | } |
| 137 | |
| 138 | |
| 139 | |
| 140 | void DelayGrabcxx . . $ DelayGrab#::updatecxx . . $ DelayGrab#update(da7b4a17ceb4e697).(double time, |
| 141 | uint32_tcxx . . $ uint32_t#* out, |
| 142 | const uint32_tcxx . . $ uint32_t#* in) { |
| 143 | |
| 144 | /* Update queue pointer */ |
| 145 | if (curqueuenumcxx . . $ DelayGrab#curqueuenum.==0) { |
| 146 | curqueuenumcxx . . $ DelayGrab#curqueuenum.=QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!-1; |
| 147 | curqueuecxx . . $ DelayGrab#curqueue. = imagequeuecxx . . $ DelayGrab#imagequeue.; |
| 148 | curqueuecxx . . $ DelayGrab#curqueue. += (geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.*(QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!-1)); |
| 149 | } else { |
| 150 | curqueuenumcxx . . $ DelayGrab#curqueuenum.--; |
| 151 | curqueuecxx . . $ DelayGrab#curqueue. -= geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.; |
| 152 | } |
| 153 | |
| 154 | /* Copy image to queue */ |
| 155 | memcpy(curqueuecxx . . $ DelayGrab#curqueue.,in,geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.); |
| 156 | |
| 157 | /* Copy image blockwise to screenbuffer */ |
| 158 | curdelaymapcxx . . $ DelayGrab#curdelaymap.= (uint32_tcxx . . $ uint32_t# *)delaymapcxx . . $ DelayGrab#delaymap.; |
| 159 | for (ycxx . . $ DelayGrab#y.=0; ycxx . . $ DelayGrab#y.<delaymapheightcxx . . $ DelayGrab#delaymapheight.; ycxx . . $ DelayGrab#y.++) { |
| 160 | for (xcxx . . $ DelayGrab#x.=0; xcxx . . $ DelayGrab#x.<delaymapwidthcxx . . $ DelayGrab#delaymapwidth.; xcxx . . $ DelayGrab#x.++) { |
| 161 | |
| 162 | curposnumcxx . . $ DelayGrab#curposnum.=((curqueuenumcxx . . $ DelayGrab#curqueuenum. + (*curdelaymapcxx . . $ DelayGrab#curdelaymap.)) % QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!); |
| 163 | |
| 164 | xyoffcxx . . $ DelayGrab#xyoff.= (xcxx . . $ DelayGrab#x.*block_per_bytesppcxx . . $ DelayGrab#block_per_bytespp.) + (ycxx . . $ DelayGrab#y.*block_per_pitchcxx . . $ DelayGrab#block_per_pitch.); |
| 165 | /* source */ |
| 166 | curposcxx . . $ DelayGrab#curpos.= imagequeuecxx . . $ DelayGrab#imagequeue.; |
| 167 | curposcxx . . $ DelayGrab#curpos. += (geocxx . . $ DelayGrab#geo..sizecxx . . $ $anonymous_type_53655a9471c18d85_0#size.*curposnumcxx . . $ DelayGrab#curposnum.); |
| 168 | curposcxx . . $ DelayGrab#curpos. += xyoffcxx . . $ DelayGrab#xyoff.; |
| 169 | /* target */ |
| 170 | curimagecxx . . $ DelayGrab#curimage. = (uint8_tcxx . . $ uint8_t# *)out; |
| 171 | curimagecxx . . $ DelayGrab#curimage. += xyoffcxx . . $ DelayGrab#xyoff.; |
| 172 | /* copy block */ |
| 173 | for (icxx . . $ DelayGrab#i.=0; icxx . . $ DelayGrab#i.<blocksizecxx . . $ DelayGrab#blocksize.; icxx . . $ DelayGrab#i.++) { |
| 174 | memcpy(curimagecxx . . $ DelayGrab#curimage.,curposcxx . . $ DelayGrab#curpos.,block_per_rescxx . . $ DelayGrab#block_per_res.); |
| 175 | curposcxx . . $ DelayGrab#curpos. += geocxx . . $ DelayGrab#geo..pitchcxx . . $ $anonymous_type_53655a9471c18d85_0#pitch.; |
| 176 | curimagecxx . . $ DelayGrab#curimage. += geocxx . . $ DelayGrab#geo..pitchcxx . . $ $anonymous_type_53655a9471c18d85_0#pitch.; |
| 177 | } |
| 178 | curdelaymapcxx . . $ DelayGrab#curdelaymap.++; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | } |
| 183 | |
| 184 | // int kbd_input(char key) { |
| 185 | // int res = 1; |
| 186 | // switch(key) { |
| 187 | // case 'w': |
| 188 | // if(current_mode<MODES) createDelaymap(current_mode+1); |
| 189 | // break; |
| 190 | // case 'q': |
| 191 | // if(current_mode>1) createDelaymap(current_mode-1); |
| 192 | // break; |
| 193 | // case 's': |
| 194 | // set_blocksize(blocksize+1); |
| 195 | // break; |
| 196 | // case 'a': |
| 197 | // if(blocksize>2) set_blocksize(blocksize-1); |
| 198 | // break; |
| 199 | // default: |
| 200 | // res = 0; |
| 201 | // break; |
| 202 | // } |
| 203 | // return res; |
| 204 | // } |
| 205 | |
| 206 | void DelayGrabcxx . . $ DelayGrab#::createDelaymapcxx . . $ DelayGrab#createDelaymap(d4f767463ce0a6b3).(int mode) { |
| 207 | double d; |
| 208 | |
| 209 | curdelaymapcxx . . $ DelayGrab#curdelaymap.=(uint32_tcxx . . $ uint32_t# *)delaymapcxx . . $ DelayGrab#delaymap.; |
| 210 | fastsrandcxx . . $ DelayGrab#fastsrand(cb2f890c2fdad230).(::time(NULLcxx . . $ `<external>/16391990256953433862/stddef.h:416:9`!)); |
| 211 | |
| 212 | for (ycxx . . $ DelayGrab#y.=delaymapheightcxx . . $ DelayGrab#delaymapheight.; ycxx . . $ DelayGrab#y.>0; ycxx . . $ DelayGrab#y.--) { |
| 213 | for (xcxx . . $ DelayGrab#x.=delaymapwidthcxx . . $ DelayGrab#delaymapwidth.; xcxx . . $ DelayGrab#x.>0; xcxx . . $ DelayGrab#x.--) { |
| 214 | switch (mode) { |
| 215 | case 1: |
| 216 | /* Random delay with square distribution */ |
| 217 | d = (double)fastrandcxx . . $ DelayGrab#fastrand(db52760e79bf9054).()/(double)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:91:9`!; |
| 218 | *curdelaymapcxx . . $ DelayGrab#curdelaymap. = (int)(d*d*16.0); |
| 219 | break; |
| 220 | case 2: |
| 221 | /* Vertical stripes of increasing delay outward from center */ |
| 222 | if (xcxx . . $ DelayGrab#x.<(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2)) { |
| 223 | vcxx . . $ DelayGrab#v.=(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2)-xcxx . . $ DelayGrab#x.; |
| 224 | } else if (xcxx . . $ DelayGrab#x.>(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2)) { |
| 225 | vcxx . . $ DelayGrab#v.=xcxx . . $ DelayGrab#x.-(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2); |
| 226 | } else { |
| 227 | vcxx . . $ DelayGrab#v.=0; |
| 228 | } |
| 229 | *curdelaymapcxx . . $ DelayGrab#curdelaymap.=vcxx . . $ DelayGrab#v./2; |
| 230 | break; |
| 231 | case 3: |
| 232 | /* Horizontal stripes of increasing delay outward from center */ |
| 233 | if(ycxx . . $ DelayGrab#y.<(delaymapheightcxx . . $ DelayGrab#delaymapheight./2)) { |
| 234 | vcxx . . $ DelayGrab#v. = (delaymapheightcxx . . $ DelayGrab#delaymapheight./2)-ycxx . . $ DelayGrab#y.; |
| 235 | } else if(ycxx . . $ DelayGrab#y.>(delaymapheightcxx . . $ DelayGrab#delaymapheight./2)) { |
| 236 | vcxx . . $ DelayGrab#v. = ycxx . . $ DelayGrab#y.-(delaymapheightcxx . . $ DelayGrab#delaymapheight./2); |
| 237 | } else { |
| 238 | vcxx . . $ DelayGrab#v.=0; |
| 239 | } |
| 240 | *curdelaymapcxx . . $ DelayGrab#curdelaymap.=vcxx . . $ DelayGrab#v./2; |
| 241 | break; |
| 242 | case 4: |
| 243 | /* Rings of increasing delay outward from center */ |
| 244 | vcxx . . $ DelayGrab#v. = (int)isqrtcxx . . $ DelayGrab#isqrt(4c679297bf94b9eb).((unsigned int)((xcxx . . $ DelayGrab#x.-(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2))* |
| 245 | (xcxx . . $ DelayGrab#x.-(delaymapwidthcxx . . $ DelayGrab#delaymapwidth./2))+ |
| 246 | (ycxx . . $ DelayGrab#y.-(delaymapheightcxx . . $ DelayGrab#delaymapheight./2))* |
| 247 | (ycxx . . $ DelayGrab#y.-(delaymapheightcxx . . $ DelayGrab#delaymapheight./2)))); |
| 248 | *curdelaymapcxx . . $ DelayGrab#curdelaymap.=vcxx . . $ DelayGrab#v./2; |
| 249 | break; |
| 250 | } // switch |
| 251 | /* Clip values */ |
| 252 | if ((int)(*curdelaymapcxx . . $ DelayGrab#curdelaymap.)<0) { |
| 253 | *curdelaymapcxx . . $ DelayGrab#curdelaymap.=0; |
| 254 | } else if (*curdelaymapcxx . . $ DelayGrab#curdelaymap.>(QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!-1)) { |
| 255 | *curdelaymapcxx . . $ DelayGrab#curdelaymap.=(QUEUEDEPTHcxx . . $ `src/filter/delaygrab/delaygrab.cpp:42:9`!-1); |
| 256 | } |
| 257 | curdelaymapcxx . . $ DelayGrab#curdelaymap.++; |
| 258 | } |
| 259 | } |
| 260 | current_modecxx . . $ DelayGrab#current_mode. = mode; |
| 261 | } |
| 262 | |
| 263 | void DelayGrabcxx . . $ DelayGrab#::set_blocksizecxx . . $ DelayGrab#set_blocksize(d4f767463ce0a6b3).(int bs) { |
| 264 | |
| 265 | blocksizecxx . . $ DelayGrab#blocksize. = bs; |
| 266 | block_per_pitchcxx . . $ DelayGrab#block_per_pitch. = blocksizecxx . . $ DelayGrab#blocksize.*(geocxx . . $ DelayGrab#geo..pitchcxx . . $ $anonymous_type_53655a9471c18d85_0#pitch.); |
| 267 | block_per_bytesppcxx . . $ DelayGrab#block_per_bytespp. = blocksizecxx . . $ DelayGrab#blocksize.*(geocxx . . $ DelayGrab#geo..bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp.>>3); |
| 268 | block_per_rescxx . . $ DelayGrab#block_per_res. = blocksizecxx . . $ DelayGrab#blocksize.<<(geocxx . . $ DelayGrab#geo..bppcxx . . $ $anonymous_type_53655a9471c18d85_0#bpp.>>4); |
| 269 | |
| 270 | delaymapwidthcxx . . $ DelayGrab#delaymapwidth. = (geocxx . . $ DelayGrab#geo..wcxx . . $ $anonymous_type_53655a9471c18d85_0#w.)/blocksizecxx . . $ DelayGrab#blocksize.; |
| 271 | delaymapheightcxx . . $ DelayGrab#delaymapheight. = (geocxx . . $ DelayGrab#geo..hcxx . . $ $anonymous_type_53655a9471c18d85_0#h.)/blocksizecxx . . $ DelayGrab#blocksize.; |
| 272 | delaymapsizecxx . . $ DelayGrab#delaymapsize. = delaymapheightcxx . . $ DelayGrab#delaymapheight.*delaymapwidthcxx . . $ DelayGrab#delaymapwidth.; |
| 273 | |
| 274 | freecxx . . $ free(5d22bdacc48458e8).(delaymapcxx . . $ DelayGrab#delaymap.); |
| 275 | delaymapcxx . . $ DelayGrab#delaymap. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(delaymapsizecxx . . $ DelayGrab#delaymapsize.*4); |
| 276 | |
| 277 | createDelaymapcxx . . $ DelayGrab#createDelaymap(d4f767463ce0a6b3).(current_modecxx . . $ DelayGrab#current_mode.); |
| 278 | } |
| 279 | |
| 280 | /* i learned this on books // by jaromil */ |
| 281 | int DelayGrabcxx . . $ DelayGrab#::isqrtcxx . . $ DelayGrab#isqrt(4c679297bf94b9eb).(unsigned int x) { |
| 282 | unsigned int m, y, b; m = 0x40000000; |
| 283 | y = 0; while(m != 0) { b = y | m; y = y>>1; |
| 284 | if(x>=b) { x=x-b; y=y|m; } |
| 285 | m=m>>2; } return y; |
| 286 | } |
| 287 | |
| 288 | |
| 289 | |
| 290 | frei0rcxx . . $ frei0r/::constructcxx . . $ frei0r/construct#<DelayGrabcxx . . $ DelayGrab#> plugincxx . . $ plugin.("Delaygrab"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., |
| 291 | "delayed frame blitting mapped on a time bitmap"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., |
| 292 | "Bill Spinhover, Andreas Schiffler, Jaromil"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., |
| 293 | 3,1); |