Path: blob/master/RSDKv5/RSDK/Graphics/Legacy/DrawingLegacy.hpp
1168 views
1namespace Legacy2{34#define LEGACY_SURFACE_COUNT (24)5#define LEGACY_GFXDATA_SIZE (0x800 * 0x800)67#define LEGACY_DRAWLAYER_COUNT (8)89enum DrawFXFlags { FX_SCALE, FX_ROTATE, FX_ROTOZOOM, FX_INK, FX_TINT, FX_FLIP };1011struct DrawListEntry {12int32 entityRefs[LEGACY_v4_ENTITY_COUNT];13int32 listSize;14};1516struct GFXSurface {17char fileName[0x40];18int32 height;19int32 width;20int32 widthShift;21int32 depth;22int32 dataPosition;23};2425extern int32 SCREEN_XSIZE;26extern int32 SCREEN_CENTERX;2728extern DrawListEntry drawListEntries[LEGACY_DRAWLAYER_COUNT];2930extern int32 gfxDataPosition;31extern GFXSurface gfxSurface[LEGACY_SURFACE_COUNT];32extern uint8 graphicData[LEGACY_GFXDATA_SIZE];3334extern uint16 blendLookupTable[0x20 * 0x100];35extern uint16 subtractLookupTable[0x20 * 0x100];36extern uint16 tintLookupTable[0x10000];3738void GenerateBlendLookupTable();3940inline void ClearGraphicsData()41{42for (int32 i = 0; i < LEGACY_SURFACE_COUNT; ++i) MEM_ZERO(gfxSurface[i]);43gfxDataPosition = 0;44}45void ClearScreen(uint8 index);4647// TileLayer Drawing48void DrawHLineScrollLayer(int32 layerID);49void DrawVLineScrollLayer(int32 layerID);50void Draw3DFloorLayer(int32 layerID);51void Draw3DSkyLayer(int32 layerID);5253// Shape Drawing54void DrawRectangle(int32 XPos, int32 YPos, int32 width, int32 height, int32 R, int32 G, int32 B, int32 A);55void DrawTintRectangle(int32 XPos, int32 YPos, int32 width, int32 height);56void DrawScaledTintMask(int32 direction, int32 XPos, int32 YPos, int32 pivotX, int32 pivotY, int32 scaleX, int32 scaleY, int32 width, int32 height,57int32 sprX, int32 sprY, int32 sheetID);5859// Sprite Drawing60void DrawSprite(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 sheetID);61void DrawSpriteFlipped(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 direction, int32 sheetID);62void DrawSpriteScaled(int32 direction, int32 XPos, int32 YPos, int32 pivotX, int32 pivotY, int32 scaleX, int32 scaleY, int32 width, int32 height,63int32 sprX, int32 sprY, int32 sheetID);64void DrawSpriteRotated(int32 direction, int32 XPos, int32 YPos, int32 pivotX, int32 pivotY, int32 sprX, int32 sprY, int32 width, int32 height,65int32 rotation, int32 sheetID);66void DrawSpriteRotozoom(int32 direction, int32 XPos, int32 YPos, int32 pivotX, int32 pivotY, int32 sprX, int32 sprY, int32 width, int32 height,67int32 rotation, int32 scale, int32 sheetID);6869void DrawBlendedSprite(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 sheetID);70void DrawAlphaBlendedSprite(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 alpha, int32 sheetID);71void DrawAdditiveBlendedSprite(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 alpha, int32 sheetID);72void DrawSubtractiveBlendedSprite(int32 XPos, int32 YPos, int32 width, int32 height, int32 sprX, int32 sprY, int32 alpha, int32 sheetID);7374void DrawFace(void *v, uint32 color);75void DrawTexturedFace(void *v, uint8 sheetID);7677namespace v478{79void DrawObjectAnimation(void *objScr, void *ent, int32 XPos, int32 YPos);8081void DrawFadedFace(void *v, uint32 color, uint32 fogColor, int32 alpha);82void DrawTexturedFaceBlended(void *v, uint8 sheetID);83} // namespace v48485namespace v386{87void DrawObjectAnimation(void *objScr, void *ent, int32 XPos, int32 YPos);88}8990void DrawTextMenu(void *menu, int32 XPos, int32 YPos);91void DrawTextMenuEntry(void *menu, int32 rowID, int32 XPos, int32 YPos, int32 textHighlight);92void DrawStageTextEntry(void *menu, int32 rowID, int32 XPos, int32 YPos, int32 textHighlight);93void DrawBlendedTextMenuEntry(void *menu, int32 rowID, int32 XPos, int32 YPos, int32 textHighlight);9495} // namespace Legacy9697#include "v3/DrawingLegacyv3.hpp"98#include "v4/DrawingLegacyv4.hpp"99100