www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/28/18:51:27

From: silkwodj AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Assembly routines with C++
Date: Wed, 28 Jul 1999 14:22:44 GMT
Organization: Deja.com - Share what you know. Learn what you don't.
Lines: 19
Message-ID: <7nn3nc$uos$1@nnrp1.deja.com>
References: <19990726135211 DOT 18814 DOT rocketmail AT send205 DOT yahoomail DOT com>
NNTP-Posting-Host: 205.147.228.2
X-Article-Creation-Date: Wed Jul 28 14:22:44 1999 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
X-Http-Proxy: 1.0 x37.deja.com:80 (Squid/1.1.22) for client 205.147.228.2
X-MyDeja-Info: XMYDJUIDsilkwodj
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I may be too inexperienced to answer well, but firstly Nasm (or any
assembler) will never care about the programming convention you are
ascribing to.  I don't mean to be rude.  But your line() function
expects to find an address for the back buffer on the stack, that's all
there is to it.

Now, getting it there under the constraints that you are following for
some level of OOP purity seems to be the only problem.

Perhaps it is the irreverence of gamers that I listen to for my
learning that has rubbed off, but I would have no qualms about creating
a global pointer to the back buffer.  Your line() function will live
just fine as an extern "C" function.  Your member functions can call it
as you see fit in something like Object.Draw_Object().  I don't think
that OOP mandates that you create a Screen class.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019