note
	description: "[
		hu_stuff.c
		Heads-up displays
	]"
	license: "[
		Copyright (C) 1993-1996 by id Software, Inc.
		Copyright (C) 2005-2014 Simon Howard
		Copyright (C) 2021 Ilgiz Mustafin
		
		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.
		
		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
		GNU General Public License for more details.
		
		You should have received a copy of the GNU General Public License along
		with this program; if not, write to the Free Software Foundation, Inc.,
		51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
	]"

class 
	HU_STUFF

create 
	make

feature 

	i_main: I_MAIN

	make (a_i_main: like i_main)
		do
			i_main := a_i_main
			create w_message.make
			create w_chat.make
			create w_title.make
		end
	
feature 

	Player_names: ARRAY [STRING_8]
		once
			create Result.make_filled ("", 0, 4)
			Result [0] := {D_ENGLSH}.hustr_plrgreen
			Result [1] := {D_ENGLSH}.hustr_plrindigo
			Result [2] := {D_ENGLSH}.hustr_plrbrown
			Result [3] := {D_ENGLSH}.hustr_plrred
		ensure
				Result.lower = 0
			instance_free: class
		end
	
feature 

	hu_init
		do
			{NOT_IMPLEMENTED}.not_implemented ("HU_Init", False)
		end
	
feature 

	w_message: HU_STEXT_T

	w_chat: HU_ITEXT_T

	w_title: HU_TEXTLINE_T
	
feature 

	Queuesize: INTEGER_32 = 128

	Chatchars: ARRAY [CHARACTER_8]
		once
			create Result.make_filled ((0).to_character_8, 0, Queuesize - 1)
		end

	head: INTEGER_32

	tail: INTEGER_32

	hu_dequeuechatchar: CHARACTER_8
		do
			if head /= tail then
				Result := Chatchars [tail]
				tail := (tail + 1) & (Queuesize - 1)
			else
				Result := (0).to_character_8
			end
		end
	
feature 

	hu_drawer
		do
			{NOT_IMPLEMENTED}.not_implemented ("HU_Drawer", False)
		end

	hu_erase
		do
			i_main.Hu_lib.hulib_erasestext (w_message)
			i_main.Hu_lib.hulib_eraseitext (w_chat)
			i_main.Hu_lib.hulib_erasetextline (w_title)
		end
	
feature 

	hu_responder (ev: EVENT_T): BOOLEAN
		do
			{NOT_IMPLEMENTED}.not_implemented ("HU_Responder", False)
		end
	
feature 

	hu_start
		do
			{NOT_IMPLEMENTED}.not_implemented ("HU_Start", False)
		end
	
feature 

	hu_ticker
		do
			{NOT_IMPLEMENTED}.not_implemented ("HU_Ticker", False)
		end
	
end -- class HU_STUFF

Generated by ISE EiffelStudio