• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            置頂隨筆

            我已更換新的blog
            猛擊此處訪問新blog
            此blog的文章已全部轉移
            歡迎訪問
            o(∩_∩)o...
            posted @ 2008-02-19 12:26 Felicia 閱讀(1411) | 評論 (0)編輯 收藏
             
                 摘要: USACO歷年比賽題目,測試數據和解題報告下載

              閱讀全文
            posted @ 2007-12-29 14:07 Felicia 閱讀(27465) | 評論 (38)編輯 收藏
             
                 摘要: pku 部分動態規劃題目列表

              閱讀全文
            posted @ 2007-08-26 11:52 Felicia 閱讀(6589) | 評論 (5)編輯 收藏
             
                 摘要: pku 部分計算幾何題目列表

              閱讀全文
            posted @ 2007-08-19 16:14 Felicia 閱讀(3206) | 評論 (12)編輯 收藏

            2010年10月23日

            前言

            在C語言中,假設我們有這樣的一個函數:

            閱讀全文(4746字)
            文章來源:http://gccfeli.cn/2010/10/calling-convention.html
            posted @ 2010-10-23 01:16 Felicia 閱讀(345) | 評論 (0)編輯 收藏

            2010年10月20日

            因為原先用的代碼高亮插件CoolCode不能高亮C#代碼,最近嘗試著使用另一個非常優秀的代碼高亮插件CodeColorer來顯示代碼。CodeColorer使用牛X的GeSHi庫作為后端,能支持上百種不同語言的高亮,的確十分強大。

            閱讀全文(597字)
            文章來源:http://gccfeli.cn/2010/10/codecolorer-insert-code-in-wysiwyg-editor.html
            posted @ 2010-10-20 07:31 Felicia 閱讀(391) | 評論 (0)編輯 收藏

            2010年10月17日

            這兩天Gravatar被墻,真是吐血,博客上所有的頭像都不能顯示了。BS抽風的GFW。

            經測試,雖然%d.gravatar.com不能訪問,但是gravatar.com還是可以訪問的,因此解決方法也很簡單:

            將”wp-includes/pluggable.php”文件中的1649-1652行:

            閱讀全文(338字)
            文章來源:http://gccfeli.cn/2010/10/gravatar-gfw.html
            posted @ 2010-10-17 15:58 Felicia 閱讀(267) | 評論 (0)編輯 收藏

            2010年10月16日

            Win7的80端口默認是被System進程占用的。在cmd下輸入

            netstat -aon | findstr 80
            閱讀全文(318字)
            文章來源:http://gccfeli.cn/2010/10/win7-solve-80-port-occupied.html
            posted @ 2010-10-16 15:40 Felicia 閱讀(433) | 評論 (0)編輯 收藏

            2010年10月15日

            C# 3.0及以后版本提供了擴展方法這一強大工具,使得動態擴展類變得十分方便。具體使用方法是定義一個static class,然后定義static擴展方法,注意擴展方法的第一個參數必須用this關鍵字修飾。擴展方法能像類本身定義的方法一樣被使用,而不需要修改類的代碼,這樣擴展原有庫中的類就變得非常容易了。擴展方法同樣對接口生效,更牛X的是,擴展方法中同樣可以使用泛型。

            下面是一個例子,展示了怎樣擴展IEnumerable接口,增加一個RandomSelect的方法用于在表中隨機選取元素。

            閱讀全文(865字)
            文章來源:http://gccfeli.cn/2010/10/c-generic-extend-method.html
            posted @ 2010-10-15 17:17 Felicia 閱讀(597) | 評論 (0)編輯 收藏

            2009年1月25日

            很久沒有做過逆向了,今天就玩了玩,并且玩了一整天。以下為研究成果。
            Axp包其實是很簡單的,結構簡單,明文保存。

            Axp文件格式大致上如下:
            1.文件頭;
            2.索引表;
            3.文件名表;
            4.數據。
            其中,文件名表以文件名為(list)的文件存在于數據當中。我想,之所以要有這么一個東西,而不和索引表合二為一,恐怕是因為文件名是變長之故吧。

            Axp文件頭的格式大致為:
            1. 文件標示,一般為字符串“AXPK”,它占據了四個字節,占據空間為0x00-0x04;
            2.索引表偏移量,為unit,它占據了四個字節,占據的空間為:0x10-0x13;
            3.文件數,為unit,它占據了四個字節,占據的空間為:0x14-0x17。
            文件頭占據40個字節,既是在0x00-0x27的空間內。

            一般來說,索引表的偏移量為:0x60028,數據區的偏移量為:0x160028.
            不過還是依照以下流程獲取偏移量為好:
            1.獲取文件頭的索引表偏移量;
            2.使用索引表偏移量定位到文件具體位置;
            3.使用文件頭獲取到的文件數來讀取文件數條索引;
            4.根據索引查找文件。
            在 這里我是很納悶的:文件名表文件沒有特殊位置,也似乎沒有看到有文件頭保存的偏移量指向它,如何去獲取這個文件是個很令我困擾的事情。另外,表里面的文件 名順序和資源包里面的文件排列順序似乎是沒有一個順序對應的關系的。如何將索引表和文件名表進行關聯,又是一個令人困擾的事情,或許能夠解釋通的大概就是 他們是讀取后需要排序的,或者說還有什么特別的相關數據我沒有獲取到。


            索引表的索引:
            1.偏移量,unit;
            2.文件大小,unit;
            3.標志位,unit,現在似乎只有0x00000000和0x80000000兩個標識,用于標示該文件是否可以被使用或者已經被刪除。


            到現在為止,最令我困惑的就是那兩張表該如何進行關聯和綁定數據。還有就是如何去獲取文件名表。
            posted @ 2009-01-25 10:53 Felicia 閱讀(1474) | 評論 (3)編輯 收藏
             
            說明:本文章純屬學習之用,如有商業之用,與本人無關。

            網絡游戲《天龍八部》采用的是Ogre3d作為其客戶端渲染引擎,他們對之做了許多自定義的修改,在這里作為學習只用,特別說明一下其自定義的Skeleton的格式,以及如何加載的辦法。

            天龍八部加入了這樣一個區段:
            SKELETON_ANIMATION_TRACK_MULTI_KEYFRAME  0x4120 (16672)
            在加入了這個區段的內容之后,其格式大概就是這樣一個樣子:
             enum SkeletonChunkID {
                    SKELETON_HEADER            
            = 0x1000,
                        
            // char* version           : Version number check
                    SKELETON_BONE              = 0x2000,
                    
            // Repeating section defining each bone in the system. 
                    
            // Bones are assigned indexes automatically based on their order of declaration
                    
            // starting with 0.

                        
            // char* name                       : name of the bone
                        
            // unsigned short handle            : handle of the bone, should be contiguous & start at 0
                        
            // Vector3 position                 : position of this bone relative to parent 
                        
            // Quaternion orientation           : orientation of this bone relative to parent 
                        
            // Vector3 scale                    : scale of this bone relative to parent 

                    SKELETON_BONE_PARENT       
            = 0x3000,
                    
            // Record of the parent of a single bone, used to build the node tree
                    
            // Repeating section, listed in Bone Index order, one per Bone

                        
            // unsigned short handle             : child bone
                        
            // unsigned short parentHandle   : parent bone

                    SKELETON_ANIMATION         
            = 0x4000,
                    
            // A single animation for this skeleton

                        
            // char* name                       : Name of the animation
                        
            // float length                      : Length of the animation in seconds

                        SKELETON_ANIMATION_TRACK 
            = 0x4100,
                        
            // A single animation track (relates to a single bone)
                        
            // Repeating section (within SKELETON_ANIMATION)
                            
                            
            // unsigned short boneIndex     : Index of bone to apply to

                            SKELETON_ANIMATION_TRACK_KEYFRAME 
            = 0x4110,
                            
            // A single keyframe within the track
                            
            // Repeating section

                                
            // float time                    : The time position (seconds)
                                
            // Quaternion rotate            : Rotation to apply at this keyframe
                                
            // Vector3 translate            : Translation to apply at this keyframe
                                
            // Vector3 scale                : Scale to apply at this keyframe

                            SKELETON_ANIMATION_TRACK_MULTI_KEYFRAME 
            = 0x4120,
                            
            // A multiple keyframe within the track
                            
            // Repeating section

                                
            // float length                 : Length of the animation in seconds
                                
            // float flags                  : Length of the animation in seconds
                                    
            // float time                   : The time position (seconds)
                                    
            // Quaternion rotate            : Rotation to apply at this keyframe
                                    
            // Vector3 translate            : Translation to apply at this keyframe
                            
                    SKELETON_ANIMATION_LINK         
            = 0x5000
                    
            // Link to another skeleton, to re-use its animations

                        
            // char* skeletonName                    : name of skeleton to get animations from
                        
            // float scale                            : scale to apply to trans/scale keys

                };


            然后我們打開OgreSkeletonSerializer.cpp找到SkeletonSerializer::readAnimationTrack的實現,然后替換為下面的代碼:
            void SkeletonSerializer::readAnimationTrack(DataStreamPtr& stream, Animation* anim, 
                    Skeleton
            * pSkel)
                {
                    
            // unsigned short boneIndex     : Index of bone to apply to
                    unsigned short boneHandle;
                    readShorts(stream, 
            &boneHandle, 1);

                    
            // Find bone
                    Bone *targetBone = pSkel->getBone(boneHandle);

                    
            // Create track
                    NodeAnimationTrack* pTrack = anim->createNodeTrack(boneHandle, targetBone);

                    
            // Keep looking for nested keyframes
                    if (!stream->eof())
                    {
                        unsigned 
            short streamID = readChunk(stream);
                        
            while( (streamID == SKELETON_ANIMATION_TRACK_KEYFRAME || streamID == SKELETON_ANIMATION_TRACK_MULTI_KEYFRAME)
                            
            && !stream->eof())
                        {
                            
            if (streamID == SKELETON_ANIMATION_TRACK_MULTI_KEYFRAME)
                            {
                                
            // TLBB 新增了此部分
                                unsigned short len;
                                unsigned 
            short flags;
                                readShorts(stream, 
            &len, 1);
                                readShorts(stream, 
            &flags, 1);

                                
            int count = (mCurrentstreamLen - 4 - 4/ 4;
                                
            if (len != count / 8)
                                {
                                    len 
            = len;
                                }
                                
            float time;
                                
            for (int i = 0; i < len; i += 1)
                                {
                                    readFloats(stream, 
            &time, 1);
                                    TransformKeyFrame 
            *kf = pTrack->createNodeKeyFrame(time);

                                    Quaternion rot 
            = Quaternion::IDENTITY;
                                    
            if (flags & 1)
                                    {
                                        readObject(stream, rot);
                                    }
                                    kf
            ->setRotation(rot);

                                    Vector3 trans 
            = Vector3::ZERO;
                                    
            if (flags & 2)
                                    {
                                        readObject(stream, trans);
                                    }
                                    kf
            ->setTranslate(trans);
                                }
                            }
                            
            else
                            {
                                readKeyFrame(stream, pTrack, pSkel);
                            }

                            
            if (!stream->eof())
                            {
                                
            // Get next stream
                                streamID = readChunk(stream);
                            }
                        }
                       
                        
            if (!stream->eof())
                        {
                            
            // Backpedal back to start of this stream if we've found a non-keyframe
                            stream->skip(-STREAM_OVERHEAD_SIZE);
                        }
                    }
                }
            保存然后重新編譯Ogre就OK了,理論上就是可以加載其骨骼動畫了。
            另外,其骨骼文件名,模型文件名都是用的中文,而VS2005對中文路徑名的支持是有一個bug的,解決此問題參見下面這篇文章:
            http://www.shnenglu.com/tx7do/archive/2008/12/09/68897.html
            posted @ 2009-01-25 10:36 Felicia 閱讀(963) | 評論 (0)編輯 收藏

            2008年2月19日

            我已更換新的blog
            猛擊此處訪問新blog
            此blog的文章已全部轉移
            歡迎訪問
            o(∩_∩)o...
            posted @ 2008-02-19 12:26 Felicia 閱讀(1411) | 評論 (0)編輯 收藏

            2008年2月7日

                 摘要: Felicia的果凍秘方!

              閱讀全文
            posted @ 2008-02-07 00:40 Felicia 閱讀(933) | 評論 (0)編輯 收藏

            2008年1月30日

            每次在telnet下退出珞珈山水,都會隨機出現一個離版畫面。
            我最喜歡的是這首詩


            就這樣走了嗎
            親愛的 Felicia

            你可知道
            與你相遇在這十字路口
            是我的最美回憶

            我知道你會回來
            在這熟悉路口
            不要說是否曾經相約
            不去說諾言
            我知道你的腳步
            終會明白
            這心的約定

            讓我靜靜等你再次出現

            posted @ 2008-01-30 11:24 Felicia 閱讀(502) | 評論 (0)編輯 收藏
            僅列出標題  下一頁
             
            99久久无码一区人妻a黑| 亚洲欧美久久久久9999| 久久久久久久久无码精品亚洲日韩 | 久久人人爽人人爽人人片AV高清| 亚洲精品视频久久久| 亚洲第一极品精品无码久久| 国产精品对白刺激久久久| 久久久久国色AV免费观看| 婷婷久久香蕉五月综合加勒比| 久久99国产精品久久| 久久人人爽人人爽人人片AV东京热| 精品久久人妻av中文字幕| 久久涩综合| 久久久久免费精品国产 | 久久午夜无码鲁丝片| 激情五月综合综合久久69| 久久综合精品国产二区无码| 久久嫩草影院免费看夜色| 久久午夜无码鲁丝片| 久久精品国产精品亚洲精品 | 色综合久久88色综合天天| 欧美国产成人久久精品| 久久精品国产只有精品66| 国产精品久久毛片完整版| 乱亲女H秽乱长久久久| 少妇无套内谢久久久久| 久久久久国产| 国产香蕉97碰碰久久人人| 久久综合中文字幕| 国产 亚洲 欧美 另类 久久| 国产精品天天影视久久综合网| 欧美va久久久噜噜噜久久| 亚洲中文久久精品无码ww16 | 色综合久久中文字幕综合网| 国产成人香蕉久久久久| 99久久精品免费观看国产| 国产99久久九九精品无码| 精品久久香蕉国产线看观看亚洲| 久久久av波多野一区二区| 国产精品99久久久久久人| 99久久久精品|