note
	description: "[
		m_bbox.c
		Main loop menu stuff.
		Random number LUT.
		Default Config File.
		PCX Screenshots.
	]"
	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 
	M_BBOX

create 
	default_create

feature 

	make
		do
		end
	
feature -- bbox coordinates

	Boxtop: INTEGER_32 = 0

	Boxbottom: INTEGER_32 = 1

	Boxleft: INTEGER_32 = 2

	Boxright: INTEGER_32 = 3
	
feature 

	m_addtobox (box: ARRAY [FIXED_T]; x, y: FIXED_T)
		do
			if x < box [Boxleft] then
				box [Boxleft] := x
			elseif x > box [Boxright] then
				box [Boxright] := x
			end
			if y < box [Boxbottom] then
				box [Boxbottom] := y
			elseif y > box [Boxtop] then
				box [Boxtop] := y
			end
		ensure
			instance_free: class
		end

	m_clearbox (box: ARRAY [FIXED_T])
		do
			box [Boxtop] := create {FIXED_T}.from_integer ({DOOMTYPE_H}.minint)
			box [Boxright] := create {FIXED_T}.from_integer ({DOOMTYPE_H}.minint)
			box [Boxbottom] := create {FIXED_T}.from_integer ({DOOMTYPE_H}.maxint)
			box [Boxleft] := create {FIXED_T}.from_integer ({DOOMTYPE_H}.maxint)
		ensure
			instance_free: class
		end
	
end -- class M_BBOX

Generated by ISE EiffelStudio