diff options
-rwxr-xr-x | DrawableObjectTests/DrawableObject.py | 1 | ||||
-rw-r--r-- | DrawableObjectTests/Room.gif | bin | 0 -> 34293 bytes | |||
-rw-r--r-- | DrawableObjectTests/TestObject | 16 | ||||
-rw-r--r-- | DrawableObjectTests/TestObject.py | 16 | ||||
-rw-r--r-- | DrawableObjectTests/TestObject.txt | 16 | ||||
-rw-r--r-- | DrawableObjectTests/boxes.py | 32 | ||||
-rw-r--r-- | DrawableObjectTests/goblin.png | bin | 0 -> 29875 bytes | |||
-rw-r--r-- | DrawableObjectTests/renderupdates.py | 71 | ||||
-rw-r--r-- | MAFH2/BattleEngine.py | 45 | ||||
-rw-r--r-- | MAFH2/BattleMenu.py | 100 | ||||
-rw-r--r-- | MAFH2/Dungeon.py | 94 | ||||
-rw-r--r-- | MAFH2/Enemy.py | 29 | ||||
-rwxr-xr-x | MAFH2/MafhActivity.py | 3 | ||||
-rw-r--r-- | MAFH2/MafhGameMenu.py | 15 | ||||
-rw-r--r-- | MAFH2/MagicMenu.py | 106 | ||||
-rw-r--r-- | MAFH2/Map.py | 340 | ||||
-rw-r--r-- | MAFH2/Profile.py | 56 | ||||
-rw-r--r-- | MAFH2/Spritesheet.py | 31 | ||||
-rw-r--r-- | MAFH2/TermBox.py | 27 | ||||
-rw-r--r-- | MAFH2/assets/image/character/Crab.gif | bin | 0 -> 16666 bytes | |||
-rwxr-xr-x | MAFH2/assets/image/character/anim_test.gif | bin | 25740 -> 12794 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/anim_test.psd | bin | 0 -> 165479 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/bonesprout.gif | bin | 0 -> 10720 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/concept_goblin.gif | bin | 0 -> 29242 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/concept_goblin.png | bin | 25713 -> 29875 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/concept_orc.gif | bin | 0 -> 9703 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/concept_wizard.gif | bin | 0 -> 9994 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/dog~.gif | bin | 0 -> 547 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/dragon.gif | bin | 0 -> 78571 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/dragon.psd | bin | 0 -> 718631 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/faren.gif | bin | 0 -> 5102 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/frost_giant.gif | bin | 0 -> 15787 bytes | |||
-rw-r--r-- | MAFH2/assets/image/character/merchant.gif | bin | 0 -> 6350 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/celestial/F.gif | bin | 0 -> 22904 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/celestial/L.gif | bin | 0 -> 11929 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/celestial/Room.gif | bin | 0 -> 12887 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/ice/F.gif | bin | 0 -> 8898 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/ice/L.gif | bin | 0 -> 9287 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/ice/Room.gif | bin | 0 -> 7655 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/pyramid/F.gif | bin | 0 -> 8649 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/pyramid/L.gif | bin | 0 -> 12260 bytes | |||
-rw-r--r-- | MAFH2/assets/image/environment/pyramid/Room.gif | bin | 0 -> 34293 bytes | |||
-rw-r--r-- | MAFH2/assets/image/hud/bt.gif | bin | 0 -> 2126 bytes | |||
-rw-r--r-- | MAFH2/assets/image/hud/hp.gif | bin | 0 -> 4978 bytes | |||
-rwxr-xr-x | MAFH2/drawableobject/DrawableObject.py | 161 | ||||
-rwxr-xr-x | MAFH2/drawableobject/Spritesheet.py | 33 | ||||
-rw-r--r-- | MAFH2/ezmenu.py | 55 | ||||
-rw-r--r-- | MAFH2/fortuneengine/DrawableFontObject.py | 19 | ||||
-rw-r--r-- | MAFH2/fortuneengine/DrawableObject.py | 157 | ||||
-rw-r--r-- | MAFH2/fortuneengine/DynamicDrawableObject.py | 75 | ||||
-rw-r--r-- | MAFH2/fortuneengine/GameEngine.py | 31 | ||||
-rw-r--r-- | MAFH2/fortuneengine/Scene.py | 186 | ||||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp | bin | 3256 -> 3256 bytes | |||
-rw-r--r--[-rwxr-xr-x] | devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp | bin | 3256 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/fileTypeTests.py | 478 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/testKit.py | 589 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/AnimatedSprite.py (renamed from devtools/CompleteTestKit/AnimatedSprite.py) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/AnimatedSpriteTest.py (renamed from devtools/CompleteTestKit/AnimatedSpriteTest.py) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimTestMod.py (renamed from devtools/CompleteTestKit/Animation Styles/AnimTestMod.py) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimatedSprite.py (renamed from devtools/CompleteTestKit/Animation Styles/AnimatedSprite.py) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp) | bin | 57656 -> 57656 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp) | bin | 86456 -> 86456 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/Buttons.gif (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/Buttons.gif) | bin | 4053 -> 4053 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/Buttons.gif (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/Buttons.gif) | bin | 2722 -> 2722 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/Buttons.png (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/Buttons.png) | bin | 5786 -> 5786 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/Buttons.png (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/Buttons.png) | bin | 6542 -> 6542 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/Buttons.psd (renamed from devtools/CompleteTestKit/Animation Styles/Buttons.psd) | bin | 88230 -> 88230 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/1.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/2.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/3.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/4.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/5.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/6.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/7.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/8.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/9.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/1.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/2.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/3.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/4.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/5.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/6.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/7.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/8.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/9.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/1.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/1.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/2.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/2.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/3.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/3.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/4.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/4.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/5.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/5.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/6.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/6.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/7.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/7.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/8.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/8.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/9.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/9.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/1.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/1.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/2.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/2.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/3.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/3.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/4.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/4.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/5.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/5.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/6.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/6.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/7.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/7.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/8.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/8.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/9.bmp (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/9.bmp) | bin | 4856 -> 4856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/1.gif) | bin | 259 -> 259 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/2.gif) | bin | 411 -> 411 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/3.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/3.gif) | bin | 334 -> 334 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/4.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/4.gif) | bin | 272 -> 272 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/5.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/5.gif) | bin | 314 -> 314 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/6.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/6.gif) | bin | 282 -> 282 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/7.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/7.gif) | bin | 344 -> 344 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/8.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/8.gif) | bin | 400 -> 400 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/9.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/9.gif) | bin | 388 -> 388 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/1.gif) | bin | 259 -> 259 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/2.gif) | bin | 411 -> 411 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/3.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/3.gif) | bin | 334 -> 334 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/4.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/4.gif) | bin | 272 -> 272 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/5.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/5.gif) | bin | 314 -> 314 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/6.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/6.gif) | bin | 282 -> 282 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/7.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/7.gif) | bin | 344 -> 344 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/8.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/8.gif) | bin | 400 -> 400 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/9.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/9.gif) | bin | 388 -> 388 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/1.gif) | bin | 207 -> 207 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/2.gif) | bin | 316 -> 316 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/3.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/3.gif) | bin | 297 -> 297 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/4.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/4.gif) | bin | 241 -> 241 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/5.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/5.gif) | bin | 250 -> 250 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/6.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/6.gif) | bin | 233 -> 233 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/7.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/7.gif) | bin | 228 -> 228 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/8.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/8.gif) | bin | 258 -> 258 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/9.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/9.gif) | bin | 304 -> 304 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/1.gif) | bin | 207 -> 207 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/2.gif) | bin | 316 -> 316 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/3.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/3.gif) | bin | 297 -> 297 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/4.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/4.gif) | bin | 241 -> 241 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/5.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/5.gif) | bin | 250 -> 250 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/6.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/6.gif) | bin | 233 -> 233 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/7.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/7.gif) | bin | 228 -> 228 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/8.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/8.gif) | bin | 258 -> 258 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/9.gif (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/9.gif) | bin | 304 -> 304 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/1.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/1.png) | bin | 3012 -> 3012 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/2.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/2.png) | bin | 3215 -> 3215 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/3.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/3.png) | bin | 3115 -> 3115 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/4.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/4.png) | bin | 3055 -> 3055 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/5.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/5.png) | bin | 3124 -> 3124 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/6.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/6.png) | bin | 3111 -> 3111 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/7.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/7.png) | bin | 3247 -> 3247 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/8.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/8.png) | bin | 3230 -> 3230 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/9.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/9.png) | bin | 3270 -> 3270 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/1.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/1.png) | bin | 3013 -> 3013 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/2.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/2.png) | bin | 3227 -> 3227 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/3.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/3.png) | bin | 3116 -> 3116 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/4.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/4.png) | bin | 3056 -> 3056 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/5.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/5.png) | bin | 3134 -> 3134 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/6.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/6.png) | bin | 3112 -> 3112 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/7.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/7.png) | bin | 3246 -> 3246 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/8.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/8.png) | bin | 3237 -> 3237 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/9.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/9.png) | bin | 3273 -> 3273 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/1.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/1.png) | bin | 3049 -> 3049 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/2.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/2.png) | bin | 3356 -> 3356 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/3.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/3.png) | bin | 3178 -> 3178 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/4.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/4.png) | bin | 3095 -> 3095 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/5.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/5.png) | bin | 3234 -> 3234 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/6.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/6.png) | bin | 3177 -> 3177 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/7.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/7.png) | bin | 3092 -> 3092 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/8.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/8.png) | bin | 3171 -> 3171 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/9.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/9.png) | bin | 3195 -> 3195 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/1.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/1.png) | bin | 3035 -> 3035 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/2.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/2.png) | bin | 3353 -> 3353 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/3.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/3.png) | bin | 3178 -> 3178 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/4.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/4.png) | bin | 3081 -> 3081 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/5.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/5.png) | bin | 3235 -> 3235 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/6.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/6.png) | bin | 3174 -> 3174 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/7.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/7.png) | bin | 3074 -> 3074 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/8.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/8.png) | bin | 3174 -> 3174 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/9.png (renamed from devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/9.png) | bin | 3177 -> 3177 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp) | bin | 28856 -> 28856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp) | bin | 28856 -> 28856 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp) | bin | 43256 -> 43256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp) | bin | 43256 -> 43256 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/1.gif) | bin | 1883 -> 1883 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/2.gif) | bin | 1883 -> 1883 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/1.gif (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/1.gif) | bin | 1162 -> 1162 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/2.gif (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/2.gif) | bin | 1388 -> 1388 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/1.png (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/1.png) | bin | 4317 -> 4317 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/2.png (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/2.png) | bin | 4342 -> 4342 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/text.txt) | 0 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/1.png (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/1.png) | bin | 4164 -> 4164 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/2.png (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/2.png) | bin | 5185 -> 5185 bytes | |||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/text.txt (renamed from devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/text.txt) | 0 | ||||
-rw-r--r-- | devtools/CompleteTestKit/to-do/Scene.py | 6 | ||||
-rwxr-xr-x | devtools/CompleteTestKit/to-do/dirtyTest.py | 122 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp | bin | 0 -> 3256 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp | bin | 0 -> 3256 bytes | |||
-rwxr-xr-x | devtools/Dave's Test Kit/DODirtyTest.py | 92 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/DrawableFontObject.py | 16 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/DrawableObject.py | 141 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/DynamicDrawableObject.py | 71 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/FontDirtyTest.py | 57 | ||||
-rw-r--r-- | devtools/Dave's Test Kit/Room.gif | bin | 0 -> 34293 bytes | |||
-rw-r--r-- | devtools/Dave's Test Kit/Scene.py | 199 |
242 files changed, 2665 insertions, 821 deletions
diff --git a/DrawableObjectTests/DrawableObject.py b/DrawableObjectTests/DrawableObject.py index d3f0f0f..07a5613 100755 --- a/DrawableObjectTests/DrawableObject.py +++ b/DrawableObjectTests/DrawableObject.py @@ -15,6 +15,7 @@ class DrawableObject(pygame.sprite.Sprite): self._origImages.append(images[cnt][0].convert())
cnt += 1
self._start = pygame.time.get_ticks()
+ self.image = self._images[0]
self._delay = 1000 / fps
self._last_update = 0
self._frame = 0
diff --git a/DrawableObjectTests/Room.gif b/DrawableObjectTests/Room.gif Binary files differnew file mode 100644 index 0000000..798ebf1 --- /dev/null +++ b/DrawableObjectTests/Room.gif diff --git a/DrawableObjectTests/TestObject b/DrawableObjectTests/TestObject new file mode 100644 index 0000000..3dbdc60 --- /dev/null +++ b/DrawableObjectTests/TestObject @@ -0,0 +1,16 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class TestObject:
+
+ def __init__(self, drawableObject):
+
+ self.myDrawableObject = drawableObject
+
+ def changeSize(self, x, y):
+
+ self.myDrawableObject.scale(x,y)
+
+ def getDrawable(self):
+
+ return self.myDrawableObject
\ No newline at end of file diff --git a/DrawableObjectTests/TestObject.py b/DrawableObjectTests/TestObject.py new file mode 100644 index 0000000..3dbdc60 --- /dev/null +++ b/DrawableObjectTests/TestObject.py @@ -0,0 +1,16 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class TestObject:
+
+ def __init__(self, drawableObject):
+
+ self.myDrawableObject = drawableObject
+
+ def changeSize(self, x, y):
+
+ self.myDrawableObject.scale(x,y)
+
+ def getDrawable(self):
+
+ return self.myDrawableObject
\ No newline at end of file diff --git a/DrawableObjectTests/TestObject.txt b/DrawableObjectTests/TestObject.txt new file mode 100644 index 0000000..3dbdc60 --- /dev/null +++ b/DrawableObjectTests/TestObject.txt @@ -0,0 +1,16 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class TestObject:
+
+ def __init__(self, drawableObject):
+
+ self.myDrawableObject = drawableObject
+
+ def changeSize(self, x, y):
+
+ self.myDrawableObject.scale(x,y)
+
+ def getDrawable(self):
+
+ return self.myDrawableObject
\ No newline at end of file diff --git a/DrawableObjectTests/boxes.py b/DrawableObjectTests/boxes.py new file mode 100644 index 0000000..5b444b6 --- /dev/null +++ b/DrawableObjectTests/boxes.py @@ -0,0 +1,32 @@ +import pygame
+
+class UpDownBox(pygame.sprite.Sprite):
+ def __init__(self, imagesList, initial_position):
+ pygame.sprite.Sprite.__init__(self)
+ self.images = imagesList
+ self.listLen = len(imagesList)
+ self.listPos = 0
+ self.image = imagesList[self.listPos]
+ self.rect = self.image.get_rect()
+ self.rect.topleft = initial_position
+ self.going_down = True # Start going downwards
+ self.next_update_time = 0 # update() hasn't been called yet.
+
+ def update(self, current_time, bottom):
+ # Update every 10 milliseconds = 1/100th of a second.
+ if self.next_update_time < current_time:
+
+ # If we're at the top or bottom of the screen, switch directions.
+ if self.rect.bottom == bottom - 1: self.going_down = False
+ elif self.rect.top == 0: self.going_down = True
+
+ # Move our position up or down by one pixel
+ if self.going_down: self.rect.top += 1
+ else: self.rect.top -= 1
+
+ if self.listPos < self.listLen - 1:
+ self.listPos += 1
+ else:
+ self.listPos = 0
+ self.image = self.images[self.listPos]
+ self.next_update_time = current_time
diff --git a/DrawableObjectTests/goblin.png b/DrawableObjectTests/goblin.png Binary files differnew file mode 100644 index 0000000..6bdca0f --- /dev/null +++ b/DrawableObjectTests/goblin.png diff --git a/DrawableObjectTests/renderupdates.py b/DrawableObjectTests/renderupdates.py new file mode 100644 index 0000000..30ffe5b --- /dev/null +++ b/DrawableObjectTests/renderupdates.py @@ -0,0 +1,71 @@ +import pygame
+from pygame.locals import *
+from boxes import UpDownBox
+from time import time
+
+pygame.init()
+boxes = pygame.sprite.RenderUpdates()
+boxesTwo = pygame.sprite.RenderUpdates()
+boxesThree = pygame.sprite.RenderUpdates()
+
+switch1 = [
+ pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/3%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/4%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/5%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/6%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/7%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/8%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
+]
+
+switch2 = [
+ pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/3%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/4%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/5%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/6%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/7%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/8%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
+]
+
+switch3 = [
+ pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/3%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/4%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/5%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/6%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/7%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/8%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
+]
+
+boxes.add(UpDownBox(switch1, (0, 0)))
+boxes.add(UpDownBox(switch1, (100, 100)))
+boxes.add(UpDownBox(switch1, (200, 200)))
+
+
+screen = pygame.display.set_mode([1200, 900])
+boxesTwo.add(UpDownBox([pygame.image.load("goblin.png")], (0,300)))
+background = pygame.image.load("Room.gif")
+#background.fill(pygame.image.load("Room.gif"))
+screen.blit(background, [0, 0])
+pygame.display.flip()
+boxesTwo.update(pygame.time.get_ticks(), 700)
+rectlist = boxesTwo.draw(screen)
+pygame.display.update(rectlist)
+start = time()
+for i in range(2000):
+ boxes.update(pygame.time.get_ticks(), 700)
+ boxesTwo.update(pygame.time.get_ticks(), 700)
+ rectlist = boxesTwo.draw(screen)
+ rectlist.extend(boxes.draw(screen))
+ pygame.display.update(rectlist)
+ boxesTwo.clear(screen, background)
+ boxes.clear(screen, background)
+
+print 2000/(time() - start)
diff --git a/MAFH2/BattleEngine.py b/MAFH2/BattleEngine.py index 598bb03..e9ae66e 100644 --- a/MAFH2/BattleEngine.py +++ b/MAFH2/BattleEngine.py @@ -2,8 +2,11 @@ from fortuneengine.GameEngineElement import GameEngineElement from Enemy import get_enemy from BattleMenu import BattleMenuHolder from MagicMenu import MagicMenuHolder -from AnimatedSprite import Spritesheet +from Spritesheet import Spritesheet from Items import get_item +from fortuneengine.DrawableObject import DrawableObject +from fortuneengine.DynamicDrawableObject import DynamicDrawableObject +from fortuneengine.Scene import Scene import pygame import time @@ -14,6 +17,7 @@ import random PLAYER_WAIT = 1 PLAYER_MULT = 2 +_dirtyList=[] class BattleEngine(GameEngineElement): def __init__(self, dgn): @@ -39,15 +43,21 @@ class BattleEngine(GameEngineElement): e_index = self.current_room.get_enemy( i ) if e_index != '0': - self.enemy_list.append( get_enemy( e_index ) ) + curE = get_enemy( e_index ) + self.enemy_list.append( curE ) + self.game_engine.get_scene().addObject(curE.get_sprite()) # Preload images - self.__images = {} + self.__drawableObjects = {} for i in ['arrow_select']: - self.__images[i] = pygame.image.load( HUD_PATH + i + ".gif" ) + self.__drawableObjects[i] = DrawableObject([pygame.image.load( HUD_PATH + i + ".gif" )], '') + self.game_engine.get_scene().addObject(self.__drawableObjects[i]) - self.__images['hp'] = Spritesheet( HUD_PATH + "hp.png" ).img_extract(11,1,100,100) - self.__images['bt'] = Spritesheet( HUD_PATH + "bt.png" ).img_extract(1,11,100,25) + self.__drawableObjects['hp'] = DrawableObject(Spritesheet( HUD_PATH + "hp.gif" ).img_extract(11,1,100,100,[255,0,255]), '') + self.__drawableObjects['bt'] = DrawableObject(Spritesheet( HUD_PATH + "bt.gif" ).img_extract(1,11,100,25), '', True) + self.__drawableObjects['hp'].setColorKey((255,0,255)) + self.game_engine.get_scene().addObject(self.__drawableObjects['hp']) + self.game_engine.get_scene().addObject(self.__drawableObjects['bt']) self.add_to_engine() self.game_engine.add_object('battlemenu', BattleMenuHolder( self.menu_callback ) ) @@ -313,6 +323,7 @@ class BattleEngine(GameEngineElement): if enemy.HP <= 0: enemy.alive = False self.enemy_list.remove(enemy) + enemy.get_sprite().makeTransparent(True) self.active_target = 1 if enemy.alive: random.seed() @@ -354,9 +365,13 @@ class BattleEngine(GameEngineElement): room.remove_item( i ) self.game_engine.get_object('mesg').add_line(_("%s dropped!")% item.name) room.has_enemy = False + #self terminate #print 'end battle called' self.remove_from_engine() + for key in self.__drawableObjects: + self.game_engine.get_scene().removeObject(self.__drawableObjects[key]) + self.game_engine.get_object('battlemenu').remove_from_engine() self.game_engine.remove_object('battle') @@ -399,28 +414,28 @@ class BattleEngine(GameEngineElement): x=250 y=150 i = 1 - + tick_time = pygame.time.get_ticks() # Draw Enemy and Item Selection for enemy in self.enemy_list: - if enemy.alive: - if self.active_target == i: - screen.blit(self.__images['arrow_select'], (x+(i*200),y-25)) - enemy.sprite.update( tick_time ) - screen.blit(enemy.sprite.image, (x+(i*200),y)) - i = i+1 + if enemy.alive and self.active_target == i: + self.__drawableObjects['arrow_select'].setPosition(x+(i*200),y-25) + enemy.get_sprite().setPosition(x+(i*200),y) + i = i+1 # Draw Hud profile = self.game_engine.get_object('profile') # Player Health health = 10 - profile.hero.healthLevel() - screen.blit(self.__images['hp'][health], (25,25)) + + self.__drawableObjects['hp'].goToFrame(health) + self.__drawableObjects['hp'].setPosition(25,25) #Battle Timer if(self.battleTimer > 0): tIndex = int(time.time() - self.battleTimer) if tIndex > 10: tIndex = 10 - screen.blit(self.__images['bt'][tIndex], (25,130)) + #screen.blit(self.__images['bt'][tIndex], (25,130)) diff --git a/MAFH2/BattleMenu.py b/MAFH2/BattleMenu.py index 179bf29..bdd0919 100644 --- a/MAFH2/BattleMenu.py +++ b/MAFH2/BattleMenu.py @@ -1,5 +1,7 @@ import pygame from fortuneengine.GameEngineElement import GameEngineElement +from fortuneengine.DrawableObject import DrawableObject +from fortuneengine.DrawableFontObject import DrawableFontObject from constants import MENU_PATH from gettext import gettext as _ @@ -12,35 +14,38 @@ class BattleMenuHolder( GameEngineElement ): GameEngineElement.__init__(self, has_draw=True, has_event=False) self.menu = None self.callback = callback - self.background = pygame.image.load(MENU_PATH + "battleMenubackground.gif") - self.disp = "" - self.sec_des = "" + self.background = DrawableObject([pygame.image.load( MENU_PATH + "battleMenubackground.gif")], '') self.font = pygame.font.SysFont("cmr10",18,False,False) + self.disp = DrawableFontObject("", self.font) + self.sec_disp = DrawableFontObject("", self.font) + self.game_engine.get_scene().addObject(self.background) + self.game_engine.get_scene().addObject(self.disp) + self.game_engine.get_scene().addObject(self.sec_disp) def set_disp(self, msg): - self.disp = msg + self.disp.changeText(msg, (0,0,0)) def set_sec_disp(self, msg): - self.sec_des = msg + self.sec_disp.changeText(msg, (0,0,0)) def remove_from_engine(self): super( BattleMenuHolder, self ).remove_from_engine() + self.game_engine.get_scene().removeObject(self.background) + self.game_engine.get_scene().removeObject(self.disp) + self.game_engine.get_scene().removeObject(self.sec_disp) self.clear_menu() def draw(self,screen,time_delta): - screen.blit(self.background,(0,286,452,414)) - ren = self.font.render(self.disp, 1, (0,0,0)) - screen.blit(ren, (250, 340)) - - ren = self.font.render(self.sec_des, 1, (0,0,0)) - screen.blit(ren, (237, 375)) - + self.background.setPosition(0,286) + self.disp.setPosition(250,340) + self.sec_disp.setPosition(237, 375) def menu_called(self, id): self.callback(id, self) def clear_menu(self): if self.menu: + self.menu.clear() self.menu.remove_from_engine() self.menu = None @@ -76,8 +81,6 @@ class BattleMenuHolder( GameEngineElement ): [_("C"), lambda: self.menu_called('clear'),44,1], ['0', lambda: self.menu_called('0'),44,1], [_("E"), lambda: self.menu_called('enter'),44,1], - #[_("Clear"), lambda: self.menu_called('clear'),89,2], - #[_("Enter"), lambda: self.menu_called('enter'),134,3], ] elif id == "special": @@ -107,9 +110,8 @@ class BattleMenu(GameEngineElement): def __init__(self, game_menu, x, y, type=NORMAL_MENU): GameEngineElement.__init__(self, has_draw=True, has_event=True) - self.menu = Menu(game_menu, type ) + self.menu = Menu(game_menu, type, self.game_engine.get_scene(), x, y ) - self.menu.set_pos(x, y) self.add_to_engine() def event_handler(self, event): @@ -117,15 +119,19 @@ class BattleMenu(GameEngineElement): def draw(self,screen,time_delta): self.menu.draw( screen ) + + def clear(self): + self.menu.clear() class Menu(object): - def __init__(self, options, cols): + def __init__(self, options, cols, scene, x=237, y=375): """Initialize the EzMenu! options should be a sequence of lists in the format of [option_name, option_function]""" self.options = options - self.x = 0 - self.y = 0 + self.scene = scene + self.x = x + self.y = y self.cols = cols self.font = pygame.font.SysFont("cmr10",18,False,False) self.option = 0 @@ -133,30 +139,66 @@ class Menu(object): self.color = [0, 0, 0] self.hcolor = [255, 0, 0] self.height = len(self.options)*self.font.get_height() + self.font_list = [] + self.rect_list = [] + + for o in self.options: + self.font_list.append(DrawableFontObject(o[0], self.font)) + ren = self.font.render(o[0], 1, [0,0,0]) + if ren.get_width() > self.width: + self.width = ren.get_width() + + i=0 # Row Spacing + h=0 # Selection Spacing + j=0 # Col Spacing + for o in self.options: + newX = self.x + 45 * j + newY = self.y + i * 45 + + surf = pygame.Surface((o[2],44)) + surf.fill((0, 74, 94)) + tempDO = DrawableObject([surf], "") + tempDO.setPosition(newX,newY) + self.rect_list.append(tempDO) + + surf = pygame.Surface((o[2]-4, 40)) + surf.fill((4, 119, 152)) + tempDO = DrawableObject([surf], "") + tempDO.setPosition(newX+2, newY+2) + self.rect_list.append(tempDO) + + j+=o[3] + h+=1 + if j >= self.cols: + i+=1 + j=0 + + self.scene.addObjects(self.rect_list) + self.scene.addObjects(self.font_list) def draw(self, surface): + self.scene.drawEntireScene(surface) """Draw the menu to the surface.""" i=0 # Row Spacing h=0 # Selection Spacing j=0 # Col Spacing + k=1 # Rect Counter for o in self.options: if h==self.option: clr = self.hcolor else: clr = self.color text = o[0] - ren = self.font.render(text, 1, clr) - if ren.get_width() > self.width: - self.width = ren.get_width() + self.font_list[h].changeText(text, clr) newX = self.x + 45 * j - newY = self.y + i * 45 - pygame.draw.rect(surface, (0, 74, 94), ( newX, newY, o[2], 44)) - pygame.draw.rect(surface, (4, 119, 152), ( newX + 2, newY + 2, o[2]-4, 40)) - surface.blit(ren, (newX + 15, newY + 12)) + newY = self.y + i * 45 + + self.font_list[h].setPosition(newX + 15, newY + 12) j+=o[3] h+=1 + k+=2 if j >= self.cols: i+=1 j=0 @@ -196,6 +238,12 @@ class Menu(object): return return_val + def clear(self): + for text in self.font_list: + self.scene.removeObject(text) + for rect in self.rect_list: + self.scene.removeObject(rect) + def set_pos(self, x, y): """Set the topleft of the menu at x,y""" self.x = x diff --git a/MAFH2/Dungeon.py b/MAFH2/Dungeon.py index 3b7f39c..8791157 100644 --- a/MAFH2/Dungeon.py +++ b/MAFH2/Dungeon.py @@ -15,6 +15,9 @@ from constants import ( ENTRANCE_DOOR, EXIT_DOOR ) from JournalIntegration import do_load, load_dungeon_by_id +from fortuneengine.DrawableObject import DrawableObject +from fortuneengine.DynamicDrawableObject import DynamicDrawableObject +from fortuneengine.Scene import Scene SEARCH_TIME = 2 COLOR_DELTA = 255/SEARCH_TIME @@ -34,6 +37,32 @@ class Dungeon(GameEngineElement): x,y = self.start profile.move_to( x, y ) + + + self.doorsList = [] + + self.game_engine.get_scene().addObject(DrawableObject([self.__images['Room']], '')) + self.doorsList.append(DrawableObject([self.__images['L']], '', True, 0 ,0)) + self.doorsList.append(DrawableObject([self.__images['F']], '', True, 360 ,0)) + self.doorsList.append(DrawableObject([pygame.transform.flip(self.__images['L'], True, False)], '', True, 990 ,0)) + + #for door in self.doorsList: door.makeTransparent(True) + + self.game_engine.get_scene().addObjects(self.doorsList) + + self.itemsList = [] + + for i in range(4): + surf = pygame.Surface((10,10)) + surf.fill((0,0,0)) + tempItem = DrawableObject([surf],"", True) + self.itemsList.append(tempItem) + + self.itemsList[0].setPosition(self.game_engine.art_scale(270, 1200, True), self.game_engine.art_scale(330, 900, False)) + self.itemsList[1].setPosition(self.game_engine.art_scale(100, 1200, True),self.game_engine.art_scale(600, 900, False)) + self.itemsList[2].setPosition(self.game_engine.art_scale(1100, 1200, True),self.game_engine.art_scale(600, 900, False)) + self.itemsList[3].setPosition(self.game_engine.art_scale(900, 1200, True),self.game_engine.art_scale(330, 900, False)) + self.game_engine.get_scene().addObjects(self.itemsList) self.add_to_engine() def add_to_engine(self): @@ -87,11 +116,11 @@ class Dungeon(GameEngineElement): img = pygame.image.load(LVL_PATH+img_key+".png").convert() img.set_colorkey((255,0,255)) width,height = img.get_size() - + img = pygame.transform.scale(img, (self.game_engine.art_scale(width, 1200, True), self.game_engine.art_scale(height, 900, False))) self.__images[img_key] = img - + def get_current_room(self): profile = self.game_engine.get_object('profile') return self.rooms[profile.position] @@ -277,28 +306,35 @@ class Dungeon(GameEngineElement): elif dir == WEST: return 'S', 'W', 'N' +#------------------------------------------------------------------------------------------------------------------------------------------------------- +# \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ +# def draw(self,screen,time_delta): profile = self.game_engine.get_object('profile') dir = profile.playerFacing current_room = self.rooms[profile.position] - # Draw Room Background - screen.blit(self.__images['Room'],(0,0)) - # Draw Room Doors left, front, right = self.normalize_dir() if current_room.get_door( left ) != '0': - screen.blit(self.__images['L'],(0,0)) + self.doorsList[0].makeTransparent(False) + else: + self.doorsList[0].makeTransparent(True) if current_room.get_door( front ) != '0': - screen.blit(self.__images['F'],( self.game_engine.art_scale(360, 1200, True),0)) + self.doorsList[1].makeTransparent(False) + else: + self.doorsList[1].makeTransparent(True) if current_room.get_door( right ) != '0': - screen.blit(pygame.transform.flip(self.__images['L'], True, False),(self.game_engine.art_scale(990, 1200, True),0)) + self.doorsList[2].makeTransparent(False) + else: + self.doorsList[2].makeTransparent(True) # Draw Items img_list = [] + cnt = 0 for i in range( dir, (dir + 4) ): #imod for room rotation imod = i % 4 @@ -306,30 +342,28 @@ class Dungeon(GameEngineElement): item_key = current_room.get_item( imod ) if item_key[0] == '0' or item_key[1] != 'v': - path = "noItem.gif" + self.itemsList[cnt].makeTransparent(True) else: - path = get_item( item_key[0] ).path - - if not self.__images.has_key( path ): - img = pygame.image.load(ITEM_PATH + path).convert() - width,height = img.get_size() - img = pygame.transform.scale(img, (self.game_engine.art_scale(width, 1200, True), self.game_engine.art_scale(height, 900, False))) - self.__images[path] = img + self.itemsList[cnt].repopulateImages([pygame.image.load(ITEM_PATH + get_item( item_key[0] ).path)]) + self.itemsList[cnt].makeTransparent(False) + + cnt += 1 - img_list.append( self.__images[path] ) + #if not self.__images.has_key( path ): + #img = pygame.image.load(ITEM_PATH + path).convert() + #width,height = img.get_size() + #img = pygame.transform.scale(img, (self.game_engine.art_scale(width, 1200, True), self.game_engine.art_scale(height, 900, False))) + #self.__images[path] = img - screen.blit(img_list[0],(self.game_engine.art_scale(270, 1200, True),self.game_engine.art_scale(330, 900, False))) - screen.blit(img_list[1],(self.game_engine.art_scale(100, 1200, True),self.game_engine.art_scale(600, 900, False))) - screen.blit(img_list[2],(self.game_engine.art_scale(1100, 1200, True),self.game_engine.art_scale(600, 900, False))) - screen.blit(img_list[3],(self.game_engine.art_scale(900, 1200, True),self.game_engine.art_scale(330, 900, False))) + #img_list.append( self.__images[path] ) #Amulet Search Function - if hasattr(self, 'pickup_time'): - elp = time() - self.pickup_time - color_a = int(elp*COLOR_DELTA) - if color_a > 255: - color_a = 255 - self.game_engine.stop_event_timer(self.search_timer_handler) - surf1 = pygame.Surface((self.game_engine.width,self.game_engine.height), pygame.SRCALPHA) - pygame.draw.rect(surf1, (255, 255, 255, color_a), (0, 0, self.game_engine.width, self.game_engine.height)) - screen.blit( surf1, (0, 0) ) + # if hasattr(self, 'pickup_time'): +# elp = time() - self.pickup_time +# color_a = int(elp*COLOR_DELTA) +# if color_a > 255: +# color_a = 255 +# self.game_engine.stop_event_timer(self.search_timer_handler) +# surf1 = pygame.Surface((self.game_engine.width,self.game_engine.height), pygame.SRCALPHA) +# pygame.draw.rect(surf1, (255, 255, 255, color_a), (0, 0, self.game_engine.width, self.game_engine.height)) +# screen.blit( surf1, (0, 0) ) diff --git a/MAFH2/Enemy.py b/MAFH2/Enemy.py index 0c9f8c0..477fef9 100644 --- a/MAFH2/Enemy.py +++ b/MAFH2/Enemy.py @@ -1,21 +1,23 @@ from gettext import gettext as _ from constants import CHAR_PATH +#from drawableobject.DrawableObject import DrawableObject +from fortuneengine.DynamicDrawableObject import DynamicDrawableObject class InvalidEnemyException(Exception): pass import pygame from Actor import Actor -from AnimatedSprite import Spritesheet, AnimatedSprite +from drawableobject.Spritesheet import Spritesheet ENEMY = { - '1':{'name':_('Wizard Adept'),'img':"anim_test.gif",'hp':20,'att':2,'weak':'special', 'sprite':(3,2, 156,166)}, #concept_wizard.png , (1,1, 181,365) - '2':{'name':_('Goblin'),'img':"dog~.png",'hp':40,'att':3,'weak':'fire','sprite':(2,1, 58/2,39)}, #concept_goblin.png , (1,1, 217,317) - '3':{'name':_('Orc'),'img':"concept_orc.png",'hp':50,'att':5,'weak':'lightning','sprite':(1,1, 264,338)}, - '4':{'name':_('Stone Golem'),'img':"concept_orc.png",'hp':10,'att':6,'weak':'missile','sprite':(1,1, 264,338)}, - '5':{'name':_('Serratula'),'img':"Crab.png",'hp':125,'att':12,'weak':'crit','sprite':(1,1,400,400)}, - '6':{'name':_('Feren'),'img':"faren.png",'hp':1500,'att':10,'weak':'special','sprite':(1,1,250,250)}, - '7':{'name':_('Cave Crab'),'img':"Crab.png",'hp':50,'att':7,'weak':'missile','sprite':(1,1,400,400)}, - '8':{'name':_('Frost Giant'),'img':"frost_giant.png",'hp':45,'att':9,'weak':'fire','sprite':(1,1,250,250)}, + '1':{'name':_('Wizard Adept'),'img':"anim_test.gif",'hp':20,'att':2,'weak':'special', 'sprite':(3,2, 156,166)}, #concept_wizard.gif , (1,1, 181,365) + '2':{'name':_('Goblin'),'img':"dragon.gif",'hp':40,'att':3,'weak':'fire','sprite':(10,8, 75,70)}, #concept_goblin.gif , (1,1, 217,317) + '3':{'name':_('Orc'),'img':"concept_orc.gif",'hp':50,'att':5,'weak':'lightning','sprite':(1,1, 264,338)}, + '4':{'name':_('Stone Golem'),'img':"concept_orc.gif",'hp':10,'att':6,'weak':'missile','sprite':(1,1, 264,338)}, + '5':{'name':_('Serratula'),'img':"Crab.gif",'hp':125,'att':12,'weak':'crit','sprite':(1,1,400,400)}, + '6':{'name':_('Feren'),'img':"faren.gif",'hp':1500,'att':10,'weak':'special','sprite':(1,1,250,250)}, + '7':{'name':_('Cave Crab'),'img':"Crab.gif",'hp':50,'att':7,'weak':'missile','sprite':(1,1,400,400)}, + '8':{'name':_('Frost Giant'),'img':"frost_giant.gif",'hp':45,'att':9,'weak':'fire','sprite':(1,1,250,250)}, #UPDATE BONESPROUT VALUES - '9':{'name':_('Bonesprout'),'img':"bonesprout.png",'hp':45,'att':8,'weak':'fire','sprite':(1,1,250,250)}, + '9':{'name':_('Bonesprout'),'img':"bonesprout.gif",'hp':45,'att':8,'weak':'fire','sprite':(1,1,250,250)}, 'a':{'name':_('anim_test'),'img':"anim_test.gif",'hp':45,'att':9,'weak':'fire','sprite':(3,2, 156,166)}, } @@ -30,7 +32,7 @@ class Enemy(Actor): self.inv_Ar = [] self.attacks_Ar = [] col,row,width,height = ENEMY[id]['sprite'] - self.sprite=AnimatedSprite(Spritesheet(CHAR_PATH + ENEMY[id]['img']).img_extract(col,row,width,height)) + self.sprite = DynamicDrawableObject( Spritesheet(CHAR_PATH + ENEMY[id]['img'] ).img_extract(col,row,width,height) , "", 30) self.place=0 self.alive = True @@ -50,11 +52,14 @@ class Enemy(Actor): return int((self.ATT+self.BAE) * 1.5) elif name=="special": return int((self.ATT+self.BAE) * 1.3) - + + def get_sprite(self): + return self.sprite def get_enemy(key): if key in ENEMY: return Enemy( key ) else: raise InvalidEnemyException() + diff --git a/MAFH2/MafhActivity.py b/MAFH2/MafhActivity.py index f8cfee5..584d83d 100755 --- a/MAFH2/MafhActivity.py +++ b/MAFH2/MafhActivity.py @@ -1,14 +1,13 @@ #!/usr/bin/env python from fortuneengine.GameEngine import GameEngine from MafhGameMenu import GameMenuHolder - from constants import MENU_PATH, FMC_PATH, TOUR_PATH from Comic import Comic from Profile import Profile from MafhGameManager import MafhGameManager -ge = GameEngine(width=1200, height=900, always_draw=True) +ge = GameEngine(width=1200, height=900, always_draw=True, fps_cap=15) def start_game(): ge.add_object('manager', MafhGameManager() ) diff --git a/MAFH2/MafhGameMenu.py b/MAFH2/MafhGameMenu.py index a7c5abe..959ad29 100644 --- a/MAFH2/MafhGameMenu.py +++ b/MAFH2/MafhGameMenu.py @@ -1,23 +1,26 @@ import pygame, ezmenu from fortuneengine.GameEngineElement import GameEngineElement +from fortuneengine.DrawableObject import DrawableObject class GameMenuHolder( GameEngineElement ): def __init__(self, callback, background=None, width=1200, height=900): GameEngineElement.__init__(self, has_draw=True, has_event=False) self.menu = None self.callback = callback - bg = pygame.image.load(background).convert() - self.background = pygame.transform.scale(bg, (width, height)) + self.background = DrawableObject([pygame.image.load(background).convert()], '') + self.background.scale(width, height) + self.game_engine.get_scene().addObject(self.background) self.width = width self.height = height def remove_from_engine(self): + self.game_engine.get_scene().removeObject(self.background) super( GameMenuHolder, self ).remove_from_engine() self.clear_menu() def draw(self,screen,time_delta): if self.background: - screen.blit(self.background,(0,0)) + self.background.setPosition(0,0) else: screen.fill((0, 0, 255)) @@ -26,6 +29,7 @@ class GameMenuHolder( GameEngineElement ): def clear_menu(self): if self.menu: + self.menu.clear_menu() self.menu.remove_from_engine() self.menu = None @@ -104,7 +108,7 @@ class GameMenuHolder( GameEngineElement ): class GameMenu(GameEngineElement): def __init__(self, game_menu, width=800, height=400): GameEngineElement.__init__(self, has_draw=True, has_event=True) - self.menu = ezmenu.EzMenu(game_menu) + self.menu = ezmenu.EzMenu(game_menu, self.game_engine.get_scene()) self.menu.center_at(width - (width/3), height/2) self.menu.help_text_at( 0, height-(height/10)) self.menu.set_font(pygame.font.SysFont("Arial", 20)) @@ -115,5 +119,8 @@ class GameMenu(GameEngineElement): def event_handler(self, event): return self.menu.update(event) + def clear_menu(self): + self.menu.clear_menu() + def draw(self,screen,time_delta): self.menu.draw( screen ) diff --git a/MAFH2/MagicMenu.py b/MAFH2/MagicMenu.py index 42d4bd9..8e4ea56 100644 --- a/MAFH2/MagicMenu.py +++ b/MAFH2/MagicMenu.py @@ -1,6 +1,8 @@ import pygame import random from fortuneengine.GameEngineElement import GameEngineElement +from fortuneengine.DrawableObject import DrawableObject +from fortuneengine.DynamicDrawableObject import DynamicDrawableObject from AnimatedSprite import Spritesheet from constants import MENU_PATH, PUZZLE_PATH @@ -12,20 +14,24 @@ class MagicMenuHolder( GameEngineElement ): GameEngineElement.__init__(self, has_draw=True, has_event=False) self.menu = None self.callback = callback - self.background = pygame.image.load(MENU_PATH + "battleMenubackground.gif") + self.background = DrawableObject([pygame.image.load( MENU_PATH + "battleMenubackground.gif")], '') + self.background.setPosition(0,286) + self.game_engine.get_scene().addObject(self.background) def remove_from_engine(self): + self.game_engine.get_scene().removeObject(self.background) super( MagicMenuHolder, self ).remove_from_engine() self.clear_menu() def draw(self,screen,time_delta): - screen.blit(self.background,(0,286,452,414)) + pass def menu_called(self, id): self.callback(id, self) def clear_menu(self): if self.menu: + self.menu.clear() self.menu.remove_from_engine() self.menu = None @@ -89,9 +95,7 @@ class MagicMenu(GameEngineElement): def __init__(self, menu_options, x, y, spell_type): GameEngineElement.__init__(self, has_draw=True, has_event=True) magic_list = self.game_engine.get_object('battle').magic_list - self.menu = Menu(menu_options, spell_type, magic_list) - - + self.menu = Menu(menu_options, spell_type, magic_list, self.game_engine.get_scene()) self.menu.set_pos(x, y) self.add_to_engine() @@ -100,12 +104,16 @@ class MagicMenu(GameEngineElement): def draw(self,screen,time_delta): self.menu.draw( screen ) + + def clear(self): + self.menu.clear() class Menu(object): - def __init__(self, options, spelltype, magic_list): + def __init__(self, options, spelltype, magic_list, scene): """Initialize the EzMenu! options should be a sequence of lists in the format of [option_name, option_function]""" + self.scene = scene self.buttons = [] self.options = options self.x = 0 @@ -115,6 +123,7 @@ class Menu(object): self.width = 2 self.spelltype = spelltype self.magic_list = magic_list + self.reference = [] lightning = [] fire = [] @@ -130,56 +139,56 @@ class Menu(object): if(spelltype == 0): #fire attack for i in range(4): - self.buttons.append(pygame.transform.scale(fire[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(fire[i] , (60,60))], "")) #filler buttons for i in range(0,2): - self.buttons.append(pygame.transform.scale(lightning[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(lightning[i] , (60,60))], "")) random.seed() - self.buttons.append(pygame.transform.scale(heal[random.randint(0,3)] , (60,60))) - self.buttons.append(pygame.transform.scale(missile[random.randint(0,3)] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(heal[random.randint(0,3)] , (60,60))], "")) + self.buttons.append(DrawableObject([pygame.transform.scale(missile[random.randint(0,3)] , (60,60))], "")) - self.mainGlyph = pygame.image.load(PUZZLE_PATH + "FireGlyph.gif").convert() + self.mainGlyph = pygame.image.load(PUZZLE_PATH + "FireGlyph.gif").convert_alpha() self.glyphs = fire elif(spelltype == 1): #lightning attack for i in range(4): - self.buttons.append(pygame.transform.scale(lightning[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(lightning[i] , (60,60))], "")) #filler buttons for i in range(0,2): - self.buttons.append(pygame.transform.scale(fire[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(fire[i] , (60,60))], "")) random.seed() - self.buttons.append(pygame.transform.scale(heal[random.randint(0,3)] , (60,60))) - self.buttons.append(pygame.transform.scale(missile[random.randint(0,3)] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(heal[random.randint(0,3)] , (60,60))], "")) + self.buttons.append(DrawableObject([pygame.transform.scale(missile[random.randint(0,3)] , (60,60))], "")) - self.mainGlyph = pygame.image.load(PUZZLE_PATH + "LightningGlyph.gif").convert() + self.mainGlyph = pygame.image.load(PUZZLE_PATH + "LightningGlyph.gif").convert_alpha() self.glyphs = lightning elif(spelltype == 2): #missile attack for i in range(4): - self.buttons.append(pygame.transform.scale(missile[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(missile[i] , (60,60))], "")) #filler buttons for i in range(0,2): - self.buttons.append(pygame.transform.scale(lightning[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(lightning[i] , (60,60))], "")) random.seed() - self.buttons.append(pygame.transform.scale(heal[random.randint(0,3)] , (60,60))) - self.buttons.append(pygame.transform.scale(fire[random.randint(0,3)] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(heal[random.randint(0,3)] , (60,60))], "")) + self.buttons.append(DrawableObject([pygame.transform.scale(fire[random.randint(0,3)] , (60,60))], "")) - self.mainGlyph = pygame.image.load(PUZZLE_PATH + "MissileGlyph.gif").convert() + self.mainGlyph = pygame.image.load(PUZZLE_PATH + "MissileGlyph.gif").convert_alpha() self.glyphs = missile elif(spelltype == 3): #heal for i in range(4): - self.buttons.append(pygame.transform.scale(heal[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(heal[i] , (60,60))], "")) #filler buttons for i in range(0,2): - self.buttons.append(pygame.transform.scale(lightning[i] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(lightning[i] , (60,60))], "")) random.seed() - self.buttons.append(pygame.transform.scale(missile[random.randint(0,3)] , (60,60))) - self.buttons.append(pygame.transform.scale(fire[random.randint(0,3)] , (60,60))) + self.buttons.append(DrawableObject([pygame.transform.scale(missile[random.randint(0,3)] , (60,60))], "")) + self.buttons.append(DrawableObject([pygame.transform.scale(fire[random.randint(0,3)] , (60,60))], "")) - self.mainGlyph = pygame.image.load(PUZZLE_PATH + "HealGlyph.gif").convert() + self.mainGlyph = pygame.image.load(PUZZLE_PATH + "HealGlyph.gif").convert_alpha() self.glyphs = heal deck = [0,1,2,3,4,5,6,7] @@ -194,7 +203,25 @@ class Menu(object): self.buttons = tButtons self.options = tOptions - self.height = (len(self.options)*self.buttons[1].get_height()) / self.cols + surf = pygame.Surface((60,60)) + surf.fill((4, 119, 152)) + self.selectRect = DynamicDrawableObject([surf],"") + self.selectRect.setPosition(297, 435) + self.scene.addObject(self.selectRect) + self.scene.addObjects(self.buttons) + + self.mainGlyph.set_colorkey((255,0,255), pygame.RLEACCEL) + self.mainGlyphDO = DrawableObject([self.mainGlyph],"") + self.mainGlyphDO.setPosition(485,350) + + for image in self.glyphs: + tempDO = DrawableObject([image],"",True) + #tempDO.makeTransparent(True) + self.reference.append(tempDO) + self.scene.addObjects(self.reference) + self.scene.addObject(self.mainGlyphDO) + + self.height = (len(self.options)*self.buttons[1].getYSize()) / self.cols def draw(self, surface): """Draw the menu to the surface.""" @@ -202,8 +229,8 @@ class Menu(object): h=0 # Selection Spacing j=0 # Col Spacing index=0 #current spot in buttons list - height = self.buttons[0].get_height() - width = self.buttons[0].get_width() + height = 60 + width = 60 for o in self.options: @@ -211,8 +238,9 @@ class Menu(object): newY = self.y + i * height if h==self.option: - pygame.draw.rect(surface, (4, 119, 152), ( newX, newY, height, width)) - surface.blit(self.buttons[index], (newX, newY) ) + self.selectRect.setPosition(newX, newY) + self.buttons[index].setPosition(newX, newY) + #surface.blit(self.buttons[index], (newX, newY) ) j+=1 h+=1 @@ -221,14 +249,12 @@ class Menu(object): i+=1 j=0 - self.mainGlyph.set_colorkey((255,0,255), pygame.RLEACCEL) - surface.blit(self.mainGlyph, (485,350)) - - # Draw reference glyphs for i in range(4): if i in self.magic_list: - surface.blit(self.glyphs[i], (800+((i%2) * 150), 350+(i/2 * 150))) + #surface.blit(self.glyphs[i], (800+((i%2) * 150), 350+(i/2 * 150))) + self.reference[i].makeTransparent(False) + self.reference[i].setPosition(800+((i%2) * 150), 350+(i/2 * 150)) def update(self, event): """Update the menu and get input for the menu.""" @@ -262,6 +288,14 @@ class Menu(object): return return_val + def clear(self): + for object in self.buttons: + self.scene.removeObject(object) + for object in self.reference: + self.scene.removeObject(object) + self.scene.removeObject(self.mainGlyphDO) + self.scene.removeObject(self.selectRect) + def set_pos(self, x, y): """Set the topleft of the menu at x,y""" self.x = x diff --git a/MAFH2/Map.py b/MAFH2/Map.py index 36f4b28..b882433 100644 --- a/MAFH2/Map.py +++ b/MAFH2/Map.py @@ -1,162 +1,178 @@ -import pygame -import math - -from constants import ( - NORTH, EAST, WEST, SOUTH,UNLOCKED_DOOR, LOCKED_DOOR, PUZZLE_DOOR, - LOCKED_PUZZLE_DOOR, ENTRANCE_DOOR, EXIT_DOOR -) -from fortuneengine.GameEngineElement import GameEngineElement - -from gettext import gettext as _ - -class Map(GameEngineElement): - def __init__(self, dgn): - GameEngineElement.__init__(self, has_draw=True, has_event=True) - - self.draw_macro_set = False - self.sizeX=dgn.sizeX - self.sizeY=dgn.sizeY - self.rectSizeX=38 - self.rectSizeY=38 - self.rects={} - self.fullRooms={} - self.totalSurface=pygame.Surface((self.sizeX*40,self.sizeY*40)) - - for y in range(self.sizeY): - for x in range(self.sizeX): - curRect=pygame.Rect(x*40,y*40,self.rectSizeX,self.rectSizeX) - self.rects[(x,y)]=curRect - if dgn.rooms.get((x,y)).get_door('N') != '0': - self.fullRooms[(x,y)]=True - self.totalSurface.fill((255,255,255),curRect,0) - - elif dgn.rooms.get((x,y)).get_door('S') != '0': - self.fullRooms[(x,y)]=True - self.totalSurface.fill((255,255,255),curRect,0) - - elif dgn.rooms.get((x,y)).get_door('E') != '0': - self.fullRooms[(x,y)]=True - self.totalSurface.fill((255,255,255),curRect,0) - - elif dgn.rooms.get((x,y)).get_door('W') != '0': - self.fullRooms[(x,y)]=True - self.totalSurface.fill((255,255,255),curRect,0) - - self.add_to_engine() - - def event_handler(self, event): - if event.type == pygame.KEYDOWN: - newKey=pygame.key.name(event.key) - - if newKey=='m' or newKey=='[7]': - self.draw_macro_set = not self.draw_macro_set - return True - - #Disable other events if macro-map set - if self.draw_macro_set: - return True - - def draw(self,screen,time_delta): - profile = self.game_engine.get_object('profile') - x, y = profile.position - playerFacing = profile.playerFacing - - mapView=pygame.transform.chop(self.totalSurface,(0,0,0,0)) - mapView.fill((255,0,0),( x * 40, y * 40,38,38)) - - angle = 0 - - if playerFacing==NORTH: - angle=0 - mapView=pygame.transform.rotate(mapView,angle) - angle=90 - elif playerFacing==SOUTH: - angle=180 - mapView=pygame.transform.rotate(mapView,angle) - angle=270 - elif playerFacing==EAST: - angle=90 - mapView=pygame.transform.rotate(mapView,angle) - angle=0 - elif playerFacing==WEST: - angle=270 - mapView=pygame.transform.rotate(mapView,angle) - angle=180 - - sideDifference=self.sizeX-self.sizeY - angle=angle*(math.pi/180) - curSect=pygame.Rect(0,0,200,200) - curSect.top+=((x*40-81)*math.cos(angle))-((y*40-81)*math.sin(angle)) - curSect.left-=((x*40-81)*math.sin(angle))+((y*40-81)*math.cos(angle)) - - if playerFacing==EAST: - curSect.top+=sideDifference*(40-81) - - elif playerFacing==SOUTH: - curSect.left+=sideDifference*(40-81) - - map_area = (0,700,200,350) - - mini_map = pygame.Surface( (200,200) ) - mini_map.blit( mapView, curSect ) - screen.fill(0,map_area,0) - screen.blit(mini_map, map_area) - - if self.draw_macro_set: - self.draw_macro(self, screen) - - - def draw_macro(self,player,screen): - #DRAW LEGEND - font=pygame.font.SysFont("cmr10",24,False,False) - - macroMap=pygame.transform.scale(self.totalSurface,(self.sizeX*100,self.sizeY*100)) - screen.fill((0,0,0),(200,0,800,700)) - legend=pygame.Surface((200,300)) - legend.fill((255,0,0),(0,0,40,15)) - legend.blit(font.render(_("LOCKED"),True,(255,0,0)),(45,0,30,5)) - legend.fill((150,255,150),(0,25,40,15)) - legend.blit(font.render(_("OPEN"),True,(150,255,150)),(45,25,30,5)) - legend.fill((255,0,255),(0,50,40,15)) - legend.blit(font.render(_("PUZZLE"),True,(255,0,255)),(45,50,30,5)) - legend.fill((255,255,255),(0,75,40,15)) - legend.blit(font.render(_("EXIT"),True,(255,255,255)),(45,75,30,5)) - legend.fill((50,50,50),(0,100,40,15)) - legend.blit(font.render(_("ENTRANCE"),True,(50,50,50)),(45,100,30,5)) - screen.blit(legend,(800,0,300,300)) - screen.blit(macroMap,(200,0,800,700)) - - def update_macro(self): - profile = self.game_engine.get_object('profile') - x, y = profile.position - playerFacing = profile.playerFacing - - self.totalSurface.fill((0,255,0),( x * 40, y * 40,38,38)) - - current_room = self.game_engine.get_object('dungeon').rooms[profile.position] - - map_filler = [ - ('N',(x * 40+5, y * 40,30,5) ), - ('S',(x * 40+5, y * 40+35,30,5) ), - ('E',(x * 40+35, y * 40+5,5,30) ), - ('W',(x * 40, y * 40+5,5,30) ) - ] - - for dir, filldata in map_filler: - - door_flag = current_room.get_door( dir ) - - if door_flag == LOCKED_DOOR or door_flag == LOCKED_PUZZLE_DOOR: - self.totalSurface.fill( (255,0,0), filldata) - - elif door_flag == UNLOCKED_DOOR: - self.totalSurface.fill((150,255,150), filldata) - - elif door_flag == PUZZLE_DOOR: - self.totalSurface.fill((255,0,255), filldata) - - elif door_flag == EXIT_DOOR: - self.totalSurface.fill((255,255,255), filldata) - - elif door_flag == ENTRANCE_DOOR: - self.totalSurface.fill((0,0,0), filldata) +import pygame
+import math
+
+from constants import (
+ NORTH, EAST, WEST, SOUTH,UNLOCKED_DOOR, LOCKED_DOOR, PUZZLE_DOOR,
+ LOCKED_PUZZLE_DOOR, ENTRANCE_DOOR, EXIT_DOOR
+)
+from fortuneengine.GameEngineElement import GameEngineElement
+from fortuneengine.DrawableObject import DrawableObject
+from fortuneengine.DynamicDrawableObject import DynamicDrawableObject
+from fortuneengine.Scene import Scene
+
+from gettext import gettext as _
+
+class Map(GameEngineElement):
+ def __init__(self, dgn):
+ GameEngineElement.__init__(self, has_draw=True, has_event=True)
+
+ self.draw_macro_set = False #A boolean value to determine whether the large map should draw
+ self.sizeX=dgn.sizeX #A variable that represents the number of rooms wide the dungeon is
+ self.sizeY=dgn.sizeY #A variable that represents the number of rooms tall the dungeon is
+ self.rectSizeX=38 #A variable representing the X size of a given room on the mini map
+ self.rectSizeY=38 #A variable representing the Y size of a given room on the mini map
+ self.rects={} #A dictionary of rectangles that represent the rooms on the map
+ self.fullRooms={} #A dictionary representing nothing?
+ self.totalSurface=pygame.Surface((self.sizeX*40,self.sizeY*40)) #A rect representing the size of the map as a whole
+
+ #A Two dimensional For Loop that goes through all of the positions on the map.
+ for y in range(self.sizeY):
+ for x in range(self.sizeX):
+ curRect=pygame.Rect(x*40,y*40,self.rectSizeX,self.rectSizeX) #Creating a rectangle for the current position on the map.
+ self.rects[(x,y)]=curRect #Adds the rectangle associated with the current position to the dictionary using the position on the map as the key.
+ #Each 'if' tests whether there is a door in a given direction at the current position.
+ #If there is a door in the given direction, it fills the square associated with themeans that the position has a room and fills it accordingly.
+ if dgn.rooms.get((x,y)).get_door('N') != '0':
+ self.fullRooms[(x,y)]=True
+ self.totalSurface.fill((255,255,255),curRect,0)
+
+ elif dgn.rooms.get((x,y)).get_door('S') != '0':
+ self.fullRooms[(x,y)]=True
+ self.totalSurface.fill((255,255,255),curRect,0)
+
+ elif dgn.rooms.get((x,y)).get_door('E') != '0':
+ self.fullRooms[(x,y)]=True
+ self.totalSurface.fill((255,255,255),curRect,0)
+
+ elif dgn.rooms.get((x,y)).get_door('W') != '0':
+ self.fullRooms[(x,y)]=True
+ self.totalSurface.fill((255,255,255),curRect,0)
+
+ self.add_to_engine() #Adds itself and all callbacks to the engine
+
+ self.myDrawableObject = DrawableObject([pygame.Surface((0,0))], '')
+ self.game_engine.get_scene().addObject(self.myDrawableObject)
+
+ def event_handler(self, event):
+ if event.type == pygame.KEYDOWN:
+ newKey=pygame.key.name(event.key)
+
+ if newKey=='m' or newKey=='[7]':
+ self.draw_macro_set = not self.draw_macro_set
+ return True
+
+ #Disable other events if macro-map set
+ if self.draw_macro_set:
+ return True
+
+ def draw(self,screen,time_delta):
+ profile = self.game_engine.get_object('profile') #Creates a copy of the profile object
+ x, y = profile.position #Grabs the position of the player from the profiler
+ playerFacing = profile.playerFacing #Grabs the direction the player is facing from the profiler
+
+ mapView=pygame.transform.chop(self.totalSurface,(0,0,0,0))
+ mapView.fill((255,0,0),( x * 40, y * 40,38,38))
+
+ angle = 0
+
+ if playerFacing==NORTH:
+ angle=0
+ mapView=pygame.transform.rotate(mapView,angle)
+ angle=90
+ elif playerFacing==SOUTH:
+ angle=180
+ mapView=pygame.transform.rotate(mapView,angle)
+ angle=270
+ elif playerFacing==EAST:
+ angle=90
+ mapView=pygame.transform.rotate(mapView,angle)
+ angle=0
+ elif playerFacing==WEST:
+ angle=270
+ mapView=pygame.transform.rotate(mapView,angle)
+ angle=180
+
+ sideDifference=self.sizeX-self.sizeY #Getting the difference between the height and width of the dungeon
+ angle=angle*(math.pi/180) #Getting the angle the dungeon is rotated to
+ curSect=pygame.Rect(0,0,200,200) #Creating the rectangle for the mini-map
+ #Sets the position of the mini-map rectangle
+ curSect.top+=((x*40-81)*math.cos(angle))-((y*40-81)*math.sin(angle))
+ curSect.left-=((x*40-81)*math.sin(angle))+((y*40-81)*math.cos(angle))
+
+ if playerFacing==EAST:
+ curSect.top+=sideDifference*(40-81)
+
+ elif playerFacing==SOUTH:
+ curSect.left+=sideDifference*(40-81)
+
+ map_area = (0,700,200,350)
+
+ mini_map = pygame.Surface( (200,200) )
+ mini_map.blit( mapView, curSect )
+
+ self.myDrawableObject.repopulateImages([mini_map])
+ self.myDrawableObject.setPosition(0,700)
+ screen.fill(0,map_area,0)
+ if self.draw_macro_set:
+ self.draw_macro(self, screen)
+
+
+ def draw_macro(self,player,screen):
+ #DRAW LEGEND
+ font=pygame.font.SysFont("cmr10",24,False,False)
+
+ macroMap=pygame.transform.scale(self.totalSurface,(self.sizeX*100,self.sizeY*100))
+ tempScreen = pygame.Surface((800,700))
+ tempScreen.fill((0,0,0))
+ #screen.fill((0,0,0),(200,0,800,700))
+ legend=pygame.Surface((200,300))
+ legend.fill((255,0,0),(0,0,40,15))
+ legend.blit(font.render(_("LOCKED"),True,(255,0,0)),(45,0,30,5))
+ legend.fill((150,255,150),(0,25,40,15))
+ legend.blit(font.render(_("OPEN"),True,(150,255,150)),(45,25,30,5))
+ legend.fill((255,0,255),(0,50,40,15))
+ legend.blit(font.render(_("PUZZLE"),True,(255,0,255)),(45,50,30,5))
+ legend.fill((255,255,255),(0,75,40,15))
+ legend.blit(font.render(_("EXIT"),True,(255,255,255)),(45,75,30,5))
+ legend.fill((50,50,50),(0,100,40,15))
+ legend.blit(font.render(_("ENTRANCE"),True,(50,50,50)),(45,100,30,5))
+ tempScreen.blit(macroMap, (0,0))
+ tempScreen.blit(legend, (600,0))
+ self.myDrawableObject.repopulateImages([tempScreen])
+ self.myDrawableObject.setPosition(200,0)
+
+
+ def update_macro(self):
+ profile = self.game_engine.get_object('profile')
+ x, y = profile.position
+ playerFacing = profile.playerFacing
+
+ self.totalSurface.fill((0,255,0),( x * 40, y * 40,38,38))
+
+ current_room = self.game_engine.get_object('dungeon').rooms[profile.position]
+
+ map_filler = [
+ ('N',(x * 40+5, y * 40,30,5) ),
+ ('S',(x * 40+5, y * 40+35,30,5) ),
+ ('E',(x * 40+35, y * 40+5,5,30) ),
+ ('W',(x * 40, y * 40+5,5,30) )
+ ]
+
+ for dir, filldata in map_filler:
+
+ door_flag = current_room.get_door( dir )
+
+ if door_flag == LOCKED_DOOR or door_flag == LOCKED_PUZZLE_DOOR:
+ self.totalSurface.fill( (255,0,0), filldata)
+
+ elif door_flag == UNLOCKED_DOOR:
+ self.totalSurface.fill((150,255,150), filldata)
+
+ elif door_flag == PUZZLE_DOOR:
+ self.totalSurface.fill((255,0,255), filldata)
+
+ elif door_flag == EXIT_DOOR:
+ self.totalSurface.fill((255,255,255), filldata)
+
+ elif door_flag == ENTRANCE_DOOR:
+ self.totalSurface.fill((0,0,0), filldata)
diff --git a/MAFH2/Profile.py b/MAFH2/Profile.py index 10ed89c..0680118 100644 --- a/MAFH2/Profile.py +++ b/MAFH2/Profile.py @@ -1,6 +1,8 @@ import pygame from fortuneengine.GameEngineElement import GameEngineElement +from fortuneengine.DrawableFontObject import DrawableFontObject +from fortuneengine.DrawableObject import DrawableObject from constants import MENU_PATH, NORTH, RIGHT, LEFT from Hero import Hero from Dungeon import Dungeon @@ -31,6 +33,27 @@ class Profile(GameEngineElement): self.puzzlesSolved=0 self.inventory = [] + bg = pygame.image.load(MENU_PATH+"mafh_splash.gif").convert() + self.background = DrawableObject([bg], '') + self.background.scale(self.game_engine.width, self.game_engine.height) + self.game_engine.get_scene().addObject(self.background) + + #create background rect + draw_width = self.game_engine.width/4 + draw_height = self.game_engine.height/4 + surf = pygame.Surface((draw_width+60,draw_height+60)) + surf.fill((150,150,255)) + self.blueRect = DrawableObject([surf],"") + self.game_engine.get_scene().addObject(self.blueRect) + + font = pygame.font.Font(None, 16) + self.text_list = [] + self.text_list.append(DrawableFontObject("1", font)) + self.text_list.append(DrawableFontObject("2", font)) + self.text_list.append(DrawableFontObject("name",font)) + self.game_engine.get_scene().addObjects(self.text_list) + + if recall_string: self.load_from_json_string( recall_string ) @@ -87,14 +110,16 @@ class Profile(GameEngineElement): self.inventory = new_inv def add_to_engine(self): - bg = pygame.image.load(MENU_PATH+"mafh_splash.gif").convert() - self.background_img = pygame.transform.scale(bg, (self.game_engine.width, self.game_engine.height)) super( Profile, self).add_to_engine() def remove_from_engine(self): super( Profile, self).remove_from_engine() - del self.background_img - + self.game_engine.get_scene().removeObject(self.background) + self.game_engine.get_scene().removeObject(self.blueRect) + + for dfo in self.text_list: + self.game_engine.get_scene().removeObject(dfo) + def event_handler(self, event): """ Handles user input (used only for name entry) @@ -120,13 +145,18 @@ class Profile(GameEngineElement): draw_width = width/4 draw_height = height/4 - - font = pygame.font.Font(None, 16) - text=font.render(self.name,True,(0,0,0)) - textRect=(draw_width+60,draw_height+60,text.get_width(),text.get_height()) - screen.blit(self.background_img,(0,0,width,height)) - screen.fill((150,150,255),(draw_width,draw_height,2*draw_width,2*draw_height)) - screen.blit(font.render(_("Enter name:"),True,(0,0,0)),(draw_width,draw_height)) - screen.blit(font.render(_("Return to continue"),True,(0,0,0)),(draw_width+20,draw_height+20,20,20)) - screen.blit(text, textRect) + + self.background.setPosition(0,0) + self.blueRect.setPosition(draw_width, draw_height) + + #name + self.text_list[0].changeText(self.name,(0,0,0)) + self.text_list[0].setPosition(draw_width+60, draw_height+60) + #text1 + self.text_list[1].changeText(_("Enter Name:"), (0,0,0)) + self.text_list[1].setPosition(draw_width,draw_height) + #text2 + self.text_list[2].changeText(_("Return to continue"), (0,0,0)) + self.text_list[2].setPosition(draw_width+20,draw_height+20) + diff --git a/MAFH2/Spritesheet.py b/MAFH2/Spritesheet.py new file mode 100644 index 0000000..ddb18a8 --- /dev/null +++ b/MAFH2/Spritesheet.py @@ -0,0 +1,31 @@ +import pygame
+
+class Spritesheet:
+ """
+ Class from http://www.scriptedfun.com/transcript-2-using-sprite-sheets-and-drawing-the-background/
+
+ This class can be used to seporate images from the sprite sheet
+ """
+ def __init__(self, filename):
+ self.sheet = pygame.image.load(filename).convert()
+
+ def imgat(self, rect, myColorKey = None):
+ rect = pygame.Rect(rect)
+ image = pygame.Surface(rect.size).convert()
+ if myColorKey == None: myColorKey = image.get_at((0,0))
+ image.set_colorkey(myColorKey)
+ image.blit(self.sheet, (0, 0), rect)
+ return image
+
+ def imgsat(self, rects, myColorKey = None):
+ imgs = []
+ for rect in rects:
+ imgs.append(self.imgat(rect, myColorKey))
+ return imgs
+
+ def img_extract( self, cols, rows, width, height, myColorKey = None):
+ rect_list = []
+ for y in range(0, rows):
+ for x in range(0, cols):
+ rect_list.append( (width*x, height*y, width, height,) )
+ return self.imgsat( rect_list, myColorKey)
\ No newline at end of file diff --git a/MAFH2/TermBox.py b/MAFH2/TermBox.py index a273bb5..bb6660b 100644 --- a/MAFH2/TermBox.py +++ b/MAFH2/TermBox.py @@ -1,5 +1,7 @@ import pygame from fortuneengine.GameEngineElement import GameEngineElement +from fortuneengine.DrawableFontObject import DrawableFontObject +from fortuneengine.DrawableObject import DrawableObject class TermBox(GameEngineElement): def __init__(self, x,y,width,height,lines): GameEngineElement.__init__(self, has_draw=True, has_event=False) @@ -7,22 +9,27 @@ class TermBox(GameEngineElement): self.max_lines = lines self.x = x self.y = y - self.width = width - self.height = height - self.font = pygame.font.Font(None, 20) + surf = pygame.Surface((int(width),int(height))) + surf.fill([0,0,0]) + self.box = DrawableObject([surf],"") + self.box.setPosition(int(x),int(y)) + self.font = pygame.font.Font(None, 28) self.__lines = [] - + for i in range(lines): + self.__lines.append(DrawableFontObject('', self.font)) + self.game_engine.get_scene().addObject(self.box) + self.game_engine.get_scene().addObjects(self.__lines) self.add_to_engine() def add_line(self, line): - self.__lines.append( line ) - if len( self.__lines ) > self.max_lines: - self.__lines.pop(0) + for i in range(0, self.max_lines, 1): + if i == self.max_lines-1: + self.__lines[i].changeText(line, [255,255,255]) + else: + self.__lines[i].changeText(self.__lines[i+1].getText(), [255,255,255]) def draw(self,screen,time_delta): - pygame.draw.rect(screen, [0, 0, 0], (self.x, self.y, self.width, self.height)) i=0 for line in self.__lines: - ren = self.font.render(line, 1, [255, 255, 255]) - screen.blit(ren, (self.x, self.y + i*self.font.get_height())) + line.setPosition(int(self.x), int(self.y + i*self.font.get_height())) i+=1 diff --git a/MAFH2/assets/image/character/Crab.gif b/MAFH2/assets/image/character/Crab.gif Binary files differnew file mode 100644 index 0000000..d20a7d6 --- /dev/null +++ b/MAFH2/assets/image/character/Crab.gif diff --git a/MAFH2/assets/image/character/anim_test.gif b/MAFH2/assets/image/character/anim_test.gif Binary files differindex 6693e7a..0addeeb 100755 --- a/MAFH2/assets/image/character/anim_test.gif +++ b/MAFH2/assets/image/character/anim_test.gif diff --git a/MAFH2/assets/image/character/anim_test.psd b/MAFH2/assets/image/character/anim_test.psd Binary files differnew file mode 100644 index 0000000..1b4fe08 --- /dev/null +++ b/MAFH2/assets/image/character/anim_test.psd diff --git a/MAFH2/assets/image/character/bonesprout.gif b/MAFH2/assets/image/character/bonesprout.gif Binary files differnew file mode 100644 index 0000000..810d61a --- /dev/null +++ b/MAFH2/assets/image/character/bonesprout.gif diff --git a/MAFH2/assets/image/character/concept_goblin.gif b/MAFH2/assets/image/character/concept_goblin.gif Binary files differnew file mode 100644 index 0000000..603ac02 --- /dev/null +++ b/MAFH2/assets/image/character/concept_goblin.gif diff --git a/MAFH2/assets/image/character/concept_goblin.png b/MAFH2/assets/image/character/concept_goblin.png Binary files differindex 3393810..6bdca0f 100644 --- a/MAFH2/assets/image/character/concept_goblin.png +++ b/MAFH2/assets/image/character/concept_goblin.png diff --git a/MAFH2/assets/image/character/concept_orc.gif b/MAFH2/assets/image/character/concept_orc.gif Binary files differnew file mode 100644 index 0000000..1eaa5b0 --- /dev/null +++ b/MAFH2/assets/image/character/concept_orc.gif diff --git a/MAFH2/assets/image/character/concept_wizard.gif b/MAFH2/assets/image/character/concept_wizard.gif Binary files differnew file mode 100644 index 0000000..c6df6c4 --- /dev/null +++ b/MAFH2/assets/image/character/concept_wizard.gif diff --git a/MAFH2/assets/image/character/dog~.gif b/MAFH2/assets/image/character/dog~.gif Binary files differnew file mode 100644 index 0000000..b4bb3b4 --- /dev/null +++ b/MAFH2/assets/image/character/dog~.gif diff --git a/MAFH2/assets/image/character/dragon.gif b/MAFH2/assets/image/character/dragon.gif Binary files differnew file mode 100644 index 0000000..528d447 --- /dev/null +++ b/MAFH2/assets/image/character/dragon.gif diff --git a/MAFH2/assets/image/character/dragon.psd b/MAFH2/assets/image/character/dragon.psd Binary files differnew file mode 100644 index 0000000..b2ca16b --- /dev/null +++ b/MAFH2/assets/image/character/dragon.psd diff --git a/MAFH2/assets/image/character/faren.gif b/MAFH2/assets/image/character/faren.gif Binary files differnew file mode 100644 index 0000000..be9671b --- /dev/null +++ b/MAFH2/assets/image/character/faren.gif diff --git a/MAFH2/assets/image/character/frost_giant.gif b/MAFH2/assets/image/character/frost_giant.gif Binary files differnew file mode 100644 index 0000000..6301b78 --- /dev/null +++ b/MAFH2/assets/image/character/frost_giant.gif diff --git a/MAFH2/assets/image/character/merchant.gif b/MAFH2/assets/image/character/merchant.gif Binary files differnew file mode 100644 index 0000000..71bbb8f --- /dev/null +++ b/MAFH2/assets/image/character/merchant.gif diff --git a/MAFH2/assets/image/environment/celestial/F.gif b/MAFH2/assets/image/environment/celestial/F.gif Binary files differnew file mode 100644 index 0000000..6e1c7b2 --- /dev/null +++ b/MAFH2/assets/image/environment/celestial/F.gif diff --git a/MAFH2/assets/image/environment/celestial/L.gif b/MAFH2/assets/image/environment/celestial/L.gif Binary files differnew file mode 100644 index 0000000..5d4c4f5 --- /dev/null +++ b/MAFH2/assets/image/environment/celestial/L.gif diff --git a/MAFH2/assets/image/environment/celestial/Room.gif b/MAFH2/assets/image/environment/celestial/Room.gif Binary files differnew file mode 100644 index 0000000..e2ddcc9 --- /dev/null +++ b/MAFH2/assets/image/environment/celestial/Room.gif diff --git a/MAFH2/assets/image/environment/ice/F.gif b/MAFH2/assets/image/environment/ice/F.gif Binary files differnew file mode 100644 index 0000000..205db6e --- /dev/null +++ b/MAFH2/assets/image/environment/ice/F.gif diff --git a/MAFH2/assets/image/environment/ice/L.gif b/MAFH2/assets/image/environment/ice/L.gif Binary files differnew file mode 100644 index 0000000..35a7503 --- /dev/null +++ b/MAFH2/assets/image/environment/ice/L.gif diff --git a/MAFH2/assets/image/environment/ice/Room.gif b/MAFH2/assets/image/environment/ice/Room.gif Binary files differnew file mode 100644 index 0000000..0b36e7b --- /dev/null +++ b/MAFH2/assets/image/environment/ice/Room.gif diff --git a/MAFH2/assets/image/environment/pyramid/F.gif b/MAFH2/assets/image/environment/pyramid/F.gif Binary files differnew file mode 100644 index 0000000..a8d8435 --- /dev/null +++ b/MAFH2/assets/image/environment/pyramid/F.gif diff --git a/MAFH2/assets/image/environment/pyramid/L.gif b/MAFH2/assets/image/environment/pyramid/L.gif Binary files differnew file mode 100644 index 0000000..10f80ba --- /dev/null +++ b/MAFH2/assets/image/environment/pyramid/L.gif diff --git a/MAFH2/assets/image/environment/pyramid/Room.gif b/MAFH2/assets/image/environment/pyramid/Room.gif Binary files differnew file mode 100644 index 0000000..798ebf1 --- /dev/null +++ b/MAFH2/assets/image/environment/pyramid/Room.gif diff --git a/MAFH2/assets/image/hud/bt.gif b/MAFH2/assets/image/hud/bt.gif Binary files differnew file mode 100644 index 0000000..aaee374 --- /dev/null +++ b/MAFH2/assets/image/hud/bt.gif diff --git a/MAFH2/assets/image/hud/hp.gif b/MAFH2/assets/image/hud/hp.gif Binary files differnew file mode 100644 index 0000000..809f842 --- /dev/null +++ b/MAFH2/assets/image/hud/hp.gif diff --git a/MAFH2/drawableobject/DrawableObject.py b/MAFH2/drawableobject/DrawableObject.py new file mode 100755 index 0000000..449741c --- /dev/null +++ b/MAFH2/drawableobject/DrawableObject.py @@ -0,0 +1,161 @@ +import pygame
+
+class DrawableObject(pygame.sprite.Sprite):
+
+ def __init__(self,images,textfileName,fps = 2, x = 0, y = 0, xVelocity = 0, yVelocity = 0):
+ pygame.sprite.Sprite.__init__(self)
+ cnt = 0
+
+ #self._originals = images
+ #self._images = images
+ self._images = []
+ self._origImages = []
+ while cnt < len(images):
+ self._images.append(images[cnt].convert())
+ self._origImages.append(images[cnt].convert())
+ cnt += 1
+ self.image = self._images[0]
+ self._start = pygame.time.get_ticks()
+ self._delay = 1000 / fps
+ self._last_update = 0
+ self._frame = 0
+ self.animations = {}
+ self._current_anim = ""
+ self.xPos = x
+ self.yPos = y
+ self.xSpeed = xVelocity
+ self.ySpeed = yVelocity
+ self.myAngle = 0
+ self.xSize = 40
+ self.ySize = 40
+
+ if textfileName != '':
+
+ f = open(textfileName, 'r')
+ currentLine = f.readline()
+ while currentLine != '':
+
+ animValues = currentLine.split(",")
+ self.animations[animValues[0]] = [int(animValues[1]), int(animValues[2])]
+ currentLine = f.readline()
+
+
+ def addImages(self, images):
+
+ self._images.extend(images)
+ #self._originals.extend(images)
+
+ def goToAnim(self, animName):
+
+ cnt = 0
+ while cnt < len(animations):
+
+ if animations[cnt] == animName:
+ self._current_anim = animName
+ self._frame = self.animations[animName][0]
+ self.image = self._images[self._frame]
+ cnt = len(animations)
+ cnt += 1
+
+ def goToFrame(self, frame):
+
+ self._frame = frame
+ self.image = self._images[self._frame]
+
+ def move(self):
+
+ self.xPos += self.xSpeed
+ self.yPos += self.ySpeed
+
+ self.image[0].get_rect().move(self.xPos,self.yPos)
+
+ def nudge(self, xNudge = 0, yNudge = 0):
+
+ self.xPos += xNudge
+ self.yPos += yNudge
+
+ self.image[0].get_rect().move(self.xPos,self.yPos)
+
+ def scale(self, newXSize = None, newYSize = None):
+
+ if newXSize != None: self.xSize = newXSize
+ if newYSize != None: self.ySize = newYSize
+
+ cnt = 0
+ while cnt < len(self._images):
+
+ self._origImages[cnt] = pygame.transform.scale(self._origImages[cnt], (self.xSize, self.ySize))
+ self._images[cnt] = self._origImages[cnt]
+ cnt += 1
+
+ def getXSize(self):
+
+ return self.xSize
+
+ def getYSize(self):
+
+ return self.ySize
+
+ def rotate(self,angle):
+
+ cnt = 0
+
+ self.myAngle += angle
+ while cnt < len(self._images):
+
+ self._images[cnt] = pygame.transform.rotate(self._origImages[cnt], self.myAngle)
+ cnt += 1
+
+ def getRotation(self):
+
+ return self.myAngle
+
+ def setPosition(self, x = None, y = None):
+
+ if x != None and x >= 0: self.xPos = x
+ if y != None and y >= 0: self.yPos = y
+
+ def getXPos(self):
+
+ return self.xPos
+
+ def getYPos(self):
+
+ return self.yPos
+
+ def setSpeed(self, xVelocity = None, yVelocity = None):
+
+ if xVelocity != None: self.xSpeed = xVelocity
+ if yVelocity != None: self.ySpeed = yVelocity
+
+ def getXSpeed(self):
+
+ return self.xSpeed
+
+ def getYSpeed(self):
+
+ return self.ySpeed
+
+ def calcColorKey(self):
+
+ myColorKey = images[0].get_at((0,0))
+ setColorKey(myColorKey)
+
+ def setColorKey(self, aColor):
+
+ cnt = 0
+ while cnt < len(self._images):
+ self._images[cnt].set_colorkey(aColor)
+ cnt += 1
+
+ def update(self, t):
+ pass
+
+ def updateCurrnetAnimation(self, t):
+ pass
+
+ def nextFrame(self):
+ pass
+
+ def nextCurrentAnimFrame(self):
+ pass
diff --git a/MAFH2/drawableobject/Spritesheet.py b/MAFH2/drawableobject/Spritesheet.py new file mode 100755 index 0000000..bce2db5 --- /dev/null +++ b/MAFH2/drawableobject/Spritesheet.py @@ -0,0 +1,33 @@ +import pygame
+
+class Spritesheet:
+ """
+ Class from http://www.scriptedfun.com/transcript-2-using-sprite-sheets-and-drawing-the-background/
+
+ This class can be used to seperate images from the sprite sheet
+ """
+ def __init__(self, filename):
+ self.sheet = pygame.image.load(filename).convert_alpha()
+ self.sheet = self.imgat(self.sheet.get_rect())
+
+ def imgat(self, rect, myColorKey = None):
+ rect = pygame.Rect(rect)
+ image = pygame.Surface(rect.size).convert_alpha()
+ if myColorKey == None:
+ myColorKey = (255,0,255)
+ image.set_colorkey(myColorKey)
+ image.blit(self.sheet, (0, 0), rect)
+ return image
+
+ def imgsat(self, rects, myColorKey = None):
+ imgs = []
+ for rect in rects:
+ imgs.append(self.imgat(rect, myColorKey))
+ return imgs
+
+ def img_extract( self, cols, rows, width, height, myColorKey = None):
+ rect_list = []
+ for y in range(0, rows):
+ for x in range(0, cols):
+ rect_list.append((width*x, height*y, width, height))
+ return self.imgsat( rect_list, myColorKey)
diff --git a/MAFH2/ezmenu.py b/MAFH2/ezmenu.py index 4de6603..77a6d07 100644 --- a/MAFH2/ezmenu.py +++ b/MAFH2/ezmenu.py @@ -1,21 +1,23 @@ #! /usr/bin/env python -############################################################ -#EzMeNu - A simple module to quickly make menus with PyGame# -############################################################ -#Licensed under the GNU Lesser General Public License # -#Created by PyMike <pymike93@gmail.com> # -#Some edits by Justin Lewis <jtl1728@rit.edu # -############################################################ +############################################################# +#EzMeNu - A simple module to quickly make menus with PyGame # +############################################################# +#Licensed under the GNU Lesser General Public License # +#Created by PyMike <pymike93@gmail.com> # +#Some edits by Justin Lewis <jtl1728@rit.edu> # +#Some edits by Kevin Hockey <kdh7733@rit.edu> # +############################################################# import pygame +from fortuneengine.DrawableFontObject import DrawableFontObject -class EzMenu: +class EzMenu(): - def __init__(self, options): + def __init__(self, options, scene): """Initialise the EzMenu! options should be a sequence of lists in the format of [option_name, option_function]""" - + self.scene = scene self.options = options self.x = 0 self.y = 0 @@ -29,11 +31,19 @@ class EzMenu: self.color = [0, 0, 0] self.hcolor = [255, 0, 0] self.height = len(self.options)*self.font.get_height() + self.font.set_italic( True ) + self.help_text = DrawableFontObject("", self.font) + self.font.set_italic( False ) + self.font_list = [] + self.scene.addObject(self.help_text) for o in self.options: ren = self.font.render( o[0], 1, self.color) + self.font_list.append(DrawableFontObject(o[0], self.font)) if self.width < ren.get_width(): self.width = ren.get_width() + + self.scene.addObjects(self.font_list) def draw(self, surface): """Draw the menu to the surface.""" @@ -46,21 +56,15 @@ class EzMenu: else: clr = self.color text = o[0] - ren = self.font.render(text, True, clr) - - surface.blit(ren, (self.x, self.y + i*self.font.get_height())) + #ren = self.font.render(text, True, clr) + self.font_list[i].changeText(text, clr) + self.font_list[i].setPosition( self.x, self.y + i*self.font.get_height() ) + #surface.blit(ren, (self.x, self.y + i*self.font.get_height())) i+=1 - # Help Test - self.font.set_italic( True ) - ren = self.font.render( help_txt, 1, self.color ) - self.font.set_italic( False ) - - #surf1 = pygame.Surface((self.width+20,self.font.get_height()+20), pygame.SRCALPHA) - #pygame.draw.rect(surf1, (255, 255, 255, 70), (0, 0, self.width + 20, self.font.get_height())) - - #surface.blit( surf1, (self.hx, self.hy) ) - surface.blit( ren, (self.hx+5, self.hy) ) + # Help Text + self.help_text.changeText(help_txt, self.color) + self.help_text.setPosition(self.hx+5, self.hy) def update(self, event): """Update the menu and get input for the menu.""" @@ -110,3 +114,8 @@ class EzMenu: def help_text_at(self, x, y): self.hx = x self.hy = y + + def clear_menu(self): + for dfo in self.font_list: + self.scene.removeObject(dfo) + self.scene.removeObject(self.help_text) diff --git a/MAFH2/fortuneengine/DrawableFontObject.py b/MAFH2/fortuneengine/DrawableFontObject.py new file mode 100644 index 0000000..92f641f --- /dev/null +++ b/MAFH2/fortuneengine/DrawableFontObject.py @@ -0,0 +1,19 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class DrawableFontObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,text,font, x = 0, y = 0):
+
+ self.font = font
+ self.textImage = font.render(text, 1, (255,255,255))
+ self.text = text
+ DrawableObject.__init__(self, [self.textImage], '')
+
+ def changeText(self, newText, color=(0,0,0)):
+ self.text = newText
+ self._images[0] = self.font.render(str(newText), True, color)
+ self.image = self._images[0]
+
+ def getText(self):
+ return str(self.text)
diff --git a/MAFH2/fortuneengine/DrawableObject.py b/MAFH2/fortuneengine/DrawableObject.py new file mode 100644 index 0000000..96bb8ef --- /dev/null +++ b/MAFH2/fortuneengine/DrawableObject.py @@ -0,0 +1,157 @@ +import pygame
+
+class DrawableObject(pygame.sprite.Sprite):
+
+ def __init__(self, images, textfileName, transparent = False, x = 0, y = 0):
+ pygame.sprite.Sprite.__init__(self)
+
+ self._images = []
+ self._origImages = []
+ for i in range(len(images)):
+ self._images.append(images[i].convert_alpha())
+ self._origImages.append(images[i].convert_alpha())
+
+ blank = pygame.Surface((0,0))
+
+ if(transparent):
+ for i in range(len(images)):
+ self._images[i] = blank
+
+ self._start = pygame.time.get_ticks()
+ self.image = self._images[0]
+ self._last_update = 0
+ self._frame = 0
+ self.animations = {}
+ self._current_anim = ""
+ self.rect = self.image.get_rect()
+ self.xPos = x
+ self.yPos = y
+ self.myAngle = 0
+ self.xSize = self.image.get_width()
+ self.ySize = self.image.get_height()
+ self.rect.topleft = (x,y)
+
+ if textfileName != '':
+
+ f = open(textfileName, 'r')
+ currentLine = f.readline()
+ while currentLine != '':
+
+ animValues = currentLine.split(",")
+ self.animations[animValues[0]] = [int(animValues[1]), int(animValues[2])]
+ currentLine = f.readline()
+
+ else:
+
+ self.animations["anim1"] = [0, len(self._images)]
+ self.goToAnim("anim1")
+
+ self.makeTransparent(transparent)
+
+ def repopulateImages(self, newImages):
+
+ self._images = []
+ self._origImages = []
+ for i in range(len(newImages)):
+ self._images.append(newImages[i].convert_alpha())
+ self._origImages.append(newImages[i].convert_alpha())
+
+ self.image = self._images[0]
+ self._frame = 0
+ self.xSize = self.image.get_width()
+ self.ySize = self.image.get_height()
+
+ def addImages(self, images):
+ self._images.extend(images)
+ self._origImages.extend(images)
+
+ def goToAnim(self, animName):
+ if self.animations.get(animName, 0) != 0:
+ self._current_anim = animName
+ self._frame = self.animations[animName][0]
+ self.image = self._images[self._frame]
+
+ def goToFrame(self, frame):
+
+ if frame <= len(self._images):
+ self._frame = frame
+ self.image = self._images[self._frame]
+
+ def nudge(self, x, y):
+ self.xPos += x
+ self.yPos += y
+ self.rect.right += x
+ self.rect.top += y
+
+ def scale(self, x=None, y=None):
+ if type(x).__name__=='int': self.xSize = x
+ if type(y).__name__=='int': self.ySize = y
+
+ for i in range(len(self._images)):
+ self._origImages[i] = pygame.transform.scale(self._origImages[i], (self.xSize, self.ySize))
+ self._images[i] = self._origImages[i]
+
+ def fill(self, color):
+ for i in range(len(self._images)):
+ #print "filling with ", color
+ self._origImages[i].fill(color)
+ self._images[i].fill(color)
+
+ def getXSize(self):
+ return self.xSize
+
+ def getYSize(self):
+ return self.ySize
+
+ def rotate(self,angle):
+ self.myAngle += angle
+ for i in range(len(self._images)):
+ self._images[i] = pygame.transform.rotate(self._origImages[i], self.myAngle)
+
+ def getRotation(self):
+ return self.myAngle
+
+ def setPosition(self, x = None, y = None):
+ if type(x).__name__=='int': self.xPos = x
+ if type(y).__name__=='int': self.yPos = y
+ self.rect.topleft = (self.xPos, self.yPos)
+
+ def getXPos(self):
+ return self.xPos
+
+ def getYPos(self):
+ return self.yPos
+
+ def calcColorKey(self, x=0, y=0):
+ myColorKey = images[0].get_at((x,y))
+ setColorKey(myColorKey)
+
+ def makeTransparent(self, bool = True):
+ if bool == True:
+ surf = pygame.Surface((0,0))
+ for i in range(len(self._images)):
+ self._images[i] = surf
+ else:
+ for i in range(len(self._images)):
+ self._images[i] = self._origImages[i]
+ self.image = self._images[self._frame]
+
+ def setColorKey(self, aColor):
+ for i in range(len(self._images)):
+ self._images[i].set_colorkey(aColor)
+
+ def update(self, t=None):
+ timePassed = t + self._last_update
+
+ if (timePassed) > 200:
+
+ self.image = self._images[self._frame]
+ self._last_update = timePassed%1000
+ else:
+ self._last_update = timePassed
+
+ def nextFrame(self):
+ pass
+
+ def nextCurrentAnimFrame(self):
+ pass
diff --git a/MAFH2/fortuneengine/DynamicDrawableObject.py b/MAFH2/fortuneengine/DynamicDrawableObject.py new file mode 100644 index 0000000..0d8136d --- /dev/null +++ b/MAFH2/fortuneengine/DynamicDrawableObject.py @@ -0,0 +1,75 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0):
+
+ self._delay = 1000/fps
+ DrawableObject.__init__(self, images, textfileName, x, y)
+
+ def addImages(self, images):
+
+ self._images.extend(images)
+
+ def setSpeed(self, xVelocity = None, yVelocity = None):
+
+ if xVelocity != None: self.xSpeed = xVelocity
+ if yVelocity != None: self.ySpeed = yVelocity
+
+ def getXSpeed(self):
+
+ return self.xSpeed
+
+ def getYSpeed(self):
+
+ return self.ySpeed
+
+ def move(self):
+ self.xPos += self.xSpeed
+ self.yPos += self.ySpeed
+ self.rect.right += self.xSpeed
+ self.rect.top += self.ySpeed
+
+ def update(self, t):
+
+ timePassed = t + self._last_update
+
+ if (timePassed) > self._delay:
+ if self._frame < self.animations.get(self._current_anim)[0] or self._frame > self.animations.get(self._current_anim)[1]:
+ self._frame = self.animations.get(self._current_anim)[0] - 1
+
+ self._frame += timePassed/self._delay
+
+ while self._frame >= self.animations.get(self._current_anim)[1]:
+ framesPast = self._frame - self.animations.get(self._current_anim)[1]
+ self._frame = framesPast - 1 + self.animations.get(self._current_anim)[0]
+
+ self.image = self._images[self._frame]
+ self._last_update = timePassed%self._delay
+ else:
+ self._last_update = timePassed
+
+ def nextFrame(self):
+ self._frame += 1
+ if self._frame >= len(self._images):
+ framesPast = self._frame - len(self._images)
+ self._frame = framesPast
+
+ self.image = self._images[self._frame]
+
+ def nextCurrentAnimFrame(self):
+
+ for cnt in range(len(animations)):
+
+ if animations[cnt] == self._current_anim:
+ if self._frame < self.animations[self._current_anim][0] or self._frame > self.animations[self._current_anim][1]:
+ self._frame = self.animations[self._current_anim][0]
+
+ else: self._frame += 1
+
+ if self._frame > self.animations[self._current_anim][1]:
+ framesPast = self._frame - self.animations[self._current_anim][1]
+ self._frame = framesPast - 1 + self.animations[self._current_anim][0]
+
+ self.image = self._images[self._frame]
diff --git a/MAFH2/fortuneengine/GameEngine.py b/MAFH2/fortuneengine/GameEngine.py index a4f9e42..1832089 100644 --- a/MAFH2/fortuneengine/GameEngine.py +++ b/MAFH2/fortuneengine/GameEngine.py @@ -17,6 +17,10 @@ import pygame from time import time from GameEngineConsole import GameEngineConsole from GameInspect import GameInspect +from DrawableObject import DrawableObject +from DynamicDrawableObject import DynamicDrawableObject +from DrawableFontObject import DrawableFontObject +from Scene import Scene class GameEngine(object): @@ -49,6 +53,8 @@ class GameEngine(object): self.height = height size = width, height self.screen = pygame.display.set_mode(size) + self.__fps = DrawableFontObject("", pygame.font.Font(None, 17)) + self.__scene = Scene(self.__fps) # Engine Internal Variables self.__fps_cap = fps_cap @@ -62,6 +68,7 @@ class GameEngine(object): self.__event_cb = [] self.__draw_lst = [] self.__object_hold = {} + self.__dirtyList=[] # Game Timers self.__active_event_timers = [] @@ -95,6 +102,10 @@ class GameEngine(object): it enters the draw flag. """ self.__dirty = True + + def get_scene(self): + + return self.__scene def start_event_timer(self, function_cb, time): """ @@ -201,18 +212,18 @@ class GameEngine(object): else: for fnc in self.__draw_lst: - start = time() - fnc(screen, tick_time) - self.__draw_time[str(fnc)] += time() - start - self.__draw_calls[str(fnc)] += 1 - + start = time() + fnc(screen, tick_time) + self.__draw_time[str(fnc)] += time() - start + self.__draw_calls[str(fnc)] += 1 # Print Frame Rate if self.__showfps: - text = self.__font.render('FPS: %d' % self.clock.get_fps(), - False, (255, 255, 255), (159, 182, 205)) - screen.blit(text, (0, 0)) - - pygame.display.flip() + self.__fps.changeText('FPS: %d' % self.clock.get_fps(), (255,255,255)) + self.__fps.setPosition(0,0) + else: + self.__fps.changeText('') + self.__scene.update(tick_time) + pygame.display.update(self.__scene.draw(screen)) def _event_loop(self): """ diff --git a/MAFH2/fortuneengine/Scene.py b/MAFH2/fortuneengine/Scene.py new file mode 100644 index 0000000..d2e50a9 --- /dev/null +++ b/MAFH2/fortuneengine/Scene.py @@ -0,0 +1,186 @@ +import pygame
+from pygame.sprite import RenderUpdates
+
+class Scene(pygame.sprite.RenderUpdates):
+
+ def __init__(self, sprites):
+
+ self._spritelist = [[sprites, sprites.getXPos(), sprites.getYPos()]]
+ #self._spritelist.append([sprites, sprites.getXPos(), sprites.getYPos()])
+ RenderUpdates.__init__(self, sprites)
+
+ self.xPos = 0
+ self.yPos = 0
+ self.xSize = 0
+ self.ySize = 0
+
+ self.calcPosition()
+ self.calcSize()
+ self.setRelativePositions()
+
+ def calcPosition(self):
+
+ lowestX = 9000
+ lowestY = 9000
+
+ for i in range(len(self._spritelist)):
+ if self._spritelist[i][0].getXPos() < lowestX: lowestX = self._spritelist[i][0].getXPos()
+ if self._spritelist[i][0].getYPos() < lowestY: lowestY = self._spritelist[i][0].getYPos()
+
+ self.xPos = lowestX
+ self.yPos = lowestY
+
+ def calcSize(self):
+
+ highestX = 0
+ highestY = 0
+
+ for i in range(len(self._spritelist)):
+ if (self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize()) > highestX: highestX = self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize()
+ if (self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize()) > highestY: highestY = self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize()
+
+ self.xSize = highestX - self.xPos
+ self.ySize = highestY - self.yPos
+
+ def addObject(self, newDrawableObject):
+ RenderUpdates.add_internal(self, newDrawableObject)
+ self._spritelist.insert(len(self._spritelist) - 1, [newDrawableObject, newDrawableObject.getXPos(), newDrawableObject.getYPos()])
+
+ def addObjects(self, newDrawableObjects):
+ for sprite in newDrawableObjects:
+ RenderUpdates.add_internal(self, sprite)
+ self._spritelist.insert(len(self._spritelist) - 1, [sprite, sprite.getXPos(), sprite.getYPos()])
+
+ def setRelativePositions(self):
+
+ for i in range(len(self._spritelist)):
+ self._spritelist[i][1] = self._spritelist[i][0].getXPos() - self.xPos
+ self._spritelist[i][2] = self._spritelist[i][0].getYPos() - self.yPos
+
+ def removeObject(self, sprite):
+
+ for i in self._spritelist:
+ if i[0] == sprite:
+ self._spritelist.remove(i)
+ break
+ RenderUpdates.remove_internal(self, sprite)
+
+ def getObject(self, index):
+
+ if index < len(self._spritelist):
+ return self._spritelist[index][0]
+
+ def getListSize(self):
+
+ return len(self._spritelist)
+
+ def getList(self):
+
+ return list(self._spritelist)
+
+ def moveObjects(self):
+
+ for i in range(len(self._spritelist)):
+ self._spritelist[i][0].move()
+
+ self.calcPosition()
+ self.calcSize()
+ self.setRelativePositions()
+
+ def moveScene(self, xNudge = 0, yNudge = 0):
+
+
+ for i in range(len(self._spritelist)):
+
+ self._spritelist[i][0].nudge(xNudge, yNudge)
+
+
+ self.calcPosition()
+
+ def setPosition(self, newXPos = None, newYPos = None):
+
+ if newXPos != None: self.xPos = newXPos
+ if newYPos != None: self.yPos = newYPos
+
+ for i in range(len(self._spritelist)):
+
+ self._spritelist[i][0].setPosition(self.xPos + self._spritelist[i][1], self.yPos + self._spritelist[i][2])
+
+ def getXPos(self):
+ return self.xPos
+
+ def getYPos(self):
+ return self.yPos
+
+ def getXSize(self):
+ return self.xSize
+
+ def getYSize(self):
+ return self.ySize
+
+ def scaleObjects(self, newXSize = None, newYSize = None):
+
+
+ for i in range(len(self._spritelist)):
+ self._spritelist[i][0].scale(newXSize, newYSize)
+
+ def scaleScene(self, newXSize = None, newYSize = None):
+
+ self.calcPosition()
+ self.calcSize()
+
+ xScale = 1
+ yScale = 1
+
+ if newXSize != None: xScale = (newXSize * 1.0)/self.xSize
+ if newYSize != None: yScale = (newYSize * 1.0)/self.ySize
+
+ for i in range(len(self._spritelist)):
+ self._spritelist[i][0].scale(xScale * self._spritelist[iaw][0].getXSize(), yScale * self._spritelist[i][0].getYSize())
+ self._spritelist[i][1] = xScale * self._spritelist[i][1]
+ self._spritelist[i][2] = yScale * self._spritelist[i][2]
+
+ self.calcPosition()
+ self.calcSize()
+ self.setPosition()
+
+ def update(self, t):
+
+ for s in self._spritelist: s[0].update(t);
+
+ def draw(self, surface):
+ spritedict = self.spritedict
+ surface_blit = surface.blit
+ dirty = self.lostsprites
+ self.lostsprites = []
+ dirty_append = dirty.append
+ for s in self._spritelist:
+ r = spritedict[s[0]]
+ newrect = surface_blit(s[0].image, s[0].rect)
+ if r is 0:
+ dirty_append(newrect)
+ else:
+ if newrect.colliderect(r):
+ dirty_append(newrect.union(r))
+ else:
+ dirty_append(newrect)
+ dirty_append(r)
+ spritedict[s[0]] = newrect
+ return dirty
+
+ def drawEntireScene(self, surface):
+ spritedict = self.spritedict
+ surface_blit = surface.blit
+ dirty = self.lostsprites
+ self.lostsprites = []
+ dirty_append = dirty.append
+ for s in self._spritelist:
+ dirty_append(spritedict[s[0]])
+ dirty_append(surface_blit(s[0].image, s[0].rect))
+ return dirty
+
+ def nextFrame(self):
+
+ for i in range(len(self._spritelist)):
+
+ self._spritelist[i][0].nextFrame()
diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp Binary files differindex 57630e3..57630e3 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp Binary files differindex 90af77a..90af77a 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp Binary files differindex 1751a4a..1751a4a 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp Binary files differindex 1f292d1..1f292d1 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp Binary files differindex fd8cc0e..fd8cc0e 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp Binary files differindex df3a2eb..df3a2eb 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp Binary files differindex 51b0052..51b0052 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp Binary files differindex 9302c64..9302c64 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp Binary files differindex f5c6191..f5c6191 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp Binary files differindex 4def064..4def064 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp Binary files differindex 3750af4..3750af4 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp Binary files differindex 636c6f3..636c6f3 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp Binary files differindex 646b407..646b407 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp Binary files differindex 11a9bf5..11a9bf5 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp Binary files differindex ca1ba7b..ca1ba7b 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp Binary files differindex 9375c15..9375c15 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp Binary files differindex 53b66f9..53b66f9 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp Binary files differindex 088558c..088558c 100755..100644 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp +++ b/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp diff --git a/devtools/CompleteTestKit/fileTypeTests.py b/devtools/CompleteTestKit/fileTypeTests.py deleted file mode 100755 index 303eb5e..0000000 --- a/devtools/CompleteTestKit/fileTypeTests.py +++ /dev/null @@ -1,478 +0,0 @@ -#! /usr/bin/env python -from datetime import datetime -import sys,time,pygame,re -print "\n\nLoading..." -pygame.init() - -''' -The file type array will be iterated through as the test progresses to tell the program what extension and path to use for the images - -Current issue is the fact that the attributes declared in the upper method is not being seen or involved in the inner methods -ergo, I must manually pass the details to and from the getValues(keyIn) to the other method objects. I will probably do this -in-line, if it allows me, as I call the other objects. This should get interesting. Actually, that would call the getValues as many -times as I have requested a test, defeating the purpose of having a module that collects data pertenent to these tests once before -the tests are run; so i will run the getVal() return the data in an array which is then passed onto all def's thereafter. - -preferences[0] - All Tests - - [0][0] - screenWidth - [0][1] - screenHeight - [0][2] - images - [0][3] - trials - [0][9] - file to write to... -preferences[1] - speedTest Specific - None currenlty inplimented -preferences[2] - scaleTest Specific - [2][0] - scale x - [2][1] - scale y -''' -def getValues(keyIn): -#trialSize=None - preferences={} - - print "\nTest Details\nFor default values, please leave the field blank" - preferences[0]={} - try: - print "\nSet size, formatted as '>width,height':" - print "Default value is '600,400'." - screenSize = str(raw_input('>>>')) - screenSize = screenSize.split(',') - preferences[0][0] = int(screenSize[0]) - preferences[0][1] = int(screenSize[1]) - - except: - print "Value was erroneous/blank, Default set..." - preferences[0][0]=600 - preferences[0][1]=400 - try: - print "\nHow many images would you like to draw?" - print "Default value is 5 images." - preferences[0][2]=int(raw_input('>>>')) - except: - print "Value was erroneous/blank, Default set..." - preferences[0][2]=5 - try: - print "\nHow many trials would you like to run?" - print "Default value is 5 trials." - preferences[0][3]=int(raw_input('>>>')) - except: - print "Value was erroneous/blank, Default set..." - preferences[0][3]=5 - if '2' in keyIn: - preferences[2]={} - try: - print "\nWhat would you like to scale the images to in the scalability test? (format as '>width,height', in pixels)" - print "NOTE: Scalability test is built to resize from 160x160, 80x80, 69x69 and 40x40 pixel sizes" - sizeTo = raw_input(">>>").split(',') - preferences[2][0] = int(sizeTo[0]) - preferences[2][1] = int(sizeTo[1]) - except: - print "Value was erroneous/blank, Default set..." - preferences[2][0] = 40 - preferences[2][1] = 40 - - print "END OF INFO GATHERING - Testing beginning now...\n" - return preferences - -'''Image() Animation Test -This test will simply load the image(s) to screen, and move them around to -create a CPU stressful environment. The performance of the CPU in this -environment is measured in the average frame rate demonstrated in a sample of -500 frames. Once this test is completed and written to file, the test is rerun -using surface.convert() to see if converting all of the different file types -will consequentially even out the framerates between tests. -''' -def imgTest(preferences): - ftArr=[ - [".bmp","./art/BMP16/"], [".bmp","./art/BMP24/"] , [".bmp","./art/BMP32/"], - [".gif","./art/GIF/" ] , [".gif","./art/GIFT/" ] , [ ".jpg","./art/JPG1/"], - [".jpg","./art/JPG2/"] , [".jpg","./art/JPG3/" ] , [ ".jpg","./art/JPG4/"], - [".png","./art/PNGI/"] , [".png","./art/PNGT/" ] - ] - screenWidth = preferences[0][0] - screenHeight = preferences[0][1] - numImages = preferences[0][2] - maxTrial = preferences[0][3] - try: - f=preferences[0][9] - except: - f=preferences[0][9]=open('./logs/Test Results - %s.csv'%str(datetime.now()),'a') - f.write("\n\nSpeed Test - "+str(datetime.now())) - f.write(",Width (pixels)"+','+"Height (pixels)"+','+"Trial Runs"+','+"Image Objects Drawn") - f.write("\n,"+str(screenWidth)+','+str(screenHeight)+','+str(maxTrial)+','+str(numImages)) - f.write("\nFile Type"+','+"Time taken to load images to memory"+','+"Trials (frames per second)") - ft="" #filetype - img={} - r=0 #frame refreshes - i=1 #cycles images - t=0 #trial number n - print "width,height", - print screenWidth, - print ",", - print screenHeight - screen = pygame.display.set_mode( [int(screenWidth),int(screenHeight)] ) #Screen Set 600x400 - background = 152, 251, 152 # pale green - - while 1: - cnt=numImages - try:ft=ftArr[t] - except: - print "\nTest Complete\n" - break - f.seek(0,2) - f.write(str('\n'+ft[1]+' Speed Test')) - f.seek(0,2) - start=time.time() - imgSwitch={ - 1: pygame.image.load("%s2%s"%(ft[1],ft[0])), - 2: pygame.image.load("%s3%s"%(ft[1],ft[0])), - 3: pygame.image.load("%s4%s"%(ft[1],ft[0])), - 4: pygame.image.load("%s5%s"%(ft[1],ft[0])), - 5: pygame.image.load("%s6%s"%(ft[1],ft[0])), - 6: pygame.image.load("%s7%s"%(ft[1],ft[0])), - 7: pygame.image.load("%s8%s"%(ft[1],ft[0])), - 8: pygame.image.load("%s9%s"%(ft[1],ft[0])), - } - f.write(',') - f.write(str(time.time()-start)) - #print time.time()-start() - print "Speed Test: "+ft[1]+" extension "+ft[0] - trial=maxTrial - - while trial>0: - while cnt>0: - img[cnt,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) - img[cnt,1]= img[cnt,0].get_rect() - img[cnt,2]= [2,2] #speed - m=cnt*40 # named m cause i wanted some m&ms - img[cnt,1]=img[cnt,1].move(m,m) #see? (it wasn't as tasty though) - cnt=cnt-1 - - r=0 - start=time.time() - while 1: - cnt=numImages - while cnt>0: - print cnt - img[cnt,0]=imgSwitch.get(i,None) - if img[cnt,1].left < 0 or img[cnt,1].right > screenWidth: - img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] - if img[cnt,1].top < 0 or img[cnt,1].bottom > screenHeight: - img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] - img[cnt,1] = img[cnt,1].move(img[cnt,2]) - screen.blit(img[cnt,0],img[cnt,1]) - cnt=cnt-1 - pygame.display.flip() - i=i+1 - if i>8: i=1 - screen.fill(background) - r=r+1 - if r>500: break - - print 1/((time.time()-start)/r) - f.seek(0,2) - f.write(','+str(1/((time.time()-start)/r))) - trial=trial-1 - t=t+1 - - ft="" #filetype - img={} - r=0 #frame refreshes - i=1 #cycles images - t=0 #trial number n - - f.write("\n\nNow using .convert()") - f.write("\nFile Type"+','+"Time taken to load images to memory"+','+"Trials (frames per second)") - ft="" #filetype - img={} - r=0 #frame refreshes - i=1 #cycles images - t=0 #trial number n - - screen = pygame.display.set_mode( [screenWidth,screenHeight] ) #Screen Set 600x400 - background = 152, 251, 152 # pale green - - while 1: - cnt=numImages - try:ft=ftArr[t] - except: - print "\nTest Complete\n" - break - f.seek(0,2) - f.write(str('\n'+ft[1]+' Speed convert() Test')) - f.seek(0,2) - start=time.time() - imgSwitch={ - 1: pygame.image.load("%s2%s"%(ft[1],ft[0])).convert(), - 2: pygame.image.load("%s3%s"%(ft[1],ft[0])).convert(), - 3: pygame.image.load("%s4%s"%(ft[1],ft[0])).convert(), - 4: pygame.image.load("%s5%s"%(ft[1],ft[0])).convert(), - 5: pygame.image.load("%s6%s"%(ft[1],ft[0])).convert(), - 6: pygame.image.load("%s7%s"%(ft[1],ft[0])).convert(), - 7: pygame.image.load("%s8%s"%(ft[1],ft[0])).convert(), - 8: pygame.image.load("%s9%s"%(ft[1],ft[0])).convert(), - } - f.write(',') - f.write( str(time.time()-start) ) - print "Convert Test: "+ft[1]+" extension "+ft[0] - trial=maxTrial - - while trial>0: - while cnt>0: - img[cnt,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) - img[cnt,1]= img[cnt,0].get_rect() - img[cnt,2]= [2,2] #speed - m=cnt*40 # named m cause i wanted some m&ms - img[cnt,1]=img[cnt,1].move(m,m) #see? (it wasn't as tasty though) - cnt=cnt-1 - - r=0 - start=time.time() - while 1: - cnt=numImages - while cnt>0: - img[cnt,0]=imgSwitch.get(i,None) - if img[cnt,1].left < 0 or img[cnt,1].right > screenWidth: - img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] - if img[cnt,1].top < 0 or img[cnt,1].bottom > screenHeight: - img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] - img[cnt,1] = img[cnt,1].move(img[cnt,2]) - screen.blit(img[cnt,0],img[cnt,1]) - cnt=cnt-1 - pygame.display.flip() - i=i+1 - if i>8: i=1 - screen.fill(background) - r=r+1 - if r>500: break - - print 1/((time.time()-start)/r) - f.seek(0,2) - f.write(','+str(1/((time.time()-start)/r))) - trial=trial-1 - - t=t+1 - -'''Scalability Test -The scalability test is still very much hard coded and not very elegant, but -this is a theme with all our code. - -The pseudo-code goes as follows: -Gather in varaibles such as how many trials, images to draw on screen, and what -to resize the 160, 80, 69, and 40 pixel square images to. - -Then the code will generate the lists reflecting which directories to access -and their associated filetypes and finally there are loops to cycle through -trials where 500 frames of n moving images are placed onto the screen after -they are transform.scale()'d and convert()'d - -Last step, information is printed to the terminal and, once implemented, to -a .csv file in the logs directory. -''' -def scaleTest(preferences): - -# delete these 3 lines when tests have proven program functional -#make=input("How many images would you like to load?\n>") numImages -#trial=input("How many runs per trial?\n>") -#sizeTo=input("What would you like to resize to? Seperate with a comma, eg: x,y\n>" ) - - sizeTo = [ preferences[2][0],preferences[2][1] ] - screenWidth = preferences[0][0] - screenHeight = preferences[0][1] - numImages = preferences[0][2] - maxTrial = preferences[0][3] - try: - f=preferences[0][9] - except: - f=preferences[0][9]=open('./logs/Test Results - %s.csv'%str(datetime.now()),'a') - - img={} - ft="" #filetype - r=0 #frame refreshes - i=1 #cycles images - size = screenWidth,screenHeight - t=0 #trial number n - colorkey=(255, 152, 0) - -# paths to and extensions for image files to be turned into surfaces - ftArr=[ - [".bmp","art/BMP16/BMP16100/"] , - [".bmp","art/BMP16/BMP16173/"] , - [".bmp","art/BMP16/BMP16200/"] , - [".bmp","art/BMP16/BMP16400/"] , - [".bmp","art/BMP24/BMP24100/"] , - [".bmp","art/BMP24/BMP24173/"] , - [".bmp","art/BMP24/BMP24200/"] , - [".bmp","art/BMP24/BMP24400/"] , - [".gif","art/GIF/GIF100/"] , - [".gif","art/GIF/GIF173/"] , - [".gif","art/GIF/GIF200/"] , - [".gif","art/GIF/GIF400/"] , - [".gif","art/GIFT/GIFT100/"] , - [".gif","art/GIFT/GIFT173/"] , - [".gif","art/GIFT/GIFT200/"] , - [".gif","art/GIFT/GIFT400/"] , - [".png","art/PNGI/PNG100/"] , - [".png","art/PNGI/PNG173/"] , - [".png","art/PNGI/PNG200/"] , - [".png","art/PNGI/PNG400/"] , - [".png","art/PNGT/PNGT100/"] , - [".png","art/PNGT/PNGT173/"] , - [".png","art/PNGT/PNGT200/"] , - [".png","art/PNGT/PNGT400/"] ] - - f.write("\n\nScaling Test"+str(datetime.now())) - f.write(",Width (pixels)"+','+"Height (pixels)"+','+"Trial Runs"+','+"Image Objects Drawn") - f.write("\n,"+str(screenWidth)+','+str(screenHeight)+','+str(maxTrial)+','+str(numImages)) - f.write("\nFile Type"+','+"Time taken to load images to memory"+','+"Trials (frames per second)") - - screen = pygame.display.set_mode(size) - background = 152, 251, 152 # pale green - - #23456789123456789212345678931234567894123456789512345678961234567897123456789* - - # This is the beginning of the actual test loops; this program is a very rough - # learning exercise which we desire to polish to such a state that it can be - # used to accurately benchmark the XO laptop's speed capabilities - while 1: - cnt=numImages - try:ft=ftArr[t] - except: - print "\nTest Complete\n" - break - print "Scale Test: "+ft[1]+" extension "+ft[0] - trialthis=maxTrial - f.seek(0,2) - f.write(str('\n'+ft[1]+' Scale Test')) - f.seek(0,2) - start=time.time() - # This timer will reflect the time taken to load and resize images in memory - switcher = { - # This is also where we need advise regarding implementing convert() - 1: pygame.transform.scale( pygame.image.load("%s2%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 2: pygame.transform.scale( pygame.image.load("%s3%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 3: pygame.transform.scale( pygame.image.load("%s4%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 4: pygame.transform.scale( pygame.image.load("%s5%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 5: pygame.transform.scale( pygame.image.load("%s6%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 6: pygame.transform.scale( pygame.image.load("%s7%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 7: pygame.transform.scale( pygame.image.load("%s8%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 8: pygame.transform.scale( pygame.image.load("%s9%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )), - 9: pygame.transform.scale( pygame.image.load("%s1%s"%(ft[1],ft[0])).convert(),(sizeTo[0],sizeTo[1] )) - } - f.write(',') - f.write( str(time.time()-start) ) - # Here ends the loading section, and hereafter we jump into the main loop - while trialthis>0: - while cnt>0: - # establish the initial state for the images of the next trial - img[cnt,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) - img[cnt,0]= pygame.transform.scale(img[cnt,0],(sizeTo[0], sizeTo[1])) - img[cnt,1]= img[cnt,0].get_rect() - img[cnt,2]= [2,2] #speed - m=cnt*40 - # Here I move images to avoid indistinguishable stacks of image rectangles - img[cnt,1]=img[cnt,1].move(m,m) - cnt=cnt-1 - r=0 - start=time.time() - - while 1: - # This loop is the 'main event' so to speak, as it is the section that is - # measured in terms of frames per second - - cnt=numImages # For each 'ball' icon loaded - while cnt>0: # Cycle and check if the 'ball' should bounce off the wall - img[cnt,0]=switcher.get(i,None) - if img[cnt,1].left < 0 or img[cnt,1].right > screenWidth: - img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] - if img[cnt,1].top < 0 or img[cnt,1].bottom > screenHeight: - img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] - img[cnt,1] = img[cnt,1].move(img[cnt,2]) - # Move the 'ball' image accordingly, plot the change - screen.blit(img[cnt,0],img[cnt,1]) - cnt=cnt-1 - pygame.display.flip() - # "Make it so, number two," on those changes above - i=i+1 - if i>8: i=1 - screen.fill(background) - r=r+1 - if r>500: break - # After 500 frames, we print the average frame rate to the terminal - print 1/((time.time()-start)/r) - f.seek(0,2) - f.write(','+str(1/((time.time()-start)/r))) - trialthis=trialthis-1 - preferences[0][9]=f - t=t+1 - -def rotateTest(): - pass - - - - -#2345678911234567892123456789312345678941234567895123456789612345678971234567898 -while 1: - print "\n\nWelcome to the master File Type Tester Interface" - print "Authors: Scott 'JT' Mengel and Dave Silverman" - print "\nPlease select the test(s) you want to run in the order you want to run them (Do not seperate them with any characters)." - print "Please Note: The logs for the tests you are running will automatically be placed in the 'logs/' directory in the test folder as a .csv file. \n" - print "1. image.load() surface speed test (with and without surface.convert() testing)" - print "2. transform.scale() surface Selected Scalability Test" - print "3. transform.rotate() tests" - print "Other menu options to come!\n" - - acceptible='^[1-3]$' - list={ 1:imgTest, - 2:scaleTest, - 3:rotateTest } - keyIn="temp val" - - while 1: - keyIn=str(raw_input(">>>")) - if keyin. - for i in keyIn: - if not re.search(acceptible,i): break - else: - preferences=dict(getValues(keyIn)) - for i in keyIn: - list.get(int(i))(preferences) - break - break - -#ILY GEOFF A - -""" -CANVAS_SIZE=(600,400) -BLACK=(0,0,0) - -screen=pygame.display.set_mode(CANVAS_SIZE) -run=0 - -while 1: - pygame.display.set_caption("Test 1 : %s (Referred)" %(ftArr[run][2]) ) - # myimage[0] is the convert()'ed image surface, to remain untouched - myimage = [ - pygame.Surface.convert(pygame.image.load( "%s%s" %( ftArr[run][1],ftArr[run][0] ) )) , - pygame.Surface.convert(pygame.image.load( "%s%s" %( ftArr[run][1],ftArr[run][0] ) )), - pygame.Surface.convert(pygame.image.load( "%s%s" %( ftArr[run][1],ftArr[run][0] ) )).get_rect() , - 0 - ] - - iterate=0 - print "\nTest 1 : Same image referred evey time (original image not edited).\n" - while iterate<36: - - time.sleep(.5) - start=time.time() - myimage[3]= int( myimage[3] ) + 10 - myimage[1]=pygame.transform.rotate(myimage[0],myimage[3]) - myimage[2]=myimage[1].get_rect() - screen.fill(BLACK) - screen.blit( myimage[1] , - ( -( myimage[1].get_width() - myimage[0].get_width() )/2 , - -( myimage[1].get_height()-myimage[0].get_height() )/2 ) ) - - pygame.display.flip() -""" - diff --git a/devtools/CompleteTestKit/testKit.py b/devtools/CompleteTestKit/testKit.py new file mode 100755 index 0000000..ce1c4f5 --- /dev/null +++ b/devtools/CompleteTestKit/testKit.py @@ -0,0 +1,589 @@ +#! /usr/bin/env python +print "\n\nLoading..." +from datetime import datetime +import sys +import time +import pygame +import re +import os +os.system("clear") +pygame.init() + +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +"""The file type array will be iterated through as the test progresses to tell +the program what extension and path to use for the images + +Current issue is the fact that the attributes declared in the upper method is +not being seen or involved in the inner methods +ergo, I must manually pass the details to and from the getValues(keyIn) to the +other method objects. I will probably do this in-line, if it allows me, as I +call the other objects. This should get interesting. Actually, that would call + the getValues as many times as I have requested a test, defeating the purpose +of having a module that collects data pertenent to these tests once before the +tests are run; so i will run the getVal() return the data in an array which is +then passed onto all def's thereafter. + +preferences[0] - Multiple Tests - + [0][0] - screenWidth + [0][1] - screenHeight + [0][2] - images + [0][3] - trials + [0][9] - file to write to... +preferences[1] - speedTest Specific + None currenlty inplimented +preferences[2] - scaleTest Specific + [2][0] - scale x + [2][1] - scale y +preferences[3] - rotateTest Specific + [3][0] - Degree to rotate image to + [3][1] - how many rotational steps to take +""" +def getValues(keyIn): + preferences={} + print "\nTest Details\nFor default values, please leave the field blank" + preferences[0]={} + + try: + print "\nSet size, formatted as '>width,height':" + print "Default value is '600,400'." + screenSize = str(raw_input('>>>')) + screenSize = screenSize.split(',') + preferences[0][0] = int(screenSize[0]) + preferences[0][1] = int(screenSize[1]) + except: + print "Value was erroneous/blank, Default set..." + preferences[0][0]=600 + preferences[0][1]=400 + + if '1' in keyIn or '2' in keyIn: + try: + print "\nHow many images would you like to draw?" + print "Default value is 5 images." + preferences[0][2]=int(raw_input('>>>')) + except: + print "Value was erroneous/blank, Default set..." + preferences[0][2]=5 + try: + print "\nHow many trials would you like to run?" + print "Default value is 5 trials." + preferences[0][3]=int(raw_input('>>>')) + except: + print "Value was erroneous/blank, Default set..." + preferences[0][3]=5 + try: + print "\nHow many frames per trial would you like to run?" + print "(The average framerate is taken from this value.)" + print "Default value is 500 frames." + preferences[0][4]=int(raw_input('>>>')) + except: + print "Value was erroneous/blank, Default set..." + preferences[0][4]=500 + + if '2' in keyIn: + preferences[2]={} + try: + print "\nWhat would you like to scale the images to in the ", + print "scalability test? (format as '>width,height', in pixels)" + print "NOTE: Scalability test is built to resize from 160x160, ", + print "80x80, 69x69 and 40x40 pixel sizes" + sizeTo = raw_input(">>>").split(',') + preferences[2][0] = int(sizeTo[0]) + preferences[2][1] = int(sizeTo[1]) + except: + print "Value was erroneous/blank, Default set..." + preferences[2][0] = 40 + preferences[2][1] = 40 + + if '3' in keyIn: + preferences[3]={} + try: + print "\nTo what degree would you like to rotate (in degrees)?" + print "Default value is 90 degrees." + preferences[3][0] = int(raw_input('>>>')) + except: + print "Value was erroneous/blank, Default set..." + preferences[3][0] = 90 + try: + print "\nHow many steps would you like to take?" + print "Default value is 18 steps." + preferences[3][1] = int(raw_input('>>>')) + except: + print "Value was erroneous/blank, Default set..." + preferences[3][1] = 18 + + print "END OF INFO GATHERING - Testing beginning now...\n" + return preferences + + + +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +"""Image() Animation Test +This test will simply load the image(s) to screen, and move them around to +create a CPU stressful environment. The performance of the CPU in this +environment is measured in the average frame rate demonstrated in a sample of +500 frames. Once this test is completed and written to file, the test is rerun +using surface.convert() to see if converting all of the different file types +will consequentially even out the framerates between tests. +""" +def imgTest(preferences): + ftArr=[ + [".bmp","./art/BMP16/"], [".bmp","./art/BMP24/"], + [".bmp","./art/BMP32/"], [".gif","./art/GIF/" ] , + [".gif","./art/GIFT/" ], [ ".jpg","./art/JPG1/"], + [".jpg","./art/JPG2/"] , [".jpg","./art/JPG3/" ], + [ ".jpg","./art/JPG4/"], [".png","./art/PNGI/"] , + [".png","./art/PNGT/" ] + ] + screenWidth = preferences[0][0] + screenHeight = preferences[0][1] + maxImage = preferences[0][2] + maxTrial = preferences[0][3] + maxFrame = preferences[0][4] + BACKGROUND = 152, 251, 152 # pale green + + ft="" #filetype + img={} + i=1 #cycles images + + try: + f=preferences[0][9] + f.write("\n\n") + except: + f=preferences[0][9]=open('./logs/Test Results - %s.csv' + %str(datetime.now()),'a') + + f.write("Speed Test - "+str(datetime.now())) + f.write(",Width (pixels)"+','+"Height (pixels)"+','+ + "Trial Runs"+','+"Image Objects Drawn") + f.write("\n,"+str(screenWidth)+','+str(screenHeight)+','+ + str(maxTrial)+','+str(maxImage)) + f.write("\nFile Type"+','+"Time taken to load images to memory (seconds)") + for trial in range(maxTrial): f.write(",Trial "+str(trial+1)+" (frames per second)") + + print "width,height", + print screenWidth, + print ",", + print screenHeight + + screen = pygame.display.set_mode( [int(screenWidth), + int(screenHeight)] ) + pygame.display.set_caption("Speed Test Window") + + for trialType in range( len(ftArr) ): + ft=ftArr[trialType] + + f.seek(0,2) + f.write(str('\n'+ft[1]+' Speed Test')) + f.seek(0,2) + + start=time.time() + imgSwitch={ + 1: pygame.image.load("%s2%s"%(ft[1],ft[0])), + 2: pygame.image.load("%s3%s"%(ft[1],ft[0])), + 3: pygame.image.load("%s4%s"%(ft[1],ft[0])), + 4: pygame.image.load("%s5%s"%(ft[1],ft[0])), + 5: pygame.image.load("%s6%s"%(ft[1],ft[0])), + 6: pygame.image.load("%s7%s"%(ft[1],ft[0])), + 7: pygame.image.load("%s8%s"%(ft[1],ft[0])), + 8: pygame.image.load("%s9%s"%(ft[1],ft[0])),} + + f.write(',') + f.write(str(time.time()-start)) + print "Speed Test: "+ft[1]+" extension "+ft[0] + + for aTrial in range(maxTrial): + for eachImage in range(maxImage): + + img[eachImage,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) + img[eachImage,1]= img[eachImage,0].get_rect() + img[eachImage,2]= [2,2] # velocity of image(s) + displace=eachImage*40 + img[eachImage,1]=img[eachImage,1].move(displace,displace) + + start=time.time() + + for frame in range(maxFrame): + for image in range(maxImage): + img[image,0]=imgSwitch.get(i,None) + if img[image,1].left < 0 or img[image,1].right > screenWidth: + img[image,2]=[ -img[image,2][0], img[image,2][1] ] + + if img[image,1].top < 0 or img[image,1].bottom > screenHeight: + img[image,2]=[ img[image,2][0], -img[image,2][1] ] + + img[image,1] = img[image,1].move(img[image,2]) + screen.blit(img[image,0],img[image,1]) + + pygame.display.flip() + i=i+1 + if i>8: i=1 + screen.fill(BACKGROUND) + + print 1/((time.time()-start)/maxFrame) + f.seek(0,2) + f.write(','+str(1/((time.time()-start)/maxFrame))) + + ft="" #filetype + img={} + i=1 #cycles images + + f.write("\n\nUsing .convert()") + f.write("\nFile Type"+','+"Time taken to load images to memory (seconds)") + for trial in range(maxTrial): f.write(",Trial "+str(trial+1)+" (frames per second)") + + screen = pygame.display.set_mode( [screenWidth,screenHeight] ) + pygame.display.set_caption("Speed convert() Test Window") + + for trialType in range( len(ftArr) ): + ft=ftArr[trialType] + + f.seek(0,2) + f.write(str('\n'+ft[1]+' Speed convert() Test')) + f.seek(0,2) + + start=time.time() + imgSwitch={ + 1: pygame.image.load("%s2%s"%(ft[1],ft[0])).convert(), + 2: pygame.image.load("%s3%s"%(ft[1],ft[0])).convert(), + 3: pygame.image.load("%s4%s"%(ft[1],ft[0])).convert(), + 4: pygame.image.load("%s5%s"%(ft[1],ft[0])).convert(), + 5: pygame.image.load("%s6%s"%(ft[1],ft[0])).convert(), + 6: pygame.image.load("%s7%s"%(ft[1],ft[0])).convert(), + 7: pygame.image.load("%s8%s"%(ft[1],ft[0])).convert(), + 8: pygame.image.load("%s9%s"%(ft[1],ft[0])).convert(),} + + f.write(',') + f.write( str(time.time()-start) ) + print "Convert Test: "+ft[1]+" extension "+ft[0] + + for trial in range(maxTrial): + for image in range(maxImage): + img[image,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) + img[image,1]= img[image,0].get_rect() + img[image,2]= [2,2] #speed + displace = image * 40 + img[image,1]=img[image,1].move( displace,displace ) + + start=time.time() + + for frame in range(maxFrame): + for image in range(maxImage): + img[image,0]=imgSwitch.get(i,None) + if img[image,1].left < 0 or img[image,1].right > screenWidth: + img[image,2]=[ -img[image,2][0], img[image,2][1] ] + + if img[image,1].top < 0 or img[image,1].bottom > screenHeight: + img[image,2]=[ img[image,2][0], -img[image,2][1] ] + + img[image,1] = img[image,1].move(img[image,2]) + screen.blit(img[image,0],img[image,1]) + + pygame.display.flip() + i=i+1 + if i>8: i=1 + screen.fill(BACKGROUND) + + print 1/((time.time()-start)/maxFrame) + f.seek(0,2) + f.write(','+str(1/((time.time()-start)/maxFrame))) + preferences[0][9]=f + + + +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +"""Scalability Test +The scalability test is still very much hard coded and not very elegant, but +this is a theme with all our code. + +The pseudo-code goes as follows: +Gather in varaibles such as how many trials, images to draw on screen, and what +to resize the 160, 80, 69, and 40 pixel square images to. + +Then the code will generate the lists reflecting which directories to access +and their associated filetypes and finally there are loops to cycle through +trials where 500 frames of n moving images are placed onto the screen after +they are transform.scale()'d and convert()'d + +Last step, information is printed to the terminal and, once implemented, to +a .csv file in the logs directory. +""" +def scaleTest(preferences): + sizeTo = [ preferences[2][0],preferences[2][1] ] + screenWidth = preferences[0][0] + screenHeight = preferences[0][1] + maxImage = preferences[0][2] + maxTrial = preferences[0][3] + maxFrame = preferences[0][4] + + try: + f=preferences[0][9] + f.write("\n\n") + except: + f=preferences[0][9]=\ + open('./logs/Test Results - %s.csv'%str(datetime.now()),'a') + + img={} + ft="" #filetype + r=0 #frame refreshes + i=1 #cycles images + size = screenWidth,screenHeight + t=0 #trial number n + colorkey=(255, 152, 0) + +# paths to and extensions for image files to be turned into surfaces + ftArr=[ + [".bmp","art/BMP16/BMP16100/"] , + [".bmp","art/BMP16/BMP16173/"] , + [".bmp","art/BMP16/BMP16200/"] , + [".bmp","art/BMP16/BMP16400/"] , + [".bmp","art/BMP24/BMP24100/"] , + [".bmp","art/BMP24/BMP24173/"] , + [".bmp","art/BMP24/BMP24200/"] , + [".bmp","art/BMP24/BMP24400/"] , + [".gif","art/GIF/GIF100/"] , + [".gif","art/GIF/GIF173/"] , + [".gif","art/GIF/GIF200/"] , + [".gif","art/GIF/GIF400/"] , + [".gif","art/GIFT/GIFT100/"] , + [".gif","art/GIFT/GIFT173/"] , + [".gif","art/GIFT/GIFT200/"] , + [".gif","art/GIFT/GIFT400/"] , + [".png","art/PNGI/PNG100/"] , + [".png","art/PNGI/PNG173/"] , + [".png","art/PNGI/PNG200/"] , + [".png","art/PNGI/PNG400/"] , + [".png","art/PNGT/PNGT100/"] , + [".png","art/PNGT/PNGT173/"] , + [".png","art/PNGT/PNGT200/"] , + [".png","art/PNGT/PNGT400/"] ] + + f.write("Scaling Test"+str(datetime.now())) + f.write(",Width (pixels)"+','+"Height (pixels)"+','+ + "Trial Runs"+','+"Image Objects Drawn") + f.write("\n,"+str(screenWidth)+','+str(screenHeight)+ + ','+str(maxTrial)+','+str(maxImage)) + f.write("\nFile Type"+','+"Time taken to load images to memory (seconds)") + for trial in range(maxTrial): f.write(",Trial "+str(trial+1)+" (frames per second)") + + screen = pygame.display.set_mode(size) + pygame.display.set_caption("Scaling Test Window") + BACKGROUND = 152, 251, 152 # pale green + + for trialType in range( len(ftArr) ): + ft=ftArr[trialType] + + print "Scale Test: "+ft[1]+" extension "+ft[0] + trialthis=maxTrial + f.seek(0,2) + f.write(str('\n'+ft[1]+' Scale Test')) + f.seek(0,2) + start=time.time() + # This timer will reflect the time taken to load and resize images in memory + + switcher = { + # This is also where we need advise regarding implementing convert() + 1: pygame.transform.scale( pygame.image.load("%s2%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 2: pygame.transform.scale( pygame.image.load("%s3%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 3: pygame.transform.scale( pygame.image.load("%s4%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 4: pygame.transform.scale( pygame.image.load("%s5%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 5: pygame.transform.scale( pygame.image.load("%s6%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 6: pygame.transform.scale( pygame.image.load("%s7%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 7: pygame.transform.scale( pygame.image.load("%s8%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 8: pygame.transform.scale( pygame.image.load("%s9%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )), + 9: pygame.transform.scale( pygame.image.load("%s1%s"%(ft[1], + ft[0])).convert(),(sizeTo[0],sizeTo[1] )) + } + + f.write(',') + f.write( str(time.time()-start) ) + # Here ends the loading section, and hereafter we jump into the main loop + + for trial in range(maxTrial): + for image in range(maxImage): + # establish the initial state for the images of the next trial + img[image,0]= pygame.image.load("%s1%s"%(ft[1],ft[0])) + img[image,0]= pygame.transform.scale(img[image,0], \ + (sizeTo[0], sizeTo[1])) + img[image,1]= img[image,0].get_rect() + img[image,2]= [2,2] #speed + displace=image*40 + # Here I move images to avoid indistinguishable stacks of image rectangles + img[image,1]=img[image,1].move(displace,displace) + start=time.time() + + for frame in range(maxFrame): + # This loop is the 'main event' so to speak, as it is the section that is + # measured in terms of frames per second + screen.fill(BACKGROUND) + for image in range(maxImage): + img[image,0]=switcher.get(i,None) + if img[image,1].left < 0 or img[image,1].right > screenWidth: + img[image,2]=[ -img[image,2][0], img[image,2][1] ] + + if img[image,1].top < 0 or img[image,1].bottom > screenHeight: + img[image,2]=[ img[image,2][0], -img[image,2][1] ] + + img[image,1] = img[image,1].move(img[image,2]) + # Move the 'ball' image accordingly, plot the change + screen.blit(img[image,0],img[image,1]) + + pygame.display.flip() + # "Make it so, number two", on those changes above + i=i+1 + if i>8: i=1 + + print 1/((time.time()-start)/maxFrame) + f.seek(0,2) + f.write(','+str(1/((time.time()-start)/maxFrame))) + preferences[0][9]=f + + + +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +"""rotateTest is a test that will move a selected image by way of a select +variety of methods, with the controlled variables being the method, the number +of steps, the screen's dimensions, the number of trials, and the rotation (in +degrees) for each step. The static variables include the image itself. +""" +def rotateTest(preferences): + screenWidth = preferences[0][0] + screenHeight = preferences[0][1] + maxRotate = preferences[3][0] + degreeRotate = preferences[3][0] / preferences[3][1] + BACKGROUND = (152, 251, 152) # pale green + + try: + f=preferences[0][9] + f.write("\n\n") + except: + f=preferences[0][9]=\ + open('./logs/Test Results - %s.csv'%str(datetime.now()),'a') + + screen=pygame.display.set_mode((screenWidth,screenHeight)) + pygame.display.set_caption("Rotate Test Window") + + myImage=[ pygame.Surface.convert( pygame.image.load("art/GIF/1.gif") ) , + pygame.Surface.convert( pygame.image.load("art/GIF/1.gif") ), + pygame.Surface.convert( pygame.image.load("art/GIF/1.gif")).get_rect() , + 0 ] + + f.write("Rotation Testing,"+str(datetime.now())+",Total Rotation,Rotational Steps,Degrees per Step,Original Image Surface") + f.write("\n,,"+str(preferences[3][0])+','+str(preferences[3][1])+','+str(degreeRotate)+','+str( myImage[0] )) + + f.write("\nTest type,Time of test,Screen capture location,Final image surface info") + + print "\nTest 1 : Same image called evey time, original image not edited.\n" + totalTime=0 + for step in range(preferences[3][1]): + stepStart=time.time() + myImage[3]= int( myImage[3] ) + degreeRotate + myImage[1]=pygame.transform.rotate(myImage[0],myImage[3]) + myImage[2]=myImage[1].get_rect() + screen.fill(BACKGROUND) + + screen.blit( myImage[1] , + (((screenWidth/2) - (myImage[1].get_width()/2)) , + ((screenHeight/2) - (myImage[1].get_height()/2))) ) + pygame.display.flip() + + stepEnd=time.time() + + totalTime+=(float(stepEnd)-float(stepStart)) + + print "\n%35s%35s" %("Rotation #" , str(step+1) ) + print "%35s%35s" %( "Degrees from 0" , str(myImage[3]) ) + print "%35s%35s" %( "Time: Calc. Rot.", str(stepEnd-stepStart) ) + print "%35s%35s" %( "Orig. Img Info" , str(myImage[0]) ) + print "%35s%35s" %( "Rot. Img. Rect.", str(myImage[2]) ) + print "%35s%35s" %( "Rot. Img. Info" , str(myImage[1]) ) + + screenPath = './logs/screencaps/reference-'+ str(datetime.now()) +'.bmp' + pygame.image.save(screen,screenPath) + f.write("\nReference Image Saved,"+str(totalTime)+','+str(screenPath)+','+str(myImage[1])) + + #simple continuous rotate test + myImage=[ pygame.Surface.convert( pygame.image.load("art/GIF/1.gif") ) , + pygame.Surface.convert( pygame.image.load("art/GIF/1.gif") ), + pygame.Surface.convert( pygame.image.load("art/GIF/1.gif")).get_rect() , + 0 ] + totalTime=0 + + for step in range(preferences[3][1]): + stepStart=time.time() + myImage[1]=pygame.transform.rotate(myImage[1],degreeRotate) + myImage[2]=myImage[1].get_rect() + screen.blit( myImage[1] , + (((screenWidth/2) - (myImage[1].get_width()/2)) , + ((screenHeight/2) - (myImage[1].get_height()/2))) ) + pygame.display.flip() + stepStop=time.time() + + totalTime+=float(stepStop)-float(stepStart) + myImage[3]+=degreeRotate + + print "\n%35s%35s" %("Rotation #" , str(step+1) ) + print "%35s%35s" %( "Degrees from 0" , str(myImage[3]) ) + print "%35s%35s" %( "Time: Calc. Rot.", str(stepEnd-stepStart) ) + print "%35s%35s" %( "Orig. Img Info" , str(myImage[0]) ) + print "%35s%35s" %( "Rot. Img. Rect.", str(myImage[2]) ) + print "%35s%35s" %( "Rot. Img. Info" , str(myImage[1]) ) + + screenPath = './logs/screencaps/Continuous-'+ str(datetime.now()) +'.bmp' + pygame.image.save(screen,screenPath) + f.write("\nContinuous Rotate,"+str(totalTime)+','+str(screenPath)+','+str(myImage[1])) + + preferences[0][9]=f + +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +#2345678911234567892123456789312345678941234567895123456789612345678971234567898 +while 1: + pygame.display.quit() + try:preferences[0][9].close() + except:pass + print "\nWelcome to the Master Test Interface" + print "Authors: Scott 'JT' Mengel and Dave Silverman" + print "\nPlease select the test(s) you want to run in the order you want ", + print "to run them (Do not seperate them with any characters)." + print "Please Note: The logs for the tests you are running will ", + print "automatically be placed in the 'logs/' directory in the test folder ", + print "as a .csv file. \n" + print "1. The image.load() surface speed test (with and without surface.", + print "convert() testing)" + print "2. The transform.scale() surface Selected Scalability Test" + print "3. The transform.rotate() tests" + print "Enter 'Exit' to return to the terminal and other menu options to come!\n" + + acceptible='^[1-3]$' + menuItems={ 1:imgTest, + 2:scaleTest, + 3:rotateTest } + keyIn="temp val" + + while True: + keyIn=str(raw_input(">>>")) + if 'exit' in keyIn or 'Exit' in keyIn: + print "\nClosing...\n" + sys.exit() + for i in keyIn: + if not re.search(acceptible,i): break + else: + preferences=dict( getValues(keyIn) ) + for i in keyIn: + menuItems.get(int(i))(preferences) + break + break + +#IDLY GEOFF A + diff --git a/devtools/CompleteTestKit/AnimatedSprite.py b/devtools/CompleteTestKit/to-do/AnimatedSprite.py index 03fcfcd..03fcfcd 100755 --- a/devtools/CompleteTestKit/AnimatedSprite.py +++ b/devtools/CompleteTestKit/to-do/AnimatedSprite.py diff --git a/devtools/CompleteTestKit/AnimatedSpriteTest.py b/devtools/CompleteTestKit/to-do/AnimatedSpriteTest.py index 1be0d6a..1be0d6a 100755 --- a/devtools/CompleteTestKit/AnimatedSpriteTest.py +++ b/devtools/CompleteTestKit/to-do/AnimatedSpriteTest.py diff --git a/devtools/CompleteTestKit/Animation Styles/AnimTestMod.py b/devtools/CompleteTestKit/to-do/Animation Styles/AnimTestMod.py index 2626357..2626357 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimTestMod.py +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimTestMod.py diff --git a/devtools/CompleteTestKit/Animation Styles/AnimatedSprite.py b/devtools/CompleteTestKit/to-do/Animation Styles/AnimatedSprite.py index e4a3e3b..e4a3e3b 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimatedSprite.py +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimatedSprite.py diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp Binary files differindex 7edcb3c..7edcb3c 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/Buttons.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp16/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp16/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp Binary files differindex a96ed6b..a96ed6b 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/Buttons.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/bmp24/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/bmp24/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/Buttons.gif b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/Buttons.gif Binary files differindex 8725ade..8725ade 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/Buttons.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/Buttons.gif diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gif/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gif/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/Buttons.gif b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/Buttons.gif Binary files differindex 4be81f6..4be81f6 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/Buttons.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/Buttons.gif diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/gift/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/gift/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/Buttons.png b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/Buttons.png Binary files differindex 83bff0c..83bff0c 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/Buttons.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/Buttons.png diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/png/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/png/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/Buttons.png b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/Buttons.png Binary files differindex cb6766f..cb6766f 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/Buttons.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/Buttons.png diff --git a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/AnimationPerLine/pngt/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/AnimationPerLine/pngt/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/Buttons.psd b/devtools/CompleteTestKit/to-do/Animation Styles/Buttons.psd Binary files differindex a1571e2..a1571e2 100755 --- a/devtools/CompleteTestKit/Animation Styles/Buttons.psd +++ b/devtools/CompleteTestKit/to-do/Animation Styles/Buttons.psd diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/1.bmp Binary files differnew file mode 100755 index 0000000..57630e3 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/1.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/2.bmp Binary files differnew file mode 100755 index 0000000..90af77a --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/2.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/3.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/3.bmp Binary files differnew file mode 100755 index 0000000..1751a4a --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/3.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/4.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/4.bmp Binary files differnew file mode 100755 index 0000000..1f292d1 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/4.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/5.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/5.bmp Binary files differnew file mode 100755 index 0000000..fd8cc0e --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/5.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/6.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/6.bmp Binary files differnew file mode 100755 index 0000000..df3a2eb --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/6.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/7.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/7.bmp Binary files differnew file mode 100755 index 0000000..51b0052 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/7.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/8.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/8.bmp Binary files differnew file mode 100755 index 0000000..9302c64 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/8.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/9.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/9.bmp Binary files differnew file mode 100755 index 0000000..f5c6191 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a1/9.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/1.bmp Binary files differnew file mode 100755 index 0000000..4def064 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/1.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/2.bmp Binary files differnew file mode 100755 index 0000000..3750af4 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/2.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/3.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/3.bmp Binary files differnew file mode 100755 index 0000000..636c6f3 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/3.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/4.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/4.bmp Binary files differnew file mode 100755 index 0000000..646b407 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/4.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/5.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/5.bmp Binary files differnew file mode 100755 index 0000000..11a9bf5 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/5.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/6.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/6.bmp Binary files differnew file mode 100755 index 0000000..ca1ba7b --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/6.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/7.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/7.bmp Binary files differnew file mode 100755 index 0000000..9375c15 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/7.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/8.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/8.bmp Binary files differnew file mode 100755 index 0000000..53b66f9 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/8.bmp diff --git a/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/9.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/9.bmp Binary files differnew file mode 100755 index 0000000..088558c --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp16/a2/9.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/1.bmp Binary files differindex e910cec..e910cec 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/1.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/2.bmp Binary files differindex 0545f38..0545f38 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/2.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/3.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/3.bmp Binary files differindex a154b29..a154b29 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/3.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/3.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/4.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/4.bmp Binary files differindex 4ab21f9..4ab21f9 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/4.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/4.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/5.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/5.bmp Binary files differindex 0a55d39..0a55d39 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/5.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/5.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/6.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/6.bmp Binary files differindex ad3f1b1..ad3f1b1 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/6.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/6.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/7.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/7.bmp Binary files differindex 915ab5b..915ab5b 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/7.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/7.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/8.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/8.bmp Binary files differindex b36287d..b36287d 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/8.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/8.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/9.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/9.bmp Binary files differindex 2cab5a4..2cab5a4 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a1/9.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a1/9.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/1.bmp Binary files differindex 1b41dff..1b41dff 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/1.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/2.bmp Binary files differindex 71cca69..71cca69 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/2.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/3.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/3.bmp Binary files differindex a374206..a374206 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/3.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/3.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/4.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/4.bmp Binary files differindex 37c4304..37c4304 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/4.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/4.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/5.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/5.bmp Binary files differindex 51f1acb..51f1acb 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/5.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/5.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/6.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/6.bmp Binary files differindex 483043c..483043c 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/6.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/6.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/7.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/7.bmp Binary files differindex d99e779..d99e779 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/7.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/7.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/8.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/8.bmp Binary files differindex 223b87e..223b87e 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/8.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/8.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/9.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/9.bmp Binary files differindex 088a0f5..088a0f5 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/bmp24/a2/9.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/bmp24/a2/9.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/1.gif Binary files differindex 4a89216..4a89216 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/2.gif Binary files differindex b5019d8..b5019d8 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/3.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/3.gif Binary files differindex a87ddc6..a87ddc6 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/3.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/3.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/4.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/4.gif Binary files differindex 2a398e6..2a398e6 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/4.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/4.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/5.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/5.gif Binary files differindex 93e5b8d..93e5b8d 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/5.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/5.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/6.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/6.gif Binary files differindex 0e73825..0e73825 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/6.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/6.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/7.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/7.gif Binary files differindex 061669a..061669a 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/7.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/7.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/8.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/8.gif Binary files differindex 90dcfda..90dcfda 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/8.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/8.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/9.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/9.gif Binary files differindex aa194d9..aa194d9 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a1/9.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a1/9.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/1.gif Binary files differindex 09134f4..09134f4 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/2.gif Binary files differindex d9ebbc2..d9ebbc2 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/3.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/3.gif Binary files differindex de17bd4..de17bd4 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/3.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/3.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/4.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/4.gif Binary files differindex 87450de..87450de 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/4.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/4.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/5.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/5.gif Binary files differindex f95b8d9..f95b8d9 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/5.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/5.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/6.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/6.gif Binary files differindex 3462272..3462272 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/6.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/6.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/7.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/7.gif Binary files differindex ac5f084..ac5f084 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/7.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/7.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/8.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/8.gif Binary files differindex d9d3989..d9d3989 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/8.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/8.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/9.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/9.gif Binary files differindex bcdd274..bcdd274 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gif/a2/9.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gif/a2/9.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/1.gif Binary files differindex 2aad244..2aad244 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/2.gif Binary files differindex ed22525..ed22525 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/3.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/3.gif Binary files differindex 246cd12..246cd12 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/3.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/3.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/4.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/4.gif Binary files differindex 722f240..722f240 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/4.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/4.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/5.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/5.gif Binary files differindex 6a71348..6a71348 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/5.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/5.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/6.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/6.gif Binary files differindex 0dd2145..0dd2145 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/6.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/6.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/7.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/7.gif Binary files differindex 1e9914b..1e9914b 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/7.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/7.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/8.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/8.gif Binary files differindex 390124b..390124b 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/8.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/8.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/9.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/9.gif Binary files differindex 61c8c3c..61c8c3c 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a1/9.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a1/9.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/1.gif Binary files differindex a79f1e0..a79f1e0 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/2.gif Binary files differindex b2579e3..b2579e3 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/3.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/3.gif Binary files differindex 42f2c74..42f2c74 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/3.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/3.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/4.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/4.gif Binary files differindex 61b944a..61b944a 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/4.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/4.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/5.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/5.gif Binary files differindex 865f4c7..865f4c7 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/5.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/5.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/6.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/6.gif Binary files differindex 9fa7cf2..9fa7cf2 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/6.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/6.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/7.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/7.gif Binary files differindex d7627b2..d7627b2 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/7.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/7.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/8.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/8.gif Binary files differindex 965acc1..965acc1 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/8.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/8.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/9.gif b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/9.gif Binary files differindex 0509dad..0509dad 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/gift/a2/9.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/gift/a2/9.gif diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/1.png Binary files differindex 663ca83..663ca83 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/2.png Binary files differindex 6f44ab5..6f44ab5 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/3.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/3.png Binary files differindex c49ab7e..c49ab7e 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/3.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/3.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/4.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/4.png Binary files differindex 63eb7e2..63eb7e2 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/4.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/4.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/5.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/5.png Binary files differindex 2aaa600..2aaa600 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/5.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/5.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/6.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/6.png Binary files differindex 8fa9737..8fa9737 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/6.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/6.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/7.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/7.png Binary files differindex 1de0311..1de0311 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/7.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/7.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/8.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/8.png Binary files differindex 7d6332a..7d6332a 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/8.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/8.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/9.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/9.png Binary files differindex 5a8b0ea..5a8b0ea 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a1/9.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a1/9.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/1.png Binary files differindex 98b3d72..98b3d72 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/2.png Binary files differindex 6ec3dac..6ec3dac 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/3.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/3.png Binary files differindex 157dfc8..157dfc8 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/3.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/3.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/4.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/4.png Binary files differindex 5719ab6..5719ab6 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/4.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/4.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/5.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/5.png Binary files differindex 3cfd8a3..3cfd8a3 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/5.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/5.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/6.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/6.png Binary files differindex 750ed8b..750ed8b 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/6.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/6.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/7.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/7.png Binary files differindex ce7756e..ce7756e 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/7.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/7.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/8.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/8.png Binary files differindex e28a906..e28a906 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/8.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/8.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/9.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/9.png Binary files differindex b6b2cd8..b6b2cd8 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/png/a2/9.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/png/a2/9.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/1.png Binary files differindex dab1239..dab1239 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/2.png Binary files differindex 56312a7..56312a7 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/3.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/3.png Binary files differindex 4ceb540..4ceb540 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/3.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/3.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/4.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/4.png Binary files differindex 38d640a..38d640a 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/4.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/4.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/5.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/5.png Binary files differindex dcc14d4..dcc14d4 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/5.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/5.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/6.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/6.png Binary files differindex cb2f933..cb2f933 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/6.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/6.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/7.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/7.png Binary files differindex 497ed6f..497ed6f 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/7.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/7.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/8.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/8.png Binary files differindex 693ac1e..693ac1e 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/8.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/8.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/9.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/9.png Binary files differindex e83b570..e83b570 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a1/9.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a1/9.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/1.png Binary files differindex 06f2b7c..06f2b7c 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/2.png Binary files differindex f20ed10..f20ed10 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/3.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/3.png Binary files differindex 6681f2e..6681f2e 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/3.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/3.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/4.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/4.png Binary files differindex ff3f0f1..ff3f0f1 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/4.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/4.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/5.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/5.png Binary files differindex 1152066..1152066 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/5.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/5.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/6.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/6.png Binary files differindex 458e680..458e680 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/6.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/6.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/7.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/7.png Binary files differindex 4097b74..4097b74 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/7.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/7.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/8.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/8.png Binary files differindex e6ee9b2..e6ee9b2 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/8.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/8.png diff --git a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/9.png b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/9.png Binary files differindex 314aabf..314aabf 100755 --- a/devtools/CompleteTestKit/Animation Styles/IndividualFrames/pngt/a2/9.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/IndividualFrames/pngt/a2/9.png diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp Binary files differindex 9798a08..9798a08 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp Binary files differindex 68ba0ba..68ba0ba 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp16/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp16/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp Binary files differindex 7ff69f4..7ff69f4 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/1.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp Binary files differindex a771b04..a771b04 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/2.bmp diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/bmp24/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/bmp24/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/1.gif Binary files differindex 223321b..223321b 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/2.gif Binary files differindex 56c1a0f..56c1a0f 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gif/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gif/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/1.gif b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/1.gif Binary files differindex 895ff39..895ff39 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/1.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/1.gif diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/2.gif b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/2.gif Binary files differindex 61d6302..61d6302 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/2.gif +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/2.gif diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/gift/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/gift/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/1.png Binary files differindex 99f9800..99f9800 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/2.png Binary files differindex 41b01d4..41b01d4 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/png/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/png/text.txt diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/1.png b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/1.png Binary files differindex 37d045a..37d045a 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/1.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/1.png diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/2.png b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/2.png Binary files differindex b7a00a1..b7a00a1 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/2.png +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/2.png diff --git a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/text.txt b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/text.txt index dc66dbe..dc66dbe 100755 --- a/devtools/CompleteTestKit/Animation Styles/OneSheetPerAnimation/pngt/text.txt +++ b/devtools/CompleteTestKit/to-do/Animation Styles/OneSheetPerAnimation/pngt/text.txt diff --git a/devtools/CompleteTestKit/to-do/Scene.py b/devtools/CompleteTestKit/to-do/Scene.py new file mode 100644 index 0000000..6101696 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/Scene.py @@ -0,0 +1,6 @@ +#! /usr/bin/env python + +class Scene(pygame.sprite.Sprite): + def __init__(self): + + diff --git a/devtools/CompleteTestKit/to-do/dirtyTest.py b/devtools/CompleteTestKit/to-do/dirtyTest.py new file mode 100755 index 0000000..94c24a7 --- /dev/null +++ b/devtools/CompleteTestKit/to-do/dirtyTest.py @@ -0,0 +1,122 @@ +#! /usr/bin/env python +import pygame
+from pygame.locals import *
+from boxes import BouncingBox
+from time import time +pygame.init() + +FRAME=3000 +screenWidth = 600 +screenHeight = 400 +numImages = 5 +maxTrial = 1 # multiple trials, but hard coded in this test +dirtyList=[] +""" +try: + f=preferences[0][9] +except: + f=preferences[0][9]=open('./logs/Test Results - %s.csv' + %str(datetime.now()),'a') +f.write("\n\nSpeed Test - "+str(datetime.now())) +f.write(",Width (pixels)"+','+"Height (pixels)"+','+ + "Trial Runs"+','+"Image Objects Drawn") +f.write("\n,"+str(screenWidth)+','+str(screenHeight)+','+ + str(maxTrial)+','+str(numImages)) +f.write("\nFile Type"+','+"Time taken to load images to memory"+ + ','+"Trials (frames per second)") +""" +print "width,height", +print screenWidth, +print ",", +print screenHeight + +screen = pygame.display.set_mode( [int(screenWidth), + int(screenHeight)] ) #Screen Set 600x400 +pygame.display.set_caption("Sprite Speed Test Window") +GREEN = 0, 192, 0 # green +background = pygame.Surface( (screenWidth,screenHeight) ) +background.fill(GREEN) +screen.blit(background,[0,0]) +pygame.display.flip() +start = time() +frameList = [
+ pygame.image.load("./art/BMP24/1.bmp").convert(),
+ pygame.image.load("./art/BMP24/2.bmp").convert(),
+ pygame.image.load("./art/BMP24/3.bmp").convert(),
+ pygame.image.load("./art/BMP24/4.bmp").convert(),
+ pygame.image.load("./art/BMP24/5.bmp").convert(),
+ pygame.image.load("./art/BMP24/6.bmp").convert(),
+ pygame.image.load("./art/BMP24/7.bmp").convert(),
+ pygame.image.load("./art/BMP24/8.bmp").convert(),
+ pygame.image.load("./art/BMP24/9.bmp").convert(),
+] + +#make our groups +group1=pygame.sprite.RenderUpdates( BouncingBox(frameList,(0,0)) ) +group2=pygame.sprite.RenderUpdates(BouncingBox(frameList,(40,40)) ) +group3=pygame.sprite.RenderUpdates(BouncingBox(frameList,(80,80)) ) +group4=pygame.sprite.RenderUpdates(BouncingBox(frameList,(120,120)) ) +group5=pygame.sprite.RenderUpdates(BouncingBox(frameList,(160,160)) ) + +print (time()-start) , +print " -- Time to load" + +groups=[group1,group2,group3,group4,group5] + +"""while 1: + try:ft=ftArr[t] + except: + print "\nTest Complete\n" + break + f.seek(0,2) + f.write(str('\n'+ft[1]+' Speed Test')) + f.seek(0,2) + start=time.time() + + f.write(',') + f.write(str(time.time()-start)) +""" +print time()-start + +for aTrial in range(maxTrial): + for frame in range(FRAME): + dirtyList=[] + for image in range(numImages): + #move / collision detection + groups[image].update( screenWidth,screenHeight ) + + #individually blit each image group - add to list for update + dirtyList.extend(groups[image].draw(screen)) + + #draw the images flip/update + pygame.display.update(dirtyList)
+ for image in range(numImages): + groups[image].clear(screen, background)
+ + + print 1/((time()-start)/FRAME) +"""f.seek(0,2) + f.write(','+str(1/((time.time()-start)/r))) + + +screen = pygame.display.set_mode([1200, 900]) +boxesTwo.add(UpDownBox([pygame.image.load("goblin.png")], (0,300))) +background = pygame.image.load("Room.gif")
+#background.fill(pygame.image.load("Room.gif"))
+screen.blit(background, [0, 0])
+pygame.display.flip() +
+boxesTwo.update(pygame.time.get_ticks(), 700)
+rectlist = boxesTwo.draw(screen)
+pygame.display.update(rectlist)
+start = time()
+for i in range(2000):
+ boxes.update(pygame.time.get_ticks(), 700)
+ boxesTwo.update(pygame.time.get_ticks(), 700)
+ rectlist = boxesTwo.draw(screen)
+ rectlist.extend(boxes.draw(screen))
+ pygame.display.update(rectlist)
+ boxesTwo.clear(screen, background)
+ boxes.clear(screen, background)
+
+print 2000/(time() - start)
""" diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp Binary files differnew file mode 100644 index 0000000..57630e3 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/1.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp Binary files differnew file mode 100644 index 0000000..90af77a --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/2.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp Binary files differnew file mode 100644 index 0000000..1751a4a --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/3.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp Binary files differnew file mode 100644 index 0000000..1f292d1 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/4.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp Binary files differnew file mode 100644 index 0000000..fd8cc0e --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/5.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp Binary files differnew file mode 100644 index 0000000..df3a2eb --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/6.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp Binary files differnew file mode 100644 index 0000000..51b0052 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/7.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp Binary files differnew file mode 100644 index 0000000..9302c64 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/8.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp Binary files differnew file mode 100644 index 0000000..f5c6191 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a1/9.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp Binary files differnew file mode 100644 index 0000000..4def064 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/1.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp Binary files differnew file mode 100644 index 0000000..3750af4 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/2.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp Binary files differnew file mode 100644 index 0000000..636c6f3 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/3.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp Binary files differnew file mode 100644 index 0000000..646b407 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/4.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp Binary files differnew file mode 100644 index 0000000..11a9bf5 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/5.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp Binary files differnew file mode 100644 index 0000000..ca1ba7b --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/6.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp Binary files differnew file mode 100644 index 0000000..9375c15 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/7.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp Binary files differnew file mode 100644 index 0000000..53b66f9 --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/8.bmp diff --git a/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp Binary files differnew file mode 100644 index 0000000..088558c --- /dev/null +++ b/devtools/Dave's Test Kit/Animation Styles/IndividualFrames/bmp16/a2/9.bmp diff --git a/devtools/Dave's Test Kit/DODirtyTest.py b/devtools/Dave's Test Kit/DODirtyTest.py new file mode 100755 index 0000000..b3d5df3 --- /dev/null +++ b/devtools/Dave's Test Kit/DODirtyTest.py @@ -0,0 +1,92 @@ +#! /usr/bin/env python
+import pygame
+from pygame.locals import *
+import time
+from Scene import Scene
+from DrawableObject import DrawableObject
+from DynamicDrawableObject import DynamicDrawableObject
+pygame.init()
+
+FRAME=2500 #setting number of frames per trial
+screenWidth = 600 #screen width
+screenHeight = 400 #screen height
+numImages = 4 #number of copies of images
+numGroups = 1
+maxTrial = 5 # multiple trials, but hard coded in this test
+
+screen = pygame.display.set_mode( [int(screenWidth),
+ int(screenHeight)] ) #Setting the screen size to the given size
+pygame.display.set_caption("Sprite Speed Test Window")
+background = pygame.image.load("Room.gif")#Loading my background image
+screen.blit(background,[0,0])#blitting my background to screen
+pygame.display.flip()#flipping screen
+
+#Creating my list of images to use later
+surfaceList = [
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/1.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/2.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/3.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/4.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/5.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/6.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/7.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/8.bmp").convert(),
+ pygame.image.load(
+ "./Animation Styles/IndividualFrames/bmp16/a2/9.bmp").convert()
+ ]
+
+for aTrial in range(maxTrial):
+ start = time.time()#starting timer
+
+#creating my DynamicDrawableObject object using my previously made images list
+ a = DynamicDrawableObject(surfaceList,'', 72, 40, 40 , 2,2)
+ b = DynamicDrawableObject(surfaceList,'', 24, 80, 80 , 2,2)
+ c = DynamicDrawableObject(surfaceList,'', 12,120, 120, 2,2)
+ d = DynamicDrawableObject(surfaceList,'', 1, 160, 160, 2,2)
+
+ sceneList=[Scene(a),] #creating my array of scenes
+ sceneList[0].addObjects([b,c,d])
+
+ for sc in range(numGroups):
+ for img in range(sceneList[sc].getListSize()):
+ sceneList[sc].getObject(img).setSpeed(2,2)
+
+ #printing time to load images and stuff
+ print (time.time()-start) ,
+ print " -- Time to load"
+
+ #setting up timer stuff
+ clock = pygame.time.Clock()
+ clock.tick()
+ start = time.time()
+
+ #loop that goes through and upodates my objects
+ for frame in range(FRAME):
+ time.sleep(.25)
+ dirtyList=[]
+ for sc in range(numGroups):
+
+ for img in range(sceneList[sc].getListSize()):
+ thisrect = sceneList[sc].getObject(img).getRectangle()
+ if thisrect.right>screenWidth or thisrect.left<0:
+ sceneList[sc].setSpeed( sceneList[sc].getXSpeed()*-1, None )
+ if thisrect.bottom>screenHeight or thisrect.top<0:
+ sceneList[sc].setSpeed( None , sceneList[sc].getYSpeed()*-1 )
+
+ sceneList[sc].update(clock.get_time()) #calls the update function for my DDO
+
+ clock.tick() #ticks clock
+
+ dirtyList.extend( sceneList[sc].draw(screen) )#adding stuff that has been updated to my dirty list
+
+ pygame.display.update(dirtyList) #updates the screen with the dirty list
+ for sc in range(numGroups):
+ sceneList[sc].clear(screen, background) #clears stuff behind images based on given background image.
diff --git a/devtools/Dave's Test Kit/DrawableFontObject.py b/devtools/Dave's Test Kit/DrawableFontObject.py new file mode 100644 index 0000000..425d572 --- /dev/null +++ b/devtools/Dave's Test Kit/DrawableFontObject.py @@ -0,0 +1,16 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class DrawableFontObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,text,font, x = 0, y = 0):
+
+ self.font = font
+ self.textImage = font.render(text, 1, (255,255,255))
+ #self._image = self.textImage
+ DrawableObject.__init__(self, [self.textImage], '')
+
+ def changeText(self, newText, color=(255,255,255)):
+
+ self._images[0] = self.font.render(newText, True, color)
+ self.image = self._images[0]
diff --git a/devtools/Dave's Test Kit/DrawableObject.py b/devtools/Dave's Test Kit/DrawableObject.py new file mode 100644 index 0000000..3b12d85 --- /dev/null +++ b/devtools/Dave's Test Kit/DrawableObject.py @@ -0,0 +1,141 @@ +import pygame
+
+class DrawableObject(pygame.sprite.Sprite):
+
+ def __init__(self, images, textfileName, x = 0, y = 0):
+ pygame.sprite.Sprite.__init__(self)
+
+ self._images = []
+ self._origImages = []
+ for i in range(len(images)):
+ self._images.append(images[i].convert())
+ self._origImages.append(images[i].convert())
+
+ self._start = pygame.time.get_ticks()
+ self.image = self._images[0]
+ self._last_update = 0
+ self._frame = 0
+ self.animations = {}
+ self._current_anim = ""
+ self.rect = self.image.get_rect()
+ self.xPos = x
+ self.yPos = y
+ self.myAngle = 0
+ self.xSize = 40 # <--
+ self.ySize = 40 # <--
+ self.rect.topleft = (x,y)
+
+ if textfileName != '':
+
+ f = open(textfileName, 'r')
+ currentLine = f.readline()
+ while currentLine != '':
+
+ animValues = currentLine.split(",")
+ self.animations[animValues[0]] = [int(animValues[1]), int(animValues[2])]
+ currentLine = f.readline()
+
+ else:
+
+ self.animations["anim1"] = [0, len(self._images)]
+ self.goToAnim("anim1")
+
+ def repopulateImages(self, newImages):
+
+ self._images = []
+ self._origImages = []
+ for i in range(len(newImages)):
+ self._images.append(newImages[i].convert())
+ self._origImages.append(newImages[i].convert())
+
+ self.image = self._images[0]
+ self._frame = 0
+ self.xSize = 40 # <--
+ self.ySize = 40 # <--
+
+ def addImages(self, images):
+ self._images.extend(images)
+ self._origImages.extend(images)
+
+ def goToAnim(self, animName):
+ if self.animations.get(animName, 0) != 0:
+ self._current_anim = animName
+ self._frame = self.animations[animName][0]
+ self.image = self._images[self._frame]
+
+ def nudge(self, x, y):
+ self.xPos += x
+ self.yPos += y
+ self.rect.right += x
+ self.rect.top += y
+
+ def scale(self, x=None, y=None):
+ if type(x).__name__=='int': self.xSize = x
+ if type(y).__name__=='int': self.ySize = y
+
+ for i in range(len(self._images)):
+ self._origImages[i] = pygame.transform.scale(self._origImages[i], (self.xSize, self.ySize))
+ self._images[i] = self._origImages[i]
+
+ def fill(self, color):
+ for i in range(len(self._images)):
+ #print "filling with ", color
+ self._origImages[i].fill(color)
+ self._images[i].fill(color)
+
+ def getXSize(self):
+ return self.xSize
+
+ def getYSize(self):
+ return self.ySize
+
+ def rotate(self,angle):
+ self.myAngle += angle
+ for i in range(len(self._images)):
+ self._images[i] = pygame.transform.rotate(self._origImages[i], self.myAngle)
+
+ def getRotation(self):
+ return self.myAngle
+
+ def setPosition(self, x = None, y = None):
+ if type(x).__name__=='int': self.xPos = x
+ if type(y).__name__=='int': self.yPos = y
+ self.rect.topleft = (self.xPos, self.yPos)
+
+ def getXPos(self):
+ return self.xPos
+
+ def getYPos(self):
+ return self.yPos
+
+ def calcColorKey(self, x=0, y=0):
+ myColorKey = images[0].get_at((x,y))
+ setColorKey(myColorKey)
+
+ def makeTransparent(self, bool = True):
+
+ if bool == True:
+ self.image.fill((255,255,255,255))
+ else:
+ self._images[self._frame] = self._origImages[self._frame]
+ self.image = self._images[self._frame]
+
+ def setColorKey(self, aColor):
+ for i in range(len(self._images)):
+ self._images[i].set_colorkey(aColor)
+
+ def update(self, t=None):
+ timePassed = t + self._last_update
+
+ if (timePassed) > 200:
+
+ self.image = self._images[self._frame]
+ self._last_update = timePassed%1000
+ else:
+ self._last_update = timePassed
+
+ def nextFrame(self):
+ pass
+
+ def nextCurrentAnimFrame(self):
+ pass
diff --git a/devtools/Dave's Test Kit/DynamicDrawableObject.py b/devtools/Dave's Test Kit/DynamicDrawableObject.py new file mode 100644 index 0000000..9319c9e --- /dev/null +++ b/devtools/Dave's Test Kit/DynamicDrawableObject.py @@ -0,0 +1,71 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0):
+ self._delay = 1000/fps
+ DrawableObject.__init__(self, images, textfileName, x, y)
+
+ def addImages(self, images):
+ self._images.extend(images)
+
+ def setSpeed(self, xVelocity = None, yVelocity = None):
+ if xVelocity != None: self.xSpeed = xVelocity
+ if yVelocity != None: self.ySpeed = yVelocity
+
+ def getXSpeed(self):
+ return self.xSpeed
+
+ def getYSpeed(self):
+ return self.ySpeed
+
+ def getRectangle(self):
+ return self.rect
+
+ def move(self):
+ self.xPos += self.xSpeed
+ self.yPos += self.ySpeed
+ self.rect.right += self.xSpeed
+ self.rect.top += self.ySpeed
+
+ def update(self, t):
+ timePassed = t + self._last_update
+ if (timePassed) > self._delay:
+ if self._frame < self.animations.get(self._current_anim)[0] or self._frame > self.animations.get(self._current_anim)[1]:
+ self._frame = self.animations.get(self._current_anim)[0]
+
+ self._frame += timePassed/self._delay
+
+ while self._frame >= self.animations.get(self._current_anim)[1]:
+ framesPast = self._frame - self.animations.get(self._current_anim)[1]
+ self._frame = framesPast - 1 + self.animations.get(self._current_anim)[0]
+
+ self.image = self._images[self._frame]
+ self._last_update = timePassed%self._delay
+ else:
+ self._last_update = timePassed
+
+ def nextFrame(self):
+ self._frame += 1
+ if self._frame >= len(self._images):
+ framesPast = self._frame - len(self._images)
+ self._frame = framesPast
+
+ self.image = self._images[self._frame]
+
+ def nextCurrentAnimFrame(self):
+
+ for cnt in range(len(animations)):
+
+ if animations[cnt] == self._current_anim:
+ if self._frame < self.animations[self._current_anim][0] or self._frame > self.animations[self._current_anim][1]:
+ self._frame = self.animations[self._current_anim][0]
+
+ else: self._frame += 1
+
+ if self._frame > self.animations[self._current_anim][1]:
+ framesPast = self._frame - self.animations[self._current_anim][1]
+ self._frame = framesPast - 1 + self.animations[self._current_anim][0]
+
+ self.image = self._images[self._frame]
diff --git a/devtools/Dave's Test Kit/FontDirtyTest.py b/devtools/Dave's Test Kit/FontDirtyTest.py new file mode 100644 index 0000000..22a6661 --- /dev/null +++ b/devtools/Dave's Test Kit/FontDirtyTest.py @@ -0,0 +1,57 @@ +#! /usr/bin/env python
+import pygame
+from pygame.locals import *
+from time import time
+from Scene import Scene
+from DrawableObject import DrawableObject
+from DrawableFontObject import DrawableFontObject
+pygame.init()
+
+FRAME=500 #setting number of frames per trial
+screenWidth = 600 #screen width
+screenHeight = 400 #screen height
+numImages = 1 #number of copies of images
+maxTrial = 5 # multiple trials, but hard coded in this test
+dirtyList=[] #list for objects to be updated
+
+#print the height and width
+print "width,height",
+print screenWidth,
+print ",",
+print screenHeight
+
+screen = pygame.display.set_mode( [int(screenWidth),
+ int(screenHeight)] ) #Setting the screen size to the given size
+pygame.display.set_caption("Sprite Speed Test Window")
+background = pygame.image.load("Room.gif")#Loading my background image
+screen.blit(background,[0,0])#blitting my background to screen
+pygame.display.flip()#flipping screen
+
+for aTrial in range(maxTrial):
+ start = time()#starting timer
+
+ font = pygame.font.SysFont("cmr10", 100) #creating my font object
+ d = DrawableFontObject("hello world", font) #creating my DrawableFontObject object using my previously made font object
+
+ group1=Scene(d) #creating my scene
+ groups=[group1] #creating my array of scenes
+ #printing time to load images and stuff
+ print (time()-start) ,
+ print " -- Time to load"
+
+ #setting up timer stuff
+ clock = pygame.time.Clock()
+ clock.tick()
+ start = time()
+ #loop that goes through and upodates my objects
+ for frame in range(FRAME):
+ dirtyList=[]
+ d.changeText(str(frame))#updates my text for my DFO
+ for image in range(numImages):
+ groups[image].update(clock.get_time())#calls the update function for my DFO
+ clock.tick()#ticks clock
+ dirtyList.extend(groups[image].draw(screen))#adding stuff that has been updated to my dirty list
+
+ pygame.display.update(dirtyList)#updates the screen with the dirty list
+ for image in range(numImages):
+ groups[image].clear(screen, background)#clears stuff behind images based on given background image.
diff --git a/devtools/Dave's Test Kit/Room.gif b/devtools/Dave's Test Kit/Room.gif Binary files differnew file mode 100644 index 0000000..798ebf1 --- /dev/null +++ b/devtools/Dave's Test Kit/Room.gif diff --git a/devtools/Dave's Test Kit/Scene.py b/devtools/Dave's Test Kit/Scene.py new file mode 100644 index 0000000..7aec48c --- /dev/null +++ b/devtools/Dave's Test Kit/Scene.py @@ -0,0 +1,199 @@ +import pygame
+from pygame.sprite import RenderUpdates
+
+class Scene(pygame.sprite.RenderUpdates):
+
+ def __init__(self, sprites):
+
+ self._spritelist = []
+ self._spritelist.append([sprites, sprites.getXPos(), sprites.getYPos()])
+ RenderUpdates.__init__(self, sprites)
+
+ self.xPos = 0
+ self.yPos = 0
+ self.xSize = 0
+ self.ySize = 0
+
+ self.calcPosition()
+ self.calcSize()
+ self.setRelativePositions()
+
+ def calcPosition(self):
+
+ lowestX = 9000
+ lowestY = 9000
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+ if self._spritelist[cnt][0].getXPos() < lowestX: lowestX = self._spritelist[cnt][0].getXPos()
+ if self._spritelist[cnt][0].getYPos() < lowestY: lowestY = self._spritelist[cnt][0].getYPos()
+ cnt += 1
+
+ self.xPos = lowestX
+ self.yPos = lowestY
+
+ def calcSize(self):
+
+ highestX = 0
+ highestY = 0
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+ if (self._spritelist[cnt][0].getXPos() + self._spritelist[cnt][0].getXSize()) > highestX: highestX = self._spritelist[cnt][0].getXPos() + self._spritelist[cnt][0].getXSize()
+ if (self._spritelist[cnt][0].getYPos() + self._spritelist[cnt][0].getYSize()) > highestY: highestY = self._spritelist[cnt][0].getYPos() + self._spritelist[cnt][0].getYSize()
+ cnt += 1
+
+ self.xSize = highestX - self.xPos
+ self.ySize = highestY - self.yPos
+
+ def addObject(self, newDrawableObject):
+ RenderUpdates.add_internal(self, newDrawableObject)
+ self._spritelist.append([newDrawableObject, newDrawableObject.getXPos(), newDrawableObject.getYPos()])
+
+ def addObjects(self, newDrawableObjects):
+ for sprite in newDrawableObjects:
+ RenderUpdates.add_internal(self, sprite)
+ self._spritelist.append([sprite, sprite.getXPos(), sprite.getYPos()])
+
+ def setRelativePositions(self):
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+ self._spritelist[cnt][1] = self._spritelist[cnt][0].getXPos() - self.xPos
+ self._spritelist[cnt][2] = self._spritelist[cnt][0].getYPos() - self.yPos
+ cnt += 1
+
+ def removeObject(self, sprite):
+
+ for i in self._spritelist:
+ if i[0] == sprite:
+ self._spritelist.remove(i)
+ break
+ RenderUpdates.remove_internal(self, sprite)
+
+ def getObject(self, index):
+
+ if index < len(self._spritelist):
+ return self._spritelist[index][0]
+
+ def getListSize(self):
+
+ return len(self._spritelist)
+
+ def getList(self):
+
+ return list(self._spritelist)
+
+ def moveObjects(self):
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+
+ self._spritelist[cnt][0].move()
+ cnt += 1
+
+ self.calcPosition()
+ self.calcSize()
+ self.setRelativePositions()
+
+ def moveScene(self, xNudge = 0, yNudge = 0):
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+
+ self._spritelist[cnt][0].nudge(xNudge, yNudge)
+ cnt += 1
+
+ self.calcPosition()
+
+ def setPosition(self, newXPos = None, newYPos = None):
+
+ if newXPos != None: self.xPos = newXPos
+ if newYPos != None: self.yPos = newYPos
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+
+ self._spritelist[cnt][0].setPosition(self.xPos + self._spritelist[cnt][1], self.yPos + self._spritelist[cnt][2])
+ cnt += 1
+
+ def getXPos(self):
+ return self.xPos
+
+ def getYPos(self):
+ return self.yPos
+
+ def getXSize(self):
+ return self.xSize
+
+ def getYSize(self):
+ return self.ySize
+
+ def scaleObjects(self, newXSize = None, newYSize = None):
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+ self._spritelist[cnt][0].scale(newXSize, newYSize)
+ cnt += 1
+
+ def scaleScene(self, newXSize = None, newYSize = None):
+
+ self.calcPosition()
+ self.calcSize()
+
+ xScale = 1
+ yScale = 1
+
+ if newXSize != None: xScale = (newXSize * 1.0)/self.xSize
+ if newYSize != None: yScale = (newYSize * 1.0)/self.ySize
+
+ cnt = 0
+ while cnt < len(self._spritelist):
+ self._spritelist[cnt][0].scale(xScale * self._spritelist[cnt][0].getXSize(), yScale * self._spritelist[cnt][0].getYSize())
+ self._spritelist[cnt][1] = xScale * self._spritelist[cnt][1]
+ self._spritelist[cnt][2] = yScale * self._spritelist[cnt][2]
+ cnt += 1
+
+ self.calcPosition()
+ self.calcSize()
+ self.setPosition()
+
+ def update(self, t):
+
+ for s in self._spritelist: s[0].update(t);
+
+ def draw(self, surface):
+ spritedict = self.spritedict
+ surface_blit = surface.blit
+ dirty = self.lostsprites
+ self.lostsprites = []
+ dirty_append = dirty.append
+ for s in self._spritelist:
+ r = spritedict[s[0]]
+ newrect = surface_blit(s[0].image, s[0].rect)
+ if r is 0:
+ dirty_append(newrect)
+ else:
+ if newrect.colliderect(r):
+ dirty_append(newrect.union(r))
+ else:
+ dirty_append(newrect)
+ dirty_append(r)
+ spritedict[s[0]] = newrect
+ return dirty
+
+ def drawEntireScene(self, surface):
+ spritedict = self.spritedict
+ surface_blit = surface.blit
+ dirty = self.lostsprites
+ self.lostsprites = []
+ dirty_append = dirty.append
+ for s in self._spritelist:
+ dirty_append(spritedict[s[0]])
+ dirty_append(surface_blit(s[0].image, s[0].rect))
+ return dirty
+
+ def nextFrame(self):
+ for cnt in range(len(self._spritelist)):
+
+ self._spritelist[cnt][0].nextFrame()
|