#!/usr/bin/env python

# Author: Ryan Balsdon <*****@*****.**>
#
# I dedicate any and all copyright interest in this software to the
# public domain. I make this dedication for the benefit of the public at
# large and to the detriment of my heirs and successors. I intend this
# dedication to be an overt act of relinquishment in perpetuity of all
# present and future rights to this software under copyright law.

import vile

bsfLogo = vile.VileFrame()
bsfLogo.loadTGA("bsf.tga")

rows, cols = vile.getScreenSize()
bsfLogo.render(rows, cols)
Exemple #2
0
import vile, time, math

vileLogo = vile.VileFrame()
vileText = vile.VileFrame()
vileVignette = vile.VileFrame()
vileLogo.loadTGA("bsf-logo.tga")
vileText.loadTGA("bsf-text.tga")
vileVignette.loadTGA("vignette.tga")
vileVignette.darken(0.2)

def smoothMotion(percent):
    return math.sin(percent*math.pi/2.0)


rows, cols = vile.getScreenSize() #saving the screen size now because this function is too slow to run every frame
frameDelay = 1.0/60.0 # 30 fps is high enough for a splash screen
currentTime = 0.0
animationLength = 2.0

while (currentTime < animationLength):
    animationProgress = currentTime/animationLength
    
    #making copies of everything so I can modify the layers
    vignette = vileVignette.copy()
    logo = vileLogo.copy()
    text = vileText.copy()
    
    #animating
    vignette.darken(smoothMotion(animationProgress))
    logo.scale(smoothMotion(animationProgress))