Changeset 894
- Timestamp:
- Aug 12, 2013, 12:31:16 AM (11 years ago)
- Location:
- Daodan/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/BFW_Motoko_Draw.h
r705 r894 82 82 } M3tWin32GammaRamp; 83 83 84 typedef struct 85 { 86 float x; 87 float y; 88 float z; 89 float invW; 90 } M3tPointScreen; 91 92 typedef struct 93 { 94 char pad[8]; 95 96 UUtUns16 width; 97 UUtUns16 height; 98 int texelType; // enum IMtPixelType 99 100 UUtUns16 num_x; 101 UUtUns16 num_y; 102 103 UUtUns32 num_textures; 104 void* textures[1]; // struct M3tTextureMap 105 } M3tTextureMap_Big; 106 84 107 extern char M3gResolutionSwitch; 85 108 -
Daodan/src/Daodan.h
r838 r894 18 18 #define UUcError_None ((UUtError) 0) 19 19 20 typedef unsigned char UUtUns8; 21 typedef unsigned short UUtUns16; 22 typedef unsigned int UUtUns32; 23 typedef char UUtInt8; 24 typedef short UUtInt16; 25 typedef int UUtInt32; 26 20 27 extern HMODULE DDrDLLModule; 21 28 extern HMODULE DDrONiModule; -
Daodan/src/Daodan_Config.c
r893 r894 26 26 bool patch_fonttexturecache = true; 27 27 bool patch_getcmdline = true; 28 bool patch_hdscreens_lowres = true; 28 29 bool patch_kickguns = false; 29 30 bool patch_killvtune = true; … … 131 132 else if (!_stricmp(name, "getcmdline")) 132 133 patch_getcmdline = !_stricmp(inifile_cleanstr(value), "true"); 134 else if (!_stricmp(name, "hdscreens_lowres")) 135 patch_hdscreens_lowres = !_stricmp(inifile_cleanstr(value), "true"); 133 136 else if (!_stricmp(name, "kickguns")) 134 137 patch_kickguns = !_stricmp(inifile_cleanstr(value), "true"); -
Daodan/src/Daodan_Config.h
r893 r894 21 21 extern bool patch_fonttexturecache; 22 22 extern bool patch_getcmdline; 23 extern bool patch_hdscreens_lowres; 23 24 extern bool patch_kickguns; 24 25 extern bool patch_killvtune; -
Daodan/src/Oni_Symbols.h
r893 r894 220 220 DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0); 221 221 DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x0041EB00); 222 DefFunc(void, M3rDraw_BigBitmap, ONICALL, (M3tTextureMap_Big* inBigBitmap, const M3tPointScreen *inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f6e0); 223 DefFunc(void, M3rDraw_Bitmap, ONICALL, (void* inBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f4a0); 222 224 /* 223 225 DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440); -
Daodan/src/_Version.h
r893 r894 6 6 7 7 #define DAODAN_VERSION_MAJOR 3 8 #define DAODAN_VERSION_MINOR 48 #define DAODAN_VERSION_MINOR 5 9 9 #define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR) 10 10 -
Daodan/src/patches/Patches.c
r893 r894 24 24 WMrSlider_SetRange(window, min_value, max_value); 25 25 } 26 26 27 void ONICALL DD_M3rDraw_BigBitmap(M3tTextureMap_Big* inBigBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha) /* 0 - M3cMaxAlpha */ 28 { 29 UUtUns16 x; 30 UUtUns16 y; 31 32 for (y = 0; y < inBigBitmap->num_y; y++) 33 { 34 for (x = 0; x < inBigBitmap->num_x; x++) 35 { 36 UUtUns16 index; 37 void* texture; // M3tTextureMap 38 UUtUns16 width; 39 UUtUns16 height; 40 UUtInt16 temp; 41 UUtInt32 x_times_maxwidth; 42 UUtInt32 y_times_maxheight; 43 44 index = x + (y * inBigBitmap->num_x); 45 texture = inBigBitmap->textures[index]; 46 47 x_times_maxwidth = x * 256; 48 y_times_maxheight = y * 256; 49 50 // Cast to Unsigned to get the 16 bit int representation and then to signed to get the actual value. Doing it in one step gives wrong results (at least with gcc) 51 dest_point.x = (UUtInt16)((UUtUns16)inDestPoint->x) + x_times_maxwidth; 52 dest_point.y = (UUtInt16)((UUtUns16)inDestPoint->y) + y_times_maxheight; 53 dest_point.z = inDestPoint->z; 54 dest_point.invW = inDestPoint->invW; 55 56 temp = (UUtInt16) ( ((UUtInt32)inWidth - x_times_maxwidth) > 0 ? ((UUtInt32)inWidth - x_times_maxwidth) : 0); 57 width = 256 < (UUtUns16)temp ? 256 : temp; 58 temp = (UUtInt16) ( ((UUtInt32)inHeight - y_times_maxheight) > 0 ? ((UUtInt32)inHeight - y_times_maxheight) : 0); 59 height = 256 < (UUtUns16)temp ? 256 : temp; 60 61 M3rDraw_Bitmap(texture, &dest_point, width, height, inShade, inAlpha); 62 } 63 } 64 } 65 66 27 67 void ONICALL DDrShowResumeButton(WMtWindow* window, int visibility) 28 68 { … … 274 314 } 275 315 316 // Allow HD screens with resolution < 1024*768 317 void DD_Patch_HDScreens_LowRes() 318 { 319 DDrPatch_MakeJump((void*)M3rDraw_BigBitmap, (void*)DD_M3rDraw_BigBitmap); 320 } 321 276 322 // Hackish fix for Konoko not kicking guns 277 323 // Don't use this, it breaks stairs. … … 545 591 if (patch_getcmdline) 546 592 DD_Patch_GetCmdLine(); 593 594 if (patch_hdscreens_lowres) 595 DD_Patch_HDScreens_LowRes(); 547 596 548 597 if (patch_kickguns)
Note:
See TracChangeset
for help on using the changeset viewer.