Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 322282348065f6283419ed2884cd1a0a2ffd270c
parent 8e94cb26b3ced79925b5c31bfec7ad48681f415f
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Sun, 29 Nov 2020 23:49:28 -0600

comment cleanup and fixed face drag glitch

Diffstat:
Mmain.py | 9---------
Msrc/interface.py | 2+-
2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/main.py b/main.py @@ -2,12 +2,6 @@ import pygame from src import game ## GLOBAL TODO: -# 2. The JSON loading methods are all over the place. Need to decide about whether or not things like units should be defined in individual JSONs and -# referenced by a big meta JSON or if there should just be many individual JSONs for that. One problem with it is that when saving is implemented -# there will have to be a way to distinguish between the basic versions of a unit and the ones that are leveled up. Maybe JSONs are not the correct -# choice altogether. Perhaps there should be one huge save.json file for all changes. If that is so, then there could be several JSONs in the dir -# located at data/json that are loaded first, then the save.json file is parsed by a save-load subsystem and any changes are applied, at which point -# the game would be in a loaded state. This seems the ideal solution, and it can be put off a bit. # 3. Implement the "draw()" functionality of DirtySprite for all VGOs, which will be done in anything that manages a LayeredDirty group, e.g. in the # EntityManager object. # 6. Implement the pre-rendered cutscene playing methodology using Pyglet as described here: http://www.sbirch.net/tidbits/pygame_video.html @@ -22,9 +16,6 @@ from src import game # by the custom_flags vals. There should be a universal method for creating overlay entities, which you pass values to to determine their # custom_flags and images, as well as a universal method for fetching entities from the overlay list. Functionally, moving and attacking are # the same as far as the BoardManager and its overlay, so generalizing this method will probably be very useful when implementing tactics. -# 9. Animations should not be image-file-specific. Rather, a field should be added to sheets.json entries called "anim" which will point to a -# specific entry in the anims.json file. These entries can then be generalized for entire classes of spritesheets (in particular for piece sprite -# sheets). This will require a rewrite of anims.json and a modification to the sheet manager. # Initialization of pygame and submodules pygame.mixer.pre_init(44100, -16, 4, 1024) diff --git a/src/interface.py b/src/interface.py @@ -207,7 +207,7 @@ class GameInterface(subsystem.GameSubsystem): ap.facing = FACE_DIR.U else: ap.facing = FACE_DIR.D - ap.set_animation(self.bus.fetch("sheet_manager", "animations")[ap.sheet.name]["stand_" + ap.facing.name], True) + ap.set_animation(ap.sheet.animations["stand_" + ap.facing.name], True) # Scroll camera if self.game.control_mode in (CTRL_MODES.Turn_Normal, CTRL_MODES.Turn_Select_Move, CTRL_MODES.Turn_Select_Attack):