Hoppa till huvudinnehåll

6.0 Solution SPOILERS

sprite_x: integer=100
sprite_y: byte = 100
Hint

How do you end a line of code?

Solution
sprite_x: integer=100;
sprite_y: byte = 100;

sprite_bitmask:= %00000000;
Hint

zero sprites are currently activated, how can you activate them?

Solution
sprite_bitmask:= %00000001;
sprite_multicolor_reg1:=$00;
sprite_multicolor_reg2:=$00;
sprite_color[@spriteNumber]:=$00;
Hint

The sprites colors are all set to black. Try to change them to another color (check your sprite's colors in the sprite editor)

Solution
sprite_multicolor_reg1:=$09;
sprite_multicolor_reg2:=$01;
sprite_color[@spriteNumber]:=$04;

NOTE You can change this to any color you like, the ones in the solution are the default colors for the existing sprite.

ClearScreen("A", screen_char_loc); 
Hint

This fills the screen with the character "A", how would you make a blank screen?

Solution
ClearScreen(" ", screen_char_loc); 

NOTE Use a space character instead. You can also use the number 32 which corresponds to the blank characer in petascii

    if (joystickright=true) then 
begin
left_offset:= leftsprites[playerMovement];
right_offset:=0;
end;
if (joystickleft=true) then
begin
right_offset:= rightsprites[playerMovement];
left_offset:=0;
end;
Hint

Something is swapped around here.

Solution
  if (joystickleft=true) then 
begin
left_offset:= leftsprites[playerMovement];
right_offset:=0;
end;
if (joystickright=true) then
begin
right_offset:= rightsprites[playerMovement];
left_offset:=0;
end;

Explanation We want the left offset if we are moving to the left, and the right offset if we move to the right. The other direction's offset is set to 0.