|
|
@@ -1,6 +1,7 @@ |
|
|
|
# vim: nosmartindent autoindent |
|
|
|
|
|
|
|
import json |
|
|
|
import math |
|
|
|
import random |
|
|
|
import subprocess |
|
|
|
import sys |
|
|
@@ -149,11 +150,13 @@ class Main: |
|
|
|
|
|
|
|
# 日の角度 |
|
|
|
sun.compute (observer_with_time) |
|
|
|
sun_alt: float = CommonModule.rad_to_deg (sun.alt) |
|
|
|
sun_alt: float = math.degrees (sun.alt) |
|
|
|
sun_az: float = math.degrees (sun.az) |
|
|
|
|
|
|
|
# 月の角度 |
|
|
|
moon.compute (observer_with_time) |
|
|
|
moon_alt: float = CommonModule.rad_to_deg (moon.alt) |
|
|
|
moon_alt: float = math.degrees (moon.alt) |
|
|
|
moon_az: float = math.degrees (moon.az) |
|
|
|
|
|
|
|
# 月齢 |
|
|
|
new_moon_dt: datetime = ephem.localtime ( |
|
|
@@ -166,7 +169,7 @@ class Main: |
|
|
|
cls.draw_bg (screen, bg_day, bg_evening, bg_night, bg_grass, |
|
|
|
kita, jojoko, |
|
|
|
sunrise_start, sunrise_end, sunset_start, sunset_end, |
|
|
|
sun_alt, moon_alt, moon_days_old) |
|
|
|
sun_alt, sun_az, moon_alt, moon_az, moon_days_old) |
|
|
|
|
|
|
|
# 左上に時刻表示 |
|
|
|
for i in range (4): |
|
|
@@ -296,7 +299,8 @@ class Main: |
|
|
|
bg_grass, kita, jojoko, |
|
|
|
sunrise_start, sunrise_end, |
|
|
|
sunset_start, sunset_end, |
|
|
|
sun_alt, moon_alt, moon_days_old) |
|
|
|
sun_alt, sun_az, moon_alt, moon_az, |
|
|
|
moon_days_old) |
|
|
|
|
|
|
|
chat_item.author = {'name': 'ゴートうひとり' if goatoh_talking else '伊地知ニジカ', |
|
|
|
'id': '', |
|
|
@@ -334,7 +338,9 @@ class Main: |
|
|
|
sunset_start: datetime, |
|
|
|
sunset_end: datetime, |
|
|
|
sun_alt: float, |
|
|
|
sun_az: float, |
|
|
|
moon_alt: float, |
|
|
|
moon_az: float, |
|
|
|
moon_days_old: float) \ |
|
|
|
-> None: |
|
|
|
sunrise_centre: datetime = ( |
|
|
@@ -368,14 +374,14 @@ class Main: |
|
|
|
|
|
|
|
screen.blit (bg_evening, (0, 0)) |
|
|
|
|
|
|
|
if -10 <= moon_alt < 40: |
|
|
|
if (moon_az < 180) and (-10 <= moon_alt < 40): |
|
|
|
y = ((CWindow.HEIGHT / 2 + 100) |
|
|
|
- (CWindow.HEIGHT / 2 + 200) / 30 * moon_alt) |
|
|
|
screen.blit (jojoko, jojoko.get_rect (center = (400, y))) |
|
|
|
|
|
|
|
screen.blit (bg_grass, (0, 0)) |
|
|
|
|
|
|
|
if -10 <= sun_alt < 40: |
|
|
|
if (sun_az < 180) and (-10 <= sun_alt < 40): |
|
|
|
y = ((CWindow.HEIGHT / 2 + 100) |
|
|
|
- (CWindow.HEIGHT / 2 + 200) / 30 * sun_alt) |
|
|
|
screen.blit (kita, kita.get_rect (center = (400, y))) |
|
|
|