The Dink Network

Reply to Windowed Mode / 32-bit Mode

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 2nd 2003, 01:51 AM
spike.gif
EDIT: Put up new link.
EDIT: From now on, I will using the account iNvERTIgO.

Hey everyone, I have recently modified the Dink source so that you may now use windowed mode properly and added at 32-bit mode for both windowed and fullscreen modes.

You can download the exe along with the modified source here.

Here is the readme included in the zip:

Dink with Working Windowed Mode Readme
======================================
modified by iNvERTIgO, original functions by Seth A. Robinson

Introduction:
In this zip I have included the source for the functions I have modified to get windowed mode working. I have also included the compiled exe for those who want only to test it. Make sure you read the important notes at the end of this file.

MESSAGE IN CAPS FOR N00BS WHO WON'T LOOK AT BOTTOM: TO USE WINDOWED MODE, YOUR DISPLAY SETTINGS MUST BE SET SO THAT YOUR COLOR DEPTH IS 32-BIT

For those who just want to run it, I should inform you that I have modified the following arguments Dink.exe takes:
-window Activates windowed mode, automatically sets truecolor
-truecolor Activates truecolor mode, can be used in fullscreen
-dinkpal If in truecolor mode, all sprites will use the dink palette*

* = See last note on bottom

Comments:
About a week ago I found out that the Dink source had been released. I thought adding windowed mode would be a good first step into gaining a basic understanding of how the extremely messy code works. Soon I windowed mode working. Since then I've gotten a little sidetracked working on a DMOD, but now I've decided to release the modified code. It's not much, but I might add some more to it later (ex. 24-bit bitmap loading).

Basically, I have released this little modification in an attempt to give people something to work with while The Dink Project people are slaving away reorganizing code. I fully support what they are doing, and I know that this will be pretty much useless when they finish and the new code comes out with an über shine to it

Instructions:
In the included .c files you will find the modified functions. Replace the ones in dink.cpp and dinkvars.h with the new ones, compile, and viola, working windowed and truecolor modes. By the way, I know this section is pointless; those who actually plan on doing this are smart enough to figure it out on their own

As for globals.c, just add the two bools to the top of dinkvar.h

Important Notes:
- For now, only 32-bit mode has been added; I may add 16-bit support later, although I would encourage someone else to do it
- Fades do not show in 32-bit mode because they were previously accomplished by darkening the palette. This obviously does not work in true color.
- Some DMOD's (such as Cycles of Evil) use a trick in DinkC to change the palette in the middle of the game. In order for this to work in true color... well... it's just plain messy . There are multiple workarounds, one of them being changing all of the sprites and tiles in memory, but that's a slow process. For now, DMOD's that change palettes in game won't look completely right, but the sprites might look ok (see next note)

* In 32-bit mode, the program uses the palette associated with each sprite, allowing completely different palettes to be used. Using the -dinkpal argument will force all sprites to use the Dink palette

I hope people will be able to make use of this addition to Dink.