bugBos Wars - Bugs: bug #29389, Save/Recall map position not...

 
 

bug #29389: Save/Recall map position not preserved during save/reload of game

Submitted by:  Michiel van der Wulp <mvw>
Submitted on:  Wed 31 Mar 2010 06:21:07 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Jimmy Salmon <jsalmon3>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 24 Apr 2010 06:44:13 AM UTC, comment #3:

Fixed in r9785

Jimmy Salmon <jsalmon3>In charge of this item.
Thu 22 Apr 2010 12:03:22 AM UTC, comment #2:

We should move away from parsing a long list of parameters with big tables. Keep it simple so tolua can map directly from lua to a C++ function.

SetSavedMapPosition(int position, int x, int y)

Jimmy Salmon <jsalmon3>In charge of this item.
Sun 04 Apr 2010 12:07:03 PM UTC, comment #1:

The F2-F4 keys are handled in CommandKey, which calls UiSaveMapPosition or UiRecallMapPosition, which then access SavedMapPositionX and SavedMapPositionY. All of these functions and variables are currently defined as static in engine/ui/interface.cpp.

SaveUserInterface also defined in that file calls SaveViewports, which generates calls to the DefineViewports Lua function, implemented as CclDefineViewports in engine/ui/script_ui.cpp. It directly modifies data members of CUserInterface UI.

It seems to me that a simple solution would be:

  • Move SavedMapPositionX and SavedMapPositionY into CUserInterface. (Not really necessary but keeping with the style.)
  • Make SaveUserInterface call a new function that saves the map positions.
  • Define and document a function that sets the map positions, and export it to Lua.

The question then is how the map positions should be formatted in the save file. Perhaps like this:

CclDefineMapPositions({X=12,Y=34}, nil, {X=56, Y=78})

if Shift+F2 and Shift+F4 have been pressed but Shift+F3 has not.

Kalle Olavi Niemitalo <kon>
Project Member
Wed 31 Mar 2010 06:21:07 AM UTC, original submission:

You can set up to 3 map positions with shift-F2, F3, F4, and then recall them with the F2, F3, F4 keys.

However, the stored positions are lost when the game was saved, boswars restarted and the game reloaded.

Michiel van der Wulp <mvw>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kon (Posted a comment)
  • -unavailable- added by mvw (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 24 Apr 2010 06:44:13 AM UTCjsalmon3StatusConfirmed=>Fixed
      Assigned toNone=>jsalmon3
      Open/ClosedOpen=>Closed
    Thu 22 Apr 2010 12:03:22 AM UTCjsalmon3StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1