############################################
#Tool To show and test my animations #
#Written By Derek Mcdonald #
############################################
#Released under the following liscense: #
# #
# i dont give a shit what you do. #
############################################
import pygame, os, sys
from pygame.locals import*
#all of the global variables used
global Frame, CurrentFrame
#variable to index our list
CurrentFrame = 0
#list of our frames in the Frames folder, add as many as you whould like
Frame = ["Frame1.png","Frame2.png","Frame3.png"]
#clock to keep track of shit
pygame.time.Clock()
#screen crap
global screen
screen = pygame.display.set_mode((640,480))
#loop variable
loop = 1
#MainLoop
while loop == 1:
#refreshes entire display
pygame.display.flip()
#Change Frame to next frame and checks to see if its the last frame, if so reset the frames
if CurrentFrame <= 3:
CurrentFrame = 0
else:
CurrentFrame = CurrentFrame + 1
#whats a given time
pygame.time.delay(10)
#load our frames to memory
FrameData = os.path.join ("Frames",Frame[CurrentFrame])
Frame = pygame.image.load(FrameData)
#Draw The Frame
screen.blit (Frame, (320,240))
#check for input
for event in pygame.event.get():
if event.type == QUIT:
exit()