Browse Source

added dlc

master
Graham Northup 5 years ago
parent
commit
c0192f31b4
Signed by: grissess GPG Key ID: 5D000E6F539376FB
  1. 1
      .gitignore
  2. 1
      colyoel.txt
  3. 13
      senpai.py
  4. 40
      senpai_simulator.py
  5. 15
      twilight.py
  6. BIN
      twilight_bkgd.png
  7. BIN
      twilight_bkgd.xcf
  8. BIN
      twilight_eye.xcf
  9. BIN
      twilight_eye_l.png
  10. BIN
      twilight_eye_r.png
  11. BIN
      twilight_eye_r.xcf
  12. BIN
      twilight_eyemask.png

1
.gitignore

@ -0,0 +1 @@
__pycache__

1
colyoel.txt

@ -0,0 +1 @@
yoel iscool :) :

13
senpai.py

@ -0,0 +1,13 @@
SIZE = (1480, 1080)
BACKGROUND_PATH = 'senpai_bkgd.png'
LEFT_EYE_PATH = 'senpai_eye.png'
RIGHT_EYE_PATH = 'senpai_eye.png'
EYE_MASK_PATH = 'senpai_eyemask.png'
SCLERA_COLOR = (255, 255, 255, 255)
LE_CEN = (878, 552)
RE_CEN = (631, 588)
LE_DEL = (50, 20)
RE_DEL = (40, 20)

40
senpai_simulator.py

@ -1,8 +1,13 @@
import pygame, time, os, random
import pygame, time, os, random, sys
pygame.init()
if len(sys.argv) < 2:
sys.argv.append('senpai')
values = __import__(sys.argv[1])
#disp = pygame.display.set_mode((1480, 1080), pygame.FULLSCREEN)
disp = pygame.display.set_mode((1480, 1080))
disp = pygame.display.set_mode(values.SIZE)
snd = pygame.mixer.Sound('aaa.flac')
TRIGGERED = False
@ -15,20 +20,27 @@ print(joys)
for joy in joys:
joy.init()
BKGD = pygame.image.load('senpai_bkgd.png').convert_alpha()
EYE_FULL = pygame.image.load('senpai_eye.png')
EYE = EYE_FULL.convert_alpha()
EYE_MASK = pygame.image.load('senpai_eyemask.png').convert_alpha()
BKGD = pygame.image.load(values.BACKGROUND_PATH).convert_alpha()
LEFT_EYE_FULL = pygame.image.load(values.LEFT_EYE_PATH)
LEFT_EYE = LEFT_EYE_FULL.convert_alpha()
if hasattr(values, 'LE_SIZE'):
LEFT_EYE = pygame.transform.smoothscale(LEFT_EYE, values.LE_SIZE)
RIGHT_EYE_FULL = pygame.image.load(values.RIGHT_EYE_PATH)
RIGHT_EYE = RIGHT_EYE_FULL.convert_alpha()
if hasattr(values, 'RE_SIZE'):
RIGHT_EYE = pygame.transform.smoothscale(RIGHT_EYE, values.RE_SIZE)
EYE_MASK = pygame.image.load(values.EYE_MASK_PATH).convert_alpha()
INV_MASK = pygame.Surface(EYE_MASK.get_size(), pygame.SRCALPHA)
INV_MASK.fill((255, 255, 255, 255))
INV_MASK.fill(values.SCLERA_COLOR)
INV_MASK.blit(EYE_MASK, (0, 0), None, pygame.BLEND_RGBA_SUB)
##EYE_SF = 0.15
##EYE = pygame.transform.smoothscale(EYE_FULL, list(map(int, (EYE_SF * EYE_FULL.get_width(), EYE_SF * EYE_FULL.get_height())))).convert_alpha()
EYE_OFF = (EYE.get_width() / 2, EYE.get_height() / 2)
LE_CEN = (878, 552)
RE_CEN = (631, 588)
LE_DEL = (50, 20)
RE_DEL = (40, 20)
LEFT_EYE_OFF = (LEFT_EYE.get_width() / 2, LEFT_EYE.get_height() / 2)
RIGHT_EYE_OFF = (RIGHT_EYE.get_width() / 2, RIGHT_EYE.get_height() / 2)
LE_CEN = values.LE_CEN
RE_CEN = values.RE_CEN
LE_DEL = values.LE_DEL
RE_DEL = values.RE_DEL
msk_tmp = EYE_MASK.copy().convert_alpha()
bkd_tmp = INV_MASK.copy().convert_alpha()
bkd_tmp.blit(INV_MASK, (0, 0))
@ -72,8 +84,8 @@ while True:
##pygame.draw.circle(disp, (255, 255, 255), (int(w4 * x2 + w4 + w2), int(h2 * y2 + h2)), 15)
#msk_tmp.blit(EYE_MASK, (0, 0))
msk_tmp.fill(BKD_COL)
msk_tmp.blit(EYE, (RE_CEN[0] + int(RE_DEL[0] * x1) - EYE_OFF[0], RE_CEN[1] + int(RE_DEL[1] * y1) - EYE_OFF[1]), None, pygame.BLEND_RGBA_MULT)
msk_tmp.blit(EYE, (LE_CEN[0] + int(LE_DEL[0] * x2) - EYE_OFF[0], LE_CEN[1] + int(LE_DEL[1] * y2) - EYE_OFF[1]), None, pygame.BLEND_RGBA_MULT)
msk_tmp.blit(RIGHT_EYE, (RE_CEN[0] + int(RE_DEL[0] * x1) - RIGHT_EYE_OFF[0], RE_CEN[1] + int(RE_DEL[1] * y1) - RIGHT_EYE_OFF[1]), None, pygame.BLEND_RGBA_MULT)
msk_tmp.blit(LEFT_EYE, (LE_CEN[0] + int(LE_DEL[0] * x2) - LEFT_EYE_OFF[0], LE_CEN[1] + int(LE_DEL[1] * y2) - LEFT_EYE_OFF[1]), None, pygame.BLEND_RGBA_MULT)
disp.blit(msk_tmp, (0, 0))
disp.blit(bkd_tmp, (0, 0))
pygame.display.flip()

15
twilight.py

@ -0,0 +1,15 @@
SIZE = (1280, 720)
BACKGROUND_PATH = 'twilight_bkgd.png'
RIGHT_EYE_PATH = 'twilight_eye_l.png'
LEFT_EYE_PATH = 'twilight_eye_r.png'
EYE_MASK_PATH = 'twilight_eyemask.png'
SCLERA_COLOR = (255, 255, 255, 255)
RE_CEN = (469, 320)
LE_CEN = (640, 360)
RE_DEL = (25, 50)
LE_DEL = (40, 50)
RE_SIZE = (72, 198)
LE_SIZE = (145, 198)

BIN
twilight_bkgd.png

After

Width: 1280  |  Height: 720  |  Size: 353 KiB

BIN
twilight_bkgd.xcf

BIN
twilight_eye.xcf

BIN
twilight_eye_l.png

After

Width: 607  |  Height: 830  |  Size: 116 KiB

BIN
twilight_eye_r.png

After

Width: 607  |  Height: 830  |  Size: 117 KiB

BIN
twilight_eye_r.xcf

BIN
twilight_eyemask.png

After

Width: 1280  |  Height: 720  |  Size: 9.5 KiB

Loading…
Cancel
Save