home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************/
- /* NOTE: started from source of Blowup in nic.funet.fi *******************/
- /* log ********************************************************************
-
- Coding:
- - error messages into own function, re-outlined code, _lots_ of comments
- - rewrote command line argument handler and fixed fatal startup bug
- - less cryptic variable names (struct members and macros had equal names)
- - clear upper left corner for starting place
- - header file
- - (SQUARE).marked overflow fixed (not bug, but question of principle)
- - removed open_near_squares() since I couldn't understand it
- - struct bit-fields (use less memory)
- - split some functions to smaller and more specialized ones
- - fixed (finally) a serious bug in counting safe squares
- - added keyboard control for cursor (my mouse got broken...)
- - lots of defines to make it easy to move fields (buttons) around
- - game options (3 sizes, 4 levels)
- - keyboard shortcuts
- - removed command line options (temporarily)
- - status flags
- - redundant error checking "just in case"
- - radio buttons functional
- - time checking into own function to let time progress all the time
- - split code to several files (too big to compile in one piece)
- - added possibility to CHEAT, always noticed and marked as CHEATing (now..)
- - quit and new buttons functional
- - open_near_squares() back, different approach, same idea (game too easy now)
- - command line options back
- - control from status word to several flags
- - dialogs functional
- - keep only common dialog image to save memory
- - stack overflow when reveal in easy+large -> double stack size
- - keyboard buffer fills up too fast, thanx to "keep cursor inside minefield"..
- - rewrote command line handling and error/exit routines
- - generic function handle_dialog() works!
- . pointer to structure, whose member is a pointer to array of static void
- function pointers, and this is passed as an argument from outside of file :-)
- - menubar and menus functional
- - hierarchical submenus 1. level functional (some really wasteful code..)
- - memory allocation problems: some fatal, all mysterious
- - Hall of Fame dialog lookalike
- - removed most of status bar to make menus more important
- - First software review session! Some nice feedback and suggestions
- - icon drawing functions take now absolute coordinates -> replace old w/macros
- - unite all 3 functions that checked keyboard input
- - get rid of memory allocation problem by not allocating memory
- . free everything as soon as possible == before smthng else is allocated
- . don't try to free memory, which you didn't allocate!!
- - optimized menu code and reduced structures by half
- - more memory management (pre-allocated template memory + flags)
- - save settings between sessions
- - highscore functional
- - cheating enabled - not marked as cheating for testing purposes
- - "portable" ANSI C RNG
- - can't change country settings, not even w/direct BIOS call..
- - trouble in redefining colors
- . red and brown are same color in my color editor!?!
- (actually brown doesn't function and red is used in place of both)
- . setting 16 16-color pages gives 4 color pages
- . setting 4 64-color pages gives 1 color page
- - HAA! Now remember this: when totally mysterious, weird and unpossibly
- crashes happen, increase stack size!!!
- - can't test from compiler due lack of memory (anything related to score)
- - compiler used to optimize my pseudo Result Generator Algorithm away. Fixed.
- - check for read-only diskettes -> lots of trouble
- - Thanx Harri! First BETA-tester ;-)
- . added flag to prevent creation of mines.def and mines.hof files
- . some noise added: 4 beeps
- - amount of extended memory (still needs to get free/used)
- - easier system-generated scores (too easy now.. how to please everybody?)
- - I printed all the code, removed some redundant code and fixed some bugs
- . remember: mpage changed all TAB -> CR == restarted printing at 1st column
- . (FLAGS)now structure to 14 unsigned ints. Faster code, uses more memory.
- . fixed bug in restoring last used level. Would've never occured since it
- is 2 bit field and all possibilities are used, but still it was a bug..
- . fixed bug in handling Score dialog w/keyboard. I forgot to enable it.
- . found out why Score got zeroed sometimes.. real stupid, counting lenght
- of string instead of size of memory buffer. Fixed.
- - "Ask, and it shall be given to you"
- . 2 ways to reset score: all via menu and some via button in Score Dialog
- . all levels now easier
- . statusbar is now 3 buttons, shift reverses operation in size/level
- - small changes
- . SHADOW no more part of dialog
- . cursor centering faster
- . fixed debug detection of changed amount of free memory (finally)
- - between summer holiday and Finnish army refreshment camp
- . one or two flags
- . mark default button (Bug: draws over cursor. Fix: don't use moving line)
- . Mac cursor + blown-up cursors
- . superclick by stepping on opened square (unsafe)
- . statusbar now works w/mouse only: step forward and mark backward
- . more general radiobutton grouping/handling
- . default button
- - BUG2: pressing ESC while menu is open.. disabled.
- - new ToDo list (lots to do :)
- - more general menu creation
- - superclick now safe, auto-stepping and auto-marking.. too easy to play
- - BUG2: ESC works correctly with all menus
- . it's so incredible simple I wonder, if it really works..
- - generic check_text_input() for getting user input
- - color editor finally works (crossing my fingers..)
- . palette saved in a file and read at start up
- . take 2: when mysterious and weird errors happen, REBUILD the whole PROJECT
- . sleep it over and try again next morning.. well, later same day actually :)
- . edit one file at a time and if you redefine a structure REBUILD all PROJECT
-
- Graphics:
- - tested 2-page drawing -> faster, but max available resolution decreased
- - enable mouse for full screen all the time -> lots of trouble! (fixed)
- . keep mouse always in sight == allowed area smaller than screen
- . mouse routines in assembler just for the fun of it..
- . mouse available for the whole program execution time
- - support only VGA 640x480x16
- - speedup screen update w/runtime square templates and specialized functions,
- removed unnecessary drawing on screen and prohibit writing over cursor
- . program response time should be now fast enough
- - buttons in statusblock for fast selecting
- - identify keyboard shortcut keys in button names (color, highlight)
- - smooth working radio buttons (no flicker, works even with keyboard)
- . now Mac compatible (not selected, maybe selected, selected)
- - try to speed graphics with code from Richard F. Ferraro's book (video.asm)
- - new and quit buttons
- - new colors for mine numbers (bright to dark)
- - possibility to check the minefield layout for testing purposes
- - save and restore old screen background color (just in case)
- - dialogs have shadow to make them look 3D
- . raise up front to catch attention
- - changed solid background to interleaved to stress eyes less
- - cursor flickers no more (mouse_hide for longer periods)
- - can choose either lefthanded or righthanded cursor
- - it sure is hard to make menus:
- . 3D mine amount numbers
- . new flags (different shapes for color blind people)
- . different looks (metal, grass, sea)
- - when using keyboard to move cursor, keep it inside minefield
- . shift+arrow keys can move cursor outside
- - menubar and menus look and behave pretty well..
- . all 3D
- . popup hierarchical submenus
- - separate help menu + many new and bigger help dialogs
- - status block at top of screen (better now)
- - bigger squares -> smaller max minefield area
- - always center minefield
- - radio buttons in highscore work now with mouse and keyboard
- - lots of and even more small cosmetics fixes while writing The Report
- - second and last Review (lots of to fix):
- . visualize mouse buttons w/mouse pictures
- . OK button to dialogs (== only exit)
- . menus to work with keyboard (how OS/2 works?)
- . enter user name in DOS text mode to get a _blinking_ cursor
- . help dialog items in order of usage (?)
- - Marking dialog final (first version)
- - OK button into Score dialog
- - Postcard dialog final
- . pixel image of Finland as a stamp
- - "About This PC" dialog
- . current country (27 different)
- . RAM memory bar
- - rewrote About, Credits, Rules dialogs
- - delay in score dialog, when pressing the Exit button w/keyboard
- - submenus work now as expected, not as I preferred
- - Thanx Harri! First BETA-tester ;-)
- - a real nasty looking bug when using menus w/mouse and keyboard. Fixed.
- - sticky menus (should be optional)
- . changed code in 3 places, remember when restoring normal menus
- - active menu item marked (only one per menu, only in submenus)
- - mouse moves closer to 1:1 resolution and faster (too slippery?)
- - first BUG(!) report (Björn Karlsen) - MineValue justification fixed
- - exploding mines damage cursor
- - options dialog + some new options for it + all old enabled
- - something small but visual for 1.0d release
- . new score highligted on HighScore dialog
- . Sea exterior has waves
- . 2nd credits dialog
- . safe superclick shows squares, which were about to be stepped/marked
- - Color editor
- . BGI calls to get it done fast (changing palette slow == misses function)
- . sliders not fully functional
- . should do getcolor() inside sample window
- . undoc feature: mark_button while pressing Default == sum colors to Gray Scale
- - it's raining so I can't cycle to university to upload 1.0d..
- . inactive horizontal bar in menu to separate dangerous/group items
- . in statusbar "Mines" title should've been and is now "Flags"
- . Hint: moves cursor on safe square. Asking adds time (squares/10), will
- randomly search (squares/10) time and then in order from bottom right
- corner one row at a time.. still raining..
- . fixed a bug w/pressing mouse buttons w/keyboard (ctrl-left/ctrl-right)
-
- To-Do:
- Version 1.0
- - menus to work with keyboard (close!)
- - startup screen (320x200x256 GIF, external)
- - logout screen == nag (postcard dialog) (exit w/8 bit on didn't work ?!?)
- - better sounds == tunes (2 requests, one for no sounds at all)
- - yet again the ******** Random Score Generator algorithm...
- . user can control the random score difficulty (shift/alt)
- - save last used Record name into mines.def
- - HighScore and Defaults files are created in current directory
- . get that PSP specs and allow 2 possibilities: current vs. program dir
- (in case someone runs this from CD disk or read-only network)
- . does PSP work in OS/2? Windows 3.x/NT (Nice Try :)?
- . some other user-defined directory
- - faster get/putimage() (Ferraro)
- - software cursor drawing and movement (ISR) (2 requests)
- - maybe own mouse device driver..
- . "Logitech Mouse Programmer's Reference Manual" has serial I/O timing and
- somewhere I saw the port data bit by bit
- . beware Microsoft Mouse Programmer's Reference! I checked it <shudder>.
- . howabout How to Build a Better Mousetrap? Try to check reviews
- - Icon and .pif files for Windows users <sigh>
-
- Version 2.0
- - add the other minesweeper games:
- . unix: try to get from top-left to bottom-right
- . Gung-Ho (exploded mine == +5 sec)
- . only flag mines (now: only find safe)
- . check every square (to make the selection complete)
- . find only mines == apples, hedgehogs etc. (empty square == +2 secs)
- - Roman, Japanese, Chinese, Indian etc. numerals (anybody want?)
- - screen dump into file (PCX)
- - used OS identification (== 2 lines 4 OS) (dos,4dos,OS/2,Win,NT)
- - highscore result error checking and crypting
- - CRC checking to prevent virus infections
-
- Version 3.0 (The Ultimate version)
- - print directly a screen snapshot
- . color, shades of gray, PostScript.. laser vs. matrix printer
- - more menu type options: tear-off+floating (the difficult one)
- - multilingual (separate language files + default build-in)
- . Pioneeripeli Suomen Armeijan Pioneerikoululle (Kouvola)
- - get rid of BGI libraries
- - own font (6x6 and 8x8) + writing routines (Ferraro)
- - change to text mode when requesting user name (8bit font)
- . save plane 2
- - you should see through dialog shadows
- - cycle cursor color (done, but how to keep it not-black-nor-even-too-dark)
- - continuous background music (LPT sounds and/or some soundcards)
- . volume control: silent, low, medium, loud (control w/PC impossible?)
- . VOC
- - for superVGAs extra huge play area 1024x768x16
- - automatic solving
- - for more see "mines.all"
-
- Bugs:
- - only 7 bit font in graphics mode == no Scandinavian characters
- - keyboard and mouse together at the same time -> still unwanted operations ?
- - biosmemory() returns false data under DESQview says
- Dr.James T.Smith: "Advanced Turbo C" page 30
- - fprintf doesn't detect write-protected diskettes, so I got into trouble:
- . I use INT13 AH=10 to check, if drive is ready
- . don't know if partition is on first hd (0x80) or second hd (0x81)
- . need to study partition table, I saw sample code in some magazine..
- . at the moment no harddisk read-access checked, use -f flag to prevent
- file creation, if necessary
- - can't write on 720k floppy !?!
- - too slow main loop: w/fast mouse mouse_up detected in wrong square
- . use ISR
-
- Graphical User Interface:
- There's no standard for graphical DOS programs, so I can make it just right!
-
- Study rivalling programs for "common" features:
-
- Mine Field 1.0.1 (Macintosh) (John Lindal 1992)
- Mine Sweeper 1.0 (Macintosh) (William Edward Woody 1991)
- Mind Mines 1.2.2 (Macintosh)
- MacMines 1.0 (Macintosh) (Cary Torkelson 1991)
- Bombs 2.2 (Macintosh) (Christer Ericson 1991)
- Saddam's Revenge 1.1a (Macintosh) (David B. Zwiefelhofer 1991)
- Mines 1.01 (Macintosh) (Daniel T. Griscom 1988)
- Hexmines 1.1 (Macintosh) (Ingemar Ragnemalm 1992)
- Mines (SunTools) (Tom Anderson) (I know it exist, but haven't seen)
- xbomb 1.2 (X11) (Matthew Merzbacher 1992) (read man page)
- xtmines 1.2 (X11) (Timothy K. Tsai 1992) (read man page)
- Mine Find 1.0 (DOS) (Edward Hengin 1993)
- Minesweeper 3.1 (MS Windows 3.1 1992)
-
- menubar: all but one had this (Mine Find had only buttons)
- Info (About, Preferences, Help)
- Game (New Game, Highscores, Sound, Quit)
- Level (Easy, Intermadiate, Hard, Impossible, Custom)
- buttons: for fast select (Mine Find, Saddam's Revenge)
- status_block: number of mines to be found and used time
- icons: visualize game objects and actions (step, flags, mine, blowup, Saddam)
- colors: backgroud (blue: cool, water)
- minefield (gray: neutral)
- warning flag (red: danger, stop, heat)
- "possible flag" (green: safe, go, alive)
- mine (black: unknown, threat)
- number of mines nearby (gradate from safe to danger)
- sound: explosions, laugh (Saddam's Revenge!), step/mark square
- animation: Saddam's Revenge, explositions
-
- Object of game:
- - to get from top left corner to lower right corner
- - to find all mines (identify every square)
- - to find all safe places
-
- Other observations:
- - HexMines has a different minefield layout (how about 3D..)
- - xtmines has 3 granades to explode mines and 10 levels of playing
- - all need mouse
- - some can have several simultaneous games
-
- Tony Rubin: "User Interface Design for Computer Systems"
-
- - Lower cost PC based colour systems often offer only sixteen fixed colours,
- in two rangers of eight, one brighter than the other. Only the darker range
- can be used as a background.
- - ways in which colour can help on a screen
- 1. emphasise the format and partitioning of information on screens eg. make
- title stand out or make scrollbars and icon easier to differentiate
- 2. draw attention to significant information such as warnings or a single
- target item to be detected
- 3. categorise information: by colour coding similar items, related information
- of interest can be easily be grouped by the user
- 4. locate information at different positions of quantitative scale, eg.
- gradation from blue yellows oranges to red could indicate temperature
- 5. associate headings with information, as on a graph key for example
- - don't rely on colour coding alone: redundant coding
- . position, size, spatial pattern, temporal pattern, color
- . London Underground map (black and white versus color)
- . few distinct colors minimizes color confusion as redundant coding, too
- . some users are color deficient and will have trouble discriminating some
- colour combinations. Using redundant coding w/pattern, shape, size and
- contrast will be useful if not essential to them
- **************************************************************************/
-