Jump to content


mrhelloworld

Member Since 17 Dec 2012
Offline Last Active Dec 23 2012 06:15 PM
-----

Posts I've Made

In Topic: Need help with the 'Introduction to C++ with Game Development: Part 2...

22 December 2012 - 07:48 PM

View PostReedbeta, on 19 December 2012 - 06:24 PM, said:

It looks like you're on the right track. I don't think the Print() call belongs there as you're supposed to draw it using lines only. You've got the m_Surface->Line() call for the 'I' there; now you just need to add additional lines for the 'G' and 'A'. Just keep going.
That is very logical, thank you.

The thing is that it brings another issue op for me. The code I have right now (following your advise) is this (only drawing one line, the 'I'):

#include "string.h"
#include "surface.h"
#include "stdlib.h"
#include "template.h"
#include "game.h"
using namespace Tmpl8;
void Game::Init()
{

}
void Game::Tick( float a_DT )
{
    m_Screen->Clear( 0 );
    m_Screen->Line( 2, 9, 66, 9, 0xffffff );
    m_Surface->Line( 60, 80, 60, 560, 0xffffff );
}
That gives me the same errors (error C2065: 'm_Surface' : undeclared identifier and error C2227: left of '->Line' must point to class/struct/union/generic type) though and nothing is drawn.

I do notice though that " m_Screen->Line( 2, 9, 66, 9, 0xffffff );" does draw a horizontal line, so I tried that for drawing the 'I', so:

#include "string.h"
#include "surface.h"
#include "stdlib.h"
#include "template.h"
#include "game.h"
using namespace Tmpl8;
void Game::Init()
{

}
void Game::Tick( float a_DT )
{
    m_Screen->Clear( 0 );
    m_Screen->Line( 60, 80, 60, 560, 0xffffff );
}
That does not give me any errors, but draws an empty window?

In Topic: Need help with the 'Introduction to C++ with Game Development: Part 2...

19 December 2012 - 10:49 AM

View PostReedbeta, on 17 December 2012 - 06:04 PM, said:

So, what is your actual question?
The code I wrote to draw 'IGA' is not correct. And I would not know how to write the right code. So I am kinda stuck.