[RETIRED] Subversion Commit Log

For discussion of the code running behind the game

Moderator: Staff

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

Postby Roots » Tue Jan 08, 2008 5:32 am

Committed Revision 1262.
****************************************************
Files Modified
M src/modes/map/map.h
M src/modes/map/map_actions.h
M src/modes/map/map_dialogue.cpp
M src/modes/map/map_objects.cpp
M src/modes/map/map_sprites.cpp
M src/modes/map/map_dialogue.h
M src/modes/map/map_objects.h
M src/modes/map/map_zones.cpp
M src/modes/map/map.cpp
M src/modes/map/map_actions.cpp
M src/defs.h

Primary Changes
> Separated map object management code from the map mode class

Known Bugs
> Talking to a NPC causes the game to crash

Miscellaneous
> Drakkoon and others: consider the map code to now have the green light to work on again
> I'll be continuing to do some less major cleaning/organizational changes in map mode as time goes on, but it shouldn't be anything that should hold up other development
> Next I'll be implementing map contexts :D
Image
User avatar
Steu
Developer
Posts: 926
Joined: Thu Jan 05, 2006 10:41 pm
Location: Medicine Hat
Contact:

Postby Steu » Thu Jan 17, 2008 3:27 am

Committed Revision 1263.
****************************************************
Files Modified

Modified: Allacrost\demo\Allacrost.vcproj

Notes
> Added the map_tiles.h/.cpp to the Visual Studio project file.
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Postby Winter Knight » Thu Jan 17, 2008 4:21 pm

Roots wrote:Talking to a NPC causes the game to crash


I found out why this is. And it isn't any NPC. The game crashes whenever Claudius tries to speak, so you can talk to the shopkeeper, or the little boy just fine (because Claudius has no dialogue with them).

The problem is the function ObjectManager::GetObject(int32 object_id). This function returns NULL if object_id is higher than _all_objects.size(), which in the case of NPC's, is 11. Claudius is id 1000. 1000 > 11, so this function returns NULL, which causes problems down the road. According to the comment on line #590 in map_objects.h, Claudius having an id of 1000 is OK. So the problem is that this function did not get the memo regarding it being OK.
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Postby Winter Knight » Thu Jan 17, 2008 4:32 pm

Committed Revision 1264:
****************************
Files Modified:

* src/modes/map/map_objects.cpp

Primary Changes:
* Fixed bug that caused game to crash when talking to some NPC's

Misc notes:
I thought this would be harder to fix. I wrote the previous note here, thinking that it would take me some time. About a minute later, I made the commit to svn.
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Postby Winter Knight » Fri Jan 18, 2008 9:02 am

Committed revision 1265-1268:
****************************
Files modified:

* src/main_options.cpp
* src/engine/audio/audio_descriptor.cpp
* src/engine/audio/audio.cpp
* src/engine/audio/audio.h
* src/main.cpp

* src/engine/input.cpp
* src/defs_engine.cpp

Primary Changes:
* Added a --disable-audio command line option.
* Put sane defaults for x_axis, y_axis, and threshold, for users who are using old config files.

Secondary Changes:
* Added newline to the end of defs_engine.cpp, to prevent compiler warnings.
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Postby Winter Knight » Fri Jan 18, 2008 9:09 am

Committed revision 1269
************************
Files modified:

* src/engine/system.cpp
* src/engine/system.h

Primary Changes:
* moved template function SystemThread::SpawnThread from system.cpp to system.h. Template functions need to be in header files.
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re:

Postby gorzuate » Sun Jan 20, 2008 10:13 pm

Committed revision 1270
************************
Files modified:

* src/editor/skill_editor.h
* Makefile.am

Primary Changes:
* Added newline to skill_editor.h to stop compiler warnings about it.
* Added allacrost-editor to "clean" target in Makefile.
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re: Re:

Postby gorzuate » Mon Jan 21, 2008 6:22 am

Committed revision 1271
************************
Files modified:

Sending demo/src/editor/editor.cpp
Sending demo/src/editor/editor.h
Sending demo/src/editor/grid.cpp
Sending demo/src/editor/grid.h
Sending demo/src/editor/skill_editor.h

Primary Changes
* Added contexts to the editor. Loading maps' context info still needs to be implemented as well as saving the walkability info of tiles in all the contexts.

Misc
* Should be enough for you, Roots, to at least see whether contexts load properly in map mode.
* I'm having second thoughts about the syntax for these context tables that we determined in the "Contexts in maps" thread in the Dev- Programming forum. Let's just say I had to use the funky WriteLine() function in script_write.h, and I have no idea how to actually read in that data using the given script functions :huh:
* The saving function really needs to be converted to use the new ModifyScriptDescriptor stuff... right now it just overwrites everything :angel:
* Don't try to add/delete individual rows/columns in the map just yet; I haven't tried it to see what would happen, but I'm sure all the contexts would become different sizes at the moment... :uhoh:
Image
User avatar
Steu
Developer
Posts: 926
Joined: Thu Jan 05, 2006 10:41 pm
Location: Medicine Hat
Contact:

Re: Subversion Commit Log

Postby Steu » Mon Jan 21, 2008 4:41 pm

I have concerns about ModifyScriptDescriptor because it doesn't preserve comments and formatting of the lua file. So IMO we should be using WriteScriptDescriptor's in the editor.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Postby Roots » Mon Jan 21, 2008 6:23 pm

Steu wrote:I have concerns about ModifyScriptDescriptor because it doesn't preserve comments and formatting of the lua file. So IMO we should be using WriteScriptDescriptor's in the editor.


I agree. ModifyScriptDescriptor is nice for changing or adding small things to a file (like when modifying the user's settings). The save game code writes the entire saved game file to disk from scratch. It doesn't attempt to use ModifyScriptDescriptor in any way.
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re: Subversion Commit Log

Postby gorzuate » Mon Jan 21, 2008 6:48 pm

Roots wrote:
Steu wrote:I have concerns about ModifyScriptDescriptor because it doesn't preserve comments and formatting of the lua file. So IMO we should be using WriteScriptDescriptor's in the editor.


I agree. ModifyScriptDescriptor is nice for changing or adding small things to a file (like when modifying the user's settings). The save game code writes the entire saved game file to disk from scratch. It doesn't attempt to use ModifyScriptDescriptor in any way.


Alright fine. I'd much prefer if you addressed the syntax issue. Like I said, what with the given functions in Write/ReadScriptDescriptor, I find it kind of cumbersome to write/read it as specified in the "Contexts in maps" thread...
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Postby Roots » Mon Jan 21, 2008 7:59 pm

I agree that its cumbersome. I've had to write the same code to read the map contexts in map mode. Lets talk about it in the map context thread.
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re:

Postby Roots » Sat Jan 26, 2008 5:29 pm

Its been too quiet in this thread lately. :(

Committed Revision 1273.
****************************************************
Files Modified
M src/modes/map/map.h
M src/modes/map/map_tiles.h
M src/modes/map/map_objects.h
M src/modes/map/map.cpp
M src/modes/map/map_tiles.cpp
M dat/maps/demo_cave.lua
M dat/maps/demo_town.lua

Primary Changes
> Added (nearly complete) support for contexts in map mode
> Tile loading code has been improved. Tile manager now has complete support for map contexts

Miscellaneous Notes
> Still need to go through the object code and add a few more things for contexts to be fully supported. Should be ready to test this stuff out soon, so I hope the map editor is keeping up. :angel:
Image
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Re: Subversion Commit Log

Postby Winter Knight » Sun Jan 27, 2008 3:26 pm

Committed revision 1274
******************************
Files modified:

* src/modes/battle/battle_actions.cpp

Primary Changes:
* Fixed bug where items used in battle would be decremented multiple times per use

Misc Notes:
The problem was that it was being decremented once in battle_windows.cpp::ActionWindow::_UpdateTargetSelection(), and again for each target in battle_actions.cpp::ItemAction::RunScript(). I removed the decrement code from ItemAction::RunScript, and it seems to work fine now.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Subversion Commit Log

Postby Roots » Sun Jan 27, 2008 5:13 pm

Winter Knight wrote:The problem was that it was being decremented once in battle_windows.cpp::ActionWindow::_UpdateTargetSelection(), and again for each target in battle_actions.cpp::ItemAction::RunScript(). I removed the decrement code from ItemAction::RunScript, and it seems to work fine now.


Do the items properly -not- decrement if they are selected but not used? Ie, Claudius selects to use a healing potion, but he gets killed before he can use it. The item should -not- be decremented in that case. I believe that was handled properly by the item removal code in ItemAction::RunScript. I doubt that the UpdateTargetSelection() function can account for that case...

Might want to go back and remove the decrement code from UpdateTargetSelection and re-add it to RunScript if my thinking is correct.
Image
User avatar
ChopperDave
Developer
Posts: 543
Joined: Tue Sep 05, 2006 4:07 pm

Re: Subversion Commit Log

Postby ChopperDave » Sun Jan 27, 2008 7:46 pm

The reason it was in UpdateTargetSelection is because if we wait until the script is run, then if we have one potion left and someone's turn immediately follows his, then they can use the potion too because it's still in the inventory. I wrote all this crap down in the code comments.
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re: Subversion Commit Log

Postby gorzuate » Wed Jan 30, 2008 7:45 am

Committed revision 1275
******************************
Files modified:

Sending demo/Makefile.am
Sending demo/src/editor/editor.cpp
Sending demo/src/editor/editor.h
Sending demo/src/editor/editor_main.cpp
Sending demo/src/editor/grid.cpp
Sending demo/src/editor/grid.h
Sending demo/src/editor/skill_editor.cpp
Sending demo/src/editor/skill_editor.h
Sending demo/src/editor/tileset.cpp
Sending demo/src/editor/tileset.h
Sending demo/src/editor/tileset_editor.cpp
Sending demo/src/editor/tileset_editor.h
Sending demo/src/modes/map/map_tiles.cpp

Files added:
Adding demo/src/editor/dialog_boxes.cpp
Adding demo/src/editor/dialog_boxes.h

Primary Changes:
1) Split editor.h/cpp and created dialog_boxes.h/cpp.
2) Switched map save function to create correct syntax in map file.
3) Tweaked the loading algorithm in map mode since we don't have tables of
contexts anymore, just individual vectors.
4) Updated copyright year in all editor files.

Misc Notes:
Someone needs to update the Visual Studio project file to include the new files.
Image
User avatar
Steu
Developer
Posts: 926
Joined: Thu Jan 05, 2006 10:41 pm
Location: Medicine Hat
Contact:

Re: Subversion Commit Log

Postby Steu » Thu Feb 07, 2008 2:01 am

Committed revision 1276
******************************
Files modified:

Modified: Allacrost\demo\Allacrost.vcproj
Modified: Allacrost\demo\Map_Editor.vcproj
Modified: Allacrost\demo\src\editor
Modified: Allacrost\demo\src\editor\skill_editor.cpp
Modified: Allacrost\demo\src\editor\skill_editor.h

Primary Changes
1.) Fixed the visual studio solution file for new files
2.) Some updates to the skill editor

Edit: Commit 1277 is a fixup, had the new moc.cpp file in the wrong project, whoops sorry.
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re: Subversion Commit Log

Postby gorzuate » Thu Feb 07, 2008 9:13 am

Committed revision 1278
******************************
Files modified:

Sending demo/src/editor/grid.cpp

Primary Changes:
Updated walkability saving in maps to include additional contexts.
Image
User avatar
prophile
Senior Member
Posts: 324
Joined: Fri Jan 27, 2006 7:18 pm
Location: Chaldon, Surrey, UK
Contact:

Re: Subversion Commit Log

Postby prophile » Fri Feb 22, 2008 7:44 pm

Revision 1280 and 1281 committed.

****************************************************
Modified files
> HoA.xcodeproj/project.pbxproj
> src/engine/defs_engine.cpp

Primary changes in commit
> Added more bindings in the engine - for the GameSystem and mode management subsystems.
Secondary changes in commit
> Fixed some linker warnings in Mac OS 10.5 by setting the default symbol visibility correctly.

Miscellaneous notes
> My first commit in like a year. Sorry, chaps.
****************************************************
Alastair Lynn / Resident Whinger / Allacrost

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests