Open
Description
The aspect ratio seems wrong in some cases on real HW.
Repro:
#include <psyqo/application.hh>
#include <psyqo/gpu.hh>
#include <psyqo/scene.hh>
#include <psyqo/primitives/quads.hh>
#include <psyqo/gte-registers.hh>
#include <psyqo/gte-kernels.hh>
#include <psyqo/soft-math.hh>
namespace
{
class Game final : public psyqo::Application {
void prepare() override;
void createScene() override;
public:
psyqo::Trig<> m_trig;
};
class GameplayScene final : public psyqo::Scene {
void frame() override;
psyqo::Prim::Quad quad2d{{.r = 255, .g = 0, .b = 255}};
};
// We're instantiating the two objects above right now.
Game game;
GameplayScene gameplayScene;
} // namespace
void Game::prepare()
{
psyqo::GPU::Configuration config;
config.set(psyqo::GPU::Resolution::W320)
.set(psyqo::GPU::VideoMode::AUTO)
.set(psyqo::GPU::ColorMode::C15BITS)
.set(psyqo::GPU::Interlace::PROGRESSIVE);
gpu().initialize(config);
}
void Game::createScene()
{
pushScene(&gameplayScene);
}
void GameplayScene::frame()
{
// draw
psyqo::Color bg{{.r = 0, .g = 64, .b = 91}};
game.gpu().clear(bg);
quad2d.pointA.x = 160;
quad2d.pointA.y = 160;
quad2d.pointB.x = 200;
quad2d.pointB.y = 160;
quad2d.pointC.x = 160;
quad2d.pointC.y = 200;
quad2d.pointD.x = 200;
quad2d.pointD.y = 200;
gpu().sendPrimitive(quad2d);
}
int main()
{
return game.run();
}