New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AURORA: Add loader for Scaleform GFx files #373

Merged
merged 1 commit into from Nov 4, 2018

Conversation

Projects
None yet
2 participants
@Nostritius
Contributor

Nostritius commented Sep 26, 2018

As the name says, this PR introduces a loader for scaleform gfx files, used by dragonage and dragonage2. I still does not implement all of the necessary tags, but the most relevant ones.

@Nostritius Nostritius force-pushed the Nostritius:aurora_gfxfile branch 2 times, most recently from 7bfb5a4 to efc5fce Sep 26, 2018

@DrMcCoy

Neat, thanks :)

A few style issues, though:

#ifndef AURORA_GFXFILE_H
#define AURORA_GFXFILE_H
#include <glm/glm.hpp>

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

To show that we're using our own glm copy, please include it with #include "", not #include <>

/**
* The possible element types, used in the scene.
*/
enum CharacterType {

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

Shouldn't that be a part of class GFXCharacter? Likewise, ControlType should be within GFXControl's scope

GFXFile(const Common::UString &resref, Aurora::ActionScript::AVM &avm);
/** Get the framerate for this gfx file. */
float getFrameRate(){ return _frameRate; };

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

Add a space between () and {, please

shape = boost::get<Shape>(_value);
}
void

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

Remove the linebreak here, please

font = boost::get<Font>(_value);
}
void

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

Remove the linebreak here, please

void GFXFile::readExportAssets() {
uint16 count = _gfx->readUint16LE();
for (int i = 0; i < count; ++i) {

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

signed/unsigned

assert(reserved == 0);
uint16 count = _gfx->readUint16LE();
for (int i = 0; i < count; ++i) {

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

signed/unsigned

size_t startOffsetTable = _gfx->pos();
std::vector<uint32> offsetTable;
for (int i = 0; i < numGlyphs; ++i) {

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

signed/unsigned, here and multiple times below

if (_gfx->pos() - oldPos < header.tagLength) {
uint16 numCodeOffsets = _gfx->readUint16LE();
for (int i = 0; i < numCodeOffsets; ++i) {

This comment has been minimized.

@DrMcCoy

DrMcCoy Nov 3, 2018

Member

signed/unsigned

@Nostritius Nostritius force-pushed the Nostritius:aurora_gfxfile branch from efc5fce to f9f48a8 Nov 4, 2018

@Nostritius

This comment has been minimized.

Contributor

Nostritius commented Nov 4, 2018

The issues should now be fixed. I also fixed some things on my own, mostly making some variables const

@DrMcCoy DrMcCoy merged commit f9f48a8 into xoreos:master Nov 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@DrMcCoy

This comment has been minimized.

Member

DrMcCoy commented Nov 4, 2018

Merged, thanks! :)

@Nostritius Nostritius deleted the Nostritius:aurora_gfxfile branch Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment