Hello, we apologize but forum registrations are non-functional at this time. This issue should be fixed around mid-December. Until then, please stop by our Discord channel if you'd like to get in touch with the team. Thanks!

Subversion Commit Log

For discussion of the code running behind the game

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Wed Jan 23, 2013 6:02 pm

Committed revision #2081.
============================================================
Files Modified
M src/modes/map/map_events.h
M src/modes/map/map_events.cpp
M src/modes/mode_bindings.cpp
M dat/maps/river_access_cave.lua

Primary Changes
- Added a feature to map events to allow them to start after a specified waiting period
- First portion of river access cave map re-design. Resized the map, added a pathway to the beginning, and added a scripted event as soon as the map is entered. Much of the events in the map remain deactivated for now as I commented them out. They will gradually added back in later.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Thu Jan 24, 2013 11:58 pm

Committed revision #2082.
============================================================
Files Modified
M src/modes/map/map_events.h
M src/modes/map/map_events.cpp
M src/modes/mode_bindings.cpp
M dat/maps/river_access_cave.lua
M dat/maps/opening_scene.lua

Primary Changes
- Map event functions are now referred to by name, not an ID number
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Wed Jun 16, 2004 9:03 pm
Location: Hermosa Beach, CA
Contact:

Re: Subversion Commit Log

Post by gorzuate » Sat Jan 26, 2013 11:56 pm

Committed revision #2083.
============================================================
Files Modified
M src/engine/video/video.cpp
M HoA.xcodeproj

Primary Changes
- Updated OS X project file. Allacrost now compiles. Editor still needs work.
- Need to create the OpenGL draw context with SDL_SetVideoMode() prior to calling any other OpenGL functions. Moved all OpenGL calls in VideoManager::ApplySettings() to after the SDL_SetVideoMode() call.
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Wed Jan 30, 2013 6:39 am

Hmm, that might have been my fault. I added a lot of changes to the video engine last month as I was doing the code import from VT, and I know Bertram has not tested anything that he's done with OS X.


Committed revision #2084.
============================================================
Files Modified
M src/modes/mode_bindings.cpp
M src/modes/map/map_events.cpp
M src/modes/map/map_events.h
M dat/maps/river_access_cave.lua
M dat/maps/opening_scene.lua

Primary Changes
- Map events are now automatically registered with the event supervisor when they are created. This removes the need to call "EventSupervisor:RegisterEvent(event);" for every event you create in a map script.
- Map events are no longer created via the class constructor. You now have to call the "Create" method(s), which are static methods of the event class. Calling this will construct the event class, register it with the constructor, and return a pointer to the created class. The event objects are created in C++ space, so no worries about Lua's garbage collector destroying them.
- All map event constructors are now protected. You can only create an event through the static "Create" method.
- Renamed two classes: ScriptedEvent to CustomEvent and ScriptedSpriteEvent to CustomSpriteEvent. "Scripted" was a really ambiguous and confusing word. Custom makes much more sense, as these events are created by defining their start/update functions in Lua.
- Updated all existing map scripts to use these new changes.



Phew, that one took a bit longer than I expected. Partially because I'm a little burnt out and needed a break, and partially because it took me a while to guess how to write the binding code for overloaded static methods (I could not find the answer anywhere after searching for a couple hours).
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Fri Feb 01, 2013 7:04 am

Committed revision #2085.
============================================================
Files Removed
D dat/maps/sample_castle_map.lua
D dat/maps/demo_town.lua
D dat/maps/desert_outskirts.lua
D dat/maps/desert_barracks.lua
D dat/maps/betrayal_room.lua
D dat/maps/desert_training.lua
D dat/maps/demo_cave.lua
D dat/maps/new_cave.lua

Files Modified
M src/modes/map/map_dialogue.cpp
M src/modes/map/map_sprites.cpp
M src/modes/map/map_dialogue.h
M src/modes/map/map_events.cpp
M src/modes/mode_bindings.cpp
M dat/maps/opening_scene.lua
M dat/maps/river_access_cave.lua

Primary Changes
- Removed all the old maps that were in past demo releases since they would not work at all with the latest changes (don't worry, they are still maintained in the old demo/ trunk)
- Renamed SpriteDialogue class to MapDialogue, to be more consistent with naming schemes, and the fact that dialogues on maps do not always take place between sprites
- Added a new class called DialogueEventData to handle the data and processing of map events that are activated by lines and options in a dialogue. Class is not being used yet, but it is the cornerstone of the changes to come for improving how map dialogues are processed.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Mon Feb 04, 2013 11:10 pm

Committed revision #2086.
============================================================
Files Modified
M src/modes/map/map_dialogue.h
M src/modes/map/map_dialogue.cpp
M src/modes/mode_bindings.cpp
M dat/maps/river_access_cave.lua
M dat/maps/opening_scene.lua

Primary Changes
- Map dialogue event processing features are now completed. You can add any number of events on any line, specifying whether they take place when the line begins or when it ends (including specifying a timing interval). Options can also have any number of events specified.
- Like events, dialogues now have a static "Create" method which both creates the class object and registers it with the DialogueSupervisor.
- Updated existing maps for these changes

This is all I plan to do for dialogues for now. It gives me all the abilities I was desiring when I was working on the cave map scripting and I can't think of anything else this code needs now. A warning though: I didn't test this thoroughly because to do so would require a lot of time I don't care to spend right now, but I'm fairly confident it should work correctly (or print a warning when there's a problem). I'm going to get back to working on the river access cave map scripting now.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Thu Sep 25, 2014 7:59 pm

Committed revision #2088.
============================================================
Files Modified
D dat
D dat/actors
D dat/actors/characters.lua
D dat/actors/enemies_set_01.lua
D dat/actors/enemies_set_02.lua
D dat/actors/map_sprites_stock.lua
D dat/animations
D dat/animations/characters
D dat/animations/creatures
D dat/animations/enemies
D dat/battle_events.lua
D dat/battles
D dat/battles/first_battle.lua
D dat/config
D dat/config/boot.lua
D dat/config/languages.lua
D dat/config/restore_settings.lua
D dat/config/settings.lua
D dat/credits.lua
D dat/effects
D dat/effects/status.lua
D dat/global.lua
D dat/graphics
D dat/graphics/lightning.lua
D dat/maps
D dat/maps/harrvah_city.lua
D dat/maps/opening_scene.lua
D dat/maps/river_access_cave.lua
D dat/objects
D dat/objects/arm_armor.lua
D dat/objects/head_armor.lua
D dat/objects/items.lua
D dat/objects/key_items.lua
D dat/objects/leg_armor.lua
D dat/objects/torso_armor.lua
D dat/objects/weapons.lua
D dat/skills
D dat/skills/attack.lua
D dat/skills/defense.lua
D dat/skills/support.lua
D dat/test
D dat/test/battles.lua
D dat/test/maps.lua
D dat/test/menus.lua
D dat/test/saves.lua
D dat/test/shops.lua
D dat/test/test_main.lua
D dat/tilesets
D dat/tilesets/autotiling.lua
D dat/tilesets/building_interior_objects_01.lua
D dat/tilesets/castle_exterior_01.lua
D dat/tilesets/desert_cave.lua
D dat/tilesets/desert_cave_ground.lua
D dat/tilesets/desert_cave_walls.lua
D dat/tilesets/desert_cave_walls2.lua
D dat/tilesets/desert_cave_water.lua
D dat/tilesets/desert_ground.lua
D dat/tilesets/harrvah_house.lua
D dat/tilesets/harrvah_house_exterior.lua
D dat/tilesets/harrvah_house_interior.lua
D dat/tilesets/mountain_house_exterior.lua
D dat/tilesets/mountain_house_exterior2.lua
D dat/tilesets/mountain_house_interior.lua
D dat/tilesets/mountain_landscape.lua
D dat/tilesets/outdoor_market.lua
? img/backdrops/battle/desert_cave.jpg
? img/backdrops/battle/mountain_village.jpg
A + lua
D + lua/actors
D + lua/actors/characters.lua
D + lua/actors/enemies_set_01.lua
D + lua/actors/enemies_set_02.lua
D + lua/actors/map_sprites_stock.lua
D + lua/animations
D + lua/animations/characters
D + lua/animations/creatures
D + lua/animations/enemies
D + lua/battle_events.lua
D + lua/battles
D + lua/battles/first_battle.lua
D + lua/config
D + lua/config/boot.lua
D + lua/config/languages.lua
D + lua/config/restore_settings.lua
D + lua/config/settings.lua
D + lua/credits.lua
A lua/data
A + lua/data/actors
A + lua/data/config
A lua/data/config/fonts.lua
A lua/data/config/gui_themes.lua
A + lua/data/credits.lua
A + lua/data/effects
A + lua/data/inventory
A + lua/data/maps
M + lua/data/maps/opening_scene.lua
M + lua/data/maps/river_access_cave.lua
A + lua/data/skills
A + lua/data/tilesets
M + lua/data/tilesets/building_interior_objects_01.lua
M + lua/data/tilesets/castle_exterior_01.lua
M + lua/data/tilesets/desert_cave.lua
M + lua/data/tilesets/desert_cave_ground.lua
M + lua/data/tilesets/desert_cave_walls.lua
M + lua/data/tilesets/desert_cave_walls2.lua
M + lua/data/tilesets/desert_cave_water.lua
M + lua/data/tilesets/desert_ground.lua
M + lua/data/tilesets/harrvah_house.lua
M + lua/data/tilesets/harrvah_house_exterior.lua
M + lua/data/tilesets/harrvah_house_interior.lua
M + lua/data/tilesets/mountain_house_exterior.lua
M + lua/data/tilesets/mountain_house_exterior2.lua
M + lua/data/tilesets/mountain_house_interior.lua
M + lua/data/tilesets/mountain_landscape.lua
M + lua/data/tilesets/outdoor_market.lua
D + lua/effects
D + lua/effects/status.lua
M + lua/global.lua
A + lua/graphics/animations
A lua/graphics/particles
A lua/graphics/particles/blue_firework.lua
A lua/graphics/particles/explosion.lua
A lua/graphics/particles/fire.lua
A lua/graphics/particles/fire_spell.lua
A lua/graphics/particles/heal_particle.lua
A lua/graphics/particles/heal_sp_particle.lua
A lua/graphics/particles/inactive_save_point.lua
A lua/graphics/particles/rain.lua
A lua/graphics/particles/shield.lua
A lua/graphics/particles/snow.lua
A lua/graphics/particles/wave_spell.lua
D + lua/maps
D + lua/maps/harrvah_city.lua
D + lua/maps/opening_scene.lua
D + lua/maps/river_access_cave.lua
D + lua/objects
D + lua/objects/arm_armor.lua
D + lua/objects/head_armor.lua
D + lua/objects/items.lua
D + lua/objects/key_items.lua
D + lua/objects/leg_armor.lua
D + lua/objects/torso_armor.lua
D + lua/objects/weapons.lua
A lua/scripts
A + lua/scripts/battles
A + lua/scripts/battles/battle_events.lua
A lua/scripts/maps
D + lua/skills
D + lua/skills/attack.lua
D + lua/skills/defense.lua
D + lua/skills/support.lua
M + lua/test/maps.lua
M + lua/test/test_main.lua
D + lua/tilesets
D + lua/tilesets/autotiling.lua
D + lua/tilesets/building_interior_objects_01.lua
D + lua/tilesets/castle_exterior_01.lua
D + lua/tilesets/desert_cave.lua
D + lua/tilesets/desert_cave_ground.lua
D + lua/tilesets/desert_cave_walls.lua
D + lua/tilesets/desert_cave_walls2.lua
D + lua/tilesets/desert_cave_water.lua
D + lua/tilesets/desert_ground.lua
D + lua/tilesets/harrvah_house.lua
D + lua/tilesets/harrvah_house_exterior.lua
D + lua/tilesets/harrvah_house_interior.lua
D + lua/tilesets/mountain_house_exterior.lua
D + lua/tilesets/mountain_house_exterior2.lua
D + lua/tilesets/mountain_house_interior.lua
D + lua/tilesets/mountain_landscape.lua
D + lua/tilesets/outdoor_market.lua
M src/common/global/global.cpp
M src/common/global/global_actors.cpp
M src/common/global/global_actors.h
M src/common/global/global_utils.h
M src/editor/editor.cpp
M src/editor/editor_main.cpp
M src/editor/skill_editor.cpp
M src/editor/tileset.cpp
M src/editor/tileset_editor.cpp
M src/engine/script/script_read.cpp
M src/engine/script/script_read.h
M src/engine/system.cpp
M src/engine/video/video.h
M src/main.cpp
M src/modes/boot/boot.cpp
M src/modes/boot/boot.h
M src/modes/boot/boot_credits.cpp
M src/modes/map/map.cpp
M src/modes/map/map_tiles.cpp
M src/modes/save/save_mode.cpp
M src/modes/test.h
M src/utils.cpp
M src/utils.h

Primary Changes
- Reorganized the files in the dat/ directory, now renamed to lua/

I did some basic testing across all modes and everything seemed to work fine. If you get fatal errors about missing lua files, search for the new path of the file and correct it in the code that generated the error. Hopefully there are very few of these kinds of problems.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sat Sep 27, 2014 5:32 pm

Committed revision #2089.
============================================================
Files Added
  • A + lua/data/maps/harrvah_desert_cave_path.lua
    A + lua/data/maps/harrvah_underground_river_cave.lua
    A lua/scripts/maps/01_harrvah_city_attack.lua
    A lua/scripts/maps/01_opening_scene.lua
    A lua/scripts/maps/01_unblock_underground_river.lua
Files Modified
  • M lua/data/maps/harrvah_city.lua
    M lua/global.lua
    M lua/test/maps.lua
    M src/common/common.cpp
    M src/common/common.h
    M src/editor/grid.cpp
    M src/engine/script/script_read.h
    M src/modes/map/map.cpp
    M src/modes/map/map.h
    M src/modes/map/map_events.cpp
    M src/modes/map/map_utils.cpp
    M src/modes/map/map_utils.h
Files Deleted
  • D lua/data/maps/opening_scene.lua
    D lua/data/maps/river_access_cave.lua
Primary Changes
  • Map files are now separated into data and script files. When we open a map, we select the script file to open and the script file indicates what data file should be loaded. The map editor only modifies the contents of map data files, while map script files are all created by hand (since it's essentially all code). Map data files are located at lua/data/maps/, while the script files can be found at lua/scripts/maps/
Secondary Changes
  • Removed all the comments that the map editor used to place into every map file that documented every variable name. I figure it's overly redundant and self-apparent what that data is.
  • Added a new function called "DetermineLuaFileTablespaceName()" in common.h that does what it says. This is a function you can use to get the tablespace name of any Lua file as long as you know the filename.
  • Changed the event group names of maps from "dat_maps_mapname_lua" to "map_mapname". It's easier to remember and to type in scripting code.
Known Bugs
  • Currently the opening scene map fails to load with a run time error if you open it after the cave map (third option on the test map menu). I'll get around to fixing this soon, as I plan to create a new map file for the return scene anyway.
  • The harrvah city map also doesn't load. I think this was the case even before this commit though, and I'm not sure what the state of that map was at the last time it was worked on
Miscellaneous Notes
  • Due to the new naming convention of map script files (##_eventname.lua), the namespace for these files had to be changed because you can't begin a Lua identify with a number. I've prepended the letter "a" to this as a workaround, and made adjustments as necessary in the new function mentioned above. Kind of hackish. Might have been better to just add the 'a' to the map script filenames so they would be "a01_...." instead of "01...". I might change it to do this actually, because it's very easy to forget to add the 'a' in some scripting since the global event group name uses the tablespace name. :uhoh:
============================================================
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sun Sep 28, 2014 12:19 am

Committed revision #2090.
============================================================
Files Added
  • A + lua/scripts/maps/a01_harrvah_city_attack.lua
    A + lua/scripts/maps/a01_opening_scene.lua
    A lua/scripts/maps/a01_return_to_harrvah_city.lua
    A + lua/scripts/maps/a01_unblock_underground_river.lua
Files Modified
  • M lua/global.lua
    M lua/test/maps.lua
Files Deleted
  • D lua/scripts/maps/01_harrvah_city_attack.lua
    D lua/scripts/maps/01_opening_scene.lua
    D lua/scripts/maps/01_unblock_underground_river.lua
Primary Changes
  • Changed map script file names to be prepended with an 'a' to keep them consistent with their tablespace names. I don't really like it, but I liked having to remember when to use an 'a' and when not to in the scripts even less
  • opening_scene is now really just the opening scene. Created a new map script "return_to_harrvah_city.lua" that was formed mostly from half of the opening_scene file. Both scripts are now shorter and much easier to understand.
Secondary Changes
  • Fixed the return to city map script so that it works again. Just had an incorrect couple of arguments on one function call was all the problem was.
============================================================
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sun Sep 28, 2014 7:26 pm

Committed revision #2091.
============================================================
Files Modified
  • M src/editor/dialog_boxes.cpp
    M src/editor/dialog_boxes.h
Primary Changes
  • Added a new LayerDialog class (borrowed from VT editor). Supports the adding/modification of new tile layers. Currently inactive (there's no way to access it from the editor)
Secondary Changes
  • Minor amounts of cleanup and improvements to existing dialog box code
Miscellaneous Notes
This is the first of what I expect to be a good number of commits to the editor code. We're going to be leveraging a lot of the work that VT has done with their editor to improve our own. I'm trying to make smaller commits for this work because if I break something (which I think is likely), I want to be able to easily go back and figure out exactly what changes broke it. The major two results from this continuing work will be:
1) The editor will support creating maps with a variable number of tile layers (instead of requiring three as it does now)
2) The editor will have a vastly improved layout, making it easier to use to layout maps

I may add other sorely needed features along the way if I find them. For example, I'm not sure if we can insert or delete entire rows or columns of tiles at arbitrary positions. I'd also like to support a multi-layer drag-and-drop, so you can move entire structures (houses) that are built on multiple tile layers with one select and move. I'm pretty sure we're missing this feature, and it's really, really needed to make map creation not so laborious of a process. If you have any other suggestions for features you'd like to see (that are reasonable to complete in a few weeks), let me know.
============================================================
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Mon Oct 06, 2014 12:30 am

Committed revision #2092.
============================================================
Files Added
A src/editor/tile_model.cpp
A src/editor/tile_model.h

Files Removed
D src/editor/skill_editor.cpp
D src/editor/skill_editor.h
D src/editor/sprites.cpp
D src/editor/sprites.h

Files Modified
  • M Makefile.am
    M src/editor/dialog_boxes.h
    M src/editor/editor.cpp
    M src/editor/editor.h
    M src/editor/editor_main.cpp
    M src/editor/grid.cpp
    M src/editor/grid.h
Primary Changes
  • Removed major components from the editor which were not functioning and no longer used. This included the skill editor (allowed the ability to create character skills in editor) and the ability to place sprites on the map.
  • Added files/classes to support multiple tile layers and map contexts within the editor. (Currently incomplete and not included in the build process)
Secondary Changes
  • Minor cleanup in a few areas
Known Bugs
  • The maketools generate a lot of warnings when compiling from scratch. I tried to fix them, but the build process was broken as a result. I'm making a mental note to revisit our build files and do a cleanup on them (we're using many deprecated calls/features)
Miscellaneous Notes
The new files, tile_model.*, represent the data model of all the map tiles that we see drawn in the editor. Currently, this data is managed as a part of the Grid class, which is a mess because it handles the code for the display (view), user input (control), and data (model). I'm pretty much tearing Grid inside out and separating out it's components to make it easier to understand, maintain, and have a more solid UI software architecture. The new files are about 70-80% complete, but I decided to leave them unfinished as I'm not sure about how to process some calls that Grid would need to make, so I'm leaving it in it's current state until I go through the Grid class and figure out the best interface for the two.

In a future commit, Grid is going to be renamed TileView or something similar. Grid is far too generic of a name. This means these files will be renamed as well. Grid is also going to abandon using our video engine for rendering, and instead use a QT renderer. This will hopefully lead to a better editor, as we've been considering removing the video engine from the editor for a long time.

The editor should still compile and work (as long as you update your build files), but I wouldn't count on it for much right now. The map data format is going to be changing completely soon, so any maps saved will need to be converted to the new format.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Wed Oct 15, 2014 10:34 pm

Committed revision #2093.
============================================================
Files Added
A img/misc/editor-tools/document-new.png
A img/misc/editor-tools/edit-delete.png
A img/misc/editor-tools/edit-rename.png
A img/misc/editor-tools/eye.png
A img/misc/editor-tools/go-down.png
A img/misc/editor-tools/go-up.png
A src/editor/editor_utils.cpp
A src/editor/editor_utils.h


Files Modified
  • M Makefile.am
    M src/editor/editor.cpp
    M src/editor/editor.h
    M src/editor/editor_main.cpp
    M src/editor/grid.cpp
    M src/editor/tile_model.cpp
    M src/editor/tile_model.h
    M src/editor/tileset.cpp
    M src/editor/tileset.h
    M src/editor/tileset_editor.cpp
Primary Changes
  • Added several new image icons for the editor to use in future commits
  • Made editor utility code file so that common constants, etc. could be re-used more cleanly
  • Added utility and tile_model code to the automake process. Both files compile now, but aren't really used much by the editor
  • Tons of changes to tile_model.* Most of the code in these files is complete, though none of it is tested. Still a good milestone to have.
Miscellaneous Notes
I had to re-add the audio engine code into the editor build dependencies. I found that this was because the video engine makes a call to the audio engine to do it's lightning effect. In the near future, both the audio and video engines will be removed from the editor build dependencies completely so this will no longer be an issue. In the farther future, the lightening effect code should be removed from the video engine and placed in the common code, as we do not want engines to be calling each other and only permit it in extreme circumstances (like the input engine calling the game mode stack engine to handle quit/pause events).

The tile model code is still undergoing massive changes. I expect to be renaming certain classes/methods as I better understand what these data structures should represent. The name of the file itself may be changed as well (I don't particularly like it). I was trying to avoid naming classes beginning with "Map" because I was afraid of confusing it with similarly named classes in the Map* in the map mode code. But forcing myself to call a MapContext a TileContext to avoid this just seems...well, confusing. Which is what I was trying to avoid to begin with. So expect name changes to continue here until I'm satisfied. :angel:

The editor still works at this point. At least, I tested it and it's able to open map files without error. However, the next commit is absolutely going to break the editor because I will be yanking its guts apart. Actually I already have done this. I have made a ton of changes to grid.* and editor.* that I did not include in this commit, as I just wanted to commit a "checkpoint" of new code that still works with the old editor.

The image files I added are from VT, which I believe got most of them from the Tiled editor. I will update the LICENSES file accordingly in a future commit. I will also be changing the file names of these files and existing editor image files, as they do not follow our file naming conventions (they contain spaces where they should contain underscores).


A lot of disruptive changes are coming down the pipe next. Hold on to your butts! :devil:
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sun Oct 19, 2014 11:50 am

Committed revision #2094.
============================================================
Files Modified
  • M src/editor/editor.cpp
    M src/editor/editor.h
    M src/editor/editor_utils.h
    M src/editor/grid.cpp
    M src/editor/tileset.cpp
    M src/editor/tileset.h
    M src/editor/tileset_editor.cpp
    M src/editor/tileset_editor.h
Primary Changes
  • src/editor/tileset.* and src/editor/tileset_editor.* have been completely refactored
  • Made some changes to the underlying data structure of Tileset objects to be easier to use
  • Made slight changes to the read/write format for tileset definition files (ie, anything in lua/data/tilesets/). This will require a manual update of all existing TDFs to comply with the new standard.
  • All dependencies on the video engine code for tilesets and the tileset editor have been removed :approve:
Miscellaneous Notes
As promised, the editor is now broken. It will start up okay and doesn't seem to crash immediately, but it certainly won't be usable for loading or saving map data now.

Only grid.* and editor.* remain to be rewritten now. These will be the largest and most painful changes, and I've already made a lot of progress on them, but have been holding off on finishing this work as I needed everything else finished first.

Next commit will be some small changes and file renaming before I get started on the last of the refactoring.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sun Oct 19, 2014 5:46 pm

Two large commits in one day. How long has it been since I've done that? :hack:

Committed revision #2095.
============================================================
Files Added
  • A + img/misc/editor_tools
    A + img/misc/editor_tools/arrow.png
    A + img/misc/editor_tools/arrow_left.png
    A + img/misc/editor_tools/arrow_right.png
    A + img/misc/editor_tools/delete.png
    A + img/misc/editor_tools/eraser.png
    A + img/misc/editor_tools/eye.png
    A + img/misc/editor_tools/fill.png
    A + img/misc/editor_tools/move_down.png
    A + img/misc/editor_tools/move_up.png
    A + img/misc/editor_tools/new.png
    A + img/misc/editor_tools/pencil.png
    A + img/misc/editor_tools/picker.png
    A + img/misc/editor_tools/rectangle_select.png
    A + img/misc/editor_tools/rename.png
Files Modified
  • M LICENSES
    M lua/data/tilesets/building_interior_objects_01.lua
    M lua/data/tilesets/castle_exterior_01.lua
    M lua/data/tilesets/desert_cave.lua
    M lua/data/tilesets/desert_cave_ground.lua
    M lua/data/tilesets/desert_cave_walls.lua
    M lua/data/tilesets/desert_cave_walls2.lua
    M lua/data/tilesets/desert_cave_water.lua
    M lua/data/tilesets/desert_ground.lua
    M lua/data/tilesets/harrvah_house.lua
    M lua/data/tilesets/harrvah_house_exterior.lua
    M lua/data/tilesets/harrvah_house_interior.lua
    M lua/data/tilesets/mountain_house_exterior.lua
    M lua/data/tilesets/mountain_house_exterior2.lua
    M lua/data/tilesets/mountain_house_interior.lua
    M lua/data/tilesets/mountain_landscape.lua
    M lua/data/tilesets/outdoor_market.lua
    M src/editor/editor_utils.h
    M src/editor/tileset.cpp
    M src/editor/tileset_editor.cpp
Files Deleted
  • D img/misc/editor-tools
    D img/misc/editor-tools/arrow-left.png
    D img/misc/editor-tools/arrow-right.png
    D img/misc/editor-tools/document-new.png
    D img/misc/editor-tools/edit-delete.png
    D img/misc/editor-tools/edit-rename.png
    D img/misc/editor-tools/eye.png
    D img/misc/editor-tools/go-down.png
    D img/misc/editor-tools/go-up.png
    D img/misc/editor-tools/stock-tool-arrow.png
    D img/misc/editor-tools/stock-tool-bucket-fill-22.png
    D img/misc/editor-tools/stock-tool-color-picker-22.png
    D img/misc/editor-tools/stock-tool-eraser-22.png
    D img/misc/editor-tools/stock-tool-pencil-22.png
    D img/misc/editor-tools/stock-tool-rect-select-22.png
Primary Changes
  • Modified tileset definition file format so that collision data for all four quadrants of a tile is combined into one number. This adds a minor amount of complexity for reading/writing the TDF collision data while making the file much smaller and easier to read.
  • Went through and updated the format of every TDF file according to the changes to the TDF format that were made in the past two commits
  • Updated editor image icon names to conforn to our file naming conventions and updated the LICENSES file with credits for the icons we acquired from the Tiled editor
Miscellaneous Notes
While I updated the icon file names, I didn't update them in the code since my next large set of changes is going to make so many changes to the code that uses these icons. For now, the editor appears to have no icon images due to the incorrect file paths.

There might be some a few small mistakes from converting the collision data over to the new format in the TDFs. Because the TDFs didn't format this data consistently, I could only automate the format change so much, and the rest I had to do by hand. It shouldn't be a big deal though, as modifying a tileset's collision data in the tileset editor is pretty easy and simple to do. Once the editor is in a better state and I feel confident that the tileset editor works correctly, I'll go through each TDF and ensure that the collision data is correct and make any necessary changes.

Changes to grid.* and editor.* are coming next. I expect it to take me at least a week until this next commit is ready.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Tue Nov 25, 2014 12:36 am

Finally, the big one is here! :bow:

Committed revision #2096.
============================================================
Files Added
  • A + img/misc/editor_tools/selection_rectangle.png
    A + src/editor/map_data.cpp
    A + src/editor/map_data.h
    A + src/editor/map_view.cpp
    A + src/editor/map_view.h
    A src/editor/tile_layers.cpp
    A src/editor/tile_layers.h
Files Modified
  • M Makefile.am
    M src/editor/dialog_boxes.cpp
    M src/editor/dialog_boxes.h
    M src/editor/editor.cpp
    M src/editor/editor.h
    M src/editor/editor_main.cpp
    M src/editor/editor_utils.h
    M src/editor/tileset.cpp
    M src/editor/tileset.h
    M src/editor/tileset_editor.cpp
Files Deleted
  • D img/misc/editor-tools
    D img/misc/editor_tools/rectangle_select.png
    D src/editor/grid.cpp
    D src/editor/grid.h
    D src/editor/tile_model.cpp
    D src/editor/tile_model.h
Primary Changes
  • The editor code is now done with the first phase of the refactor/overhaul! :D
  • Various file and class additions, renames, and removals
  • Linux build files updated. This new editor does indeed compile! :approve:
Miscellaneous Notes
The editor is broken. :mad: Completely. :bang: I wouldn't even try attempting to run it right now because really nothing will work and your computer will probably catch on fire. :axe:

But this is a necessary evil, and one of the very rare cases where I find it acceptable to commit severely broken code. This overhaul is such an enormous effort (more so than I imagined when I started it) and you really want to commit this work in pieces instead of all at once. Its still going to be a lot of work to get everything working again, but I have almost everything I need in place. The only additional changes to architecture I plan to make are to create classes for managing the tileset widget, tile layer widget, and tile context widget so that work is not done directly in the Editor class. I'm not going to do this immediately though, and plan to get the editor to a more workable state before I make any of these additional architecture changes.

Bottom Line: don't use the map editor right now. It will be fixed sometime in the near future (hopefully by the end of the year) and will make map making much more pleasant to do once it is complete.


Before I take the next steps with the editor, I have another task to complete. My next commit or two will include adding changes to the map data files to support the new file format that will be used by the editor and the new map features (ex: customizable number of map layers, better support of map contexts, etc). This will require some changes to the MapMode code, which has so far been untouched by these changes, in order to read the new files and implement support for the new features. My next commit will not break the game like the editor has been broken in this commit, and from a user perspective everything in the current game should look and play exactly as it did before. I'm also going to update the documentation for the new map file standard on this page: http://www.allacrost.org/wiki/index.php/Map_File (which is currently extremely outdated).

After this step is complete, I'll return to working on the editor and will be making numerous commits there to bring pieces of it back online again. I just hope that the worst of the editor work is behind me now... :uhoh: Doing this redesign is fun, but also pretty painful. :help:
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sun Nov 30, 2014 2:43 pm

Committed revision #2098.
============================================================
Files Modified
  • M configure.ac
    M src/modes/map/map.cpp
    M src/modes/map/map.h
    M src/modes/map/map_tiles.cpp
    M src/modes/map/map_tiles.h
    M src/modes/map/map_utils.h
Primary Changes
  • Maps should now be able to handle any number of tile layers
  • Linux build now supports the C++11 standard
Miscellaneous Notes
Maps should still work just fine. This is only one part of introducing multiple tile layers to a map. It still uses the old map file format and loadier code, but removes anything that used to be hard coded into lower/middle/upper tile layers. Instead, now each tile layer has an order number and you draw the layer by passing in that number to the draw function.

Next I'll be doing the same sort of change with object layers. This will require a little more work and the map files will need a slight change as well.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Thu Dec 04, 2014 9:27 pm

Committed revision #2099.
============================================================
Files Modified
  • M lua/scripts/maps/a01_harrvah_city_attack.lua
    M lua/scripts/maps/a01_opening_scene.lua
    M lua/scripts/maps/a01_return_to_harrvah_city.lua
    M lua/scripts/maps/a01_unblock_underground_river.lua
    M src/modes/map/map.cpp
    M src/modes/map/map.h
    M src/modes/map/map_events.cpp
    M src/modes/map/map_objects.cpp
    M src/modes/map/map_objects.h
    M src/modes/map/map_sprites.cpp
    M src/modes/map/map_tiles.cpp
    M src/modes/map/map_tiles.h
    M src/modes/map/map_utils.h
    M src/modes/map/map_zones.cpp
    M src/modes/mode_bindings.cpp
Primary Changes
  • Maps are now able to support multiple object layers, just as they recently gained support for multiple tile layers
Known Bugs
lua/scripts/maps/a01_harrvah_city_attack.lua has a run-time error if you attempt to add dialogue to any of the sprites. This does not happen with other maps that use sprite dialogue though, and I wasn't sure where the problem was. For now I left the call that creates the dialogue commented out, since the map just has a couple lines and isn't critical to have working right now anyway. I left a TODO note in the code to fix it later. I'm not sure if this was already broken

Miscellaneous Notes
This commit doesn't completely add functional and tested support for multi layers. Collision detection, path finding, etc. is only performed on the "default" object layer. Every time you create a map, an object layer with an ID of 0 is automatically added to the map. The default layer is what we used to call the "ground object layer". Any mention to ground layer, pass layer, or sky layer should now be removed (if you find such a mention, it means I missed something). One object layer is all we need to use for now. If one of our maps for this next release desperately needs to create a second object layer, then we can add support at that time. Otherwise, its a feature we can finish fully implementing at a later time (perhaps during the next release).

Next step is to add the ability for map scripts to fully organize the draw order of all tile and object layers (its currently hard-coded to draw the first two tile layers, then object layer, then the last tile layer). Shouldn't take as long to do as this work did, and then I'll be back to the editor to make it work again.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Fri Dec 05, 2014 1:34 am

Committed revision #2100.
============================================================
Files Added
A + img/sprites/characters/knight_01_walk.png
A img/sprites/characters/knight_02_walk.png
A img/sprites/characters/knight_03_walk.png
A img/sprites/characters/knight_04_walk.png
A img/sprites/characters/knight_05_walk.png
A + img/sprites/characters/knight_06_walk.png

Files Modified
  • M lua/data/actors/characters.lua
    M lua/data/actors/map_sprites_stock.lua
    M lua/data/inventory/arm_armor.lua
    M lua/data/inventory/head_armor.lua
    M lua/data/inventory/leg_armor.lua
    M lua/data/inventory/torso_armor.lua
    M lua/data/inventory/weapons.lua
    M lua/global.lua
    M lua/scripts/maps/a01_opening_scene.lua
    M lua/scripts/maps/a01_return_to_harrvah_city.lua
    M lua/scripts/maps/a01_unblock_underground_river.lua
    M lua/test/maps.lua
Files Removed
  • D img/sprites/characters/soldier_npc01_walk.png
    D img/sprites/characters/soldier_npc02_walk.png
Primary Changes
  • Added in the new knight sprites that Buffo produced this week
  • Changed map sprites in the maps to utilize new sprites
  • Removed the final remnants of the guest player "Dester" that was part of the player's initial party. The party is now reduced to Claudius, Mark, and Lukar.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sat Dec 06, 2014 12:05 am

Committed revision #2101.
============================================================
Files Modified
  • M lua/scripts/maps/a01_harrvah_city_attack.lua
    M lua/scripts/maps/a01_opening_scene.lua
    M lua/scripts/maps/a01_return_to_harrvah_city.lua
    M lua/scripts/maps/a01_unblock_underground_river.lua
    M src/modes/map/map.cpp
    M src/modes/map/map.h
    M src/modes/map/map_objects.h
    M src/modes/map/map_tiles.cpp
    M src/modes/map/map_tiles.h
    M src/modes/mode_bindings.cpp
Primary Changes
  • Maps now support scripts being able to customize the draw order of all tile and object layers
  • All existing map scripts updated to use this new feature. They draw the same content as before.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Post by Roots » Sat Dec 06, 2014 1:32 pm

Committed revision #2102.
============================================================
Files Modified
  • M src/editor/dialog_boxes.cpp
    M src/editor/editor.cpp
    M src/editor/map_view.cpp
    M src/editor/tileset.cpp
Primary Changes
  • Fixed an initialization error that caused creating a new map to abort with a seg fault.
  • Fixed errors that were occurring when tileset images were loading
Notes
Editor debugging has officially kicked off. I'm surprised how much works right now with these relatively quick and simple fixes. You can load multiple tilesets correctly and they are properly displayed in a tabbed subwidget. Everything in the GUI looks mostly correct and I'm unable to make the editor crash anymore. Its still not usable for making maps, but I'll be fixing it up one piece at a time, so expect to see numerous small commits from me in the coming couple of weeks.
Image
Locked