Commit 2ffd3eac authored by daFischer's avatar daFischer

Final adjustments before handing in

parent 949072d9
......@@ -56,6 +56,16 @@ void HextileMessage::paint(SDL_Surface *screen, ProtocolPreferences* prefs)
SDL_UpdateRect(screen, x,y,w,h);
}
/**
* This method has been copied from the Java TTT-Player and adjusted to C++
* It draws a subrectangle to the screen at (tx,ty)
* @param screen
* @param prefs
* @param tx
* @param ty
* @param tw
* @param th
*/
void HextileMessage::handleHextileSubrect(SDL_Surface *screen, ProtocolPreferences* prefs, int tx, int ty, int tw, int th)
{
unsigned char subencoding;
......@@ -149,6 +159,16 @@ void HextileMessage::handleHextileSubrect(SDL_Surface *screen, ProtocolPreferenc
}
}
/**
* This method has been copied from the Java TTT-Player and adjusted to C++
* It draws raw Pixels to the screen
* @param screen
* @param prefs
* @param tx
* @param ty
* @param tw
* @param th
*/
void HextileMessage::handleRawRect(SDL_Surface *screen, ProtocolPreferences* prefs, int tx, int ty, int tw, int th)
{
SDL_Rect rect = {0, 0, 1, 1};
......
......@@ -48,6 +48,14 @@ void setUp(){
containsWhiteboard = false;
}
/**
* Reads messages from the Inflater and writes to the list
* This method has been copied from the Java TTT-Player and adjusted to C++
* @param messages
* @param in
* @param prefs
* @return
*/
bool readMessages(list<Message*>* messages, Inflater* in, ProtocolPreferences* prefs){
int timestamp;
if(messages->size()==0)
......@@ -128,6 +136,13 @@ bool readMessages(list<Message*>* messages, Inflater* in, ProtocolPreferences* p
return false;
}
/**
* This method has been copied from the Java TTT-Player and adjusted to C++
* Reads a single Message from Inflater and returns it
* @param in
* @param prefs
* @return
*/
Message* readMessage(Inflater* in, ProtocolPreferences* prefs){
Message* message;
......
......@@ -32,6 +32,12 @@ void RawMessage::paint(SDL_Surface* screen, ProtocolPreferences* prefs){
//printf("Drawn RawMessage at {%d, %d, %d, %d}\n",x,y,w,h);
}
/**
* This method has been copied from the Java TTT-Player and adjusted to C++
* It draws raw Pixels to the screen
* @param screen
* @param prefs
*/
void RawMessage::handleRawRect(SDL_Surface *screen, ProtocolPreferences* prefs)
{
SDL_Rect rect = {0, 0, 1, 1};
......
......@@ -7,9 +7,10 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/user/NetBeansProjects/TTTPlayer/Messages/Message.cpp</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/Messages/RawMessage.cpp</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/main.h</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/Video.cpp</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/Video.h</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/Messages/HextileMessage.cpp</file>
<file>file:/home/user/NetBeansProjects/TTTPlayer/main.cpp</file>
</group>
</open-files>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment