WinColl 0.9.7__tar.gz → 0.9.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wincoll-0.9.7 → wincoll-0.9.8}/PKG-INFO +1 -1
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/PKG-INFO +1 -1
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/SOURCES.txt +1 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/pyproject.toml +1 -1
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/__init__.py +21 -28
- wincoll-0.9.8/wincoll/levels/01.tmx +61 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/README.md +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/dependency_links.txt +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/entry_points.txt +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/requires.txt +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/WinColl.egg-info/top_level.txt +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/setup.cfg +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/Collect.wav +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/Slide.wav +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/Splat.wav +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/Unlock.wav +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/__main__.py +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/acorn-mode-1.ttf +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/diamond.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/langdetect.py +0 -0
- /wincoll-0.9.7/wincoll/levels/01.tmx → /wincoll-0.9.8/wincoll/levels/02.tmx +0 -0
- /wincoll-0.9.7/wincoll/levels/02.tmx → /wincoll-0.9.8/wincoll/levels/03.tmx +0 -0
- /wincoll-0.9.7/wincoll/levels/03.tmx → /wincoll-0.9.8/wincoll/levels/04.tmx +0 -0
- /wincoll-0.9.7/wincoll/levels/04.tmx → /wincoll-0.9.8/wincoll/levels/05.tmx +0 -0
- /wincoll-0.9.7/wincoll/levels/05.tmx → /wincoll-0.9.8/wincoll/levels/06.tmx +0 -0
- /wincoll-0.9.7/wincoll/levels/06.tmx → /wincoll-0.9.8/wincoll/levels/07.tmx +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Blob.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Brick.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Diamond.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Earth.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Gap.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Key.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Rock.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Safe.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/Win.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/levels/WinColl.tsx +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/locale/el/LC_MESSAGES/wincoll.mo +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/locale/fr/LC_MESSAGES/argparse.mo +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/locale/fr/LC_MESSAGES/wincoll.mo +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/ptext.py +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/splat.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/title.png +0 -0
- {wincoll-0.9.7 → wincoll-0.9.8}/wincoll/warnings_util.py +0 -0
|
@@ -346,9 +346,9 @@ class WincollGame:
|
|
|
346
346
|
):
|
|
347
347
|
return True
|
|
348
348
|
if block == self.gids[TilesetGids.ROCK]:
|
|
349
|
-
new_rockpos = self.hero.position +
|
|
349
|
+
new_rockpos = self.hero.position + velocity * 2
|
|
350
350
|
return (
|
|
351
|
-
|
|
351
|
+
velocity.y == 0
|
|
352
352
|
and self.get(new_rockpos) == self.gids[TilesetGids.GAP]
|
|
353
353
|
)
|
|
354
354
|
return False
|
|
@@ -502,7 +502,8 @@ class WincollGame:
|
|
|
502
502
|
self.show_screen()
|
|
503
503
|
pygame.time.wait(1000)
|
|
504
504
|
self.dead = False
|
|
505
|
-
self.
|
|
505
|
+
if self.diamonds == 0:
|
|
506
|
+
self.level += 1
|
|
506
507
|
if self.level > levels:
|
|
507
508
|
self.splurge(Win().image)
|
|
508
509
|
|
|
@@ -526,19 +527,6 @@ def clear_keys() -> None:
|
|
|
526
527
|
pass
|
|
527
528
|
|
|
528
529
|
|
|
529
|
-
def get_key() -> int:
|
|
530
|
-
"""Return first key press."""
|
|
531
|
-
while True:
|
|
532
|
-
handle_quit_event()
|
|
533
|
-
for event in pygame.event.get(pygame.KEYDOWN):
|
|
534
|
-
if event.key == pygame.K_ESCAPE:
|
|
535
|
-
quit_game()
|
|
536
|
-
else:
|
|
537
|
-
handle_global_keys(event)
|
|
538
|
-
key: int = event.key
|
|
539
|
-
return key
|
|
540
|
-
|
|
541
|
-
|
|
542
530
|
DIGIT_KEYS = {
|
|
543
531
|
pygame.K_0: 0,
|
|
544
532
|
pygame.K_1: 1,
|
|
@@ -590,7 +578,8 @@ Avoid falling rocks!
|
|
|
590
578
|
start_level_y = (
|
|
591
579
|
instructions_y + len(instructions.split("\n\n\n")[0].split("\n")) + 1
|
|
592
580
|
)
|
|
593
|
-
|
|
581
|
+
play = False
|
|
582
|
+
while not play:
|
|
594
583
|
reinit_screen()
|
|
595
584
|
screen.blit(
|
|
596
585
|
scale_surface(TITLE_IMAGE.convert()),
|
|
@@ -604,18 +593,22 @@ Avoid falling rocks!
|
|
|
604
593
|
align="center",
|
|
605
594
|
)
|
|
606
595
|
pygame.display.flip()
|
|
607
|
-
|
|
596
|
+
handle_quit_event()
|
|
597
|
+
for event in pygame.event.get(pygame.KEYDOWN):
|
|
598
|
+
if event.key == pygame.K_ESCAPE:
|
|
599
|
+
quit_game()
|
|
600
|
+
if event.key == pygame.K_SPACE:
|
|
601
|
+
play = True
|
|
602
|
+
if event.key in (pygame.K_z, pygame.K_LEFT, pygame.K_SLASH, pygame.K_DOWN):
|
|
603
|
+
level = max(1, level - 1)
|
|
604
|
+
elif event.key in (pygame.K_x, pygame.K_RIGHT, pygame.K_QUOTE, pygame.K_UP):
|
|
605
|
+
level = min(levels, level + 1)
|
|
606
|
+
elif event.key in DIGIT_KEYS:
|
|
607
|
+
level = min(levels, level * 10 + DIGIT_KEYS[event.key])
|
|
608
|
+
else:
|
|
609
|
+
level = 0
|
|
610
|
+
handle_global_keys(event)
|
|
608
611
|
clock.tick(FRAMES_PER_SECOND)
|
|
609
|
-
if key == pygame.K_SPACE:
|
|
610
|
-
break
|
|
611
|
-
if key in (pygame.K_z, pygame.K_LEFT, pygame.K_SLASH, pygame.K_DOWN):
|
|
612
|
-
level = max(1, level - 1)
|
|
613
|
-
elif key in (pygame.K_x, pygame.K_RIGHT, pygame.K_QUOTE, pygame.K_UP):
|
|
614
|
-
level = min(levels, level + 1)
|
|
615
|
-
elif key in DIGIT_KEYS:
|
|
616
|
-
level = min(levels, level * 10 + DIGIT_KEYS[key])
|
|
617
|
-
else:
|
|
618
|
-
level = 0
|
|
619
612
|
return max(min(level, levels), 1)
|
|
620
613
|
|
|
621
614
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="50" height="50" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="1">
|
|
3
|
+
<properties>
|
|
4
|
+
<property name="Title" value="A gentle introduction"/>
|
|
5
|
+
</properties>
|
|
6
|
+
<tileset firstgid="1" source="WinColl.tsx"/>
|
|
7
|
+
<layer id="1" name="Tile Layer 1" width="50" height="50">
|
|
8
|
+
<data encoding="csv">
|
|
9
|
+
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,16,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,
|
|
10
|
+
15,16,15,15,15,15,15,13,15,15,16,15,15,11,15,15,10,15,15,12,16,16,16,10,10,10,10,10,10,10,10,10,10,11,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,
|
|
11
|
+
15,15,16,13,15,11,15,15,10,15,15,15,15,16,15,15,15,15,15,12,13,14,11,11,11,11,11,11,11,11,11,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,
|
|
12
|
+
15,15,15,15,17,15,15,15,15,16,15,15,15,15,16,15,13,15,14,12,11,17,11,10,11,11,11,11,10,11,17,11,10,11,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,
|
|
13
|
+
11,15,15,16,15,15,14,15,11,15,15,10,11,15,11,15,15,14,11,12,11,11,10,11,11,11,11,11,11,10,11,11,10,11,11,11,11,11,16,11,11,11,16,11,11,11,16,11,11,11,
|
|
14
|
+
15,15,14,15,15,15,15,15,15,15,15,13,15,16,15,15,14,11,11,12,11,10,11,11,11,15,15,11,11,11,10,11,10,11,13,10,10,10,15,13,13,13,15,13,13,13,15,13,13,11,
|
|
15
|
+
15,15,15,15,16,15,10,15,15,15,15,15,15,15,15,14,11,11,11,12,11,11,11,15,15,10,10,15,15,11,11,11,10,11,11,11,11,11,15,11,15,11,15,11,15,11,15,11,15,11,
|
|
16
|
+
15,16,15,15,11,15,15,15,14,15,16,17,15,15,14,11,11,11,16,12,11,11,15,10,10,10,10,10,10,15,11,11,10,11,11,10,11,11,15,11,15,11,15,11,15,11,15,11,15,11,
|
|
17
|
+
15,15,15,10,15,14,15,15,15,15,15,15,15,14,11,11,11,11,17,12,11,11,15,10,13,10,10,13,10,15,11,11,13,11,10,11,11,11,15,11,15,11,15,11,15,11,15,11,15,11,
|
|
18
|
+
10,15,14,15,15,15,15,16,11,15,15,15,14,11,11,11,11,11,11,12,11,15,10,10,10,10,10,10,10,10,15,10,10,11,11,11,10,10,13,13,15,13,13,13,15,13,13,13,15,11,
|
|
19
|
+
15,15,16,15,15,15,15,15,15,15,16,15,14,11,11,11,11,11,11,12,16,15,10,10,14,10,10,14,10,10,15,11,11,11,11,13,10,11,11,11,16,11,11,11,16,11,11,11,16,11,
|
|
20
|
+
13,15,15,15,15,14,15,10,15,14,15,15,14,11,11,17,17,11,11,12,14,11,15,10,10,14,14,10,10,15,11,11,11,10,11,10,11,16,11,16,11,16,11,16,11,16,11,16,11,11,
|
|
21
|
+
15,14,15,13,15,15,15,15,16,15,15,15,14,11,17,11,11,17,11,12,11,11,15,10,10,10,10,10,10,15,11,11,10,11,11,10,11,11,16,11,11,11,16,11,11,11,16,11,11,11,
|
|
22
|
+
15,15,10,15,17,15,16,15,15,15,15,16,14,11,17,11,11,17,11,12,11,11,11,15,15,10,10,15,15,11,11,11,11,11,10,13,11,13,11,16,11,16,11,16,11,16,11,16,11,11,
|
|
23
|
+
15,15,15,16,15,14,15,15,15,13,15,15,14,11,11,17,17,11,11,12,11,10,11,11,11,15,15,11,11,11,10,11,11,10,10,11,16,16,16,11,16,11,11,11,16,11,11,11,16,11,
|
|
24
|
+
16,15,15,15,15,15,15,15,14,15,15,15,14,11,11,11,17,11,11,12,11,11,10,11,11,10,11,11,11,10,11,11,11,10,11,16,16,16,16,16,11,16,11,16,11,16,11,16,11,11,
|
|
25
|
+
11,15,14,15,15,15,16,15,15,11,15,14,14,11,11,11,17,11,11,12,11,17,11,10,11,10,11,11,10,11,17,11,11,10,11,16,16,16,16,16,11,11,16,11,11,11,16,11,11,11,
|
|
26
|
+
15,15,15,10,16,14,15,15,15,16,15,15,14,11,17,17,17,11,11,12,11,11,11,11,11,13,11,11,11,11,11,11,11,10,11,13,16,16,16,13,11,16,13,16,11,16,13,16,11,11,
|
|
27
|
+
15,16,15,15,15,15,15,14,15,15,15,15,14,11,11,11,17,11,11,12,16,11,11,11,13,10,13,11,11,11,11,11,11,10,11,11,13,16,13,11,16,13,13,13,16,13,13,13,16,11,
|
|
28
|
+
15,15,15,14,15,15,15,15,15,15,15,14,11,11,17,17,17,11,11,12,13,11,11,13,10,10,10,13,11,11,11,11,10,10,10,11,11,16,11,11,11,16,13,16,13,16,13,16,13,11,
|
|
29
|
+
15,11,15,17,15,14,15,15,16,15,14,11,11,11,11,11,11,11,11,12,11,11,13,10,10,13,10,10,13,10,10,10,10,13,10,10,10,13,13,14,11,11,16,13,13,13,16,13,13,11,
|
|
30
|
+
15,16,15,15,15,15,11,10,15,14,11,11,11,11,11,11,11,11,16,12,11,11,11,13,10,10,10,13,11,11,11,11,10,10,10,11,11,14,13,13,14,11,11,16,13,16,13,16,13,11,
|
|
31
|
+
15,15,10,15,13,15,15,15,14,14,11,11,11,16,16,11,11,11,15,12,11,11,11,11,13,10,13,11,11,11,11,11,11,10,11,11,11,11,14,13,13,14,11,11,16,13,13,13,16,11,
|
|
32
|
+
15,15,14,15,15,15,16,15,15,14,11,11,16,16,16,16,11,11,11,12,16,11,11,11,11,13,11,11,11,11,17,11,11,10,11,11,17,11,11,14,13,13,14,11,11,16,13,16,13,11,
|
|
33
|
+
10,15,15,15,16,15,15,17,15,14,11,16,16,16,16,16,16,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,16,15,16,11,11,11,11,11,14,13,13,14,11,11,16,13,13,11,
|
|
34
|
+
13,15,15,15,15,10,15,14,15,14,11,16,16,16,16,16,16,11,11,12,16,10,10,10,10,10,10,10,10,10,10,10,16,15,16,11,11,11,11,10,11,14,13,13,14,11,11,16,13,11,
|
|
35
|
+
15,14,15,14,15,15,15,15,15,14,11,11,16,16,16,16,11,11,10,12,11,11,11,11,11,11,11,11,11,11,11,11,16,15,16,11,11,11,10,10,11,11,14,13,13,14,11,11,16,11,
|
|
36
|
+
15,15,15,15,16,14,14,14,14,14,11,11,11,16,16,11,11,10,10,12,11,16,16,16,16,16,16,16,11,11,11,11,16,15,16,11,11,11,10,10,10,11,11,14,13,13,14,15,15,11,
|
|
37
|
+
17,16,10,15,14,16,16,16,16,16,14,11,11,11,11,11,10,10,10,12,11,11,11,11,15,11,11,11,16,11,16,11,16,15,16,11,11,10,11,10,10,11,11,11,14,13,10,10,10,11,
|
|
38
|
+
15,15,15,15,14,13,16,16,16,13,14,12,12,13,12,12,12,12,12,12,11,11,11,11,15,11,11,11,11,16,11,11,16,15,16,11,11,10,11,10,10,10,11,11,11,10,11,10,10,11,
|
|
39
|
+
15,16,15,14,15,14,14,16,14,14,11,12,11,15,11,11,16,11,11,11,11,11,11,11,15,11,11,11,16,11,11,11,13,15,16,11,10,11,11,11,10,10,11,11,11,10,11,10,10,11,
|
|
40
|
+
10,15,15,15,15,14,10,13,15,15,15,15,15,15,15,15,13,10,10,10,10,10,16,16,15,16,16,11,11,16,11,10,15,16,11,11,10,10,10,10,10,10,10,11,11,10,11,10,10,11,
|
|
41
|
+
15,15,15,15,14,10,10,14,11,11,16,12,16,11,11,11,10,11,11,11,11,11,14,16,16,16,14,11,16,11,11,10,14,11,11,10,10,11,11,11,11,10,10,11,11,10,11,10,10,11,
|
|
42
|
+
15,14,13,14,10,10,14,11,16,11,16,12,16,11,11,13,11,16,11,16,16,16,11,14,16,14,11,11,11,16,11,10,10,11,10,10,10,10,11,11,10,10,10,10,11,10,11,10,10,11,
|
|
43
|
+
15,13,14,10,10,14,13,11,16,11,16,12,16,11,13,13,11,11,11,11,11,16,11,11,15,15,11,11,16,11,11,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10,11,10,10,11,
|
|
44
|
+
13,14,10,10,14,11,13,11,16,11,16,12,16,13,13,13,13,13,13,13,11,16,11,11,15,11,11,16,11,16,11,10,10,10,10,11,11,11,11,11,11,11,11,11,11,10,11,10,10,11,
|
|
45
|
+
14,10,10,14,16,11,13,11,16,11,16,12,16,11,13,13,11,11,11,11,11,16,11,11,15,11,16,11,11,11,16,11,10,10,10,10,11,11,11,11,11,11,17,11,11,10,11,10,10,11,
|
|
46
|
+
11,10,14,11,11,11,13,15,15,15,16,12,11,16,11,13,11,16,11,16,16,16,11,11,16,11,11,16,11,16,11,16,11,10,10,10,10,11,11,11,11,11,11,11,11,10,11,10,10,11,
|
|
47
|
+
11,10,10,14,13,13,13,13,13,11,16,12,11,17,16,11,11,11,11,11,11,11,11,15,15,15,11,11,16,11,11,11,16,11,10,10,10,11,11,11,11,11,11,11,11,10,11,10,10,11,
|
|
48
|
+
11,13,10,10,14,13,13,13,11,11,16,12,11,17,17,16,11,11,11,11,11,11,15,15,15,15,15,11,11,16,11,16,11,11,11,14,10,11,11,11,13,16,16,16,11,10,11,10,10,11,
|
|
49
|
+
11,10,13,10,10,14,13,11,17,11,11,10,11,17,17,17,16,17,17,17,11,15,15,15,15,15,15,15,11,11,16,11,16,11,11,10,10,11,11,11,16,16,16,16,11,10,11,10,10,11,
|
|
50
|
+
11,10,10,10,10,10,14,17,17,11,16,16,16,11,11,11,11,16,17,17,11,15,15,15,13,15,15,15,11,16,11,11,11,10,10,10,10,11,11,11,15,15,15,15,15,15,11,10,10,11,
|
|
51
|
+
11,10,12,13,10,10,10,14,17,11,12,15,12,11,16,11,13,11,16,17,11,15,15,15,10,15,15,15,11,11,11,10,10,10,10,10,11,11,11,13,10,10,10,10,11,10,10,10,10,11,
|
|
52
|
+
11,10,11,12,13,10,10,10,14,11,10,10,10,11,11,11,13,13,11,16,11,15,15,15,10,15,15,15,11,11,11,10,10,10,10,11,11,11,13,10,10,10,11,11,11,10,11,11,11,11,
|
|
53
|
+
11,10,11,11,12,12,10,10,10,11,10,15,13,13,13,13,13,13,13,11,15,15,15,10,10,10,15,15,11,11,10,10,10,14,11,11,11,11,13,10,10,11,11,11,11,10,11,11,11,11,
|
|
54
|
+
11,10,11,11,11,12,13,10,10,11,10,12,14,11,11,11,13,13,11,15,15,15,10,10,10,10,10,11,11,11,10,10,10,10,11,11,11,13,10,10,11,11,11,11,10,10,10,11,11,11,
|
|
55
|
+
11,17,12,12,12,12,12,13,10,11,11,10,16,11,16,11,13,11,15,15,15,13,10,10,10,10,11,11,11,10,10,10,10,10,10,10,10,10,10,10,11,11,11,10,10,10,10,10,11,11,
|
|
56
|
+
11,11,11,16,11,11,11,11,11,11,11,16,14,11,11,11,11,15,15,15,10,10,10,10,10,11,11,17,11,10,10,10,10,10,10,10,10,10,10,11,11,11,10,10,10,10,10,10,10,11,
|
|
57
|
+
11,18,15,15,15,15,15,15,15,15,10,13,10,15,15,15,15,15,15,10,10,10,10,10,11,11,17,17,11,13,13,13,13,13,13,13,11,11,11,11,11,11,10,10,10,13,10,10,10,11,
|
|
58
|
+
11,11,10,14,11,11,11,11,11,11,10,16,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
|
|
59
|
+
</data>
|
|
60
|
+
</layer>
|
|
61
|
+
</map>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|