class Core::Portable::BitmapGameCore

Overview

Game core base class rendering to bitmap. More…

#include <gamecore.h>

class BitmapGameCore:
    public Core::IGameCore,
    public Core::IGameBitmapRenderer
{
public:
    // methods

    virtual void setProperty(const Property& value);
    virtual void getProperty(Property& value);
    virtual void release();
    virtual ErrorCode startup(IGameEnvironment* environment);
    virtual void shutdown();
    virtual int run();
    virtual ErrorCode renderFrame(BitmapData& data, int offsetX, int offsetY);
};

// direct descendants

class TestGame;

Inherited Members

public:
    // enums

    enum RunResult;

    // fields

    static const InterfaceID kIID = 0;
    static const InterfaceID kIID = FOUR_CHAR_ID('G', 'm', 'C', 'o');
    static const InterfaceID kIID = FOUR_CHAR_ID('G', 'm', 'B', 'R');

    // methods

    virtual void setProperty(const Property& value) = 0;
    virtual void getProperty(Property& value) = 0;
    virtual void release() = 0;
    virtual ErrorCode startup(IGameEnvironment* environment) = 0;
    virtual void shutdown() = 0;
    virtual int run() = 0;
    virtual ErrorCode renderFrame(BitmapData& data, int offsetX, int offsetY) = 0;

Detailed Documentation

Game core base class rendering to bitmap.

Methods

virtual void setProperty(const Property& value)

Set property value.

virtual void getProperty(Property& value)

Get property value.

Type and size need to be initialized by caller.

virtual void release()

Release this instance.

virtual int run()

Run game for one frame, called periodically.

virtual ErrorCode renderFrame(BitmapData& data, int offsetX, int offsetY)

Render current frame to bitmap.

Can be called multiple times in case multiple physical displays are combined.