Commit Graph

71 Commits

Author SHA1 Message Date
John McCardle 9bd1561bfc 🎉 ALPHA 0.1 ACHIEVED! Update ROADMAP to reflect alpha release
- Mark project as Alpha 0.1 complete
- Move RenderTexture (#6) to Beta (not essential for Alpha)
- All 6 original alpha blockers resolved:
  * Animation system (#59)
  * Z-order rendering (#63)
  * Python Sequence Protocol (#69)
  * New README (#47)
  * Removed deprecated methods (#2, #3)
- Ready for alpha release and merge to main!

The engine now has:
- Full Python scripting with game loop integration
- Complete UI system with animations
- Proper z-order rendering
- Python sequence protocol for collections
- Automation API for testing
- Headless mode support
- Cross-platform CMake build

🍾 Time to celebrate - McRogueFace Alpha 0.1 is ready!
2025-07-05 11:20:07 -04:00
John McCardle 43321487eb Update ROADMAP.md: Mark Issue #63 (z-order rendering) as complete
- Add z-order rendering to recent achievements
- Update alpha blocker count from 3 to 2
- Archive z-order test files
- Next priority: RenderTexture concept (#6) - last major alpha blocker
2025-07-05 10:36:09 -04:00
John McCardle 90c318104b Fix Issue #63: Implement z-order rendering with dirty flag optimization
- Add dirty flags to PyScene and UIFrame to track when sorting is needed
- Implement lazy sorting - only sort when z_index changes or elements are added/removed
- Make Frame children respect z_index (previously rendered in insertion order only)
- Update UIDrawable::set_int to notify when z_index changes
- Mark collections dirty on append, remove, setitem, and slice operations
- Remove per-frame vector copy in PyScene::render for better performance

Performance improvement: Static scenes now use O(1) check instead of O(n log n) sort every frame

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 10:34:06 -04:00
John McCardle 2a48138011 Update ROADMAP.md to reflect completion of Issue #69 (Sequence Protocol)
- Mark Issue #69 as complete in all sections
- Add achievement entry for Python Sequence Protocol implementation
- Update alpha blockers count: 3 remaining (was 4)
- Update total open issues: 62 (was 63)
- Next priorities: Z-order rendering (#63) or RenderTexture (#6)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 02:00:12 -04:00
John McCardle e4482e7189 Implement complete Python Sequence Protocol for collections (closes #69)
Major implementation of the full sequence protocol for both UICollection
and UIEntityCollection, making them behave like proper Python sequences.

Core Features Implemented:
- __setitem__ (collection[i] = value) with type validation
- __delitem__ (del collection[i]) with proper cleanup
- __contains__ (item in collection) by C++ pointer comparison
- __add__ (collection + other) returns Python list
- __iadd__ (collection += other) with full validation before modification
- Negative indexing support throughout
- Complete slice support (getting, setting, deletion)
- Extended slices with step \!= 1
- index() and count() methods
- Type safety enforced for all operations

UICollection specifics:
- Accepts Frame, Caption, Sprite, and Grid objects only
- Preserves z_index when replacing items
- Auto-assigns z_index on append (existing behavior maintained)

UIEntityCollection specifics:
- Accepts Entity objects only
- Manages grid references on add/remove/replace
- Uses std::list iteration with std::advance()

Also includes:
- Default value support for constructors:
  - Caption accepts None for font (uses default_font)
  - Grid accepts None for texture (uses default_texture)
  - Sprite accepts None for texture (uses default_texture)
  - Entity accepts None for texture (uses default_texture)

This completes Issue #69, removing it as an Alpha Blocker.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 01:58:03 -04:00
John McCardle 38d44777f5 Update ROADMAP.md to reflect completion of Issue #59 (Animation System)
- Mark Animation system as complete in all relevant sections
- Update alpha blockers count from 7 to 4
- Add animation system architectural decisions
- Update project status and next priorities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 00:58:41 -04:00
John McCardle 70cf44f8f0 Implement comprehensive animation system (closes #59)
- Add Animation class with 30+ easing functions (linear, ease in/out, quad, cubic, elastic, bounce, etc.)
- Add property system to all UI classes for animation support:
  - UIFrame: position, size, colors (including individual r/g/b/a components)
  - UICaption: position, size, text, colors
  - UISprite: position, scale, sprite_number (with sequence support)
  - UIGrid: position, size, camera center, zoom
  - UIEntity: position, sprite properties
- Create AnimationManager singleton for frame-based updates
- Add Python bindings through PyAnimation wrapper
- Support for delta animations (relative values)
- Fix segfault when running scripts directly (mcrf_module initialization)
- Fix headless/windowed mode behavior to respect --headless flag
- Animations run purely in C++ without Python callbacks per frame

All UI properties are now animatable with smooth interpolation and professional easing curves.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 00:56:42 -04:00
John McCardle dd3c64784d Mark Issue #47 (Alpha README) as completed in ROADMAP
Documentation has been comprehensively updated for the Alpha release.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 06:59:29 -04:00
John McCardle 05bddae511 Update comprehensive documentation for Alpha release (Issue #47)
- Completely rewrote README.md to reflect 7DRL 2025 success and current features
- Updated GitHub Pages documentation site with:
  - Modern landing page highlighting Crypt of Sokoban
  - Comprehensive API reference (2700+ lines) with exhaustive examples
  - Updated getting-started guide with installation and first game tutorial
  - 8 detailed tutorials covering all major game systems
  - Quick reference cheat sheet for common operations
- Generated documentation screenshots showing UI elements
- Fixed deprecated API references and added new features
- Added automation API documentation
- Included Python 3.12 requirement and platform-specific instructions

Note: Text rendering in headless mode has limitations for screenshots

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 06:59:02 -04:00
John McCardle 0d26d51bc3 Compress ROADMAP.md and archive completed test files
- Condensed 'Today's Achievements' section for clarity
- Archived 9 completed test files from bug fixing session
- Updated task completion status for issues fixed today
- Identified 5 remaining Alpha blockers as next priority

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 23:05:30 -04:00
John McCardle af6a5e090b Update ROADMAP.md to reflect completion of Issues #2 and #3
- Marked both issues as completed with the removal of deprecated action system
- Updated open issue count from ~50 to ~48
- These were both Alpha blockers, bringing us closer to release

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 21:43:58 -04:00
John McCardle 281800cd23 Remove deprecated registerPyAction/registerInputAction system (closes #2, closes #3)
This is our largest net-negative commit yet\! Removed the entire deprecated
action registration system that provided unnecessary two-step indirection:
keyboard → action string → Python callback

Removed components:
- McRFPy_API::_registerPyAction() and _registerInputAction() methods
- McRFPy_API::callbacks map for storing Python callables
- McRFPy_API::doAction() method for executing callbacks
- ACTIONPY macro from Scene.h for detecting "_py" suffixed actions
- Scene::registerActionInjected() and unregisterActionInjected() methods
- tests/api_registerPyAction_issue2_test.py (tested deprecated functionality)

The game now exclusively uses keypressScene() for keyboard input handling,
which is simpler and more direct. Also commented out the unused _camFollow
function that referenced non-existent do_camfollow variable.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 21:43:22 -04:00
John McCardle cc8a7d20e8 Clean up temporary test files 2025-07-03 21:13:59 -04:00
John McCardle ff83fd8bb1 Update ROADMAP.md to reflect massive progress today
- Fixed 12+ critical bugs in a single session
- Implemented 3 missing features (Entity.index, EntityCollection.extend, sprite validation)
- Updated Phase 1 progress showing 11 of 12 items complete
- Added detailed summary of today's achievements with issue numbers
- Emphasized test-driven development approach used throughout
2025-07-03 21:13:46 -04:00
John McCardle dae400031f Remove deprecated player_input and turn-based functions for Issue #3
Removed the commented-out player_input(), computerTurn(), and playerTurn()
functions that were part of the old turn-based system. These are no longer
needed as input is now handled through Scene callbacks.

Partial fix for #3
2025-07-03 21:12:29 -04:00
John McCardle cb0130b46e Implement sprite index validation for Issue #33
Added validation to prevent setting sprite indices outside the valid
range for a texture. The implementation:
- Adds getSpriteCount() method to PyTexture to expose total sprites
- Validates sprite_number setter to ensure index is within bounds
- Provides clear error messages showing valid range
- Works for both Sprite and Entity objects

closes #33
2025-07-03 21:09:06 -04:00
John McCardle 1e7f5e9e7e Implement EntityCollection.extend() method for Issue #27
Added extend() method to EntityCollection that accepts any iterable
of Entity objects and adds them all to the collection. The method:
- Accepts lists, tuples, generators, or any iterable
- Validates all items are Entity objects
- Sets the grid association for each added entity
- Properly handles errors and empty iterables

closes #27
2025-07-03 21:05:47 -04:00
John McCardle 923350137d Implement Entity.index() method for Issue #73
Added index() method to Entity class that returns the entity's
position in its parent grid's entity collection. This enables
proper entity removal patterns using entity.index().
2025-07-03 21:02:14 -04:00
John McCardle 6134869371 Add validation to keypressScene() for non-callable arguments
Added PyCallable_Check validation to ensure keypressScene() only
accepts callable objects. Now properly raises TypeError with a
clear error message when passed non-callable arguments like
strings, numbers, None, or dicts.
2025-07-03 20:41:03 -04:00
John McCardle 4715356b5e Fix Sprite texture setter 'error return without exception set'
Implemented the missing UISprite::set_texture method to properly:
- Validate the input is a Texture instance
- Update the sprite's texture using setTexture()
- Return appropriate error messages for invalid inputs

The setter now works correctly and no longer returns -1 without
setting an exception.
2025-07-03 20:31:36 -04:00
John McCardle 6dd1cec600 Fix Entity property setters and PyVector implementation
Fixed the 'new style getargs format' error in Entity property setters by:
- Implementing PyObject_to_sfVector2f/2i using PyVector::from_arg
- Adding proper error checking in Entity::set_position
- Implementing PyVector get_member/set_member for x/y properties
- Fixing PyVector::from_arg to handle non-tuple arguments correctly

Now Entity.pos and Entity.sprite_number setters work correctly with
proper type validation.
2025-07-03 20:27:32 -04:00
John McCardle f82b861bcd Fix Issue #74: Add missing Grid.grid_y property
Added individual grid_x and grid_y getter properties to the Grid class
to complement the existing grid_size property. This allows direct access
to grid dimensions and fixes error messages that referenced these
properties before they existed.

closes #74
2025-07-03 19:48:33 -04:00
John McCardle 59e6f8d53d Fix Issue #78: Middle mouse click no longer sends 'C' keyboard event
The bug was caused by accessing event.key.code on a mouse event without
checking the event type first. Since SFML uses a union for events, this
read garbage data. The middle mouse button value (2) coincidentally matched
the keyboard 'C' value (2), causing the spurious keyboard event.

Fixed by adding event type check before accessing key-specific fields.
Only keyboard events (KeyPressed/KeyReleased) now trigger key callbacks.

Test added to verify middle clicks no longer generate keyboard events.

Closes #78
2025-07-03 19:42:32 -04:00
John McCardle 1c71d8d4f7 Fix Grid to support None/null texture and fix error message bug
- Allow Grid to be created with None as texture parameter
- Use default cell dimensions (16x16) when no texture provided
- Skip sprite rendering when texture is null, but still render colors
- Fix issue #77: Corrected copy/paste error in Grid.at() error messages
- Grid now functional for color-only rendering and entity positioning

Test created to verify Grid works without texture, showing colored cells.

Closes #77
2025-07-03 19:40:42 -04:00
John McCardle 18cfe93a44 Fix --exec interactive prompt bug and create comprehensive test suite
Major fixes:
- Fixed --exec entering Python REPL instead of game loop
- Resolved screenshot transparency issue (requires timer callbacks)
- Added debug output to trace Python initialization

Test suite created:
- 13 comprehensive tests covering all Python-exposed methods
- Tests use timer callback pattern for proper game loop interaction
- Discovered multiple critical bugs and missing features

Critical bugs found:
- Grid class segfaults on instantiation (blocks all Grid functionality)
- Issue #78 confirmed: Middle mouse click sends 'C' keyboard event
- Entity property setters have argument parsing errors
- Sprite texture setter returns improper error
- keypressScene() segfaults on non-callable arguments

Documentation updates:
- Updated CLAUDE.md with testing guidelines and TDD practices
- Created test reports documenting all findings
- Updated ROADMAP.md with test results and new priorities

The Grid segfault is now the highest priority as it blocks all Grid-based functionality.
2025-07-03 19:25:49 -04:00
John McCardle 9ad0b6850d Update ROADMAP.md to reflect Python interpreter and automation API progress
- Mark #32 (Python interpreter behavior) as 90% complete
  - All major Python flags implemented: -h, -V, -c, -m, -i
  - Script execution with proper sys.argv handling works
  - Only stdin (-) support missing

- Note that new automation API enables:
  - Automated UI testing capabilities
  - Demo recording and playback
  - Accessibility testing support

- Flag issues #53 and #45 as potentially aided by automation API
2025-07-03 15:55:24 -04:00
John McCardle 7ec4698653 Update ROADMAP.md to remove closed issues
- Remove #72 (iterator improvements - closed)
- Remove #51 (UIEntity derive from UIDrawable - closed)
- Update issue counts: 64 open issues from original 78
- Update dependencies and references to reflect closed issues
- Clarify that core iterators are complete, only grid points remain
2025-07-03 14:57:59 -04:00
John McCardle 68c1a016b0 Implement --exec flag and PyAutoGUI-compatible automation API
- Add --exec flag to execute multiple scripts before main program
- Scripts are executed in order and share Python interpreter state
- Implement full PyAutoGUI-compatible automation API in McRFPy_Automation
- Add screenshot, mouse control, keyboard input capabilities
- Fix Python initialization issues when multiple scripts are loaded
- Update CommandLineParser to handle --exec with proper sys.argv management
- Add comprehensive examples and documentation

This enables automation testing by allowing test scripts to run alongside
games using the same Python environment. The automation API provides
event injection into the SFML render loop for UI testing.

Closes #32 partially (Python interpreter emulation)
References automation testing requirements
2025-07-03 14:27:01 -04:00
John McCardle 763fa201f0 Python command emulation 2025-07-03 10:46:21 -04:00
John McCardle a44b8c93e9 Prep: Cleanup for interpreter mode 2025-07-03 09:42:46 -04:00
John McCardle 167636ce8c Iterators, other Python C API improvements
closes #72
ref #69 - this resolves the "UICollection" (not "UIEntityCollection", perhaps renamed since the issue opened) and "UIEntityCollection" portion. The Grid point based iterators were not updated.
**RPATH updates**
Will this RPATH setting allow McRogueFace to execute using its included "lib" subdirectory after being unzipped on a new computer?

The change from "./lib" to "$ORIGIN/./lib" improves portability. The $ORIGIN token is a special Linux/Unix convention that refers to the directory containing the executable itself. This makes the path relative to the executable's location rather than the current working directory, which means McRogueFace will correctly find its libraries in the lib subdirectory regardless of where it's run from after being unzipped on a new computer.

**New standard object initialization**
PyColor, PyVector
  - Fixed all 15 PyTypeObject definitions to use proper designated initializer syntax
  - Replaced PyType_GenericAlloc usage in PyColor.cpp and PyVector.cpp
  - Updated PyObject_New usage in UIEntity.cpp
  - All object creation now uses module-based type lookups instead of static references
  - Created centralized utilities in PyObjectUtils.h

**RAII Wrappers**
automatic reference counting via C++ object lifecycle
  - Created PyRAII.h with PyObjectRef and PyTypeRef classes
  - These provide automatic reference counting management
  - Updated PyColor::from_arg() to demonstrate RAII usage
  - Prevents memory leaks and reference counting errors

**Python object base in type defs:**
`.ob_base = {.ob_base = {.ob_refcnt = 1, .ob_type = NULL}, .ob_size = 0}`
PyColor, PyTexture, PyVector, UICaption, UICollection, UIEntity, UIFrame, UIGrid

**convertDrawableToPython**
replace crazy macro to detect the correct Python type of a UIDrawable instance

  - Removed the problematic macro from UIDrawable.h
  - Created template-based functions in PyObjectUtils.h
  - Updated UICollection.cpp to use local helper function
  - The new approach is cleaner, more debuggable, and avoids static type references

**Iterator fixes**
tp_iter on UICollection, UIGrid, UIGridPoint, UISprite
UIGrid logic improved, standard

**List vs Vector usage analysis**
there are different use cases that weren't standardized:
  - UICollection (for Frame children) uses std::vector<std::shared_ptr<UIDrawable>>
  - UIEntityCollection (for Grid entities) uses std::list<std::shared_ptr<UIEntity>>

The rationale is currently connected to frequency of expected changes.
* A "UICollection" is likely either all visible or not; it's also likely to be created once and have a static set of contents. They should be contiguous in memory in hopes that this helps rendering speed.
* A "UIEntityCollection" is expected to be rendered as a subset within the visible rectangle of the UIGrid. Scrolling the grid or gameplay logic is likely to frequently create and destroy entities. In general I expect Entity collections to have a much higher common size than UICollections. For these reasons I've made them Lists in hopes that they never have to be reallocated or moved during a frame.
2025-05-31 09:11:51 -04:00
John McCardle f594998dc3 Final day of changes for 7DRL 2025 - Crypt of Sokoban game code 2025-03-12 22:42:26 -04:00
John McCardle 5b259d0b38 Moving console access to python side, so Windows users won't brick their session. 2025-03-08 21:12:40 -05:00
John McCardle cea084bddf Whoops, never commited the UI icons spritesheet 2025-03-08 20:33:55 -05:00
John McCardle dd2db1586e Whoops, never committed the tile config 2025-03-08 20:31:34 -05:00
John McCardle 6be474da08 7DRL 2025 progress 2025-03-08 10:42:17 -05:00
John McCardle e928dda4b3 Squashed: grid-entity-integration partial features for 7DRL 2025 deployment
This squash commit includes changes from April 21st through 28th, 2024, and the past 3 days of work at 7DRL.
Rather than resume my feature branch work, I made minor changes to safe the C++ functionality and wrote workarounds in Python.

I'm very likely to delete this commit from history by rolling master back to the previous commit, and squash merging a finished feature branch.
2025-03-05 20:26:04 -05:00
John McCardle 232105a893 Squashed commit of the following: [reprs_and_member_names]
Closes #22
Closes #23
Closes #24
Closes #25
Closes #31
Closes #56

commit 43fac8f4f3
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 20 18:32:52 2024 -0400

    Typo in UIFrame repr

commit 3fd5ad93e2
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 20 18:32:30 2024 -0400

    Add UIGridPoint and UIGridPointState repr

commit 03376897b8
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 20 18:32:17 2024 -0400

    Add UIGrid repr

commit 48af072a33
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 20 18:32:05 2024 -0400

    Add UIEntity repr
2024-04-20 18:33:18 -04:00
John McCardle c2de9b08d6 Refactor: remove "s" prefix from "sRender" method ( -> "render") Closes #44 2024-04-20 14:16:14 -04:00
John McCardle a465a9861d Color parsing for UICaption __init__ - closes #58 2024-04-20 13:37:19 -04:00
John McCardle ac7f7052cd Squashed commit of the following: [break_up_ui_h]
Closes #43

No segfault found in cos_play after completing the checklist. Maybe I accidentally fixed it...?

commit 6aa151aba3
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Apr 19 21:43:58 2024 -0400

    UISprite.h/.cpp cleanup

commit ec0374ef50
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Apr 19 21:37:39 2024 -0400

    UIGridPoint.h/.cpp reorganization

commit 2cb7339535
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Apr 19 21:19:25 2024 -0400

    UIGrid.h/.cpp cleanup. I have reservations about the UIEntityCollection[Iter] classes + methods living there, but not enough to fix it right now.

commit 5d6af324bf
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Apr 18 22:14:57 2024 -0400

    UIFrame - moving static method into class namespace; no type object access

commit 567218cd7b
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Apr 18 21:23:49 2024 -0400

    UIEntity fixes for the UI.h split: There are segfaults in cos_play, I may have missed a type usage or something

commit 76693acd28
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 13 00:18:37 2024 -0400

    delete leftover comments

commit 9efe998a33
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Apr 13 00:17:43 2024 -0400

    some work on UICaption and UICollection; fixing segfaults resulting from mcrfpydef namepace TypeObject usage

commit 714965da45
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Apr 12 14:15:00 2024 -0400

    eliminate extra includes on UICaption

commit 8efa25878f
Author: John McCardle <mccardle.john@gmail.com>
Date:   Wed Apr 10 23:41:14 2024 -0400

    remove a lot of stuff

commit c186d8c7f3
Author: John McCardle <mccardle.john@gmail.com>
Date:   Wed Apr 10 23:10:15 2024 -0400

    We are compiling again! Started refactoring UICaption to be more idiomatic

commit 1b6e2a709b
Author: John McCardle <mccardle.john@gmail.com>
Date:   Tue Apr 9 22:42:02 2024 -0400

    Still not quite compiling; as predicted, a lot of interdependency and definition order bugs to untangle

commit aa7553a818
Author: John McCardle <mccardle.john@gmail.com>
Date:   Tue Apr 9 22:41:20 2024 -0400

    PyTexture clean up scribbles and experiments

commit c0201d989a
Author: John McCardle <mccardle.john@gmail.com>
Date:   Mon Apr 8 22:55:00 2024 -0400

    additional unsaved changes

commit 83a63a3093
Author: John McCardle <mccardle.john@gmail.com>
Date:   Mon Apr 8 22:45:00 2024 -0400

    doesn't compile, but UI.h/.cpp code has been divvy'd up.

    refs #43 @2h
2024-04-20 10:32:04 -04:00
John McCardle 1a7186f745 Squashed commit of the following: [standardize_font_handling]
closes #60, closes #5, closes #68

The major functionality added here was proper use of types in the module, by importing after finalization.

commit 5009fa0fb9
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Apr 7 22:44:15 2024 -0400

    PyFont - use the new standard method for instancing

commit a19781b56a
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Apr 7 15:21:17 2024 -0400

    Many hours of pain & research behind this small commit. Safe object building by not messing with types before interpreter is fully initialized

commit 159658521c
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 31 21:41:45 2024 -0400

    Font mostly working, just a few weird bugs with the types of the default items added to the module
2024-04-07 22:51:31 -04:00
John McCardle fbf263a038 Squashed commit of the following: [standardize_vector_handling]
closes #13

Deferring class standardization for the UI.h overhaul.

commit 5edebdd643
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 31 14:21:07 2024 -0400

    PyVector init should be pretty reliable now

commit c13e185289
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 31 13:51:29 2024 -0400

    PyColor fix - Init corrections

commit 8871f6be6e
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 30 22:51:55 2024 -0400

    Parse arguments: no args & Vector object args work, tuples and bare numerics still do not

commit 1c12e8719c
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 30 22:32:28 2024 -0400

    Not bad for a quick first salvo, but I cannot figure out why init isn't cooperating.
2024-03-31 18:00:19 -04:00
John McCardle f82508b753 Squashed commit of the following: [standardize_color_handling]
closes #11

Check the abandoned feature branch for PyLinkedColor, a time-expensive but now abandoned feature to link a color value to a UIDrawable.

There are some TODOs left in the PyColor class, but that can go under cleanup. I'm way over time on this, so I'm taking a small victory :)

commit 572aa52605
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 30 21:18:26 2024 -0400

    More color table updates

commit 01706bd59d
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 30 21:13:31 2024 -0400

    Color wrapup... Cutting PyLinkedColor to simplify my cursedly mortal, finite existence

commit 3991ac13d6
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 28 23:50:50 2024 -0400

    Still having segfaults with LinkedColor and captions (specifically outline color, but that might not be the actual cause). PyColor shaping back up in simplified form.

commit 06e24a1b27
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 28 20:53:49 2024 -0400

    LinkedColor now reflecting changes to the linked color value. Needs set method + RGBA / color properties

commit 41509dfe96
Author: John McCardle <mccardle.john@gmail.com>
Date:   Wed Mar 27 21:10:03 2024 -0400

    Addressing issues with PyColor by splitting behavior off into PyLinkedColor

commit 13a4ddf41b
Author: John McCardle <mccardle.john@gmail.com>
Date:   Tue Mar 26 23:02:00 2024 -0400

    Build runs again. PyColor objects are being instantiated, with bugs and no test of color changing

commit 1601fc7fab
Author: John McCardle <mccardle.john@gmail.com>
Date:   Mon Mar 25 20:48:08 2024 -0400

    Still doesn't compile, but now the issue is in UI.h overcoupling. Progress!

commit 13672c8fdb
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 24 21:19:37 2024 -0400

    Dabbling around this morning; still not building

commit 79090b553f
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 24 08:36:06 2024 -0400

    Unsaved changes from last night

commit 2cac6f03c6
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 23 23:07:10 2024 -0400

    untested PyColor base implementation

commit 3728e5fcc8
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 23 23:06:36 2024 -0400

    Color naming prototype
2024-03-30 21:20:40 -04:00
John McCardle 4ffe438d1b Squashed commit of the following: [standardize_texture_handling]
closes #18

commit b114ec3085
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 21 22:22:35 2024 -0400

    cleaning up for merge

commit d7228172c4
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 21 21:39:15 2024 -0400

    Messy, but monumental: PyTexture::pyObject works

    this also coincidentally fixes a weird bug I encountered while
    (mis?)using tp_alloc: by using PyType_GenericAlloc, I avoid the segfault
    that tp_alloc sometimes causes. See the horrible UIDrawable retrieval
    macro that I use in UI.h for a workaround that can probably be replaced
    with this technique

commit 2cf8f94310
Author: John McCardle <mccardle.john@gmail.com>
Date:   Wed Mar 20 21:16:52 2024 -0400

    Radical new example pattern for exposing a C++ class to Python

commit 84a8886da2
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 17 16:29:33 2024 -0400

    Fixed render issue with UIGrid / PyTexture: wasn't positioning or scaling properly after fetching sprite

commit 20f80c4114
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 17 16:23:52 2024 -0400

    Fixed sprite indexing error in PyTexture; needs non-square sprite tests, but feeling confident!

commit afd4ff1925
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 21:53:24 2024 -0400

    good progress, we're building again. Issue with Grid (tile sprite) textures and I think the sprite indexes are being calculated wrong (x and y transposed?)

commit bfd33102d1
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 14:52:35 2024 -0400

    Squashed basically all the compile bugs in UISprite, but UIEntity and UIGrid use textures as well, so they need to be fixed too before the project will build again

commit 47d0e34a17
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 11:31:39 2024 -0400

    Initial PyTexture class

    no testing done.
    should enable rectangular (non-square) textures

    "sprite" method; let's just overwrite sprites with texture coords
    Hoping to replace awful code like:
    `self->data->sprite.sprite.setTextureRect(self->data->sprite.itex->spriteCoordinates(val));`

    with something like:
    `self->data->sprite = self->data->texture->sprite(val);`
2024-03-21 22:24:42 -04:00
John McCardle cdaf309272 Squashed commit of the following: [raii_pyobjects]
closes #4

commit 8f060dc87b
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Mar 15 22:20:03 2024 -0400

    Removing std::cout debugging statements

commit c9d5251c71
Author: John McCardle <mccardle.john@gmail.com>
Date:   Fri Mar 15 20:00:57 2024 -0400

    In-place map modification worked

commit 0a8f67e391
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 14 23:13:13 2024 -0400

    Stress test is failing: By removing a timer to a function (from inside that function?) I can immediately cause a segfault.

commit 05d9f6a882
Author: John McCardle <mccardle.john@gmail.com>
Date:   Tue Mar 12 22:27:12 2024 -0400

    wow, good test of Key and Click Callable classes. Cleanup, squash, and merge after I give it a lookover in daylight, though.

commit 972768eb26
Author: John McCardle <mccardle.john@gmail.com>
Date:   Tue Mar 12 21:02:48 2024 -0400

    inital PyCallable work; isolate very well behaved usage of PyObject references behind RAII
2024-03-15 22:20:37 -04:00
John McCardle 2c3c1449ee chore: changing comments to reflect TODOs conversion to issues 2024-03-12 21:03:39 -04:00
John McCardle 8739da8463 Easy cleanup: delete files from the old Entity & UI system that were replaced in EngJam 2023 & 7DRL 2024 2024-03-09 08:59:39 -05:00
John McCardle 45f07b7226 Crypt of Sokoban: incomplete 7DRL game and engine stress-test 2024-03-08 22:26:40 -05:00
John McCardle 9eb9562b9f default debug action fixes: UITestScene now uses the same grave hotkey to start REPL 2024-03-08 22:25:48 -05:00