These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
|||||||||||||||||||||||||||||||||||||||||||||||
cd ~/git git svn clone --stdlayout svn+ssh://yoya@svn.sourceforge.jp/svnroot/swfed/ cd swfed git remote add origin yoya@git.sourceforge.jp:/gitroot/swfed/swfed.git git push --mirror origin初め、--stdlayout を知らずに trunk や branches フォルダが git に登録されてしまい、やり直す為に Git のレポジトリを履歴毎全削除しました。
git push origin :master結構、試行錯誤しました。
<?php $im = imagecreate(100, 100); $red = imagecolorallocate($im, 255, 0, 0); imagefill($im, 0, 0, $red); imagepng($im);
<?php $im = imagecreate(100, 100); $red = imagecolorallocatealpha($im, 255, 0, 0, 1); imagefill($im, 0, 0, $red); imagepng($im);
<?php $im = imagecreatetruecolor(100, 100); $red = imagecolorallocate($im, 255, 0, 0); imagefill($im, 0, 0, $red); imagepng($im);
<?php $im = imagecreatetruecolor(100, 100); $red = imagecolorallocatealpha($im, 255, 0, 0, 0); imagefill($im, 0, 0, $red); imagesavealpha($im, true); imagepng($im);
<?php $swf = new SWFEditor(); $swf->input($swfdata); $image_cond = array('width' => 100, 'blue' => 255); $gifdata = file_get_contents('aria.gif'); $swf->replaceBitmapData($image_cond, $pngdata); echo $swf->output();を実行すると、
swf_object_replace_shapedata: fallback to read old shape data XXX (6) ptr=0x99db138 (/home/yoya/git/swfed/src/swf_tag.c, 107)replaceShapeData の扱うデータ形式が 0.37 から 0.38 で変わったので、0.37 のデータも受理出来るように fallback 処理を入れていますが、そこで free せずにポインタを上書きしてました。
XXX (204928) ptr=0xb40eb48 (/home/yoya/git/swfed/src/bitstream.c, 15) XXX (204929) ptr=0xb49af90 (/home/yoya/git/swfed/src/bitstream.c, 69)実はこっちがより深刻で…
Code |Length|Type| String |StringEnd| 0x96 | ??? | 0 | ??? | 0 | <------- Length ------->仕様書を読むと。
ActionPush pushes one or more values onto the stack. The Type field specifies the type of the value to be pushed.とありまして、複数の値を一度に Push 出来るようです。
|Length|Type| String |StringEnd|Type| something | | ??? | 0 | ??? | 0 | ? | ??? | <---------------- Length ---------------->面倒なのは、情報要素毎に Type 指定するので、任意の型が混在した配列を表現できる事です。
a = 1; b = 2; c = 3;コンパイルすると以下のような SWF バイナリが出来ます。
00000000 46 57 53 04 4b 00 00 00 70 00 09 60 00 00 96 00 |FWS.K...p..`....| 00000010 00 0a 01 00 43 02 ff ff ff 3f 03 28 00 00 00 96 |....C....?.(....| 00000020 03 00 00 61 00 96 03 00 00 31 00 1d 96 03 00 00 |...a.....1......| 00000030 62 00 96 03 00 00 32 00 1d 96 03 00 00 63 00 96 |b.....2......c..| 00000040 03 00 00 33 00 1d 00 40 00 00 00 |...3...@...|swftools の swfdump で逆アセンブルして確認
[00c] 40 DOACTION ( 3 bytes) action: Push String:"a" ( 3 bytes) action: Push String:"1" ( 0 bytes) action: SetVariable ( 3 bytes) action: Push String:"b" ( 3 bytes) action: Push String:"2" ( 0 bytes) action: SetVariable ( 3 bytes) action: Push String:"c" ( 3 bytes) action: Push String:"3" ( 0 bytes) action: SetVariable ( 0 bytes) action: Endこの中から Action Push のイメージを抜き出すと、この辺り。
00000010 96 | .| ~~ P (Push) 00000020 03 00 00 61 00 96 03 00 00 31 00 1d 96 03 00 00 |...a.....1......| ~~~~ ~~ ~~~~~ ~~ ~~~~~ ~~ ~~~~~ ~~ len type 'a' AP len type '1' SV (SetVariables)(意味的に正しいか自信ないけど、今回はバイナリ形式しか考えないとして)
00000010 96 | .| ~~ P (Push) 00000020 06 00 00 61 00 00 31 00 1d 96 03 00 00 62 00 96 |...a..1......b..| ~~~~~ ~~ ~~~~~ ~~ ~~~~~ ~~ len type 'a' type '1' SV (SetVariables)もう一度、swfdump で
[00c] 40 DOACTION ( 6 bytes) action: Push String:"a" String:"1" ( 0 bytes) action: SetVariable ( 3 bytes) action: Push String:"b" ( 3 bytes) action: Push String:"2" ( 0 bytes) action: SetVariable ( 3 bytes) action: Push String:"c" ( 3 bytes) action: Push String:"3" ( 0 bytes) action: SetVariable ( 0 bytes) action: Endテスト用サンプルの作り方が分かったので、これで実装できます。
2011-06-26 08:23:24 UTC Hi Yoya I am an Australian who fools around with PHP as a hobby. I have just downloaded the openGL package and am attempting to get it going. It seems really old from what I read in the glut32.txt document. I want to be able to use openGL to render a rotating sphere for a game idea I am occasionally working on. Cheers訳すると、こんな感じ。
よやさん。 私は趣味でPHPを触ってるオーストラリア人です。 openGLパッケージをダウンロードして試してます。 glut32.txt より実際には古いみたいです。 ゲームで回転する球体をレンダリングするのに OpenGL を使いたいです。 それでは。ふむ。
CHANGES/FIXES: (Oct 4, '01) x Fixed bug in glutEnterGameMode() that caused new windows to not be in "fullscreen" mode, so they got window decorations. (Oct 3, '01) x Fixed bug in getVisualInfoFromString(): visuals not reloaded on <略>どちらの関数も 0.2.0 の tarball どころか cvs にさえ存在しません。(そういえば glutEnterGameMode 欲しくて実装始めてました)