lp:ballandpaddle

Created by snd and last modified
This branch may be out of date, because Launchpad has not been able to access it since .

Ball and Paddle C++ Branch (Main)

Get this branch:
bzr branch lp:ballandpaddle

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
VCS Imports II
Project:
Ball and Paddle
Status:
Development
Location:
http://bzr.savannah.gnu.org/r/ballandpaddle/cpp
Last mirrored:
Next mirror:
Disabled

Updating branch...

Launchpad is processing new changes to this branch which will be available in a few minutes. Reload to see the changes.

Recent revisions

118. By Eric P. Hutchins <email address hidden>

        * Makefile.am: Include new tango levelset skin images.
        * levels/tango/initialize.scm: Likewise.
        * levels/tango/skin.png: Removed obsolete skin image.
        * levels/savannah/skin.png: Likewise.

117. By Eric P. Hutchins <email address hidden>

        * src/game.cpp (init): Set frame_fps.
        * src/game.cpp (frame_update):
        New function which updates a virtual frame of which there can be many
        in an actual frame.
        * src/game.cpp (update): Simplify and make more precise the update.
        * src/game.h (frame_fps, frame_update): Likewise.

116. By Eric P. Hutchins <email address hidden>

2011-08-28 Eric P. Hutchins <email address hidden>

        * Makefile.am: Include new skin elements.
        * levels/savannah/initialize.scm: Likewise.
        * levels/savannah/level1.scm: Don't use set-skin.
        * levels/savannah/level2.scm: Likewise.
        * levels/savannah/level3.scm: Likewise.
        * levels/savannah/level4.scm: Likewise.
        * levels/tango/level1.scm: Likewise.
        * src/extension.cpp (add_to_skin, set_skin): Removed set_skin.
        Added add_to_skin, which adds an image to the skin element list.
        * src/extension.h: Likewise.
        * src/game.cpp (cleanup): Cleanup skin elements.
        * src/game.cpp (draw): Draw the new skins.
        * src/game.cpp (init): Don't set imgSkin to NULL.
        * src/game.cpp (add_to_skin): New function. Adds an image to the skin
        element list.
        * src/game.cpp (set_skin): Removed.
        * src/game.h (skin): Added new vector of surface/rect pairs, which
        represent skin elements.
        * src/game.h (imgSkin): Removed imgSkin.
        * src/gamestatemanager.cpp (init): Don't call loadSkin.
        * src/gamestatemanager.cpp (loadSkin): Removed.
        * src/gamestatemanager.h: Likewise.

115. By Eric P. Hutchins <email address hidden>

        * src/extension.cpp (set_paddle_pos, set_default_paddle_pos):
        New functions set_paddle_pos and set_default_paddle_pos for setting
        the default paddle position at start of level and setting current
        paddle position (for scripting)
        * src/extension.h: Likewise.
        * src/game.cpp (init, loadLevel, set_default_paddle_pos):
        Set default_paddle_x and default_paddle_y to the numbers that work for
        savannah at the moment so that at least they're something reasonable
        if it isn't set in the levelset.
        Use the default paddle position when creating the paddle.
        New function set_default_paddle_position which the extension.cpp one
        calls.
        * src/game.h (default_paddle_x, default_paddle_y, get_paddle):
        New members default_paddle_x and default_paddle_y.
        New function get_paddle which returns the current paddle.
        * src/paddle.cpp (Paddle, set_pos):
        New constructor which sets the x and y position.
        New function set_pos which sets the x and y position.
        * src/paddle.h: Likewise.

114. By Eric P. Hutchins <email address hidden>

 * Convert all tabs to spaces.

 * src/Makefile.am: Add bapblockrect.cpp, bapblockrect.h,
 baplevelset.cpp, baplevelset.h, bapwidget.cpp, and bapwidget.h to
 editor sources. Remove baplevelsettabs.cpp and baplevelsettabs.h
 * src/bapbasics.cpp: Modify to use BAPLevelset instead of bap_levelset_t
 * src/bapbasics.h: Likewise.
 * src/bapblockrect.cpp: New file. Implements a stored version of a
 scheme (block-rect) command and its parameters, which can draw itself
 and tell if a point is inside of it.
 * src/bapblockrect.h: Likewise.
 * src/bapfield.cpp (BAPField): Load the skin, the current background,
 and the current blocks image. Connect the button press signal to
 BAPField::button_press
 * src/bapfield.cpp (load_background): New function for loading the
 current background using a BAPLevelParser to find out what it is.
 * src/bapfield.cpp (button_press): New function. If the user clicked
 on the usable field area, check if it's inside any widgets that are
 in the current level. If so, select it.
 * src/bapfield.cpp (draw): Don't call draw_blocks but instead just
 loop through the widgets in the levelset and draw each one that's in
 the current level.
 * src/bapfield.cpp (draw_block_rects): Removed.
 * src/bapfield.cpp (update): Load the background image.
 * src/bapfield.h: New local variables 'selected', a pointer to the
 selected widget, skin_surface, background_surface, and blocks_surface.
 New functions button_press and load_background.
 * src/baplevelloader.cpp: Use BAPLevelset instead of bap_levelset_t.
 * src/baplevelloader.h: Likewise.
 * src/baplevelparser.cpp (set_form): Don't use i to set the chunk but
 index instead.
 * src/baplevelparser.h: New function get_chunk_index.
 * src/baplevels.cpp: Use BAPLevelset instead of bap_levelset_t.
 * src/baplevels.h: Likewise.
 * src/baplevelset.cpp: New file implementing class BAPLevelset which
 represents a levelset.
 * src/baplevelset.h: Likewise.
 * src/baplevelsettabs.cpp: Removed.
 * src/baplevelsettabs.h: Likewise.
 * src/bapvarentry.cpp: Use BAPLevelset instead of bap_levelset_t.
 * src/bapvarentry.h: Likewise.
 * src/bapwidget.cpp: New file implementing class BAPWidget which
 represents some chunk of scheme code which generally will represent
 something graphical that the user can edit.
 * src/bapwidget.h: Likewise.
 * src/bapwindow.cpp: Use BAPLevelset instead of bap_levelset_t.
 * src/bapwindow.h: Likewise.

113. By Eric P. Hutchins <email address hidden>

       * src/bapfield.cpp (draw): Reset the parsers before getting the field
        x and y.
        * src/baplevelparser.h (reset): Fix extra semi-colon (typo). Let the
        class compile.
        * src/baplevels.c (BAPLevels): Add parameter BAPField *field.
        Don't make the field anymore, but just set it to what you got.
        Don't pack the field in the box either.
        * src/baplevels.h: Likewise.
        * src/baplevelsettabs.cpp (BAPLevelsetTabs): Add NULL for new field
        parameter of BAPLevels since currently this class isn't being used
        anyway.
        * src/bapwindow.cpp (BAPWindow): Don't make or pack the BAPLevelsetTabs.
        Make the BAPBasics, BAPField, and BAPLevels.
        Pack the basics and the levels into a vbox and pack the vbox and the
        field into an hbox.
        Pack that hbox into the main box.

112. By Eric P. Hutchins <email address hidden>

 * src/bapfield.h (draw_block): New function which draw a single block.

 * src/bapfield.h (draw_blocks): New function which draws all blocks on
 the field.

 * src/bapfield.h (draw_block_rects): New function which draws all
 'block-rect's.

 * src/bapfield.h (draw_block_spaced_rects): New function which draws
 all 'block-spaced-rect's.

 * src/bapfield.h (reset): Set chunk_index to 0.

 * src/bapfield.cpp: Likewise.

 * src/bapfield.cpp (draw): Draw all blocks at the end

 * src/baplevelloader.cpp (get_chunks): Don't end the chunk unless the
 paren_level is zero.

 * src/baplevelparser.h: New member chunk_index so that forms can be
 parsed in different consecutive parts of a string with the same parser.

 * src/baplevelparser.h (get_form): Return value is a vector of strings
 with a list of values instead of just a single value. Takes parameter
 bool list_elements, which, if set to true, means that each form element
 corresponds to an element of the outer list rather than a token.

 * src/baplevelparser.h (get_list_form): New function which calls
 get_form with list_elements set to true.

 * src/baplevelparser.h (get_token_form): New function which calls
 get_form with list_elements set to false.

 * src/baplevelparser.cpp: Likewise.

111. By Eric P. Hutchins <email address hidden>

        * src/Makefile.am: Added bapfield.cpp, bapfield.h, baplevelparser.cpp,
        baplevelparser.h, baptokenizer.cpp, and baptokenizer.h from the editor
        source list.
        Removed many files for ballandpaddle that aren't necessary in the
        editor anymore

        * src/bapbasics.cpp (BAPBasics): Don't use game class/object anymore.
        Have the field x entry update on inserting text
        Call update_information at the end of the constructor.

        * src/bapbasics.cpp (update_entry): Now takes a scheme function name
        and a bap_chunks_t for the level.
        Checks for the correct form in the level and if found, it updates the
        entry text to match the value given in the scheme code.

        * src/bapbasics.cpp (field_x_insert_text): New function. Updates the
        field x in the levelset based on the text in the textbox. Shouldn't
        be necessary once I take advantage of new BAPVarEntry class.

        * src/bapbasics.cpp (update_information): Use update_entry to get
        value of all the entries.

        * src/bapbasics.h: Don't use game. Use baplevelparser, baplevelloader,
        baptokenizer.
        New function field_x_insert_text. New member pointer to levelset.

        * src/bapedit.cpp: Don't include any headers from the normal game.
        Don't use guile and call inner_main. Just initialize GTK, make a
        BAPWindow and run it.

        * src/bapfield.cpp: New class BAPField is meant to draw the level
        currently being edited. At the moment, it draws the skin of the
        levelset/level and the background in it based on the field (x,y)
        position.

        * src/bapfield.h: Likewise.

        * src/baplevelparser.cpp: New class BAPLevelParser has functions for
        scraping data from scheme code and changing tokens to set the values
        in scheme code, both of any given form and of a built-in "parameter"
        form which is a simple setter form.

        * src/baplevelparser.h: Likewise.

        * src/baplevels.cpp (BAPLevels): Don't use game class/object.
        Take a pointer to a levelset, level, and levelset_filename.
        Make a field object and pack it in.
        Use BAPVarEntry to make bonus time and background fields that can
        actually edit the level data.

        * src/baplevels.cpp (prev_level): Instead of using the game object's
        levelset_filename, use pointer.
        Instead of using local level, dereference pointer.
        Don't actually load the level because all levels in the levelset are
        loaded already. Just update the information for the new level.

        * src/baplevels.cpp (next_level): Likewise.

        * src/baplevels.cpp (load_level): Removed as its functionality was
        moved to BAPLevelLoader.

        * src/baplevels.cpp (tokenize): Removed as its functionality was moved
        to BAPLevelParser.

        * src/baplevels.cpp (parse_chunk): Instead of calling tokenize, make a
        BAPTokenizer and call get_tokens on the chunk.
        Update the field.

        * src/baplevels.h: Likewise.

        * src/baplevelsettabs.cpp (BAPLevelsetTabs): Don't use game
        class/object.

        * src/baplevelsettabs.cpp (update_information): Commented out the
        updates since we don't need to call it here anymore.

        * src/baplevelsettabs.h: Likewise.

        * src/baptokenizer.cpp: New class BAPTokenizer has functions for
        taking scheme code and splitting it into tokens.

        * src/baptokenizer.h: Likewise.

        * src/bapvarentry.cpp: New class BAPVarEntry is a Gtk::Entry but
        has builtin handlers for inserting text to modify the level data to
        match the inserted text and update the field.

        * src/bapvarentry.h: Likewise.

        * src/bapwindow.cpp (on_menu_file_save): Don't save manually here but
        instead make a BAPLevelLoader and call save_set.

        * src/bapwindow.cpp (BAPWindow): Don't use game class/object.
        Use BAPLevelLoader to load the levelset.
        Pass pointers to levelset, level, and levelset_filename to
        levelset_tabs.
        Don't call update_information as that isn't necessary anymore.

        * src/bapwindow.cpp (update_information): Don't do anything.
        This function should probably be removed.

        * src/bapwindow.h: Likewise.

110. By Eric P. Hutchins <email address hidden>

Improved level loader parsing. Also, now loads the background image for the level but you can't save it yet.

109. By Eric P. Hutchins <email address hidden>

It now loads different levels of the Savannah levelset, letting you edit the bonus time of any of the four levels. (Well, not really. The parser breaks on comments in at least one of them)

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.

Subscribers