--- SheepShaver/src/include/video_defs.h 2004/04/10 23:15:22 1.3 +++ SheepShaver/src/include/video_defs.h 2008/01/01 09:47:39 1.8 @@ -1,7 +1,7 @@ /* * video_defs.h - MacOS types and structures for video * - * SheepShaver (C) 1997-2004 Marc Hellwig and Christian Bauer + * SheepShaver (C) 1997-2008 Marc Hellwig and Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #define VIDEO_DEFS_H #include "macos_util.h" +#include /* @@ -215,6 +216,10 @@ enum { // VDSetEntry struct csCount = 6 }; +enum { // VDGammaRecord + csGTable = 0 +}; + enum { // ColorSpec table entry csValue = 0, csRed = 2, @@ -280,14 +285,15 @@ enum { // VDDrawHardwareCursor/VDHardwar csCursorSet = 12 }; -struct GammaTbl { - uint16 gVersion; - uint16 gType; - uint16 gFormulaSize; - uint16 gChanCnt; - uint16 gDataCnt; - uint16 gDataWidth; - uint16 gFormulaData[1]; +enum { // struct GammaTbl + gVersion = 0, + gType = 2, + gFormulaSize = 4, + gChanCnt = 6, + gDataCnt = 8, + gDataWidth = 10, + gFormulaData = 12, // variable size + SIZEOF_GammaTbl = 12 }; enum { @@ -307,7 +313,7 @@ enum { // CursorImage struct * Structures for graphics acceleration */ -typedef void *CTabHandle; +typedef uint32 CTabHandle; // Parameter block passed to acceleration hooks struct accl_params { @@ -324,7 +330,7 @@ struct accl_params { uint32 unknown2[3]; uint32 src_base_addr; - uint32 src_row_bytes; + int32 src_row_bytes; int16 src_bounds[4]; uint32 src_unknown1; uint32 src_pixel_type; @@ -337,7 +343,7 @@ struct accl_params { uint32 src_unknown4; uint32 dest_base_addr; - uint32 dest_row_bytes; + int32 dest_row_bytes; int16 dest_bounds[4]; uint32 dest_unknown1; uint32 dest_pixel_type; @@ -356,14 +362,40 @@ struct accl_params { uint32 unknown4[38]; - void (*draw_proc)(accl_params *); + uint32 draw_proc; // Argument for accl_sync_hook at offset 0x4f8 }; +enum { + acclTransferMode = offsetof(accl_params, transfer_mode), + acclPenMode = offsetof(accl_params, pen_mode), + acclForePen = offsetof(accl_params, fore_pen), + acclBackPen = offsetof(accl_params, back_pen), + acclSrcBaseAddr = offsetof(accl_params, src_base_addr), + acclSrcRowBytes = offsetof(accl_params, src_row_bytes), + acclSrcBoundsRect = offsetof(accl_params, src_bounds), + acclSrcPixelType = offsetof(accl_params, src_pixel_type), + acclSrcPixelSize = offsetof(accl_params, src_pixel_size), + acclSrcCmpCount = offsetof(accl_params, src_cmp_count), + acclSrcCmpSize = offsetof(accl_params, src_cmp_size), + acclSrcPMTable = offsetof(accl_params, src_pm_table), + acclDestBaseAddr = offsetof(accl_params, dest_base_addr), + acclDestRowBytes = offsetof(accl_params, dest_row_bytes), + acclDestBoundsRect = offsetof(accl_params, dest_bounds), + acclDestPixelType = offsetof(accl_params, dest_pixel_type), + acclDestPixelSize = offsetof(accl_params, dest_pixel_size), + acclDestCmpCount = offsetof(accl_params, dest_cmp_count), + acclDestCmpSize = offsetof(accl_params, dest_cmp_size), + acclDestPMTable = offsetof(accl_params, dest_pm_table), + acclSrcRect = offsetof(accl_params, src_rect), + acclDestRect = offsetof(accl_params, dest_rect), + acclDrawProc = offsetof(accl_params, draw_proc) +}; + // Hook info for NQDMisc struct accl_hook_info { - bool (*draw_func)(accl_params *); - bool (*sync_func)(void *); + uint32 draw_func; + uint32 sync_func; uint32 code; };