trm_cursor()

Purpose

Sets the cursor (position for low level output sent to the screen with trm_so()).

Old name

#define _cursor trm_cursor

Syntax

void trm_cursor(row, col)

Parameters

int row

Row to which cursor moves

 

int col

Column to which cursor moves

Description

The function trm_cursor() moves the cursor to the given position.

The values start from 0, so the call:

trm_cursor(0, 0);

moves the cursor to the top left-hand corner of the screen.

This function has no effect on the positioning of maps. It should not be used in mormal DP4 programs

Example

/*
C Functions Reference Manual
----------------------------
Filename: TRM_CURS.C
Example: trm_cursor, trm_curs_on and trm_grabchr
Purpose: Let's move the cursor to the top left-hand
corner
*/

#include "dp4.h"
void process()
{
map_clear_all();
trm_refresh();
trm_cursor(0,0);
trm_curs_on();
trm_grabchr();
}