aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstage7 <stage7@stg7.net>2022-09-17 14:58:11 +0200
committerstage7 <stage7@stg7.net>2022-09-17 14:58:11 +0200
commita95498b9d9072d4ce6d69a0b3138c85b73d18164 (patch)
treef5324961da6a12295718739196a0879c9f70de03
parentfe302d74045dbb534ffdde9ee74b56eff3b88f6f (diff)
downloadopenguilion-main.tar.gz
openguilion-main.tar.bz2
openguilion-main.zip
Application paletteHEADmain
-rw-r--r--openguilion/caseResolution.py76
-rw-r--r--openguilion/intruderAlert.py76
-rw-r--r--openguilion/lost.py6
-rw-r--r--openguilion/mentalToxicity.py62
-rw-r--r--openguilion/openguilionCommon.py9
-rw-r--r--openguilion/phase01To17.py88
-rw-r--r--openguilion/stateEmergency.py54
7 files changed, 190 insertions, 181 deletions
diff --git a/openguilion/caseResolution.py b/openguilion/caseResolution.py
index 353fdee..f88111f 100644
--- a/openguilion/caseResolution.py
+++ b/openguilion/caseResolution.py
@@ -12,84 +12,84 @@ surfaceCaseMelchiorText = pygame.Surface((180, 180), pygame.SRCALPHA, 32)
surfaceCaseCasperText = pygame.Surface((180, 180), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgCaseJap = _.fontMatisse.render("提訴", True, (228, 114, 0)).convert_alpha()
+imgCaseJap = _.fontMatisse.render("提訴", True, _.cOrange).convert_alpha()
imgCaseJap = pygame.transform.smoothscale(imgCaseJap, (round(imgCaseJap.get_size()[0] * 2), round(imgCaseJap.get_size()[1] * 1.5)))
-imgResoJap = _.fontMatisse.render("決議", True, (228, 114, 0)).convert_alpha()
+imgResoJap = _.fontMatisse.render("決議", True, _.cOrange).convert_alpha()
imgResoJap = pygame.transform.smoothscale(imgResoJap, (round(imgResoJap.get_size()[0] * 2), round(imgResoJap.get_size()[1] * 1.5)))
-imgDelibJap = _.fontMatisse.render("審議中", True, (212, 19, 13)).convert_alpha()
+imgDelibJap = _.fontMatisse.render("審議中", True, _.cRed).convert_alpha()
imgDelibJap = pygame.transform.smoothscale(imgDelibJap, (round(imgDelibJap.get_size()[0] * 0.85), round(imgDelibJap.get_size()[1] * 1)))
-imgMagi = _.fontMatisse.render("MAGI", True, (228, 114, 0)).convert_alpha()
+imgMagi = _.fontMatisse.render("MAGI", True, _.cOrange).convert_alpha()
imgMagi = pygame.transform.smoothscale(imgMagi, (round(imgMagi.get_size()[0] * 0.65), round(imgMagi.get_size()[1] * 0.55)))
-imgMelchior = _.fontHelv.render("MELCHIOR", True, (0, 0, 0)).convert_alpha()
+imgMelchior = _.fontHelv.render("MELCHIOR", True, _.cBlack).convert_alpha()
imgMelchior = pygame.transform.smoothscale(imgMelchior, (round(imgMelchior.get_size()[0] * 0.5), round(imgMelchior.get_size()[1] * 0.5)))
-imgCasper = _.fontHelv.render("CASPER", True, (0, 0, 0)).convert_alpha()
+imgCasper = _.fontHelv.render("CASPER", True, _.cBlack).convert_alpha()
imgCasper = pygame.transform.smoothscale(imgCasper, (round(imgCasper.get_size()[0] * 0.5), round(imgCasper.get_size()[1] * 0.5)))
-imgBalthasar = _.fontHelv.render("BALTHASAR", True, (0, 0, 0)).convert_alpha()
+imgBalthasar = _.fontHelv.render("BALTHASAR", True, _.cBlack).convert_alpha()
imgBalthasar = pygame.transform.smoothscale(imgBalthasar, (round(imgBalthasar.get_size()[0] * 0.5), round(imgBalthasar.get_size()[1] * 0.5)))
-imgCase1 = _.fontHelv.render("1", True, (0, 0, 0)).convert_alpha()
+imgCase1 = _.fontHelv.render("1", True, _.cBlack).convert_alpha()
imgCase1 = pygame.transform.smoothscale(imgCase1, (round(imgCase1.get_size()[0] * 2), round(imgCase1.get_size()[1] * 1.4)))
-imgCase2 = _.fontHelv.render("2", True, (0, 0, 0)).convert_alpha()
+imgCase2 = _.fontHelv.render("2", True, _.cBlack).convert_alpha()
imgCase2 = pygame.transform.smoothscale(imgCase2, (round(imgCase2.get_size()[0] * 2), round(imgCase2.get_size()[1] * 1.4)))
-imgCase3 = _.fontHelv.render("3", True, (0, 0, 0)).convert_alpha()
+imgCase3 = _.fontHelv.render("3", True, _.cBlack).convert_alpha()
imgCase3 = pygame.transform.smoothscale(imgCase3, (round(imgCase3.get_size()[0] * 2), round(imgCase3.get_size()[1] * 1.4)))
-pygame.draw.rect(surfaceCaseResolutionBG, (228, 114, 0), (12, 12, _.w - 24, _.h - 24))
-pygame.draw.rect(surfaceCaseResolutionBG, (0, 0, 0), (20, 20, _.w - 40, _.h - 40))
+pygame.draw.rect(surfaceCaseResolutionBG, _.cOrange, (12, 12, _.w - 24, _.h - 24))
+pygame.draw.rect(surfaceCaseResolutionBG, _.cBlack, (20, 20, _.w - 40, _.h - 40))
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (70, 37, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (70, 45, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (70, 152, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (70, 160, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (654, 37, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (654, 45, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (654, 152, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (101, 231, 151), (654, 160, 294, 5), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (212, 19, 13), (752, 187, 192, 77), 2)
-pygame.draw.rect(surfaceCaseResolutionBG, (212, 19, 13), (756, 191, 184, 69), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (70, 37, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (70, 45, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (70, 152, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (70, 160, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (654, 37, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (654, 45, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (654, 152, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cLightGreen, (654, 160, 294, 5), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cRed, (752, 187, 192, 77), 2)
+pygame.draw.rect(surfaceCaseResolutionBG, _.cRed, (756, 191, 184, 69), 2)
surfaceCaseResolutionBG.blit(imgCaseJap, (100, 55))
surfaceCaseResolutionBG.blit(imgResoJap, (682, 55))
surfaceCaseResolutionBG.blit(imgDelibJap, (772, 195))
-pygame.draw.circle(surfaceCaseResolutionBG, (228, 114, 0), (510, 283), 175, 3)
+pygame.draw.circle(surfaceCaseResolutionBG, _.cOrange, (510, 283), 175, 3)
surfaceCaseResolutionBG.blit(imgMagi, (455, 255))
for i in range(len("CODE:132")):
- tempLetter = _.fontHelv.render("CODE:132"[i], True, (228, 114, 0))
+ tempLetter = _.fontHelv.render("CODE:132"[i], True, _.cOrange)
tempWidth = int(tempLetter.get_size()[0] * 40 / tempLetter.get_size()[1])
surfaceCaseResolutionBG.blit(pygame.transform.scale(tempLetter.convert_alpha(), (tempWidth, 55)), (89 + i * 24 + 6 - (tempWidth / 2), 170))
for i in range(len("FILE:MAGI_SYS")):
- tempLetter = _.fontHelv.render("FILE:MAGI_SYS"[i], True, (228, 114, 0))
+ tempLetter = _.fontHelv.render("FILE:MAGI_SYS"[i], True, _.cOrange)
tempWidth = int(tempLetter.get_size()[0] * 20 / tempLetter.get_size()[1])
surfaceCaseResolutionBG.blit(pygame.transform.scale(tempLetter.convert_alpha(), (tempWidth, 20)), (84 + i * 12 + 6 - (tempWidth / 2), 230))
for i in range(len("EXTENTION:2048")):
- tempLetter = _.fontHelv.render("EXTENTION:2048"[i], True, (228, 114, 0))
+ tempLetter = _.fontHelv.render("EXTENTION:2048"[i], True, _.cOrange)
tempWidth = int(tempLetter.get_size()[0] * 20 / tempLetter.get_size()[1])
surfaceCaseResolutionBG.blit(pygame.transform.scale(tempLetter.convert_alpha(), (tempWidth, 20)), (84 + i * 12 + 6 - (tempWidth / 2), 252))
for i in range(len("EX_MODE:ON")):
- tempLetter = _.fontHelv.render("EX_MODE:ON"[i], True, (228, 114, 0))
+ tempLetter = _.fontHelv.render("EX_MODE:ON"[i], True, _.cOrange)
tempWidth = int(tempLetter.get_size()[0] * 20 / tempLetter.get_size()[1])
surfaceCaseResolutionBG.blit(pygame.transform.scale(tempLetter.convert_alpha(), (tempWidth, 20)), (84 + i * 12 + 6 - (tempWidth / 2), 274))
for i in range(len("PRIORITY:A__")):
- tempLetter = _.fontHelv.render("PRIORITY:A__"[i], True, (228, 114, 0))
+ tempLetter = _.fontHelv.render("PRIORITY:A__"[i], True, _.cOrange)
tempWidth = int(tempLetter.get_size()[0] * 20 / tempLetter.get_size()[1])
surfaceCaseResolutionBG.blit(pygame.transform.scale(tempLetter.convert_alpha(), (tempWidth, 20)), (84 + i * 12 + 6 - (tempWidth / 2), 296))
def caseResolution(animTime):
- _.screen.fill((0, 0, 0))
+ _.screen.fill(_.cBlack)
surfaceCaseResolution.fill((0, 0, 0, 0))
surfaceCaseMelchior.fill((0, 0, 0, 0))
surfaceCaseResolution.blit(surfaceCaseResolutionBG, (0, 0))
- pygame.draw.rect(surfaceCaseResolution, (0, 0, 0), (422, 37, 180, 180))
- pygame.draw.rect(surfaceCaseResolution, (228, 114, 0), (420, 35, 184, 184), 3)
+ pygame.draw.rect(surfaceCaseResolution, _.cBlack, (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseResolution, _.cOrange, (420, 35, 184, 184), 3)
if random.randint(0, 1) == 1:
- pygame.draw.rect(surfaceCaseResolution, (101, 231, 151), (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseResolution, _.cLightGreen, (422, 37, 180, 180))
surfaceCaseResolution.blit(imgBalthasar, (437, 179))
surfaceCaseResolution.blit(imgCase2, (486, 51))
- pygame.draw.rect(surfaceCaseMelchior, (0, 0, 0), (422, 37, 180, 180))
- pygame.draw.rect(surfaceCaseMelchior, (228, 114, 0), (420, 35, 184, 184), 3)
+ pygame.draw.rect(surfaceCaseMelchior, _.cBlack, (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseMelchior, _.cOrange, (420, 35, 184, 184), 3)
if random.randint(0, 1) == 1:
- pygame.draw.rect(surfaceCaseMelchior, (101, 231, 151), (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseMelchior, _.cLightGreen, (422, 37, 180, 180))
surfaceCaseMelchiorText.blit(imgMelchior, (24, 19))
surfaceCaseMelchiorText.blit(imgCase1, (68, 90))
melchiorTextRotated = pygame.transform.rotate(surfaceCaseMelchiorText, 180)
@@ -97,10 +97,10 @@ def caseResolution(animTime):
melchiorRotated = pygame.transform.rotate(surfaceCaseMelchior, 240)
surfaceCaseResolution.blit(melchiorRotated, ((1024 - melchiorRotated.get_rect()[2]) / 2, (566 - melchiorRotated.get_rect()[3]) / 2))
- pygame.draw.rect(surfaceCaseCasper, (0, 0, 0), (422, 37, 180, 180))
- pygame.draw.rect(surfaceCaseCasper, (228, 114, 0), (420, 35, 184, 184), 3)
+ pygame.draw.rect(surfaceCaseCasper, _.cBlack, (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseCasper, _.cOrange, (420, 35, 184, 184), 3)
if random.randint(0, 1) == 1:
- pygame.draw.rect(surfaceCaseCasper, (101, 231, 151), (422, 37, 180, 180))
+ pygame.draw.rect(surfaceCaseCasper, _.cLightGreen, (422, 37, 180, 180))
surfaceCaseCasperText.blit(imgCasper, (36, 19))
surfaceCaseCasperText.blit(imgCase3, (66, 90))
casperTextRotated = pygame.transform.rotate(surfaceCaseCasperText, 180)
diff --git a/openguilion/intruderAlert.py b/openguilion/intruderAlert.py
index d7c4aed..b5e79b9 100644
--- a/openguilion/intruderAlert.py
+++ b/openguilion/intruderAlert.py
@@ -10,38 +10,38 @@ surfaceIntruderAlertBG = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
surfaceIntruderAlertOver = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgUnidentInt = _.fontHelv.render("UNIDENTIFIED INTRUDER", True, (228, 114, 0)).convert_alpha()
+imgUnidentInt = _.fontHelv.render("UNIDENTIFIED INTRUDER", True, _.cOrange).convert_alpha()
imgUnidentInt = pygame.transform.smoothscale(imgUnidentInt, (round(imgUnidentInt.get_size()[0] * 0.6), round(imgUnidentInt.get_size()[1] * 1)))
imgUnidentInt = pygame.transform.rotate(imgUnidentInt, 270)
-imgSubcomp = _.fontHelv.render("SUBCOMPUTER #1", True, (228, 114, 0)).convert_alpha()
+imgSubcomp = _.fontHelv.render("SUBCOMPUTER #1", True, _.cOrange).convert_alpha()
imgSubcomp = pygame.transform.smoothscale(imgSubcomp, (round(imgSubcomp.get_size()[0] * 0.6), round(imgSubcomp.get_size()[1] * 0.65)))
-imgIntAlert = _.fontHelv.render("INTRUDER ALERT", True, (228, 114, 0)).convert_alpha()
+imgIntAlert = _.fontHelv.render("INTRUDER ALERT", True, _.cOrange).convert_alpha()
imgIntAlert = pygame.transform.smoothscale(imgIntAlert, (round(imgIntAlert.get_size()[0] * 0.85), round(imgIntAlert.get_size()[1] * 1.6)))
-imgPartition = _.fontHelv.render("PARTITION", True, (228, 114, 0)).convert_alpha()
+imgPartition = _.fontHelv.render("PARTITION", True, _.cOrange).convert_alpha()
imgPartition = pygame.transform.smoothscale(imgPartition, (round(imgPartition.get_size()[0] * 0.3), round(imgPartition.get_size()[1] * 0.5)))
-imgInt1 = _.fontHelv.render("#1", True, (228, 114, 0)).convert_alpha()
+imgInt1 = _.fontHelv.render("#1", True, _.cOrange).convert_alpha()
imgInt1 = pygame.transform.smoothscale(imgInt1, (round(imgInt1.get_size()[0] * 0.5), round(imgInt1.get_size()[1] * 0.5)))
-imgInt2 = _.fontHelv.render("#2", True, (228, 114, 0)).convert_alpha()
+imgInt2 = _.fontHelv.render("#2", True, _.cOrange).convert_alpha()
imgInt2 = pygame.transform.smoothscale(imgInt2, (round(imgInt2.get_size()[0] * 0.5), round(imgInt2.get_size()[1] * 0.5)))
-imgInt3 = _.fontHelv.render("#3", True, (228, 114, 0)).convert_alpha()
+imgInt3 = _.fontHelv.render("#3", True, _.cOrange).convert_alpha()
imgInt3 = pygame.transform.smoothscale(imgInt3, (round(imgInt3.get_size()[0] * 0.5), round(imgInt3.get_size()[1] * 0.5)))
-imgInt4 = _.fontHelv.render("#4", True, (228, 114, 0)).convert_alpha()
+imgInt4 = _.fontHelv.render("#4", True, _.cOrange).convert_alpha()
imgInt4 = pygame.transform.smoothscale(imgInt4, (round(imgInt4.get_size()[0] * 0.5), round(imgInt4.get_size()[1] * 0.5)))
-imgInt5 = _.fontHelv.render("#5", True, (228, 114, 0)).convert_alpha()
+imgInt5 = _.fontHelv.render("#5", True, _.cOrange).convert_alpha()
imgInt5 = pygame.transform.smoothscale(imgInt5, (round(imgInt5.get_size()[0] * 0.5), round(imgInt5.get_size()[1] * 0.5)))
pygame.draw.rect(surfaceIntruderAlertBG, (186, 1, 13), (0, 0, 235, 512))
-tempColor = pygame.Color((0, 0, 0))
+tempColor = pygame.Color(_.cBlack)
for i in range(235):
tempColor.hsva = (172.74 + 127.26 * (i / 235), 100, 100, 50)
pygame.draw.line(surfaceIntruderAlertBG, tempColor, (235 + i, 0), (235 + i, 511))
for i in range(554):
tempColor.hsva = (300 - 300 * (i / 554), 100, 100, 50)
pygame.draw.line(surfaceIntruderAlertBG, tempColor, (470 + i, 0), (470 + i, 511))
-pygame.draw.rect(surfaceIntruderAlertBG, (0, 0, 0), (235 + 128, 0, 30, 512))
-pygame.draw.rect(surfaceIntruderAlertBG, (0, 0, 0), (235 + 316, 0, 14, 512))
-pygame.draw.rect(surfaceIntruderAlertBG, (0, 0, 0), (235 + 406, 0, 20, 512))
-pygame.draw.rect(surfaceIntruderAlertBG, (0, 0, 0), (235 + 473, 0, 20, 512))
-pygame.draw.rect(surfaceIntruderAlertBG, (0, 0, 0), (235 + 631, 0, 20, 512))
+pygame.draw.rect(surfaceIntruderAlertBG, _.cBlack, (235 + 128, 0, 30, 512))
+pygame.draw.rect(surfaceIntruderAlertBG, _.cBlack, (235 + 316, 0, 14, 512))
+pygame.draw.rect(surfaceIntruderAlertBG, _.cBlack, (235 + 406, 0, 20, 512))
+pygame.draw.rect(surfaceIntruderAlertBG, _.cBlack, (235 + 473, 0, 20, 512))
+pygame.draw.rect(surfaceIntruderAlertBG, _.cBlack, (235 + 631, 0, 20, 512))
surfaceIntruderAlertBG.blit(imgUnidentInt, (142, 86))
surfaceIntruderAlertBG.blit(imgPartition, (265, 22))
surfaceIntruderAlertBG.blit(imgPartition, (435, 22))
@@ -55,16 +55,16 @@ surfaceIntruderAlertBG.blit(imgInt4, (787, 50))
surfaceIntruderAlertBG.blit(imgInt5, (939, 50))
surfaceIntruderAlertBG.blit(imgSubcomp, (496, 344))
surfaceIntruderAlertBG.blit(imgIntAlert, (499, 384))
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (144, 74, 61, 396), 3, border_radius = 6)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (261, 20, 86, 60), 2, border_radius = 4)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (431, 20, 86, 60), 2, border_radius = 4)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (596, 20, 86, 60), 2, border_radius = 4)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (758, 20, 86, 60), 2, border_radius = 4)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (909, 20, 86, 60), 2, border_radius = 4)
-pygame.draw.rect(surfaceIntruderAlertBG, (228, 114, 0), (489, 379, 391, 99), 5, border_radius = 8)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (144, 74, 61, 396), 3, border_radius = 6)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (261, 20, 86, 60), 2, border_radius = 4)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (431, 20, 86, 60), 2, border_radius = 4)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (596, 20, 86, 60), 2, border_radius = 4)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (758, 20, 86, 60), 2, border_radius = 4)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (909, 20, 86, 60), 2, border_radius = 4)
+pygame.draw.rect(surfaceIntruderAlertBG, _.cOrange, (489, 379, 391, 99), 5, border_radius = 8)
def intruderAlert(animTime):
- _.screen.fill((0, 0, 0))
+ _.screen.fill(_.cBlack)
surfaceIntruderAlert.fill((0, 0, 0, 0))
surfaceIntruderAlertOver.fill((0, 0, 0, 0))
@@ -76,21 +76,21 @@ def intruderAlert(animTime):
barsMultiplier = 1 - math.pow(-2 * factor + 2, 5) / 2
offset = random.randint(-30, 30)
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (230, 256 - (120 + offset + 150 * barsMultiplier) / 2, 133, 120 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (362, 256 - (60 + offset + 150 * barsMultiplier) / 2, 22, 60 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (384, 256 - (72 + offset + 150 * barsMultiplier) / 2, 9, 72 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (393, 256 - (-18 + offset + 150 * barsMultiplier) / 2, 121, -18 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (514, 256 - (18 + offset + 150 * barsMultiplier) / 2, 30, 18 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (544, 256 - (30 + offset + 150 * barsMultiplier) / 2, 7, 30 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (551, 256 - (-48 + offset + 150 * barsMultiplier) / 2, 87, -48 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (638, 256 - (-30 + offset + 150 * barsMultiplier) / 2, 6, -30 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (644, 256 - (-12 + offset + 150 * barsMultiplier) / 2, 17, -12 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (661, 256 - (-90 + offset + 150 * barsMultiplier) / 2, 51, -90 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (712, 256 - (-60 + offset + 150 * barsMultiplier) / 2, 15, -60 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (727, 256 - (-90 + offset + 150 * barsMultiplier) / 2, 39, -90 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (766, 256 - (-96 + offset + 150 * barsMultiplier) / 2, 102, -96 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (868, 256 - (-78 + offset + 150 * barsMultiplier) / 2, 17, -78 + offset + 150 * barsMultiplier))
- pygame.draw.rect(surfaceIntruderAlertOver, (255, 64, 64), (885, 256 - (-114 + offset + 150 * barsMultiplier) / 2, 50, -114 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (230, 256 - (120 + offset + 150 * barsMultiplier) / 2, 133, 120 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (362, 256 - (60 + offset + 150 * barsMultiplier) / 2, 22, 60 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (384, 256 - (72 + offset + 150 * barsMultiplier) / 2, 9, 72 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (393, 256 - (-18 + offset + 150 * barsMultiplier) / 2, 121, -18 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (514, 256 - (18 + offset + 150 * barsMultiplier) / 2, 30, 18 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (544, 256 - (30 + offset + 150 * barsMultiplier) / 2, 7, 30 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (551, 256 - (-48 + offset + 150 * barsMultiplier) / 2, 87, -48 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (638, 256 - (-30 + offset + 150 * barsMultiplier) / 2, 6, -30 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (644, 256 - (-12 + offset + 150 * barsMultiplier) / 2, 17, -12 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (661, 256 - (-90 + offset + 150 * barsMultiplier) / 2, 51, -90 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (712, 256 - (-60 + offset + 150 * barsMultiplier) / 2, 15, -60 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (727, 256 - (-90 + offset + 150 * barsMultiplier) / 2, 39, -90 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (766, 256 - (-96 + offset + 150 * barsMultiplier) / 2, 102, -96 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (868, 256 - (-78 + offset + 150 * barsMultiplier) / 2, 17, -78 + offset + 150 * barsMultiplier))
+ pygame.draw.rect(surfaceIntruderAlertOver, _.cBrightRed, (885, 256 - (-114 + offset + 150 * barsMultiplier) / 2, 50, -114 + offset + 150 * barsMultiplier))
surfaceIntruderAlertOver.set_alpha(64)
pil_string_image = pygame.image.tostring(surfaceIntruderAlertOver, "RGBA", False)
pil_image = Image.frombytes("RGBA", (_.w, _.h), pil_string_image)
diff --git a/openguilion/lost.py b/openguilion/lost.py
index 56fc1f9..19ae408 100644
--- a/openguilion/lost.py
+++ b/openguilion/lost.py
@@ -6,15 +6,15 @@ import pygame
surfaceLost = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgLost = _.fontHelvGiant.render("LOST", True, (0, 0, 0)).convert_alpha()
+imgLost = _.fontHelvGiant.render("LOST", True, _.cBlack).convert_alpha()
imgLost = pygame.transform.smoothscale(imgLost, (_.w - 100, _.h + 80))
def lost(animTime):
- _.screen.fill((0, 0, 0))
+ _.screen.fill(_.cBlack)
surfaceLost.fill((0, 0, 0, 0))
blinkTimeline = (animTime * 1000) % 750
- pygame.draw.rect(surfaceLost, (255, 0, 0), (20, 20, _.w - 40, _.h - 40))
+ pygame.draw.rect(surfaceLost, _.cPureRed, (20, 20, _.w - 40, _.h - 40))
if blinkTimeline <= 375:
imgLost.set_alpha(255)
else:
diff --git a/openguilion/mentalToxicity.py b/openguilion/mentalToxicity.py
index 052e21f..55c0661 100644
--- a/openguilion/mentalToxicity.py
+++ b/openguilion/mentalToxicity.py
@@ -8,41 +8,41 @@ surfaceMentalToxicity = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
surfaceMentalToxicityBG = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgMental = _.fontHelv.render("MENTAL TOXICITY LEVEL", True, (255, 0, 0)).convert_alpha()
+imgMental = _.fontHelv.render("MENTAL TOXICITY LEVEL", True, _.cPureRed).convert_alpha()
imgMental = pygame.transform.smoothscale(imgMental, (round(imgMental.get_size()[0] * 0.8), 68))
-imgElapsed = _.fontHelvB.render("ELAPSED TIME", True, (255, 0, 0)).convert_alpha()
+imgElapsed = _.fontHelvB.render("ELAPSED TIME", True, _.cPureRed).convert_alpha()
imgElapsed = pygame.transform.smoothscale(imgElapsed, (round(imgElapsed.get_size()[0] * 0.5), round(imgElapsed.get_size()[1] * 0.5)))
-imgPurity = _.fontHelvB.render("L.C.L. PURITY", True, (255, 0, 0)).convert_alpha()
+imgPurity = _.fontHelvB.render("L.C.L. PURITY", True, _.cPureRed).convert_alpha()
imgPurity = pygame.transform.smoothscale(imgPurity, (round(imgPurity.get_size()[0] * 0.5), round(imgPurity.get_size()[1] * 0.5)))
-imgTiempo = _.fontHelvB.render(": 120 min.", True, (255, 0, 0)).convert_alpha()
+imgTiempo = _.fontHelvB.render(": 120 min.", True, _.cPureRed).convert_alpha()
imgTiempo = pygame.transform.smoothscale(imgTiempo, (round(imgTiempo.get_size()[0] * 0.5), round(imgTiempo.get_size()[1] * 0.5)))
-imgPureza = _.fontHelvB.render(": 99.9999989%", True, (255, 0, 0)).convert_alpha()
+imgPureza = _.fontHelvB.render(": 99.9999989%", True, _.cPureRed).convert_alpha()
imgPureza = pygame.transform.smoothscale(imgPureza, (round(imgPureza.get_size()[0] * 0.5), round(imgPureza.get_size()[1] * 0.5)))
-imgSubject = _.fontHelvB.render("SUBJECT", True, (255, 0, 0)).convert_alpha()
+imgSubject = _.fontHelvB.render("SUBJECT", True, _.cPureRed).convert_alpha()
imgSubject = pygame.transform.smoothscale(imgSubject, (round(imgSubject.get_size()[0] * 0.3), round(imgSubject.get_size()[1] * 0.3)))
-imgFirstC = _.fontHelvB.render("FIRST .C", True, (255, 0, 0)).convert_alpha()
+imgFirstC = _.fontHelvB.render("FIRST .C", True, _.cPureRed).convert_alpha()
imgFirstC = pygame.transform.smoothscale(imgFirstC, (round(imgFirstC.get_size()[0] * 0.3), round(imgFirstC.get_size()[1] * 0.3)))
-imgSecondC = _.fontHelvB.render("SECOND .C", True, (255, 0, 0)).convert_alpha()
+imgSecondC = _.fontHelvB.render("SECOND .C", True, _.cPureRed).convert_alpha()
imgSecondC = pygame.transform.smoothscale(imgSecondC, (round(imgSecondC.get_size()[0] * 0.3), round(imgSecondC.get_size()[1] * 0.3)))
-imgThirdC = _.fontHelvB.render("THIRD .C", True, (255, 0, 0)).convert_alpha()
+imgThirdC = _.fontHelvB.render("THIRD .C", True, _.cPureRed).convert_alpha()
imgThirdC = pygame.transform.smoothscale(imgThirdC, (round(imgThirdC.get_size()[0] * 0.3), round(imgThirdC.get_size()[1] * 0.3)))
-img00 = _.fontHelvB.render("00", True, (255, 0, 0)).convert_alpha()
+img00 = _.fontHelvB.render("00", True, _.cPureRed).convert_alpha()
img00 = pygame.transform.smoothscale(img00, (round(img00.get_size()[0] * 1.15), round(img00.get_size()[1] * 1.15)))
-img01 = _.fontHelvB.render("01", True, (255, 0, 0)).convert_alpha()
+img01 = _.fontHelvB.render("01", True, _.cPureRed).convert_alpha()
img01 = pygame.transform.smoothscale(img01, (round(img01.get_size()[0] * 1.15), round(img01.get_size()[1] * 1.15)))
-img02 = _.fontHelvB.render("02", True, (255, 0, 0)).convert_alpha()
+img02 = _.fontHelvB.render("02", True, _.cPureRed).convert_alpha()
img02 = pygame.transform.smoothscale(img02, (round(img02.get_size()[0] * 1.15), round(img02.get_size()[1] * 1.15)))
-imgCaution = _.fontHelvB.render("CAUTION", True, (255, 0, 0)).convert_alpha()
+imgCaution = _.fontHelvB.render("CAUTION", True, _.cPureRed).convert_alpha()
imgCaution = pygame.transform.smoothscale(imgCaution, (round(imgCaution.get_size()[0] * 0.3), round(imgCaution.get_size()[1] * 0.3)))
-imgDanger = _.fontHelvB.render("DANGER", True, (255, 0, 0)).convert_alpha()
+imgDanger = _.fontHelvB.render("DANGER", True, _.cPureRed).convert_alpha()
imgDanger = pygame.transform.smoothscale(imgDanger, (round(imgDanger.get_size()[0] * 0.3), round(imgDanger.get_size()[1] * 0.3)))
-img100 = _.fontHelv.render("-100.0", True, (255, 0, 0)).convert_alpha()
+img100 = _.fontHelv.render("-100.0", True, _.cPureRed).convert_alpha()
img100 = pygame.transform.smoothscale(img100, (round(img100.get_size()[0] * 0.3), round(img100.get_size()[1] * 0.4)))
-img0 = _.fontHelv.render("+0", True, (255, 0, 0)).convert_alpha()
+img0 = _.fontHelv.render("+0", True, _.cPureRed).convert_alpha()
img0 = pygame.transform.smoothscale(img0, (round(img0.get_size()[0] * 0.3), round(img0.get_size()[1] * 0.4)))
-img10 = _.fontHelv.render("+10.0", True, (255, 0, 0)).convert_alpha()
+img10 = _.fontHelv.render("+10.0", True, _.cPureRed).convert_alpha()
img10 = pygame.transform.smoothscale(img10, (round(img10.get_size()[0] * 0.3), round(img10.get_size()[1] * 0.4)))
-img16 = _.fontHelv.render("+16.0", True, (255, 0, 0)).convert_alpha()
+img16 = _.fontHelv.render("+16.0", True, _.cPureRed).convert_alpha()
img16 = pygame.transform.smoothscale(img16, (round(img16.get_size()[0] * 0.3), round(img16.get_size()[1] * 0.4)))
surfaceMentalToxicityBG.blit(imgMental, (50, 10))
surfaceMentalToxicityBG.blit(imgElapsed, (550, 14))
@@ -73,19 +73,19 @@ surfaceMentalToxicityBG.blit(imgSubject, (40, 394))
surfaceMentalToxicityBG.blit(img02, (40, 414))
surfaceMentalToxicityBG.blit(imgSecondC, (40, 480))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (10, 80, 1004, 2))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (153, 113, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (727, 113, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (827, 113, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (902, 113, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (153, 243, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (727, 243, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (827, 243, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (902, 243, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (153, 373, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (727, 373, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (827, 373, 2, 16))
-pygame.draw.rect(surfaceMentalToxicityBG, (255, 0, 0), (902, 373, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (10, 80, 1004, 2))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (153, 113, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (727, 113, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (827, 113, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (902, 113, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (153, 243, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (727, 243, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (827, 243, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (902, 243, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (153, 373, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (727, 373, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (827, 373, 2, 16))
+pygame.draw.rect(surfaceMentalToxicityBG, _.cPureRed, (902, 373, 2, 16))
def mentalToxicity(animTime):
_.screen.fill((0, 0, 0))
diff --git a/openguilion/openguilionCommon.py b/openguilion/openguilionCommon.py
index e4be930..c0f4bad 100644
--- a/openguilion/openguilionCommon.py
+++ b/openguilion/openguilionCommon.py
@@ -19,6 +19,15 @@ fontHelvB = pygame.font.Font('./openguilion/fonts/helvetb.ttf', 60)
fontMatisse = pygame.font.Font('./openguilion/fonts/matisse.ttf', 60)
fontSinkin = pygame.font.Font('./openguilion/fonts/sinkin.ttf', 200)
+# Palette
+cBlack = (0, 0, 0)
+cBrightRed = (255, 64, 64)
+cPureRed = (255, 0, 0)
+cRed = (212, 19, 13)
+cOrange = (228, 114, 0)
+cLightYellow = (255, 227, 118)
+cLightGreen = (101, 231, 151)
+
# Test vars
textX = 100
textY = 55 \ No newline at end of file
diff --git a/openguilion/phase01To17.py b/openguilion/phase01To17.py
index 3856481..b75a89f 100644
--- a/openguilion/phase01To17.py
+++ b/openguilion/phase01To17.py
@@ -6,23 +6,23 @@ import pygame
surfacePhase01to17 = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgPhase01 = _.fontHelv.render("PHASE 01", True, (228, 114, 0)).convert_alpha()
-imgPhase02 = _.fontHelv.render("PHASE 02", True, (228, 114, 0)).convert_alpha()
-imgPhase03 = _.fontHelv.render("PHASE 03", True, (228, 114, 0)).convert_alpha()
-imgPhase04 = _.fontHelv.render("PHASE 04", True, (228, 114, 0)).convert_alpha()
-imgPhase05 = _.fontHelv.render("PHASE 05", True, (228, 114, 0)).convert_alpha()
-imgPhase06 = _.fontHelv.render("PHASE 06", True, (228, 114, 0)).convert_alpha()
-imgPhase07 = _.fontHelv.render("PHASE 07", True, (228, 114, 0)).convert_alpha()
-imgPhase08 = _.fontHelv.render("PHASE 08", True, (228, 114, 0)).convert_alpha()
-imgPhase09 = _.fontHelv.render("PHASE 09", True, (228, 114, 0)).convert_alpha()
-imgPhase10 = _.fontHelv.render("PHASE 10", True, (228, 114, 0)).convert_alpha()
-imgPhase11 = _.fontHelv.render("PHASE 11", True, (228, 114, 0)).convert_alpha()
-imgPhase12 = _.fontHelv.render("PHASE 12", True, (228, 114, 0)).convert_alpha()
-imgPhase13 = _.fontHelv.render("PHASE 13", True, (228, 114, 0)).convert_alpha()
-imgPhase14 = _.fontHelv.render("PHASE 14", True, (228, 114, 0)).convert_alpha()
-imgPhase15 = _.fontHelv.render("PHASE 15", True, (228, 114, 0)).convert_alpha()
-imgPhase16 = _.fontHelv.render("PHASE 16", True, (228, 114, 0)).convert_alpha()
-imgPhase17 = _.fontHelv.render("PHASE 17", True, (228, 114, 0)).convert_alpha()
+imgPhase01 = _.fontHelv.render("PHASE 01", True, _.cOrange).convert_alpha()
+imgPhase02 = _.fontHelv.render("PHASE 02", True, _.cOrange).convert_alpha()
+imgPhase03 = _.fontHelv.render("PHASE 03", True, _.cOrange).convert_alpha()
+imgPhase04 = _.fontHelv.render("PHASE 04", True, _.cOrange).convert_alpha()
+imgPhase05 = _.fontHelv.render("PHASE 05", True, _.cOrange).convert_alpha()
+imgPhase06 = _.fontHelv.render("PHASE 06", True, _.cOrange).convert_alpha()
+imgPhase07 = _.fontHelv.render("PHASE 07", True, _.cOrange).convert_alpha()
+imgPhase08 = _.fontHelv.render("PHASE 08", True, _.cOrange).convert_alpha()
+imgPhase09 = _.fontHelv.render("PHASE 09", True, _.cOrange).convert_alpha()
+imgPhase10 = _.fontHelv.render("PHASE 10", True, _.cOrange).convert_alpha()
+imgPhase11 = _.fontHelv.render("PHASE 11", True, _.cOrange).convert_alpha()
+imgPhase12 = _.fontHelv.render("PHASE 12", True, _.cOrange).convert_alpha()
+imgPhase13 = _.fontHelv.render("PHASE 13", True, _.cOrange).convert_alpha()
+imgPhase14 = _.fontHelv.render("PHASE 14", True, _.cOrange).convert_alpha()
+imgPhase15 = _.fontHelv.render("PHASE 15", True, _.cOrange).convert_alpha()
+imgPhase16 = _.fontHelv.render("PHASE 16", True, _.cOrange).convert_alpha()
+imgPhase17 = _.fontHelv.render("PHASE 17", True, _.cOrange).convert_alpha()
imgPhase01 = pygame.transform.smoothscale(imgPhase01, (round(imgPhase01.get_size()[0] * 0.3), round(imgPhase01.get_size()[1] * 0.4)))
imgPhase02 = pygame.transform.smoothscale(imgPhase02, (round(imgPhase02.get_size()[0] * 0.3), round(imgPhase02.get_size()[1] * 0.4)))
imgPhase03 = pygame.transform.smoothscale(imgPhase03, (round(imgPhase03.get_size()[0] * 0.3), round(imgPhase03.get_size()[1] * 0.4)))
@@ -41,11 +41,11 @@ imgPhase15 = pygame.transform.smoothscale(imgPhase15, (round(imgPhase15.get_siz
imgPhase16 = pygame.transform.smoothscale(imgPhase16, (round(imgPhase16.get_size()[0] * 0.3), round(imgPhase16.get_size()[1] * 0.4)))
imgPhase17 = pygame.transform.smoothscale(imgPhase17, (round(imgPhase17.get_size()[0] * 0.3), round(imgPhase17.get_size()[1] * 0.4)))
imgPhases = [imgPhase01, imgPhase02, imgPhase03, imgPhase04, imgPhase05, imgPhase06, imgPhase07, imgPhase08, imgPhase09, imgPhase10, imgPhase11, imgPhase12, imgPhase13, imgPhase14, imgPhase15, imgPhase16, imgPhase17]
-imgStart = _.fontHelv.render("START", True, (255, 227, 118)).convert_alpha()
+imgStart = _.fontHelv.render("START", True, _.cLightYellow).convert_alpha()
imgStart = pygame.transform.smoothscale(imgStart, (round(imgStart.get_size()[0] * 0.8), round(imgStart.get_size()[1] * 0.5)))
-imgDecontam = _.fontHelv.render("DECONTAM", True, (255, 227, 118)).convert_alpha()
+imgDecontam = _.fontHelv.render("DECONTAM", True, _.cLightYellow).convert_alpha()
imgDecontam = pygame.transform.smoothscale(imgDecontam, (round(imgDecontam.get_size()[0] * 0.4), round(imgDecontam.get_size()[1] * 0.4)))
-imgFinished = _.fontHelv.render("FINISHED", True, (255, 227, 118)).convert_alpha()
+imgFinished = _.fontHelv.render("FINISHED", True, _.cLightYellow).convert_alpha()
imgFinished = pygame.transform.smoothscale(imgFinished, (round(imgFinished.get_size()[0] * 0.4), round(imgFinished.get_size()[1] * 0.4)))
def phase01To17(animTime):
@@ -54,23 +54,23 @@ def phase01To17(animTime):
scrollY = round(animTime * 80)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (60, 0, 2, 512))
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (964, 0, 2, 512))
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (147, 55 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (447, 55 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (747, 55 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (219, 0 - scrollY, 6, 1260))
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (519, 0, 6, 512))
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (819, 0 - scrollY, 6, 1260))
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (219, 1260 - scrollY, 606, 6))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (60, 0, 2, 512))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (964, 0, 2, 512))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (147, 55 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (447, 55 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (747, 55 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (219, 0 - scrollY, 6, 1260))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (519, 0, 6, 512))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (819, 0 - scrollY, 6, 1260))
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (219, 1260 - scrollY, 606, 6))
if animTime > 0.15:
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (127, 57 - scrollY, 18, 32), border_radius = 2)
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (427, 57 - scrollY, 18, 32), border_radius = 2)
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (727, 57 - scrollY, 18, 32), border_radius = 2)
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (301, 57 - scrollY, 18, 32), border_radius = 2)
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (601, 57 - scrollY, 18, 32), border_radius = 2)
- pygame.draw.rect(surfacePhase01to17, (255, 227, 118), (901, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (127, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (427, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (727, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (301, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (601, 57 - scrollY, 18, 32), border_radius = 2)
+ pygame.draw.rect(surfacePhase01to17, _.cLightYellow, (901, 57 - scrollY, 18, 32), border_radius = 2)
surfacePhase01to17.blit(imgStart, (157, 57 - scrollY))
surfacePhase01to17.blit(imgStart, (457, 57 - scrollY))
surfacePhase01to17.blit(imgStart, (757, 57 - scrollY))
@@ -80,17 +80,17 @@ def phase01To17(animTime):
surfacePhase01to17.blit(imgPhases[i], (367, 120 + i * 60 - scrollY))
surfacePhase01to17.blit(imgPhases[i], (667, 120 + i * 60 - scrollY))
if ((animTime - 0.65) / 9) > (i / 17):
- pygame.draw.rect(surfacePhase01to17, (101, 231, 151), (147, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (101, 231, 151), (447, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (101, 231, 151), (747, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cLightGreen, (147, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cLightGreen, (447, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cLightGreen, (747, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
else:
- pygame.draw.rect(surfacePhase01to17, (212, 19, 13), (147, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (212, 19, 13), (447, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (212, 19, 13), (747, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cRed, (147, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cRed, (447, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cRed, (747, 115 + i * 60 - scrollY, 150, 32), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (147, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (447, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
- pygame.draw.rect(surfacePhase01to17, (228, 114, 0), (747, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (147, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (447, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
+ pygame.draw.rect(surfacePhase01to17, _.cOrange, (747, 115 + 17 * 60 - scrollY, 150, 64), border_radius = 4)
if ((animTime - 0.65) / 9) > 1:
surfacePhase01to17.blit(imgDecontam, (165, 124 + 17 * 60 - scrollY))
surfacePhase01to17.blit(imgFinished, (174, 148 + 17 * 60 - scrollY))
diff --git a/openguilion/stateEmergency.py b/openguilion/stateEmergency.py
index 1a199c9..a8b7dc2 100644
--- a/openguilion/stateEmergency.py
+++ b/openguilion/stateEmergency.py
@@ -9,49 +9,49 @@ surfaceStateEmergencyBGRects = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
surfaceStateEmergencyOver = pygame.Surface((_.w, _.h), pygame.SRCALPHA, 32)
# STATIC SCENE COMPOSITION
-imgStateEm = _.fontMatisse.render("非常事態", True, (212, 19, 13)).convert_alpha()
+imgStateEm = _.fontMatisse.render("非常事態", True, _.cRed).convert_alpha()
imgStateEm = pygame.transform.smoothscale(imgStateEm, (round(imgStateEm.get_size()[0] * 2), round(imgStateEm.get_size()[1] * 1.5)))
-imgEmergency = _.fontSinkin.render("EMERGENCY", True, (228, 114, 0)).convert_alpha()
+imgEmergency = _.fontSinkin.render("EMERGENCY", True, _.cOrange).convert_alpha()
imgEmergency = pygame.transform.smoothscale(imgEmergency, (round(imgEmergency.get_size()[0] * 0.55), round(imgEmergency.get_size()[1] * 0.7)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((43, 0), (113, 0), (0, 113), (0, 43)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((26, 159), (185, 0), (255, 0), (96, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((168, 159), (327, 0), (397, 0), (238, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((310, 159), (469, 0), (554, 0), (713, 159), (643, 159), (512, 28), (511, 28), (380, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((452, 159), (511, 100), (512, 100), (571, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((626, 0), (696, 0), (855, 159), (785, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((768, 0), (838, 0), (997, 159), (927, 159)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((910, 0), (980, 0), (1023, 43), (1023, 113)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((0, 352), (40, 352), (0, 392)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((0, 464), (112, 352), (182, 352), (23, 511), (0, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((254, 352), (324, 352), (165, 511), (95,511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((396, 352), (466, 352), (307, 511), (237, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((379, 511), (511, 379), (512, 379), (644, 511), (574, 511), (512, 449), (511, 449), (449, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((557, 352), (627, 352), (786, 511), (716, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((699, 352), (769, 352), (928, 511), (858, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((841, 352), (911, 352), (1023, 464), (1023, 511), (1000, 511)))
-pygame.draw.polygon(surfaceStateEmergencyBG, (212, 19, 13), ((983, 352), (1023, 352), (1023, 392)))
-pygame.draw.rect(surfaceStateEmergencyBG, (0, 0, 0), (512 - imgStateEm.get_size()[0] / 2 - 40, 35, imgStateEm.get_size()[0] + 80, imgStateEm.get_size()[1] + 20))
-pygame.draw.rect(surfaceStateEmergencyBG, (0, 0, 0), (512 - imgStateEm.get_size()[0] / 2 - 40, _.h - 55 - imgStateEm.get_size()[1], imgStateEm.get_size()[0] + 80, imgStateEm.get_size()[1] + 20))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((43, 0), (113, 0), (0, 113), (0, 43)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((26, 159), (185, 0), (255, 0), (96, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((168, 159), (327, 0), (397, 0), (238, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((310, 159), (469, 0), (554, 0), (713, 159), (643, 159), (512, 28), (511, 28), (380, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((452, 159), (511, 100), (512, 100), (571, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((626, 0), (696, 0), (855, 159), (785, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((768, 0), (838, 0), (997, 159), (927, 159)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((910, 0), (980, 0), (1023, 43), (1023, 113)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((0, 352), (40, 352), (0, 392)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((0, 464), (112, 352), (182, 352), (23, 511), (0, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((254, 352), (324, 352), (165, 511), (95,511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((396, 352), (466, 352), (307, 511), (237, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((379, 511), (511, 379), (512, 379), (644, 511), (574, 511), (512, 449), (511, 449), (449, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((557, 352), (627, 352), (786, 511), (716, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((699, 352), (769, 352), (928, 511), (858, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((841, 352), (911, 352), (1023, 464), (1023, 511), (1000, 511)))
+pygame.draw.polygon(surfaceStateEmergencyBG, _.cRed, ((983, 352), (1023, 352), (1023, 392)))
+pygame.draw.rect(surfaceStateEmergencyBG, _.cBlack, (512 - imgStateEm.get_size()[0] / 2 - 40, 35, imgStateEm.get_size()[0] + 80, imgStateEm.get_size()[1] + 20))
+pygame.draw.rect(surfaceStateEmergencyBG, _.cBlack, (512 - imgStateEm.get_size()[0] / 2 - 40, _.h - 55 - imgStateEm.get_size()[1], imgStateEm.get_size()[0] + 80, imgStateEm.get_size()[1] + 20))
surfaceStateEmergencyBG.blit(imgStateEm, (512 - imgStateEm.get_size()[0] / 2, 45))
surfaceStateEmergencyBG.blit(imgStateEm, (512 - imgStateEm.get_size()[0] / 2, _.h - 45 - imgStateEm.get_size()[1]))
-pygame.draw.rect(surfaceStateEmergencyBGRects, (228, 114, 0), (512 - imgStateEm.get_size()[0] / 2 - 35, 40, 20, imgStateEm.get_size()[1] + 10))
-pygame.draw.rect(surfaceStateEmergencyBGRects, (228, 114, 0), (512 + imgStateEm.get_size()[0] / 2 + 15, 40, 20, imgStateEm.get_size()[1] + 10))
-pygame.draw.rect(surfaceStateEmergencyBGRects, (228, 114, 0), (512 - imgStateEm.get_size()[0] / 2 - 35, _.h - 50 - imgStateEm.get_size()[1], 20, imgStateEm.get_size()[1] + 10))
-pygame.draw.rect(surfaceStateEmergencyBGRects, (228, 114, 0), (512 + imgStateEm.get_size()[0] / 2 + 15, _.h - 50 - imgStateEm.get_size()[1], 20, imgStateEm.get_size()[1] + 10))
+pygame.draw.rect(surfaceStateEmergencyBGRects, _.cOrange, (512 - imgStateEm.get_size()[0] / 2 - 35, 40, 20, imgStateEm.get_size()[1] + 10))
+pygame.draw.rect(surfaceStateEmergencyBGRects, _.cOrange, (512 + imgStateEm.get_size()[0] / 2 + 15, 40, 20, imgStateEm.get_size()[1] + 10))
+pygame.draw.rect(surfaceStateEmergencyBGRects, _.cOrange, (512 - imgStateEm.get_size()[0] / 2 - 35, _.h - 50 - imgStateEm.get_size()[1], 20, imgStateEm.get_size()[1] + 10))
+pygame.draw.rect(surfaceStateEmergencyBGRects, _.cOrange, (512 + imgStateEm.get_size()[0] / 2 + 15, _.h - 50 - imgStateEm.get_size()[1], 20, imgStateEm.get_size()[1] + 10))
def stateEmergency(animTime):
- _.screen.fill((0, 0, 0))
+ _.screen.fill(_.cBlack)
surfaceStateEmergency.fill((0, 0, 0, 0))
offsetEmergency = (-animTime * 500) % (imgEmergency.get_size()[0] + 350) - _.w
while offsetEmergency < _.w:
surfaceStateEmergency.blit(imgEmergency, (offsetEmergency, 180))
offsetEmergency += (imgEmergency.get_size()[0] + 350)
- pygame.draw.rect(surfaceStateEmergency, (212, 19, 13), (0, 321, _.w, 10))
+ pygame.draw.rect(surfaceStateEmergency, _.cRed, (0, 321, _.w, 10))
blinkTimeline = (animTime * 1000) % 500
if blinkTimeline <= 250: