FRAME no longer relies on deliberate buffer overflows.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@720 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2003-02-09 05:24:09 +00:00
parent c1f3b05568
commit d2d2c9e958
8 changed files with 51 additions and 98 deletions
+6 -8
View File
@@ -43,14 +43,12 @@ display.h: defines a DISPLAY_INTERFACE and PDISPLAY_INTERFACE type (as
well as a global _pCurDisplay).
drawable.h: defines FRAME_DESC and DRAWABLE_DESC, and the pointer
types PFRAME_DESC and PDRAWABLE_DESC. FRAME_DESC includes
an element "DataOffs", which, horrifyingly, appears to be
a deliberate index past the end of the struct. Given a
PFRAME_DESC x, (void *)(x[x->DataOffs]) is a void pointer
castable to TFB_Image. Preliminary investigations into
this code make a conversion of DataOffs into a void
pointer both feasible and more efficient on modern
architectures.)
types PFRAME_DESC and PDRAWABLE_DESC. FRAME_DESC has a
TFB_Image pointer as a member. DRAWABLE_DESC currently
still uses a rather annoying technique where the last
member of a struct is a 1-element array, more memory than
that is actually allocated, and the array's bounds are
deliberately overflowed to get at multiple frames.
font.h: defines FONT_DESC and PFONT_DESC.