OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

RlePack.cpp File Reference

#include "RlePack.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "gfx.h"
#include "common.h"
#include "DrawRle.h"

Defines

#define MAXDATACOUNT   65530
 Sanity: This is the maximal number of entries in a .DAT file.
#define METHODNAME   CRlePack_P::draw_rle_sprite8
#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip8
#define PIXEL_PTR   unsigned char*
#define PUT_PIXEL(p, c)   (*((unsigned char *)(p)) = (c))
#define PITCH   (dst->pitch)
#define METHODNAME   CRlePack_P::draw_rle_sprite16
#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip16
#define PIXEL_PTR   Uint16*
#define PUT_PIXEL(p, c)   (*((PIXEL_PTR )(p)) = (m_aiRGBPalette[c]))
#define PITCH   (dst->pitch / 2)
#define METHODNAME   CRlePack_P::draw_rle_sprite32
#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip32
#define PIXEL_PTR   Uint32*
#define PUT_PIXEL(p, c)   (*((PIXEL_PTR )(p)) = (m_aiRGBPalette[c]))
#define PITCH   (dst->pitch / 4)

Functions

void ChangeEndian32 (Uint32 &a_riArg)
void ChangeEndian16 (Uint16 &a_riArg)
Uint32 ConvertEndian32 (Uint32 a_iArg)
Uint16 ConvertEndian16 (Uint16 a_iArg)
void OffsetRLESprite (SRleSprite *spr, int offset)
 Worker method of CRlePack::OffsetSprites() .

Define Documentation

#define MAXDATACOUNT   65530
 

Sanity: This is the maximal number of entries in a .DAT file.

#define METHODNAME   CRlePack_P::draw_rle_sprite32
 

#define METHODNAME   CRlePack_P::draw_rle_sprite16
 

#define METHODNAME   CRlePack_P::draw_rle_sprite8
 

#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip32
 

#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip16
 

#define METHODNAME_FLIP   CRlePack_P::draw_rle_sprite_v_flip8
 

#define PITCH   (dst->pitch / 4)
 

#define PITCH   (dst->pitch / 2)
 

#define PITCH   (dst->pitch)
 

#define PIXEL_PTR   Uint32*
 

#define PIXEL_PTR   Uint16*
 

#define PIXEL_PTR   unsigned char*
 

#define PUT_PIXEL p,
 )     (*((PIXEL_PTR )(p)) = (m_aiRGBPalette[c]))
 

#define PUT_PIXEL p,
 )     (*((PIXEL_PTR )(p)) = (m_aiRGBPalette[c]))
 

#define PUT_PIXEL p,
 )     (*((unsigned char *)(p)) = (c))
 


Function Documentation

void ChangeEndian16 Uint16 &  a_riArg  )  [inline]
 

void ChangeEndian32 Uint32 &  a_riArg  )  [inline]
 

Uint16 ConvertEndian16 Uint16  a_iArg  )  [inline]
 

Uint32 ConvertEndian32 Uint32  a_iArg  )  [inline]
 

void OffsetRLESprite SRleSprite spr,
int  offset
 

Worker method of CRlePack::OffsetSprites() .