wmode.txt

(7 KB) Pobierz
      _   _   _         _________   _______   ____      _______
     | | | | | |       |  _   _  | |  ___  | |  _  \   |  _____|
     | | | | | |  ___  | | | | | | | |   | | | |  \ \  | |_____
     | | | | | | |___| | | | | | | | |   | | | |   | | |  _____|
     | |_| |_| |       | | | | | | | |___| | | |___| | | |_____
     |_________|       |_| |_| |_| |_______| |_______| |_______| v1.00

     for StarCraft & BroodWar                       ゥ XeN (2007)


W-MODE is a "new" "plugin" for StarCraft that enables you to play the game
in a window. It was tested on many of the previous versions up to 1.14 but
but it was designed to be compatible with ANY StarCraft version.

The plugin started as a simple utility to help me in starcraft bugging and
debugging. Some plus work on cursor handling made it a cool plugin that
turns StarCraft into your favorite desktop game :)

Now some more about the plugin, let's have a go!
You must have a utility that has XMOD plugin loading capability. At the time
I write this the only loader that does the job is scloader2b. Load the plug
with this command:
scloader2b -xmod wmode.xmod
I assume that you copied the plug to your sc directory (and not elswhere)
and you got it work succesfully. Voila! Your sc runs in a window...

About the resolution an color depth of your desktop:
It would not be fun to play sc in windowed mode when your destop resolution
is not bigger than 640x480. I recommend you at least 800x600. You can start
sc + wmode with any resolution / color depth setting but it does not support
palettized modes, that means that you should have at least 16bit/pixel color
depth. On 2, 16, and 256 color modes sc will not look sexy. In 256 color
modes a game can control all 256 palette indices if it uses DDraw in
(exclusive) fullscreen mode, but when windows come to the scene your
operating system preserves 20 palette indices for itself, and your 256 color
sc screen should adapt to it. It could be solved with octree resolution or
median cut or with something similar, but most of the home comps run using
32bit/pixel mode today so I don't want to tire myself with palettes.

About cursor handling:
In order to scroll your starcraft map you must move your cursor to the
edge of the starcraft screen. It would be really hard to aim the 2 pixel with
edge of the sc screen with a cursor that can be pulled out from the starcraft
window, so the cursor should not be allowed to move out of the client area of
your sc window.

There is a function built into W-MODE that handles the cursor, it is called
"cursor clipping". The hotkeys provided to control this:

 * ALT+F1   Turns on/off cursor clip.
 * ALT      Temporarily inverts the current state of cursor clip while it
            is held down.

So, if you switch on clipping you can not move out the cursor from the sc
screen and you can scroll your map with the cursor. If you hold down the
ALT key your clip is turned off temporarily and you can pull out the cursor
from the sc screen. When the cursor is outside the sc screen you can
release the ALT key so clip is on again but it will be actually activeted
only when you move the cursor back to your sc screen. The cursor clip
becomes activated/deactivated automatically in some circumstances. It is
automatically deactivated for example when you switch to another window
with ALT+TAB or your cursor moves over another window that partially covers
the sc screen (for example a winamp with always-on-top mode or a hint window
of the system tray that says "You have not enough free space on drive E:" :p).
Clip is automatically activated when you hold down the left mouse button to
use rectangle selection of more units or to scroll the map using the minimap.

When cursor clip is off you can use the ALT key to temporarily switch on
the clip so as to make it possible to scroll your map in the game. That's
all about cursor clipping of W-MODE, let's go 'n' try it!

Other hotkeys:

 * ALT+F10     Enables/disables moving the sc window. If you turn this
               functionality off you can not move the starcraft window to
               elsewhere on the screen. By grabbing it holding down the left
               mouse button. It can be useful when you use other
               windows (msn...) and you click here and there like a zealot
               and don't want to move the sc window accidently.

 * ALT+F11     Turn on/off always-on-top mode. This option is like that of
               Winamp's. When turned on, your sc window will be always on
               top of other windows that are not in always-on-top mode even
               if you interact with a window other than StarCraft's.

 * ALT+F12     Enables/disables all buttons on the caption of the sc window.
               This is another security option like switching off window
               movement for hardcore gamers. The buttons became grey, but
               you can still switch them with hotkeys. This option does
               a bit more when turned on than greying buttons of the
               caption. Switching on this functionality involves that you
               can not use ALT+F4 to close the window and the screensaver
               is disabled when the sc window is in foreground.

You can switch some of these functionalities not only with hotkey but with
mouse by clicking the cool icons on the window if they are not grayed.


Known bigs 'n' bugs:
~~~~~~~~~~~~~~~~~~~~
- Getting work the BNET interface while keeping W-MODE StarCraft version
  independent was not too easy. It can still contain bugs. One known
  "bug" is the slow display of listboxes. This can be annoying since
  the chat window was implemented using a listbox and you will see
  blinking when you send/receive messages.
  
- W-MODE has nothing to do with game music/sound. When you switch from
  your starcraft window to another all sc sound mutes (at least on my
  machine). This is totally dependent on your DirectSound shipped with
  your current DirectX package. It can be worked around, maybe in the
  future...

- Your StarCraft game does not pause automatically in single player mode
  when you switch to another window than starcraft's. This is actually
  not a bug, I wanted sc to do so :D Just bring up the menus with F10
  in single player mode to pause the game.


To set the options you can find a sample wmode.ini file with comments
about the possible keys. W-MODE will search wmode.ini in the StarCraft
directory. Thats all about the plug, using it is very simple.


Bugs found in the beta:
~~~~~~~~~~~~~~~~~~~~~~~
- Click on the StarCraft screen with middle or right mouse button, hold
  it down and move out the cursor from the sc screen and then release
  the button. After it you can not click on the starcraft screen with
  other mouse buttons until you make a click on the sc screen with the
  button that caused the error. Bug fixed.


Times are hard, and I'am rarely online but you can try to reach me at:

- www.bwprogrammers.com
- www.scindex.com
- xenomails|at|freemail|dot|hu

Greetingz,
XeNotRoN

June 2, 2007
Zgłoś jeśli naruszono regulamin