If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Star Trek: The Next Generation: The Transinium Challenge (DOS)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Star Trek: The Next Generation: The Transinium Challenge

Developer: Trans Fiction Systems Inc.
Publisher: Simon & Schuster
Platform: DOS
Released in US: 1989


SourceIcon.png This game has uncompiled source code.


Source Code

Several chunks of the source code remain in TRANS.EXE. Strangely, it's written in some variant of Forth, an unusual choice for a game and especially in 1989.

\ Forward Reference resolved after ReceptorRole def.

 Global WhichSeat#			\ to contain ^EF.seat# when order is posted


 0 Constant HasNo			\ Bordering paramaters
 1 Constant HasBlue
 2 Constant HasRed
 3 Constant HasNormal


\ Bitflag manipulators
\ These assume that their data has been most recently referenced.
\ The framelptr for most these words is actually FramelBodyBuf, where
\ data has been imported using :ImportBody

 : thFlagTrue ( FramelBody\n -- ) \ sets nth bitflag
	swap ^EF.flags  swap thBit   ( s: flagsAddr\mask -- )
	bitsON 
	UpdateDataInFramelBodySeg
	; 

: thFlagFalse ( FramelBody\n -- ) \ resets nth bitflag
	swap ^EF.flags  swap thBit   ( s: flagsAddr\mask -- )
	bitsOFF 
	UpdateDataInFramelBodySeg
	; 

: thFlagTrue? ( FramelBody\n -- flag) \ true if bit is set
	swap ^EF.flags swap  thBit@  ; 

: IsInactive? 	( framelBody -- True if controller is inactive. Not msg)
	3 thFlagTrue? ;


  1 Constant Dim           \ All three IBM Mode 6 dependent.
  5 Constant Bright
  0 Constant Invisible

	Doer DrawThisOutline		\ May be rounded if a button is used

: OutlineDrawn  ( FramelBody\Attribute -- ) \ Draw appropriate outline
  <GDTA> C@           	( s: FramelBody\Attribute\OldAttribute -- )
   Rot Rot  DR-COLOR  	( s: OldAttribute\FramelBody --           )
   'sOutlineCoords  ‹j‹å   DrawThisOutline			( s: OldAttribute --                     )
   DR-COLOR ;		  \ Restore old attribute. This is IBM Mode 6 dependent.

\ Controller hit check, for mouse support

	-CAPS

	DVARIABLE  THEPOINT

: CHECKFORHIT	( x\y\framelBody -- True if hit | Else False )
	DUP ISINACTIVE?			\ if asleep, don't respond to hits
		IF 
			DDROP DROP FALSE
		ELSE
			C{ 'SOUTLINECOORDS ReorderCoords FRAMEL'SRECT }SetRect 
			DROP				\ unneeded remaining stack item
			THEPOINT D!		\ Put the point where MTW will find it
			C{ 1 1 FRAMEL'SRECT GET:CS THEPOINT }PtOnRect 
		THEN
		;


\ Protect framel rects while the :Appear, to prevent mouse cursor boffing


	DEFER PROTECTRECT		\ noop if no mouse
	DEFER UNPROTECTRECT 	\ noop if no mouse

: (PROTECTRECT) ( frmlPtr -- frmlPtr ) \ Protect the rectangle
	C{ DUP :IMPORTBODY 'SOUTLINECOORDS ReorderCoords PROTECTEDRECT }SetRect 
	C{ PROT
appear
\ 7 November 88  5:46pm	 RGM  Use TheImage not TheMovie in (MovieBorderDrawn)
\ 21 November 88  10:26am	 RGM  Draw dim outline when sleeping if bordered
\ 8 Dec
if no mouse
	DEFER UNPROTECTRECT 	\ noop if no mouse

: (PROTECTRECT) ( frmlPtr -- frmlPtr ) \ Protect the rectangle
	C{ DUP :IMPORTBODY 'SOUTLINECOORDS Reorder