Browse Source

added dlc

Graham Northup 2 years ago
parent
commit
c0192f31b4
Signed by: Graham Northup <grissess@nexusg.org> GPG Key ID: 5D000E6F539376FB
12 changed files with 56 additions and 14 deletions
  1. 1
    0
      .gitignore
  2. 1
    0
      colyoel.txt
  3. 13
    0
      senpai.py
  4. 26
    14
      senpai_simulator.py
  5. 15
    0
      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
- 0
.gitignore View File

@@ -0,0 +1 @@
1
+__pycache__

+ 1
- 0
colyoel.txt View File

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

+ 13
- 0
senpai.py View File

@@ -0,0 +1,13 @@
1
+SIZE = (1480, 1080)
2
+
3
+BACKGROUND_PATH = 'senpai_bkgd.png'
4
+LEFT_EYE_PATH = 'senpai_eye.png'
5
+RIGHT_EYE_PATH = 'senpai_eye.png'
6
+EYE_MASK_PATH = 'senpai_eyemask.png'
7
+
8
+SCLERA_COLOR = (255, 255, 255, 255)
9
+
10
+LE_CEN = (878, 552)
11
+RE_CEN = (631, 588)
12
+LE_DEL = (50, 20)
13
+RE_DEL = (40, 20)

+ 26
- 14
senpai_simulator.py View File

@@ -1,8 +1,13 @@
1
-import pygame, time, os, random
1
+import pygame, time, os, random, sys
2 2
 pygame.init()
3 3
 
4
+if len(sys.argv) < 2:
5
+    sys.argv.append('senpai')
6
+
7
+values = __import__(sys.argv[1])
8
+
4 9
 #disp = pygame.display.set_mode((1480, 1080), pygame.FULLSCREEN)
5
-disp = pygame.display.set_mode((1480, 1080))
10
+disp = pygame.display.set_mode(values.SIZE)
6 11
 
7 12
 snd = pygame.mixer.Sound('aaa.flac')
8 13
 TRIGGERED = False
@@ -15,20 +20,27 @@ print(joys)
15 20
 for joy in joys:
16 21
     joy.init()
17 22
 
18
-BKGD = pygame.image.load('senpai_bkgd.png').convert_alpha()
19
-EYE_FULL = pygame.image.load('senpai_eye.png')
20
-EYE = EYE_FULL.convert_alpha()
21
-EYE_MASK = pygame.image.load('senpai_eyemask.png').convert_alpha()
23
+BKGD = pygame.image.load(values.BACKGROUND_PATH).convert_alpha()
24
+LEFT_EYE_FULL = pygame.image.load(values.LEFT_EYE_PATH)
25
+LEFT_EYE = LEFT_EYE_FULL.convert_alpha()
26
+if hasattr(values, 'LE_SIZE'):
27
+    LEFT_EYE = pygame.transform.smoothscale(LEFT_EYE, values.LE_SIZE)
28
+RIGHT_EYE_FULL = pygame.image.load(values.RIGHT_EYE_PATH)
29
+RIGHT_EYE = RIGHT_EYE_FULL.convert_alpha()
30
+if hasattr(values, 'RE_SIZE'):
31
+    RIGHT_EYE = pygame.transform.smoothscale(RIGHT_EYE, values.RE_SIZE)
32
+EYE_MASK = pygame.image.load(values.EYE_MASK_PATH).convert_alpha()
22 33
 INV_MASK = pygame.Surface(EYE_MASK.get_size(), pygame.SRCALPHA)
23
-INV_MASK.fill((255, 255, 255, 255))
34
+INV_MASK.fill(values.SCLERA_COLOR)
24 35
 INV_MASK.blit(EYE_MASK, (0, 0), None, pygame.BLEND_RGBA_SUB)
25 36
 ##EYE_SF = 0.15
26 37
 ##EYE = pygame.transform.smoothscale(EYE_FULL, list(map(int, (EYE_SF * EYE_FULL.get_width(), EYE_SF * EYE_FULL.get_height())))).convert_alpha()
27
-EYE_OFF = (EYE.get_width() / 2, EYE.get_height() / 2)
28
-LE_CEN = (878, 552)
29
-RE_CEN = (631, 588)
30
-LE_DEL = (50, 20)
31
-RE_DEL = (40, 20)
38
+LEFT_EYE_OFF = (LEFT_EYE.get_width() / 2, LEFT_EYE.get_height() / 2)
39
+RIGHT_EYE_OFF = (RIGHT_EYE.get_width() / 2, RIGHT_EYE.get_height() / 2)
40
+LE_CEN = values.LE_CEN
41
+RE_CEN = values.RE_CEN
42
+LE_DEL = values.LE_DEL
43
+RE_DEL = values.RE_DEL
32 44
 msk_tmp = EYE_MASK.copy().convert_alpha()
33 45
 bkd_tmp = INV_MASK.copy().convert_alpha()
34 46
 bkd_tmp.blit(INV_MASK, (0, 0))
@@ -72,8 +84,8 @@ while True:
72 84
     ##pygame.draw.circle(disp, (255, 255, 255), (int(w4 * x2 + w4 + w2), int(h2 * y2 + h2)), 15)
73 85
     #msk_tmp.blit(EYE_MASK, (0, 0))
74 86
     msk_tmp.fill(BKD_COL)
75
-    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)
76
-    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)
87
+    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)
88
+    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)
77 89
     disp.blit(msk_tmp, (0, 0))
78 90
     disp.blit(bkd_tmp, (0, 0))
79 91
     pygame.display.flip()

+ 15
- 0
twilight.py View File

@@ -0,0 +1,15 @@
1
+SIZE = (1280, 720)
2
+
3
+BACKGROUND_PATH = 'twilight_bkgd.png'
4
+RIGHT_EYE_PATH = 'twilight_eye_l.png'
5
+LEFT_EYE_PATH = 'twilight_eye_r.png'
6
+EYE_MASK_PATH = 'twilight_eyemask.png'
7
+
8
+SCLERA_COLOR = (255, 255, 255, 255)
9
+
10
+RE_CEN = (469, 320)
11
+LE_CEN = (640, 360)
12
+RE_DEL = (25, 50)
13
+LE_DEL = (40, 50)
14
+RE_SIZE = (72, 198)
15
+LE_SIZE = (145, 198)

BIN
twilight_bkgd.png View File


BIN
twilight_bkgd.xcf View File


BIN
twilight_eye.xcf View File


BIN
twilight_eye_l.png View File


BIN
twilight_eye_r.png View File


BIN
twilight_eye_r.xcf View File


BIN
twilight_eyemask.png View File


Loading…
Cancel
Save